RTEMS 4.11Annotated Report
Thu Dec 20 14:11:18 2012
0200a790 <_CORE_RWLock_Release>:
#include <rtems/score/watchdog.h>
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
200a790: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
200a794: 03 00 80 83 sethi %hi(0x2020c00), %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 );
200a798: 7f ff e4 d2 call 2003ae0 <sparc_disable_interrupts>
200a79c: fa 00 60 10 ld [ %g1 + 0x10 ], %i5 ! 2020c10 <_Per_CPU_Information+0x10>
200a7a0: 84 10 00 08 mov %o0, %g2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
200a7a4: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
200a7a8: 80 a0 60 00 cmp %g1, 0
200a7ac: 12 80 00 08 bne 200a7cc <_CORE_RWLock_Release+0x3c>
200a7b0: 80 a0 60 01 cmp %g1, 1
_ISR_Enable( level );
200a7b4: 7f ff e4 cf call 2003af0 <sparc_enable_interrupts>
200a7b8: b0 10 20 00 clr %i0
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
200a7bc: 82 10 20 02 mov 2, %g1
200a7c0: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
200a7c4: 81 c7 e0 08 ret
200a7c8: 81 e8 00 00 restore
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
200a7cc: 32 80 00 0b bne,a 200a7f8 <_CORE_RWLock_Release+0x68>
200a7d0: c0 27 60 34 clr [ %i5 + 0x34 ]
the_rwlock->number_of_readers -= 1;
200a7d4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200a7d8: 82 00 7f ff add %g1, -1, %g1
if ( the_rwlock->number_of_readers != 0 ) {
200a7dc: 80 a0 60 00 cmp %g1, 0
200a7e0: 02 80 00 05 be 200a7f4 <_CORE_RWLock_Release+0x64>
200a7e4: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/* must be unlocked again */
_ISR_Enable( level );
200a7e8: 7f ff e4 c2 call 2003af0 <sparc_enable_interrupts>
200a7ec: b0 10 20 00 clr %i0
return CORE_RWLOCK_SUCCESSFUL;
200a7f0: 30 80 00 24 b,a 200a880 <_CORE_RWLock_Release+0xf0>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
200a7f4: 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;
200a7f8: c0 26 20 44 clr [ %i0 + 0x44 ]
_ISR_Enable( level );
200a7fc: 7f ff e4 bd call 2003af0 <sparc_enable_interrupts>
200a800: 90 10 00 02 mov %g2, %o0
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
200a804: 40 00 07 b3 call 200c6d0 <_Thread_queue_Dequeue>
200a808: 90 10 00 18 mov %i0, %o0
if ( next ) {
200a80c: 80 a2 20 00 cmp %o0, 0
200a810: 22 80 00 1c be,a 200a880 <_CORE_RWLock_Release+0xf0>
200a814: b0 10 20 00 clr %i0
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
200a818: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
200a81c: 80 a0 60 01 cmp %g1, 1
200a820: 32 80 00 05 bne,a 200a834 <_CORE_RWLock_Release+0xa4>
200a824: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
200a828: 82 10 20 02 mov 2, %g1
return CORE_RWLOCK_SUCCESSFUL;
200a82c: 10 80 00 14 b 200a87c <_CORE_RWLock_Release+0xec>
200a830: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
200a834: 82 00 60 01 inc %g1
200a838: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
200a83c: 82 10 20 01 mov 1, %g1
200a840: 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 );
200a844: 40 00 08 df call 200cbc0 <_Thread_queue_First>
200a848: 90 10 00 18 mov %i0, %o0
if ( !next ||
200a84c: 92 92 20 00 orcc %o0, 0, %o1
200a850: 22 80 00 0c be,a 200a880 <_CORE_RWLock_Release+0xf0>
200a854: b0 10 20 00 clr %i0
200a858: c2 02 60 30 ld [ %o1 + 0x30 ], %g1
200a85c: 80 a0 60 01 cmp %g1, 1
200a860: 02 80 00 07 be 200a87c <_CORE_RWLock_Release+0xec> <== NEVER TAKEN
200a864: 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;
200a868: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200a86c: 82 00 60 01 inc %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
200a870: 40 00 08 85 call 200ca84 <_Thread_queue_Extract>
200a874: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
}
200a878: 30 bf ff f3 b,a 200a844 <_CORE_RWLock_Release+0xb4>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
200a87c: b0 10 20 00 clr %i0
200a880: 81 c7 e0 08 ret
200a884: 81 e8 00 00 restore
0200a888 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
200a888: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200a88c: 90 10 00 18 mov %i0, %o0
200a890: 40 00 06 b5 call 200c364 <_Thread_Get>
200a894: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a898: c2 07 bf fc ld [ %fp + -4 ], %g1
200a89c: 80 a0 60 00 cmp %g1, 0
200a8a0: 12 80 00 08 bne 200a8c0 <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN
200a8a4: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200a8a8: 40 00 09 03 call 200ccb4 <_Thread_queue_Process_timeout>
200a8ac: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
200a8b0: 03 00 80 81 sethi %hi(0x2020400), %g1
200a8b4: c4 00 62 e0 ld [ %g1 + 0x2e0 ], %g2 ! 20206e0 <_Thread_Dispatch_disable_level>
--level;
200a8b8: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
200a8bc: c4 20 62 e0 st %g2, [ %g1 + 0x2e0 ]
200a8c0: 81 c7 e0 08 ret
200a8c4: 81 e8 00 00 restore
020085d8 <_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
)
{
20085d8: 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)) ) {
20085dc: 90 10 00 18 mov %i0, %o0
20085e0: 40 00 07 83 call 200a3ec <_Thread_queue_Dequeue>
20085e4: ba 10 00 18 mov %i0, %i5
20085e8: 80 a2 20 00 cmp %o0, 0
20085ec: 12 80 00 0e bne 2008624 <_CORE_semaphore_Surrender+0x4c>
20085f0: 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 );
20085f4: 7f ff e7 f4 call 20025c4 <sparc_disable_interrupts>
20085f8: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
20085fc: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
2008600: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
2008604: 80 a0 40 02 cmp %g1, %g2
2008608: 1a 80 00 05 bcc 200861c <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN
200860c: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
2008610: 82 00 60 01 inc %g1
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2008614: b0 10 20 00 clr %i0
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
2008618: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
200861c: 7f ff e7 ee call 20025d4 <sparc_enable_interrupts>
2008620: 01 00 00 00 nop
}
return status;
}
2008624: 81 c7 e0 08 ret
2008628: 81 e8 00 00 restore
02007260 <_Event_Surrender>:
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
2007260: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set pending_events;
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
2007264: e0 06 20 30 ld [ %i0 + 0x30 ], %l0
_ISR_Disable( level );
2007268: 7f ff ec d7 call 20025c4 <sparc_disable_interrupts>
200726c: ba 10 00 18 mov %i0, %i5
2007270: b0 10 00 08 mov %o0, %i0
RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set the_new_events,
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
2007274: c2 06 80 00 ld [ %i2 ], %g1
2007278: b2 16 40 01 or %i1, %g1, %i1
200727c: f2 26 80 00 st %i1, [ %i2 ]
_Event_sets_Post( event_in, &event->pending_events );
pending_events = event->pending_events;
event_condition = the_thread->Wait.count;
2007280: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
2007284: 82 8e 40 02 andcc %i1, %g2, %g1
2007288: 02 80 00 3d be 200737c <_Event_Surrender+0x11c>
200728c: 07 00 80 76 sethi %hi(0x201d800), %g3
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
2007290: 86 10 e2 f0 or %g3, 0x2f0, %g3 ! 201daf0 <_Per_CPU_Information>
2007294: c8 00 e0 08 ld [ %g3 + 8 ], %g4
2007298: 80 a1 20 00 cmp %g4, 0
200729c: 22 80 00 18 be,a 20072fc <_Event_Surrender+0x9c>
20072a0: c6 07 60 10 ld [ %i5 + 0x10 ], %g3
20072a4: c6 00 e0 10 ld [ %g3 + 0x10 ], %g3
20072a8: 80 a7 40 03 cmp %i5, %g3
20072ac: 32 80 00 14 bne,a 20072fc <_Event_Surrender+0x9c>
20072b0: c6 07 60 10 ld [ %i5 + 0x10 ], %g3
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
20072b4: c6 06 c0 00 ld [ %i3 ], %g3
20072b8: 86 00 ff ff add %g3, -1, %g3
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
20072bc: 80 a0 e0 01 cmp %g3, 1
20072c0: 38 80 00 0f bgu,a 20072fc <_Event_Surrender+0x9c>
20072c4: c6 07 60 10 ld [ %i5 + 0x10 ], %g3
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
20072c8: 80 a0 40 02 cmp %g1, %g2
20072cc: 02 80 00 04 be 20072dc <_Event_Surrender+0x7c>
20072d0: 80 8c 20 02 btst 2, %l0
20072d4: 02 80 00 2a be 200737c <_Event_Surrender+0x11c> <== NEVER TAKEN
20072d8: 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) );
20072dc: b2 2e 40 01 andn %i1, %g1, %i1
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20072e0: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
event->pending_events = _Event_sets_Clear(
20072e4: f2 26 80 00 st %i1, [ %i2 ]
pending_events,
seized_events
);
the_thread->Wait.count = 0;
20072e8: c0 27 60 24 clr [ %i5 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20072ec: c2 20 80 00 st %g1, [ %g2 ]
*sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
20072f0: 82 10 20 03 mov 3, %g1
20072f4: 10 80 00 22 b 200737c <_Event_Surrender+0x11c>
20072f8: c2 26 c0 00 st %g1, [ %i3 ]
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
20072fc: 80 8f 00 03 btst %i4, %g3
2007300: 02 80 00 1f be 200737c <_Event_Surrender+0x11c>
2007304: 80 a0 40 02 cmp %g1, %g2
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
2007308: 02 80 00 04 be 2007318 <_Event_Surrender+0xb8>
200730c: 80 8c 20 02 btst 2, %l0
2007310: 02 80 00 1b be 200737c <_Event_Surrender+0x11c> <== NEVER TAKEN
2007314: 01 00 00 00 nop
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007318: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
200731c: b2 2e 40 01 andn %i1, %g1, %i1
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
event->pending_events = _Event_sets_Clear(
2007320: f2 26 80 00 st %i1, [ %i2 ]
pending_events,
seized_events
);
the_thread->Wait.count = 0;
2007324: c0 27 60 24 clr [ %i5 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007328: c2 20 80 00 st %g1, [ %g2 ]
_ISR_Flash( level );
200732c: 7f ff ec aa call 20025d4 <sparc_enable_interrupts>
2007330: 90 10 00 18 mov %i0, %o0
2007334: 7f ff ec a4 call 20025c4 <sparc_disable_interrupts>
2007338: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
200733c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
2007340: 80 a0 60 02 cmp %g1, 2
2007344: 02 80 00 06 be 200735c <_Event_Surrender+0xfc>
2007348: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
200734c: 7f ff ec a2 call 20025d4 <sparc_enable_interrupts>
2007350: 33 04 01 ff sethi %hi(0x1007fc00), %i1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007354: 10 80 00 08 b 2007374 <_Event_Surrender+0x114>
2007358: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1007fff8 <RAM_END+0xdc7fff8>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
200735c: c2 27 60 50 st %g1, [ %i5 + 0x50 ]
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
2007360: 7f ff ec 9d call 20025d4 <sparc_enable_interrupts>
2007364: 33 04 01 ff sethi %hi(0x1007fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
2007368: 40 00 0e b7 call 200ae44 <_Watchdog_Remove>
200736c: 90 07 60 48 add %i5, 0x48, %o0
2007370: b2 16 63 f8 or %i1, 0x3f8, %i1
2007374: 40 00 0a 49 call 2009c98 <_Thread_Clear_state>
2007378: 91 e8 00 1d restore %g0, %i5, %o0
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
200737c: 7f ff ec 96 call 20025d4 <sparc_enable_interrupts>
2007380: 81 e8 00 00 restore
02007384 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
2007384: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
2007388: 90 10 00 18 mov %i0, %o0
200738c: 40 00 0b 3d call 200a080 <_Thread_Get>
2007390: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2007394: c2 07 bf fc ld [ %fp + -4 ], %g1
2007398: 80 a0 60 00 cmp %g1, 0
200739c: 12 80 00 1b bne 2007408 <_Event_Timeout+0x84> <== NEVER TAKEN
20073a0: 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 );
20073a4: 7f ff ec 88 call 20025c4 <sparc_disable_interrupts>
20073a8: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
20073ac: 03 00 80 76 sethi %hi(0x201d800), %g1
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
20073b0: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 201db00 <_Per_CPU_Information+0x10>
20073b4: 80 a7 40 01 cmp %i5, %g1
20073b8: 12 80 00 08 bne 20073d8 <_Event_Timeout+0x54>
20073bc: c0 27 60 24 clr [ %i5 + 0x24 ]
if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
20073c0: c2 06 40 00 ld [ %i1 ], %g1
20073c4: 80 a0 60 01 cmp %g1, 1
20073c8: 12 80 00 05 bne 20073dc <_Event_Timeout+0x58>
20073cc: 82 10 20 06 mov 6, %g1
*sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
20073d0: 82 10 20 02 mov 2, %g1
20073d4: c2 26 40 00 st %g1, [ %i1 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
20073d8: 82 10 20 06 mov 6, %g1
20073dc: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
_ISR_Enable( level );
20073e0: 7f ff ec 7d call 20025d4 <sparc_enable_interrupts>
20073e4: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
20073e8: 90 10 00 1d mov %i5, %o0
20073ec: 13 04 01 ff sethi %hi(0x1007fc00), %o1
20073f0: 40 00 0a 2a call 2009c98 <_Thread_Clear_state>
20073f4: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1007fff8 <RAM_END+0xdc7fff8>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
20073f8: 03 00 80 75 sethi %hi(0x201d400), %g1
20073fc: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 201d5d0 <_Thread_Dispatch_disable_level>
--level;
2007400: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
2007404: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ]
2007408: 81 c7 e0 08 ret
200740c: 81 e8 00 00 restore
0200d550 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
200d550: 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 ) {
200d554: 80 a6 60 00 cmp %i1, 0
200d558: 02 80 00 7a be 200d740 <_Heap_Free+0x1f0>
200d55c: 88 10 20 01 mov 1, %g4
200d560: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200d564: 40 00 2c 8d call 2018798 <.urem>
200d568: 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
200d56c: 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);
200d570: 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);
200d574: 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;
200d578: 80 a2 00 1b cmp %o0, %i3
200d57c: 0a 80 00 05 bcs 200d590 <_Heap_Free+0x40>
200d580: 82 10 20 00 clr %g1
200d584: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200d588: 80 a0 40 08 cmp %g1, %o0
200d58c: 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 ) ) {
200d590: 80 a0 60 00 cmp %g1, 0
200d594: 02 80 00 6b be 200d740 <_Heap_Free+0x1f0>
200d598: 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;
200d59c: f8 02 20 04 ld [ %o0 + 4 ], %i4
200d5a0: 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);
200d5a4: 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;
200d5a8: 80 a0 40 1b cmp %g1, %i3
200d5ac: 0a 80 00 05 bcs 200d5c0 <_Heap_Free+0x70> <== NEVER TAKEN
200d5b0: 86 10 20 00 clr %g3
200d5b4: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
200d5b8: 80 a0 c0 01 cmp %g3, %g1
200d5bc: 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 ) ) {
200d5c0: 80 a0 e0 00 cmp %g3, 0
200d5c4: 02 80 00 5f be 200d740 <_Heap_Free+0x1f0> <== NEVER TAKEN
200d5c8: 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;
200d5cc: fa 00 60 04 ld [ %g1 + 4 ], %i5
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
200d5d0: 80 8f 60 01 btst 1, %i5
200d5d4: 22 80 00 5c be,a 200d744 <_Heap_Free+0x1f4> <== NEVER TAKEN
200d5d8: 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
200d5dc: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
200d5e0: 80 a0 40 04 cmp %g1, %g4
200d5e4: 02 80 00 07 be 200d600 <_Heap_Free+0xb0>
200d5e8: ba 0f 7f fe and %i5, -2, %i5
200d5ec: 86 00 40 1d add %g1, %i5, %g3
200d5f0: f4 00 e0 04 ld [ %g3 + 4 ], %i2
200d5f4: b4 1e a0 01 xor %i2, 1, %i2
200d5f8: 10 80 00 03 b 200d604 <_Heap_Free+0xb4>
200d5fc: b4 0e a0 01 and %i2, 1, %i2
200d600: b4 10 20 00 clr %i2
if ( !_Heap_Is_prev_used( block ) ) {
200d604: 80 8f 20 01 btst 1, %i4
200d608: 12 80 00 26 bne 200d6a0 <_Heap_Free+0x150>
200d60c: 80 8e a0 ff btst 0xff, %i2
uintptr_t const prev_size = block->prev_size;
200d610: 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);
200d614: 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;
200d618: 80 a0 c0 1b cmp %g3, %i3
200d61c: 0a 80 00 04 bcs 200d62c <_Heap_Free+0xdc> <== NEVER TAKEN
200d620: b2 10 20 00 clr %i1
200d624: 80 a1 00 03 cmp %g4, %g3
200d628: 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 ) ) {
200d62c: 80 a6 60 00 cmp %i1, 0
200d630: 02 80 00 44 be 200d740 <_Heap_Free+0x1f0> <== NEVER TAKEN
200d634: 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;
200d638: 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) ) {
200d63c: 80 8e e0 01 btst 1, %i3
200d640: 02 80 00 40 be 200d740 <_Heap_Free+0x1f0> <== NEVER TAKEN
200d644: 80 8e a0 ff btst 0xff, %i2
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
200d648: 22 80 00 0f be,a 200d684 <_Heap_Free+0x134>
200d64c: 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;
200d650: c8 00 60 08 ld [ %g1 + 8 ], %g4
Heap_Block *prev = block->prev;
200d654: c2 00 60 0c ld [ %g1 + 0xc ], %g1
uintptr_t const size = block_size + prev_size + next_block_size;
200d658: ba 00 80 1d add %g2, %i5, %i5
prev->next = next;
200d65c: c8 20 60 08 st %g4, [ %g1 + 8 ]
next->prev = prev;
200d660: c2 21 20 0c st %g1, [ %g4 + 0xc ]
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200d664: 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;
200d668: b8 07 40 1c add %i5, %i4, %i4
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200d66c: 82 00 7f ff add %g1, -1, %g1
200d670: 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;
200d674: 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;
200d678: 82 17 20 01 or %i4, 1, %g1
200d67c: 10 80 00 27 b 200d718 <_Heap_Free+0x1c8>
200d680: 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;
200d684: 88 17 20 01 or %i4, 1, %g4
200d688: c8 20 e0 04 st %g4, [ %g3 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d68c: c6 00 60 04 ld [ %g1 + 4 ], %g3
next_block->prev_size = size;
200d690: 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;
200d694: 86 08 ff fe and %g3, -2, %g3
200d698: 10 80 00 20 b 200d718 <_Heap_Free+0x1c8>
200d69c: c6 20 60 04 st %g3, [ %g1 + 4 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
200d6a0: 22 80 00 0d be,a 200d6d4 <_Heap_Free+0x184>
200d6a4: 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;
200d6a8: c8 00 60 08 ld [ %g1 + 8 ], %g4
Heap_Block *prev = old_block->prev;
200d6ac: c2 00 60 0c ld [ %g1 + 0xc ], %g1
new_block->next = next;
200d6b0: c8 22 20 08 st %g4, [ %o0 + 8 ]
new_block->prev = prev;
200d6b4: c2 22 20 0c st %g1, [ %o0 + 0xc ]
uintptr_t const size = block_size + next_block_size;
200d6b8: 86 07 40 02 add %i5, %g2, %g3
next->prev = new_block;
prev->next = new_block;
200d6bc: 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;
200d6c0: d0 21 20 0c st %o0, [ %g4 + 0xc ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d6c4: 82 10 e0 01 or %g3, 1, %g1
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
200d6c8: 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;
200d6cc: 10 80 00 13 b 200d718 <_Heap_Free+0x1c8>
200d6d0: c2 22 20 04 st %g1, [ %o0 + 4 ]
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
200d6d4: f0 22 20 0c st %i0, [ %o0 + 0xc ]
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
200d6d8: c6 22 20 08 st %g3, [ %o0 + 8 ]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
200d6dc: 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;
200d6e0: 86 10 a0 01 or %g2, 1, %g3
200d6e4: c6 22 20 04 st %g3, [ %o0 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d6e8: c6 00 60 04 ld [ %g1 + 4 ], %g3
next_block->prev_size = block_size;
200d6ec: 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;
200d6f0: 86 08 ff fe and %g3, -2, %g3
200d6f4: c6 20 60 04 st %g3, [ %g1 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200d6f8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
if ( stats->max_free_blocks < stats->free_blocks ) {
200d6fc: 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;
200d700: 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;
200d704: d0 26 20 08 st %o0, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks ) {
200d708: 80 a0 c0 01 cmp %g3, %g1
200d70c: 1a 80 00 03 bcc 200d718 <_Heap_Free+0x1c8>
200d710: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200d714: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
}
}
/* Statistics */
--stats->used_blocks;
200d718: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
200d71c: 82 00 7f ff add %g1, -1, %g1
200d720: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
++stats->frees;
200d724: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200d728: 82 00 60 01 inc %g1
200d72c: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
200d730: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200d734: 84 00 40 02 add %g1, %g2, %g2
200d738: 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;
200d73c: 88 10 20 01 mov 1, %g4
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
200d740: b0 09 20 01 and %g4, 1, %i0
200d744: 81 c7 e0 08 ret
200d748: 81 e8 00 00 restore
0200a750 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
200a750: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
200a754: b6 10 20 00 clr %i3
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
200a758: ba 10 00 18 mov %i0, %i5
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
200a75c: 10 80 00 11 b 200a7a0 <_Heap_Greedy_allocate+0x50>
200a760: b8 10 20 00 clr %i4
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
200a764: d2 06 40 01 ld [ %i1 + %g1 ], %o1
200a768: 90 10 00 1d mov %i5, %o0
200a76c: 94 10 20 00 clr %o2
200a770: 40 00 1d 8e call 2011da8 <_Heap_Allocate_aligned_with_boundary>
200a774: 96 10 20 00 clr %o3
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
200a778: 82 92 20 00 orcc %o0, 0, %g1
200a77c: 22 80 00 09 be,a 200a7a0 <_Heap_Greedy_allocate+0x50> <== NEVER TAKEN
200a780: b6 06 e0 01 inc %i3 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200a784: d2 07 60 10 ld [ %i5 + 0x10 ], %o1
200a788: 40 00 4a 8c call 201d1b8 <.urem>
200a78c: b0 00 7f f8 add %g1, -8, %i0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200a790: 90 26 00 08 sub %i0, %o0, %o0
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
200a794: f8 22 20 08 st %i4, [ %o0 + 8 ]
200a798: b8 10 00 08 mov %o0, %i4
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
200a79c: b6 06 e0 01 inc %i3
200a7a0: 80 a6 c0 1a cmp %i3, %i2
200a7a4: 12 bf ff f0 bne 200a764 <_Heap_Greedy_allocate+0x14>
200a7a8: 83 2e e0 02 sll %i3, 2, %g1
200a7ac: 10 80 00 0a b 200a7d4 <_Heap_Greedy_allocate+0x84>
200a7b0: b0 10 20 00 clr %i0
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
200a7b4: 90 10 00 1d mov %i5, %o0
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200a7b8: 96 0a ff fe and %o3, -2, %o3
200a7bc: 92 10 00 1b mov %i3, %o1
200a7c0: 94 06 e0 08 add %i3, 8, %o2
200a7c4: 40 00 00 cb call 200aaf0 <_Heap_Block_allocate>
200a7c8: 96 02 ff f8 add %o3, -8, %o3
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
200a7cc: f0 26 e0 08 st %i0, [ %i3 + 8 ]
200a7d0: b0 10 00 1b mov %i3, %i0
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200a7d4: f6 07 60 08 ld [ %i5 + 8 ], %i3
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
200a7d8: 80 a6 c0 1d cmp %i3, %i5
200a7dc: 32 bf ff f6 bne,a 200a7b4 <_Heap_Greedy_allocate+0x64>
200a7e0: d6 06 e0 04 ld [ %i3 + 4 ], %o3
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
200a7e4: 10 80 00 07 b 200a800 <_Heap_Greedy_allocate+0xb0>
200a7e8: 80 a7 20 00 cmp %i4, 0
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
200a7ec: 92 07 20 08 add %i4, 8, %o1
200a7f0: 90 10 00 1d mov %i5, %o0
200a7f4: 40 00 1d de call 2011f6c <_Heap_Free>
200a7f8: b8 10 00 1b mov %i3, %i4
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
200a7fc: 80 a7 20 00 cmp %i4, 0
200a800: 32 bf ff fb bne,a 200a7ec <_Heap_Greedy_allocate+0x9c>
200a804: f6 07 20 08 ld [ %i4 + 8 ], %i3
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
200a808: 81 c7 e0 08 ret
200a80c: 81 e8 00 00 restore
020120f0 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
20120f0: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
20120f4: 90 10 20 00 clr %o0
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
Heap_Block *current = heap->first_block;
20120f8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
20120fc: 10 80 00 0a b 2012124 <_Heap_Iterate+0x34>
2012100: 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 );
2012104: 90 10 00 01 mov %g1, %o0
2012108: 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);
201210c: 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;
2012110: d4 07 60 04 ld [ %i5 + 4 ], %o2
2012114: 96 10 00 1a mov %i2, %o3
2012118: 9f c6 40 00 call %i1
201211c: 94 0a a0 01 and %o2, 1, %o2
2012120: 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 ) {
2012124: 80 a0 40 1c cmp %g1, %i4
2012128: 02 80 00 05 be 201213c <_Heap_Iterate+0x4c>
201212c: 90 1a 20 01 xor %o0, 1, %o0
2012130: 80 8a 20 ff btst 0xff, %o0
2012134: 32 bf ff f4 bne,a 2012104 <_Heap_Iterate+0x14> <== ALWAYS TAKEN
2012138: d2 00 60 04 ld [ %g1 + 4 ], %o1
201213c: 81 c7 e0 08 ret
2012140: 81 e8 00 00 restore
0200d874 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
200d874: 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);
200d878: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200d87c: 40 00 2b c7 call 2018798 <.urem>
200d880: 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
200d884: 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);
200d888: 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);
200d88c: 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;
200d890: 80 a2 00 04 cmp %o0, %g4
200d894: 0a 80 00 05 bcs 200d8a8 <_Heap_Size_of_alloc_area+0x34>
200d898: 82 10 20 00 clr %g1
200d89c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200d8a0: 80 a0 40 08 cmp %g1, %o0
200d8a4: 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 ) ) {
200d8a8: 80 a0 60 00 cmp %g1, 0
200d8ac: 02 80 00 15 be 200d900 <_Heap_Size_of_alloc_area+0x8c>
200d8b0: 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;
200d8b4: c2 02 20 04 ld [ %o0 + 4 ], %g1
200d8b8: 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);
200d8bc: 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;
200d8c0: 80 a0 40 04 cmp %g1, %g4
200d8c4: 0a 80 00 05 bcs 200d8d8 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN
200d8c8: 84 10 20 00 clr %g2
200d8cc: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
200d8d0: 80 a0 80 01 cmp %g2, %g1
200d8d4: 84 60 3f ff subx %g0, -1, %g2
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
200d8d8: 80 a0 a0 00 cmp %g2, 0
200d8dc: 02 80 00 09 be 200d900 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN
200d8e0: 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;
200d8e4: c4 00 60 04 ld [ %g1 + 4 ], %g2
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
200d8e8: 80 88 a0 01 btst 1, %g2
200d8ec: 02 80 00 05 be 200d900 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN
200d8f0: 82 20 40 19 sub %g1, %i1, %g1
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
200d8f4: 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;
200d8f8: 82 00 60 04 add %g1, 4, %g1
200d8fc: c2 26 80 00 st %g1, [ %i2 ]
return true;
}
200d900: b0 08 e0 01 and %g3, 1, %i0
200d904: 81 c7 e0 08 ret
200d908: 81 e8 00 00 restore
02009708 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
2009708: 9d e3 bf 80 save %sp, -128, %sp
200970c: ac 10 00 19 mov %i1, %l6
uintptr_t const page_size = heap->page_size;
2009710: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
uintptr_t const min_block_size = heap->min_block_size;
2009714: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
Heap_Block *const first_block = heap->first_block;
2009718: 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;
200971c: 80 a6 a0 00 cmp %i2, 0
2009720: 02 80 00 05 be 2009734 <_Heap_Walk+0x2c>
2009724: e0 06 20 24 ld [ %i0 + 0x24 ], %l0
2009728: 3b 00 80 25 sethi %hi(0x2009400), %i5
200972c: 10 80 00 04 b 200973c <_Heap_Walk+0x34>
2009730: ba 17 62 b8 or %i5, 0x2b8, %i5 ! 20096b8 <_Heap_Walk_print>
2009734: 3b 00 80 25 sethi %hi(0x2009400), %i5
2009738: ba 17 62 b0 or %i5, 0x2b0, %i5 ! 20096b0 <_Heap_Walk_print_nothing>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
200973c: 05 00 80 7f sethi %hi(0x201fc00), %g2
2009740: c4 00 a2 e8 ld [ %g2 + 0x2e8 ], %g2 ! 201fee8 <_System_state_Current>
2009744: 80 a0 a0 03 cmp %g2, 3
2009748: 22 80 00 04 be,a 2009758 <_Heap_Walk+0x50>
200974c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
return true;
2009750: 10 80 01 2a b 2009bf8 <_Heap_Walk+0x4f0>
2009754: 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)(
2009758: da 06 20 18 ld [ %i0 + 0x18 ], %o5
200975c: c4 23 a0 5c st %g2, [ %sp + 0x5c ]
2009760: f2 23 a0 60 st %i1, [ %sp + 0x60 ]
2009764: e0 23 a0 64 st %l0, [ %sp + 0x64 ]
2009768: c4 06 20 08 ld [ %i0 + 8 ], %g2
200976c: 90 10 00 16 mov %l6, %o0
2009770: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
2009774: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2009778: 92 10 20 00 clr %o1
200977c: c4 23 a0 6c st %g2, [ %sp + 0x6c ]
2009780: 15 00 80 71 sethi %hi(0x201c400), %o2
2009784: 96 10 00 1c mov %i4, %o3
2009788: 94 12 a1 30 or %o2, 0x130, %o2
200978c: 9f c7 40 00 call %i5
2009790: 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 ) {
2009794: 80 a7 20 00 cmp %i4, 0
2009798: 12 80 00 07 bne 20097b4 <_Heap_Walk+0xac>
200979c: 80 8f 20 07 btst 7, %i4
(*printer)( source, true, "page size is zero\n" );
20097a0: 15 00 80 71 sethi %hi(0x201c400), %o2
20097a4: 90 10 00 16 mov %l6, %o0
20097a8: 92 10 20 01 mov 1, %o1
20097ac: 10 80 00 37 b 2009888 <_Heap_Walk+0x180>
20097b0: 94 12 a1 c8 or %o2, 0x1c8, %o2
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
20097b4: 22 80 00 08 be,a 20097d4 <_Heap_Walk+0xcc>
20097b8: 90 10 00 1b mov %i3, %o0
(*printer)(
20097bc: 15 00 80 71 sethi %hi(0x201c400), %o2
20097c0: 90 10 00 16 mov %l6, %o0
20097c4: 92 10 20 01 mov 1, %o1
20097c8: 94 12 a1 e0 or %o2, 0x1e0, %o2
20097cc: 10 80 01 12 b 2009c14 <_Heap_Walk+0x50c>
20097d0: 96 10 00 1c mov %i4, %o3
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
20097d4: 7f ff e0 ec call 2001b84 <.urem>
20097d8: 92 10 00 1c mov %i4, %o1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
20097dc: 80 a2 20 00 cmp %o0, 0
20097e0: 22 80 00 08 be,a 2009800 <_Heap_Walk+0xf8>
20097e4: 90 06 60 08 add %i1, 8, %o0
(*printer)(
20097e8: 15 00 80 71 sethi %hi(0x201c400), %o2
20097ec: 90 10 00 16 mov %l6, %o0
20097f0: 92 10 20 01 mov 1, %o1
20097f4: 94 12 a2 00 or %o2, 0x200, %o2
20097f8: 10 80 01 07 b 2009c14 <_Heap_Walk+0x50c>
20097fc: 96 10 00 1b mov %i3, %o3
2009800: 7f ff e0 e1 call 2001b84 <.urem>
2009804: 92 10 00 1c mov %i4, %o1
);
return false;
}
if (
2009808: 80 a2 20 00 cmp %o0, 0
200980c: 22 80 00 07 be,a 2009828 <_Heap_Walk+0x120>
2009810: c4 06 60 04 ld [ %i1 + 4 ], %g2
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
2009814: 15 00 80 71 sethi %hi(0x201c400), %o2
2009818: 90 10 00 16 mov %l6, %o0
200981c: 92 10 20 01 mov 1, %o1
2009820: 10 80 00 fc b 2009c10 <_Heap_Walk+0x508>
2009824: 94 12 a2 28 or %o2, 0x228, %o2
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
2009828: 80 88 a0 01 btst 1, %g2
200982c: 32 80 00 07 bne,a 2009848 <_Heap_Walk+0x140>
2009830: f4 04 20 04 ld [ %l0 + 4 ], %i2
(*printer)(
2009834: 15 00 80 71 sethi %hi(0x201c400), %o2
2009838: 90 10 00 16 mov %l6, %o0
200983c: 92 10 20 01 mov 1, %o1
2009840: 10 80 00 12 b 2009888 <_Heap_Walk+0x180>
2009844: 94 12 a2 60 or %o2, 0x260, %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;
2009848: 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);
200984c: 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;
2009850: c4 06 a0 04 ld [ %i2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
2009854: 80 88 a0 01 btst 1, %g2
2009858: 12 80 00 07 bne 2009874 <_Heap_Walk+0x16c>
200985c: 80 a6 80 19 cmp %i2, %i1
(*printer)(
2009860: 15 00 80 71 sethi %hi(0x201c400), %o2
2009864: 90 10 00 16 mov %l6, %o0
2009868: 92 10 20 01 mov 1, %o1
200986c: 10 80 00 07 b 2009888 <_Heap_Walk+0x180>
2009870: 94 12 a2 90 or %o2, 0x290, %o2
);
return false;
}
if (
2009874: 02 80 00 0a be 200989c <_Heap_Walk+0x194>
2009878: 15 00 80 71 sethi %hi(0x201c400), %o2
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
200987c: 90 10 00 16 mov %l6, %o0
2009880: 92 10 20 01 mov 1, %o1
2009884: 94 12 a2 a8 or %o2, 0x2a8, %o2
2009888: 9f c7 40 00 call %i5
200988c: b0 10 20 00 clr %i0
2009890: b0 0e 20 ff and %i0, 0xff, %i0
2009894: 81 c7 e0 08 ret
2009898: 81 e8 00 00 restore
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
200989c: 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;
20098a0: d6 06 20 08 ld [ %i0 + 8 ], %o3
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
20098a4: 10 80 00 30 b 2009964 <_Heap_Walk+0x25c>
20098a8: 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;
20098ac: 80 a0 c0 0b cmp %g3, %o3
20098b0: 18 80 00 05 bgu 20098c4 <_Heap_Walk+0x1bc>
20098b4: 84 10 20 00 clr %g2
20098b8: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
20098bc: 80 a0 80 0b cmp %g2, %o3
20098c0: 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 ) ) {
20098c4: 80 a0 a0 00 cmp %g2, 0
20098c8: 32 80 00 07 bne,a 20098e4 <_Heap_Walk+0x1dc>
20098cc: 90 02 e0 08 add %o3, 8, %o0
(*printer)(
20098d0: 15 00 80 71 sethi %hi(0x201c400), %o2
20098d4: 90 10 00 16 mov %l6, %o0
20098d8: 92 10 20 01 mov 1, %o1
20098dc: 10 80 00 ce b 2009c14 <_Heap_Walk+0x50c>
20098e0: 94 12 a2 d8 or %o2, 0x2d8, %o2
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
20098e4: d6 27 bf fc st %o3, [ %fp + -4 ]
20098e8: 7f ff e0 a7 call 2001b84 <.urem>
20098ec: 92 10 00 11 mov %l1, %o1
);
return false;
}
if (
20098f0: 80 a2 20 00 cmp %o0, 0
20098f4: 02 80 00 07 be 2009910 <_Heap_Walk+0x208>
20098f8: d6 07 bf fc ld [ %fp + -4 ], %o3
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
20098fc: 15 00 80 71 sethi %hi(0x201c400), %o2
2009900: 90 10 00 16 mov %l6, %o0
2009904: 92 10 20 01 mov 1, %o1
2009908: 10 80 00 c3 b 2009c14 <_Heap_Walk+0x50c>
200990c: 94 12 a2 f8 or %o2, 0x2f8, %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;
2009910: c4 02 e0 04 ld [ %o3 + 4 ], %g2
2009914: 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;
2009918: 84 02 c0 02 add %o3, %g2, %g2
200991c: c4 00 a0 04 ld [ %g2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2009920: 80 88 a0 01 btst 1, %g2
2009924: 22 80 00 07 be,a 2009940 <_Heap_Walk+0x238>
2009928: d8 02 e0 0c ld [ %o3 + 0xc ], %o4
(*printer)(
200992c: 15 00 80 71 sethi %hi(0x201c400), %o2
2009930: 90 10 00 16 mov %l6, %o0
2009934: 92 10 20 01 mov 1, %o1
2009938: 10 80 00 b7 b 2009c14 <_Heap_Walk+0x50c>
200993c: 94 12 a3 28 or %o2, 0x328, %o2
);
return false;
}
if ( free_block->prev != prev_block ) {
2009940: 80 a3 00 19 cmp %o4, %i1
2009944: 02 80 00 07 be 2009960 <_Heap_Walk+0x258>
2009948: b2 10 00 0b mov %o3, %i1
(*printer)(
200994c: 15 00 80 71 sethi %hi(0x201c400), %o2
2009950: 90 10 00 16 mov %l6, %o0
2009954: 92 10 20 01 mov 1, %o1
2009958: 10 80 00 4d b 2009a8c <_Heap_Walk+0x384>
200995c: 94 12 a3 48 or %o2, 0x348, %o2
return false;
}
prev_block = free_block;
free_block = free_block->next;
2009960: 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 ) {
2009964: 80 a2 c0 18 cmp %o3, %i0
2009968: 32 bf ff d1 bne,a 20098ac <_Heap_Walk+0x1a4>
200996c: 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)(
2009970: 2b 00 80 72 sethi %hi(0x201c800), %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 ) {
2009974: 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)(
2009978: aa 15 60 48 or %l5, 0x48, %l5
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200997c: 23 00 80 72 sethi %hi(0x201c800), %l1
2009980: 2f 00 80 71 sethi %hi(0x201c400), %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;
2009984: 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;
2009988: 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;
200998c: 9e 1e 40 10 xor %i1, %l0, %o7
2009990: 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;
2009994: a8 0c bf fe and %l2, -2, %l4
2009998: 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);
200999c: 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;
20099a0: 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;
20099a4: 80 a3 00 13 cmp %o4, %l3
20099a8: 18 80 00 05 bgu 20099bc <_Heap_Walk+0x2b4> <== NEVER TAKEN
20099ac: 9e 10 20 00 clr %o7
20099b0: de 06 20 24 ld [ %i0 + 0x24 ], %o7
20099b4: 80 a3 c0 13 cmp %o7, %l3
20099b8: 9e 60 3f ff subx %g0, -1, %o7
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
20099bc: 80 a3 e0 00 cmp %o7, 0
20099c0: 32 80 00 07 bne,a 20099dc <_Heap_Walk+0x2d4>
20099c4: da 27 bf f8 st %o5, [ %fp + -8 ]
(*printer)(
20099c8: 15 00 80 71 sethi %hi(0x201c400), %o2
20099cc: 90 10 00 16 mov %l6, %o0
20099d0: 92 10 20 01 mov 1, %o1
20099d4: 10 80 00 2c b 2009a84 <_Heap_Walk+0x37c>
20099d8: 94 12 a3 80 or %o2, 0x380, %o2
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
20099dc: 90 10 00 14 mov %l4, %o0
20099e0: 7f ff e0 69 call 2001b84 <.urem>
20099e4: 92 10 00 1c mov %i4, %o1
20099e8: da 07 bf f8 ld [ %fp + -8 ], %o5
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
20099ec: 80 a2 20 00 cmp %o0, 0
20099f0: 02 80 00 0c be 2009a20 <_Heap_Walk+0x318>
20099f4: 9e 0b 60 ff and %o5, 0xff, %o7
20099f8: 80 a3 e0 00 cmp %o7, 0
20099fc: 02 80 00 19 be 2009a60 <_Heap_Walk+0x358>
2009a00: 80 a6 40 13 cmp %i1, %l3
(*printer)(
2009a04: 15 00 80 71 sethi %hi(0x201c400), %o2
2009a08: 90 10 00 16 mov %l6, %o0
2009a0c: 92 10 20 01 mov 1, %o1
2009a10: 94 12 a3 b0 or %o2, 0x3b0, %o2
2009a14: 96 10 00 19 mov %i1, %o3
2009a18: 10 80 00 1d b 2009a8c <_Heap_Walk+0x384>
2009a1c: 98 10 00 14 mov %l4, %o4
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
2009a20: 80 a3 e0 00 cmp %o7, 0
2009a24: 02 80 00 0f be 2009a60 <_Heap_Walk+0x358>
2009a28: 80 a6 40 13 cmp %i1, %l3
2009a2c: 80 a5 00 1b cmp %l4, %i3
2009a30: 1a 80 00 0c bcc 2009a60 <_Heap_Walk+0x358>
2009a34: 80 a6 40 13 cmp %i1, %l3
(*printer)(
2009a38: 90 10 00 16 mov %l6, %o0
2009a3c: 92 10 20 01 mov 1, %o1
2009a40: 15 00 80 71 sethi %hi(0x201c400), %o2
2009a44: 96 10 00 19 mov %i1, %o3
2009a48: 94 12 a3 e0 or %o2, 0x3e0, %o2
2009a4c: 98 10 00 14 mov %l4, %o4
2009a50: 9f c7 40 00 call %i5
2009a54: 9a 10 00 1b mov %i3, %o5
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
2009a58: 10 80 00 68 b 2009bf8 <_Heap_Walk+0x4f0>
2009a5c: b0 10 20 00 clr %i0
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
2009a60: 2a 80 00 10 bcs,a 2009aa0 <_Heap_Walk+0x398>
2009a64: de 04 e0 04 ld [ %l3 + 4 ], %o7
2009a68: 80 8b 60 ff btst 0xff, %o5
2009a6c: 22 80 00 0d be,a 2009aa0 <_Heap_Walk+0x398>
2009a70: de 04 e0 04 ld [ %l3 + 4 ], %o7
(*printer)(
2009a74: 15 00 80 72 sethi %hi(0x201c800), %o2
2009a78: 90 10 00 16 mov %l6, %o0
2009a7c: 92 10 20 01 mov 1, %o1
2009a80: 94 12 a0 10 or %o2, 0x10, %o2
2009a84: 96 10 00 19 mov %i1, %o3
2009a88: 98 10 00 13 mov %l3, %o4
2009a8c: 9f c7 40 00 call %i5
2009a90: b0 10 20 00 clr %i0
2009a94: b0 0e 20 ff and %i0, 0xff, %i0
2009a98: 81 c7 e0 08 ret
2009a9c: 81 e8 00 00 restore
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
2009aa0: 80 8b e0 01 btst 1, %o7
2009aa4: 12 80 00 3f bne 2009ba0 <_Heap_Walk+0x498>
2009aa8: 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 ?
2009aac: 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)(
2009ab0: d8 06 20 08 ld [ %i0 + 8 ], %o4
2009ab4: 80 a3 40 0c cmp %o5, %o4
2009ab8: 02 80 00 08 be 2009ad8 <_Heap_Walk+0x3d0>
2009abc: 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)" : ""),
2009ac0: 80 a3 40 18 cmp %o5, %i0
2009ac4: 12 80 00 07 bne 2009ae0 <_Heap_Walk+0x3d8>
2009ac8: 96 14 60 b8 or %l1, 0xb8, %o3
2009acc: 17 00 80 71 sethi %hi(0x201c400), %o3
2009ad0: 10 80 00 04 b 2009ae0 <_Heap_Walk+0x3d8>
2009ad4: 96 12 e1 00 or %o3, 0x100, %o3 ! 201c500 <__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)(
2009ad8: 03 00 80 71 sethi %hi(0x201c400), %g1
2009adc: 96 10 60 f0 or %g1, 0xf0, %o3 ! 201c4f0 <__log2table+0x120>
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
2009ae0: 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)(
2009ae4: 80 a3 00 0f cmp %o4, %o7
2009ae8: 02 80 00 06 be 2009b00 <_Heap_Walk+0x3f8>
2009aec: 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)" : "")
2009af0: 12 80 00 06 bne 2009b08 <_Heap_Walk+0x400>
2009af4: 9e 14 60 b8 or %l1, 0xb8, %o7
2009af8: 10 80 00 04 b 2009b08 <_Heap_Walk+0x400>
2009afc: 9e 15 e1 20 or %l7, 0x120, %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)(
2009b00: 03 00 80 71 sethi %hi(0x201c400), %g1
2009b04: 9e 10 61 10 or %g1, 0x110, %o7 ! 201c510 <__log2table+0x140>
2009b08: d6 23 a0 5c st %o3, [ %sp + 0x5c ]
2009b0c: d8 23 a0 60 st %o4, [ %sp + 0x60 ]
2009b10: de 23 a0 64 st %o7, [ %sp + 0x64 ]
2009b14: 90 10 00 16 mov %l6, %o0
2009b18: 92 10 20 00 clr %o1
2009b1c: 94 10 00 15 mov %l5, %o2
2009b20: 96 10 00 19 mov %i1, %o3
2009b24: 9f c7 40 00 call %i5
2009b28: 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 ) {
2009b2c: da 04 c0 00 ld [ %l3 ], %o5
2009b30: 80 a5 00 0d cmp %l4, %o5
2009b34: 02 80 00 0c be 2009b64 <_Heap_Walk+0x45c>
2009b38: 80 a4 a0 00 cmp %l2, 0
(*printer)(
2009b3c: e6 23 a0 5c st %l3, [ %sp + 0x5c ]
2009b40: 90 10 00 16 mov %l6, %o0
2009b44: 92 10 20 01 mov 1, %o1
2009b48: 15 00 80 72 sethi %hi(0x201c800), %o2
2009b4c: 96 10 00 19 mov %i1, %o3
2009b50: 94 12 a0 80 or %o2, 0x80, %o2
2009b54: 9f c7 40 00 call %i5
2009b58: 98 10 00 14 mov %l4, %o4
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
2009b5c: 10 bf ff ce b 2009a94 <_Heap_Walk+0x38c>
2009b60: b0 10 20 00 clr %i0
);
return false;
}
if ( !prev_used ) {
2009b64: 32 80 00 0a bne,a 2009b8c <_Heap_Walk+0x484>
2009b68: c6 06 20 08 ld [ %i0 + 8 ], %g3
(*printer)(
2009b6c: 15 00 80 72 sethi %hi(0x201c800), %o2
2009b70: 90 10 00 16 mov %l6, %o0
2009b74: 92 10 20 01 mov 1, %o1
2009b78: 10 80 00 26 b 2009c10 <_Heap_Walk+0x508>
2009b7c: 94 12 a0 c0 or %o2, 0xc0, %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 ) {
2009b80: 22 80 00 19 be,a 2009be4 <_Heap_Walk+0x4dc>
2009b84: b2 10 00 13 mov %l3, %i1
return true;
}
free_block = free_block->next;
2009b88: 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 ) {
2009b8c: 80 a0 c0 18 cmp %g3, %i0
2009b90: 12 bf ff fc bne 2009b80 <_Heap_Walk+0x478>
2009b94: 80 a0 c0 19 cmp %g3, %i1
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
2009b98: 10 80 00 1b b 2009c04 <_Heap_Walk+0x4fc>
2009b9c: 15 00 80 72 sethi %hi(0x201c800), %o2
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
2009ba0: 80 a4 a0 00 cmp %l2, 0
2009ba4: 02 80 00 09 be 2009bc8 <_Heap_Walk+0x4c0>
2009ba8: 92 10 20 00 clr %o1
(*printer)(
2009bac: 15 00 80 72 sethi %hi(0x201c800), %o2
2009bb0: 96 10 00 19 mov %i1, %o3
2009bb4: 94 12 a0 f0 or %o2, 0xf0, %o2
2009bb8: 9f c7 40 00 call %i5
2009bbc: 98 10 00 14 mov %l4, %o4
2009bc0: 10 80 00 09 b 2009be4 <_Heap_Walk+0x4dc>
2009bc4: b2 10 00 13 mov %l3, %i1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
2009bc8: da 06 40 00 ld [ %i1 ], %o5
2009bcc: 15 00 80 72 sethi %hi(0x201c800), %o2
2009bd0: 96 10 00 19 mov %i1, %o3
2009bd4: 94 12 a1 08 or %o2, 0x108, %o2
2009bd8: 9f c7 40 00 call %i5
2009bdc: 98 10 00 14 mov %l4, %o4
2009be0: b2 10 00 13 mov %l3, %i1
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
2009be4: 80 a4 c0 1a cmp %l3, %i2
2009be8: 32 bf ff 68 bne,a 2009988 <_Heap_Walk+0x280>
2009bec: e4 06 60 04 ld [ %i1 + 4 ], %l2
2009bf0: 10 80 00 02 b 2009bf8 <_Heap_Walk+0x4f0>
2009bf4: b0 10 20 01 mov 1, %i0
2009bf8: b0 0e 20 ff and %i0, 0xff, %i0
2009bfc: 81 c7 e0 08 ret
2009c00: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
2009c04: 90 10 00 16 mov %l6, %o0
2009c08: 92 10 20 01 mov 1, %o1
2009c0c: 94 12 a1 30 or %o2, 0x130, %o2
2009c10: 96 10 00 19 mov %i1, %o3
2009c14: 9f c7 40 00 call %i5
2009c18: b0 10 20 00 clr %i0
2009c1c: b0 0e 20 ff and %i0, 0xff, %i0
2009c20: 81 c7 e0 08 ret
2009c24: 81 e8 00 00 restore
02008afc <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
2008afc: 9d e3 bf 90 save %sp, -112, %sp
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
2008b00: 13 00 80 2a sethi %hi(0x200a800), %o1
2008b04: 90 07 bf f4 add %fp, -12, %o0
2008b08: 92 12 63 b8 or %o1, 0x3b8, %o1
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
2008b0c: f0 27 bf f4 st %i0, [ %fp + -12 ]
2008b10: f2 2f bf f8 stb %i1, [ %fp + -8 ]
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
2008b14: 40 00 08 34 call 200abe4 <_User_extensions_Iterate>
2008b18: f4 27 bf fc st %i2, [ %fp + -4 ]
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
2008b1c: 05 00 80 76 sethi %hi(0x201d800), %g2 <== NOT EXECUTED
2008b20: 82 10 a2 dc or %g2, 0x2dc, %g1 ! 201dadc <_Internal_errors_What_happened><== NOT EXECUTED
2008b24: f0 20 a2 dc st %i0, [ %g2 + 0x2dc ] <== NOT EXECUTED
_Internal_errors_What_happened.is_internal = is_internal;
2008b28: f2 28 60 04 stb %i1, [ %g1 + 4 ] <== NOT EXECUTED
_Internal_errors_What_happened.the_error = the_error;
2008b2c: f4 20 60 08 st %i2, [ %g1 + 8 ] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
2008b30: 84 10 20 05 mov 5, %g2 <== NOT EXECUTED
2008b34: 03 00 80 76 sethi %hi(0x201d800), %g1 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
2008b38: 7f ff e6 a3 call 20025c4 <sparc_disable_interrupts> <== NOT EXECUTED
2008b3c: c4 20 62 e8 st %g2, [ %g1 + 0x2e8 ] ! 201dae8 <_System_state_Current><== NOT EXECUTED
2008b40: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
2008b44: 30 80 00 00 b,a 2008b44 <_Internal_error_Occurred+0x48> <== NOT EXECUTED
02008bb0 <_Objects_Allocate>:
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2008bb0: 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 )
2008bb4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2008bb8: 80 a0 60 00 cmp %g1, 0
2008bbc: 12 80 00 04 bne 2008bcc <_Objects_Allocate+0x1c> <== ALWAYS TAKEN
2008bc0: ba 10 00 18 mov %i0, %i5
return NULL;
2008bc4: 81 c7 e0 08 ret
2008bc8: 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 );
2008bcc: b8 06 20 20 add %i0, 0x20, %i4
2008bd0: 7f ff fd 85 call 20081e4 <_Chain_Get>
2008bd4: 90 10 00 1c mov %i4, %o0
if ( information->auto_extend ) {
2008bd8: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1
2008bdc: 80 a0 60 00 cmp %g1, 0
2008be0: 02 80 00 1d be 2008c54 <_Objects_Allocate+0xa4>
2008be4: 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 ) {
2008be8: 80 a2 20 00 cmp %o0, 0
2008bec: 32 80 00 0a bne,a 2008c14 <_Objects_Allocate+0x64>
2008bf0: c4 07 60 08 ld [ %i5 + 8 ], %g2
_Objects_Extend_information( information );
2008bf4: 40 00 00 21 call 2008c78 <_Objects_Extend_information>
2008bf8: 90 10 00 1d mov %i5, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2008bfc: 7f ff fd 7a call 20081e4 <_Chain_Get>
2008c00: 90 10 00 1c mov %i4, %o0
}
if ( the_object ) {
2008c04: b0 92 20 00 orcc %o0, 0, %i0
2008c08: 02 bf ff ef be 2008bc4 <_Objects_Allocate+0x14>
2008c0c: 01 00 00 00 nop
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
2008c10: c4 07 60 08 ld [ %i5 + 8 ], %g2
2008c14: d0 06 20 08 ld [ %i0 + 8 ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
2008c18: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
2008c1c: 03 00 00 3f sethi %hi(0xfc00), %g1
2008c20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2008c24: 90 0a 00 01 and %o0, %g1, %o0
2008c28: 82 08 80 01 and %g2, %g1, %g1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
2008c2c: 40 00 3e 2f call 20184e8 <.udiv>
2008c30: 90 22 00 01 sub %o0, %g1, %o0
information->inactive_per_block[ block ]--;
2008c34: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2008c38: 91 2a 20 02 sll %o0, 2, %o0
2008c3c: c4 00 40 08 ld [ %g1 + %o0 ], %g2
2008c40: 84 00 bf ff add %g2, -1, %g2
2008c44: c4 20 40 08 st %g2, [ %g1 + %o0 ]
information->inactive--;
2008c48: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1
2008c4c: 82 00 7f ff add %g1, -1, %g1
2008c50: c2 37 60 2c sth %g1, [ %i5 + 0x2c ]
);
}
#endif
return the_object;
}
2008c54: 81 c7 e0 08 ret
2008c58: 81 e8 00 00 restore
02008fe0 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
2008fe0: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
2008fe4: 80 a6 60 00 cmp %i1, 0
2008fe8: 12 80 00 04 bne 2008ff8 <_Objects_Get_information+0x18>
2008fec: 01 00 00 00 nop
return NULL;
2008ff0: 81 c7 e0 08 ret
2008ff4: 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 );
2008ff8: 40 00 12 45 call 200d90c <_Objects_API_maximum_class>
2008ffc: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
2009000: 80 a2 20 00 cmp %o0, 0
2009004: 02 bf ff fb be 2008ff0 <_Objects_Get_information+0x10>
2009008: 80 a6 40 08 cmp %i1, %o0
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
200900c: 18 bf ff f9 bgu 2008ff0 <_Objects_Get_information+0x10>
2009010: 03 00 80 75 sethi %hi(0x201d400), %g1
return NULL;
if ( !_Objects_Information_table[ the_api ] )
2009014: b1 2e 20 02 sll %i0, 2, %i0
2009018: 82 10 61 34 or %g1, 0x134, %g1
200901c: c2 00 40 18 ld [ %g1 + %i0 ], %g1
2009020: 80 a0 60 00 cmp %g1, 0
2009024: 02 bf ff f3 be 2008ff0 <_Objects_Get_information+0x10> <== NEVER TAKEN
2009028: b3 2e 60 02 sll %i1, 2, %i1
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
200902c: f0 00 40 19 ld [ %g1 + %i1 ], %i0
if ( !info )
2009030: 80 a6 20 00 cmp %i0, 0
2009034: 02 bf ff ef be 2008ff0 <_Objects_Get_information+0x10> <== NEVER TAKEN
2009038: 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 )
200903c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2009040: 80 a0 60 00 cmp %g1, 0
2009044: 02 bf ff eb be 2008ff0 <_Objects_Get_information+0x10>
2009048: 01 00 00 00 nop
return NULL;
#endif
return info;
}
200904c: 81 c7 e0 08 ret
2009050: 81 e8 00 00 restore
0201b3d8 <_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;
201b3d8: c2 02 20 08 ld [ %o0 + 8 ], %g1
201b3dc: 92 22 40 01 sub %o1, %g1, %o1
if ( information->maximum >= index ) {
201b3e0: 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;
201b3e4: 92 02 60 01 inc %o1
if ( information->maximum >= index ) {
201b3e8: 80 a0 40 09 cmp %g1, %o1
201b3ec: 0a 80 00 09 bcs 201b410 <_Objects_Get_no_protection+0x38>
201b3f0: 93 2a 60 02 sll %o1, 2, %o1
if ( (the_object = information->local_table[ index ]) != NULL ) {
201b3f4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
201b3f8: d0 00 40 09 ld [ %g1 + %o1 ], %o0
201b3fc: 80 a2 20 00 cmp %o0, 0
201b400: 02 80 00 05 be 201b414 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
201b404: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
return the_object;
201b408: 81 c3 e0 08 retl
201b40c: 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;
201b410: 82 10 20 01 mov 1, %g1
return NULL;
201b414: 90 10 20 00 clr %o0
}
201b418: 81 c3 e0 08 retl
201b41c: c2 22 80 00 st %g1, [ %o2 ]
0200d0e8 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
200d0e8: 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;
200d0ec: 80 a6 20 00 cmp %i0, 0
200d0f0: 12 80 00 06 bne 200d108 <_Objects_Id_to_name+0x20>
200d0f4: 83 36 20 18 srl %i0, 0x18, %g1
200d0f8: 03 00 80 b7 sethi %hi(0x202dc00), %g1
200d0fc: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 ! 202df30 <_Per_CPU_Information+0x10>
200d100: f0 00 60 08 ld [ %g1 + 8 ], %i0
200d104: 83 36 20 18 srl %i0, 0x18, %g1
200d108: 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 )
200d10c: 84 00 7f ff add %g1, -1, %g2
200d110: 80 a0 a0 02 cmp %g2, 2
200d114: 08 80 00 18 bleu 200d174 <_Objects_Id_to_name+0x8c>
200d118: 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;
200d11c: 81 c7 e0 08 ret
200d120: 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 ];
200d124: 85 28 a0 02 sll %g2, 2, %g2
200d128: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
200d12c: 80 a2 20 00 cmp %o0, 0
200d130: 02 bf ff fb be 200d11c <_Objects_Id_to_name+0x34> <== NEVER TAKEN
200d134: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
200d138: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1
200d13c: 80 a0 60 00 cmp %g1, 0
200d140: 12 bf ff f7 bne 200d11c <_Objects_Id_to_name+0x34> <== NEVER TAKEN
200d144: 92 10 00 18 mov %i0, %o1
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
200d148: 7f ff ff cb call 200d074 <_Objects_Get>
200d14c: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
200d150: 80 a2 20 00 cmp %o0, 0
200d154: 02 bf ff f2 be 200d11c <_Objects_Id_to_name+0x34>
200d158: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
200d15c: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
200d160: 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();
200d164: 40 00 03 d0 call 200e0a4 <_Thread_Enable_dispatch>
200d168: c2 26 40 00 st %g1, [ %i1 ]
200d16c: 81 c7 e0 08 ret
200d170: 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 ] )
200d174: 05 00 80 b6 sethi %hi(0x202d800), %g2
200d178: 84 10 a1 24 or %g2, 0x124, %g2 ! 202d924 <_Objects_Information_table>
200d17c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200d180: 80 a0 60 00 cmp %g1, 0
200d184: 12 bf ff e8 bne 200d124 <_Objects_Id_to_name+0x3c>
200d188: 85 36 20 1b srl %i0, 0x1b, %g2
200d18c: 30 bf ff e4 b,a 200d11c <_Objects_Id_to_name+0x34>
0200ee88 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
200ee88: 9d e3 bf a0 save %sp, -96, %sp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
200ee8c: 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 ];
200ee90: 39 00 00 3f sethi %hi(0xfc00), %i4
200ee94: b5 30 60 18 srl %g1, 0x18, %i2
200ee98: b8 17 23 ff or %i4, 0x3ff, %i4
200ee9c: b4 0e a0 07 and %i2, 7, %i2
200eea0: b8 08 40 1c and %g1, %i4, %i4
200eea4: b4 06 a0 04 add %i2, 4, %i2
200eea8: 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;
200eeac: 37 00 80 76 sethi %hi(0x201d800), %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 ];
200eeb0: 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;
200eeb4: 82 16 e1 bc or %i3, 0x1bc, %g1
done = true;
for ( index = 1 ; index <= max ; ++index ) {
200eeb8: ba 10 20 01 mov 1, %i5
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
200eebc: 84 10 20 01 mov 1, %g2
for ( index = 1 ; index <= max ; ++index ) {
200eec0: 10 80 00 18 b 200ef20 <_POSIX_Keys_Run_destructors+0x98>
200eec4: f2 10 60 10 lduh [ %g1 + 0x10 ], %i1
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
200eec8: 86 16 e1 bc or %i3, 0x1bc, %g3
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
200eecc: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3
200eed0: 83 28 60 02 sll %g1, 2, %g1
200eed4: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
200eed8: 80 a0 60 00 cmp %g1, 0
200eedc: 22 80 00 11 be,a 200ef20 <_POSIX_Keys_Run_destructors+0x98>
200eee0: ba 07 60 01 inc %i5
200eee4: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200eee8: 80 a0 e0 00 cmp %g3, 0
200eeec: 02 80 00 0c be 200ef1c <_POSIX_Keys_Run_destructors+0x94>
200eef0: 86 00 40 1a add %g1, %i2, %g3
void *value = key->Values [ thread_api ][ thread_index ];
200eef4: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200eef8: d0 00 c0 1c ld [ %g3 + %i4 ], %o0
if ( value != NULL ) {
200eefc: 80 a2 20 00 cmp %o0, 0
200ef00: 22 80 00 08 be,a 200ef20 <_POSIX_Keys_Run_destructors+0x98><== ALWAYS TAKEN
200ef04: ba 07 60 01 inc %i5
key->Values [ thread_api ][ thread_index ] = NULL;
200ef08: c0 20 c0 1c clr [ %g3 + %i4 ] <== NOT EXECUTED
(*key->destructor)( value );
200ef0c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
200ef10: 9f c0 40 00 call %g1 <== NOT EXECUTED
200ef14: 01 00 00 00 nop <== NOT EXECUTED
done = false;
200ef18: 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 ) {
200ef1c: ba 07 60 01 inc %i5
200ef20: 83 2f 60 10 sll %i5, 0x10, %g1
200ef24: 83 30 60 10 srl %g1, 0x10, %g1
200ef28: 80 a0 40 19 cmp %g1, %i1
200ef2c: 08 bf ff e7 bleu 200eec8 <_POSIX_Keys_Run_destructors+0x40>
200ef30: 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 ) {
200ef34: 02 bf ff e1 be 200eeb8 <_POSIX_Keys_Run_destructors+0x30> <== NEVER TAKEN
200ef38: 82 16 e1 bc or %i3, 0x1bc, %g1
done = false;
}
}
}
}
}
200ef3c: 81 c7 e0 08 ret
200ef40: 81 e8 00 00 restore
0200c850 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
200c850: 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(
200c854: 11 00 80 a9 sethi %hi(0x202a400), %o0
200c858: 92 10 00 18 mov %i0, %o1
200c85c: 90 12 23 e0 or %o0, 0x3e0, %o0
200c860: 40 00 0c d5 call 200fbb4 <_Objects_Get>
200c864: 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 ) {
200c868: c2 07 bf f8 ld [ %fp + -8 ], %g1
200c86c: 80 a0 60 00 cmp %g1, 0
200c870: 12 80 00 40 bne 200c970 <_POSIX_Message_queue_Receive_support+0x120>
200c874: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
200c878: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200c87c: 84 08 60 03 and %g1, 3, %g2
200c880: 80 a0 a0 01 cmp %g2, 1
200c884: 32 80 00 05 bne,a 200c898 <_POSIX_Message_queue_Receive_support+0x48>
200c888: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
_Thread_Enable_dispatch();
200c88c: 40 00 10 a8 call 2010b2c <_Thread_Enable_dispatch>
200c890: 01 00 00 00 nop
200c894: 30 80 00 37 b,a 200c970 <_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 ) {
200c898: c4 02 20 68 ld [ %o0 + 0x68 ], %g2
200c89c: 80 a6 80 02 cmp %i2, %g2
200c8a0: 1a 80 00 08 bcc 200c8c0 <_POSIX_Message_queue_Receive_support+0x70>
200c8a4: 84 10 3f ff mov -1, %g2
_Thread_Enable_dispatch();
200c8a8: 40 00 10 a1 call 2010b2c <_Thread_Enable_dispatch>
200c8ac: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EMSGSIZE );
200c8b0: 40 00 28 1f call 201692c <__errno>
200c8b4: 01 00 00 00 nop
200c8b8: 10 80 00 31 b 200c97c <_POSIX_Message_queue_Receive_support+0x12c>
200c8bc: 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;
200c8c0: c4 27 bf fc st %g2, [ %fp + -4 ]
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
200c8c4: 80 a7 20 00 cmp %i4, 0
200c8c8: 02 80 00 05 be 200c8dc <_POSIX_Message_queue_Receive_support+0x8c>
200c8cc: 98 10 20 00 clr %o4
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
200c8d0: 99 30 60 0e srl %g1, 0xe, %o4
200c8d4: 98 1b 20 01 xor %o4, 1, %o4
200c8d8: 98 0b 20 01 and %o4, 1, %o4
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
200c8dc: 90 02 20 1c add %o0, 0x1c, %o0
200c8e0: 92 10 00 18 mov %i0, %o1
200c8e4: 94 10 00 19 mov %i1, %o2
200c8e8: 96 07 bf fc add %fp, -4, %o3
200c8ec: 98 0b 20 01 and %o4, 1, %o4
200c8f0: 40 00 08 7e call 200eae8 <_CORE_message_queue_Seize>
200c8f4: 9a 10 00 1d mov %i5, %o5
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
200c8f8: 40 00 10 8d call 2010b2c <_Thread_Enable_dispatch>
200c8fc: 01 00 00 00 nop
if (msg_prio) {
200c900: 80 a6 e0 00 cmp %i3, 0
200c904: 02 80 00 08 be 200c924 <_POSIX_Message_queue_Receive_support+0xd4><== NEVER TAKEN
200c908: 03 00 80 aa sethi %hi(0x202a800), %g1
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
200c90c: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 202a870 <_Per_CPU_Information+0x10>
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);
200c910: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
200c914: 83 38 a0 1f sra %g2, 0x1f, %g1
200c918: 84 18 40 02 xor %g1, %g2, %g2
200c91c: 82 20 80 01 sub %g2, %g1, %g1
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
200c920: c2 26 c0 00 st %g1, [ %i3 ]
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
200c924: 3b 00 80 aa sethi %hi(0x202a800), %i5
200c928: ba 17 60 60 or %i5, 0x60, %i5 ! 202a860 <_Per_CPU_Information>
200c92c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200c930: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
200c934: 80 a0 60 00 cmp %g1, 0
200c938: 12 80 00 05 bne 200c94c <_POSIX_Message_queue_Receive_support+0xfc>
200c93c: 01 00 00 00 nop
return length_out;
200c940: f0 07 bf fc ld [ %fp + -4 ], %i0
200c944: 81 c7 e0 08 ret
200c948: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(
200c94c: 40 00 27 f8 call 201692c <__errno>
200c950: b0 10 3f ff mov -1, %i0
200c954: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200c958: b8 10 00 08 mov %o0, %i4
200c95c: 40 00 00 96 call 200cbb4 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
200c960: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
200c964: d0 27 00 00 st %o0, [ %i4 ]
200c968: 81 c7 e0 08 ret
200c96c: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
200c970: 40 00 27 ef call 201692c <__errno>
200c974: 01 00 00 00 nop
200c978: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
200c97c: c2 22 00 00 st %g1, [ %o0 ]
200c980: b0 10 3f ff mov -1, %i0
}
200c984: 81 c7 e0 08 ret
200c988: 81 e8 00 00 restore
0200ec78 <_POSIX_Semaphore_Create_support>:
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
200ec78: 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)
200ec7c: 80 a6 a0 00 cmp %i2, 0
200ec80: 22 80 00 06 be,a 200ec98 <_POSIX_Semaphore_Create_support+0x20>
200ec84: 03 00 80 88 sethi %hi(0x2022000), %g1
rtems_set_errno_and_return_minus_one( ENOSYS );
200ec88: 40 00 0a 42 call 2011590 <__errno>
200ec8c: 01 00 00 00 nop
200ec90: 10 80 00 10 b 200ecd0 <_POSIX_Semaphore_Create_support+0x58>
200ec94: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
200ec98: c4 00 60 90 ld [ %g1 + 0x90 ], %g2
++level;
200ec9c: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
200eca0: c4 20 60 90 st %g2, [ %g1 + 0x90 ]
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
200eca4: 21 00 80 88 sethi %hi(0x2022000), %l0
200eca8: 7f ff ee d9 call 200a80c <_Objects_Allocate>
200ecac: 90 14 23 64 or %l0, 0x364, %o0 ! 2022364 <_POSIX_Semaphore_Information>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
200ecb0: ba 92 20 00 orcc %o0, 0, %i5
200ecb4: 12 80 00 0a bne 200ecdc <_POSIX_Semaphore_Create_support+0x64>
200ecb8: 80 a6 20 00 cmp %i0, 0
_Thread_Enable_dispatch();
200ecbc: 7f ff f4 0b call 200bce8 <_Thread_Enable_dispatch>
200ecc0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSPC );
200ecc4: 40 00 0a 33 call 2011590 <__errno>
200ecc8: 01 00 00 00 nop
200eccc: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c>
200ecd0: c2 22 00 00 st %g1, [ %o0 ]
200ecd4: 81 c7 e0 08 ret
200ecd8: 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 ) {
200ecdc: 02 80 00 10 be 200ed1c <_POSIX_Semaphore_Create_support+0xa4>
200ece0: 90 10 00 18 mov %i0, %o0
name = _Workspace_String_duplicate( name_arg, name_len );
200ece4: 40 00 04 45 call 200fdf8 <_Workspace_String_duplicate>
200ece8: 92 10 00 19 mov %i1, %o1
if ( !name ) {
200ecec: b4 92 20 00 orcc %o0, 0, %i2
200ecf0: 12 80 00 0d bne 200ed24 <_POSIX_Semaphore_Create_support+0xac><== ALWAYS TAKEN
200ecf4: 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 );
200ecf8: 90 14 23 64 or %l0, 0x364, %o0 <== NOT EXECUTED
200ecfc: 7f ff ef a3 call 200ab88 <_Objects_Free> <== NOT EXECUTED
200ed00: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
200ed04: 7f ff f3 f9 call 200bce8 <_Thread_Enable_dispatch> <== NOT EXECUTED
200ed08: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
200ed0c: 40 00 0a 21 call 2011590 <__errno> <== NOT EXECUTED
200ed10: 01 00 00 00 nop <== NOT EXECUTED
200ed14: 10 bf ff ef b 200ecd0 <_POSIX_Semaphore_Create_support+0x58><== NOT EXECUTED
200ed18: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
}
} else {
name = NULL;
200ed1c: b4 10 20 00 clr %i2
}
the_semaphore->process_shared = pshared;
if ( name ) {
200ed20: 80 a6 a0 00 cmp %i2, 0
200ed24: 02 80 00 08 be 200ed44 <_POSIX_Semaphore_Create_support+0xcc>
200ed28: c0 27 60 10 clr [ %i5 + 0x10 ]
the_semaphore->named = true;
200ed2c: 82 10 20 01 mov 1, %g1
200ed30: c2 2f 60 14 stb %g1, [ %i5 + 0x14 ]
the_semaphore->open_count = 1;
200ed34: 82 10 20 01 mov 1, %g1
200ed38: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
the_semaphore->linked = true;
200ed3c: 10 80 00 05 b 200ed50 <_POSIX_Semaphore_Create_support+0xd8>
200ed40: c2 2f 60 15 stb %g1, [ %i5 + 0x15 ]
} else {
the_semaphore->named = false;
200ed44: c0 2f 60 14 clrb [ %i5 + 0x14 ]
the_semaphore->open_count = 0;
200ed48: c0 27 60 18 clr [ %i5 + 0x18 ]
the_semaphore->linked = false;
200ed4c: 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;
200ed50: 82 10 3f ff mov -1, %g1
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200ed54: 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;
200ed58: c2 27 60 5c st %g1, [ %i5 + 0x5c ]
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200ed5c: 92 07 60 5c add %i5, 0x5c, %o1
200ed60: 94 10 00 1b mov %i3, %o2
200ed64: 7f ff ed 1f call 200a1e0 <_CORE_semaphore_Initialize>
200ed68: c0 27 60 60 clr [ %i5 + 0x60 ]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
200ed6c: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200ed70: 05 00 80 88 sethi %hi(0x2022000), %g2
200ed74: c4 00 a3 80 ld [ %g2 + 0x380 ], %g2 ! 2022380 <_POSIX_Semaphore_Information+0x1c>
200ed78: 83 28 60 02 sll %g1, 2, %g1
200ed7c: 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;
200ed80: f4 27 60 0c st %i2, [ %i5 + 0xc ]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
200ed84: fa 27 00 00 st %i5, [ %i4 ]
_Thread_Enable_dispatch();
200ed88: 7f ff f3 d8 call 200bce8 <_Thread_Enable_dispatch>
200ed8c: b0 10 20 00 clr %i0
return 0;
}
200ed90: 81 c7 e0 08 ret
200ed94: 81 e8 00 00 restore
0200c75c <_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 ];
200c75c: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
200c760: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2
200c764: 80 a0 a0 00 cmp %g2, 0
200c768: 12 80 00 12 bne 200c7b0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54><== NEVER TAKEN
200c76c: 01 00 00 00 nop
200c770: c4 00 60 dc ld [ %g1 + 0xdc ], %g2
200c774: 80 a0 a0 01 cmp %g2, 1
200c778: 12 80 00 0e bne 200c7b0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54>
200c77c: 01 00 00 00 nop
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
200c780: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1
200c784: 80 a0 60 00 cmp %g1, 0
200c788: 02 80 00 0a be 200c7b0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54>
200c78c: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
200c790: 03 00 80 76 sethi %hi(0x201d800), %g1
200c794: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 201da30 <_Thread_Dispatch_disable_level>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
200c798: 92 10 3f ff mov -1, %o1
--level;
200c79c: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
200c7a0: c4 20 62 30 st %g2, [ %g1 + 0x230 ]
200c7a4: 82 13 c0 00 mov %o7, %g1
200c7a8: 40 00 01 b5 call 200ce7c <_POSIX_Thread_Exit>
200c7ac: 9e 10 40 00 mov %g1, %o7
} else
_Thread_Enable_dispatch();
200c7b0: 82 13 c0 00 mov %o7, %g1
200c7b4: 7f ff f6 54 call 200a104 <_Thread_Enable_dispatch>
200c7b8: 9e 10 40 00 mov %g1, %o7
0200db0c <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
200db0c: 9d e3 bf a0 save %sp, -96, %sp
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
200db10: 7f ff ff f4 call 200dae0 <_POSIX_Priority_Is_valid>
200db14: d0 06 40 00 ld [ %i1 ], %o0
200db18: 80 8a 20 ff btst 0xff, %o0
200db1c: 32 80 00 04 bne,a 200db2c <_POSIX_Thread_Translate_sched_param+0x20><== ALWAYS TAKEN
200db20: c0 26 80 00 clr [ %i2 ]
return EINVAL;
200db24: 81 c7 e0 08 ret
200db28: 91 e8 20 16 restore %g0, 0x16, %o0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
200db2c: 80 a6 20 00 cmp %i0, 0
200db30: 12 80 00 06 bne 200db48 <_POSIX_Thread_Translate_sched_param+0x3c>
200db34: c0 26 c0 00 clr [ %i3 ]
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200db38: 82 10 20 01 mov 1, %g1
200db3c: c2 26 80 00 st %g1, [ %i2 ]
return 0;
200db40: 81 c7 e0 08 ret
200db44: 81 e8 00 00 restore
}
if ( policy == SCHED_FIFO ) {
200db48: 80 a6 20 01 cmp %i0, 1
200db4c: 02 80 00 29 be 200dbf0 <_POSIX_Thread_Translate_sched_param+0xe4>
200db50: 80 a6 20 02 cmp %i0, 2
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
200db54: 12 80 00 04 bne 200db64 <_POSIX_Thread_Translate_sched_param+0x58>
200db58: 80 a6 20 04 cmp %i0, 4
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
200db5c: 10 80 00 25 b 200dbf0 <_POSIX_Thread_Translate_sched_param+0xe4>
200db60: f0 26 80 00 st %i0, [ %i2 ]
return 0;
}
if ( policy == SCHED_SPORADIC ) {
200db64: 12 bf ff f0 bne 200db24 <_POSIX_Thread_Translate_sched_param+0x18>
200db68: 01 00 00 00 nop
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
200db6c: c2 06 60 08 ld [ %i1 + 8 ], %g1
200db70: 80 a0 60 00 cmp %g1, 0
200db74: 32 80 00 07 bne,a 200db90 <_POSIX_Thread_Translate_sched_param+0x84>
200db78: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200db7c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200db80: 80 a0 60 00 cmp %g1, 0
200db84: 02 bf ff e8 be 200db24 <_POSIX_Thread_Translate_sched_param+0x18>
200db88: 01 00 00 00 nop
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
200db8c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200db90: 80 a0 60 00 cmp %g1, 0
200db94: 12 80 00 06 bne 200dbac <_POSIX_Thread_Translate_sched_param+0xa0>
200db98: 01 00 00 00 nop
200db9c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200dba0: 80 a0 60 00 cmp %g1, 0
200dba4: 02 bf ff e0 be 200db24 <_POSIX_Thread_Translate_sched_param+0x18>
200dba8: 01 00 00 00 nop
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
200dbac: 7f ff f7 6b call 200b958 <_Timespec_To_ticks>
200dbb0: 90 06 60 08 add %i1, 8, %o0
200dbb4: ba 10 00 08 mov %o0, %i5
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
200dbb8: 7f ff f7 68 call 200b958 <_Timespec_To_ticks>
200dbbc: 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 ) <
200dbc0: 80 a7 40 08 cmp %i5, %o0
200dbc4: 0a bf ff d8 bcs 200db24 <_POSIX_Thread_Translate_sched_param+0x18>
200dbc8: 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 ) )
200dbcc: 7f ff ff c5 call 200dae0 <_POSIX_Priority_Is_valid>
200dbd0: d0 06 60 04 ld [ %i1 + 4 ], %o0
200dbd4: 80 8a 20 ff btst 0xff, %o0
200dbd8: 02 bf ff d3 be 200db24 <_POSIX_Thread_Translate_sched_param+0x18>
200dbdc: 82 10 20 03 mov 3, %g1
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
200dbe0: c2 26 80 00 st %g1, [ %i2 ]
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
200dbe4: 03 00 80 1e sethi %hi(0x2007800), %g1
200dbe8: 82 10 63 f4 or %g1, 0x3f4, %g1 ! 2007bf4 <_POSIX_Threads_Sporadic_budget_callout>
200dbec: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
return EINVAL;
}
200dbf0: 81 c7 e0 08 ret
200dbf4: 91 e8 20 00 restore %g0, 0, %o0
0200cac8 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
200cac8: 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 ];
200cacc: f0 06 61 5c ld [ %i1 + 0x15c ], %i0
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
200cad0: 40 00 08 d4 call 200ee20 <_POSIX_Threads_cancel_run>
200cad4: 90 10 00 19 mov %i1, %o0
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
200cad8: 90 10 00 19 mov %i1, %o0
200cadc: 40 00 08 eb call 200ee88 <_POSIX_Keys_Run_destructors>
200cae0: 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 )) )
200cae4: 10 80 00 03 b 200caf0 <_POSIX_Threads_Delete_extension+0x28>
200cae8: f8 06 60 28 ld [ %i1 + 0x28 ], %i4
*(void **)the_thread->Wait.return_argument = value_ptr;
200caec: 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 )) )
200caf0: 7f ff f6 3f call 200a3ec <_Thread_queue_Dequeue>
200caf4: 90 10 00 1d mov %i5, %o0
200caf8: 80 a2 20 00 cmp %o0, 0
200cafc: 32 bf ff fc bne,a 200caec <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN
200cb00: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
200cb04: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
200cb08: 80 a0 60 04 cmp %g1, 4
200cb0c: 32 80 00 05 bne,a 200cb20 <_POSIX_Threads_Delete_extension+0x58>
200cb10: c0 26 61 5c clr [ %i1 + 0x15c ]
(void) _Watchdog_Remove( &api->Sporadic_timer );
200cb14: 7f ff f8 cc call 200ae44 <_Watchdog_Remove>
200cb18: 90 06 20 a8 add %i0, 0xa8, %o0
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
200cb1c: c0 26 61 5c clr [ %i1 + 0x15c ]
_Workspace_Free( api );
200cb20: 7f ff f9 6a call 200b0c8 <_Workspace_Free>
200cb24: 81 e8 00 00 restore
02007950 <_POSIX_Threads_Initialize_user_threads_body>:
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
void _POSIX_Threads_Initialize_user_threads_body(void)
{
2007950: 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;
2007954: 03 00 80 85 sethi %hi(0x2021400), %g1
2007958: 82 10 63 74 or %g1, 0x374, %g1 ! 2021774 <Configuration_POSIX_API>
maximum = Configuration_POSIX_API.number_of_initialization_threads;
200795c: f6 00 60 30 ld [ %g1 + 0x30 ], %i3
if ( !user_threads || maximum == 0 )
2007960: 80 a6 e0 00 cmp %i3, 0
2007964: 02 80 00 1d be 20079d8 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN
2007968: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
200796c: 80 a7 60 00 cmp %i5, 0
2007970: 02 80 00 1a be 20079d8 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN
2007974: 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 );
2007978: 40 00 18 a0 call 200dbf8 <pthread_attr_init>
200797c: 90 07 bf c0 add %fp, -64, %o0
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
2007980: 92 10 20 02 mov 2, %o1
2007984: 40 00 18 a9 call 200dc28 <pthread_attr_setinheritsched>
2007988: 90 07 bf c0 add %fp, -64, %o0
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
200798c: d2 07 60 04 ld [ %i5 + 4 ], %o1
2007990: 40 00 18 b5 call 200dc64 <pthread_attr_setstacksize>
2007994: 90 07 bf c0 add %fp, -64, %o0
status = pthread_create(
2007998: d4 07 40 00 ld [ %i5 ], %o2
200799c: 90 07 bf bc add %fp, -68, %o0
20079a0: 92 07 bf c0 add %fp, -64, %o1
20079a4: 96 10 20 00 clr %o3
20079a8: 7f ff ff 18 call 2007608 <pthread_create>
20079ac: ba 07 60 08 add %i5, 8, %i5
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
20079b0: 80 a2 20 00 cmp %o0, 0
20079b4: 02 80 00 05 be 20079c8 <_POSIX_Threads_Initialize_user_threads_body+0x78>
20079b8: 94 10 00 08 mov %o0, %o2
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
20079bc: 90 10 20 02 mov 2, %o0
20079c0: 40 00 08 0a call 20099e8 <_Internal_error_Occurred>
20079c4: 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++ ) {
20079c8: b8 07 20 01 inc %i4
20079cc: 80 a7 00 1b cmp %i4, %i3
20079d0: 12 bf ff ea bne 2007978 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN
20079d4: 01 00 00 00 nop
20079d8: 81 c7 e0 08 ret
20079dc: 81 e8 00 00 restore
0200cc1c <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
200cc1c: 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 ];
200cc20: 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 );
200cc24: 40 00 03 fd call 200dc18 <_Timespec_To_ticks>
200cc28: 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);
200cc2c: 03 00 80 72 sethi %hi(0x201c800), %g1
200cc30: d2 08 61 2c ldub [ %g1 + 0x12c ], %o1 ! 201c92c <rtems_maximum_priority>
200cc34: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
the_thread->cpu_time_budget = ticks;
200cc38: d0 26 60 74 st %o0, [ %i1 + 0x74 ]
200cc3c: 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 ) {
200cc40: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
200cc44: 80 a0 60 00 cmp %g1, 0
200cc48: 12 80 00 09 bne 200cc6c <_POSIX_Threads_Sporadic_budget_TSR+0x50><== NEVER TAKEN
200cc4c: 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 ) {
200cc50: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200cc54: 80 a0 40 09 cmp %g1, %o1
200cc58: 08 80 00 06 bleu 200cc70 <_POSIX_Threads_Sporadic_budget_TSR+0x54>
200cc5c: 90 07 60 90 add %i5, 0x90, %o0
_Thread_Change_priority( the_thread, new_priority, true );
200cc60: 90 10 00 19 mov %i1, %o0
200cc64: 7f ff f3 c9 call 2009b88 <_Thread_Change_priority>
200cc68: 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 );
200cc6c: 90 07 60 90 add %i5, 0x90, %o0
200cc70: 40 00 03 ea call 200dc18 <_Timespec_To_ticks>
200cc74: 31 00 80 75 sethi %hi(0x201d400), %i0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200cc78: b0 16 22 6c or %i0, 0x26c, %i0 ! 201d66c <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200cc7c: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200cc80: 7f ff f8 19 call 200ace4 <_Watchdog_Insert>
200cc84: 93 ef 60 a8 restore %i5, 0xa8, %o1
0200cc88 <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200cc88: 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 */
200cc8c: 86 10 3f ff mov -1, %g3
200cc90: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2
200cc94: c6 22 20 74 st %g3, [ %o0 + 0x74 ]
200cc98: 07 00 80 72 sethi %hi(0x201c800), %g3
200cc9c: d2 08 e1 2c ldub [ %g3 + 0x12c ], %o1 ! 201c92c <rtems_maximum_priority>
200cca0: 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 ) {
200cca4: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
200cca8: 80 a0 a0 00 cmp %g2, 0
200ccac: 12 80 00 09 bne 200ccd0 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN
200ccb0: 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 ) {
200ccb4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200ccb8: 80 a0 40 09 cmp %g1, %o1
200ccbc: 1a 80 00 05 bcc 200ccd0 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN
200ccc0: 94 10 20 01 mov 1, %o2
_Thread_Change_priority( the_thread, new_priority, true );
200ccc4: 82 13 c0 00 mov %o7, %g1
200ccc8: 7f ff f3 b0 call 2009b88 <_Thread_Change_priority>
200cccc: 9e 10 40 00 mov %g1, %o7
200ccd0: 81 c3 e0 08 retl <== NOT EXECUTED
02007408 <_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)
{
2007408: 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;
200740c: c2 06 60 68 ld [ %i1 + 0x68 ], %g1
2007410: 82 00 60 01 inc %g1
2007414: c2 26 60 68 st %g1, [ %i1 + 0x68 ]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
2007418: c2 06 60 54 ld [ %i1 + 0x54 ], %g1
200741c: 80 a0 60 00 cmp %g1, 0
2007420: 32 80 00 07 bne,a 200743c <_POSIX_Timer_TSR+0x34>
2007424: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
2007428: c2 06 60 58 ld [ %i1 + 0x58 ], %g1
200742c: 80 a0 60 00 cmp %g1, 0
2007430: 02 80 00 1f be 20074ac <_POSIX_Timer_TSR+0xa4> <== NEVER TAKEN
2007434: 82 10 20 04 mov 4, %g1
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
2007438: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
200743c: d4 06 60 08 ld [ %i1 + 8 ], %o2
2007440: 90 06 60 10 add %i1, 0x10, %o0
2007444: 17 00 80 1d sethi %hi(0x2007400), %o3
2007448: 98 10 00 19 mov %i1, %o4
200744c: 40 00 18 3b call 200d538 <_POSIX_Timer_Insert_helper>
2007450: 96 12 e0 08 or %o3, 8, %o3
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
2007454: 80 8a 20 ff btst 0xff, %o0
2007458: 02 80 00 1a be 20074c0 <_POSIX_Timer_TSR+0xb8> <== NEVER TAKEN
200745c: 90 07 bf f8 add %fp, -8, %o0
2007460: 13 00 80 77 sethi %hi(0x201dc00), %o1
2007464: 40 00 05 ed call 2008c18 <_TOD_Get_with_nanoseconds>
2007468: 92 12 63 68 or %o1, 0x368, %o1 ! 201df68 <_TOD>
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
200746c: f8 1a 00 00 ldd [ %o0 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007470: 94 10 20 00 clr %o2
2007474: 90 10 00 1c mov %i4, %o0
2007478: 92 10 00 1d mov %i5, %o1
200747c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007480: 40 00 48 66 call 2019618 <__divdi3>
2007484: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007488: 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);
200748c: d2 26 60 6c st %o1, [ %i1 + 0x6c ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007490: 94 10 20 00 clr %o2
2007494: 92 10 00 1d mov %i5, %o1
2007498: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
200749c: 40 00 49 4a call 20199c4 <__moddi3>
20074a0: 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;
20074a4: 82 10 20 03 mov 3, %g1
20074a8: 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 ) ) {
20074ac: d0 06 60 38 ld [ %i1 + 0x38 ], %o0
20074b0: d2 06 60 44 ld [ %i1 + 0x44 ], %o1
20074b4: 40 00 17 10 call 200d0f4 <pthread_kill>
20074b8: 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;
20074bc: c0 26 60 68 clr [ %i1 + 0x68 ]
20074c0: 81 c7 e0 08 ret
20074c4: 81 e8 00 00 restore
0200ef44 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
200ef44: 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,
200ef48: 98 10 20 01 mov 1, %o4
200ef4c: 90 10 00 18 mov %i0, %o0
200ef50: 92 10 00 19 mov %i1, %o1
200ef54: 94 07 bf cc add %fp, -52, %o2
200ef58: 40 00 00 2e call 200f010 <_POSIX_signals_Clear_signals>
200ef5c: 96 10 00 1a mov %i2, %o3
200ef60: 80 8a 20 ff btst 0xff, %o0
200ef64: 02 80 00 28 be 200f004 <_POSIX_signals_Check_signal+0xc0>
200ef68: 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 )
200ef6c: 85 2e 60 02 sll %i1, 2, %g2
200ef70: 35 00 80 76 sethi %hi(0x201d800), %i2
200ef74: b7 2e 60 04 sll %i1, 4, %i3
200ef78: b4 16 a3 50 or %i2, 0x350, %i2
200ef7c: b6 26 c0 02 sub %i3, %g2, %i3
200ef80: 84 06 80 1b add %i2, %i3, %g2
200ef84: fa 00 a0 08 ld [ %g2 + 8 ], %i5
200ef88: 80 a7 60 01 cmp %i5, 1
200ef8c: 02 80 00 1e be 200f004 <_POSIX_signals_Check_signal+0xc0> <== NEVER TAKEN
200ef90: 90 07 bf d8 add %fp, -40, %o0
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
200ef94: f8 06 20 d0 ld [ %i0 + 0xd0 ], %i4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200ef98: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200ef9c: 82 10 40 1c or %g1, %i4, %g1
200efa0: 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,
200efa4: 03 00 80 76 sethi %hi(0x201d800), %g1
200efa8: d2 00 63 00 ld [ %g1 + 0x300 ], %o1 ! 201db00 <_Per_CPU_Information+0x10>
200efac: 94 10 20 28 mov 0x28, %o2
200efb0: 40 00 04 00 call 200ffb0 <memcpy>
200efb4: 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 ) {
200efb8: c2 06 80 1b ld [ %i2 + %i3 ], %g1
200efbc: 80 a0 60 02 cmp %g1, 2
200efc0: 12 80 00 07 bne 200efdc <_POSIX_signals_Check_signal+0x98>
200efc4: 90 10 00 19 mov %i1, %o0
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
200efc8: 92 07 bf cc add %fp, -52, %o1
200efcc: 9f c7 40 00 call %i5
200efd0: 94 10 20 00 clr %o2
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
200efd4: 10 80 00 05 b 200efe8 <_POSIX_signals_Check_signal+0xa4>
200efd8: 03 00 80 76 sethi %hi(0x201d800), %g1
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
200efdc: 9f c7 40 00 call %i5
200efe0: 01 00 00 00 nop
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
200efe4: 03 00 80 76 sethi %hi(0x201d800), %g1
200efe8: d0 00 63 00 ld [ %g1 + 0x300 ], %o0 ! 201db00 <_Per_CPU_Information+0x10>
200efec: 92 07 bf d8 add %fp, -40, %o1
200eff0: 90 02 20 20 add %o0, 0x20, %o0
200eff4: 40 00 03 ef call 200ffb0 <memcpy>
200eff8: 94 10 20 28 mov 0x28, %o2
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
200effc: 82 10 20 01 mov 1, %g1
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
200f000: f8 26 20 d0 st %i4, [ %i0 + 0xd0 ]
return true;
}
200f004: b0 08 60 01 and %g1, 1, %i0
200f008: 81 c7 e0 08 ret
200f00c: 81 e8 00 00 restore
0200f5c8 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
200f5c8: 9d e3 bf a0 save %sp, -96, %sp
200f5cc: 82 06 3f ff add %i0, -1, %g1
200f5d0: ba 10 20 01 mov 1, %i5
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
200f5d4: 7f ff cb fc call 20025c4 <sparc_disable_interrupts>
200f5d8: bb 2f 40 01 sll %i5, %g1, %i5
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
200f5dc: 05 00 80 76 sethi %hi(0x201d800), %g2
200f5e0: 83 2e 20 02 sll %i0, 2, %g1
200f5e4: 84 10 a3 50 or %g2, 0x350, %g2
200f5e8: b1 2e 20 04 sll %i0, 4, %i0
200f5ec: 82 26 00 01 sub %i0, %g1, %g1
200f5f0: c4 00 80 01 ld [ %g2 + %g1 ], %g2
200f5f4: 80 a0 a0 02 cmp %g2, 2
200f5f8: 32 80 00 0c bne,a 200f628 <_POSIX_signals_Clear_process_signals+0x60>
200f5fc: 03 00 80 77 sethi %hi(0x201dc00), %g1
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
200f600: 05 00 80 77 sethi %hi(0x201dc00), %g2
200f604: 84 10 a1 48 or %g2, 0x148, %g2 ! 201dd48 <_POSIX_signals_Siginfo>
200f608: 86 00 40 02 add %g1, %g2, %g3
200f60c: 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 );
200f610: 86 00 e0 04 add %g3, 4, %g3
200f614: 80 a0 40 03 cmp %g1, %g3
200f618: 02 80 00 04 be 200f628 <_POSIX_signals_Clear_process_signals+0x60><== ALWAYS TAKEN
200f61c: 03 00 80 77 sethi %hi(0x201dc00), %g1
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
200f620: 7f ff cb ed call 20025d4 <sparc_enable_interrupts>
200f624: 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;
200f628: c4 00 61 44 ld [ %g1 + 0x144 ], %g2
200f62c: ba 28 80 1d andn %g2, %i5, %i5
200f630: 10 bf ff fc b 200f620 <_POSIX_signals_Clear_process_signals+0x58>
200f634: fa 20 61 44 st %i5, [ %g1 + 0x144 ]
02008200 <_POSIX_signals_Get_lowest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
2008200: 82 10 20 1b mov 0x1b, %g1
2008204: 84 10 20 01 mov 1, %g2
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
2008208: 86 00 7f ff add %g1, -1, %g3
200820c: 87 28 80 03 sll %g2, %g3, %g3
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
2008210: 80 88 c0 08 btst %g3, %o0
2008214: 12 80 00 11 bne 2008258 <_POSIX_signals_Get_lowest+0x58> <== NEVER TAKEN
2008218: 01 00 00 00 nop
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
200821c: 82 00 60 01 inc %g1
2008220: 80 a0 60 20 cmp %g1, 0x20
2008224: 12 bf ff fa bne 200820c <_POSIX_signals_Get_lowest+0xc>
2008228: 86 00 7f ff add %g1, -1, %g3
200822c: 82 10 20 01 mov 1, %g1
2008230: 84 10 20 01 mov 1, %g2
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
2008234: 86 00 7f ff add %g1, -1, %g3
2008238: 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 ) ) {
200823c: 80 88 c0 08 btst %g3, %o0
2008240: 12 80 00 06 bne 2008258 <_POSIX_signals_Get_lowest+0x58>
2008244: 01 00 00 00 nop
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
2008248: 82 00 60 01 inc %g1
200824c: 80 a0 60 1b cmp %g1, 0x1b
2008250: 12 bf ff fa bne 2008238 <_POSIX_signals_Get_lowest+0x38> <== ALWAYS TAKEN
2008254: 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;
}
2008258: 81 c3 e0 08 retl
200825c: 90 10 00 01 mov %g1, %o0
0200c854 <_POSIX_signals_Post_switch_hook>:
*/
static void _POSIX_signals_Post_switch_hook(
Thread_Control *the_thread
)
{
200c854: 9d e3 bf a0 save %sp, -96, %sp
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
200c858: 03 00 80 76 sethi %hi(0x201d800), %g1
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200c85c: fa 06 21 5c ld [ %i0 + 0x15c ], %i5
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
200c860: c2 00 63 00 ld [ %g1 + 0x300 ], %g1
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
200c864: 80 a7 60 00 cmp %i5, 0
200c868: 02 80 00 11 be 200c8ac <_POSIX_signals_Post_switch_hook+0x58><== NEVER TAKEN
200c86c: f6 00 60 34 ld [ %g1 + 0x34 ], %i3
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
200c870: 35 00 80 77 sethi %hi(0x201dc00), %i2
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
200c874: 7f ff d7 54 call 20025c4 <sparc_disable_interrupts>
200c878: 01 00 00 00 nop
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
200c87c: c4 06 a1 44 ld [ %i2 + 0x144 ], %g2
200c880: c2 07 60 d4 ld [ %i5 + 0xd4 ], %g1
200c884: 82 10 80 01 or %g2, %g1, %g1
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
200c888: c4 07 60 d0 ld [ %i5 + 0xd0 ], %g2
200c88c: 80 a8 40 02 andncc %g1, %g2, %g0
200c890: 12 80 00 09 bne 200c8b4 <_POSIX_signals_Post_switch_hook+0x60>
200c894: 01 00 00 00 nop
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
200c898: 7f ff d7 4f call 20025d4 <sparc_enable_interrupts>
200c89c: 01 00 00 00 nop
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
200c8a0: 03 00 80 76 sethi %hi(0x201d800), %g1
200c8a4: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 201db00 <_Per_CPU_Information+0x10>
200c8a8: f6 20 60 34 st %i3, [ %g1 + 0x34 ]
200c8ac: 81 c7 e0 08 ret
200c8b0: 81 e8 00 00 restore
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
200c8b4: 7f ff d7 48 call 20025d4 <sparc_enable_interrupts>
200c8b8: b8 10 20 1b mov 0x1b, %i4
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
200c8bc: 92 10 00 1c mov %i4, %o1
200c8c0: 94 10 20 00 clr %o2
200c8c4: 40 00 09 a0 call 200ef44 <_POSIX_signals_Check_signal>
200c8c8: 90 10 00 1d mov %i5, %o0
_POSIX_signals_Check_signal( api, signo, true );
200c8cc: 92 10 00 1c mov %i4, %o1
200c8d0: 90 10 00 1d mov %i5, %o0
200c8d4: 40 00 09 9c call 200ef44 <_POSIX_signals_Check_signal>
200c8d8: 94 10 20 01 mov 1, %o2
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
200c8dc: b8 07 20 01 inc %i4
200c8e0: 80 a7 20 20 cmp %i4, 0x20
200c8e4: 12 bf ff f7 bne 200c8c0 <_POSIX_signals_Post_switch_hook+0x6c>
200c8e8: 92 10 00 1c mov %i4, %o1
200c8ec: b8 10 20 01 mov 1, %i4
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
200c8f0: 92 10 00 1c mov %i4, %o1
200c8f4: 94 10 20 00 clr %o2
200c8f8: 40 00 09 93 call 200ef44 <_POSIX_signals_Check_signal>
200c8fc: 90 10 00 1d mov %i5, %o0
_POSIX_signals_Check_signal( api, signo, true );
200c900: 92 10 00 1c mov %i4, %o1
200c904: 90 10 00 1d mov %i5, %o0
200c908: 40 00 09 8f call 200ef44 <_POSIX_signals_Check_signal>
200c90c: 94 10 20 01 mov 1, %o2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
200c910: b8 07 20 01 inc %i4
200c914: 80 a7 20 1b cmp %i4, 0x1b
200c918: 12 bf ff f7 bne 200c8f4 <_POSIX_signals_Post_switch_hook+0xa0>
200c91c: 92 10 00 1c mov %i4, %o1
200c920: 30 bf ff d5 b,a 200c874 <_POSIX_signals_Post_switch_hook+0x20>
0201a2ac <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
201a2ac: 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 ) ) {
201a2b0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
201a2b4: 3b 04 00 20 sethi %hi(0x10008000), %i5
201a2b8: 84 06 7f ff add %i1, -1, %g2
201a2bc: 86 10 20 01 mov 1, %g3
201a2c0: 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 ];
201a2c4: 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 ) ) {
201a2c8: 80 a7 00 1d cmp %i4, %i5
201a2cc: 12 80 00 1e bne 201a344 <_POSIX_signals_Unblock_thread+0x98>
201a2d0: 85 28 c0 02 sll %g3, %g2, %g2
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
201a2d4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
201a2d8: 80 88 80 01 btst %g2, %g1
201a2dc: 12 80 00 08 bne 201a2fc <_POSIX_signals_Unblock_thread+0x50>
201a2e0: 82 10 20 04 mov 4, %g1
201a2e4: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1
201a2e8: 80 a8 80 01 andncc %g2, %g1, %g0
201a2ec: 32 80 00 04 bne,a 201a2fc <_POSIX_signals_Unblock_thread+0x50>
201a2f0: 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;
201a2f4: 10 80 00 3d b 201a3e8 <_POSIX_signals_Unblock_thread+0x13c>
201a2f8: 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;
201a2fc: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
201a300: 80 a6 a0 00 cmp %i2, 0
201a304: 12 80 00 07 bne 201a320 <_POSIX_signals_Unblock_thread+0x74>
201a308: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
201a30c: 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;
201a310: f2 22 00 00 st %i1, [ %o0 ]
the_info->si_code = SI_USER;
201a314: c2 22 20 04 st %g1, [ %o0 + 4 ]
the_info->si_value.sival_int = 0;
201a318: 10 80 00 05 b 201a32c <_POSIX_signals_Unblock_thread+0x80>
201a31c: c0 22 20 08 clr [ %o0 + 8 ]
} else {
*the_info = *info;
201a320: 92 10 00 1a mov %i2, %o1
201a324: 7f ff d7 23 call 200ffb0 <memcpy>
201a328: 94 10 20 0c mov 0xc, %o2
}
_Thread_queue_Extract_with_proxy( the_thread );
201a32c: 90 10 00 18 mov %i0, %o0
201a330: 7f ff c1 1c call 200a7a0 <_Thread_queue_Extract_with_proxy>
201a334: b0 10 20 01 mov 1, %i0
201a338: b0 0e 20 01 and %i0, 1, %i0
201a33c: 81 c7 e0 08 ret
201a340: 81 e8 00 00 restore
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
201a344: c8 01 20 d0 ld [ %g4 + 0xd0 ], %g4
201a348: 80 a8 80 04 andncc %g2, %g4, %g0
201a34c: 02 80 00 26 be 201a3e4 <_POSIX_signals_Unblock_thread+0x138>
201a350: 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 ) ) {
201a354: 80 88 40 02 btst %g1, %g2
201a358: 02 80 00 17 be 201a3b4 <_POSIX_signals_Unblock_thread+0x108>
201a35c: 80 a0 60 00 cmp %g1, 0
the_thread->Wait.return_code = EINTR;
201a360: 84 10 20 04 mov 4, %g2
201a364: 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) )
201a368: 05 00 00 ef sethi %hi(0x3bc00), %g2
201a36c: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 <PROM_START+0x3bee0>
201a370: 80 88 40 02 btst %g1, %g2
201a374: 02 80 00 06 be 201a38c <_POSIX_signals_Unblock_thread+0xe0>
201a378: 80 88 60 08 btst 8, %g1
_Thread_queue_Extract_with_proxy( the_thread );
201a37c: 7f ff c1 09 call 200a7a0 <_Thread_queue_Extract_with_proxy>
201a380: 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;
201a384: 10 80 00 19 b 201a3e8 <_POSIX_signals_Unblock_thread+0x13c>
201a388: 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) ) {
201a38c: 22 80 00 17 be,a 201a3e8 <_POSIX_signals_Unblock_thread+0x13c><== NEVER TAKEN
201a390: b0 10 20 00 clr %i0 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
201a394: 7f ff c2 ac call 200ae44 <_Watchdog_Remove>
201a398: 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 );
201a39c: 90 10 00 18 mov %i0, %o0
201a3a0: 13 04 01 ff sethi %hi(0x1007fc00), %o1
201a3a4: 7f ff be 3d call 2009c98 <_Thread_Clear_state>
201a3a8: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1007fff8 <RAM_END+0xdc7fff8>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
201a3ac: 10 80 00 0f b 201a3e8 <_POSIX_signals_Unblock_thread+0x13c>
201a3b0: 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 ) {
201a3b4: 32 80 00 0d bne,a 201a3e8 <_POSIX_signals_Unblock_thread+0x13c><== NEVER TAKEN
201a3b8: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201a3bc: 03 00 80 76 sethi %hi(0x201d800), %g1
201a3c0: 82 10 62 f0 or %g1, 0x2f0, %g1 ! 201daf0 <_Per_CPU_Information>
201a3c4: c4 00 60 08 ld [ %g1 + 8 ], %g2
201a3c8: 80 a0 a0 00 cmp %g2, 0
201a3cc: 22 80 00 07 be,a 201a3e8 <_POSIX_signals_Unblock_thread+0x13c>
201a3d0: b0 10 20 00 clr %i0
201a3d4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
201a3d8: 80 a6 00 02 cmp %i0, %g2
201a3dc: 22 80 00 02 be,a 201a3e4 <_POSIX_signals_Unblock_thread+0x138><== ALWAYS TAKEN
201a3e0: c6 28 60 0c stb %g3, [ %g1 + 0xc ]
_Thread_Dispatch_necessary = true;
}
}
return false;
201a3e4: b0 10 20 00 clr %i0
}
201a3e8: b0 0e 20 01 and %i0, 1, %i0
201a3ec: 81 c7 e0 08 ret
201a3f0: 81 e8 00 00 restore
0200a1f0 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200a1f0: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
200a1f4: 80 a6 60 00 cmp %i1, 0
200a1f8: 02 80 00 69 be 200a39c <_RBTree_Extract_unprotected+0x1ac>
200a1fc: 01 00 00 00 nop
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
200a200: c2 06 20 08 ld [ %i0 + 8 ], %g1
200a204: 80 a6 40 01 cmp %i1, %g1
200a208: 32 80 00 07 bne,a 200a224 <_RBTree_Extract_unprotected+0x34>
200a20c: 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 );
200a210: 90 10 00 19 mov %i1, %o0
200a214: 40 00 01 31 call 200a6d8 <_RBTree_Next_unprotected>
200a218: 92 10 20 01 mov 1, %o1
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
200a21c: 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]) {
200a220: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200a224: 80 a6 40 01 cmp %i1, %g1
200a228: 32 80 00 07 bne,a 200a244 <_RBTree_Extract_unprotected+0x54>
200a22c: 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 );
200a230: 90 10 00 19 mov %i1, %o0
200a234: 40 00 01 29 call 200a6d8 <_RBTree_Next_unprotected>
200a238: 92 10 20 00 clr %o1
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
200a23c: 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]) {
200a240: fa 06 60 04 ld [ %i1 + 4 ], %i5
200a244: 80 a7 60 00 cmp %i5, 0
200a248: 02 80 00 36 be 200a320 <_RBTree_Extract_unprotected+0x130>
200a24c: f8 06 60 08 ld [ %i1 + 8 ], %i4
200a250: 80 a7 20 00 cmp %i4, 0
200a254: 32 80 00 05 bne,a 200a268 <_RBTree_Extract_unprotected+0x78>
200a258: c2 07 60 08 ld [ %i5 + 8 ], %g1
200a25c: 10 80 00 35 b 200a330 <_RBTree_Extract_unprotected+0x140>
200a260: 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];
200a264: c2 07 60 08 ld [ %i5 + 8 ], %g1
200a268: 80 a0 60 00 cmp %g1, 0
200a26c: 32 bf ff fe bne,a 200a264 <_RBTree_Extract_unprotected+0x74>
200a270: 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];
200a274: f8 07 60 04 ld [ %i5 + 4 ], %i4
if(leaf) {
200a278: 80 a7 20 00 cmp %i4, 0
200a27c: 02 80 00 05 be 200a290 <_RBTree_Extract_unprotected+0xa0>
200a280: 01 00 00 00 nop
leaf->parent = target->parent;
200a284: c2 07 40 00 ld [ %i5 ], %g1
200a288: 10 80 00 04 b 200a298 <_RBTree_Extract_unprotected+0xa8>
200a28c: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
200a290: 7f ff ff 73 call 200a05c <_RBTree_Extract_validate_unprotected>
200a294: 90 10 00 1d mov %i5, %o0
}
victim_color = target->color;
dir = target != target->parent->child[0];
200a298: 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;
200a29c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
dir = target != target->parent->child[0];
200a2a0: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200a2a4: 86 1f 40 03 xor %i5, %g3, %g3
200a2a8: 80 a0 00 03 cmp %g0, %g3
200a2ac: 86 40 20 00 addx %g0, 0, %g3
target->parent->child[dir] = leaf;
200a2b0: 87 28 e0 02 sll %g3, 2, %g3
200a2b4: 84 00 80 03 add %g2, %g3, %g2
200a2b8: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200a2bc: c4 06 40 00 ld [ %i1 ], %g2
200a2c0: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200a2c4: 86 1e 40 03 xor %i1, %g3, %g3
200a2c8: 80 a0 00 03 cmp %g0, %g3
200a2cc: 86 40 20 00 addx %g0, 0, %g3
the_node->parent->child[dir] = target;
200a2d0: 87 28 e0 02 sll %g3, 2, %g3
200a2d4: 84 00 80 03 add %g2, %g3, %g2
200a2d8: 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];
200a2dc: c4 06 60 08 ld [ %i1 + 8 ], %g2
200a2e0: c4 27 60 08 st %g2, [ %i5 + 8 ]
if (the_node->child[RBT_RIGHT])
200a2e4: c4 06 60 08 ld [ %i1 + 8 ], %g2
200a2e8: 80 a0 a0 00 cmp %g2, 0
200a2ec: 32 80 00 02 bne,a 200a2f4 <_RBTree_Extract_unprotected+0x104><== ALWAYS TAKEN
200a2f0: fa 20 80 00 st %i5, [ %g2 ]
the_node->child[RBT_RIGHT]->parent = target;
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
200a2f4: c4 06 60 04 ld [ %i1 + 4 ], %g2
200a2f8: c4 27 60 04 st %g2, [ %i5 + 4 ]
if (the_node->child[RBT_LEFT])
200a2fc: c4 06 60 04 ld [ %i1 + 4 ], %g2
200a300: 80 a0 a0 00 cmp %g2, 0
200a304: 32 80 00 02 bne,a 200a30c <_RBTree_Extract_unprotected+0x11c>
200a308: 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;
200a30c: c4 06 40 00 ld [ %i1 ], %g2
200a310: c4 27 40 00 st %g2, [ %i5 ]
target->color = the_node->color;
200a314: c4 06 60 0c ld [ %i1 + 0xc ], %g2
200a318: 10 80 00 14 b 200a368 <_RBTree_Extract_unprotected+0x178>
200a31c: 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 ) {
200a320: 80 a7 20 00 cmp %i4, 0
200a324: 32 80 00 04 bne,a 200a334 <_RBTree_Extract_unprotected+0x144>
200a328: c2 06 40 00 ld [ %i1 ], %g1
200a32c: 30 80 00 04 b,a 200a33c <_RBTree_Extract_unprotected+0x14c>
leaf->parent = the_node->parent;
200a330: c2 06 40 00 ld [ %i1 ], %g1
200a334: 10 80 00 04 b 200a344 <_RBTree_Extract_unprotected+0x154>
200a338: 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);
200a33c: 7f ff ff 48 call 200a05c <_RBTree_Extract_validate_unprotected>
200a340: 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];
200a344: 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;
200a348: c2 06 60 0c ld [ %i1 + 0xc ], %g1
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200a34c: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200a350: 86 1e 40 03 xor %i1, %g3, %g3
200a354: 80 a0 00 03 cmp %g0, %g3
200a358: 86 40 20 00 addx %g0, 0, %g3
the_node->parent->child[dir] = leaf;
200a35c: 87 28 e0 02 sll %g3, 2, %g3
200a360: 84 00 80 03 add %g2, %g3, %g2
200a364: 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 */
200a368: 80 a0 60 00 cmp %g1, 0
200a36c: 32 80 00 06 bne,a 200a384 <_RBTree_Extract_unprotected+0x194>
200a370: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (leaf) {
200a374: 80 a7 20 00 cmp %i4, 0
200a378: 32 80 00 02 bne,a 200a380 <_RBTree_Extract_unprotected+0x190>
200a37c: 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;
200a380: 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;
200a384: c0 26 60 08 clr [ %i1 + 8 ]
200a388: c0 26 60 04 clr [ %i1 + 4 ]
200a38c: 80 a0 60 00 cmp %g1, 0
200a390: 02 80 00 03 be 200a39c <_RBTree_Extract_unprotected+0x1ac>
200a394: c0 26 40 00 clr [ %i1 ]
200a398: c0 20 60 0c clr [ %g1 + 0xc ]
200a39c: 81 c7 e0 08 ret
200a3a0: 81 e8 00 00 restore
0200b3e4 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
200b3e4: 9d e3 bf a0 save %sp, -96, %sp
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
200b3e8: 80 a6 20 00 cmp %i0, 0
200b3ec: 02 80 00 10 be 200b42c <_RBTree_Initialize+0x48> <== NEVER TAKEN
200b3f0: 01 00 00 00 nop
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
200b3f4: c0 26 00 00 clr [ %i0 ]
the_rbtree->root = NULL;
200b3f8: c0 26 20 04 clr [ %i0 + 4 ]
the_rbtree->first[0] = NULL;
200b3fc: c0 26 20 08 clr [ %i0 + 8 ]
the_rbtree->first[1] = NULL;
200b400: c0 26 20 0c clr [ %i0 + 0xc ]
the_rbtree->compare_function = compare_function;
200b404: 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-- ) {
200b408: 10 80 00 06 b 200b420 <_RBTree_Initialize+0x3c>
200b40c: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ]
_RBTree_Insert_unprotected(the_rbtree, next);
200b410: 90 10 00 18 mov %i0, %o0
200b414: 7f ff ff 2e call 200b0cc <_RBTree_Insert_unprotected>
200b418: b4 06 80 1c add %i2, %i4, %i2
200b41c: 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-- ) {
200b420: 80 a6 e0 00 cmp %i3, 0
200b424: 12 bf ff fb bne 200b410 <_RBTree_Initialize+0x2c>
200b428: 92 10 00 1a mov %i2, %o1
200b42c: 81 c7 e0 08 ret
200b430: 81 e8 00 00 restore
0200a444 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200a444: 9d e3 bf a0 save %sp, -96, %sp
if(!the_node) return (RBTree_Node*)-1;
200a448: 80 a6 60 00 cmp %i1, 0
200a44c: 02 80 00 7c be 200a63c <_RBTree_Insert_unprotected+0x1f8>
200a450: ba 10 00 18 mov %i0, %i5
RBTree_Node *iter_node = the_rbtree->root;
200a454: f0 06 20 04 ld [ %i0 + 4 ], %i0
int compare_result;
if (!iter_node) { /* special case: first node inserted */
200a458: b6 96 20 00 orcc %i0, 0, %i3
200a45c: 32 80 00 0c bne,a 200a48c <_RBTree_Insert_unprotected+0x48>
200a460: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
the_node->color = RBT_BLACK;
200a464: c0 26 60 0c clr [ %i1 + 0xc ]
the_rbtree->root = the_node;
200a468: f2 27 60 04 st %i1, [ %i5 + 4 ]
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
200a46c: f2 27 60 0c st %i1, [ %i5 + 0xc ]
200a470: f2 27 60 08 st %i1, [ %i5 + 8 ]
the_node->parent = (RBTree_Node *) the_rbtree;
200a474: fa 26 40 00 st %i5, [ %i1 ]
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200a478: c0 26 60 08 clr [ %i1 + 8 ]
200a47c: c0 26 60 04 clr [ %i1 + 4 ]
200a480: 81 c7 e0 08 ret
200a484: 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);
200a488: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200a48c: 90 10 00 19 mov %i1, %o0
200a490: 9f c0 40 00 call %g1
200a494: 92 10 00 18 mov %i0, %o1
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
200a498: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1
200a49c: 80 a0 60 00 cmp %g1, 0
200a4a0: 02 80 00 05 be 200a4b4 <_RBTree_Insert_unprotected+0x70>
200a4a4: b8 38 00 08 xnor %g0, %o0, %i4
200a4a8: 80 a2 20 00 cmp %o0, 0
200a4ac: 02 80 00 65 be 200a640 <_RBTree_Insert_unprotected+0x1fc>
200a4b0: 01 00 00 00 nop
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
200a4b4: b9 37 20 1f srl %i4, 0x1f, %i4
if (!iter_node->child[dir]) {
200a4b8: 83 2f 20 02 sll %i4, 2, %g1
200a4bc: 82 06 00 01 add %i0, %g1, %g1
200a4c0: f0 00 60 04 ld [ %g1 + 4 ], %i0
200a4c4: 80 a6 20 00 cmp %i0, 0
200a4c8: 32 bf ff f0 bne,a 200a488 <_RBTree_Insert_unprotected+0x44>
200a4cc: b6 10 00 18 mov %i0, %i3
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200a4d0: c0 26 60 08 clr [ %i1 + 8 ]
200a4d4: c0 26 60 04 clr [ %i1 + 4 ]
the_node->color = RBT_RED;
200a4d8: 84 10 20 01 mov 1, %g2
iter_node->child[dir] = the_node;
200a4dc: 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;
200a4e0: c4 26 60 0c st %g2, [ %i1 + 0xc ]
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
200a4e4: f6 26 40 00 st %i3, [ %i1 ]
/* update min/max */
compare_result = the_rbtree->compare_function(
200a4e8: 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];
200a4ec: b6 07 20 02 add %i4, 2, %i3
200a4f0: 85 2e e0 02 sll %i3, 2, %g2
200a4f4: d2 07 40 02 ld [ %i5 + %g2 ], %o1
200a4f8: 9f c0 40 00 call %g1
200a4fc: 90 10 00 19 mov %i1, %o0
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
200a500: 80 a7 20 00 cmp %i4, 0
200a504: 12 80 00 06 bne 200a51c <_RBTree_Insert_unprotected+0xd8>
200a508: 80 a2 20 00 cmp %o0, 0
200a50c: 36 80 00 3c bge,a 200a5fc <_RBTree_Insert_unprotected+0x1b8>
200a510: d0 06 40 00 ld [ %i1 ], %o0
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
200a514: 10 80 00 04 b 200a524 <_RBTree_Insert_unprotected+0xe0>
200a518: 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)) ) {
200a51c: 04 80 00 37 ble 200a5f8 <_RBTree_Insert_unprotected+0x1b4>
200a520: b7 2e e0 02 sll %i3, 2, %i3
the_rbtree->first[dir] = the_node;
200a524: 10 80 00 35 b 200a5f8 <_RBTree_Insert_unprotected+0x1b4>
200a528: 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;
200a52c: 02 80 00 13 be 200a578 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN
200a530: 82 10 20 00 clr %g1
if(!(the_node->parent->parent->parent)) return NULL;
200a534: c2 07 40 00 ld [ %i5 ], %g1
200a538: 80 a0 60 00 cmp %g1, 0
200a53c: 02 80 00 0f be 200a578 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN
200a540: 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])
200a544: c2 07 60 04 ld [ %i5 + 4 ], %g1
200a548: 80 a2 00 01 cmp %o0, %g1
200a54c: 22 80 00 02 be,a 200a554 <_RBTree_Insert_unprotected+0x110>
200a550: 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);
200a554: 80 a0 60 00 cmp %g1, 0
200a558: 02 80 00 09 be 200a57c <_RBTree_Insert_unprotected+0x138>
200a55c: 84 10 20 00 clr %g2
200a560: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200a564: 80 a0 a0 01 cmp %g2, 1
200a568: 32 80 00 05 bne,a 200a57c <_RBTree_Insert_unprotected+0x138>
200a56c: 84 10 20 00 clr %g2
200a570: 10 80 00 03 b 200a57c <_RBTree_Insert_unprotected+0x138>
200a574: 84 10 20 01 mov 1, %g2
200a578: 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)) {
200a57c: 80 a0 a0 00 cmp %g2, 0
200a580: 22 80 00 08 be,a 200a5a0 <_RBTree_Insert_unprotected+0x15c>
200a584: c2 07 60 04 ld [ %i5 + 4 ], %g1
the_node->parent->color = RBT_BLACK;
200a588: c0 22 20 0c clr [ %o0 + 0xc ]
u->color = RBT_BLACK;
200a58c: c0 20 60 0c clr [ %g1 + 0xc ]
g->color = RBT_RED;
200a590: b2 10 00 1d mov %i5, %i1
200a594: 82 10 20 01 mov 1, %g1
200a598: 10 80 00 18 b 200a5f8 <_RBTree_Insert_unprotected+0x1b4>
200a59c: 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];
200a5a0: 82 1a 00 01 xor %o0, %g1, %g1
200a5a4: 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];
200a5a8: c2 02 20 04 ld [ %o0 + 4 ], %g1
RBTree_Direction pdir = the_node->parent != g->child[0];
200a5ac: 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];
200a5b0: 82 1e 40 01 xor %i1, %g1, %g1
200a5b4: 80 a0 00 01 cmp %g0, %g1
200a5b8: 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) {
200a5bc: 80 a0 40 1c cmp %g1, %i4
200a5c0: 22 80 00 08 be,a 200a5e0 <_RBTree_Insert_unprotected+0x19c>
200a5c4: c2 06 40 00 ld [ %i1 ], %g1
_RBTree_Rotate(the_node->parent, pdir);
200a5c8: 7f ff ff 80 call 200a3c8 <_RBTree_Rotate>
200a5cc: 92 10 00 1c mov %i4, %o1
the_node = the_node->child[pdir];
200a5d0: 83 2f 20 02 sll %i4, 2, %g1
200a5d4: b2 06 40 01 add %i1, %g1, %i1
200a5d8: f2 06 60 04 ld [ %i1 + 4 ], %i1
}
the_node->parent->color = RBT_BLACK;
200a5dc: c2 06 40 00 ld [ %i1 ], %g1
g->color = RBT_RED;
200a5e0: 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;
200a5e4: c0 20 60 0c clr [ %g1 + 0xc ]
g->color = RBT_RED;
200a5e8: d2 27 60 0c st %o1, [ %i5 + 0xc ]
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
200a5ec: 90 10 00 1d mov %i5, %o0
200a5f0: 7f ff ff 76 call 200a3c8 <_RBTree_Rotate>
200a5f4: 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;
200a5f8: d0 06 40 00 ld [ %i1 ], %o0
200a5fc: fa 02 00 00 ld [ %o0 ], %i5
200a600: 80 a7 60 00 cmp %i5, 0
200a604: 22 80 00 06 be,a 200a61c <_RBTree_Insert_unprotected+0x1d8>
200a608: 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);
200a60c: c2 02 20 0c ld [ %o0 + 0xc ], %g1
200a610: 82 18 60 01 xor %g1, 1, %g1
200a614: 80 a0 00 01 cmp %g0, %g1
200a618: 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))) {
200a61c: 80 a0 60 00 cmp %g1, 0
200a620: 12 bf ff c3 bne 200a52c <_RBTree_Insert_unprotected+0xe8>
200a624: 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;
200a628: 12 80 00 06 bne 200a640 <_RBTree_Insert_unprotected+0x1fc>
200a62c: 01 00 00 00 nop
200a630: c0 26 60 0c clr [ %i1 + 0xc ]
200a634: 81 c7 e0 08 ret
200a638: 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;
200a63c: b0 10 3f ff mov -1, %i0
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
200a640: 81 c7 e0 08 ret
200a644: 81 e8 00 00 restore
0200a678 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
200a678: 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;
200a67c: b8 10 20 00 clr %i4
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a680: 80 a0 00 19 cmp %g0, %i1
200a684: 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];
200a688: 82 00 60 02 add %g1, 2, %g1
200a68c: 83 28 60 02 sll %g1, 2, %g1
while ( !stop && current != NULL ) {
200a690: 10 80 00 0a b 200a6b8 <_RBTree_Iterate_unprotected+0x40>
200a694: fa 06 00 01 ld [ %i0 + %g1 ], %i5
stop = (*visitor)( current, dir, visitor_arg );
200a698: 92 10 00 19 mov %i1, %o1
200a69c: 9f c6 80 00 call %i2
200a6a0: 94 10 00 1b mov %i3, %o2
current = _RBTree_Next_unprotected( current, dir );
200a6a4: 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 );
200a6a8: b8 10 00 08 mov %o0, %i4
current = _RBTree_Next_unprotected( current, dir );
200a6ac: 40 00 00 0b call 200a6d8 <_RBTree_Next_unprotected>
200a6b0: 90 10 00 1d mov %i5, %o0
200a6b4: 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 ) {
200a6b8: 80 a7 60 00 cmp %i5, 0
200a6bc: 02 80 00 05 be 200a6d0 <_RBTree_Iterate_unprotected+0x58>
200a6c0: b8 1f 20 01 xor %i4, 1, %i4
200a6c4: 80 8f 20 ff btst 0xff, %i4
200a6c8: 12 bf ff f4 bne 200a698 <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN
200a6cc: 90 10 00 1d mov %i5, %o0
200a6d0: 81 c7 e0 08 ret
200a6d4: 81 e8 00 00 restore
02009fe0 <_RBTree_Rotate>:
RBTree_Node *the_node,
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
2009fe0: 80 a2 20 00 cmp %o0, 0
2009fe4: 02 80 00 1c be 200a054 <_RBTree_Rotate+0x74> <== NEVER TAKEN
2009fe8: 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);
2009fec: 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;
2009ff0: 87 28 e0 02 sll %g3, 2, %g3
2009ff4: 86 02 00 03 add %o0, %g3, %g3
2009ff8: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2009ffc: 80 a0 60 00 cmp %g1, 0
200a000: 02 80 00 15 be 200a054 <_RBTree_Rotate+0x74> <== NEVER TAKEN
200a004: 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];
200a008: 84 00 40 09 add %g1, %o1, %g2
200a00c: c8 00 a0 04 ld [ %g2 + 4 ], %g4
200a010: c8 20 e0 04 st %g4, [ %g3 + 4 ]
if (c->child[dir])
200a014: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200a018: 80 a0 a0 00 cmp %g2, 0
200a01c: 32 80 00 02 bne,a 200a024 <_RBTree_Rotate+0x44>
200a020: 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;
200a024: 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;
200a028: 92 00 40 09 add %g1, %o1, %o1
200a02c: d0 22 60 04 st %o0, [ %o1 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a030: c6 00 a0 04 ld [ %g2 + 4 ], %g3
c->parent = the_node->parent;
200a034: 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;
200a038: 86 1a 00 03 xor %o0, %g3, %g3
c->parent = the_node->parent;
the_node->parent = c;
200a03c: 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;
200a040: 80 a0 00 03 cmp %g0, %g3
200a044: 86 40 20 00 addx %g0, 0, %g3
200a048: 87 28 e0 02 sll %g3, 2, %g3
200a04c: 86 00 80 03 add %g2, %g3, %g3
200a050: c2 20 e0 04 st %g1, [ %g3 + 4 ]
200a054: 81 c3 e0 08 retl
02009f90 <_RBTree_Sibling>:
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
2009f90: 80 a2 20 00 cmp %o0, 0
2009f94: 02 80 00 10 be 2009fd4 <_RBTree_Sibling+0x44> <== NEVER TAKEN
2009f98: 82 10 20 00 clr %g1
if(!(the_node->parent)) return NULL;
2009f9c: c4 02 00 00 ld [ %o0 ], %g2
2009fa0: 80 a0 a0 00 cmp %g2, 0
2009fa4: 22 80 00 0d be,a 2009fd8 <_RBTree_Sibling+0x48> <== NEVER TAKEN
2009fa8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
if(!(the_node->parent->parent)) return NULL;
2009fac: c2 00 80 00 ld [ %g2 ], %g1
2009fb0: 80 a0 60 00 cmp %g1, 0
2009fb4: 02 80 00 08 be 2009fd4 <_RBTree_Sibling+0x44>
2009fb8: 82 10 20 00 clr %g1
if(the_node == the_node->parent->child[RBT_LEFT])
2009fbc: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2009fc0: 80 a2 00 01 cmp %o0, %g1
2009fc4: 22 80 00 04 be,a 2009fd4 <_RBTree_Sibling+0x44>
2009fc8: c2 00 a0 08 ld [ %g2 + 8 ], %g1
return the_node->parent->child[RBT_RIGHT];
2009fcc: 81 c3 e0 08 retl
2009fd0: 90 10 00 01 mov %g1, %o0
else
return the_node->parent->child[RBT_LEFT];
}
2009fd4: 90 10 00 01 mov %g1, %o0
2009fd8: 81 c3 e0 08 retl
02008820 <_RTEMS_signal_Post_switch_hook>:
#include <rtems/score/thread.h>
#include <rtems/score/apiext.h>
#include <rtems/rtems/tasks.h>
static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing )
{
2008820: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
2008824: fa 06 21 58 ld [ %i0 + 0x158 ], %i5
if ( !api )
2008828: 80 a7 60 00 cmp %i5, 0
200882c: 02 80 00 1c be 200889c <_RTEMS_signal_Post_switch_hook+0x7c><== NEVER TAKEN
2008830: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
2008834: 7f ff eb 45 call 2003548 <sparc_disable_interrupts>
2008838: 01 00 00 00 nop
signal_set = asr->signals_posted;
200883c: f8 07 60 14 ld [ %i5 + 0x14 ], %i4
asr->signals_posted = 0;
2008840: c0 27 60 14 clr [ %i5 + 0x14 ]
_ISR_Enable( level );
2008844: 7f ff eb 45 call 2003558 <sparc_enable_interrupts>
2008848: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
200884c: 80 a7 20 00 cmp %i4, 0
2008850: 02 80 00 13 be 200889c <_RTEMS_signal_Post_switch_hook+0x7c>
2008854: 94 07 bf fc add %fp, -4, %o2
return;
asr->nest_level += 1;
2008858: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200885c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
2008860: 82 00 60 01 inc %g1
2008864: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
2008868: 37 00 00 3f sethi %hi(0xfc00), %i3
200886c: 40 00 01 03 call 2008c78 <rtems_task_mode>
2008870: 92 16 e3 ff or %i3, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
2008874: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2008878: 9f c0 40 00 call %g1
200887c: 90 10 00 1c mov %i4, %o0
asr->nest_level -= 1;
2008880: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
2008884: d0 07 bf fc ld [ %fp + -4 ], %o0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
2008888: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200888c: 92 16 e3 ff or %i3, 0x3ff, %o1
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
2008890: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
2008894: 40 00 00 f9 call 2008c78 <rtems_task_mode>
2008898: 94 07 bf fc add %fp, -4, %o2
200889c: 81 c7 e0 08 ret
20088a0: 81 e8 00 00 restore
02032df4 <_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
)
{
2032df4: 9d e3 bf 98 save %sp, -104, %sp
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
2032df8: 13 00 81 87 sethi %hi(0x2061c00), %o1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
2032dfc: f6 06 20 40 ld [ %i0 + 0x40 ], %i3
2032e00: 90 07 bf f8 add %fp, -8, %o0
2032e04: 7f ff 55 55 call 2008358 <_TOD_Get_with_nanoseconds>
2032e08: 92 12 63 90 or %o1, 0x390, %o1
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
2032e0c: c4 1f bf f8 ldd [ %fp + -8 ], %g2
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2032e10: f8 1e 20 50 ldd [ %i0 + 0x50 ], %i4
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2032e14: 09 00 81 89 sethi %hi(0x2062400), %g4
2032e18: ba a0 c0 1d subcc %g3, %i5, %i5
2032e1c: 88 11 21 60 or %g4, 0x160, %g4
2032e20: b8 60 80 1c subx %g2, %i4, %i4
2032e24: f8 3e 40 00 std %i4, [ %i1 ]
2032e28: fa 01 20 10 ld [ %g4 + 0x10 ], %i5
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
2032e2c: d8 1e e0 80 ldd [ %i3 + 0x80 ], %o4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2032e30: 80 a6 c0 1d cmp %i3, %i5
2032e34: 12 80 00 15 bne 2032e88 <_Rate_monotonic_Get_status+0x94>
2032e38: 82 10 20 01 mov 1, %g1
2032e3c: f8 19 20 20 ldd [ %g4 + 0x20 ], %i4
2032e40: 86 a0 c0 1d subcc %g3, %i5, %g3
2032e44: 84 60 80 1c subx %g2, %i4, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2032e48: ba 83 40 03 addcc %o5, %g3, %i5
2032e4c: b8 43 00 02 addx %o4, %g2, %i4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2032e50: c4 1e 20 48 ldd [ %i0 + 0x48 ], %g2
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2032e54: 80 a0 80 1c cmp %g2, %i4
2032e58: 34 80 00 0c bg,a 2032e88 <_Rate_monotonic_Get_status+0x94><== NEVER TAKEN
2032e5c: 82 10 20 00 clr %g1 <== NOT EXECUTED
2032e60: 32 80 00 06 bne,a 2032e78 <_Rate_monotonic_Get_status+0x84>
2032e64: 86 a7 40 03 subcc %i5, %g3, %g3
2032e68: 80 a0 c0 1d cmp %g3, %i5
2032e6c: 18 80 00 06 bgu 2032e84 <_Rate_monotonic_Get_status+0x90>
2032e70: 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;
2032e74: 82 10 20 01 mov 1, %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2032e78: 84 67 00 02 subx %i4, %g2, %g2
2032e7c: 10 80 00 03 b 2032e88 <_Rate_monotonic_Get_status+0x94>
2032e80: 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;
2032e84: 82 10 20 00 clr %g1
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
2032e88: b0 08 60 01 and %g1, 1, %i0
2032e8c: 81 c7 e0 08 ret
2032e90: 81 e8 00 00 restore
020331fc <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
20331fc: 9d e3 bf 98 save %sp, -104, %sp
2033200: 11 00 81 8a sethi %hi(0x2062800), %o0
2033204: 92 10 00 18 mov %i0, %o1
2033208: 90 12 23 24 or %o0, 0x324, %o0
203320c: 7f ff 56 fa call 2008df4 <_Objects_Get>
2033210: 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 ) {
2033214: c2 07 bf fc ld [ %fp + -4 ], %g1
2033218: 80 a0 60 00 cmp %g1, 0
203321c: 12 80 00 24 bne 20332ac <_Rate_monotonic_Timeout+0xb0> <== NEVER TAKEN
2033220: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2033224: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2033228: 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);
203322c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2033230: 80 88 80 01 btst %g2, %g1
2033234: 22 80 00 0b be,a 2033260 <_Rate_monotonic_Timeout+0x64>
2033238: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
203323c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
2033240: c2 07 60 08 ld [ %i5 + 8 ], %g1
2033244: 80 a0 80 01 cmp %g2, %g1
2033248: 32 80 00 06 bne,a 2033260 <_Rate_monotonic_Timeout+0x64>
203324c: 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 );
2033250: 13 04 01 ff sethi %hi(0x1007fc00), %o1
2033254: 7f ff 59 b2 call 200991c <_Thread_Clear_state>
2033258: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1007fff8 <RAM_END+0xdc7fff8>
203325c: 30 80 00 06 b,a 2033274 <_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 ) {
2033260: 80 a0 60 01 cmp %g1, 1
2033264: 12 80 00 0d bne 2033298 <_Rate_monotonic_Timeout+0x9c>
2033268: 82 10 20 04 mov 4, %g1
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
203326c: 82 10 20 03 mov 3, %g1
2033270: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
2033274: 7f ff ff 51 call 2032fb8 <_Rate_monotonic_Initiate_statistics>
2033278: 90 10 00 1d mov %i5, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
203327c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2033280: 11 00 81 88 sethi %hi(0x2062000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2033284: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2033288: 90 12 20 dc or %o0, 0xdc, %o0
203328c: 7f ff 5d b7 call 200a968 <_Watchdog_Insert>
2033290: 92 07 60 10 add %i5, 0x10, %o1
2033294: 30 80 00 02 b,a 203329c <_Rate_monotonic_Timeout+0xa0>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
2033298: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
203329c: 03 00 81 88 sethi %hi(0x2062000), %g1
20332a0: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 2062040 <_Thread_Dispatch_disable_level>
--level;
20332a4: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
20332a8: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
20332ac: 81 c7 e0 08 ret
20332b0: 81 e8 00 00 restore
02032e94 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
2032e94: 9d e3 bf 90 save %sp, -112, %sp
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2032e98: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
2032e9c: 82 00 60 01 inc %g1
2032ea0: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2032ea4: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
2032ea8: 80 a0 60 04 cmp %g1, 4
2032eac: 12 80 00 05 bne 2032ec0 <_Rate_monotonic_Update_statistics+0x2c>
2032eb0: 90 10 00 18 mov %i0, %o0
stats->missed_count++;
2032eb4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
2032eb8: 82 00 60 01 inc %g1
2032ebc: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
/*
* Grab status for time statistics.
*/
valid_status =
2032ec0: 92 07 bf f8 add %fp, -8, %o1
2032ec4: 7f ff ff cc call 2032df4 <_Rate_monotonic_Get_status>
2032ec8: 94 07 bf f0 add %fp, -16, %o2
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
2032ecc: 80 8a 20 ff btst 0xff, %o0
2032ed0: 02 80 00 38 be 2032fb0 <_Rate_monotonic_Update_statistics+0x11c>
2032ed4: c4 1f bf f0 ldd [ %fp + -16 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2032ed8: 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 ) )
2032edc: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2032ee0: b6 87 40 03 addcc %i5, %g3, %i3
2032ee4: b4 47 00 02 addx %i4, %g2, %i2
2032ee8: 80 a0 40 02 cmp %g1, %g2
2032eec: 14 80 00 09 bg 2032f10 <_Rate_monotonic_Update_statistics+0x7c>
2032ef0: f4 3e 20 70 std %i2, [ %i0 + 0x70 ]
2032ef4: 80 a0 40 02 cmp %g1, %g2
2032ef8: 32 80 00 08 bne,a 2032f18 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN
2032efc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED
2032f00: c2 06 20 64 ld [ %i0 + 0x64 ], %g1
2032f04: 80 a0 40 03 cmp %g1, %g3
2032f08: 28 80 00 04 bleu,a 2032f18 <_Rate_monotonic_Update_statistics+0x84>
2032f0c: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
stats->min_cpu_time = executed;
2032f10: c4 3e 20 60 std %g2, [ %i0 + 0x60 ]
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2032f14: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
2032f18: 80 a0 40 02 cmp %g1, %g2
2032f1c: 26 80 00 0a bl,a 2032f44 <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN
2032f20: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED
2032f24: 80 a0 40 02 cmp %g1, %g2
2032f28: 32 80 00 08 bne,a 2032f48 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN
2032f2c: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED
2032f30: c2 06 20 6c ld [ %i0 + 0x6c ], %g1
2032f34: 80 a0 40 03 cmp %g1, %g3
2032f38: 3a 80 00 04 bcc,a 2032f48 <_Rate_monotonic_Update_statistics+0xb4>
2032f3c: c4 1f bf f8 ldd [ %fp + -8 ], %g2
stats->max_cpu_time = executed;
2032f40: 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 );
2032f44: c4 1f bf f8 ldd [ %fp + -8 ], %g2
2032f48: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2032f4c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2032f50: b6 87 40 03 addcc %i5, %g3, %i3
2032f54: b4 47 00 02 addx %i4, %g2, %i2
2032f58: 80 a0 40 02 cmp %g1, %g2
2032f5c: 14 80 00 09 bg 2032f80 <_Rate_monotonic_Update_statistics+0xec>
2032f60: f4 3e 20 88 std %i2, [ %i0 + 0x88 ]
2032f64: 80 a0 40 02 cmp %g1, %g2
2032f68: 32 80 00 08 bne,a 2032f88 <_Rate_monotonic_Update_statistics+0xf4><== NEVER TAKEN
2032f6c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2032f70: c2 06 20 7c ld [ %i0 + 0x7c ], %g1
2032f74: 80 a0 40 03 cmp %g1, %g3
2032f78: 28 80 00 04 bleu,a 2032f88 <_Rate_monotonic_Update_statistics+0xf4>
2032f7c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
stats->min_wall_time = since_last_period;
2032f80: c4 3e 20 78 std %g2, [ %i0 + 0x78 ]
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2032f84: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2032f88: 80 a0 40 02 cmp %g1, %g2
2032f8c: 26 80 00 09 bl,a 2032fb0 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
2032f90: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED
2032f94: 80 a0 40 02 cmp %g1, %g2
2032f98: 12 80 00 06 bne 2032fb0 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
2032f9c: 01 00 00 00 nop
2032fa0: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2032fa4: 80 a0 40 03 cmp %g1, %g3
2032fa8: 2a 80 00 02 bcs,a 2032fb0 <_Rate_monotonic_Update_statistics+0x11c>
2032fac: c4 3e 20 80 std %g2, [ %i0 + 0x80 ]
2032fb0: 81 c7 e0 08 ret
2032fb4: 81 e8 00 00 restore
02009ff8 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
2009ff8: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
2009ffc: 40 00 06 bb call 200bae8 <_Workspace_Allocate>
200a000: 90 10 20 1c mov 0x1c, %o0
if ( sched ) {
200a004: 80 a2 20 00 cmp %o0, 0
200a008: 02 80 00 06 be 200a020 <_Scheduler_CBS_Allocate+0x28> <== NEVER TAKEN
200a00c: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
200a010: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
200a014: f0 22 00 00 st %i0, [ %o0 ]
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
200a018: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
schinfo->cbs_server = NULL;
200a01c: c0 22 20 18 clr [ %o0 + 0x18 ]
}
return sched;
}
200a020: 81 c7 e0 08 ret
200a024: 91 e8 00 08 restore %g0, %o0, %o0
0200b338 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
200b338: 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;
200b33c: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200b340: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200b344: 80 a0 40 09 cmp %g1, %o1
200b348: 32 80 00 02 bne,a 200b350 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN
200b34c: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200b350: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200b354: 80 a0 40 09 cmp %g1, %o1
200b358: 02 80 00 04 be 200b368 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
200b35c: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200b360: 40 00 01 83 call 200b96c <_Thread_Change_priority>
200b364: 94 10 20 01 mov 1, %o2
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
200b368: fa 06 20 88 ld [ %i0 + 0x88 ], %i5
if ( sched_info->cbs_server->cbs_budget_overrun ) {
200b36c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b370: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200b374: 80 a0 a0 00 cmp %g2, 0
200b378: 02 80 00 09 be 200b39c <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN
200b37c: 01 00 00 00 nop
_Scheduler_CBS_Get_server_id(
200b380: d0 00 40 00 ld [ %g1 ], %o0
200b384: 7f ff ff d7 call 200b2e0 <_Scheduler_CBS_Get_server_id>
200b388: 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 );
200b38c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b390: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200b394: 9f c0 40 00 call %g1
200b398: d0 07 bf fc ld [ %fp + -4 ], %o0
200b39c: 81 c7 e0 08 ret
200b3a0: 81 e8 00 00 restore
0200af40 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200af40: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200af44: c2 06 20 04 ld [ %i0 + 4 ], %g1
200af48: 80 a0 60 00 cmp %g1, 0
200af4c: 04 80 00 1d ble 200afc0 <_Scheduler_CBS_Create_server+0x80>
200af50: 01 00 00 00 nop
200af54: c2 06 00 00 ld [ %i0 ], %g1
200af58: 80 a0 60 00 cmp %g1, 0
200af5c: 04 80 00 19 ble 200afc0 <_Scheduler_CBS_Create_server+0x80>
200af60: 03 00 80 80 sethi %hi(0x2020000), %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++ ) {
200af64: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 2020080 <_Scheduler_CBS_Maximum_servers>
if ( !_Scheduler_CBS_Server_list[i] )
200af68: 03 00 80 84 sethi %hi(0x2021000), %g1
200af6c: c6 00 62 68 ld [ %g1 + 0x268 ], %g3 ! 2021268 <_Scheduler_CBS_Server_list>
200af70: 10 80 00 07 b 200af8c <_Scheduler_CBS_Create_server+0x4c>
200af74: 82 10 20 00 clr %g1
200af78: c8 00 c0 1c ld [ %g3 + %i4 ], %g4
200af7c: 80 a1 20 00 cmp %g4, 0
200af80: 02 80 00 14 be 200afd0 <_Scheduler_CBS_Create_server+0x90>
200af84: 3b 00 80 84 sethi %hi(0x2021000), %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++ ) {
200af88: 82 00 60 01 inc %g1
200af8c: 80 a0 40 02 cmp %g1, %g2
200af90: 12 bf ff fa bne 200af78 <_Scheduler_CBS_Create_server+0x38>
200af94: 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;
200af98: 81 c7 e0 08 ret
200af9c: 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;
200afa0: c4 20 60 04 st %g2, [ %g1 + 4 ]
200afa4: c4 06 20 04 ld [ %i0 + 4 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
200afa8: 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;
200afac: c4 20 60 08 st %g2, [ %g1 + 8 ]
the_server->task_id = -1;
200afb0: 84 10 3f ff mov -1, %g2
200afb4: c4 20 40 00 st %g2, [ %g1 ]
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
200afb8: 81 c7 e0 08 ret
200afbc: 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;
200afc0: 81 c7 e0 08 ret
200afc4: 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;
200afc8: 81 c7 e0 08 ret <== NOT EXECUTED
200afcc: 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 *)
200afd0: f6 07 62 68 ld [ %i5 + 0x268 ], %i3
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
200afd4: c2 26 80 00 st %g1, [ %i2 ]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
200afd8: 40 00 07 ad call 200ce8c <_Workspace_Allocate>
200afdc: 90 10 20 10 mov 0x10, %o0
the_server = _Scheduler_CBS_Server_list[*server_id];
200afe0: 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 *)
200afe4: d0 26 c0 1c st %o0, [ %i3 + %i4 ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
200afe8: c4 07 62 68 ld [ %i5 + 0x268 ], %g2
200afec: 83 28 60 02 sll %g1, 2, %g1
200aff0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_server )
200aff4: 80 a0 60 00 cmp %g1, 0
200aff8: 32 bf ff ea bne,a 200afa0 <_Scheduler_CBS_Create_server+0x60><== ALWAYS TAKEN
200affc: c4 06 00 00 ld [ %i0 ], %g2
200b000: 30 bf ff f2 b,a 200afc8 <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED
0200b078 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
200b078: 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);
200b07c: 90 10 00 19 mov %i1, %o0
200b080: 40 00 03 79 call 200be64 <_Thread_Get>
200b084: 92 07 bf fc add %fp, -4, %o1
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
200b088: ba 92 20 00 orcc %o0, 0, %i5
200b08c: 02 80 00 05 be 200b0a0 <_Scheduler_CBS_Detach_thread+0x28>
200b090: 03 00 80 80 sethi %hi(0x2020000), %g1
_Thread_Enable_dispatch();
200b094: 40 00 03 68 call 200be34 <_Thread_Enable_dispatch>
200b098: 01 00 00 00 nop
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
200b09c: 03 00 80 80 sethi %hi(0x2020000), %g1
200b0a0: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 2020080 <_Scheduler_CBS_Maximum_servers>
200b0a4: 80 a6 00 01 cmp %i0, %g1
200b0a8: 1a 80 00 1b bcc 200b114 <_Scheduler_CBS_Detach_thread+0x9c>
200b0ac: 80 a7 60 00 cmp %i5, 0
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
200b0b0: 02 80 00 19 be 200b114 <_Scheduler_CBS_Detach_thread+0x9c>
200b0b4: 03 00 80 84 sethi %hi(0x2021000), %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
200b0b8: c2 00 62 68 ld [ %g1 + 0x268 ], %g1 ! 2021268 <_Scheduler_CBS_Server_list>
200b0bc: b1 2e 20 02 sll %i0, 2, %i0
200b0c0: c2 00 40 18 ld [ %g1 + %i0 ], %g1
200b0c4: 80 a0 60 00 cmp %g1, 0
200b0c8: 02 80 00 11 be 200b10c <_Scheduler_CBS_Detach_thread+0x94>
200b0cc: 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 )
200b0d0: c4 00 40 00 ld [ %g1 ], %g2
200b0d4: 80 a0 80 19 cmp %g2, %i1
200b0d8: 12 80 00 0f bne 200b114 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN
200b0dc: 84 10 3f ff mov -1, %g2
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200b0e0: c4 20 40 00 st %g2, [ %g1 ]
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
200b0e4: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
200b0e8: c0 20 60 18 clr [ %g1 + 0x18 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200b0ec: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
200b0f0: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
the_thread->budget_callout = the_thread->Start.budget_callout;
200b0f4: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1
200b0f8: c2 27 60 7c st %g1, [ %i5 + 0x7c ]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200b0fc: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1
200b100: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
return SCHEDULER_CBS_OK;
200b104: 81 c7 e0 08 ret
200b108: 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;
200b10c: 81 c7 e0 08 ret
200b110: 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;
}
200b114: 81 c7 e0 08 ret
200b118: 91 e8 3f ee restore %g0, -18, %o0
0200b3a4 <_Scheduler_CBS_Initialize>:
}
}
int _Scheduler_CBS_Initialize(void)
{
200b3a4: 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*) );
200b3a8: 3b 00 80 80 sethi %hi(0x2020000), %i5
200b3ac: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 ! 2020080 <_Scheduler_CBS_Maximum_servers>
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
200b3b0: 40 00 06 b7 call 200ce8c <_Workspace_Allocate>
200b3b4: 91 2a 20 02 sll %o0, 2, %o0
200b3b8: 05 00 80 84 sethi %hi(0x2021000), %g2
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
200b3bc: 80 a2 20 00 cmp %o0, 0
200b3c0: 02 80 00 0d be 200b3f4 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN
200b3c4: d0 20 a2 68 st %o0, [ %g2 + 0x268 ]
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200b3c8: c6 07 60 80 ld [ %i5 + 0x80 ], %g3
200b3cc: 10 80 00 05 b 200b3e0 <_Scheduler_CBS_Initialize+0x3c>
200b3d0: 82 10 20 00 clr %g1
_Scheduler_CBS_Server_list[i] = NULL;
200b3d4: 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++) {
200b3d8: 82 00 60 01 inc %g1
_Scheduler_CBS_Server_list[i] = NULL;
200b3dc: 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++) {
200b3e0: 80 a0 40 03 cmp %g1, %g3
200b3e4: 12 bf ff fc bne 200b3d4 <_Scheduler_CBS_Initialize+0x30>
200b3e8: fa 00 a2 68 ld [ %g2 + 0x268 ], %i5
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
200b3ec: 81 c7 e0 08 ret
200b3f0: 91 e8 20 00 restore %g0, 0, %o0
}
200b3f4: 81 c7 e0 08 ret <== NOT EXECUTED
200b3f8: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED
0200a028 <_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;
200a028: c2 02 20 88 ld [ %o0 + 0x88 ], %g1
if (deadline) {
200a02c: 80 a2 60 00 cmp %o1, 0
200a030: 02 80 00 10 be 200a070 <_Scheduler_CBS_Release_job+0x48>
200a034: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
/* Initializing or shifting deadline. */
if (serv_info)
200a038: 80 a0 60 00 cmp %g1, 0
200a03c: 02 80 00 08 be 200a05c <_Scheduler_CBS_Release_job+0x34>
200a040: 05 00 80 7c sethi %hi(0x201f000), %g2
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
200a044: d2 00 a2 bc ld [ %g2 + 0x2bc ], %o1 ! 201f2bc <_Watchdog_Ticks_since_boot>
200a048: c4 00 60 04 ld [ %g1 + 4 ], %g2
200a04c: 92 02 40 02 add %o1, %g2, %o1
200a050: 05 20 00 00 sethi %hi(0x80000000), %g2
200a054: 10 80 00 0a b 200a07c <_Scheduler_CBS_Release_job+0x54>
200a058: 92 2a 40 02 andn %o1, %g2, %o1
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
200a05c: c2 00 a2 bc ld [ %g2 + 0x2bc ], %g1
200a060: 92 02 40 01 add %o1, %g1, %o1
200a064: 03 20 00 00 sethi %hi(0x80000000), %g1
200a068: 10 80 00 07 b 200a084 <_Scheduler_CBS_Release_job+0x5c>
200a06c: 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)
200a070: 80 a0 60 00 cmp %g1, 0
200a074: 02 80 00 04 be 200a084 <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN
200a078: d2 02 20 ac ld [ %o0 + 0xac ], %o1
the_thread->cpu_time_budget = serv_info->parameters.budget;
200a07c: c2 00 60 08 ld [ %g1 + 8 ], %g1
200a080: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
the_thread->real_priority = new_priority;
200a084: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
200a088: 94 10 20 01 mov 1, %o2
200a08c: 82 13 c0 00 mov %o7, %g1
200a090: 40 00 01 26 call 200a528 <_Thread_Change_priority>
200a094: 9e 10 40 00 mov %g1, %o7
0200a098 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
200a098: 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);
200a09c: 40 00 00 4c call 200a1cc <_Scheduler_EDF_Enqueue>
200a0a0: 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;
200a0a4: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
200a0a8: 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) {
200a0ac: 80 a7 60 00 cmp %i5, 0
200a0b0: 02 80 00 18 be 200a110 <_Scheduler_CBS_Unblock+0x78>
200a0b4: 03 00 80 7c sethi %hi(0x201f000), %g1
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a0b8: 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 -
200a0bc: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0
200a0c0: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a0c4: 40 00 3f 36 call 2019d9c <.umul>
200a0c8: 90 27 00 08 sub %i4, %o0, %o0
200a0cc: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
200a0d0: b6 10 00 08 mov %o0, %i3
200a0d4: 40 00 3f 32 call 2019d9c <.umul>
200a0d8: d0 07 60 08 ld [ %i5 + 8 ], %o0
200a0dc: 80 a6 c0 08 cmp %i3, %o0
200a0e0: 24 80 00 0d ble,a 200a114 <_Scheduler_CBS_Unblock+0x7c>
200a0e4: 3b 00 80 7d sethi %hi(0x201f400), %i5
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200a0e8: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200a0ec: 80 a7 00 09 cmp %i4, %o1
200a0f0: 32 80 00 02 bne,a 200a0f8 <_Scheduler_CBS_Unblock+0x60>
200a0f4: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200a0f8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a0fc: 80 a0 40 09 cmp %g1, %o1
200a100: 02 80 00 04 be 200a110 <_Scheduler_CBS_Unblock+0x78>
200a104: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200a108: 40 00 01 08 call 200a528 <_Thread_Change_priority>
200a10c: 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,
200a110: 3b 00 80 7d sethi %hi(0x201f400), %i5
200a114: ba 17 62 f0 or %i5, 0x2f0, %i5 ! 201f6f0 <_Per_CPU_Information>
200a118: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
200a11c: 03 00 80 79 sethi %hi(0x201e400), %g1
200a120: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
200a124: c2 00 61 64 ld [ %g1 + 0x164 ], %g1
200a128: 9f c0 40 00 call %g1
200a12c: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1
200a130: 80 a2 20 00 cmp %o0, 0
200a134: 04 80 00 0f ble 200a170 <_Scheduler_CBS_Unblock+0xd8>
200a138: 01 00 00 00 nop
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a13c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
200a140: f0 27 60 14 st %i0, [ %i5 + 0x14 ]
if ( _Thread_Executing->is_preemptible ||
200a144: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a148: 80 a0 60 00 cmp %g1, 0
200a14c: 12 80 00 06 bne 200a164 <_Scheduler_CBS_Unblock+0xcc>
200a150: 84 10 20 01 mov 1, %g2
200a154: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a158: 80 a0 60 00 cmp %g1, 0
200a15c: 12 80 00 05 bne 200a170 <_Scheduler_CBS_Unblock+0xd8> <== ALWAYS TAKEN
200a160: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a164: 03 00 80 7d sethi %hi(0x201f400), %g1
200a168: 82 10 62 f0 or %g1, 0x2f0, %g1 ! 201f6f0 <_Per_CPU_Information>
200a16c: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
200a170: 81 c7 e0 08 ret
200a174: 81 e8 00 00 restore
02009ff8 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
2009ff8: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
2009ffc: 40 00 06 90 call 200ba3c <_Workspace_Allocate>
200a000: 90 10 20 18 mov 0x18, %o0
if ( sched ) {
200a004: 80 a2 20 00 cmp %o0, 0
200a008: 02 80 00 05 be 200a01c <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN
200a00c: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
200a010: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
200a014: f0 22 00 00 st %i0, [ %o0 ]
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
200a018: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
return sched;
}
200a01c: 81 c7 e0 08 ret
200a020: 91 e8 00 08 restore %g0, %o0, %o0
0200a1c0 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
200a1c0: 9d e3 bf a0 save %sp, -96, %sp
_Scheduler_EDF_Enqueue(the_thread);
200a1c4: 7f ff ff ad call 200a078 <_Scheduler_EDF_Enqueue>
200a1c8: 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(
200a1cc: 3b 00 80 7d sethi %hi(0x201f400), %i5
200a1d0: ba 17 62 30 or %i5, 0x230, %i5 ! 201f630 <_Per_CPU_Information>
200a1d4: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
200a1d8: 03 00 80 79 sethi %hi(0x201e400), %g1
200a1dc: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0
200a1e0: c2 00 60 b4 ld [ %g1 + 0xb4 ], %g1
200a1e4: 9f c0 40 00 call %g1
200a1e8: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
200a1ec: 80 a2 20 00 cmp %o0, 0
200a1f0: 16 80 00 0f bge 200a22c <_Scheduler_EDF_Unblock+0x6c>
200a1f4: 01 00 00 00 nop
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a1f8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
200a1fc: f0 27 60 14 st %i0, [ %i5 + 0x14 ]
if ( _Thread_Executing->is_preemptible ||
200a200: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a204: 80 a0 60 00 cmp %g1, 0
200a208: 12 80 00 06 bne 200a220 <_Scheduler_EDF_Unblock+0x60>
200a20c: 84 10 20 01 mov 1, %g2
200a210: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a214: 80 a0 60 00 cmp %g1, 0
200a218: 12 80 00 05 bne 200a22c <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN
200a21c: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a220: 03 00 80 7d sethi %hi(0x201f400), %g1
200a224: 82 10 62 30 or %g1, 0x230, %g1 ! 201f630 <_Per_CPU_Information>
200a228: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
200a22c: 81 c7 e0 08 ret
200a230: 81 e8 00 00 restore
020098cc <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
20098cc: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *executing;
executing = _Thread_Executing;
20098d0: 03 00 80 76 sethi %hi(0x201d800), %g1
20098d4: fa 00 63 00 ld [ %g1 + 0x300 ], %i5 ! 201db00 <_Per_CPU_Information+0x10>
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
20098d8: c2 0f 60 70 ldub [ %i5 + 0x70 ], %g1
20098dc: 80 a0 60 00 cmp %g1, 0
20098e0: 02 80 00 25 be 2009974 <_Scheduler_priority_Tick+0xa8>
20098e4: 01 00 00 00 nop
return;
if ( !_States_Is_ready( executing->current_state ) )
20098e8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
20098ec: 80 a0 60 00 cmp %g1, 0
20098f0: 12 80 00 21 bne 2009974 <_Scheduler_priority_Tick+0xa8>
20098f4: 01 00 00 00 nop
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
20098f8: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
20098fc: 80 a0 60 01 cmp %g1, 1
2009900: 0a 80 00 14 bcs 2009950 <_Scheduler_priority_Tick+0x84>
2009904: 80 a0 60 02 cmp %g1, 2
2009908: 28 80 00 07 bleu,a 2009924 <_Scheduler_priority_Tick+0x58>
200990c: c2 07 60 74 ld [ %i5 + 0x74 ], %g1
2009910: 80 a0 60 03 cmp %g1, 3
2009914: 12 80 00 18 bne 2009974 <_Scheduler_priority_Tick+0xa8> <== NEVER TAKEN
2009918: 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 )
200991c: 10 80 00 0f b 2009958 <_Scheduler_priority_Tick+0x8c>
2009920: 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 ) {
2009924: 82 00 7f ff add %g1, -1, %g1
2009928: 80 a0 60 00 cmp %g1, 0
200992c: 14 80 00 09 bg 2009950 <_Scheduler_priority_Tick+0x84>
2009930: 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();
2009934: 03 00 80 72 sethi %hi(0x201c800), %g1
2009938: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 201c9c0 <_Scheduler+0xc>
200993c: 9f c0 40 00 call %g1
2009940: 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;
2009944: 03 00 80 75 sethi %hi(0x201d400), %g1
2009948: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 201d530 <_Thread_Ticks_per_timeslice>
200994c: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
2009950: 81 c7 e0 08 ret
2009954: 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 )
2009958: 82 00 7f ff add %g1, -1, %g1
200995c: 80 a0 60 00 cmp %g1, 0
2009960: 12 bf ff fc bne 2009950 <_Scheduler_priority_Tick+0x84>
2009964: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
(*executing->budget_callout)( executing );
2009968: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
200996c: 9f c0 40 00 call %g1
2009970: 90 10 00 1d mov %i5, %o0
2009974: 81 c7 e0 08 ret
2009978: 81 e8 00 00 restore
02008490 <_TOD_Validate>:
};
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
2008490: 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 /
2008494: 03 00 80 72 sethi %hi(0x201c800), %g1
2008498: d2 00 61 fc ld [ %g1 + 0x1fc ], %o1 ! 201c9fc <Configuration+0xc>
200849c: 11 00 03 d0 sethi %hi(0xf4000), %o0
20084a0: 40 00 48 86 call 201a6b8 <.udiv>
20084a4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
20084a8: 80 a6 20 00 cmp %i0, 0
20084ac: 02 80 00 28 be 200854c <_TOD_Validate+0xbc> <== NEVER TAKEN
20084b0: 84 10 20 00 clr %g2
20084b4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
20084b8: 80 a0 40 08 cmp %g1, %o0
20084bc: 3a 80 00 25 bcc,a 2008550 <_TOD_Validate+0xc0>
20084c0: b0 08 a0 01 and %g2, 1, %i0
(the_tod->ticks >= ticks_per_second) ||
20084c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
20084c8: 80 a0 60 3b cmp %g1, 0x3b
20084cc: 38 80 00 21 bgu,a 2008550 <_TOD_Validate+0xc0>
20084d0: b0 08 a0 01 and %g2, 1, %i0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
20084d4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
20084d8: 80 a0 60 3b cmp %g1, 0x3b
20084dc: 38 80 00 1d bgu,a 2008550 <_TOD_Validate+0xc0>
20084e0: b0 08 a0 01 and %g2, 1, %i0
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
20084e4: c2 06 20 0c ld [ %i0 + 0xc ], %g1
20084e8: 80 a0 60 17 cmp %g1, 0x17
20084ec: 38 80 00 19 bgu,a 2008550 <_TOD_Validate+0xc0>
20084f0: b0 08 a0 01 and %g2, 1, %i0
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
20084f4: 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) ||
20084f8: 80 a0 60 00 cmp %g1, 0
20084fc: 02 80 00 14 be 200854c <_TOD_Validate+0xbc> <== NEVER TAKEN
2008500: 80 a0 60 0c cmp %g1, 0xc
(the_tod->month == 0) ||
2008504: 38 80 00 13 bgu,a 2008550 <_TOD_Validate+0xc0>
2008508: b0 08 a0 01 and %g2, 1, %i0
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
200850c: 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) ||
2008510: 80 a1 27 c3 cmp %g4, 0x7c3
2008514: 28 80 00 0f bleu,a 2008550 <_TOD_Validate+0xc0>
2008518: b0 08 a0 01 and %g2, 1, %i0
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
200851c: 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) ||
2008520: 80 a0 e0 00 cmp %g3, 0
2008524: 02 80 00 0a be 200854c <_TOD_Validate+0xbc> <== NEVER TAKEN
2008528: 80 89 20 03 btst 3, %g4
200852c: 05 00 80 76 sethi %hi(0x201d800), %g2
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
2008530: 12 80 00 03 bne 200853c <_TOD_Validate+0xac>
2008534: 84 10 a3 f0 or %g2, 0x3f0, %g2 ! 201dbf0 <_TOD_Days_per_month>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
2008538: 82 00 60 0d add %g1, 0xd, %g1
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
200853c: 83 28 60 02 sll %g1, 2, %g1
2008540: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( the_tod->day > days_in_month )
2008544: 80 a0 40 03 cmp %g1, %g3
2008548: 84 60 3f ff subx %g0, -1, %g2
return false;
return true;
}
200854c: b0 08 a0 01 and %g2, 1, %i0
2008550: 81 c7 e0 08 ret
2008554: 81 e8 00 00 restore
02009b88 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
2009b88: 9d e3 bf a0 save %sp, -96, %sp
2009b8c: ba 10 00 18 mov %i0, %i5
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
2009b90: 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 );
2009b94: 40 00 03 78 call 200a974 <_Thread_Set_transient>
2009b98: 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 )
2009b9c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2009ba0: 80 a0 40 19 cmp %g1, %i1
2009ba4: 02 80 00 04 be 2009bb4 <_Thread_Change_priority+0x2c>
2009ba8: 90 10 00 1d mov %i5, %o0
_Thread_Set_priority( the_thread, new_priority );
2009bac: 40 00 03 59 call 200a910 <_Thread_Set_priority>
2009bb0: 92 10 00 19 mov %i1, %o1
_ISR_Disable( level );
2009bb4: 7f ff e2 84 call 20025c4 <sparc_disable_interrupts>
2009bb8: 01 00 00 00 nop
2009bbc: 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;
2009bc0: f8 07 60 10 ld [ %i5 + 0x10 ], %i4
if ( state != STATES_TRANSIENT ) {
2009bc4: 80 a7 20 04 cmp %i4, 4
2009bc8: 02 80 00 10 be 2009c08 <_Thread_Change_priority+0x80>
2009bcc: 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 ) )
2009bd0: 80 a0 60 00 cmp %g1, 0
2009bd4: 12 80 00 03 bne 2009be0 <_Thread_Change_priority+0x58> <== NEVER TAKEN
2009bd8: 82 0f 3f fb and %i4, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2009bdc: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
_ISR_Enable( level );
2009be0: 7f ff e2 7d call 20025d4 <sparc_enable_interrupts>
2009be4: 90 10 00 1b mov %i3, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2009be8: 03 00 00 ef sethi %hi(0x3bc00), %g1
2009bec: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
2009bf0: 80 8f 00 01 btst %i4, %g1
2009bf4: 02 80 00 27 be 2009c90 <_Thread_Change_priority+0x108>
2009bf8: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
2009bfc: f0 07 60 44 ld [ %i5 + 0x44 ], %i0
2009c00: 40 00 03 17 call 200a85c <_Thread_queue_Requeue>
2009c04: 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 ) ) {
2009c08: 80 a0 60 00 cmp %g1, 0
2009c0c: 12 80 00 0b bne 2009c38 <_Thread_Change_priority+0xb0> <== NEVER TAKEN
2009c10: 03 00 80 72 sethi %hi(0x201c800), %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 );
2009c14: c0 27 60 10 clr [ %i5 + 0x10 ]
if ( prepend_it )
2009c18: 80 a6 a0 00 cmp %i2, 0
2009c1c: 02 80 00 04 be 2009c2c <_Thread_Change_priority+0xa4>
2009c20: 82 10 61 b4 or %g1, 0x1b4, %g1
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
2009c24: 10 80 00 03 b 2009c30 <_Thread_Change_priority+0xa8>
2009c28: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
2009c2c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
2009c30: 9f c0 40 00 call %g1
2009c34: 90 10 00 1d mov %i5, %o0
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
2009c38: 7f ff e2 67 call 20025d4 <sparc_enable_interrupts>
2009c3c: 90 10 00 1b mov %i3, %o0
2009c40: 7f ff e2 61 call 20025c4 <sparc_disable_interrupts>
2009c44: 01 00 00 00 nop
2009c48: 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();
2009c4c: 03 00 80 72 sethi %hi(0x201c800), %g1
2009c50: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 201c9bc <_Scheduler+0x8>
2009c54: 9f c0 40 00 call %g1
2009c58: 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 );
2009c5c: 03 00 80 76 sethi %hi(0x201d800), %g1
2009c60: 82 10 62 f0 or %g1, 0x2f0, %g1 ! 201daf0 <_Per_CPU_Information>
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
2009c64: c4 18 60 10 ldd [ %g1 + 0x10 ], %g2
2009c68: 80 a0 80 03 cmp %g2, %g3
2009c6c: 02 80 00 07 be 2009c88 <_Thread_Change_priority+0x100>
2009c70: 01 00 00 00 nop
2009c74: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
2009c78: 80 a0 a0 00 cmp %g2, 0
2009c7c: 02 80 00 03 be 2009c88 <_Thread_Change_priority+0x100>
2009c80: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
2009c84: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
_ISR_Enable( level );
2009c88: 7f ff e2 53 call 20025d4 <sparc_enable_interrupts>
2009c8c: 81 e8 00 00 restore
2009c90: 81 c7 e0 08 ret
2009c94: 81 e8 00 00 restore
02009e78 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
2009e78: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2009e7c: 90 10 00 18 mov %i0, %o0
2009e80: 40 00 00 80 call 200a080 <_Thread_Get>
2009e84: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2009e88: c2 07 bf fc ld [ %fp + -4 ], %g1
2009e8c: 80 a0 60 00 cmp %g1, 0
2009e90: 12 80 00 08 bne 2009eb0 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
2009e94: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
2009e98: 7f ff ff 80 call 2009c98 <_Thread_Clear_state>
2009e9c: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
2009ea0: 03 00 80 75 sethi %hi(0x201d400), %g1
2009ea4: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 201d5d0 <_Thread_Dispatch_disable_level>
--level;
2009ea8: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
2009eac: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ]
2009eb0: 81 c7 e0 08 ret
2009eb4: 81 e8 00 00 restore
02009eb8 <_Thread_Dispatch>:
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
2009eb8: 9d e3 bf 98 save %sp, -104, %sp
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
2009ebc: 35 00 80 76 sethi %hi(0x201d800), %i2
2009ec0: 82 16 a2 f0 or %i2, 0x2f0, %g1 ! 201daf0 <_Per_CPU_Information>
_ISR_Disable( level );
2009ec4: 7f ff e1 c0 call 20025c4 <sparc_disable_interrupts>
2009ec8: f6 00 60 10 ld [ %g1 + 0x10 ], %i3
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
2009ecc: 21 00 80 75 sethi %hi(0x201d400), %l0
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
2009ed0: 27 00 80 72 sethi %hi(0x201c800), %l3
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
2009ed4: 33 00 80 75 sethi %hi(0x201d400), %i1
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
2009ed8: 31 00 80 75 sethi %hi(0x201d400), %i0
2009edc: a0 14 21 20 or %l0, 0x120, %l0
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2009ee0: 23 00 80 75 sethi %hi(0x201d400), %l1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2009ee4: 25 00 80 72 sethi %hi(0x201c800), %l2
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
2009ee8: 10 80 00 4b b 200a014 <_Thread_Dispatch+0x15c>
2009eec: a6 14 e3 8c or %l3, 0x38c, %l3
2009ef0: 84 10 20 01 mov 1, %g2
2009ef4: c4 26 61 d0 st %g2, [ %i1 + 0x1d0 ]
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
2009ef8: c0 28 60 0c clrb [ %g1 + 0xc ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
2009efc: 80 a5 00 1b cmp %l4, %i3
2009f00: 12 80 00 0a bne 2009f28 <_Thread_Dispatch+0x70>
2009f04: e8 20 60 10 st %l4, [ %g1 + 0x10 ]
2009f08: 03 00 80 75 sethi %hi(0x201d400), %g1
2009f0c: c0 20 61 d0 clr [ %g1 + 0x1d0 ] ! 201d5d0 <_Thread_Dispatch_disable_level>
post_switch:
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 0 );
#endif
_ISR_Enable( level );
2009f10: 7f ff e1 b1 call 20025d4 <sparc_enable_interrupts>
2009f14: 39 00 80 75 sethi %hi(0x201d400), %i4
2009f18: 03 00 80 75 sethi %hi(0x201d400), %g1
2009f1c: fa 00 62 44 ld [ %g1 + 0x244 ], %i5 ! 201d644 <_API_extensions_Post_switch_list>
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
2009f20: 10 80 00 47 b 200a03c <_Thread_Dispatch+0x184>
2009f24: b8 17 22 48 or %i4, 0x248, %i4
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
2009f28: c2 05 20 78 ld [ %l4 + 0x78 ], %g1
2009f2c: 80 a0 60 01 cmp %g1, 1
2009f30: 12 80 00 03 bne 2009f3c <_Thread_Dispatch+0x84>
2009f34: c2 06 21 30 ld [ %i0 + 0x130 ], %g1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
2009f38: c2 25 20 74 st %g1, [ %l4 + 0x74 ]
_ISR_Enable( level );
2009f3c: 7f ff e1 a6 call 20025d4 <sparc_enable_interrupts>
2009f40: 01 00 00 00 nop
2009f44: 90 07 bf f8 add %fp, -8, %o0
2009f48: 7f ff f9 b9 call 200862c <_TOD_Get_with_nanoseconds>
2009f4c: 92 10 00 10 mov %l0, %o1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
2009f50: c4 1f bf f8 ldd [ %fp + -8 ], %g2
2009f54: 82 16 a2 f0 or %i2, 0x2f0, %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2009f58: f8 18 60 20 ldd [ %g1 + 0x20 ], %i4
2009f5c: 96 a0 c0 1d subcc %g3, %i5, %o3
2009f60: 94 60 80 1c subx %g2, %i4, %o2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2009f64: f8 1e e0 80 ldd [ %i3 + 0x80 ], %i4
2009f68: 9a 87 40 0b addcc %i5, %o3, %o5
2009f6c: 98 47 00 0a addx %i4, %o2, %o4
2009f70: d8 3e e0 80 std %o4, [ %i3 + 0x80 ]
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
2009f74: c4 38 60 20 std %g2, [ %g1 + 0x20 ]
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2009f78: c2 04 62 40 ld [ %l1 + 0x240 ], %g1
2009f7c: 80 a0 60 00 cmp %g1, 0
2009f80: 22 80 00 0c be,a 2009fb0 <_Thread_Dispatch+0xf8> <== NEVER TAKEN
2009f84: fa 04 a3 88 ld [ %l2 + 0x388 ], %i5 <== NOT EXECUTED
executing->libc_reent = *_Thread_libc_reent;
2009f88: c4 00 40 00 ld [ %g1 ], %g2
2009f8c: c4 26 e1 54 st %g2, [ %i3 + 0x154 ]
*_Thread_libc_reent = heir->libc_reent;
2009f90: c4 05 21 54 ld [ %l4 + 0x154 ], %g2
2009f94: c4 20 40 00 st %g2, [ %g1 ]
2009f98: 10 80 00 06 b 2009fb0 <_Thread_Dispatch+0xf8>
2009f9c: fa 04 a3 88 ld [ %l2 + 0x388 ], %i5
const User_extensions_Switch_control *extension =
(const User_extensions_Switch_control *) node;
(*extension->thread_switch)( executing, heir );
2009fa0: 90 10 00 1b mov %i3, %o0
2009fa4: 9f c0 40 00 call %g1
2009fa8: 92 10 00 14 mov %l4, %o1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next(
const Chain_Node *the_node
)
{
return the_node->next;
2009fac: fa 07 40 00 ld [ %i5 ], %i5
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
2009fb0: 80 a7 40 13 cmp %i5, %l3
2009fb4: 32 bf ff fb bne,a 2009fa0 <_Thread_Dispatch+0xe8>
2009fb8: c2 07 60 08 ld [ %i5 + 8 ], %g1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
2009fbc: 90 06 e0 c8 add %i3, 0xc8, %o0
2009fc0: 40 00 04 90 call 200b200 <_CPU_Context_switch>
2009fc4: 92 05 20 c8 add %l4, 0xc8, %o1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2009fc8: c2 06 e1 50 ld [ %i3 + 0x150 ], %g1
2009fcc: 80 a0 60 00 cmp %g1, 0
2009fd0: 02 80 00 0e be 200a008 <_Thread_Dispatch+0x150>
2009fd4: 03 00 80 75 sethi %hi(0x201d400), %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 );
2009fd8: d0 00 62 3c ld [ %g1 + 0x23c ], %o0 ! 201d63c <_Thread_Allocated_fp>
2009fdc: 80 a6 c0 08 cmp %i3, %o0
2009fe0: 02 80 00 0a be 200a008 <_Thread_Dispatch+0x150>
2009fe4: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
2009fe8: 02 80 00 04 be 2009ff8 <_Thread_Dispatch+0x140>
2009fec: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
2009ff0: 40 00 04 4a call 200b118 <_CPU_Context_save_fp>
2009ff4: 90 02 21 50 add %o0, 0x150, %o0
_Context_Restore_fp( &executing->fp_context );
2009ff8: 40 00 04 65 call 200b18c <_CPU_Context_restore_fp>
2009ffc: 90 06 e1 50 add %i3, 0x150, %o0
_Thread_Allocated_fp = executing;
200a000: 03 00 80 75 sethi %hi(0x201d400), %g1
200a004: f6 20 62 3c st %i3, [ %g1 + 0x23c ] ! 201d63c <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
200a008: 82 16 a2 f0 or %i2, 0x2f0, %g1
_ISR_Disable( level );
200a00c: 7f ff e1 6e call 20025c4 <sparc_disable_interrupts>
200a010: f6 00 60 10 ld [ %g1 + 0x10 ], %i3
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
200a014: 82 16 a2 f0 or %i2, 0x2f0, %g1
200a018: c4 08 60 0c ldub [ %g1 + 0xc ], %g2
200a01c: 80 a0 a0 00 cmp %g2, 0
200a020: 32 bf ff b4 bne,a 2009ef0 <_Thread_Dispatch+0x38>
200a024: e8 00 60 14 ld [ %g1 + 0x14 ], %l4
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
200a028: 10 bf ff b9 b 2009f0c <_Thread_Dispatch+0x54>
200a02c: 03 00 80 75 sethi %hi(0x201d400), %g1
const API_extensions_Post_switch_control *post_switch =
(const API_extensions_Post_switch_control *) node;
(*post_switch->hook)( executing );
200a030: 9f c0 40 00 call %g1
200a034: 90 10 00 1b mov %i3, %o0
200a038: fa 07 40 00 ld [ %i5 ], %i5
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
200a03c: 80 a7 40 1c cmp %i5, %i4
200a040: 32 bf ff fc bne,a 200a030 <_Thread_Dispatch+0x178>
200a044: c2 07 60 08 ld [ %i5 + 8 ], %g1
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
200a048: 81 c7 e0 08 ret
200a04c: 81 e8 00 00 restore
0200f410 <_Thread_Handler>:
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
200f410: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
200f414: 03 00 80 76 sethi %hi(0x201d800), %g1
200f418: fa 00 63 00 ld [ %g1 + 0x300 ], %i5 ! 201db00 <_Per_CPU_Information+0x10>
/*
* Some CPUs need to tinker with the call frame or registers when the
* thread actually begins to execute for the first time. This is a
* hook point where the port gets a shot at doing whatever it requires.
*/
_Context_Initialization_at_thread_begin();
200f41c: 3f 00 80 3d sethi %hi(0x200f400), %i7
200f420: be 17 e0 10 or %i7, 0x10, %i7 ! 200f410 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200f424: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0
_ISR_Set_level(level);
200f428: 7f ff cc 6b call 20025d4 <sparc_enable_interrupts>
200f42c: 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;
200f430: 03 00 80 74 sethi %hi(0x201d000), %g1
doneConstructors = true;
200f434: 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;
200f438: f8 08 62 d0 ldub [ %g1 + 0x2d0 ], %i4
doneConstructors = true;
200f43c: c4 28 62 d0 stb %g2, [ %g1 + 0x2d0 ]
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f440: c2 07 61 50 ld [ %i5 + 0x150 ], %g1
200f444: 80 a0 60 00 cmp %g1, 0
200f448: 02 80 00 0c be 200f478 <_Thread_Handler+0x68>
200f44c: 03 00 80 75 sethi %hi(0x201d400), %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 );
200f450: d0 00 62 3c ld [ %g1 + 0x23c ], %o0 ! 201d63c <_Thread_Allocated_fp>
200f454: 80 a7 40 08 cmp %i5, %o0
200f458: 02 80 00 08 be 200f478 <_Thread_Handler+0x68>
200f45c: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200f460: 22 80 00 06 be,a 200f478 <_Thread_Handler+0x68>
200f464: fa 20 62 3c st %i5, [ %g1 + 0x23c ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200f468: 7f ff ef 2c call 200b118 <_CPU_Context_save_fp>
200f46c: 90 02 21 50 add %o0, 0x150, %o0
_Thread_Allocated_fp = executing;
200f470: 03 00 80 75 sethi %hi(0x201d400), %g1
200f474: fa 20 62 3c st %i5, [ %g1 + 0x23c ] ! 201d63c <_Thread_Allocated_fp>
);
}
static inline void _User_extensions_Thread_begin( Thread_Control *executing )
{
_User_extensions_Iterate(
200f478: 90 10 00 1d mov %i5, %o0
200f47c: 13 00 80 2a sethi %hi(0x200a800), %o1
200f480: 7f ff ed d9 call 200abe4 <_User_extensions_Iterate>
200f484: 92 12 63 70 or %o1, 0x370, %o1 ! 200ab70 <_User_extensions_Thread_begin_visitor>
_User_extensions_Thread_begin( executing );
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200f488: 7f ff ea f2 call 200a050 <_Thread_Enable_dispatch>
200f48c: 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) */ {
200f490: 80 8f 20 ff btst 0xff, %i4
200f494: 32 80 00 05 bne,a 200f4a8 <_Thread_Handler+0x98>
200f498: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
INIT_NAME ();
200f49c: 40 00 35 11 call 201c8e0 <_init>
200f4a0: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f4a4: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
200f4a8: 80 a0 60 00 cmp %g1, 0
200f4ac: 12 80 00 05 bne 200f4c0 <_Thread_Handler+0xb0>
200f4b0: 80 a0 60 01 cmp %g1, 1
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
200f4b4: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
200f4b8: 10 80 00 06 b 200f4d0 <_Thread_Handler+0xc0>
200f4bc: 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 ) {
200f4c0: 12 80 00 08 bne 200f4e0 <_Thread_Handler+0xd0> <== NEVER TAKEN
200f4c4: 90 10 00 1d mov %i5, %o0
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
200f4c8: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
200f4cc: d0 07 60 94 ld [ %i5 + 0x94 ], %o0
200f4d0: 9f c0 40 00 call %g1
200f4d4: 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 =
200f4d8: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
}
}
static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
{
_User_extensions_Iterate(
200f4dc: 90 10 00 1d mov %i5, %o0
200f4e0: 13 00 80 2a sethi %hi(0x200a800), %o1
200f4e4: 7f ff ed c0 call 200abe4 <_User_extensions_Iterate>
200f4e8: 92 12 63 94 or %o1, 0x394, %o1 ! 200ab94 <_User_extensions_Thread_exitted_visitor>
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
_Internal_error_Occurred(
200f4ec: 90 10 20 00 clr %o0
200f4f0: 92 10 20 01 mov 1, %o1
200f4f4: 7f ff e5 82 call 2008afc <_Internal_error_Occurred>
200f4f8: 94 10 20 05 mov 5, %o2
0200a33c <_Thread_Handler_initialization>:
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
200a33c: 9d e3 bf 98 save %sp, -104, %sp
uint32_t ticks_per_timeslice =
200a340: 03 00 80 69 sethi %hi(0x201a400), %g1
200a344: 82 10 63 78 or %g1, 0x378, %g1 ! 201a778 <Configuration>
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200a348: c6 00 60 28 ld [ %g1 + 0x28 ], %g3
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
200a34c: fa 00 60 14 ld [ %g1 + 0x14 ], %i5
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
200a350: f8 00 60 08 ld [ %g1 + 8 ], %i4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200a354: 80 a0 e0 00 cmp %g3, 0
200a358: 02 80 00 06 be 200a370 <_Thread_Handler_initialization+0x34><== NEVER TAKEN
200a35c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
200a360: c6 00 60 2c ld [ %g1 + 0x2c ], %g3
200a364: 80 a0 e0 00 cmp %g3, 0
200a368: 12 80 00 06 bne 200a380 <_Thread_Handler_initialization+0x44>
200a36c: 80 a0 a0 00 cmp %g2, 0
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
200a370: 90 10 20 00 clr %o0
200a374: 92 10 20 01 mov 1, %o1
200a378: 7f ff f9 e1 call 2008afc <_Internal_error_Occurred>
200a37c: 94 10 20 0e mov 0xe, %o2
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
200a380: 22 80 00 05 be,a 200a394 <_Thread_Handler_initialization+0x58>
200a384: 03 00 80 76 sethi %hi(0x201d800), %g1
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
200a388: 9f c0 80 00 call %g2
200a38c: d0 00 60 04 ld [ %g1 + 4 ], %o0 ! 201d804 <_POSIX_Threads_Information+0x20>
_Thread_Dispatch_necessary = false;
200a390: 03 00 80 76 sethi %hi(0x201d800), %g1
200a394: 82 10 62 f0 or %g1, 0x2f0, %g1 ! 201daf0 <_Per_CPU_Information>
200a398: c0 28 60 0c clrb [ %g1 + 0xc ]
_Thread_Executing = NULL;
200a39c: c0 20 60 10 clr [ %g1 + 0x10 ]
_Thread_Heir = NULL;
200a3a0: c0 20 60 14 clr [ %g1 + 0x14 ]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
200a3a4: 03 00 80 75 sethi %hi(0x201d400), %g1
200a3a8: c0 20 62 3c clr [ %g1 + 0x23c ] ! 201d63c <_Thread_Allocated_fp>
#endif
_Thread_Maximum_extensions = maximum_extensions;
200a3ac: 03 00 80 75 sethi %hi(0x201d400), %g1
200a3b0: f8 20 62 50 st %i4, [ %g1 + 0x250 ] ! 201d650 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
200a3b4: 03 00 80 75 sethi %hi(0x201d400), %g1
200a3b8: fa 20 61 30 st %i5, [ %g1 + 0x130 ] ! 201d530 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
200a3bc: 82 10 20 08 mov 8, %g1
200a3c0: 11 00 80 75 sethi %hi(0x201d400), %o0
200a3c4: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
200a3c8: 90 12 22 c4 or %o0, 0x2c4, %o0
200a3cc: 92 10 20 01 mov 1, %o1
200a3d0: 94 10 20 01 mov 1, %o2
200a3d4: 96 10 20 01 mov 1, %o3
200a3d8: 98 10 21 68 mov 0x168, %o4
200a3dc: 7f ff fb 58 call 200913c <_Objects_Initialize_information>
200a3e0: 9a 10 20 00 clr %o5
200a3e4: 81 c7 e0 08 ret
200a3e8: 81 e8 00 00 restore
0200a130 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
200a130: 9d e3 bf 98 save %sp, -104, %sp
200a134: 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;
200a138: c0 26 61 58 clr [ %i1 + 0x158 ]
200a13c: c0 26 61 5c clr [ %i1 + 0x15c ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
200a140: 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
)
{
200a144: e0 07 a0 60 ld [ %fp + 0x60 ], %l0
200a148: 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 ) {
200a14c: 80 a6 a0 00 cmp %i2, 0
200a150: 12 80 00 0d bne 200a184 <_Thread_Initialize+0x54>
200a154: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
200a158: 90 10 00 19 mov %i1, %o0
200a15c: 40 00 02 15 call 200a9b0 <_Thread_Stack_Allocate>
200a160: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
200a164: 80 a2 00 1b cmp %o0, %i3
200a168: 0a 80 00 71 bcs 200a32c <_Thread_Initialize+0x1fc>
200a16c: 80 a2 20 00 cmp %o0, 0
200a170: 02 80 00 6f be 200a32c <_Thread_Initialize+0x1fc> <== NEVER TAKEN
200a174: 82 10 20 01 mov 1, %g1
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
200a178: f4 06 60 c0 ld [ %i1 + 0xc0 ], %i2
the_thread->Start.core_allocated_stack = true;
200a17c: 10 80 00 04 b 200a18c <_Thread_Initialize+0x5c>
200a180: c2 2e 60 b0 stb %g1, [ %i1 + 0xb0 ]
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
200a184: c0 2e 60 b0 clrb [ %i1 + 0xb0 ]
200a188: 90 10 00 1b mov %i3, %o0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
200a18c: f4 26 60 b8 st %i2, [ %i1 + 0xb8 ]
the_stack->size = size;
200a190: 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 ) {
200a194: 80 a7 20 00 cmp %i4, 0
200a198: 02 80 00 07 be 200a1b4 <_Thread_Initialize+0x84>
200a19c: b6 10 20 00 clr %i3
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
200a1a0: 40 00 03 c2 call 200b0a8 <_Workspace_Allocate>
200a1a4: 90 10 20 88 mov 0x88, %o0
if ( !fp_area )
200a1a8: b6 92 20 00 orcc %o0, 0, %i3
200a1ac: 22 80 00 51 be,a 200a2f0 <_Thread_Initialize+0x1c0>
200a1b0: b8 10 20 00 clr %i4
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a1b4: 03 00 80 75 sethi %hi(0x201d400), %g1
200a1b8: d0 00 62 50 ld [ %g1 + 0x250 ], %o0 ! 201d650 <_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;
200a1bc: f6 26 61 50 st %i3, [ %i1 + 0x150 ]
the_thread->Start.fp_context = fp_area;
200a1c0: f6 26 60 bc st %i3, [ %i1 + 0xbc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200a1c4: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
200a1c8: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
200a1cc: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
200a1d0: c0 26 60 6c clr [ %i1 + 0x6c ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a1d4: 80 a2 20 00 cmp %o0, 0
200a1d8: 02 80 00 08 be 200a1f8 <_Thread_Initialize+0xc8>
200a1dc: b8 10 20 00 clr %i4
extensions_area = _Workspace_Allocate(
200a1e0: 90 02 20 01 inc %o0
200a1e4: 40 00 03 b1 call 200b0a8 <_Workspace_Allocate>
200a1e8: 91 2a 20 02 sll %o0, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
200a1ec: b8 92 20 00 orcc %o0, 0, %i4
200a1f0: 02 80 00 41 be 200a2f4 <_Thread_Initialize+0x1c4>
200a1f4: 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 ) {
200a1f8: 80 a7 20 00 cmp %i4, 0
200a1fc: 12 80 00 0a bne 200a224 <_Thread_Initialize+0xf4>
200a200: 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;
200a204: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
200a208: e4 2e 60 9c stb %l2, [ %i1 + 0x9c ]
the_thread->Start.budget_algorithm = budget_algorithm;
200a20c: e0 26 60 a0 st %l0, [ %i1 + 0xa0 ]
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
200a210: 80 a4 20 02 cmp %l0, 2
200a214: 12 80 00 12 bne 200a25c <_Thread_Initialize+0x12c>
200a218: 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;
200a21c: 10 80 00 0e b 200a254 <_Thread_Initialize+0x124>
200a220: 03 00 80 75 sethi %hi(0x201d400), %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++ )
200a224: 03 00 80 75 sethi %hi(0x201d400), %g1
200a228: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 201d650 <_Thread_Maximum_extensions>
200a22c: 10 80 00 05 b 200a240 <_Thread_Initialize+0x110>
200a230: 82 10 20 00 clr %g1
the_thread->extensions[i] = NULL;
200a234: 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++ )
200a238: 82 00 60 01 inc %g1
the_thread->extensions[i] = NULL;
200a23c: 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++ )
200a240: 80 a0 40 02 cmp %g1, %g2
200a244: 28 bf ff fc bleu,a 200a234 <_Thread_Initialize+0x104>
200a248: 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;
200a24c: 10 bf ff ef b 200a208 <_Thread_Initialize+0xd8>
200a250: 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;
200a254: c2 00 61 30 ld [ %g1 + 0x130 ], %g1
200a258: c2 26 60 74 st %g1, [ %i1 + 0x74 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a25c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
the_thread->current_state = STATES_DORMANT;
200a260: a0 10 20 01 mov 1, %l0
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a264: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ]
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
200a268: 03 00 80 72 sethi %hi(0x201c800), %g1
200a26c: c2 00 61 cc ld [ %g1 + 0x1cc ], %g1 ! 201c9cc <_Scheduler+0x18>
the_thread->current_state = STATES_DORMANT;
200a270: e0 26 60 10 st %l0, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
200a274: c0 26 60 44 clr [ %i1 + 0x44 ]
the_thread->resource_count = 0;
200a278: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->real_priority = priority;
200a27c: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
200a280: fa 26 60 ac st %i5, [ %i1 + 0xac ]
200a284: 9f c0 40 00 call %g1
200a288: 90 10 00 19 mov %i1, %o0
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
200a28c: b4 92 20 00 orcc %o0, 0, %i2
200a290: 02 80 00 19 be 200a2f4 <_Thread_Initialize+0x1c4>
200a294: 90 10 00 19 mov %i1, %o0
goto failed;
_Thread_Set_priority( the_thread, priority );
200a298: 40 00 01 9e call 200a910 <_Thread_Set_priority>
200a29c: 92 10 00 1d mov %i5, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a2a0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
200a2a4: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
200a2a8: c0 26 60 80 clr [ %i1 + 0x80 ]
200a2ac: c0 26 60 84 clr [ %i1 + 0x84 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a2b0: 83 28 60 02 sll %g1, 2, %g1
200a2b4: f2 20 80 01 st %i1, [ %g2 + %g1 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200a2b8: e2 26 60 0c st %l1, [ %i1 + 0xc ]
* @{
*/
static inline bool _User_extensions_Thread_create( Thread_Control *created )
{
User_extensions_Thread_create_context ctx = { created, true };
200a2bc: f2 27 bf f8 st %i1, [ %fp + -8 ]
200a2c0: e0 2f bf fc stb %l0, [ %fp + -4 ]
_User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor );
200a2c4: 90 07 bf f8 add %fp, -8, %o0
200a2c8: 13 00 80 2a sethi %hi(0x200a800), %o1
200a2cc: 40 00 02 46 call 200abe4 <_User_extensions_Iterate>
200a2d0: 92 12 62 c0 or %o1, 0x2c0, %o1 ! 200aac0 <_User_extensions_Thread_create_visitor>
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
200a2d4: c2 0f bf fc ldub [ %fp + -4 ], %g1
200a2d8: 80 a0 60 00 cmp %g1, 0
200a2dc: 02 80 00 06 be 200a2f4 <_Thread_Initialize+0x1c4>
200a2e0: b0 10 20 01 mov 1, %i0
200a2e4: b0 0e 20 01 and %i0, 1, %i0
200a2e8: 81 c7 e0 08 ret
200a2ec: 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;
200a2f0: 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 );
200a2f4: 40 00 03 75 call 200b0c8 <_Workspace_Free>
200a2f8: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
200a2fc: 40 00 03 73 call 200b0c8 <_Workspace_Free>
200a300: d0 06 61 58 ld [ %i1 + 0x158 ], %o0
200a304: 40 00 03 71 call 200b0c8 <_Workspace_Free>
200a308: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
_Workspace_Free( extensions_area );
200a30c: 40 00 03 6f call 200b0c8 <_Workspace_Free>
200a310: 90 10 00 1c mov %i4, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
200a314: 40 00 03 6d call 200b0c8 <_Workspace_Free>
200a318: 90 10 00 1b mov %i3, %o0
#endif
_Workspace_Free( sched );
200a31c: 40 00 03 6b call 200b0c8 <_Workspace_Free>
200a320: 90 10 00 1a mov %i2, %o0
_Thread_Stack_Free( the_thread );
200a324: 40 00 01 b3 call 200a9f0 <_Thread_Stack_Free>
200a328: 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 */
200a32c: b0 10 20 00 clr %i0
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
200a330: b0 0e 20 01 and %i0, 1, %i0
200a334: 81 c7 e0 08 ret
200a338: 81 e8 00 00 restore
0200a9f0 <_Thread_Stack_Free>:
#include <rtems/config.h>
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
200a9f0: 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 )
200a9f4: c4 0e 20 b0 ldub [ %i0 + 0xb0 ], %g2
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
rtems_stack_free_hook stack_free_hook =
200a9f8: 03 00 80 69 sethi %hi(0x201a400), %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 )
200a9fc: 80 a0 a0 00 cmp %g2, 0
200aa00: 02 80 00 04 be 200aa10 <_Thread_Stack_Free+0x20> <== NEVER TAKEN
200aa04: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %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 );
200aa08: 9f c0 40 00 call %g1
200aa0c: d0 06 20 b8 ld [ %i0 + 0xb8 ], %o0
200aa10: 81 c7 e0 08 ret
200aa14: 81 e8 00 00 restore
0200a85c <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200a85c: 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 )
200a860: 80 a6 20 00 cmp %i0, 0
200a864: 02 80 00 19 be 200a8c8 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
200a868: 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 ) {
200a86c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
200a870: 80 a7 60 01 cmp %i5, 1
200a874: 12 80 00 15 bne 200a8c8 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
200a878: 01 00 00 00 nop
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
200a87c: 7f ff df 52 call 20025c4 <sparc_disable_interrupts>
200a880: 01 00 00 00 nop
200a884: b8 10 00 08 mov %o0, %i4
200a888: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200a88c: 03 00 00 ef sethi %hi(0x3bc00), %g1
200a890: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200a894: 80 88 80 01 btst %g2, %g1
200a898: 02 80 00 0a be 200a8c0 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN
200a89c: 90 10 00 18 mov %i0, %o0
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
200a8a0: 92 10 00 19 mov %i1, %o1
200a8a4: 94 10 20 01 mov 1, %o2
200a8a8: 40 00 0c 81 call 200daac <_Thread_queue_Extract_priority_helper>
200a8ac: fa 26 20 30 st %i5, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
200a8b0: 90 10 00 18 mov %i0, %o0
200a8b4: 92 10 00 19 mov %i1, %o1
200a8b8: 7f ff ff 50 call 200a5f8 <_Thread_queue_Enqueue_priority>
200a8bc: 94 07 bf fc add %fp, -4, %o2
}
_ISR_Enable( level );
200a8c0: 7f ff df 45 call 20025d4 <sparc_enable_interrupts>
200a8c4: 90 10 00 1c mov %i4, %o0
200a8c8: 81 c7 e0 08 ret
200a8cc: 81 e8 00 00 restore
0200a8d0 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200a8d0: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200a8d4: 90 10 00 18 mov %i0, %o0
200a8d8: 7f ff fd ea call 200a080 <_Thread_Get>
200a8dc: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a8e0: c2 07 bf fc ld [ %fp + -4 ], %g1
200a8e4: 80 a0 60 00 cmp %g1, 0
200a8e8: 12 80 00 08 bne 200a908 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
200a8ec: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200a8f0: 40 00 0c a6 call 200db88 <_Thread_queue_Process_timeout>
200a8f4: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
200a8f8: 03 00 80 75 sethi %hi(0x201d400), %g1
200a8fc: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 201d5d0 <_Thread_Dispatch_disable_level>
--level;
200a900: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
200a904: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ]
200a908: 81 c7 e0 08 ret
200a90c: 81 e8 00 00 restore
020189dc <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
20189dc: 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;
20189e0: 27 00 80 f2 sethi %hi(0x203c800), %l3
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
20189e4: a4 07 bf e8 add %fp, -24, %l2
20189e8: aa 07 bf ec add %fp, -20, %l5
20189ec: b8 07 bf f4 add %fp, -12, %i4
20189f0: b2 07 bf f8 add %fp, -8, %i1
20189f4: ea 27 bf e8 st %l5, [ %fp + -24 ]
head->previous = NULL;
20189f8: c0 27 bf ec clr [ %fp + -20 ]
tail->previous = head;
20189fc: 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;
2018a00: f2 27 bf f4 st %i1, [ %fp + -12 ]
head->previous = NULL;
2018a04: c0 27 bf f8 clr [ %fp + -8 ]
tail->previous = head;
2018a08: 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 );
2018a0c: 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();
2018a10: 29 00 80 f2 sethi %hi(0x203c800), %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 );
2018a14: 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 );
2018a18: 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 );
2018a1c: 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;
2018a20: 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;
2018a24: c2 04 e2 9c ld [ %l3 + 0x29c ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
2018a28: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2018a2c: 90 10 00 1a mov %i2, %o0
2018a30: 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;
2018a34: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2018a38: 40 00 11 ce call 201d170 <_Watchdog_Adjust_to_chain>
2018a3c: 94 10 00 1c mov %i4, %o2
2018a40: d0 1d 20 f8 ldd [ %l4 + 0xf8 ], %o0
2018a44: 94 10 20 00 clr %o2
2018a48: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2018a4c: 40 00 4f 4b call 202c778 <__divdi3>
2018a50: 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;
2018a54: 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 ) {
2018a58: 80 a2 40 0a cmp %o1, %o2
2018a5c: 08 80 00 07 bleu 2018a78 <_Timer_server_Body+0x9c>
2018a60: 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 );
2018a64: 92 22 40 0a sub %o1, %o2, %o1
2018a68: 90 10 00 1b mov %i3, %o0
2018a6c: 40 00 11 c1 call 201d170 <_Watchdog_Adjust_to_chain>
2018a70: 94 10 00 1c mov %i4, %o2
2018a74: 30 80 00 06 b,a 2018a8c <_Timer_server_Body+0xb0>
} else if ( snapshot < last_snapshot ) {
2018a78: 1a 80 00 05 bcc 2018a8c <_Timer_server_Body+0xb0>
2018a7c: 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 );
2018a80: 92 10 20 01 mov 1, %o1
2018a84: 40 00 11 93 call 201d0d0 <_Watchdog_Adjust>
2018a88: 94 22 80 1d sub %o2, %i5, %o2
}
watchdogs->last_snapshot = snapshot;
2018a8c: 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 );
2018a90: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
2018a94: 40 00 02 f4 call 2019664 <_Chain_Get>
2018a98: 01 00 00 00 nop
if ( timer == NULL ) {
2018a9c: 92 92 20 00 orcc %o0, 0, %o1
2018aa0: 02 80 00 0c be 2018ad0 <_Timer_server_Body+0xf4>
2018aa4: 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 ) {
2018aa8: c2 02 60 38 ld [ %o1 + 0x38 ], %g1
2018aac: 80 a0 60 01 cmp %g1, 1
2018ab0: 02 80 00 05 be 2018ac4 <_Timer_server_Body+0xe8>
2018ab4: 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 ) {
2018ab8: 80 a0 60 03 cmp %g1, 3
2018abc: 12 bf ff f5 bne 2018a90 <_Timer_server_Body+0xb4> <== NEVER TAKEN
2018ac0: 90 10 00 1b mov %i3, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2018ac4: 40 00 11 d5 call 201d218 <_Watchdog_Insert>
2018ac8: 92 02 60 10 add %o1, 0x10, %o1
2018acc: 30 bf ff f1 b,a 2018a90 <_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 );
2018ad0: 7f ff df 18 call 2010730 <sparc_disable_interrupts>
2018ad4: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
2018ad8: c2 07 bf e8 ld [ %fp + -24 ], %g1
2018adc: 80 a0 40 15 cmp %g1, %l5
2018ae0: 12 80 00 0a bne 2018b08 <_Timer_server_Body+0x12c> <== NEVER TAKEN
2018ae4: 01 00 00 00 nop
ts->insert_chain = NULL;
2018ae8: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
2018aec: 7f ff df 15 call 2010740 <sparc_enable_interrupts>
2018af0: 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 ) ) {
2018af4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2018af8: 80 a0 40 19 cmp %g1, %i1
2018afc: 12 80 00 06 bne 2018b14 <_Timer_server_Body+0x138>
2018b00: 01 00 00 00 nop
2018b04: 30 80 00 18 b,a 2018b64 <_Timer_server_Body+0x188>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
2018b08: 7f ff df 0e call 2010740 <sparc_enable_interrupts> <== NOT EXECUTED
2018b0c: 01 00 00 00 nop <== NOT EXECUTED
2018b10: 30 bf ff c5 b,a 2018a24 <_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 );
2018b14: 7f ff df 07 call 2010730 <sparc_disable_interrupts>
2018b18: 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;
2018b1c: 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))
2018b20: 80 a7 40 19 cmp %i5, %i1
2018b24: 02 80 00 0d be 2018b58 <_Timer_server_Body+0x17c>
2018b28: 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;
2018b2c: c2 07 40 00 ld [ %i5 ], %g1
head->next = new_first;
new_first->previous = head;
2018b30: 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;
2018b34: c2 27 bf f4 st %g1, [ %fp + -12 ]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
2018b38: c0 27 60 08 clr [ %i5 + 8 ]
_ISR_Enable( level );
2018b3c: 7f ff df 01 call 2010740 <sparc_enable_interrupts>
2018b40: 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 );
2018b44: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2018b48: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
2018b4c: 9f c0 40 00 call %g1
2018b50: d2 07 60 24 ld [ %i5 + 0x24 ], %o1
}
2018b54: 30 bf ff f0 b,a 2018b14 <_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 );
2018b58: 7f ff de fa call 2010740 <sparc_enable_interrupts>
2018b5c: 01 00 00 00 nop
2018b60: 30 bf ff b0 b,a 2018a20 <_Timer_server_Body+0x44>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
2018b64: c0 2e 20 7c clrb [ %i0 + 0x7c ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
2018b68: 03 00 80 f2 sethi %hi(0x203c800), %g1
2018b6c: c4 00 61 b0 ld [ %g1 + 0x1b0 ], %g2 ! 203c9b0 <_Thread_Dispatch_disable_level>
++level;
2018b70: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
2018b74: c4 20 61 b0 st %g2, [ %g1 + 0x1b0 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
2018b78: d0 06 00 00 ld [ %i0 ], %o0
2018b7c: 40 00 10 68 call 201cd1c <_Thread_Set_state>
2018b80: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
2018b84: 7f ff ff 6e call 201893c <_Timer_server_Reset_interval_system_watchdog>
2018b88: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
2018b8c: 7f ff ff 80 call 201898c <_Timer_server_Reset_tod_system_watchdog>
2018b90: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
2018b94: 40 00 0e 05 call 201c3a8 <_Thread_Enable_dispatch>
2018b98: 01 00 00 00 nop
ts->active = true;
2018b9c: 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 );
2018ba0: 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;
2018ba4: 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 );
2018ba8: 40 00 11 f4 call 201d378 <_Watchdog_Remove>
2018bac: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2018bb0: 40 00 11 f2 call 201d378 <_Watchdog_Remove>
2018bb4: 90 10 00 10 mov %l0, %o0
2018bb8: 30 bf ff 9a b,a 2018a20 <_Timer_server_Body+0x44>
02018bbc <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
2018bbc: 9d e3 bf a0 save %sp, -96, %sp
if ( ts->insert_chain == NULL ) {
2018bc0: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2018bc4: 80 a0 60 00 cmp %g1, 0
2018bc8: 12 80 00 51 bne 2018d0c <_Timer_server_Schedule_operation_method+0x150>
2018bcc: ba 10 00 19 mov %i1, %i5
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
2018bd0: 03 00 80 f2 sethi %hi(0x203c800), %g1
2018bd4: c4 00 61 b0 ld [ %g1 + 0x1b0 ], %g2 ! 203c9b0 <_Thread_Dispatch_disable_level>
++level;
2018bd8: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
2018bdc: c4 20 61 b0 st %g2, [ %g1 + 0x1b0 ]
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2018be0: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
2018be4: 80 a0 60 01 cmp %g1, 1
2018be8: 12 80 00 1f bne 2018c64 <_Timer_server_Schedule_operation_method+0xa8>
2018bec: 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 );
2018bf0: 7f ff de d0 call 2010730 <sparc_disable_interrupts>
2018bf4: 01 00 00 00 nop
snapshot = _Watchdog_Ticks_since_boot;
2018bf8: 03 00 80 f2 sethi %hi(0x203c800), %g1
2018bfc: c4 00 62 9c ld [ %g1 + 0x29c ], %g2 ! 203ca9c <_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;
2018c00: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
2018c04: 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 );
2018c08: 86 06 20 34 add %i0, 0x34, %g3
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
2018c0c: 80 a0 40 03 cmp %g1, %g3
2018c10: 02 80 00 08 be 2018c30 <_Timer_server_Schedule_operation_method+0x74>
2018c14: 88 20 80 04 sub %g2, %g4, %g4
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
2018c18: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
if (delta_interval > delta) {
2018c1c: 80 a7 00 04 cmp %i4, %g4
2018c20: 08 80 00 03 bleu 2018c2c <_Timer_server_Schedule_operation_method+0x70>
2018c24: 86 10 20 00 clr %g3
delta_interval -= delta;
2018c28: 86 27 00 04 sub %i4, %g4, %g3
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
2018c2c: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
2018c30: c4 26 20 3c st %g2, [ %i0 + 0x3c ]
_ISR_Enable( level );
2018c34: 7f ff de c3 call 2010740 <sparc_enable_interrupts>
2018c38: 01 00 00 00 nop
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2018c3c: 90 06 20 30 add %i0, 0x30, %o0
2018c40: 40 00 11 76 call 201d218 <_Watchdog_Insert>
2018c44: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2018c48: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2018c4c: 80 a0 60 00 cmp %g1, 0
2018c50: 12 80 00 2d bne 2018d04 <_Timer_server_Schedule_operation_method+0x148>
2018c54: 01 00 00 00 nop
_Timer_server_Reset_interval_system_watchdog( ts );
2018c58: 7f ff ff 39 call 201893c <_Timer_server_Reset_interval_system_watchdog>
2018c5c: 90 10 00 18 mov %i0, %o0
2018c60: 30 80 00 29 b,a 2018d04 <_Timer_server_Schedule_operation_method+0x148>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2018c64: 12 80 00 28 bne 2018d04 <_Timer_server_Schedule_operation_method+0x148>
2018c68: 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 );
2018c6c: 7f ff de b1 call 2010730 <sparc_disable_interrupts>
2018c70: 01 00 00 00 nop
2018c74: b8 10 00 08 mov %o0, %i4
2018c78: 03 00 80 f2 sethi %hi(0x203c800), %g1
2018c7c: d0 18 60 f8 ldd [ %g1 + 0xf8 ], %o0 ! 203c8f8 <_TOD>
2018c80: 94 10 20 00 clr %o2
2018c84: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2018c88: 40 00 4e bc call 202c778 <__divdi3>
2018c8c: 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;
2018c90: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
2018c94: 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 );
2018c98: 86 06 20 6c add %i0, 0x6c, %g3
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
2018c9c: 80 a0 40 03 cmp %g1, %g3
2018ca0: 02 80 00 0d be 2018cd4 <_Timer_server_Schedule_operation_method+0x118>
2018ca4: 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 ) {
2018ca8: 08 80 00 08 bleu 2018cc8 <_Timer_server_Schedule_operation_method+0x10c>
2018cac: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
2018cb0: 88 22 40 02 sub %o1, %g2, %g4
if (delta_interval > delta) {
2018cb4: 80 a0 c0 04 cmp %g3, %g4
2018cb8: 08 80 00 06 bleu 2018cd0 <_Timer_server_Schedule_operation_method+0x114><== NEVER TAKEN
2018cbc: 84 10 20 00 clr %g2
delta_interval -= delta;
2018cc0: 10 80 00 04 b 2018cd0 <_Timer_server_Schedule_operation_method+0x114>
2018cc4: 84 20 c0 04 sub %g3, %g4, %g2
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
2018cc8: 84 00 c0 02 add %g3, %g2, %g2
delta_interval += delta;
2018ccc: 84 20 80 09 sub %g2, %o1, %g2
}
first_watchdog->delta_interval = delta_interval;
2018cd0: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
}
ts->TOD_watchdogs.last_snapshot = snapshot;
2018cd4: d2 26 20 74 st %o1, [ %i0 + 0x74 ]
_ISR_Enable( level );
2018cd8: 7f ff de 9a call 2010740 <sparc_enable_interrupts>
2018cdc: 90 10 00 1c mov %i4, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2018ce0: 90 06 20 68 add %i0, 0x68, %o0
2018ce4: 40 00 11 4d call 201d218 <_Watchdog_Insert>
2018ce8: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2018cec: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2018cf0: 80 a0 60 00 cmp %g1, 0
2018cf4: 12 80 00 04 bne 2018d04 <_Timer_server_Schedule_operation_method+0x148>
2018cf8: 01 00 00 00 nop
_Timer_server_Reset_tod_system_watchdog( ts );
2018cfc: 7f ff ff 24 call 201898c <_Timer_server_Reset_tod_system_watchdog>
2018d00: 90 10 00 18 mov %i0, %o0
}
}
_Thread_Enable_dispatch();
2018d04: 40 00 0d a9 call 201c3a8 <_Thread_Enable_dispatch>
2018d08: 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 );
2018d0c: f0 06 20 78 ld [ %i0 + 0x78 ], %i0
2018d10: 40 00 02 49 call 2019634 <_Chain_Append>
2018d14: 81 e8 00 00 restore
0200c3b4 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
200c3b4: 9d e3 bf a0 save %sp, -96, %sp
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
200c3b8: d4 1e 40 00 ldd [ %i1 ], %o2
200c3bc: 80 92 80 0b orcc %o2, %o3, %g0
200c3c0: 32 80 00 06 bne,a 200c3d8 <_Timestamp64_Divide+0x24> <== ALWAYS TAKEN
200c3c4: d8 1e 00 00 ldd [ %i0 ], %o4
*_ival_percentage = 0;
200c3c8: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
*_fval_percentage = 0;
200c3cc: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
return;
200c3d0: 81 c7 e0 08 ret <== NOT EXECUTED
200c3d4: 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;
200c3d8: 83 2b 20 02 sll %o4, 2, %g1
200c3dc: 87 2b 60 02 sll %o5, 2, %g3
200c3e0: 89 33 60 1e srl %o5, 0x1e, %g4
200c3e4: bb 28 e0 05 sll %g3, 5, %i5
200c3e8: 84 11 00 01 or %g4, %g1, %g2
200c3ec: 83 30 e0 1b srl %g3, 0x1b, %g1
200c3f0: b9 28 a0 05 sll %g2, 5, %i4
200c3f4: 86 a7 40 03 subcc %i5, %g3, %g3
200c3f8: b8 10 40 1c or %g1, %i4, %i4
200c3fc: 84 67 00 02 subx %i4, %g2, %g2
200c400: b2 80 c0 0d addcc %g3, %o5, %i1
200c404: b0 40 80 0c addx %g2, %o4, %i0
200c408: 83 36 60 1e srl %i1, 0x1e, %g1
200c40c: 87 2e 60 02 sll %i1, 2, %g3
200c410: 85 2e 20 02 sll %i0, 2, %g2
200c414: 84 10 40 02 or %g1, %g2, %g2
200c418: ba 86 40 03 addcc %i1, %g3, %i5
200c41c: b8 46 00 02 addx %i0, %g2, %i4
200c420: 83 37 60 1e srl %i5, 0x1e, %g1
200c424: 87 2f 60 02 sll %i5, 2, %g3
200c428: 85 2f 20 02 sll %i4, 2, %g2
200c42c: 84 10 40 02 or %g1, %g2, %g2
200c430: 92 87 40 03 addcc %i5, %g3, %o1
200c434: 90 47 00 02 addx %i4, %g2, %o0
200c438: 87 32 60 1b srl %o1, 0x1b, %g3
200c43c: 85 2a 20 05 sll %o0, 5, %g2
200c440: 83 2a 60 05 sll %o1, 5, %g1
200c444: 90 10 c0 02 or %g3, %g2, %o0
200c448: 40 00 39 f4 call 201ac18 <__divdi3>
200c44c: 92 10 00 01 mov %g1, %o1
*_ival_percentage = answer / 1000;
200c450: 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;
200c454: b8 10 00 08 mov %o0, %i4
200c458: ba 10 00 09 mov %o1, %i5
*_ival_percentage = answer / 1000;
200c45c: 40 00 39 ef call 201ac18 <__divdi3>
200c460: 96 10 23 e8 mov 0x3e8, %o3
*_fval_percentage = answer % 1000;
200c464: 90 10 00 1c mov %i4, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
200c468: d2 26 80 00 st %o1, [ %i2 ]
*_fval_percentage = answer % 1000;
200c46c: 94 10 20 00 clr %o2
200c470: 92 10 00 1d mov %i5, %o1
200c474: 40 00 3a d4 call 201afc4 <__moddi3>
200c478: 96 10 23 e8 mov 0x3e8, %o3
200c47c: d2 26 c0 00 st %o1, [ %i3 ]
200c480: 81 c7 e0 08 ret
200c484: 81 e8 00 00 restore
0200aca4 <_User_extensions_Handler_initialization>:
}
}
void _User_extensions_Handler_initialization(void)
{
200aca4: 9d e3 bf 98 save %sp, -104, %sp
uint32_t number_of_initial_extensions =
200aca8: 03 00 80 69 sethi %hi(0x201a400), %g1
200acac: c2 00 63 b8 ld [ %g1 + 0x3b8 ], %g1 ! 201a7b8 <Configuration+0x40>
rtems_configuration_get_number_of_initial_extensions();
if ( number_of_initial_extensions > 0 ) {
200acb0: 80 a0 60 00 cmp %g1, 0
200acb4: 02 80 00 0a be 200acdc <_User_extensions_Handler_initialization+0x38><== NEVER TAKEN
200acb8: 91 28 60 02 sll %g1, 2, %o0
User_extensions_Switch_control *initial_extension_switch_controls =
_Workspace_Allocate_or_fatal_error(
number_of_initial_extensions
* sizeof( *initial_extension_switch_controls )
200acbc: 83 28 60 04 sll %g1, 4, %g1
{
uint32_t number_of_initial_extensions =
rtems_configuration_get_number_of_initial_extensions();
if ( number_of_initial_extensions > 0 ) {
User_extensions_Switch_control *initial_extension_switch_controls =
200acc0: 40 00 01 08 call 200b0e0 <_Workspace_Allocate_or_fatal_error>
200acc4: 90 20 40 08 sub %g1, %o0, %o0
number_of_initial_extensions
* sizeof( *initial_extension_switch_controls )
);
User_extensions_Switch_context ctx = { initial_extension_switch_controls };
_User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor );
200acc8: 13 00 80 2b sethi %hi(0x200ac00), %o1
User_extensions_Switch_control *initial_extension_switch_controls =
_Workspace_Allocate_or_fatal_error(
number_of_initial_extensions
* sizeof( *initial_extension_switch_controls )
);
User_extensions_Switch_context ctx = { initial_extension_switch_controls };
200accc: d0 27 bf fc st %o0, [ %fp + -4 ]
_User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor );
200acd0: 92 12 60 60 or %o1, 0x60, %o1
200acd4: 7f ff ff c4 call 200abe4 <_User_extensions_Iterate>
200acd8: 90 07 bf fc add %fp, -4, %o0
200acdc: 81 c7 e0 08 ret
200ace0: 81 e8 00 00 restore
0200c6ec <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200c6ec: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
200c6f0: 7f ff db 47 call 200340c <sparc_disable_interrupts>
200c6f4: 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;
200c6f8: 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 );
200c6fc: 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 ) ) {
200c700: 80 a0 40 1c cmp %g1, %i4
200c704: 02 80 00 20 be 200c784 <_Watchdog_Adjust+0x98>
200c708: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200c70c: 02 80 00 1b be 200c778 <_Watchdog_Adjust+0x8c>
200c710: b6 10 20 01 mov 1, %i3
200c714: 80 a6 60 01 cmp %i1, 1
200c718: 12 80 00 1b bne 200c784 <_Watchdog_Adjust+0x98> <== NEVER TAKEN
200c71c: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200c720: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200c724: 10 80 00 07 b 200c740 <_Watchdog_Adjust+0x54>
200c728: b4 00 80 1a add %g2, %i2, %i2
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
200c72c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200c730: 80 a6 80 02 cmp %i2, %g2
200c734: 3a 80 00 05 bcc,a 200c748 <_Watchdog_Adjust+0x5c>
200c738: f6 20 60 10 st %i3, [ %g1 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
200c73c: b4 20 80 1a sub %g2, %i2, %i2
break;
200c740: 10 80 00 11 b 200c784 <_Watchdog_Adjust+0x98>
200c744: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
} else {
units -= _Watchdog_First( header )->delta_interval;
200c748: b4 26 80 02 sub %i2, %g2, %i2
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
200c74c: 7f ff db 34 call 200341c <sparc_enable_interrupts>
200c750: 01 00 00 00 nop
_Watchdog_Tickle( header );
200c754: 40 00 00 90 call 200c994 <_Watchdog_Tickle>
200c758: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200c75c: 7f ff db 2c call 200340c <sparc_disable_interrupts>
200c760: 01 00 00 00 nop
if ( _Chain_Is_empty( header ) )
200c764: c2 06 00 00 ld [ %i0 ], %g1
200c768: 80 a0 40 1c cmp %g1, %i4
200c76c: 12 80 00 04 bne 200c77c <_Watchdog_Adjust+0x90>
200c770: 80 a6 a0 00 cmp %i2, 0
200c774: 30 80 00 04 b,a 200c784 <_Watchdog_Adjust+0x98>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200c778: 80 a6 a0 00 cmp %i2, 0
200c77c: 32 bf ff ec bne,a 200c72c <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN
200c780: c2 06 00 00 ld [ %i0 ], %g1
}
break;
}
}
_ISR_Enable( level );
200c784: 7f ff db 26 call 200341c <sparc_enable_interrupts>
200c788: 91 e8 00 08 restore %g0, %o0, %o0
0200ae44 <_Watchdog_Remove>:
#include <rtems/score/watchdog.h>
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
200ae44: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
200ae48: 7f ff dd df call 20025c4 <sparc_disable_interrupts>
200ae4c: ba 10 00 18 mov %i0, %i5
previous_state = the_watchdog->state;
200ae50: f0 06 20 08 ld [ %i0 + 8 ], %i0
switch ( previous_state ) {
200ae54: 80 a6 20 01 cmp %i0, 1
200ae58: 22 80 00 1e be,a 200aed0 <_Watchdog_Remove+0x8c>
200ae5c: c0 27 60 08 clr [ %i5 + 8 ]
200ae60: 0a 80 00 1d bcs 200aed4 <_Watchdog_Remove+0x90>
200ae64: 03 00 80 75 sethi %hi(0x201d400), %g1
200ae68: 80 a6 20 03 cmp %i0, 3
200ae6c: 18 80 00 1a bgu 200aed4 <_Watchdog_Remove+0x90> <== NEVER TAKEN
200ae70: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
200ae74: 10 80 00 02 b 200ae7c <_Watchdog_Remove+0x38>
200ae78: c2 07 40 00 ld [ %i5 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
200ae7c: c0 27 60 08 clr [ %i5 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
200ae80: c4 00 40 00 ld [ %g1 ], %g2
200ae84: 80 a0 a0 00 cmp %g2, 0
200ae88: 02 80 00 07 be 200aea4 <_Watchdog_Remove+0x60>
200ae8c: 05 00 80 75 sethi %hi(0x201d400), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
200ae90: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200ae94: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
200ae98: 84 00 c0 02 add %g3, %g2, %g2
200ae9c: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
200aea0: 05 00 80 75 sethi %hi(0x201d400), %g2
200aea4: c4 00 a2 b8 ld [ %g2 + 0x2b8 ], %g2 ! 201d6b8 <_Watchdog_Sync_count>
200aea8: 80 a0 a0 00 cmp %g2, 0
200aeac: 22 80 00 07 be,a 200aec8 <_Watchdog_Remove+0x84>
200aeb0: c4 07 60 04 ld [ %i5 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
200aeb4: 05 00 80 76 sethi %hi(0x201d800), %g2
200aeb8: c6 00 a2 f8 ld [ %g2 + 0x2f8 ], %g3 ! 201daf8 <_Per_CPU_Information+0x8>
200aebc: 05 00 80 75 sethi %hi(0x201d400), %g2
200aec0: c6 20 a2 58 st %g3, [ %g2 + 0x258 ] ! 201d658 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200aec4: c4 07 60 04 ld [ %i5 + 4 ], %g2
next->previous = previous;
200aec8: c4 20 60 04 st %g2, [ %g1 + 4 ]
previous->next = next;
200aecc: c2 20 80 00 st %g1, [ %g2 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200aed0: 03 00 80 75 sethi %hi(0x201d400), %g1
200aed4: c2 00 62 bc ld [ %g1 + 0x2bc ], %g1 ! 201d6bc <_Watchdog_Ticks_since_boot>
200aed8: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
_ISR_Enable( level );
200aedc: 7f ff dd be call 20025d4 <sparc_enable_interrupts>
200aee0: 01 00 00 00 nop
return( previous_state );
}
200aee4: 81 c7 e0 08 ret
200aee8: 81 e8 00 00 restore
0200c098 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
200c098: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
200c09c: 7f ff db b9 call 2002f80 <sparc_disable_interrupts>
200c0a0: b8 10 00 18 mov %i0, %i4
200c0a4: b0 10 00 08 mov %o0, %i0
printk( "Watchdog Chain: %s %p\n", name, header );
200c0a8: 11 00 80 75 sethi %hi(0x201d400), %o0
200c0ac: 94 10 00 19 mov %i1, %o2
200c0b0: 90 12 20 68 or %o0, 0x68, %o0
200c0b4: 7f ff e3 3c call 2004da4 <printk>
200c0b8: 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;
200c0bc: 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 );
200c0c0: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
200c0c4: 80 a7 40 19 cmp %i5, %i1
200c0c8: 12 80 00 04 bne 200c0d8 <_Watchdog_Report_chain+0x40>
200c0cc: 92 10 00 1d mov %i5, %o1
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
200c0d0: 10 80 00 0d b 200c104 <_Watchdog_Report_chain+0x6c>
200c0d4: 11 00 80 75 sethi %hi(0x201d400), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
200c0d8: 40 00 00 0f call 200c114 <_Watchdog_Report>
200c0dc: 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 )
200c0e0: 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 ) ;
200c0e4: 80 a7 40 19 cmp %i5, %i1
200c0e8: 12 bf ff fc bne 200c0d8 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN
200c0ec: 92 10 00 1d mov %i5, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
200c0f0: 11 00 80 75 sethi %hi(0x201d400), %o0
200c0f4: 92 10 00 1c mov %i4, %o1
200c0f8: 7f ff e3 2b call 2004da4 <printk>
200c0fc: 90 12 20 80 or %o0, 0x80, %o0
200c100: 30 80 00 03 b,a 200c10c <_Watchdog_Report_chain+0x74>
} else {
printk( "Chain is empty\n" );
200c104: 7f ff e3 28 call 2004da4 <printk>
200c108: 90 12 20 90 or %o0, 0x90, %o0
}
_ISR_Enable( level );
200c10c: 7f ff db a1 call 2002f90 <sparc_enable_interrupts>
200c110: 81 e8 00 00 restore
0200aeec <_Watchdog_Tickle>:
#include <rtems/score/watchdog.h>
void _Watchdog_Tickle(
Chain_Control *header
)
{
200aeec: 9d e3 bf a0 save %sp, -96, %sp
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
200aef0: 7f ff dd b5 call 20025c4 <sparc_disable_interrupts>
200aef4: b8 10 00 18 mov %i0, %i4
200aef8: b0 10 00 08 mov %o0, %i0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200aefc: fa 07 00 00 ld [ %i4 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200af00: b6 07 20 04 add %i4, 4, %i3
if ( _Chain_Is_empty( header ) )
200af04: 80 a7 40 1b cmp %i5, %i3
200af08: 02 80 00 1f be 200af84 <_Watchdog_Tickle+0x98>
200af0c: 01 00 00 00 nop
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
200af10: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200af14: 80 a0 60 00 cmp %g1, 0
200af18: 02 80 00 06 be 200af30 <_Watchdog_Tickle+0x44> <== NEVER TAKEN
200af1c: 82 00 7f ff add %g1, -1, %g1
the_watchdog->delta_interval--;
200af20: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
if ( the_watchdog->delta_interval != 0 )
200af24: 80 a0 60 00 cmp %g1, 0
200af28: 12 80 00 17 bne 200af84 <_Watchdog_Tickle+0x98>
200af2c: 01 00 00 00 nop
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
200af30: 7f ff ff c5 call 200ae44 <_Watchdog_Remove>
200af34: 90 10 00 1d mov %i5, %o0
200af38: b4 10 00 08 mov %o0, %i2
_ISR_Enable( level );
200af3c: 7f ff dd a6 call 20025d4 <sparc_enable_interrupts>
200af40: 90 10 00 18 mov %i0, %o0
switch( watchdog_state ) {
200af44: 80 a6 a0 02 cmp %i2, 2
200af48: 12 80 00 06 bne 200af60 <_Watchdog_Tickle+0x74>
200af4c: 01 00 00 00 nop
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
200af50: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200af54: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
200af58: 9f c0 40 00 call %g1
200af5c: d2 07 60 24 ld [ %i5 + 0x24 ], %o1
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
200af60: 7f ff dd 99 call 20025c4 <sparc_disable_interrupts>
200af64: 01 00 00 00 nop
200af68: b0 10 00 08 mov %o0, %i0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200af6c: fa 07 00 00 ld [ %i4 ], %i5
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
200af70: 80 a7 40 1b cmp %i5, %i3
200af74: 02 80 00 04 be 200af84 <_Watchdog_Tickle+0x98>
200af78: 01 00 00 00 nop
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
200af7c: 10 bf ff ea b 200af24 <_Watchdog_Tickle+0x38>
200af80: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
200af84: 7f ff dd 94 call 20025d4 <sparc_enable_interrupts>
200af88: 81 e8 00 00 restore
0200af8c <_Workspace_Handler_initialization>:
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
200af8c: 9d e3 bf a0 save %sp, -96, %sp
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
200af90: 05 00 80 69 sethi %hi(0x201a400), %g2
200af94: 82 10 a3 78 or %g2, 0x378, %g1 ! 201a778 <Configuration>
200af98: c6 08 60 32 ldub [ %g1 + 0x32 ], %g3
200af9c: fa 00 a3 78 ld [ %g2 + 0x378 ], %i5
200afa0: 80 a0 e0 00 cmp %g3, 0
200afa4: 12 80 00 03 bne 200afb0 <_Workspace_Handler_initialization+0x24>
200afa8: 84 10 20 00 clr %g2
200afac: c4 00 60 04 ld [ %g1 + 4 ], %g2
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
200afb0: 21 00 80 22 sethi %hi(0x2008800), %l0
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
200afb4: 27 00 80 75 sethi %hi(0x201d400), %l3
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
200afb8: ba 00 80 1d add %g2, %i5, %i5
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
200afbc: b6 10 20 00 clr %i3
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
200afc0: a0 14 20 b0 or %l0, 0xb0, %l0
size_t i;
for (i = 0; i < area_count; ++i) {
Heap_Area *area = &areas [i];
if ( do_zero ) {
200afc4: e2 08 60 30 ldub [ %g1 + 0x30 ], %l1
if ( area->size > overhead ) {
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
200afc8: e4 08 60 31 ldub [ %g1 + 0x31 ], %l2
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
200afcc: 10 80 00 2c b 200b07c <_Workspace_Handler_initialization+0xf0>
200afd0: a6 14 e1 e0 or %l3, 0x1e0, %l3
Heap_Area *area = &areas [i];
if ( do_zero ) {
200afd4: 22 80 00 07 be,a 200aff0 <_Workspace_Handler_initialization+0x64>
200afd8: f8 06 20 04 ld [ %i0 + 4 ], %i4
memset( area->begin, 0, area->size );
200afdc: d0 06 00 00 ld [ %i0 ], %o0
200afe0: d4 06 20 04 ld [ %i0 + 4 ], %o2
200afe4: 40 00 14 30 call 20100a4 <memset>
200afe8: 92 10 20 00 clr %o1
}
if ( area->size > overhead ) {
200afec: f8 06 20 04 ld [ %i0 + 4 ], %i4
200aff0: 80 a7 20 16 cmp %i4, 0x16
200aff4: 28 80 00 21 bleu,a 200b078 <_Workspace_Handler_initialization+0xec>
200aff8: b6 06 e0 01 inc %i3
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
200affc: 80 a4 a0 00 cmp %l2, 0
200b000: 32 80 00 0c bne,a 200b030 <_Workspace_Handler_initialization+0xa4>
200b004: d2 06 00 00 ld [ %i0 ], %o1
size = area->size;
} else {
if ( remaining > 0 ) {
200b008: 80 a7 60 00 cmp %i5, 0
200b00c: 22 80 00 08 be,a 200b02c <_Workspace_Handler_initialization+0xa0><== NEVER TAKEN
200b010: b8 10 20 00 clr %i4 <== NOT EXECUTED
size = remaining < area->size - overhead ?
200b014: 82 07 3f ea add %i4, -22, %g1
remaining + overhead : area->size;
200b018: 80 a7 40 01 cmp %i5, %g1
200b01c: 2a 80 00 04 bcs,a 200b02c <_Workspace_Handler_initialization+0xa0><== ALWAYS TAKEN
200b020: b8 07 60 16 add %i5, 0x16, %i4
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
200b024: 10 80 00 03 b 200b030 <_Workspace_Handler_initialization+0xa4><== NOT EXECUTED
200b028: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
200b02c: d2 06 00 00 ld [ %i0 ], %o1
200b030: 94 10 00 1c mov %i4, %o2
200b034: 90 10 00 13 mov %l3, %o0
200b038: 9f c4 00 00 call %l0
200b03c: 96 10 20 08 mov 8, %o3
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
200b040: c2 06 00 00 ld [ %i0 ], %g1
area->size -= size;
if ( space_available < remaining ) {
200b044: 80 a2 00 1d cmp %o0, %i5
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
200b048: 82 00 40 1c add %g1, %i4, %g1
200b04c: c2 26 00 00 st %g1, [ %i0 ]
area->size -= size;
200b050: c2 06 20 04 ld [ %i0 + 4 ], %g1
200b054: b8 20 40 1c sub %g1, %i4, %i4
if ( space_available < remaining ) {
200b058: 1a 80 00 05 bcc 200b06c <_Workspace_Handler_initialization+0xe0><== ALWAYS TAKEN
200b05c: f8 26 20 04 st %i4, [ %i0 + 4 ]
remaining -= space_available;
200b060: ba 27 40 08 sub %i5, %o0, %i5 <== NOT EXECUTED
} else {
remaining = 0;
}
init_or_extend = extend;
200b064: 10 80 00 04 b 200b074 <_Workspace_Handler_initialization+0xe8><== NOT EXECUTED
200b068: a0 10 00 1a mov %i2, %l0 <== NOT EXECUTED
200b06c: a0 10 00 1a mov %i2, %l0
area->size -= size;
if ( space_available < remaining ) {
remaining -= space_available;
} else {
remaining = 0;
200b070: ba 10 20 00 clr %i5
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
200b074: b6 06 e0 01 inc %i3
200b078: b0 06 20 08 add %i0, 8, %i0
200b07c: 80 a6 c0 19 cmp %i3, %i1
200b080: 12 bf ff d5 bne 200afd4 <_Workspace_Handler_initialization+0x48>
200b084: 80 a4 60 00 cmp %l1, 0
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
200b088: 80 a7 60 00 cmp %i5, 0
200b08c: 02 80 00 05 be 200b0a0 <_Workspace_Handler_initialization+0x114>
200b090: 90 10 20 00 clr %o0
_Internal_error_Occurred(
200b094: 92 10 20 01 mov 1, %o1
200b098: 7f ff f6 99 call 2008afc <_Internal_error_Occurred>
200b09c: 94 10 20 02 mov 2, %o2
200b0a0: 81 c7 e0 08 ret
200b0a4: 81 e8 00 00 restore
02007750 <aio_cancel>:
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
2007750: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
2007754: 3b 00 80 7e sethi %hi(0x201f800), %i5
2007758: 40 00 04 68 call 20088f8 <pthread_mutex_lock>
200775c: 90 17 61 bc or %i5, 0x1bc, %o0 ! 201f9bc <aio_request_queue>
if (fcntl (fildes, F_GETFD) < 0) {
2007760: 90 10 00 18 mov %i0, %o0
2007764: 40 00 1a d6 call 200e2bc <fcntl>
2007768: 92 10 20 01 mov 1, %o1
200776c: 80 a2 20 00 cmp %o0, 0
2007770: 16 80 00 08 bge 2007790 <aio_cancel+0x40>
2007774: 80 a6 60 00 cmp %i1, 0
pthread_mutex_unlock(&aio_request_queue.mutex);
2007778: 40 00 04 81 call 200897c <pthread_mutex_unlock>
200777c: 90 17 61 bc or %i5, 0x1bc, %o0
rtems_set_errno_and_return_minus_one (EBADF);
2007780: 40 00 28 84 call 2011990 <__errno>
2007784: 01 00 00 00 nop
2007788: 10 80 00 54 b 20078d8 <aio_cancel+0x188>
200778c: 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) {
2007790: 32 80 00 35 bne,a 2007864 <aio_cancel+0x114>
2007794: 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);
2007798: 11 00 80 7e sethi %hi(0x201f800), %o0
200779c: 92 10 00 18 mov %i0, %o1
20077a0: 90 12 22 04 or %o0, 0x204, %o0
20077a4: 40 00 01 71 call 2007d68 <rtems_aio_search_fd>
20077a8: 94 10 20 00 clr %o2
if (r_chain == NULL) {
20077ac: b8 92 20 00 orcc %o0, 0, %i4
20077b0: 12 80 00 20 bne 2007830 <aio_cancel+0xe0>
20077b4: 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;
20077b8: ba 17 61 bc or %i5, 0x1bc, %i5
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
20077bc: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
20077c0: 82 07 60 58 add %i5, 0x58, %g1
20077c4: 80 a0 80 01 cmp %g2, %g1
20077c8: 02 80 00 08 be 20077e8 <aio_cancel+0x98> <== NEVER TAKEN
20077cc: 92 10 00 18 mov %i0, %o1
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
20077d0: 90 07 60 54 add %i5, 0x54, %o0
20077d4: 40 00 01 65 call 2007d68 <rtems_aio_search_fd>
20077d8: 94 10 20 00 clr %o2
if (r_chain == NULL) {
20077dc: b8 92 20 00 orcc %o0, 0, %i4
20077e0: 12 80 00 08 bne 2007800 <aio_cancel+0xb0>
20077e4: 01 00 00 00 nop
pthread_mutex_unlock(&aio_request_queue.mutex);
20077e8: 11 00 80 7e sethi %hi(0x201f800), %o0
return AIO_ALLDONE;
20077ec: 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);
20077f0: 40 00 04 63 call 200897c <pthread_mutex_unlock>
20077f4: 90 12 21 bc or %o0, 0x1bc, %o0
return AIO_ALLDONE;
20077f8: 81 c7 e0 08 ret
20077fc: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2007800: 40 00 0a e1 call 200a384 <_Chain_Extract>
2007804: 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);
2007808: 40 00 01 80 call 2007e08 <rtems_aio_remove_fd>
200780c: 90 10 00 1c mov %i4, %o0
pthread_mutex_destroy (&r_chain->mutex);
2007810: 40 00 03 8d call 2008644 <pthread_mutex_destroy>
2007814: 90 10 00 1b mov %i3, %o0
pthread_cond_destroy (&r_chain->mutex);
2007818: 40 00 02 ae call 20082d0 <pthread_cond_destroy>
200781c: 90 10 00 1b mov %i3, %o0
free (r_chain);
2007820: 7f ff f0 c5 call 2003b34 <free>
2007824: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007828: 10 80 00 0b b 2007854 <aio_cancel+0x104>
200782c: 90 10 00 1d mov %i5, %o0
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
2007830: 40 00 04 32 call 20088f8 <pthread_mutex_lock>
2007834: 90 10 00 1b mov %i3, %o0
2007838: 40 00 0a d3 call 200a384 <_Chain_Extract>
200783c: 90 10 00 1c mov %i4, %o0
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
2007840: 40 00 01 72 call 2007e08 <rtems_aio_remove_fd>
2007844: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&r_chain->mutex);
2007848: 40 00 04 4d call 200897c <pthread_mutex_unlock>
200784c: 90 10 00 1b mov %i3, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007850: 90 17 61 bc or %i5, 0x1bc, %o0
2007854: 40 00 04 4a call 200897c <pthread_mutex_unlock>
2007858: b0 10 20 00 clr %i0
return AIO_CANCELED;
200785c: 81 c7 e0 08 ret
2007860: 81 e8 00 00 restore
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
2007864: 80 a7 00 18 cmp %i4, %i0
2007868: 12 80 00 17 bne 20078c4 <aio_cancel+0x174>
200786c: 90 17 61 bc or %i5, 0x1bc, %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);
2007870: 11 00 80 7e sethi %hi(0x201f800), %o0
2007874: 92 10 00 1c mov %i4, %o1
2007878: 90 12 22 04 or %o0, 0x204, %o0
200787c: 40 00 01 3b call 2007d68 <rtems_aio_search_fd>
2007880: 94 10 20 00 clr %o2
if (r_chain == NULL) {
2007884: b6 92 20 00 orcc %o0, 0, %i3
2007888: 32 80 00 1c bne,a 20078f8 <aio_cancel+0x1a8>
200788c: b8 06 e0 1c add %i3, 0x1c, %i4
2007890: ba 17 61 bc or %i5, 0x1bc, %i5
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
2007894: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
2007898: 82 07 60 58 add %i5, 0x58, %g1
200789c: 80 a0 80 01 cmp %g2, %g1
20078a0: 02 bf ff d2 be 20077e8 <aio_cancel+0x98> <== NEVER TAKEN
20078a4: 92 10 00 1c mov %i4, %o1
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
20078a8: 90 07 60 54 add %i5, 0x54, %o0
20078ac: 40 00 01 2f call 2007d68 <rtems_aio_search_fd>
20078b0: 94 10 20 00 clr %o2
if (r_chain == NULL) {
20078b4: 80 a2 20 00 cmp %o0, 0
20078b8: 12 80 00 0b bne 20078e4 <aio_cancel+0x194>
20078bc: 90 02 20 08 add %o0, 8, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
20078c0: 90 10 00 1d mov %i5, %o0
20078c4: 40 00 04 2e call 200897c <pthread_mutex_unlock>
20078c8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one (EINVAL);
20078cc: 40 00 28 31 call 2011990 <__errno>
20078d0: 01 00 00 00 nop
20078d4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
20078d8: c2 22 00 00 st %g1, [ %o0 ]
20078dc: 81 c7 e0 08 ret
20078e0: 91 e8 3f ff restore %g0, -1, %o0
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
20078e4: 40 00 01 5d call 2007e58 <rtems_aio_remove_req>
20078e8: 92 10 00 19 mov %i1, %o1
20078ec: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&aio_request_queue.mutex);
20078f0: 10 80 00 0b b 200791c <aio_cancel+0x1cc>
20078f4: 90 10 00 1d mov %i5, %o0
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
20078f8: 40 00 04 00 call 20088f8 <pthread_mutex_lock>
20078fc: 90 10 00 1c mov %i4, %o0
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
2007900: 92 10 00 19 mov %i1, %o1
2007904: 40 00 01 55 call 2007e58 <rtems_aio_remove_req>
2007908: 90 06 e0 08 add %i3, 8, %o0
200790c: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&r_chain->mutex);
2007910: 40 00 04 1b call 200897c <pthread_mutex_unlock>
2007914: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007918: 90 17 61 bc or %i5, 0x1bc, %o0
200791c: 40 00 04 18 call 200897c <pthread_mutex_unlock>
2007920: 01 00 00 00 nop
return result;
}
return AIO_ALLDONE;
}
2007924: 81 c7 e0 08 ret
2007928: 81 e8 00 00 restore
02007934 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
2007934: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
2007938: 03 00 00 08 sethi %hi(0x2000), %g1
200793c: 80 a6 00 01 cmp %i0, %g1
2007940: 12 80 00 10 bne 2007980 <aio_fsync+0x4c>
2007944: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
2007948: d0 06 40 00 ld [ %i1 ], %o0
200794c: 40 00 1a 5c call 200e2bc <fcntl>
2007950: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
2007954: 90 0a 20 03 and %o0, 3, %o0
2007958: 90 02 3f ff add %o0, -1, %o0
200795c: 80 a2 20 01 cmp %o0, 1
2007960: 18 80 00 08 bgu 2007980 <aio_fsync+0x4c>
2007964: ba 10 20 09 mov 9, %i5
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
2007968: 7f ff f1 93 call 2003fb4 <malloc>
200796c: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
2007970: b0 92 20 00 orcc %o0, 0, %i0
2007974: 32 80 00 09 bne,a 2007998 <aio_fsync+0x64> <== ALWAYS TAKEN
2007978: f2 26 20 14 st %i1, [ %i0 + 0x14 ]
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
200797c: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
2007980: 82 10 3f ff mov -1, %g1
2007984: fa 26 60 34 st %i5, [ %i1 + 0x34 ]
2007988: 40 00 28 02 call 2011990 <__errno>
200798c: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
2007990: 10 80 00 06 b 20079a8 <aio_fsync+0x74>
2007994: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
2007998: 82 10 20 03 mov 3, %g1
200799c: c2 26 60 30 st %g1, [ %i1 + 0x30 ]
return rtems_aio_enqueue (req);
20079a0: 40 00 01 4e call 2007ed8 <rtems_aio_enqueue>
20079a4: 81 e8 00 00 restore
}
20079a8: 81 c7 e0 08 ret
20079ac: 91 e8 3f ff restore %g0, -1, %o0
020080f0 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
20080f0: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
20080f4: d0 06 00 00 ld [ %i0 ], %o0
20080f8: 92 10 20 03 mov 3, %o1
20080fc: 40 00 18 70 call 200e2bc <fcntl>
2008100: ba 10 00 18 mov %i0, %i5
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
2008104: 80 8a 20 01 btst 1, %o0
2008108: 12 80 00 11 bne 200814c <aio_read+0x5c>
200810c: 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)
2008110: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2008114: 80 a0 60 00 cmp %g1, 0
2008118: 22 80 00 04 be,a 2008128 <aio_read+0x38>
200811c: 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);
2008120: 10 80 00 0b b 200814c <aio_read+0x5c>
2008124: 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)
2008128: 80 a0 60 00 cmp %g1, 0
200812c: 06 80 00 08 bl 200814c <aio_read+0x5c>
2008130: b8 10 20 16 mov 0x16, %i4
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
2008134: 7f ff ef a0 call 2003fb4 <malloc>
2008138: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
200813c: b0 92 20 00 orcc %o0, 0, %i0
2008140: 32 80 00 09 bne,a 2008164 <aio_read+0x74> <== ALWAYS TAKEN
2008144: fa 26 20 14 st %i5, [ %i0 + 0x14 ]
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2008148: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED
200814c: 82 10 3f ff mov -1, %g1
2008150: f8 27 60 34 st %i4, [ %i5 + 0x34 ]
2008154: 40 00 26 0f call 2011990 <__errno>
2008158: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
200815c: 10 80 00 06 b 2008174 <aio_read+0x84>
2008160: f8 22 00 00 st %i4, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
2008164: 82 10 20 01 mov 1, %g1
2008168: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
return rtems_aio_enqueue (req);
200816c: 7f ff ff 5b call 2007ed8 <rtems_aio_enqueue>
2008170: 81 e8 00 00 restore
}
2008174: 81 c7 e0 08 ret
2008178: 91 e8 3f ff restore %g0, -1, %o0
02008184 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
2008184: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
2008188: d0 06 00 00 ld [ %i0 ], %o0
200818c: 40 00 18 4c call 200e2bc <fcntl>
2008190: 92 10 20 03 mov 3, %o1
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
2008194: 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)))
2008198: 90 0a 20 03 and %o0, 3, %o0
200819c: 90 02 3f ff add %o0, -1, %o0
20081a0: 80 a2 20 01 cmp %o0, 1
20081a4: 18 80 00 11 bgu 20081e8 <aio_write+0x64>
20081a8: 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)
20081ac: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
20081b0: 80 a0 60 00 cmp %g1, 0
20081b4: 22 80 00 04 be,a 20081c4 <aio_write+0x40>
20081b8: 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);
20081bc: 10 80 00 0b b 20081e8 <aio_write+0x64>
20081c0: 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)
20081c4: 80 a0 60 00 cmp %g1, 0
20081c8: 06 80 00 08 bl 20081e8 <aio_write+0x64>
20081cc: b8 10 20 16 mov 0x16, %i4
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
20081d0: 7f ff ef 79 call 2003fb4 <malloc>
20081d4: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
20081d8: b0 92 20 00 orcc %o0, 0, %i0
20081dc: 32 80 00 09 bne,a 2008200 <aio_write+0x7c> <== ALWAYS TAKEN
20081e0: fa 26 20 14 st %i5, [ %i0 + 0x14 ]
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
20081e4: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED
20081e8: 82 10 3f ff mov -1, %g1
20081ec: f8 27 60 34 st %i4, [ %i5 + 0x34 ]
20081f0: 40 00 25 e8 call 2011990 <__errno>
20081f4: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
20081f8: 10 80 00 06 b 2008210 <aio_write+0x8c>
20081fc: f8 22 00 00 st %i4, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
2008200: 82 10 20 02 mov 2, %g1
2008204: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
return rtems_aio_enqueue (req);
2008208: 7f ff ff 34 call 2007ed8 <rtems_aio_enqueue>
200820c: 81 e8 00 00 restore
}
2008210: 81 c7 e0 08 ret
2008214: 91 e8 3f ff restore %g0, -1, %o0
0200736c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
200736c: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2007370: 80 a6 60 00 cmp %i1, 0
2007374: 02 80 00 26 be 200740c <clock_gettime+0xa0>
2007378: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
200737c: 12 80 00 16 bne 20073d4 <clock_gettime+0x68>
2007380: 80 a6 20 04 cmp %i0, 4
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
2007384: 90 07 bf f8 add %fp, -8, %o0
2007388: 13 00 80 82 sethi %hi(0x2020800), %o1
200738c: 40 00 08 2f call 2009448 <_TOD_Get_with_nanoseconds>
2007390: 92 12 62 88 or %o1, 0x288, %o1 ! 2020a88 <_TOD>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
2007394: f8 1a 00 00 ldd [ %o0 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007398: 94 10 20 00 clr %o2
200739c: 90 10 00 1c mov %i4, %o0
20073a0: 92 10 00 1d mov %i5, %o1
20073a4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20073a8: 40 00 53 1c call 201c018 <__divdi3>
20073ac: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20073b0: 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);
20073b4: d2 26 40 00 st %o1, [ %i1 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20073b8: 94 10 20 00 clr %o2
20073bc: 92 10 00 1d mov %i5, %o1
20073c0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20073c4: 40 00 54 00 call 201c3c4 <__moddi3>
20073c8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
20073cc: 10 80 00 06 b 20073e4 <clock_gettime+0x78>
20073d0: d2 26 60 04 st %o1, [ %i1 + 4 ]
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
20073d4: 12 80 00 06 bne 20073ec <clock_gettime+0x80> <== ALWAYS TAKEN
20073d8: 80 a6 20 02 cmp %i0, 2
_TOD_Get_uptime_as_timespec( tp );
20073dc: 40 00 08 2c call 200948c <_TOD_Get_uptime_as_timespec>
20073e0: 90 10 00 19 mov %i1, %o0
return 0;
20073e4: 81 c7 e0 08 ret
20073e8: 91 e8 20 00 restore %g0, 0, %o0
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
20073ec: 02 bf ff fc be 20073dc <clock_gettime+0x70>
20073f0: 80 a6 20 03 cmp %i0, 3
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
20073f4: 12 80 00 06 bne 200740c <clock_gettime+0xa0>
20073f8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
20073fc: 40 00 24 d8 call 201075c <__errno>
2007400: 01 00 00 00 nop
2007404: 10 80 00 05 b 2007418 <clock_gettime+0xac>
2007408: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
200740c: 40 00 24 d4 call 201075c <__errno>
2007410: 01 00 00 00 nop
2007414: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007418: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
200741c: 81 c7 e0 08 ret
2007420: 91 e8 3f ff restore %g0, -1, %o0
02025890 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
2025890: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2025894: 82 96 60 00 orcc %i1, 0, %g1
2025898: 02 80 00 4b be 20259c4 <clock_settime+0x134> <== NEVER TAKEN
202589c: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
20258a0: 12 80 00 41 bne 20259a4 <clock_settime+0x114>
20258a4: 80 a6 20 02 cmp %i0, 2
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
20258a8: c6 00 40 00 ld [ %g1 ], %g3
20258ac: 05 08 76 b9 sethi %hi(0x21dae400), %g2
20258b0: 84 10 a0 ff or %g2, 0xff, %g2 ! 21dae4ff <RAM_END+0x1f9ae4ff>
20258b4: 80 a0 c0 02 cmp %g3, %g2
20258b8: 08 80 00 43 bleu 20259c4 <clock_settime+0x134>
20258bc: 05 00 81 88 sethi %hi(0x2062000), %g2
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
20258c0: c6 00 a0 40 ld [ %g2 + 0x40 ], %g3 ! 2062040 <_Thread_Dispatch_disable_level>
++level;
20258c4: 86 00 e0 01 inc %g3
_Thread_Dispatch_disable_level = level;
20258c8: c6 20 a0 40 st %g3, [ %g2 + 0x40 ]
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
20258cc: c6 00 40 00 ld [ %g1 ], %g3
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
20258d0: 90 07 bf f8 add %fp, -8, %o0
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
20258d4: 85 38 e0 1f sra %g3, 0x1f, %g2
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
20258d8: 89 28 a0 03 sll %g2, 3, %g4
20258dc: bb 28 e0 03 sll %g3, 3, %i5
20258e0: b7 30 e0 1d srl %g3, 0x1d, %i3
20258e4: b8 16 c0 04 or %i3, %g4, %i4
20258e8: 89 37 60 1b srl %i5, 0x1b, %g4
20258ec: b5 2f 20 05 sll %i4, 5, %i2
20258f0: b7 2f 60 05 sll %i5, 5, %i3
20258f4: b4 11 00 1a or %g4, %i2, %i2
20258f8: ba a6 c0 1d subcc %i3, %i5, %i5
20258fc: 89 37 60 1a srl %i5, 0x1a, %g4
2025900: b8 66 80 1c subx %i2, %i4, %i4
2025904: b7 2f 60 06 sll %i5, 6, %i3
2025908: b5 2f 20 06 sll %i4, 6, %i2
202590c: b6 a6 c0 1d subcc %i3, %i5, %i3
2025910: b4 11 00 1a or %g4, %i2, %i2
2025914: b4 66 80 1c subx %i2, %i4, %i2
2025918: b2 86 c0 03 addcc %i3, %g3, %i1
202591c: b0 46 80 02 addx %i2, %g2, %i0
2025920: 89 36 60 1e srl %i1, 0x1e, %g4
2025924: 85 2e 20 02 sll %i0, 2, %g2
2025928: 84 11 00 02 or %g4, %g2, %g2
202592c: 87 2e 60 02 sll %i1, 2, %g3
2025930: ba 86 40 03 addcc %i1, %g3, %i5
2025934: b8 46 00 02 addx %i0, %g2, %i4
2025938: 89 37 60 1e srl %i5, 0x1e, %g4
202593c: 85 2f 20 02 sll %i4, 2, %g2
2025940: 84 11 00 02 or %g4, %g2, %g2
2025944: 87 2f 60 02 sll %i5, 2, %g3
2025948: b6 87 40 03 addcc %i5, %g3, %i3
202594c: b4 47 00 02 addx %i4, %g2, %i2
2025950: bb 2e e0 02 sll %i3, 2, %i5
2025954: 85 36 e0 1e srl %i3, 0x1e, %g2
2025958: 86 86 c0 1d addcc %i3, %i5, %g3
202595c: b9 2e a0 02 sll %i2, 2, %i4
2025960: b8 10 80 1c or %g2, %i4, %i4
2025964: 84 46 80 1c addx %i2, %i4, %g2
2025968: bb 28 a0 09 sll %g2, 9, %i5
202596c: b9 30 e0 17 srl %g3, 0x17, %i4
2025970: 84 17 00 1d or %i4, %i5, %g2
2025974: fa 00 60 04 ld [ %g1 + 4 ], %i5
2025978: 89 28 e0 09 sll %g3, 9, %g4
202597c: b6 81 00 1d addcc %g4, %i5, %i3
2025980: b9 3f 60 1f sra %i5, 0x1f, %i4
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
2025984: b0 10 20 00 clr %i0
2025988: b4 40 80 1c addx %g2, %i4, %i2
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
202598c: 40 00 04 3b call 2026a78 <_TOD_Set_with_timestamp>
2025990: f4 3f bf f8 std %i2, [ %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();
2025994: 7f ff 90 d0 call 2009cd4 <_Thread_Enable_dispatch>
2025998: 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;
202599c: 81 c7 e0 08 ret
20259a0: 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 )
20259a4: 02 80 00 04 be 20259b4 <clock_settime+0x124>
20259a8: 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 )
20259ac: 12 80 00 06 bne 20259c4 <clock_settime+0x134>
20259b0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
20259b4: 40 00 44 28 call 2036a54 <__errno>
20259b8: 01 00 00 00 nop
20259bc: 10 80 00 05 b 20259d0 <clock_settime+0x140>
20259c0: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
20259c4: 40 00 44 24 call 2036a54 <__errno>
20259c8: 01 00 00 00 nop
20259cc: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
20259d0: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
20259d4: 81 c7 e0 08 ret
20259d8: 91 e8 3f ff restore %g0, -1, %o0
02019f90 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
2019f90: 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() )
2019f94: 7f ff ff 68 call 2019d34 <getpid>
2019f98: 01 00 00 00 nop
2019f9c: 80 a6 00 08 cmp %i0, %o0
2019fa0: 02 80 00 06 be 2019fb8 <killinfo+0x28>
2019fa4: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
2019fa8: 7f ff d5 b1 call 200f66c <__errno>
2019fac: 01 00 00 00 nop
2019fb0: 10 80 00 a6 b 201a248 <killinfo+0x2b8>
2019fb4: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3>
/*
* Validate the signal passed.
*/
if ( !sig )
2019fb8: 32 80 00 03 bne,a 2019fc4 <killinfo+0x34>
2019fbc: ba 06 7f ff add %i1, -1, %i5
2019fc0: 30 80 00 04 b,a 2019fd0 <killinfo+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2019fc4: 80 a7 60 1f cmp %i5, 0x1f
2019fc8: 28 80 00 06 bleu,a 2019fe0 <killinfo+0x50>
2019fcc: 83 2e 60 02 sll %i1, 2, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
2019fd0: 7f ff d5 a7 call 200f66c <__errno>
2019fd4: 01 00 00 00 nop
2019fd8: 10 80 00 9c b 201a248 <killinfo+0x2b8>
2019fdc: 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 )
2019fe0: 85 2e 60 04 sll %i1, 4, %g2
2019fe4: 84 20 80 01 sub %g2, %g1, %g2
2019fe8: 03 00 80 76 sethi %hi(0x201d800), %g1
2019fec: 82 10 63 50 or %g1, 0x350, %g1 ! 201db50 <_POSIX_signals_Vectors>
2019ff0: 82 00 40 02 add %g1, %g2, %g1
2019ff4: c2 00 60 08 ld [ %g1 + 8 ], %g1
2019ff8: 80 a0 60 01 cmp %g1, 1
2019ffc: 02 80 00 9f be 201a278 <killinfo+0x2e8>
201a000: 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 ) )
201a004: 02 80 00 06 be 201a01c <killinfo+0x8c>
201a008: 80 a6 60 08 cmp %i1, 8
201a00c: 02 80 00 04 be 201a01c <killinfo+0x8c>
201a010: 80 a6 60 0b cmp %i1, 0xb
201a014: 12 80 00 08 bne 201a034 <killinfo+0xa4>
201a018: 82 10 20 01 mov 1, %g1
return pthread_kill( pthread_self(), sig );
201a01c: 40 00 01 33 call 201a4e8 <pthread_self>
201a020: 01 00 00 00 nop
201a024: 40 00 00 f4 call 201a3f4 <pthread_kill>
201a028: 92 10 00 19 mov %i1, %o1
201a02c: 81 c7 e0 08 ret
201a030: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
201a034: f2 27 bf f4 st %i1, [ %fp + -12 ]
siginfo->si_code = SI_USER;
201a038: c2 27 bf f8 st %g1, [ %fp + -8 ]
if ( !value ) {
201a03c: 80 a6 a0 00 cmp %i2, 0
201a040: 12 80 00 04 bne 201a050 <killinfo+0xc0>
201a044: bb 28 40 1d sll %g1, %i5, %i5
siginfo->si_value.sival_int = 0;
201a048: 10 80 00 04 b 201a058 <killinfo+0xc8>
201a04c: c0 27 bf fc clr [ %fp + -4 ]
} else {
siginfo->si_value = *value;
201a050: c2 06 80 00 ld [ %i2 ], %g1
201a054: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
201a058: 03 00 80 75 sethi %hi(0x201d400), %g1
201a05c: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 201d5d0 <_Thread_Dispatch_disable_level>
++level;
201a060: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
201a064: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ]
*/
void _POSIX_signals_Manager_Initialization(void);
static inline void _POSIX_signals_Add_post_switch_extension(void)
{
_API_extensions_Add_post_switch( &_POSIX_signals_Post_switch );
201a068: 11 00 80 72 sethi %hi(0x201c800), %o0
201a06c: 7f ff b7 f9 call 2008050 <_API_extensions_Add_post_switch>
201a070: 90 12 23 a4 or %o0, 0x3a4, %o0 ! 201cba4 <_POSIX_signals_Post_switch>
/*
* 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;
201a074: 03 00 80 76 sethi %hi(0x201d800), %g1
201a078: d0 00 63 00 ld [ %g1 + 0x300 ], %o0 ! 201db00 <_Per_CPU_Information+0x10>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
201a07c: c4 02 21 5c ld [ %o0 + 0x15c ], %g2
201a080: c4 00 a0 d0 ld [ %g2 + 0xd0 ], %g2
201a084: 80 af 40 02 andncc %i5, %g2, %g0
201a088: 12 80 00 52 bne 201a1d0 <killinfo+0x240>
201a08c: 03 00 80 77 sethi %hi(0x201dc00), %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 );
201a090: 05 00 80 77 sethi %hi(0x201dc00), %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
201a094: c2 00 60 dc ld [ %g1 + 0xdc ], %g1
201a098: 10 80 00 0a b 201a0c0 <killinfo+0x130>
201a09c: 84 10 a0 e0 or %g2, 0xe0, %g2
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
201a0a0: 80 8f 40 04 btst %i5, %g4
201a0a4: 12 80 00 4a bne 201a1cc <killinfo+0x23c>
201a0a8: 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)
201a0ac: c6 00 e0 d0 ld [ %g3 + 0xd0 ], %g3
201a0b0: 80 af 40 03 andncc %i5, %g3, %g0
201a0b4: 12 80 00 47 bne 201a1d0 <killinfo+0x240>
201a0b8: 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 ) {
201a0bc: 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 );
201a0c0: 80 a0 40 02 cmp %g1, %g2
201a0c4: 32 bf ff f7 bne,a 201a0a0 <killinfo+0x110>
201a0c8: c8 00 60 30 ld [ %g1 + 0x30 ], %g4
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201a0cc: 03 00 80 72 sethi %hi(0x201c800), %g1
201a0d0: c6 08 61 2c ldub [ %g1 + 0x12c ], %g3 ! 201c92c <rtems_maximum_priority>
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
201a0d4: b8 10 20 02 mov 2, %i4
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201a0d8: 86 00 e0 01 inc %g3
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
201a0dc: 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 ] )
201a0e0: 1b 00 80 75 sethi %hi(0x201d400), %o5
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
201a0e4: 35 04 00 00 sethi %hi(0x10000000), %i2
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
201a0e8: 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 ] )
201a0ec: 88 13 61 34 or %o5, 0x134, %g4
201a0f0: c4 01 00 02 ld [ %g4 + %g2 ], %g2
201a0f4: 80 a0 a0 00 cmp %g2, 0
201a0f8: 22 80 00 2f be,a 201a1b4 <killinfo+0x224> <== NEVER TAKEN
201a0fc: b8 07 20 01 inc %i4 <== NOT EXECUTED
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
201a100: 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++ ) {
201a104: b6 10 20 01 mov 1, %i3
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
201a108: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201a10c: 10 80 00 26 b 201a1a4 <killinfo+0x214>
201a110: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3
the_thread = (Thread_Control *) object_table[ index ];
201a114: c4 02 c0 02 ld [ %o3 + %g2 ], %g2
if ( !the_thread )
201a118: 80 a0 a0 00 cmp %g2, 0
201a11c: 22 80 00 22 be,a 201a1a4 <killinfo+0x214>
201a120: 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 )
201a124: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4
201a128: 80 a1 00 03 cmp %g4, %g3
201a12c: 38 80 00 1e bgu,a 201a1a4 <killinfo+0x214>
201a130: b6 06 e0 01 inc %i3
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
201a134: f0 00 a1 5c ld [ %g2 + 0x15c ], %i0
201a138: f0 06 20 d0 ld [ %i0 + 0xd0 ], %i0
201a13c: 80 af 40 18 andncc %i5, %i0, %g0
201a140: 22 80 00 19 be,a 201a1a4 <killinfo+0x214>
201a144: 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 ) {
201a148: 80 a1 00 03 cmp %g4, %g3
201a14c: 2a 80 00 14 bcs,a 201a19c <killinfo+0x20c>
201a150: 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 ) ) {
201a154: 80 a0 60 00 cmp %g1, 0
201a158: 22 80 00 13 be,a 201a1a4 <killinfo+0x214> <== NEVER TAKEN
201a15c: b6 06 e0 01 inc %i3 <== NOT EXECUTED
201a160: de 00 60 10 ld [ %g1 + 0x10 ], %o7
201a164: 80 a3 e0 00 cmp %o7, 0
201a168: 22 80 00 0f be,a 201a1a4 <killinfo+0x214> <== NEVER TAKEN
201a16c: b6 06 e0 01 inc %i3 <== NOT EXECUTED
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
201a170: f0 00 a0 10 ld [ %g2 + 0x10 ], %i0
201a174: 80 a6 20 00 cmp %i0, 0
201a178: 22 80 00 09 be,a 201a19c <killinfo+0x20c>
201a17c: 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) ) {
201a180: 80 8b c0 1a btst %o7, %i2
201a184: 32 80 00 08 bne,a 201a1a4 <killinfo+0x214>
201a188: b6 06 e0 01 inc %i3
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
201a18c: 80 8e 00 1a btst %i0, %i2
201a190: 22 80 00 05 be,a 201a1a4 <killinfo+0x214>
201a194: 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 ) ) {
201a198: 86 10 00 04 mov %g4, %g3
201a19c: 82 10 00 02 mov %g2, %g1
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201a1a0: b6 06 e0 01 inc %i3
201a1a4: 80 a6 c0 0c cmp %i3, %o4
201a1a8: 08 bf ff db bleu 201a114 <killinfo+0x184>
201a1ac: 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++) {
201a1b0: b8 07 20 01 inc %i4
201a1b4: 80 a7 20 04 cmp %i4, 4
201a1b8: 12 bf ff cd bne 201a0ec <killinfo+0x15c>
201a1bc: 85 2f 20 02 sll %i4, 2, %g2
}
}
}
}
if ( interested ) {
201a1c0: 80 a0 60 00 cmp %g1, 0
201a1c4: 02 80 00 0c be 201a1f4 <killinfo+0x264>
201a1c8: 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)
201a1cc: 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 ) ) {
201a1d0: 92 10 00 19 mov %i1, %o1
201a1d4: 40 00 00 36 call 201a2ac <_POSIX_signals_Unblock_thread>
201a1d8: 94 07 bf f4 add %fp, -12, %o2
201a1dc: 80 8a 20 ff btst 0xff, %o0
201a1e0: 02 80 00 05 be 201a1f4 <killinfo+0x264>
201a1e4: 01 00 00 00 nop
_Thread_Enable_dispatch();
201a1e8: 7f ff bf 9a call 200a050 <_Thread_Enable_dispatch>
201a1ec: b0 10 20 00 clr %i0 ! 0 <PROM_START>
201a1f0: 30 80 00 23 b,a 201a27c <killinfo+0x2ec>
/*
* 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 );
201a1f4: 40 00 00 24 call 201a284 <_POSIX_signals_Set_process_signals>
201a1f8: 90 10 00 1d mov %i5, %o0
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
201a1fc: 83 2e 60 02 sll %i1, 2, %g1
201a200: b3 2e 60 04 sll %i1, 4, %i1
201a204: b2 26 40 01 sub %i1, %g1, %i1
201a208: 03 00 80 76 sethi %hi(0x201d800), %g1
201a20c: 82 10 63 50 or %g1, 0x350, %g1 ! 201db50 <_POSIX_signals_Vectors>
201a210: c2 00 40 19 ld [ %g1 + %i1 ], %g1
201a214: 80 a0 60 02 cmp %g1, 2
201a218: 12 bf ff f4 bne 201a1e8 <killinfo+0x258>
201a21c: 11 00 80 77 sethi %hi(0x201dc00), %o0
psiginfo = (POSIX_signals_Siginfo_node *)
201a220: 7f ff b7 f1 call 20081e4 <_Chain_Get>
201a224: 90 12 20 d0 or %o0, 0xd0, %o0 ! 201dcd0 <_POSIX_signals_Inactive_siginfo>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
201a228: ba 92 20 00 orcc %o0, 0, %i5
201a22c: 12 80 00 0a bne 201a254 <killinfo+0x2c4>
201a230: 92 07 bf f4 add %fp, -12, %o1
_Thread_Enable_dispatch();
201a234: 7f ff bf 87 call 200a050 <_Thread_Enable_dispatch>
201a238: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EAGAIN );
201a23c: 7f ff d5 0c call 200f66c <__errno>
201a240: 01 00 00 00 nop
201a244: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
201a248: c2 22 00 00 st %g1, [ %o0 ]
201a24c: 81 c7 e0 08 ret
201a250: 91 e8 3f ff restore %g0, -1, %o0
}
psiginfo->Info = *siginfo;
201a254: 90 07 60 08 add %i5, 8, %o0
201a258: 7f ff d7 56 call 200ffb0 <memcpy>
201a25c: 94 10 20 0c mov 0xc, %o2
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201a260: 11 00 80 77 sethi %hi(0x201dc00), %o0
201a264: 92 10 00 1d mov %i5, %o1
201a268: 90 12 21 48 or %o0, 0x148, %o0
201a26c: 7f ff b7 d2 call 20081b4 <_Chain_Append>
201a270: 90 02 00 19 add %o0, %i1, %o0
201a274: 30 bf ff dd b,a 201a1e8 <killinfo+0x258>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
201a278: b0 10 20 00 clr %i0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
201a27c: 81 c7 e0 08 ret
201a280: 81 e8 00 00 restore
0200c1e8 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
200c1e8: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
200c1ec: 80 a0 60 00 cmp %g1, 0
200c1f0: 02 80 00 0f be 200c22c <pthread_attr_setschedpolicy+0x44>
200c1f4: 90 10 20 16 mov 0x16, %o0
200c1f8: c4 00 40 00 ld [ %g1 ], %g2
200c1fc: 80 a0 a0 00 cmp %g2, 0
200c200: 02 80 00 0b be 200c22c <pthread_attr_setschedpolicy+0x44>
200c204: 80 a2 60 04 cmp %o1, 4
return EINVAL;
switch ( policy ) {
200c208: 38 80 00 09 bgu,a 200c22c <pthread_attr_setschedpolicy+0x44>
200c20c: 90 10 20 86 mov 0x86, %o0
200c210: 84 10 20 01 mov 1, %g2
200c214: 85 28 80 09 sll %g2, %o1, %g2
200c218: 80 88 a0 17 btst 0x17, %g2
200c21c: 22 80 00 04 be,a 200c22c <pthread_attr_setschedpolicy+0x44><== NEVER TAKEN
200c220: 90 10 20 86 mov 0x86, %o0 <== NOT EXECUTED
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
200c224: d2 20 60 14 st %o1, [ %g1 + 0x14 ]
200c228: 90 10 20 00 clr %o0
return 0;
default:
return ENOTSUP;
}
}
200c22c: 81 c3 e0 08 retl
02007940 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
2007940: 9d e3 bf 90 save %sp, -112, %sp
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
2007944: 80 a6 20 00 cmp %i0, 0
2007948: 12 80 00 04 bne 2007958 <pthread_barrier_init+0x18>
200794c: 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;
2007950: 81 c7 e0 08 ret
2007954: 91 e8 20 16 restore %g0, 0x16, %o0
* Error check parameters
*/
if ( !barrier )
return EINVAL;
if ( count == 0 )
2007958: 22 80 00 1e be,a 20079d0 <pthread_barrier_init+0x90>
200795c: b0 10 20 16 mov 0x16, %i0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2007960: 80 a6 60 00 cmp %i1, 0
2007964: 32 80 00 06 bne,a 200797c <pthread_barrier_init+0x3c>
2007968: c2 06 40 00 ld [ %i1 ], %g1
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
200796c: 90 07 bf f8 add %fp, -8, %o0
2007970: 7f ff ff bc call 2007860 <pthread_barrierattr_init>
2007974: 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 )
2007978: c2 06 40 00 ld [ %i1 ], %g1
200797c: 80 a0 60 00 cmp %g1, 0
2007980: 22 80 00 14 be,a 20079d0 <pthread_barrier_init+0x90>
2007984: b0 10 20 16 mov 0x16, %i0
return EINVAL;
switch ( the_attr->process_shared ) {
2007988: c2 06 60 04 ld [ %i1 + 4 ], %g1
200798c: 80 a0 60 00 cmp %g1, 0
2007990: 32 80 00 10 bne,a 20079d0 <pthread_barrier_init+0x90> <== NEVER TAKEN
2007994: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
2007998: 03 00 80 7a sethi %hi(0x201e800), %g1
200799c: c4 00 63 e0 ld [ %g1 + 0x3e0 ], %g2 ! 201ebe0 <_Thread_Dispatch_disable_level>
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
20079a0: c0 27 bf f0 clr [ %fp + -16 ]
the_attributes.maximum_count = count;
20079a4: f4 27 bf f4 st %i2, [ %fp + -12 ]
++level;
20079a8: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
20079ac: c4 20 63 e0 st %g2, [ %g1 + 0x3e0 ]
* 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 *)
20079b0: 39 00 80 7b sethi %hi(0x201ec00), %i4
20079b4: 40 00 08 7a call 2009b9c <_Objects_Allocate>
20079b8: 90 17 23 74 or %i4, 0x374, %o0 ! 201ef74 <_POSIX_Barrier_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
20079bc: ba 92 20 00 orcc %o0, 0, %i5
20079c0: 12 80 00 06 bne 20079d8 <pthread_barrier_init+0x98>
20079c4: 90 07 60 10 add %i5, 0x10, %o0
_Thread_Enable_dispatch();
20079c8: 40 00 0d 73 call 200af94 <_Thread_Enable_dispatch>
20079cc: b0 10 20 0b mov 0xb, %i0
20079d0: 81 c7 e0 08 ret
20079d4: 81 e8 00 00 restore
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
20079d8: 40 00 05 ee call 2009190 <_CORE_barrier_Initialize>
20079dc: 92 07 bf f0 add %fp, -16, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20079e0: c4 17 60 0a lduh [ %i5 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20079e4: b8 17 23 74 or %i4, 0x374, %i4
20079e8: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20079ec: c2 07 60 08 ld [ %i5 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20079f0: 85 28 a0 02 sll %g2, 2, %g2
20079f4: 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;
20079f8: c0 27 60 0c clr [ %i5 + 0xc ]
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
20079fc: c2 26 00 00 st %g1, [ %i0 ]
_Thread_Enable_dispatch();
2007a00: 40 00 0d 65 call 200af94 <_Thread_Enable_dispatch>
2007a04: b0 10 20 00 clr %i0
2007a08: 81 c7 e0 08 ret
2007a0c: 81 e8 00 00 restore
02007230 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
2007230: 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 )
2007234: 80 a6 20 00 cmp %i0, 0
2007238: 02 80 00 12 be 2007280 <pthread_cleanup_push+0x50>
200723c: 03 00 80 79 sethi %hi(0x201e400), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
2007240: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 201e420 <_Thread_Dispatch_disable_level>
++level;
2007244: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
2007248: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
200724c: 40 00 11 f8 call 200ba2c <_Workspace_Allocate>
2007250: 90 10 20 10 mov 0x10, %o0
if ( handler ) {
2007254: 92 92 20 00 orcc %o0, 0, %o1
2007258: 02 80 00 08 be 2007278 <pthread_cleanup_push+0x48> <== NEVER TAKEN
200725c: 03 00 80 7a sethi %hi(0x201e800), %g1
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2007260: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 201e950 <_Per_CPU_Information+0x10>
handler_stack = &thread_support->Cancellation_Handlers;
2007264: d0 00 61 5c ld [ %g1 + 0x15c ], %o0
handler->routine = routine;
2007268: f0 22 60 08 st %i0, [ %o1 + 8 ]
handler->arg = arg;
200726c: f2 22 60 0c st %i1, [ %o1 + 0xc ]
_Chain_Append( handler_stack, &handler->Node );
2007270: 40 00 06 30 call 2008b30 <_Chain_Append>
2007274: 90 02 20 e4 add %o0, 0xe4, %o0
}
_Thread_Enable_dispatch();
2007278: 40 00 0d ab call 200a924 <_Thread_Enable_dispatch>
200727c: 81 e8 00 00 restore
2007280: 81 c7 e0 08 ret
2007284: 81 e8 00 00 restore
02008210 <pthread_cond_init>:
*/
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
2008210: 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;
2008214: 80 a6 60 00 cmp %i1, 0
2008218: 32 80 00 05 bne,a 200822c <pthread_cond_init+0x1c>
200821c: c4 06 60 04 ld [ %i1 + 4 ], %g2
else the_attr = &_POSIX_Condition_variables_Default_attributes;
2008220: 33 00 80 77 sethi %hi(0x201dc00), %i1
2008224: b2 16 60 cc or %i1, 0xcc, %i1 ! 201dccc <_POSIX_Condition_variables_Default_attributes>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
2008228: c4 06 60 04 ld [ %i1 + 4 ], %g2
200822c: 80 a0 a0 01 cmp %g2, 1
2008230: 02 80 00 25 be 20082c4 <pthread_cond_init+0xb4> <== NEVER TAKEN
2008234: 82 10 20 16 mov 0x16, %g1
return EINVAL;
if ( !the_attr->is_initialized )
2008238: c4 06 40 00 ld [ %i1 ], %g2
200823c: 80 a0 a0 00 cmp %g2, 0
2008240: 02 80 00 21 be 20082c4 <pthread_cond_init+0xb4>
2008244: 01 00 00 00 nop
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
2008248: 03 00 80 7f sethi %hi(0x201fc00), %g1
200824c: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 201fe50 <_Thread_Dispatch_disable_level>
++level;
2008250: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
2008254: c4 20 62 50 st %g2, [ %g1 + 0x250 ]
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
2008258: 39 00 80 80 sethi %hi(0x2020000), %i4
200825c: 40 00 0a 23 call 200aae8 <_Objects_Allocate>
2008260: 90 17 22 7c or %i4, 0x27c, %o0 ! 202027c <_POSIX_Condition_variables_Information>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
2008264: ba 92 20 00 orcc %o0, 0, %i5
2008268: 32 80 00 06 bne,a 2008280 <pthread_cond_init+0x70>
200826c: c2 06 60 04 ld [ %i1 + 4 ], %g1
_Thread_Enable_dispatch();
2008270: 40 00 0f 1c call 200bee0 <_Thread_Enable_dispatch>
2008274: 01 00 00 00 nop
return ENOMEM;
2008278: 10 80 00 13 b 20082c4 <pthread_cond_init+0xb4>
200827c: 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(
2008280: 90 07 60 18 add %i5, 0x18, %o0
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
2008284: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
2008288: 92 10 20 00 clr %o1
200828c: 15 04 00 02 sethi %hi(0x10000800), %o2
2008290: 96 10 20 74 mov 0x74, %o3
2008294: 40 00 11 19 call 200c6f8 <_Thread_queue_Initialize>
2008298: c0 27 60 14 clr [ %i5 + 0x14 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
200829c: c4 17 60 0a lduh [ %i5 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20082a0: b8 17 22 7c or %i4, 0x27c, %i4
20082a4: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20082a8: c2 07 60 08 ld [ %i5 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20082ac: 85 28 a0 02 sll %g2, 2, %g2
20082b0: 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;
20082b4: c0 27 60 0c clr [ %i5 + 0xc ]
0
);
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
20082b8: 40 00 0f 0a call 200bee0 <_Thread_Enable_dispatch>
20082bc: c2 26 00 00 st %g1, [ %i0 ]
return 0;
20082c0: 82 10 20 00 clr %g1
}
20082c4: 81 c7 e0 08 ret
20082c8: 91 e8 00 01 restore %g0, %g1, %o0
02008070 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
2008070: 82 10 00 08 mov %o0, %g1
if ( !attr || attr->is_initialized == false )
2008074: 80 a0 60 00 cmp %g1, 0
2008078: 02 80 00 08 be 2008098 <pthread_condattr_destroy+0x28>
200807c: 90 10 20 16 mov 0x16, %o0
2008080: c4 00 40 00 ld [ %g1 ], %g2
2008084: 80 a0 a0 00 cmp %g2, 0
2008088: 02 80 00 04 be 2008098 <pthread_condattr_destroy+0x28> <== NEVER TAKEN
200808c: 01 00 00 00 nop
return EINVAL;
attr->is_initialized = false;
2008090: c0 20 40 00 clr [ %g1 ]
return 0;
2008094: 90 10 20 00 clr %o0
}
2008098: 81 c3 e0 08 retl
02007608 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
2007608: 9d e3 bf 58 save %sp, -168, %sp
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
200760c: 80 a6 a0 00 cmp %i2, 0
2007610: 02 80 00 8c be 2007840 <pthread_create+0x238>
2007614: ba 10 20 0e mov 0xe, %i5
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
2007618: 80 a6 60 00 cmp %i1, 0
200761c: 32 80 00 05 bne,a 2007630 <pthread_create+0x28>
2007620: c2 06 40 00 ld [ %i1 ], %g1
2007624: 33 00 80 80 sethi %hi(0x2020000), %i1
2007628: b2 16 62 74 or %i1, 0x274, %i1 ! 2020274 <_POSIX_Threads_Default_attributes>
if ( !the_attr->is_initialized )
200762c: c2 06 40 00 ld [ %i1 ], %g1
2007630: 80 a0 60 00 cmp %g1, 0
2007634: 02 80 00 83 be 2007840 <pthread_create+0x238>
2007638: 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) )
200763c: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007640: 80 a0 60 00 cmp %g1, 0
2007644: 02 80 00 07 be 2007660 <pthread_create+0x58>
2007648: 03 00 80 85 sethi %hi(0x2021400), %g1
200764c: c4 06 60 08 ld [ %i1 + 8 ], %g2
2007650: c2 00 63 70 ld [ %g1 + 0x370 ], %g1
2007654: 80 a0 80 01 cmp %g2, %g1
2007658: 2a 80 00 7b bcs,a 2007844 <pthread_create+0x23c>
200765c: 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 ) {
2007660: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
2007664: 80 a0 60 01 cmp %g1, 1
2007668: 02 80 00 06 be 2007680 <pthread_create+0x78>
200766c: 80 a0 60 02 cmp %g1, 2
2007670: 32 80 00 74 bne,a 2007840 <pthread_create+0x238>
2007674: ba 10 20 16 mov 0x16, %i5
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
2007678: 10 80 00 09 b 200769c <pthread_create+0x94>
200767c: 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 ];
2007680: 03 00 80 8a sethi %hi(0x2022800), %g1
2007684: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 2022930 <_Per_CPU_Information+0x10>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
2007688: 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 ];
200768c: d2 00 61 5c ld [ %g1 + 0x15c ], %o1
schedpolicy = api->schedpolicy;
2007690: e2 02 60 84 ld [ %o1 + 0x84 ], %l1
schedparam = api->schedparam;
2007694: 10 80 00 04 b 20076a4 <pthread_create+0x9c>
2007698: 92 02 60 88 add %o1, 0x88, %o1
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
200769c: 90 07 bf e4 add %fp, -28, %o0
20076a0: 92 06 60 18 add %i1, 0x18, %o1
20076a4: 40 00 25 72 call 2010c6c <memcpy>
20076a8: 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 )
20076ac: c2 06 60 0c ld [ %i1 + 0xc ], %g1
20076b0: 80 a0 60 00 cmp %g1, 0
20076b4: 12 80 00 63 bne 2007840 <pthread_create+0x238>
20076b8: ba 10 20 86 mov 0x86, %i5
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
20076bc: 40 00 19 09 call 200dae0 <_POSIX_Priority_Is_valid>
20076c0: d0 07 bf e4 ld [ %fp + -28 ], %o0
20076c4: 80 8a 20 ff btst 0xff, %o0
20076c8: 02 80 00 5e be 2007840 <pthread_create+0x238> <== NEVER TAKEN
20076cc: 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);
20076d0: 03 00 80 85 sethi %hi(0x2021400), %g1
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
20076d4: e4 07 bf e4 ld [ %fp + -28 ], %l2
20076d8: e6 08 63 6c ldub [ %g1 + 0x36c ], %l3
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
20076dc: 90 10 00 11 mov %l1, %o0
20076e0: 92 07 bf e4 add %fp, -28, %o1
20076e4: 94 07 bf dc add %fp, -36, %o2
20076e8: 40 00 19 09 call 200db0c <_POSIX_Thread_Translate_sched_param>
20076ec: 96 07 bf e0 add %fp, -32, %o3
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
20076f0: ba 92 20 00 orcc %o0, 0, %i5
20076f4: 32 80 00 54 bne,a 2007844 <pthread_create+0x23c>
20076f8: b0 10 00 1d mov %i5, %i0
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
20076fc: 39 00 80 89 sethi %hi(0x2022400), %i4
2007700: 40 00 06 48 call 2009020 <_API_Mutex_Lock>
2007704: d0 07 20 84 ld [ %i4 + 0x84 ], %o0 ! 2022484 <_RTEMS_Allocator_Mutex>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
2007708: 11 00 80 89 sethi %hi(0x2022400), %o0
200770c: 40 00 08 e4 call 2009a9c <_Objects_Allocate>
2007710: 90 12 22 14 or %o0, 0x214, %o0 ! 2022614 <_POSIX_Threads_Information>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
2007714: a0 92 20 00 orcc %o0, 0, %l0
2007718: 32 80 00 04 bne,a 2007728 <pthread_create+0x120>
200771c: c2 06 60 08 ld [ %i1 + 8 ], %g1
_RTEMS_Unlock_allocator();
2007720: 10 80 00 21 b 20077a4 <pthread_create+0x19c>
2007724: d0 07 20 84 ld [ %i4 + 0x84 ], %o0
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
2007728: 05 00 80 85 sethi %hi(0x2021400), %g2
200772c: d6 00 a3 70 ld [ %g2 + 0x370 ], %o3 ! 2021770 <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(
2007730: c0 27 bf d4 clr [ %fp + -44 ]
2007734: 97 2a e0 01 sll %o3, 1, %o3
2007738: 80 a2 c0 01 cmp %o3, %g1
200773c: 1a 80 00 03 bcc 2007748 <pthread_create+0x140>
2007740: d4 06 60 04 ld [ %i1 + 4 ], %o2
2007744: 96 10 00 01 mov %g1, %o3
2007748: 82 10 20 01 mov 1, %g1
200774c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2007750: c2 07 bf dc ld [ %fp + -36 ], %g1
2007754: 9a 0c e0 ff and %l3, 0xff, %o5
2007758: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
200775c: c2 07 bf e0 ld [ %fp + -32 ], %g1
2007760: c0 23 a0 68 clr [ %sp + 0x68 ]
2007764: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
2007768: 82 07 bf d4 add %fp, -44, %g1
200776c: 39 00 80 89 sethi %hi(0x2022400), %i4
2007770: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2007774: 90 17 22 14 or %i4, 0x214, %o0
2007778: 92 10 00 10 mov %l0, %o1
200777c: 98 10 20 01 mov 1, %o4
2007780: 40 00 0d fd call 200af74 <_Thread_Initialize>
2007784: 9a 23 40 12 sub %o5, %l2, %o5
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
2007788: 80 8a 20 ff btst 0xff, %o0
200778c: 12 80 00 0a bne 20077b4 <pthread_create+0x1ac>
2007790: 90 17 22 14 or %i4, 0x214, %o0
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
2007794: 40 00 09 a1 call 2009e18 <_Objects_Free>
2007798: 92 10 00 10 mov %l0, %o1
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
200779c: 03 00 80 89 sethi %hi(0x2022400), %g1
20077a0: d0 00 60 84 ld [ %g1 + 0x84 ], %o0 ! 2022484 <_RTEMS_Allocator_Mutex>
20077a4: 40 00 06 34 call 2009074 <_API_Mutex_Unlock>
20077a8: ba 10 20 0b mov 0xb, %i5
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
20077ac: 81 c7 e0 08 ret
20077b0: 91 e8 00 1d restore %g0, %i5, %o0
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
20077b4: f8 04 21 5c ld [ %l0 + 0x15c ], %i4
api->Attributes = *the_attr;
20077b8: 92 10 00 19 mov %i1, %o1
20077bc: 94 10 20 40 mov 0x40, %o2
20077c0: 40 00 25 2b call 2010c6c <memcpy>
20077c4: 90 10 00 1c mov %i4, %o0
api->detachstate = the_attr->detachstate;
20077c8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
20077cc: 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;
20077d0: c2 27 20 40 st %g1, [ %i4 + 0x40 ]
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
20077d4: 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;
20077d8: e2 27 20 84 st %l1, [ %i4 + 0x84 ]
api->schedparam = schedparam;
20077dc: 40 00 25 24 call 2010c6c <memcpy>
20077e0: 90 07 20 88 add %i4, 0x88, %o0
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
20077e4: 90 10 00 10 mov %l0, %o0
20077e8: 92 10 20 01 mov 1, %o1
20077ec: 94 10 00 1a mov %i2, %o2
20077f0: 96 10 00 1b mov %i3, %o3
20077f4: 40 00 10 2f call 200b8b0 <_Thread_Start>
20077f8: 98 10 20 00 clr %o4
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
20077fc: 80 a4 60 04 cmp %l1, 4
2007800: 32 80 00 0a bne,a 2007828 <pthread_create+0x220>
2007804: c2 04 20 08 ld [ %l0 + 8 ], %g1
_Watchdog_Insert_ticks(
2007808: 40 00 10 54 call 200b958 <_Timespec_To_ticks>
200780c: 90 07 20 90 add %i4, 0x90, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007810: 92 07 20 a8 add %i4, 0xa8, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007814: d0 27 20 b4 st %o0, [ %i4 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007818: 11 00 80 89 sethi %hi(0x2022400), %o0
200781c: 40 00 11 04 call 200bc2c <_Watchdog_Insert>
2007820: 90 12 20 9c or %o0, 0x9c, %o0 ! 202249c <_Watchdog_Ticks_chain>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
2007824: c2 04 20 08 ld [ %l0 + 8 ], %g1
2007828: c2 26 00 00 st %g1, [ %i0 ]
_RTEMS_Unlock_allocator();
200782c: 03 00 80 89 sethi %hi(0x2022400), %g1
2007830: 40 00 06 11 call 2009074 <_API_Mutex_Unlock>
2007834: d0 00 60 84 ld [ %g1 + 0x84 ], %o0 ! 2022484 <_RTEMS_Allocator_Mutex>
return 0;
}
2007838: 81 c7 e0 08 ret
200783c: 91 e8 00 1d restore %g0, %i5, %o0
2007840: b0 10 00 1d mov %i5, %i0
2007844: 81 c7 e0 08 ret
2007848: 81 e8 00 00 restore
0201a3f4 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
201a3f4: 9d e3 bf 98 save %sp, -104, %sp
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
201a3f8: 80 a6 60 00 cmp %i1, 0
201a3fc: 32 80 00 03 bne,a 201a408 <pthread_kill+0x14>
201a400: b8 06 7f ff add %i1, -1, %i4
201a404: 30 80 00 04 b,a 201a414 <pthread_kill+0x20>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
201a408: 80 a7 20 1f cmp %i4, 0x1f
201a40c: 28 80 00 06 bleu,a 201a424 <pthread_kill+0x30>
201a410: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
201a414: 7f ff d4 96 call 200f66c <__errno>
201a418: 01 00 00 00 nop
201a41c: 10 80 00 30 b 201a4dc <pthread_kill+0xe8>
201a420: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
the_thread = _Thread_Get( thread, &location );
201a424: 7f ff bf 17 call 200a080 <_Thread_Get>
201a428: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
201a42c: c2 07 bf fc ld [ %fp + -4 ], %g1
201a430: 80 a0 60 00 cmp %g1, 0
201a434: 12 80 00 27 bne 201a4d0 <pthread_kill+0xdc> <== NEVER TAKEN
201a438: ba 10 00 08 mov %o0, %i5
201a43c: 11 00 80 72 sethi %hi(0x201c800), %o0
201a440: 7f ff b7 04 call 2008050 <_API_extensions_Add_post_switch>
201a444: 90 12 23 a4 or %o0, 0x3a4, %o0 ! 201cba4 <_POSIX_signals_Post_switch>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
201a448: 85 2e 60 02 sll %i1, 2, %g2
201a44c: 87 2e 60 04 sll %i1, 4, %g3
201a450: 86 20 c0 02 sub %g3, %g2, %g3
201a454: 05 00 80 76 sethi %hi(0x201d800), %g2
201a458: 84 10 a3 50 or %g2, 0x350, %g2 ! 201db50 <_POSIX_signals_Vectors>
201a45c: 84 00 80 03 add %g2, %g3, %g2
201a460: c4 00 a0 08 ld [ %g2 + 8 ], %g2
201a464: 80 a0 a0 01 cmp %g2, 1
201a468: 12 80 00 06 bne 201a480 <pthread_kill+0x8c>
201a46c: c2 07 61 5c ld [ %i5 + 0x15c ], %g1
_Thread_Enable_dispatch();
201a470: 7f ff be f8 call 200a050 <_Thread_Enable_dispatch>
201a474: b0 10 20 00 clr %i0
201a478: 81 c7 e0 08 ret
201a47c: 81 e8 00 00 restore
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201a480: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2
201a484: b6 10 20 01 mov 1, %i3
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201a488: 90 10 00 1d mov %i5, %o0
201a48c: b9 2e c0 1c sll %i3, %i4, %i4
201a490: 92 10 00 19 mov %i1, %o1
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201a494: b8 10 80 1c or %g2, %i4, %i4
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201a498: 94 10 20 00 clr %o2
201a49c: 7f ff ff 84 call 201a2ac <_POSIX_signals_Unblock_thread>
201a4a0: f8 20 60 d4 st %i4, [ %g1 + 0xd4 ]
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201a4a4: 03 00 80 76 sethi %hi(0x201d800), %g1
201a4a8: 82 10 62 f0 or %g1, 0x2f0, %g1 ! 201daf0 <_Per_CPU_Information>
201a4ac: c4 00 60 08 ld [ %g1 + 8 ], %g2
201a4b0: 80 a0 a0 00 cmp %g2, 0
201a4b4: 02 bf ff ef be 201a470 <pthread_kill+0x7c>
201a4b8: 01 00 00 00 nop
201a4bc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
201a4c0: 80 a7 40 02 cmp %i5, %g2
201a4c4: 22 bf ff eb be,a 201a470 <pthread_kill+0x7c>
201a4c8: f6 28 60 0c stb %i3, [ %g1 + 0xc ]
201a4cc: 30 bf ff e9 b,a 201a470 <pthread_kill+0x7c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
201a4d0: 7f ff d4 67 call 200f66c <__errno> <== NOT EXECUTED
201a4d4: 01 00 00 00 nop <== NOT EXECUTED
201a4d8: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3> <== NOT EXECUTED
201a4dc: c2 22 00 00 st %g1, [ %o0 ]
}
201a4e0: 81 c7 e0 08 ret
201a4e4: 91 e8 3f ff restore %g0, -1, %o0
020097e4 <pthread_mutex_timedlock>:
*/
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
20097e4: 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 );
20097e8: 92 07 bf fc add %fp, -4, %o1
20097ec: 40 00 00 37 call 20098c8 <_POSIX_Absolute_timeout_to_ticks>
20097f0: 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 );
20097f4: 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 )
20097f8: 82 1a 20 03 xor %o0, 3, %g1
20097fc: 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 );
2009800: ba 10 00 08 mov %o0, %i5
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
2009804: b8 60 3f ff subx %g0, -1, %i4
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
2009808: 90 10 00 18 mov %i0, %o0
200980c: 7f ff ff b7 call 20096e8 <_POSIX_Mutex_Lock_support>
2009810: 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) ) {
2009814: 80 a7 20 00 cmp %i4, 0
2009818: 12 80 00 0c bne 2009848 <pthread_mutex_timedlock+0x64>
200981c: b0 10 00 08 mov %o0, %i0
2009820: 80 a2 20 10 cmp %o0, 0x10
2009824: 12 80 00 09 bne 2009848 <pthread_mutex_timedlock+0x64>
2009828: 80 a7 60 00 cmp %i5, 0
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
200982c: 02 80 00 07 be 2009848 <pthread_mutex_timedlock+0x64> <== NEVER TAKEN
2009830: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2009834: ba 07 7f ff add %i5, -1, %i5
2009838: 80 a7 60 01 cmp %i5, 1
200983c: 18 80 00 03 bgu 2009848 <pthread_mutex_timedlock+0x64> <== NEVER TAKEN
2009840: b0 10 20 10 mov 0x10, %i0
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
2009844: b0 10 20 74 mov 0x74, %i0
}
return lock_status;
}
2009848: 81 c7 e0 08 ret
200984c: 81 e8 00 00 restore
02006eec <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
2006eec: 82 10 00 08 mov %o0, %g1
if ( !attr )
2006ef0: 80 a0 60 00 cmp %g1, 0
2006ef4: 02 80 00 0b be 2006f20 <pthread_mutexattr_gettype+0x34>
2006ef8: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
2006efc: c4 00 40 00 ld [ %g1 ], %g2
2006f00: 80 a0 a0 00 cmp %g2, 0
2006f04: 02 80 00 07 be 2006f20 <pthread_mutexattr_gettype+0x34>
2006f08: 80 a2 60 00 cmp %o1, 0
return EINVAL;
if ( !type )
2006f0c: 02 80 00 05 be 2006f20 <pthread_mutexattr_gettype+0x34> <== NEVER TAKEN
2006f10: 01 00 00 00 nop
return EINVAL;
*type = attr->type;
2006f14: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
return 0;
2006f18: 90 10 20 00 clr %o0
return EINVAL;
if ( !type )
return EINVAL;
*type = attr->type;
2006f1c: c2 22 40 00 st %g1, [ %o1 ]
return 0;
}
2006f20: 81 c3 e0 08 retl
0200939c <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
200939c: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
20093a0: 80 a0 60 00 cmp %g1, 0
20093a4: 02 80 00 0a be 20093cc <pthread_mutexattr_setpshared+0x30>
20093a8: 90 10 20 16 mov 0x16, %o0
20093ac: c4 00 40 00 ld [ %g1 ], %g2
20093b0: 80 a0 a0 00 cmp %g2, 0
20093b4: 02 80 00 06 be 20093cc <pthread_mutexattr_setpshared+0x30>
20093b8: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
20093bc: 18 80 00 04 bgu 20093cc <pthread_mutexattr_setpshared+0x30><== NEVER TAKEN
20093c0: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
20093c4: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
20093c8: 90 10 20 00 clr %o0
default:
return EINVAL;
}
}
20093cc: 81 c3 e0 08 retl
02006f58 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
2006f58: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
2006f5c: 80 a0 60 00 cmp %g1, 0
2006f60: 02 80 00 0a be 2006f88 <pthread_mutexattr_settype+0x30>
2006f64: 90 10 20 16 mov 0x16, %o0
2006f68: c4 00 40 00 ld [ %g1 ], %g2
2006f6c: 80 a0 a0 00 cmp %g2, 0
2006f70: 02 80 00 06 be 2006f88 <pthread_mutexattr_settype+0x30> <== NEVER TAKEN
2006f74: 80 a2 60 03 cmp %o1, 3
return EINVAL;
switch ( type ) {
2006f78: 18 80 00 04 bgu 2006f88 <pthread_mutexattr_settype+0x30>
2006f7c: 01 00 00 00 nop
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
2006f80: d2 20 60 10 st %o1, [ %g1 + 0x10 ]
return 0;
2006f84: 90 10 20 00 clr %o0
default:
return EINVAL;
}
}
2006f88: 81 c3 e0 08 retl
02007c90 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
2007c90: 9d e3 bf 98 save %sp, -104, %sp
if ( !once_control || !init_routine )
2007c94: 80 a6 60 00 cmp %i1, 0
2007c98: 02 80 00 1c be 2007d08 <pthread_once+0x78>
2007c9c: ba 10 00 18 mov %i0, %i5
2007ca0: 80 a6 20 00 cmp %i0, 0
2007ca4: 22 80 00 17 be,a 2007d00 <pthread_once+0x70>
2007ca8: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !once_control->init_executed ) {
2007cac: c2 06 20 04 ld [ %i0 + 4 ], %g1
2007cb0: 80 a0 60 00 cmp %g1, 0
2007cb4: 12 80 00 13 bne 2007d00 <pthread_once+0x70>
2007cb8: b0 10 20 00 clr %i0
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
2007cbc: 90 10 21 00 mov 0x100, %o0
2007cc0: 92 10 21 00 mov 0x100, %o1
2007cc4: 40 00 03 0d call 20088f8 <rtems_task_mode>
2007cc8: 94 07 bf fc add %fp, -4, %o2
if ( !once_control->init_executed ) {
2007ccc: c2 07 60 04 ld [ %i5 + 4 ], %g1
2007cd0: 80 a0 60 00 cmp %g1, 0
2007cd4: 12 80 00 07 bne 2007cf0 <pthread_once+0x60> <== NEVER TAKEN
2007cd8: d0 07 bf fc ld [ %fp + -4 ], %o0
once_control->is_initialized = true;
2007cdc: 82 10 20 01 mov 1, %g1
2007ce0: c2 27 40 00 st %g1, [ %i5 ]
once_control->init_executed = true;
(*init_routine)();
2007ce4: 9f c6 40 00 call %i1
2007ce8: c2 27 60 04 st %g1, [ %i5 + 4 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2007cec: d0 07 bf fc ld [ %fp + -4 ], %o0
2007cf0: 92 10 21 00 mov 0x100, %o1
2007cf4: 94 07 bf fc add %fp, -4, %o2
2007cf8: 40 00 03 00 call 20088f8 <rtems_task_mode>
2007cfc: b0 10 20 00 clr %i0
2007d00: 81 c7 e0 08 ret
2007d04: 81 e8 00 00 restore
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
2007d08: b0 10 20 16 mov 0x16, %i0
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
2007d0c: 81 c7 e0 08 ret
2007d10: 81 e8 00 00 restore
02007db0 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
2007db0: 9d e3 bf 90 save %sp, -112, %sp
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
2007db4: 80 a6 20 00 cmp %i0, 0
2007db8: 12 80 00 04 bne 2007dc8 <pthread_rwlock_init+0x18>
2007dbc: 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;
2007dc0: 81 c7 e0 08 ret
2007dc4: 91 e8 20 16 restore %g0, 0x16, %o0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2007dc8: 32 80 00 06 bne,a 2007de0 <pthread_rwlock_init+0x30>
2007dcc: c2 06 40 00 ld [ %i1 ], %g1
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
2007dd0: 90 07 bf f8 add %fp, -8, %o0
2007dd4: 40 00 01 b0 call 2008494 <pthread_rwlockattr_init>
2007dd8: 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 )
2007ddc: c2 06 40 00 ld [ %i1 ], %g1
2007de0: 80 a0 60 00 cmp %g1, 0
2007de4: 22 80 00 13 be,a 2007e30 <pthread_rwlock_init+0x80> <== NEVER TAKEN
2007de8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
switch ( the_attr->process_shared ) {
2007dec: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007df0: 80 a0 60 00 cmp %g1, 0
2007df4: 32 80 00 0f bne,a 2007e30 <pthread_rwlock_init+0x80> <== NEVER TAKEN
2007df8: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
2007dfc: 03 00 80 88 sethi %hi(0x2022000), %g1
2007e00: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 2022090 <_Thread_Dispatch_disable_level>
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
2007e04: c0 27 bf f4 clr [ %fp + -12 ]
++level;
2007e08: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
2007e0c: c4 20 60 90 st %g2, [ %g1 + 0x90 ]
* 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 *)
2007e10: 39 00 80 88 sethi %hi(0x2022000), %i4
2007e14: 40 00 0a 7e call 200a80c <_Objects_Allocate>
2007e18: 90 17 22 a4 or %i4, 0x2a4, %o0 ! 20222a4 <_POSIX_RWLock_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
2007e1c: ba 92 20 00 orcc %o0, 0, %i5
2007e20: 12 80 00 06 bne 2007e38 <pthread_rwlock_init+0x88>
2007e24: 90 07 60 10 add %i5, 0x10, %o0
_Thread_Enable_dispatch();
2007e28: 40 00 0f b0 call 200bce8 <_Thread_Enable_dispatch>
2007e2c: b0 10 20 0b mov 0xb, %i0
2007e30: 81 c7 e0 08 ret
2007e34: 81 e8 00 00 restore
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
2007e38: 40 00 08 dd call 200a1ac <_CORE_RWLock_Initialize>
2007e3c: 92 07 bf f4 add %fp, -12, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007e40: c4 17 60 0a lduh [ %i5 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007e44: b8 17 22 a4 or %i4, 0x2a4, %i4
2007e48: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007e4c: c2 07 60 08 ld [ %i5 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007e50: 85 28 a0 02 sll %g2, 2, %g2
2007e54: 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;
2007e58: c0 27 60 0c clr [ %i5 + 0xc ]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
2007e5c: c2 26 00 00 st %g1, [ %i0 ]
_Thread_Enable_dispatch();
2007e60: 40 00 0f a2 call 200bce8 <_Thread_Enable_dispatch>
2007e64: b0 10 20 00 clr %i0
2007e68: 81 c7 e0 08 ret
2007e6c: 81 e8 00 00 restore
02008764 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2008764: 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 )
2008768: 80 a6 20 00 cmp %i0, 0
200876c: 12 80 00 04 bne 200877c <pthread_rwlock_timedrdlock+0x18>
2008770: 92 07 bf fc add %fp, -4, %o1
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
2008774: 81 c7 e0 08 ret
2008778: 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 );
200877c: 40 00 19 cc call 200eeac <_POSIX_Absolute_timeout_to_ticks>
2008780: 90 10 00 19 mov %i1, %o0
2008784: d2 06 00 00 ld [ %i0 ], %o1
2008788: ba 10 00 08 mov %o0, %i5
200878c: 94 07 bf f8 add %fp, -8, %o2
2008790: 11 00 80 82 sethi %hi(0x2020800), %o0
2008794: 40 00 0b 30 call 200b454 <_Objects_Get>
2008798: 90 12 20 b4 or %o0, 0xb4, %o0 ! 20208b4 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
200879c: c2 07 bf f8 ld [ %fp + -8 ], %g1
20087a0: 80 a0 60 00 cmp %g1, 0
20087a4: 32 80 00 21 bne,a 2008828 <pthread_rwlock_timedrdlock+0xc4>
20087a8: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
20087ac: d2 06 00 00 ld [ %i0 ], %o1
20087b0: 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 )
20087b4: 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(
20087b8: 90 02 20 10 add %o0, 0x10, %o0
20087bc: 80 a0 00 01 cmp %g0, %g1
20087c0: 98 10 20 00 clr %o4
20087c4: b8 60 3f ff subx %g0, -1, %i4
20087c8: 40 00 07 9e call 200a640 <_CORE_RWLock_Obtain_for_reading>
20087cc: 94 10 00 1c mov %i4, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
20087d0: 40 00 0e d9 call 200c334 <_Thread_Enable_dispatch>
20087d4: 01 00 00 00 nop
if ( !do_wait ) {
20087d8: 80 a7 20 00 cmp %i4, 0
20087dc: 12 80 00 0e bne 2008814 <pthread_rwlock_timedrdlock+0xb0>
20087e0: 03 00 80 83 sethi %hi(0x2020c00), %g1
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
20087e4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 ! 2020c10 <_Per_CPU_Information+0x10>
20087e8: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
20087ec: 80 a0 60 02 cmp %g1, 2
20087f0: 32 80 00 0a bne,a 2008818 <pthread_rwlock_timedrdlock+0xb4>
20087f4: 03 00 80 83 sethi %hi(0x2020c00), %g1
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
20087f8: 80 a7 60 00 cmp %i5, 0
20087fc: 22 80 00 0b be,a 2008828 <pthread_rwlock_timedrdlock+0xc4><== NEVER TAKEN
2008800: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2008804: ba 07 7f ff add %i5, -1, %i5
2008808: 80 a7 60 01 cmp %i5, 1
200880c: 08 80 00 07 bleu 2008828 <pthread_rwlock_timedrdlock+0xc4><== ALWAYS TAKEN
2008810: 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
2008814: 03 00 80 83 sethi %hi(0x2020c00), %g1
2008818: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 ! 2020c10 <_Per_CPU_Information+0x10>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
200881c: 40 00 00 38 call 20088fc <_POSIX_RWLock_Translate_core_RWLock_return_code>
2008820: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
2008824: b0 10 00 08 mov %o0, %i0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2008828: 81 c7 e0 08 ret
200882c: 81 e8 00 00 restore
02008830 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2008830: 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 )
2008834: 80 a6 20 00 cmp %i0, 0
2008838: 12 80 00 04 bne 2008848 <pthread_rwlock_timedwrlock+0x18>
200883c: 92 07 bf fc add %fp, -4, %o1
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
2008840: 81 c7 e0 08 ret
2008844: 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 );
2008848: 40 00 19 99 call 200eeac <_POSIX_Absolute_timeout_to_ticks>
200884c: 90 10 00 19 mov %i1, %o0
2008850: d2 06 00 00 ld [ %i0 ], %o1
2008854: ba 10 00 08 mov %o0, %i5
2008858: 94 07 bf f8 add %fp, -8, %o2
200885c: 11 00 80 82 sethi %hi(0x2020800), %o0
2008860: 40 00 0a fd call 200b454 <_Objects_Get>
2008864: 90 12 20 b4 or %o0, 0xb4, %o0 ! 20208b4 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2008868: c2 07 bf f8 ld [ %fp + -8 ], %g1
200886c: 80 a0 60 00 cmp %g1, 0
2008870: 32 80 00 21 bne,a 20088f4 <pthread_rwlock_timedwrlock+0xc4>
2008874: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
2008878: d2 06 00 00 ld [ %i0 ], %o1
200887c: 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 )
2008880: 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(
2008884: 90 02 20 10 add %o0, 0x10, %o0
2008888: 80 a0 00 01 cmp %g0, %g1
200888c: 98 10 20 00 clr %o4
2008890: b8 60 3f ff subx %g0, -1, %i4
2008894: 40 00 07 9e call 200a70c <_CORE_RWLock_Obtain_for_writing>
2008898: 94 10 00 1c mov %i4, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
200889c: 40 00 0e a6 call 200c334 <_Thread_Enable_dispatch>
20088a0: 01 00 00 00 nop
if ( !do_wait &&
20088a4: 80 a7 20 00 cmp %i4, 0
20088a8: 12 80 00 0e bne 20088e0 <pthread_rwlock_timedwrlock+0xb0>
20088ac: 03 00 80 83 sethi %hi(0x2020c00), %g1
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
20088b0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 ! 2020c10 <_Per_CPU_Information+0x10>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
20088b4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
20088b8: 80 a0 60 02 cmp %g1, 2
20088bc: 32 80 00 0a bne,a 20088e4 <pthread_rwlock_timedwrlock+0xb4>
20088c0: 03 00 80 83 sethi %hi(0x2020c00), %g1
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
20088c4: 80 a7 60 00 cmp %i5, 0
20088c8: 22 80 00 0b be,a 20088f4 <pthread_rwlock_timedwrlock+0xc4><== NEVER TAKEN
20088cc: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
20088d0: ba 07 7f ff add %i5, -1, %i5
20088d4: 80 a7 60 01 cmp %i5, 1
20088d8: 08 80 00 07 bleu 20088f4 <pthread_rwlock_timedwrlock+0xc4><== ALWAYS TAKEN
20088dc: 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
20088e0: 03 00 80 83 sethi %hi(0x2020c00), %g1
20088e4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 ! 2020c10 <_Per_CPU_Information+0x10>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
20088e8: 40 00 00 05 call 20088fc <_POSIX_RWLock_Translate_core_RWLock_return_code>
20088ec: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
20088f0: b0 10 00 08 mov %o0, %i0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20088f4: 81 c7 e0 08 ret
20088f8: 81 e8 00 00 restore
02009088 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
2009088: 82 10 00 08 mov %o0, %g1
if ( !attr )
200908c: 80 a0 60 00 cmp %g1, 0
2009090: 02 80 00 0a be 20090b8 <pthread_rwlockattr_setpshared+0x30>
2009094: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
2009098: c4 00 40 00 ld [ %g1 ], %g2
200909c: 80 a0 a0 00 cmp %g2, 0
20090a0: 02 80 00 06 be 20090b8 <pthread_rwlockattr_setpshared+0x30>
20090a4: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
20090a8: 18 80 00 04 bgu 20090b8 <pthread_rwlockattr_setpshared+0x30><== NEVER TAKEN
20090ac: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
20090b0: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
20090b4: 90 10 20 00 clr %o0
default:
return EINVAL;
}
}
20090b8: 81 c3 e0 08 retl
0200a0b0 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
200a0b0: 9d e3 bf 90 save %sp, -112, %sp
int rc;
/*
* Check all the parameters
*/
if ( !param )
200a0b4: 80 a6 a0 00 cmp %i2, 0
200a0b8: 02 80 00 40 be 200a1b8 <pthread_setschedparam+0x108>
200a0bc: b6 10 20 16 mov 0x16, %i3
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
200a0c0: 90 10 00 19 mov %i1, %o0
200a0c4: 92 10 00 1a mov %i2, %o1
200a0c8: 94 07 bf f4 add %fp, -12, %o2
200a0cc: 40 00 17 8e call 200ff04 <_POSIX_Thread_Translate_sched_param>
200a0d0: 96 07 bf f8 add %fp, -8, %o3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
200a0d4: b6 92 20 00 orcc %o0, 0, %i3
200a0d8: 32 80 00 39 bne,a 200a1bc <pthread_setschedparam+0x10c>
200a0dc: b0 10 00 1b mov %i3, %i0
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
200a0e0: 90 10 00 18 mov %i0, %o0
200a0e4: 40 00 0c 3b call 200d1d0 <_Thread_Get>
200a0e8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a0ec: c2 07 bf fc ld [ %fp + -4 ], %g1
200a0f0: 80 a0 60 00 cmp %g1, 0
200a0f4: 12 80 00 30 bne 200a1b4 <pthread_setschedparam+0x104>
200a0f8: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200a0fc: fa 02 21 5c ld [ %o0 + 0x15c ], %i5
if ( api->schedpolicy == SCHED_SPORADIC )
200a100: c2 07 60 84 ld [ %i5 + 0x84 ], %g1
200a104: 80 a0 60 04 cmp %g1, 4
200a108: 32 80 00 05 bne,a 200a11c <pthread_setschedparam+0x6c>
200a10c: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
(void) _Watchdog_Remove( &api->Sporadic_timer );
200a110: 40 00 10 28 call 200e1b0 <_Watchdog_Remove>
200a114: 90 07 60 a8 add %i5, 0xa8, %o0
api->schedpolicy = policy;
200a118: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
api->schedparam = *param;
200a11c: 90 07 60 88 add %i5, 0x88, %o0
200a120: 92 10 00 1a mov %i2, %o1
200a124: 40 00 23 d0 call 2013064 <memcpy>
200a128: 94 10 20 1c mov 0x1c, %o2
the_thread->budget_algorithm = budget_algorithm;
200a12c: c2 07 bf f4 ld [ %fp + -12 ], %g1
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
200a130: 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;
200a134: c2 27 20 78 st %g1, [ %i4 + 0x78 ]
the_thread->budget_callout = budget_callout;
200a138: c2 07 bf f8 ld [ %fp + -8 ], %g1
switch ( api->schedpolicy ) {
200a13c: 06 80 00 1b bl 200a1a8 <pthread_setschedparam+0xf8> <== NEVER TAKEN
200a140: c2 27 20 7c st %g1, [ %i4 + 0x7c ]
200a144: 80 a6 60 02 cmp %i1, 2
200a148: 04 80 00 07 ble 200a164 <pthread_setschedparam+0xb4>
200a14c: 03 00 80 8a sethi %hi(0x2022800), %g1
200a150: 80 a6 60 04 cmp %i1, 4
200a154: 12 80 00 15 bne 200a1a8 <pthread_setschedparam+0xf8> <== NEVER TAKEN
200a158: 01 00 00 00 nop
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
200a15c: 10 80 00 0d b 200a190 <pthread_setschedparam+0xe0>
200a160: 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;
200a164: c2 00 63 10 ld [ %g1 + 0x310 ], %g1
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
200a168: 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;
200a16c: c2 27 20 74 st %g1, [ %i4 + 0x74 ]
200a170: 03 00 80 87 sethi %hi(0x2021c00), %g1
200a174: d2 08 62 ac ldub [ %g1 + 0x2ac ], %o1 ! 2021eac <rtems_maximum_priority>
200a178: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
200a17c: 94 10 20 01 mov 1, %o2
200a180: 92 22 40 01 sub %o1, %g1, %o1
200a184: 40 00 0a d5 call 200ccd8 <_Thread_Change_priority>
200a188: d2 27 20 18 st %o1, [ %i4 + 0x18 ]
the_thread,
the_thread->real_priority,
true
);
break;
200a18c: 30 80 00 07 b,a 200a1a8 <pthread_setschedparam+0xf8>
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
_Watchdog_Remove( &api->Sporadic_timer );
200a190: 90 07 60 a8 add %i5, 0xa8, %o0
200a194: 40 00 10 07 call 200e1b0 <_Watchdog_Remove>
200a198: c2 27 60 a4 st %g1, [ %i5 + 0xa4 ]
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
200a19c: 90 10 20 00 clr %o0
200a1a0: 7f ff ff 7e call 2009f98 <_POSIX_Threads_Sporadic_budget_TSR>
200a1a4: 92 10 00 1c mov %i4, %o1
break;
}
_Thread_Enable_dispatch();
200a1a8: 40 00 0b fe call 200d1a0 <_Thread_Enable_dispatch>
200a1ac: b0 10 00 1b mov %i3, %i0
200a1b0: 30 80 00 03 b,a 200a1bc <pthread_setschedparam+0x10c>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
200a1b4: b6 10 20 03 mov 3, %i3
}
200a1b8: b0 10 00 1b mov %i3, %i0
200a1bc: 81 c7 e0 08 ret
200a1c0: 81 e8 00 00 restore
020079d4 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
20079d4: 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() )
20079d8: 03 00 80 7a sethi %hi(0x201e800), %g1
20079dc: 82 10 61 40 or %g1, 0x140, %g1 ! 201e940 <_Per_CPU_Information>
20079e0: c4 00 60 08 ld [ %g1 + 8 ], %g2
20079e4: 80 a0 a0 00 cmp %g2, 0
20079e8: 12 80 00 16 bne 2007a40 <pthread_testcancel+0x6c> <== NEVER TAKEN
20079ec: 05 00 80 79 sethi %hi(0x201e400), %g2
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
20079f0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
20079f4: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3
20079f8: c2 00 61 5c ld [ %g1 + 0x15c ], %g1
++level;
20079fc: 86 00 e0 01 inc %g3
_Thread_Dispatch_disable_level = level;
2007a00: c6 20 a0 20 st %g3, [ %g2 + 0x20 ]
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2007a04: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2
2007a08: 80 a0 a0 00 cmp %g2, 0
2007a0c: 12 80 00 05 bne 2007a20 <pthread_testcancel+0x4c> <== NEVER TAKEN
2007a10: ba 10 20 00 clr %i5
2007a14: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1
2007a18: 80 a0 00 01 cmp %g0, %g1
2007a1c: ba 40 20 00 addx %g0, 0, %i5
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2007a20: 40 00 0b c1 call 200a924 <_Thread_Enable_dispatch>
2007a24: 01 00 00 00 nop
if ( cancel )
2007a28: 80 8f 60 ff btst 0xff, %i5
2007a2c: 02 80 00 05 be 2007a40 <pthread_testcancel+0x6c>
2007a30: 03 00 80 7a sethi %hi(0x201e800), %g1
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
2007a34: f0 00 61 50 ld [ %g1 + 0x150 ], %i0 ! 201e950 <_Per_CPU_Information+0x10>
2007a38: 40 00 17 43 call 200d744 <_POSIX_Thread_Exit>
2007a3c: 93 e8 3f ff restore %g0, -1, %o1
2007a40: 81 c7 e0 08 ret
2007a44: 81 e8 00 00 restore
02007ed8 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
2007ed8: 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);
2007edc: 37 00 80 7e sethi %hi(0x201f800), %i3
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
2007ee0: 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);
2007ee4: 40 00 02 85 call 20088f8 <pthread_mutex_lock>
2007ee8: 90 16 e1 bc or %i3, 0x1bc, %o0
if (result != 0) {
2007eec: b0 92 20 00 orcc %o0, 0, %i0
2007ef0: 02 80 00 06 be 2007f08 <rtems_aio_enqueue+0x30> <== ALWAYS TAKEN
2007ef4: 01 00 00 00 nop
free (req);
2007ef8: 7f ff ef 0f call 2003b34 <free> <== NOT EXECUTED
2007efc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2007f00: 81 c7 e0 08 ret <== NOT EXECUTED
2007f04: 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);
2007f08: 40 00 04 90 call 2009148 <pthread_self>
2007f0c: b6 16 e1 bc or %i3, 0x1bc, %i3
2007f10: 92 07 bf e0 add %fp, -32, %o1
2007f14: 40 00 03 9d call 2008d88 <pthread_getschedparam>
2007f18: 94 07 bf e4 add %fp, -28, %o2
req->caller_thread = pthread_self ();
2007f1c: 40 00 04 8b call 2009148 <pthread_self>
2007f20: 01 00 00 00 nop
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007f24: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2007f28: c6 07 bf e4 ld [ %fp + -28 ], %g3
2007f2c: 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 ();
2007f30: d0 27 60 10 st %o0, [ %i5 + 0x10 ]
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
2007f34: 84 20 c0 02 sub %g3, %g2, %g2
2007f38: c4 27 60 0c st %g2, [ %i5 + 0xc ]
req->policy = policy;
2007f3c: c4 07 bf e0 ld [ %fp + -32 ], %g2
2007f40: c4 27 60 08 st %g2, [ %i5 + 8 ]
req->aiocbp->error_code = EINPROGRESS;
2007f44: 84 10 20 77 mov 0x77, %g2
2007f48: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
2007f4c: 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;
2007f50: c0 20 60 38 clr [ %g1 + 0x38 ]
if ((aio_request_queue.idle_threads == 0) &&
2007f54: 80 a0 a0 00 cmp %g2, 0
2007f58: 12 80 00 2e bne 2008010 <rtems_aio_enqueue+0x138> <== NEVER TAKEN
2007f5c: d2 00 40 00 ld [ %g1 ], %o1
2007f60: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
2007f64: 80 a0 60 04 cmp %g1, 4
2007f68: 14 80 00 2b bg 2008014 <rtems_aio_enqueue+0x13c>
2007f6c: 11 00 80 7e sethi %hi(0x201f800), %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);
2007f70: 90 06 e0 48 add %i3, 0x48, %o0
2007f74: 7f ff ff 7d call 2007d68 <rtems_aio_search_fd>
2007f78: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
2007f7c: 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);
2007f80: b8 10 00 08 mov %o0, %i4
if (r_chain->new_fd == 1) {
2007f84: 80 a0 60 01 cmp %g1, 1
2007f88: 12 80 00 1d bne 2007ffc <rtems_aio_enqueue+0x124>
2007f8c: 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);
2007f90: 92 10 00 1d mov %i5, %o1
2007f94: 40 00 09 15 call 200a3e8 <_Chain_Insert>
2007f98: 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);
2007f9c: 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;
2007fa0: c0 27 20 18 clr [ %i4 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
2007fa4: 40 00 01 fd call 2008798 <pthread_mutex_init>
2007fa8: 90 07 20 1c add %i4, 0x1c, %o0
pthread_cond_init (&r_chain->cond, NULL);
2007fac: 92 10 20 00 clr %o1
2007fb0: 40 00 00 ff call 20083ac <pthread_cond_init>
2007fb4: 90 07 20 20 add %i4, 0x20, %o0
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
2007fb8: 90 07 bf dc add %fp, -36, %o0
2007fbc: 92 06 e0 08 add %i3, 8, %o1
2007fc0: 15 00 80 1e sethi %hi(0x2007800), %o2
2007fc4: 96 10 00 1c mov %i4, %o3
2007fc8: 40 00 02 df call 2008b44 <pthread_create>
2007fcc: 94 12 a1 b0 or %o2, 0x1b0, %o2
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
2007fd0: ba 92 20 00 orcc %o0, 0, %i5
2007fd4: 22 80 00 07 be,a 2007ff0 <rtems_aio_enqueue+0x118> <== ALWAYS TAKEN
2007fd8: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
pthread_mutex_unlock (&aio_request_queue.mutex);
2007fdc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2007fe0: 40 00 02 67 call 200897c <pthread_mutex_unlock> <== NOT EXECUTED
2007fe4: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED
2007fe8: 81 c7 e0 08 ret <== NOT EXECUTED
2007fec: 81 e8 00 00 restore <== NOT EXECUTED
return result;
}
++aio_request_queue.active_threads;
2007ff0: 82 00 60 01 inc %g1
2007ff4: 10 80 00 3a b 20080dc <rtems_aio_enqueue+0x204>
2007ff8: c2 26 e0 64 st %g1, [ %i3 + 0x64 ]
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
2007ffc: b6 02 20 1c add %o0, 0x1c, %i3
2008000: 40 00 02 3e call 20088f8 <pthread_mutex_lock>
2008004: 90 10 00 1b mov %i3, %o0
rtems_aio_insert_prio (&r_chain->perfd, req);
2008008: 10 80 00 0c b 2008038 <rtems_aio_enqueue+0x160>
200800c: 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,
2008010: 11 00 80 7e sethi %hi(0x201f800), %o0 <== NOT EXECUTED
2008014: 94 10 20 00 clr %o2
2008018: 7f ff ff 54 call 2007d68 <rtems_aio_search_fd>
200801c: 90 12 22 04 or %o0, 0x204, %o0
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
2008020: b8 92 20 00 orcc %o0, 0, %i4
2008024: 02 80 00 0d be 2008058 <rtems_aio_enqueue+0x180>
2008028: b6 07 20 1c add %i4, 0x1c, %i3
{
pthread_mutex_lock (&r_chain->mutex);
200802c: 40 00 02 33 call 20088f8 <pthread_mutex_lock>
2008030: 90 10 00 1b mov %i3, %o0
rtems_aio_insert_prio (&r_chain->perfd, req);
2008034: 90 07 20 08 add %i4, 8, %o0
2008038: 7f ff fe fc call 2007c28 <rtems_aio_insert_prio>
200803c: 92 10 00 1d mov %i5, %o1
pthread_cond_signal (&r_chain->cond);
2008040: 40 00 01 0a call 2008468 <pthread_cond_signal>
2008044: 90 07 20 20 add %i4, 0x20, %o0
pthread_mutex_unlock (&r_chain->mutex);
2008048: 40 00 02 4d call 200897c <pthread_mutex_unlock>
200804c: 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);
2008050: 10 80 00 24 b 20080e0 <rtems_aio_enqueue+0x208>
2008054: 11 00 80 7e sethi %hi(0x201f800), %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);
2008058: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200805c: 11 00 80 7e sethi %hi(0x201f800), %o0
2008060: d2 00 40 00 ld [ %g1 ], %o1
2008064: 90 12 22 10 or %o0, 0x210, %o0
2008068: 7f ff ff 40 call 2007d68 <rtems_aio_search_fd>
200806c: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
2008070: 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);
2008074: b8 10 00 08 mov %o0, %i4
2008078: 92 10 00 1d mov %i5, %o1
if (r_chain->new_fd == 1) {
200807c: 80 a0 60 01 cmp %g1, 1
2008080: 12 80 00 0d bne 20080b4 <rtems_aio_enqueue+0x1dc>
2008084: 90 02 20 08 add %o0, 8, %o0
2008088: 40 00 08 d8 call 200a3e8 <_Chain_Insert>
200808c: 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);
2008090: 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;
2008094: c0 27 20 18 clr [ %i4 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
2008098: 40 00 01 c0 call 2008798 <pthread_mutex_init>
200809c: 92 10 20 00 clr %o1
pthread_cond_init (&r_chain->cond, NULL);
20080a0: 90 07 20 20 add %i4, 0x20, %o0
20080a4: 40 00 00 c2 call 20083ac <pthread_cond_init>
20080a8: 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)
20080ac: 10 80 00 05 b 20080c0 <rtems_aio_enqueue+0x1e8>
20080b0: 11 00 80 7e sethi %hi(0x201f800), %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);
20080b4: 7f ff fe dd call 2007c28 <rtems_aio_insert_prio>
20080b8: 01 00 00 00 nop
if (aio_request_queue.idle_threads > 0)
20080bc: 11 00 80 7e sethi %hi(0x201f800), %o0
20080c0: 90 12 21 bc or %o0, 0x1bc, %o0 ! 201f9bc <aio_request_queue>
20080c4: c2 02 20 68 ld [ %o0 + 0x68 ], %g1
20080c8: 80 a0 60 00 cmp %g1, 0
20080cc: 24 80 00 05 ble,a 20080e0 <rtems_aio_enqueue+0x208> <== ALWAYS TAKEN
20080d0: 11 00 80 7e sethi %hi(0x201f800), %o0
pthread_cond_signal (&aio_request_queue.new_req);
20080d4: 40 00 00 e5 call 2008468 <pthread_cond_signal> <== NOT EXECUTED
20080d8: 90 02 20 04 add %o0, 4, %o0 ! 201f804 <__nlocale_changed> <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
20080dc: 11 00 80 7e sethi %hi(0x201f800), %o0
20080e0: 40 00 02 27 call 200897c <pthread_mutex_unlock>
20080e4: 90 12 21 bc or %o0, 0x1bc, %o0 ! 201f9bc <aio_request_queue>
return 0;
}
20080e8: 81 c7 e0 08 ret
20080ec: 81 e8 00 00 restore
020079b0 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
20079b0: 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);
20079b4: 3b 00 80 7e sethi %hi(0x201f800), %i5
20079b8: ba 17 61 bc or %i5, 0x1bc, %i5 ! 201f9bc <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)) {
20079bc: 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 &&
20079c0: 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,
20079c4: 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);
20079c8: b6 06 20 1c add %i0, 0x1c, %i3
20079cc: 40 00 03 cb call 20088f8 <pthread_mutex_lock>
20079d0: 90 10 00 1b mov %i3, %o0
if (result != 0)
20079d4: 80 a2 20 00 cmp %o0, 0
20079d8: 12 80 00 91 bne 2007c1c <rtems_aio_handle+0x26c> <== NEVER TAKEN
20079dc: 82 06 20 0c add %i0, 0xc, %g1
20079e0: 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)) {
20079e4: 80 a7 00 01 cmp %i4, %g1
20079e8: 02 80 00 3b be 2007ad4 <rtems_aio_handle+0x124>
20079ec: 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);
20079f0: 40 00 05 d6 call 2009148 <pthread_self>
20079f4: 01 00 00 00 nop
20079f8: 92 07 bf d8 add %fp, -40, %o1
20079fc: 40 00 04 e3 call 2008d88 <pthread_getschedparam>
2007a00: 94 07 bf e4 add %fp, -28, %o2
param.sched_priority = req->priority;
2007a04: c2 07 20 0c ld [ %i4 + 0xc ], %g1
pthread_setschedparam (pthread_self(), req->policy, ¶m);
2007a08: 40 00 05 d0 call 2009148 <pthread_self>
2007a0c: c2 27 bf e4 st %g1, [ %fp + -28 ]
2007a10: d2 07 20 08 ld [ %i4 + 8 ], %o1
2007a14: 40 00 05 d1 call 2009158 <pthread_setschedparam>
2007a18: 94 07 bf e4 add %fp, -28, %o2
2007a1c: 40 00 0a 5a call 200a384 <_Chain_Extract>
2007a20: 90 10 00 1c mov %i4, %o0
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
2007a24: 40 00 03 d6 call 200897c <pthread_mutex_unlock>
2007a28: 90 10 00 1b mov %i3, %o0
switch (req->aiocbp->aio_lio_opcode) {
2007a2c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
2007a30: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
2007a34: 80 a0 a0 02 cmp %g2, 2
2007a38: 22 80 00 10 be,a 2007a78 <rtems_aio_handle+0xc8>
2007a3c: c4 18 60 08 ldd [ %g1 + 8 ], %g2
2007a40: 80 a0 a0 03 cmp %g2, 3
2007a44: 02 80 00 15 be 2007a98 <rtems_aio_handle+0xe8> <== NEVER TAKEN
2007a48: 80 a0 a0 01 cmp %g2, 1
2007a4c: 32 80 00 19 bne,a 2007ab0 <rtems_aio_handle+0x100> <== NEVER TAKEN
2007a50: f8 07 20 14 ld [ %i4 + 0x14 ], %i4 <== NOT EXECUTED
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
2007a54: c4 18 60 08 ldd [ %g1 + 8 ], %g2
2007a58: d0 00 40 00 ld [ %g1 ], %o0
2007a5c: d2 00 60 10 ld [ %g1 + 0x10 ], %o1
2007a60: d4 00 60 14 ld [ %g1 + 0x14 ], %o2
2007a64: 96 10 00 02 mov %g2, %o3
2007a68: 40 00 2a d0 call 20125a8 <pread>
2007a6c: 98 10 00 03 mov %g3, %o4
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
2007a70: 10 80 00 0d b 2007aa4 <rtems_aio_handle+0xf4>
2007a74: 80 a2 3f ff cmp %o0, -1
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
2007a78: d0 00 40 00 ld [ %g1 ], %o0
2007a7c: d2 00 60 10 ld [ %g1 + 0x10 ], %o1
2007a80: d4 00 60 14 ld [ %g1 + 0x14 ], %o2
2007a84: 96 10 00 02 mov %g2, %o3
2007a88: 40 00 2b 06 call 20126a0 <pwrite>
2007a8c: 98 10 00 03 mov %g3, %o4
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
2007a90: 10 80 00 05 b 2007aa4 <rtems_aio_handle+0xf4>
2007a94: 80 a2 3f ff cmp %o0, -1
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
2007a98: 40 00 1a a8 call 200e538 <fsync> <== NOT EXECUTED
2007a9c: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
2007aa0: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2007aa4: 32 80 00 09 bne,a 2007ac8 <rtems_aio_handle+0x118> <== ALWAYS TAKEN
2007aa8: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
req->aiocbp->return_value = -1;
2007aac: f8 07 20 14 ld [ %i4 + 0x14 ], %i4 <== NOT EXECUTED
2007ab0: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
req->aiocbp->error_code = errno;
2007ab4: 40 00 27 b7 call 2011990 <__errno> <== NOT EXECUTED
2007ab8: c2 27 20 38 st %g1, [ %i4 + 0x38 ] <== NOT EXECUTED
2007abc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2007ac0: 10 bf ff c2 b 20079c8 <rtems_aio_handle+0x18> <== NOT EXECUTED
2007ac4: c2 27 20 34 st %g1, [ %i4 + 0x34 ] <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
2007ac8: d0 20 60 38 st %o0, [ %g1 + 0x38 ]
req->aiocbp->error_code = 0;
2007acc: 10 bf ff bf b 20079c8 <rtems_aio_handle+0x18>
2007ad0: 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);
2007ad4: 40 00 03 aa call 200897c <pthread_mutex_unlock>
2007ad8: 90 10 00 1b mov %i3, %o0
pthread_mutex_lock (&aio_request_queue.mutex);
2007adc: 40 00 03 87 call 20088f8 <pthread_mutex_lock>
2007ae0: 90 10 00 1d mov %i5, %o0
if (rtems_chain_is_empty (chain))
2007ae4: c2 06 20 08 ld [ %i0 + 8 ], %g1
2007ae8: 80 a0 40 1c cmp %g1, %i4
2007aec: 12 80 00 48 bne 2007c0c <rtems_aio_handle+0x25c> <== NEVER TAKEN
2007af0: 92 07 bf dc add %fp, -36, %o1
{
clock_gettime (CLOCK_REALTIME, &timeout);
2007af4: 40 00 01 c9 call 2008218 <clock_gettime>
2007af8: 90 10 20 01 mov 1, %o0
timeout.tv_sec += 3;
2007afc: c2 07 bf dc ld [ %fp + -36 ], %g1
timeout.tv_nsec = 0;
2007b00: 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;
2007b04: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
2007b08: 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;
2007b0c: c2 27 bf dc st %g1, [ %fp + -36 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
2007b10: 90 10 00 1c mov %i4, %o0
2007b14: 92 10 00 1d mov %i5, %o1
2007b18: 40 00 02 71 call 20084dc <pthread_cond_timedwait>
2007b1c: 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) {
2007b20: 80 a2 20 74 cmp %o0, 0x74
2007b24: 12 80 00 3a bne 2007c0c <rtems_aio_handle+0x25c> <== NEVER TAKEN
2007b28: 01 00 00 00 nop
2007b2c: 40 00 0a 16 call 200a384 <_Chain_Extract>
2007b30: 90 10 00 18 mov %i0, %o0
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
2007b34: 40 00 02 c4 call 2008644 <pthread_mutex_destroy>
2007b38: 90 10 00 1b mov %i3, %o0
pthread_cond_destroy (&r_chain->cond);
2007b3c: 40 00 01 e5 call 20082d0 <pthread_cond_destroy>
2007b40: 90 10 00 1c mov %i4, %o0
free (r_chain);
2007b44: 7f ff ef fc call 2003b34 <free>
2007b48: 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)) {
2007b4c: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
2007b50: 80 a0 40 1a cmp %g1, %i2
2007b54: 12 80 00 1b bne 2007bc0 <rtems_aio_handle+0x210>
2007b58: 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);
2007b5c: 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;
2007b60: 82 00 60 01 inc %g1
2007b64: c2 27 60 68 st %g1, [ %i5 + 0x68 ]
--aio_request_queue.active_threads;
2007b68: c2 07 60 64 ld [ %i5 + 0x64 ], %g1
clock_gettime (CLOCK_REALTIME, &timeout);
2007b6c: 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;
2007b70: 82 00 7f ff add %g1, -1, %g1
clock_gettime (CLOCK_REALTIME, &timeout);
2007b74: 40 00 01 a9 call 2008218 <clock_gettime>
2007b78: c2 27 60 64 st %g1, [ %i5 + 0x64 ]
timeout.tv_sec += 3;
2007b7c: c2 07 bf dc ld [ %fp + -36 ], %g1
timeout.tv_nsec = 0;
2007b80: 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;
2007b84: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
2007b88: 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;
2007b8c: c2 27 bf dc st %g1, [ %fp + -36 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
2007b90: 92 10 00 1d mov %i5, %o1
2007b94: 40 00 02 52 call 20084dc <pthread_cond_timedwait>
2007b98: 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) {
2007b9c: 80 a2 20 74 cmp %o0, 0x74
2007ba0: 12 80 00 08 bne 2007bc0 <rtems_aio_handle+0x210> <== NEVER TAKEN
2007ba4: c2 07 60 68 ld [ %i5 + 0x68 ], %g1
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
pthread_mutex_unlock (&aio_request_queue.mutex);
2007ba8: 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;
2007bac: 82 00 7f ff add %g1, -1, %g1
pthread_mutex_unlock (&aio_request_queue.mutex);
2007bb0: 40 00 03 73 call 200897c <pthread_mutex_unlock>
2007bb4: c2 27 60 68 st %g1, [ %i5 + 0x68 ]
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
2007bb8: 81 c7 e0 08 ret
2007bbc: 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;
2007bc0: 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;
2007bc4: 82 00 7f ff add %g1, -1, %g1
2007bc8: c2 27 60 68 st %g1, [ %i5 + 0x68 ]
++aio_request_queue.active_threads;
2007bcc: c2 07 60 64 ld [ %i5 + 0x64 ], %g1
2007bd0: 90 10 00 18 mov %i0, %o0
2007bd4: 82 00 60 01 inc %g1
2007bd8: 40 00 09 eb call 200a384 <_Chain_Extract>
2007bdc: c2 27 60 64 st %g1, [ %i5 + 0x64 ]
2007be0: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
2007be4: 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 &&
2007be8: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
2007bec: 80 a0 c0 02 cmp %g3, %g2
2007bf0: 16 80 00 04 bge 2007c00 <rtems_aio_handle+0x250>
2007bf4: 80 a0 40 19 cmp %g1, %i1
2007bf8: 32 bf ff fc bne,a 2007be8 <rtems_aio_handle+0x238> <== ALWAYS TAKEN
2007bfc: 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 );
2007c00: d0 00 60 04 ld [ %g1 + 4 ], %o0
2007c04: 40 00 09 f9 call 200a3e8 <_Chain_Insert>
2007c08: 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);
2007c0c: 40 00 03 5c call 200897c <pthread_mutex_unlock>
2007c10: 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);
2007c14: 10 bf ff 6e b 20079cc <rtems_aio_handle+0x1c>
2007c18: b6 06 20 1c add %i0, 0x1c, %i3
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
2007c1c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2007c20: 81 c7 e0 08 ret <== NOT EXECUTED
2007c24: 81 e8 00 00 restore <== NOT EXECUTED
02007c88 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
2007c88: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
2007c8c: 3b 00 80 7e sethi %hi(0x201f800), %i5
2007c90: 40 00 03 93 call 2008adc <pthread_attr_init>
2007c94: 90 17 61 c4 or %i5, 0x1c4, %o0 ! 201f9c4 <aio_request_queue+0x8>
if (result != 0)
2007c98: b0 92 20 00 orcc %o0, 0, %i0
2007c9c: 12 80 00 31 bne 2007d60 <rtems_aio_init+0xd8> <== NEVER TAKEN
2007ca0: 90 17 61 c4 or %i5, 0x1c4, %o0
return result;
result =
2007ca4: 40 00 03 9a call 2008b0c <pthread_attr_setdetachstate>
2007ca8: 92 10 20 00 clr %o1
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
2007cac: 80 a2 20 00 cmp %o0, 0
2007cb0: 22 80 00 05 be,a 2007cc4 <rtems_aio_init+0x3c> <== ALWAYS TAKEN
2007cb4: 11 00 80 7e sethi %hi(0x201f800), %o0
pthread_attr_destroy (&aio_request_queue.attr);
2007cb8: 40 00 03 7d call 2008aac <pthread_attr_destroy> <== NOT EXECUTED
2007cbc: 90 17 61 c4 or %i5, 0x1c4, %o0 <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
2007cc0: 11 00 80 7e sethi %hi(0x201f800), %o0 <== NOT EXECUTED
2007cc4: 92 10 20 00 clr %o1
2007cc8: 40 00 02 b4 call 2008798 <pthread_mutex_init>
2007ccc: 90 12 21 bc or %o0, 0x1bc, %o0
if (result != 0)
2007cd0: 80 a2 20 00 cmp %o0, 0
2007cd4: 22 80 00 06 be,a 2007cec <rtems_aio_init+0x64> <== ALWAYS TAKEN
2007cd8: 11 00 80 7e sethi %hi(0x201f800), %o0
pthread_attr_destroy (&aio_request_queue.attr);
2007cdc: 11 00 80 7e sethi %hi(0x201f800), %o0 <== NOT EXECUTED
2007ce0: 40 00 03 73 call 2008aac <pthread_attr_destroy> <== NOT EXECUTED
2007ce4: 90 12 21 c4 or %o0, 0x1c4, %o0 ! 201f9c4 <aio_request_queue+0x8><== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
2007ce8: 11 00 80 7e sethi %hi(0x201f800), %o0 <== NOT EXECUTED
2007cec: 92 10 20 00 clr %o1
2007cf0: 40 00 01 af call 20083ac <pthread_cond_init>
2007cf4: 90 12 21 c0 or %o0, 0x1c0, %o0
if (result != 0) {
2007cf8: b0 92 20 00 orcc %o0, 0, %i0
2007cfc: 02 80 00 09 be 2007d20 <rtems_aio_init+0x98> <== ALWAYS TAKEN
2007d00: 03 00 80 7e sethi %hi(0x201f800), %g1
pthread_mutex_destroy (&aio_request_queue.mutex);
2007d04: 11 00 80 7e sethi %hi(0x201f800), %o0 <== NOT EXECUTED
2007d08: 40 00 02 4f call 2008644 <pthread_mutex_destroy> <== NOT EXECUTED
2007d0c: 90 12 21 bc or %o0, 0x1bc, %o0 ! 201f9bc <aio_request_queue><== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
2007d10: 11 00 80 7e sethi %hi(0x201f800), %o0 <== NOT EXECUTED
2007d14: 40 00 03 66 call 2008aac <pthread_attr_destroy> <== NOT EXECUTED
2007d18: 90 12 21 c4 or %o0, 0x1c4, %o0 ! 201f9c4 <aio_request_queue+0x8><== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007d1c: 03 00 80 7e sethi %hi(0x201f800), %g1 <== NOT EXECUTED
2007d20: 82 10 61 bc or %g1, 0x1bc, %g1 ! 201f9bc <aio_request_queue>
2007d24: 84 00 60 4c add %g1, 0x4c, %g2
2007d28: c4 20 60 48 st %g2, [ %g1 + 0x48 ]
head->previous = NULL;
tail->previous = head;
2007d2c: 84 00 60 48 add %g1, 0x48, %g2
2007d30: 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;
2007d34: 84 00 60 58 add %g1, 0x58, %g2
2007d38: c4 20 60 54 st %g2, [ %g1 + 0x54 ]
head->previous = NULL;
tail->previous = head;
2007d3c: 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;
2007d40: c0 20 60 4c clr [ %g1 + 0x4c ]
tail->previous = head;
2007d44: 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;
2007d48: 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;
2007d4c: 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;
2007d50: c0 20 60 64 clr [ %g1 + 0x64 ]
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
2007d54: 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;
2007d58: c0 20 60 68 clr [ %g1 + 0x68 ]
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
2007d5c: c4 20 60 60 st %g2, [ %g1 + 0x60 ]
return result;
}
2007d60: 81 c7 e0 08 ret
2007d64: 81 e8 00 00 restore
02007c28 <rtems_aio_insert_prio>:
2007c28: 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 );
2007c2c: 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)) {
2007c30: 80 a0 40 03 cmp %g1, %g3
2007c34: 02 80 00 0e be 2007c6c <rtems_aio_insert_prio+0x44> <== NEVER TAKEN
2007c38: 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;
2007c3c: c8 00 60 14 ld [ %g1 + 0x14 ], %g4
while (req->aiocbp->aio_reqprio > prio &&
2007c40: 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;
2007c44: c8 01 20 18 ld [ %g4 + 0x18 ], %g4
while (req->aiocbp->aio_reqprio > prio &&
2007c48: 10 80 00 04 b 2007c58 <rtems_aio_insert_prio+0x30>
2007c4c: 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;
2007c50: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 <== NOT EXECUTED
2007c54: 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 &&
2007c58: 80 a3 40 04 cmp %o5, %g4
2007c5c: 14 80 00 07 bg 2007c78 <rtems_aio_insert_prio+0x50> <== NEVER TAKEN
2007c60: 80 a0 40 03 cmp %g1, %g3
2007c64: d0 00 60 04 ld [ %g1 + 4 ], %o0
2007c68: 92 10 00 02 mov %g2, %o1
2007c6c: 82 13 c0 00 mov %o7, %g1
2007c70: 40 00 09 de call 200a3e8 <_Chain_Insert>
2007c74: 9e 10 40 00 mov %g1, %o7
2007c78: 32 bf ff f6 bne,a 2007c50 <rtems_aio_insert_prio+0x28> <== NOT EXECUTED
2007c7c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2007c80: 10 bf ff fa b 2007c68 <rtems_aio_insert_prio+0x40> <== NOT EXECUTED
2007c84: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
02007e58 <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)
{
2007e58: 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;
2007e5c: 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 );
2007e60: 82 06 20 04 add %i0, 4, %g1
if (rtems_chain_is_empty (chain))
2007e64: 80 a7 40 01 cmp %i5, %g1
2007e68: 12 80 00 09 bne 2007e8c <rtems_aio_remove_req+0x34>
2007e6c: b0 10 20 02 mov 2, %i0
2007e70: 81 c7 e0 08 ret
2007e74: 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) {
2007e78: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
2007e7c: 32 80 00 05 bne,a 2007e90 <rtems_aio_remove_req+0x38> <== NOT EXECUTED
2007e80: 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;
2007e84: 81 c7 e0 08 ret <== NOT EXECUTED
2007e88: 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) {
2007e8c: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
2007e90: 80 a0 80 19 cmp %g2, %i1
2007e94: 32 bf ff f9 bne,a 2007e78 <rtems_aio_remove_req+0x20> <== NEVER TAKEN
2007e98: 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))
2007e9c: 80 a7 40 01 cmp %i5, %g1
2007ea0: 02 bf ff f4 be 2007e70 <rtems_aio_remove_req+0x18> <== NEVER TAKEN
2007ea4: b0 10 20 01 mov 1, %i0
2007ea8: 40 00 09 37 call 200a384 <_Chain_Extract>
2007eac: 90 10 00 1d mov %i5, %o0
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
2007eb0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2007eb4: 84 10 20 8c mov 0x8c, %g2
2007eb8: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
current->aiocbp->return_value = -1;
2007ebc: 84 10 3f ff mov -1, %g2
free (current);
2007ec0: 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;
2007ec4: c4 20 60 38 st %g2, [ %g1 + 0x38 ]
free (current);
2007ec8: 7f ff ef 1b call 2003b34 <free>
2007ecc: b0 10 20 00 clr %i0
}
return AIO_CANCELED;
}
2007ed0: 81 c7 e0 08 ret
2007ed4: 81 e8 00 00 restore
02008338 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
2008338: 9d e3 bf 98 save %sp, -104, %sp
200833c: 30 80 00 08 b,a 200835c <rtems_chain_get_with_wait+0x24>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
2008340: 92 10 20 00 clr %o1
2008344: 94 10 00 1a mov %i2, %o2
2008348: 7f ff fc fb call 2007734 <rtems_event_receive>
200834c: 96 07 bf fc add %fp, -4, %o3
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
2008350: 80 a2 20 00 cmp %o0, 0
2008354: 32 80 00 09 bne,a 2008378 <rtems_chain_get_with_wait+0x40><== ALWAYS TAKEN
2008358: 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 );
200835c: 40 00 01 95 call 20089b0 <_Chain_Get>
2008360: 90 10 00 18 mov %i0, %o0
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
2008364: ba 92 20 00 orcc %o0, 0, %i5
2008368: 02 bf ff f6 be 2008340 <rtems_chain_get_with_wait+0x8>
200836c: 90 10 00 19 mov %i1, %o0
2008370: 90 10 20 00 clr %o0
timeout,
&out
);
}
*node_ptr = node;
2008374: fa 26 c0 00 st %i5, [ %i3 ]
return sc;
}
2008378: 81 c7 e0 08 ret
200837c: 91 e8 00 08 restore %g0, %o0, %o0
02011074 <rtems_event_system_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
2011074: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc;
if ( event_out != NULL ) {
2011078: 80 a6 e0 00 cmp %i3, 0
201107c: 02 80 00 1e be 20110f4 <rtems_event_system_receive+0x80> <== NEVER TAKEN
2011080: 82 10 20 09 mov 9, %g1
Thread_Control *executing = _Thread_Executing;
2011084: 03 00 80 87 sethi %hi(0x2021c00), %g1
2011088: fa 00 63 20 ld [ %g1 + 0x320 ], %i5 ! 2021f20 <_Per_CPU_Information+0x10>
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
201108c: 80 a6 20 00 cmp %i0, 0
2011090: 02 80 00 16 be 20110e8 <rtems_event_system_receive+0x74> <== NEVER TAKEN
2011094: da 07 61 58 ld [ %i5 + 0x158 ], %o5
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
2011098: 03 00 80 86 sethi %hi(0x2021800), %g1
201109c: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 20219f0 <_Thread_Dispatch_disable_level>
++level;
20110a0: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
20110a4: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
_Thread_Disable_dispatch();
_Event_Seize(
20110a8: 03 00 80 88 sethi %hi(0x2022000), %g1
20110ac: 82 10 63 10 or %g1, 0x310, %g1 ! 2022310 <_System_event_Sync_state>
20110b0: 90 10 00 18 mov %i0, %o0
20110b4: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20110b8: 92 10 00 19 mov %i1, %o1
20110bc: 03 00 01 00 sethi %hi(0x40000), %g1
20110c0: 94 10 00 1a mov %i2, %o2
20110c4: 96 10 00 1b mov %i3, %o3
20110c8: 98 10 00 1d mov %i5, %o4
20110cc: 9a 03 60 04 add %o5, 4, %o5
20110d0: 7f ff dd 1c call 2008540 <_Event_Seize>
20110d4: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
executing,
event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
20110d8: 7f ff e8 9d call 200b34c <_Thread_Enable_dispatch>
20110dc: 01 00 00 00 nop
sc = executing->Wait.return_code;
20110e0: 10 80 00 05 b 20110f4 <rtems_event_system_receive+0x80>
20110e4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
} else {
*event_out = event->pending_events;
20110e8: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED
20110ec: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
20110f0: 82 10 20 00 clr %g1 <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_ADDRESS;
}
return sc;
}
20110f4: 81 c7 e0 08 ret
20110f8: 91 e8 00 01 restore %g0, %g1, %o0
0200789c <rtems_event_system_send>:
rtems_status_code rtems_event_system_send(
rtems_id id,
rtems_event_set event_in
)
{
200789c: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc;
Thread_Control *thread;
Objects_Locations location;
RTEMS_API_Control *api;
thread = _Thread_Get( id, &location );
20078a0: 90 10 00 18 mov %i0, %o0
20078a4: 40 00 09 f7 call 200a080 <_Thread_Get>
20078a8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20078ac: c4 07 bf fc ld [ %fp + -4 ], %g2
20078b0: 80 a0 a0 00 cmp %g2, 0
20078b4: 12 80 00 0d bne 20078e8 <rtems_event_system_send+0x4c> <== NEVER TAKEN
20078b8: 92 10 00 19 mov %i1, %o1
case OBJECTS_LOCAL:
api = thread->API_Extensions[ THREAD_API_RTEMS ];
_Event_Surrender(
20078bc: d4 02 21 58 ld [ %o0 + 0x158 ], %o2
20078c0: 94 02 a0 04 add %o2, 4, %o2
20078c4: 19 00 01 00 sethi %hi(0x40000), %o4
20078c8: 17 00 80 77 sethi %hi(0x201dc00), %o3
20078cc: 96 12 e2 f0 or %o3, 0x2f0, %o3 ! 201def0 <_System_event_Sync_state>
20078d0: 7f ff fe 64 call 2007260 <_Event_Surrender>
20078d4: b0 10 20 00 clr %i0
event_in,
&api->System_event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
20078d8: 40 00 09 de call 200a050 <_Thread_Enable_dispatch>
20078dc: 01 00 00 00 nop
sc = RTEMS_SUCCESSFUL;
break;
20078e0: 81 c7 e0 08 ret
20078e4: 81 e8 00 00 restore
sc = RTEMS_INVALID_ID;
break;
}
return sc;
}
20078e8: 81 c7 e0 08 ret <== NOT EXECUTED
20078ec: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED
0200a3b8 <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)
{
200a3b8: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
200a3bc: ba 10 20 01 mov 1, %i5
200a3c0: 80 a6 20 00 cmp %i0, 0
200a3c4: 02 80 00 0d be 200a3f8 <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
200a3c8: 35 00 80 80 sethi %hi(0x2020000), %i2
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
200a3cc: 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 ];
200a3d0: 84 16 a1 74 or %i2, 0x174, %g2
200a3d4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200a3d8: f6 00 60 04 ld [ %g1 + 4 ], %i3
if ( !information )
200a3dc: 80 a6 e0 00 cmp %i3, 0
200a3e0: 12 80 00 0f bne 200a41c <rtems_iterate_over_all_threads+0x64>
200a3e4: b8 10 20 01 mov 1, %i4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
200a3e8: ba 07 60 01 inc %i5
200a3ec: 80 a7 60 04 cmp %i5, 4
200a3f0: 12 bf ff f8 bne 200a3d0 <rtems_iterate_over_all_threads+0x18>
200a3f4: 83 2f 60 02 sll %i5, 2, %g1
200a3f8: 81 c7 e0 08 ret
200a3fc: 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 ];
200a400: 83 2f 20 02 sll %i4, 2, %g1
200a404: d0 00 80 01 ld [ %g2 + %g1 ], %o0
if ( !the_thread )
200a408: 80 a2 20 00 cmp %o0, 0
200a40c: 02 80 00 04 be 200a41c <rtems_iterate_over_all_threads+0x64>
200a410: b8 07 20 01 inc %i4
continue;
(*routine)(the_thread);
200a414: 9f c6 00 00 call %i0
200a418: 01 00 00 00 nop
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200a41c: c2 16 e0 10 lduh [ %i3 + 0x10 ], %g1
200a420: 80 a7 00 01 cmp %i4, %g1
200a424: 28 bf ff f7 bleu,a 200a400 <rtems_iterate_over_all_threads+0x48>
200a428: 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++ ) {
200a42c: 10 bf ff f0 b 200a3ec <rtems_iterate_over_all_threads+0x34>
200a430: ba 07 60 01 inc %i5
02008b84 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
2008b84: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
2008b88: 80 a6 20 00 cmp %i0, 0
2008b8c: 02 80 00 38 be 2008c6c <rtems_partition_create+0xe8>
2008b90: 82 10 20 03 mov 3, %g1
return RTEMS_INVALID_NAME;
if ( !starting_address )
2008b94: 80 a6 60 00 cmp %i1, 0
2008b98: 02 80 00 35 be 2008c6c <rtems_partition_create+0xe8>
2008b9c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !id )
2008ba0: 80 a7 60 00 cmp %i5, 0
2008ba4: 02 80 00 32 be 2008c6c <rtems_partition_create+0xe8> <== NEVER TAKEN
2008ba8: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
2008bac: 02 80 00 30 be 2008c6c <rtems_partition_create+0xe8>
2008bb0: 82 10 20 08 mov 8, %g1
2008bb4: 80 a6 a0 00 cmp %i2, 0
2008bb8: 02 80 00 2d be 2008c6c <rtems_partition_create+0xe8>
2008bbc: 80 a6 80 1b cmp %i2, %i3
2008bc0: 0a 80 00 2b bcs 2008c6c <rtems_partition_create+0xe8>
2008bc4: 80 8e e0 07 btst 7, %i3
2008bc8: 12 80 00 29 bne 2008c6c <rtems_partition_create+0xe8>
2008bcc: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
2008bd0: 12 80 00 27 bne 2008c6c <rtems_partition_create+0xe8>
2008bd4: 82 10 20 09 mov 9, %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
2008bd8: 03 00 80 88 sethi %hi(0x2022000), %g1
2008bdc: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 2022090 <_Thread_Dispatch_disable_level>
++level;
2008be0: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
2008be4: c4 20 60 90 st %g2, [ %g1 + 0x90 ]
* 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 );
2008be8: 23 00 80 87 sethi %hi(0x2021c00), %l1
2008bec: 40 00 07 08 call 200a80c <_Objects_Allocate>
2008bf0: 90 14 62 8c or %l1, 0x28c, %o0 ! 2021e8c <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
2008bf4: a0 92 20 00 orcc %o0, 0, %l0
2008bf8: 32 80 00 06 bne,a 2008c10 <rtems_partition_create+0x8c>
2008bfc: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
_Thread_Enable_dispatch();
2008c00: 40 00 0c 3a call 200bce8 <_Thread_Enable_dispatch>
2008c04: 01 00 00 00 nop
return RTEMS_TOO_MANY;
2008c08: 10 80 00 19 b 2008c6c <rtems_partition_create+0xe8>
2008c0c: 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 );
2008c10: 92 10 00 1b mov %i3, %o1
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
2008c14: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_partition->length = length;
2008c18: f4 24 20 14 st %i2, [ %l0 + 0x14 ]
the_partition->buffer_size = buffer_size;
2008c1c: f6 24 20 18 st %i3, [ %l0 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
2008c20: c0 24 20 20 clr [ %l0 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
2008c24: 40 00 46 0e call 201a45c <.udiv>
2008c28: 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,
2008c2c: 92 10 00 19 mov %i1, %o1
length / buffer_size, buffer_size );
2008c30: 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,
2008c34: 96 10 00 1b mov %i3, %o3
2008c38: b8 04 20 24 add %l0, 0x24, %i4
2008c3c: 40 00 04 74 call 2009e0c <_Chain_Initialize>
2008c40: 90 10 00 1c mov %i4, %o0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2008c44: c4 14 20 0a lduh [ %l0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008c48: a2 14 62 8c or %l1, 0x28c, %l1
2008c4c: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2008c50: c2 04 20 08 ld [ %l0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008c54: 85 28 a0 02 sll %g2, 2, %g2
2008c58: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2008c5c: f0 24 20 0c st %i0, [ %l0 + 0xc ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
2008c60: 40 00 0c 22 call 200bce8 <_Thread_Enable_dispatch>
2008c64: c2 27 40 00 st %g1, [ %i5 ]
return RTEMS_SUCCESSFUL;
2008c68: 82 10 20 00 clr %g1
}
2008c6c: 81 c7 e0 08 ret
2008c70: 91 e8 00 01 restore %g0, %g1, %o0
02016364 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
2016364: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
2016368: 11 00 80 f1 sethi %hi(0x203c400), %o0
201636c: 92 10 00 18 mov %i0, %o1
2016370: 90 12 23 ac or %o0, 0x3ac, %o0
2016374: 40 00 14 2b call 201b420 <_Objects_Get>
2016378: 94 07 bf fc add %fp, -4, %o2
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
201637c: c2 07 bf fc ld [ %fp + -4 ], %g1
2016380: 80 a0 60 00 cmp %g1, 0
2016384: 12 80 00 21 bne 2016408 <rtems_partition_return_buffer+0xa4>
2016388: ba 10 00 08 mov %o0, %i5
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
201638c: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
2016390: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2016394: 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 ) &&
2016398: 80 a6 40 01 cmp %i1, %g1
201639c: 18 80 00 0b bgu 20163c8 <rtems_partition_return_buffer+0x64><== NEVER TAKEN
20163a0: 82 10 20 00 clr %g1
20163a4: 80 a6 40 08 cmp %i1, %o0
20163a8: 0a 80 00 09 bcs 20163cc <rtems_partition_return_buffer+0x68>
20163ac: 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);
20163b0: d2 07 60 18 ld [ %i5 + 0x18 ], %o1
20163b4: 40 00 58 13 call 202c400 <.urem>
20163b8: 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 ) &&
20163bc: 80 a0 00 08 cmp %g0, %o0
20163c0: 10 80 00 02 b 20163c8 <rtems_partition_return_buffer+0x64>
20163c4: 82 60 3f ff subx %g0, -1, %g1
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
20163c8: 80 a0 60 00 cmp %g1, 0
20163cc: 02 80 00 0b be 20163f8 <rtems_partition_return_buffer+0x94>
20163d0: 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 );
20163d4: 40 00 0c 98 call 2019634 <_Chain_Append>
20163d8: 92 10 00 19 mov %i1, %o1
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
20163dc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
20163e0: 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;
20163e4: 82 00 7f ff add %g1, -1, %g1
_Thread_Enable_dispatch();
20163e8: 40 00 17 f0 call 201c3a8 <_Thread_Enable_dispatch>
20163ec: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
20163f0: 81 c7 e0 08 ret
20163f4: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
20163f8: 40 00 17 ec call 201c3a8 <_Thread_Enable_dispatch>
20163fc: b0 10 20 09 mov 9, %i0
2016400: 81 c7 e0 08 ret
2016404: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016408: 81 c7 e0 08 ret
201640c: 91 e8 20 04 restore %g0, 4, %o0
02033028 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2033028: 9d e3 bf 98 save %sp, -104, %sp
203302c: 11 00 81 8a sethi %hi(0x2062800), %o0
2033030: 92 10 00 18 mov %i0, %o1
2033034: 90 12 23 24 or %o0, 0x324, %o0
2033038: 7f ff 57 6f call 2008df4 <_Objects_Get>
203303c: 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 ) {
2033040: c2 07 bf fc ld [ %fp + -4 ], %g1
2033044: 80 a0 60 00 cmp %g1, 0
2033048: 12 80 00 6a bne 20331f0 <rtems_rate_monotonic_period+0x1c8>
203304c: ba 10 00 08 mov %o0, %i5
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
2033050: 37 00 81 89 sethi %hi(0x2062400), %i3
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2033054: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
2033058: b6 16 e1 60 or %i3, 0x160, %i3
203305c: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
2033060: 80 a0 80 01 cmp %g2, %g1
2033064: 02 80 00 06 be 203307c <rtems_rate_monotonic_period+0x54>
2033068: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
203306c: 7f ff 5b 1a call 2009cd4 <_Thread_Enable_dispatch>
2033070: b0 10 20 17 mov 0x17, %i0
2033074: 81 c7 e0 08 ret
2033078: 81 e8 00 00 restore
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
203307c: 12 80 00 0d bne 20330b0 <rtems_rate_monotonic_period+0x88>
2033080: 01 00 00 00 nop
switch ( the_period->state ) {
2033084: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2033088: 80 a0 60 04 cmp %g1, 4
203308c: 18 80 00 05 bgu 20330a0 <rtems_rate_monotonic_period+0x78><== NEVER TAKEN
2033090: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2033094: 05 00 81 6f sethi %hi(0x205bc00), %g2
2033098: 84 10 a1 90 or %g2, 0x190, %g2 ! 205bd90 <CSWTCH.24>
203309c: 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();
20330a0: 7f ff 5b 0d call 2009cd4 <_Thread_Enable_dispatch>
20330a4: 01 00 00 00 nop
20330a8: 81 c7 e0 08 ret
20330ac: 81 e8 00 00 restore
return( return_value );
}
_ISR_Disable( level );
20330b0: 7f ff 3c a8 call 2002350 <sparc_disable_interrupts>
20330b4: 01 00 00 00 nop
20330b8: b4 10 00 08 mov %o0, %i2
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
20330bc: f8 07 60 38 ld [ %i5 + 0x38 ], %i4
20330c0: 80 a7 20 00 cmp %i4, 0
20330c4: 12 80 00 15 bne 2033118 <rtems_rate_monotonic_period+0xf0>
20330c8: 80 a7 20 02 cmp %i4, 2
_ISR_Enable( level );
20330cc: 7f ff 3c a5 call 2002360 <sparc_enable_interrupts>
20330d0: 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 );
20330d4: 90 10 00 1d mov %i5, %o0
20330d8: 7f ff ff b8 call 2032fb8 <_Rate_monotonic_Initiate_statistics>
20330dc: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
the_period->state = RATE_MONOTONIC_ACTIVE;
20330e0: 82 10 20 02 mov 2, %g1
20330e4: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20330e8: 03 00 80 cc sethi %hi(0x2033000), %g1
20330ec: 82 10 61 fc or %g1, 0x1fc, %g1 ! 20331fc <_Rate_monotonic_Timeout>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20330f0: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
20330f4: c2 27 60 2c st %g1, [ %i5 + 0x2c ]
the_watchdog->id = id;
20330f8: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
the_watchdog->user_data = user_data;
20330fc: c0 27 60 34 clr [ %i5 + 0x34 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2033100: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2033104: 11 00 81 88 sethi %hi(0x2062000), %o0
2033108: 92 07 60 10 add %i5, 0x10, %o1
203310c: 7f ff 5e 17 call 200a968 <_Watchdog_Insert>
2033110: 90 12 20 dc or %o0, 0xdc, %o0
2033114: 30 80 00 1b b,a 2033180 <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 ) {
2033118: 12 80 00 1e bne 2033190 <rtems_rate_monotonic_period+0x168>
203311c: 80 a7 20 04 cmp %i4, 4
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
2033120: 7f ff ff 5d call 2032e94 <_Rate_monotonic_Update_statistics>
2033124: 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;
2033128: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
203312c: 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;
2033130: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
2033134: 7f ff 3c 8b call 2002360 <sparc_enable_interrupts>
2033138: 90 10 00 1a mov %i2, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
203313c: d0 06 e0 10 ld [ %i3 + 0x10 ], %o0
2033140: c2 07 60 08 ld [ %i5 + 8 ], %g1
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2033144: 13 00 00 10 sethi %hi(0x4000), %o1
2033148: 7f ff 5d 1b call 200a5b4 <_Thread_Set_state>
203314c: c2 22 20 20 st %g1, [ %o0 + 0x20 ]
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
2033150: 7f ff 3c 80 call 2002350 <sparc_disable_interrupts>
2033154: 01 00 00 00 nop
local_state = the_period->state;
2033158: f4 07 60 38 ld [ %i5 + 0x38 ], %i2
the_period->state = RATE_MONOTONIC_ACTIVE;
203315c: f8 27 60 38 st %i4, [ %i5 + 0x38 ]
_ISR_Enable( level );
2033160: 7f ff 3c 80 call 2002360 <sparc_enable_interrupts>
2033164: 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 )
2033168: 80 a6 a0 03 cmp %i2, 3
203316c: 12 80 00 05 bne 2033180 <rtems_rate_monotonic_period+0x158>
2033170: 01 00 00 00 nop
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2033174: d0 06 e0 10 ld [ %i3 + 0x10 ], %o0
2033178: 7f ff 59 e9 call 200991c <_Thread_Clear_state>
203317c: 13 00 00 10 sethi %hi(0x4000), %o1
_Thread_Enable_dispatch();
2033180: 7f ff 5a d5 call 2009cd4 <_Thread_Enable_dispatch>
2033184: b0 10 20 00 clr %i0
2033188: 81 c7 e0 08 ret
203318c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
2033190: 12 bf ff b9 bne 2033074 <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
2033194: b0 10 20 04 mov 4, %i0
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2033198: 7f ff ff 3f call 2032e94 <_Rate_monotonic_Update_statistics>
203319c: 90 10 00 1d mov %i5, %o0
_ISR_Enable( level );
20331a0: 7f ff 3c 70 call 2002360 <sparc_enable_interrupts>
20331a4: 90 10 00 1a mov %i2, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
20331a8: 82 10 20 02 mov 2, %g1
20331ac: 92 07 60 10 add %i5, 0x10, %o1
20331b0: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
20331b4: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20331b8: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20331bc: 11 00 81 88 sethi %hi(0x2062000), %o0
20331c0: 7f ff 5d ea call 200a968 <_Watchdog_Insert>
20331c4: 90 12 20 dc or %o0, 0xdc, %o0 ! 20620dc <_Watchdog_Ticks_chain>
20331c8: d0 07 60 40 ld [ %i5 + 0x40 ], %o0
20331cc: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
20331d0: 03 00 81 77 sethi %hi(0x205dc00), %g1
20331d4: c2 00 61 04 ld [ %g1 + 0x104 ], %g1 ! 205dd04 <_Scheduler+0x34>
20331d8: 9f c0 40 00 call %g1
20331dc: 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();
20331e0: 7f ff 5a bd call 2009cd4 <_Thread_Enable_dispatch>
20331e4: 01 00 00 00 nop
20331e8: 81 c7 e0 08 ret
20331ec: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
20331f0: b0 10 20 04 mov 4, %i0
}
20331f4: 81 c7 e0 08 ret
20331f8: 81 e8 00 00 restore
020262f0 <rtems_rate_monotonic_report_statistics_with_plugin>:
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
20262f0: 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 )
20262f4: 80 a6 60 00 cmp %i1, 0
20262f8: 02 80 00 75 be 20264cc <rtems_rate_monotonic_report_statistics_with_plugin+0x1dc><== NEVER TAKEN
20262fc: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
2026300: 13 00 81 63 sethi %hi(0x2058c00), %o1
2026304: 9f c6 40 00 call %i1
2026308: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 2058fe8 <_TOD_Days_per_month+0x68>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
202630c: 90 10 00 18 mov %i0, %o0
2026310: 13 00 81 64 sethi %hi(0x2059000), %o1
2026314: 9f c6 40 00 call %i1
2026318: 92 12 60 08 or %o1, 8, %o1 ! 2059008 <_TOD_Days_per_month+0x88>
(*print)( context, "--- Wall times are in seconds ---\n" );
202631c: 90 10 00 18 mov %i0, %o0
2026320: 13 00 81 64 sethi %hi(0x2059000), %o1
2026324: 9f c6 40 00 call %i1
2026328: 92 12 60 30 or %o1, 0x30, %o1 ! 2059030 <_TOD_Days_per_month+0xb0>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
202632c: 90 10 00 18 mov %i0, %o0
2026330: 13 00 81 64 sethi %hi(0x2059000), %o1
2026334: 9f c6 40 00 call %i1
2026338: 92 12 60 58 or %o1, 0x58, %o1 ! 2059058 <_TOD_Days_per_month+0xd8>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
202633c: 90 10 00 18 mov %i0, %o0
2026340: 13 00 81 64 sethi %hi(0x2059000), %o1
2026344: 9f c6 40 00 call %i1
2026348: 92 12 60 a8 or %o1, 0xa8, %o1 ! 20590a8 <_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 ;
202634c: 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,
2026350: 39 00 81 64 sethi %hi(0x2059000), %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,
2026354: 37 00 81 64 sethi %hi(0x2059000), %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,
2026358: 35 00 81 64 sethi %hi(0x2059000), %i2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
202635c: 21 00 81 69 sethi %hi(0x205a400), %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 ;
2026360: fa 00 63 2c ld [ %g1 + 0x32c ], %i5
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2026364: b8 17 20 f8 or %i4, 0xf8, %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,
2026368: b6 16 e1 10 or %i3, 0x110, %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,
202636c: b4 16 a1 30 or %i2, 0x130, %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 ;
2026370: 10 80 00 52 b 20264b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
2026374: a0 14 21 b8 or %l0, 0x1b8, %l0
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
2026378: 40 00 31 e9 call 2032b1c <rtems_rate_monotonic_get_statistics>
202637c: 92 07 bf c8 add %fp, -56, %o1
if ( status != RTEMS_SUCCESSFUL )
2026380: 80 a2 20 00 cmp %o0, 0
2026384: 32 80 00 4d bne,a 20264b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
2026388: 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 );
202638c: 92 07 bf b0 add %fp, -80, %o1
2026390: 40 00 32 54 call 2032ce0 <rtems_rate_monotonic_get_status>
2026394: 90 10 00 1d mov %i5, %o0
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
2026398: d0 07 bf b0 ld [ %fp + -80 ], %o0
202639c: 92 10 20 05 mov 5, %o1
20263a0: 7f ff a2 bc call 200ee90 <rtems_object_get_name>
20263a4: 94 07 bf a0 add %fp, -96, %o2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
20263a8: d8 1f bf c8 ldd [ %fp + -56 ], %o4
20263ac: 92 10 00 1c mov %i4, %o1
20263b0: 90 10 00 18 mov %i0, %o0
20263b4: 94 10 00 1d mov %i5, %o2
20263b8: 9f c6 40 00 call %i1
20263bc: 96 07 bf a0 add %fp, -96, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
20263c0: d2 07 bf c8 ld [ %fp + -56 ], %o1
20263c4: 80 a2 60 00 cmp %o1, 0
20263c8: 12 80 00 07 bne 20263e4 <rtems_rate_monotonic_report_statistics_with_plugin+0xf4>
20263cc: 94 07 bf a8 add %fp, -88, %o2
(*print)( context, "\n" );
20263d0: 90 10 00 18 mov %i0, %o0
20263d4: 9f c6 40 00 call %i1
20263d8: 92 10 00 10 mov %l0, %o1
continue;
20263dc: 10 80 00 37 b 20264b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
20263e0: 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 );
20263e4: 40 00 02 b7 call 2026ec0 <_Timespec_Divide_by_integer>
20263e8: 90 07 bf e0 add %fp, -32, %o0
(*print)( context,
20263ec: d0 07 bf d4 ld [ %fp + -44 ], %o0
20263f0: 40 00 a6 ac call 204fea0 <.div>
20263f4: 92 10 23 e8 mov 0x3e8, %o1
20263f8: a6 10 00 08 mov %o0, %l3
20263fc: d0 07 bf dc ld [ %fp + -36 ], %o0
2026400: 40 00 a6 a8 call 204fea0 <.div>
2026404: 92 10 23 e8 mov 0x3e8, %o1
2026408: c2 07 bf a8 ld [ %fp + -88 ], %g1
202640c: a2 10 00 08 mov %o0, %l1
2026410: d0 07 bf ac ld [ %fp + -84 ], %o0
2026414: e8 07 bf d0 ld [ %fp + -48 ], %l4
2026418: e4 07 bf d8 ld [ %fp + -40 ], %l2
202641c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2026420: 40 00 a6 a0 call 204fea0 <.div>
2026424: 92 10 23 e8 mov 0x3e8, %o1
2026428: 96 10 00 13 mov %l3, %o3
202642c: 98 10 00 12 mov %l2, %o4
2026430: 9a 10 00 11 mov %l1, %o5
2026434: 94 10 00 14 mov %l4, %o2
2026438: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
202643c: 92 10 00 1b mov %i3, %o1
2026440: 9f c6 40 00 call %i1
2026444: 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);
2026448: d2 07 bf c8 ld [ %fp + -56 ], %o1
202644c: 94 07 bf a8 add %fp, -88, %o2
2026450: 40 00 02 9c call 2026ec0 <_Timespec_Divide_by_integer>
2026454: 90 07 bf f8 add %fp, -8, %o0
(*print)( context,
2026458: d0 07 bf ec ld [ %fp + -20 ], %o0
202645c: 40 00 a6 91 call 204fea0 <.div>
2026460: 92 10 23 e8 mov 0x3e8, %o1
2026464: a6 10 00 08 mov %o0, %l3
2026468: d0 07 bf f4 ld [ %fp + -12 ], %o0
202646c: 40 00 a6 8d call 204fea0 <.div>
2026470: 92 10 23 e8 mov 0x3e8, %o1
2026474: c2 07 bf a8 ld [ %fp + -88 ], %g1
2026478: a2 10 00 08 mov %o0, %l1
202647c: d0 07 bf ac ld [ %fp + -84 ], %o0
2026480: e8 07 bf e8 ld [ %fp + -24 ], %l4
2026484: e4 07 bf f0 ld [ %fp + -16 ], %l2
2026488: 92 10 23 e8 mov 0x3e8, %o1
202648c: 40 00 a6 85 call 204fea0 <.div>
2026490: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2026494: 92 10 00 1a mov %i2, %o1
2026498: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
202649c: 94 10 00 14 mov %l4, %o2
20264a0: 90 10 00 18 mov %i0, %o0
20264a4: 96 10 00 13 mov %l3, %o3
20264a8: 98 10 00 12 mov %l2, %o4
20264ac: 9f c6 40 00 call %i1
20264b0: 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++ ) {
20264b4: 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 ;
20264b8: 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 ;
20264bc: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 ! 2062b30 <_Rate_monotonic_Information+0xc>
20264c0: 80 a7 40 01 cmp %i5, %g1
20264c4: 08 bf ff ad bleu 2026378 <rtems_rate_monotonic_report_statistics_with_plugin+0x88>
20264c8: 90 10 00 1d mov %i5, %o0
20264cc: 81 c7 e0 08 ret
20264d0: 81 e8 00 00 restore
020088a4 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
20088a4: 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;
20088a8: 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;
20088ac: 90 10 00 19 mov %i1, %o0
20088b0: 92 10 00 1d mov %i5, %o1
20088b4: 40 00 44 7e call 2019aac <.urem>
20088b8: b6 10 00 19 mov %i1, %i3
if (excess > 0) {
20088bc: 80 a2 20 00 cmp %o0, 0
20088c0: 02 80 00 05 be 20088d4 <rtems_rbheap_allocate+0x30> <== ALWAYS TAKEN
20088c4: 80 a6 c0 19 cmp %i3, %i1
value += alignment - excess;
20088c8: b6 06 40 1d add %i1, %i5, %i3 <== NOT EXECUTED
20088cc: 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) {
20088d0: 80 a6 c0 19 cmp %i3, %i1 <== NOT EXECUTED
20088d4: 0a 80 00 04 bcs 20088e4 <rtems_rbheap_allocate+0x40> <== NEVER TAKEN
20088d8: 80 a6 60 00 cmp %i1, 0
20088dc: 32 80 00 04 bne,a 20088ec <rtems_rbheap_allocate+0x48>
20088e0: c2 06 00 00 ld [ %i0 ], %g1
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
20088e4: 81 c7 e0 08 ret
20088e8: 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);
20088ec: 84 06 20 04 add %i0, 4, %g2
rtems_rbheap_chunk *big_enough = NULL;
20088f0: 10 80 00 06 b 2008908 <rtems_rbheap_allocate+0x64>
20088f4: 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) {
20088f8: 80 a0 c0 1b cmp %g3, %i3
20088fc: ba 40 3f ff addx %g0, -1, %i5
2008900: ba 08 40 1d and %g1, %i5, %i5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2008904: 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) {
2008908: 80 a7 60 00 cmp %i5, 0
200890c: 12 80 00 04 bne 200891c <rtems_rbheap_allocate+0x78>
2008910: 80 a0 40 02 cmp %g1, %g2
2008914: 32 bf ff f9 bne,a 20088f8 <rtems_rbheap_allocate+0x54>
2008918: 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) {
200891c: 80 a7 60 00 cmp %i5, 0
2008920: 02 bf ff f1 be 20088e4 <rtems_rbheap_allocate+0x40>
2008924: 01 00 00 00 nop
uintptr_t free_size = free_chunk->size;
2008928: f4 07 60 1c ld [ %i5 + 0x1c ], %i2
if (free_size > aligned_size) {
200892c: 80 a6 80 1b cmp %i2, %i3
2008930: 28 80 00 14 bleu,a 2008980 <rtems_rbheap_allocate+0xdc>
2008934: c4 07 40 00 ld [ %i5 ], %g2
rtems_rbheap_chunk *new_chunk = get_chunk(control);
2008938: 7f ff ff 80 call 2008738 <get_chunk>
200893c: 90 10 00 18 mov %i0, %o0
if (new_chunk != NULL) {
2008940: b8 92 20 00 orcc %o0, 0, %i4
2008944: 02 bf ff e8 be 20088e4 <rtems_rbheap_allocate+0x40> <== NEVER TAKEN
2008948: 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;
200894c: 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;
2008950: f4 27 60 1c st %i2, [ %i5 + 0x1c ]
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
2008954: 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;
2008958: b4 06 80 01 add %i2, %g1, %i2
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
200895c: c0 27 20 04 clr [ %i4 + 4 ]
2008960: f4 27 20 18 st %i2, [ %i4 + 0x18 ]
2008964: 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);
2008968: 90 06 20 18 add %i0, 0x18, %o0
200896c: 40 00 06 b6 call 200a444 <_RBTree_Insert_unprotected>
2008970: 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;
2008974: f0 07 20 18 ld [ %i4 + 0x18 ], %i0
2008978: 81 c7 e0 08 ret
200897c: 81 e8 00 00 restore
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
2008980: 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;
2008984: f0 07 60 18 ld [ %i5 + 0x18 ], %i0
next->previous = previous;
2008988: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
200898c: c4 20 40 00 st %g2, [ %g1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
2008990: c0 27 60 04 clr [ %i5 + 4 ]
2008994: c0 27 40 00 clr [ %i5 ]
}
}
}
return ptr;
}
2008998: 81 c7 e0 08 ret
200899c: 81 e8 00 00 restore
02008ad0 <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
2008ad0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
2008ad4: 7f ff ed 5d call 2004048 <malloc> <== NOT EXECUTED
2008ad8: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
if (chunk != NULL) {
2008adc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2008ae0: 02 80 00 07 be 2008afc <rtems_rbheap_extend_descriptors_with_malloc+0x2c><== NOT EXECUTED
2008ae4: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2008ae8: c2 22 20 04 st %g1, [ %o0 + 4 ] <== NOT EXECUTED
before_node = after_node->next;
2008aec: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
after_node->next = the_node;
2008af0: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED
the_node->next = before_node;
2008af4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
before_node->previous = the_node;
2008af8: d0 20 60 04 st %o0, [ %g1 + 4 ] <== NOT EXECUTED
2008afc: 81 c7 e0 08 ret <== NOT EXECUTED
2008b00: 81 e8 00 00 restore <== NOT EXECUTED
020089a0 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
20089a0: 9d e3 bf 80 save %sp, -128, %sp
20089a4: b6 10 00 18 mov %i0, %i3
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
20089a8: 80 a6 60 00 cmp %i1, 0
20089ac: 02 80 00 45 be 2008ac0 <rtems_rbheap_free+0x120>
20089b0: 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 };
20089b4: 90 07 bf e0 add %fp, -32, %o0
20089b8: 92 10 20 00 clr %o1
20089bc: 94 10 20 20 mov 0x20, %o2
20089c0: 40 00 22 7e call 20113b8 <memset>
20089c4: 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;
20089c8: ba 10 20 00 clr %i5
20089cc: 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;
20089d0: 10 80 00 12 b 2008a18 <rtems_rbheap_free+0x78>
20089d4: 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);
20089d8: 90 07 bf e8 add %fp, -24, %o0
20089dc: 9f c0 40 00 call %g1
20089e0: 92 10 00 1c mov %i4, %o1
if ( _RBTree_Is_equal( compare_result ) ) {
20089e4: 80 a2 20 00 cmp %o0, 0
20089e8: 12 80 00 07 bne 2008a04 <rtems_rbheap_free+0x64>
20089ec: 83 3a 20 1f sra %o0, 0x1f, %g1
found = iter_node;
if ( the_rbtree->is_unique )
20089f0: c2 0e a0 14 ldub [ %i2 + 0x14 ], %g1
20089f4: 80 a0 60 00 cmp %g1, 0
20089f8: 12 80 00 0c bne 2008a28 <rtems_rbheap_free+0x88> <== ALWAYS TAKEN
20089fc: ba 10 00 1c mov %i4, %i5
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
2008a00: 83 3a 20 1f sra %o0, 0x1f, %g1 <== NOT EXECUTED
2008a04: 90 20 40 08 sub %g1, %o0, %o0
2008a08: 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];
2008a0c: 91 2a 20 02 sll %o0, 2, %o0
2008a10: b8 07 00 08 add %i4, %o0, %i4
2008a14: 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) {
2008a18: 80 a7 20 00 cmp %i4, 0
2008a1c: 32 bf ff ef bne,a 20089d8 <rtems_rbheap_free+0x38>
2008a20: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1
2008a24: b8 10 00 1d mov %i5, %i4
return rtems_rbheap_chunk_of_node(
2008a28: 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) {
2008a2c: 80 a7 7f f8 cmp %i5, -8
2008a30: 02 80 00 24 be 2008ac0 <rtems_rbheap_free+0x120>
2008a34: 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);
2008a38: c4 07 3f f8 ld [ %i4 + -8 ], %g2
2008a3c: 80 a0 a0 00 cmp %g2, 0
2008a40: 12 80 00 05 bne 2008a54 <rtems_rbheap_free+0xb4>
2008a44: 82 10 20 00 clr %g1
2008a48: c2 07 60 04 ld [ %i5 + 4 ], %g1
2008a4c: 80 a0 00 01 cmp %g0, %g1
2008a50: 82 60 3f ff subx %g0, -1, %g1
if (!rtems_rbheap_is_chunk_free(chunk)) {
2008a54: 80 a0 60 00 cmp %g1, 0
2008a58: 02 80 00 1a be 2008ac0 <rtems_rbheap_free+0x120>
2008a5c: 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(
2008a60: b8 07 60 08 add %i5, 8, %i4
2008a64: 92 10 20 00 clr %o1
2008a68: 40 00 07 1c call 200a6d8 <_RBTree_Next_unprotected>
2008a6c: 90 10 00 1c mov %i4, %o0
2008a70: 92 10 20 01 mov 1, %o1
2008a74: b2 10 00 08 mov %o0, %i1
2008a78: 40 00 07 18 call 200a6d8 <_RBTree_Next_unprotected>
2008a7c: 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);
2008a80: 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(
2008a84: 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);
2008a88: 94 10 00 1d mov %i5, %o2
2008a8c: 7f ff ff 02 call 2008694 <check_and_merge>
2008a90: 90 10 00 1b mov %i3, %o0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2008a94: c2 06 c0 00 ld [ %i3 ], %g1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2008a98: f6 27 60 04 st %i3, [ %i5 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
2008a9c: fa 26 c0 00 st %i5, [ %i3 ]
the_node->next = before_node;
2008aa0: c2 27 40 00 st %g1, [ %i5 ]
before_node->previous = the_node;
2008aa4: fa 20 60 04 st %i5, [ %g1 + 4 ]
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
2008aa8: 90 10 00 1b mov %i3, %o0
2008aac: 92 10 00 1a mov %i2, %o1
2008ab0: 94 10 00 1d mov %i5, %o2
2008ab4: 96 06 7f f8 add %i1, -8, %o3
2008ab8: 7f ff fe f7 call 2008694 <check_and_merge>
2008abc: b0 10 20 00 clr %i0
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
2008ac0: 81 c7 e0 08 ret
2008ac4: 81 e8 00 00 restore
0201789c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
201789c: 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 )
20178a0: 80 a6 60 00 cmp %i1, 0
20178a4: 02 80 00 35 be 2017978 <rtems_signal_send+0xdc>
20178a8: 82 10 20 0a mov 0xa, %g1
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
20178ac: 90 10 00 18 mov %i0, %o0
20178b0: 40 00 12 ca call 201c3d8 <_Thread_Get>
20178b4: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20178b8: c2 07 bf fc ld [ %fp + -4 ], %g1
20178bc: 80 a0 60 00 cmp %g1, 0
20178c0: 12 80 00 2d bne 2017974 <rtems_signal_send+0xd8>
20178c4: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
20178c8: fa 02 21 58 ld [ %o0 + 0x158 ], %i5
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
20178cc: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20178d0: 80 a0 60 00 cmp %g1, 0
20178d4: 02 80 00 24 be 2017964 <rtems_signal_send+0xc8>
20178d8: 01 00 00 00 nop
if ( asr->is_enabled ) {
20178dc: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
20178e0: 80 a0 60 00 cmp %g1, 0
20178e4: 02 80 00 15 be 2017938 <rtems_signal_send+0x9c>
20178e8: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
20178ec: 7f ff e3 91 call 2010730 <sparc_disable_interrupts>
20178f0: 01 00 00 00 nop
*signal_set |= signals;
20178f4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
20178f8: b2 10 40 19 or %g1, %i1, %i1
20178fc: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_ISR_Enable( _level );
2017900: 7f ff e3 90 call 2010740 <sparc_enable_interrupts>
2017904: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2017908: 03 00 80 f3 sethi %hi(0x203cc00), %g1
201790c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 203cee0 <_Per_CPU_Information>
2017910: c4 00 60 08 ld [ %g1 + 8 ], %g2
2017914: 80 a0 a0 00 cmp %g2, 0
2017918: 02 80 00 0f be 2017954 <rtems_signal_send+0xb8>
201791c: 01 00 00 00 nop
2017920: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
2017924: 80 a7 00 02 cmp %i4, %g2
2017928: 12 80 00 0b bne 2017954 <rtems_signal_send+0xb8> <== NEVER TAKEN
201792c: 84 10 20 01 mov 1, %g2
_Thread_Dispatch_necessary = true;
2017930: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
2017934: 30 80 00 08 b,a 2017954 <rtems_signal_send+0xb8>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2017938: 7f ff e3 7e call 2010730 <sparc_disable_interrupts>
201793c: 01 00 00 00 nop
*signal_set |= signals;
2017940: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2017944: b2 10 40 19 or %g1, %i1, %i1
2017948: f2 27 60 18 st %i1, [ %i5 + 0x18 ]
_ISR_Enable( _level );
201794c: 7f ff e3 7d call 2010740 <sparc_enable_interrupts>
2017950: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2017954: 40 00 12 95 call 201c3a8 <_Thread_Enable_dispatch>
2017958: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
201795c: 10 80 00 07 b 2017978 <rtems_signal_send+0xdc>
2017960: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
_Thread_Enable_dispatch();
2017964: 40 00 12 91 call 201c3a8 <_Thread_Enable_dispatch>
2017968: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
201796c: 10 80 00 03 b 2017978 <rtems_signal_send+0xdc>
2017970: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
2017974: 82 10 20 04 mov 4, %g1
}
2017978: 81 c7 e0 08 ret
201797c: 91 e8 00 01 restore %g0, %g1, %o0
020110fc <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
20110fc: 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 )
2011100: 80 a6 a0 00 cmp %i2, 0
2011104: 02 80 00 5a be 201126c <rtems_task_mode+0x170>
2011108: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
201110c: 03 00 80 87 sethi %hi(0x2021c00), %g1
2011110: f8 00 63 20 ld [ %g1 + 0x320 ], %i4 ! 2021f20 <_Per_CPU_Information+0x10>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
2011114: 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 ];
2011118: fa 07 21 58 ld [ %i4 + 0x158 ], %i5
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
201111c: 80 a0 00 01 cmp %g0, %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
2011120: 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;
2011124: b6 60 3f ff subx %g0, -1, %i3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
2011128: 80 a0 60 00 cmp %g1, 0
201112c: 02 80 00 03 be 2011138 <rtems_task_mode+0x3c>
2011130: b7 2e e0 08 sll %i3, 8, %i3
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
2011134: b6 16 e2 00 or %i3, 0x200, %i3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
2011138: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
201113c: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
2011140: 7f ff ed 22 call 200c5c8 <_CPU_ISR_Get_level>
2011144: 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;
2011148: a1 2c 20 0a sll %l0, 0xa, %l0
201114c: 90 14 00 08 or %l0, %o0, %o0
old_mode |= _ISR_Get_level();
2011150: b6 12 00 1b or %o0, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
2011154: 80 8e 61 00 btst 0x100, %i1
2011158: 02 80 00 06 be 2011170 <rtems_task_mode+0x74>
201115c: 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;
2011160: 83 36 20 08 srl %i0, 8, %g1
2011164: 82 18 60 01 xor %g1, 1, %g1
2011168: 82 08 60 01 and %g1, 1, %g1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
201116c: c2 2f 20 70 stb %g1, [ %i4 + 0x70 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
2011170: 80 8e 62 00 btst 0x200, %i1
2011174: 02 80 00 0b be 20111a0 <rtems_task_mode+0xa4>
2011178: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
201117c: 80 8e 22 00 btst 0x200, %i0
2011180: 22 80 00 07 be,a 201119c <rtems_task_mode+0xa0>
2011184: c0 27 20 78 clr [ %i4 + 0x78 ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
2011188: 82 10 20 01 mov 1, %g1
201118c: c2 27 20 78 st %g1, [ %i4 + 0x78 ]
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
2011190: 03 00 80 86 sethi %hi(0x2021800), %g1
2011194: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 2021950 <_Thread_Ticks_per_timeslice>
2011198: c2 27 20 74 st %g1, [ %i4 + 0x74 ]
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
201119c: 80 8e 60 0f btst 0xf, %i1
20111a0: 02 80 00 06 be 20111b8 <rtems_task_mode+0xbc>
20111a4: 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 );
20111a8: 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 ) );
20111ac: 7f ff c7 1c call 2002e1c <sparc_enable_interrupts>
20111b0: 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 ) {
20111b4: 80 8e 64 00 btst 0x400, %i1
20111b8: 02 80 00 14 be 2011208 <rtems_task_mode+0x10c>
20111bc: 88 10 20 00 clr %g4
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
20111c0: 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;
20111c4: b1 36 20 0a srl %i0, 0xa, %i0
20111c8: b0 1e 20 01 xor %i0, 1, %i0
20111cc: b0 0e 20 01 and %i0, 1, %i0
if ( is_asr_enabled != asr->is_enabled ) {
20111d0: 80 a6 00 01 cmp %i0, %g1
20111d4: 22 80 00 0e be,a 201120c <rtems_task_mode+0x110>
20111d8: 03 00 80 87 sethi %hi(0x2021c00), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
20111dc: 7f ff c7 0c call 2002e0c <sparc_disable_interrupts>
20111e0: f0 2f 60 08 stb %i0, [ %i5 + 8 ]
_signals = information->signals_pending;
20111e4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
information->signals_pending = information->signals_posted;
20111e8: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
information->signals_posted = _signals;
20111ec: 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;
20111f0: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
20111f4: 7f ff c7 0a call 2002e1c <sparc_enable_interrupts>
20111f8: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
20111fc: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2011200: 80 a0 00 01 cmp %g0, %g1
2011204: 88 40 20 00 addx %g0, 0, %g4
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
2011208: 03 00 80 87 sethi %hi(0x2021c00), %g1
201120c: c4 00 63 08 ld [ %g1 + 0x308 ], %g2 ! 2021f08 <_System_state_Current>
2011210: 80 a0 a0 03 cmp %g2, 3
2011214: 12 80 00 16 bne 201126c <rtems_task_mode+0x170>
2011218: 82 10 20 00 clr %g1
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
201121c: 07 00 80 87 sethi %hi(0x2021c00), %g3
if ( are_signals_pending ||
2011220: 80 89 20 ff btst 0xff, %g4
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
2011224: 86 10 e3 10 or %g3, 0x310, %g3
if ( are_signals_pending ||
2011228: 12 80 00 0a bne 2011250 <rtems_task_mode+0x154>
201122c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2011230: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
2011234: 80 a0 80 03 cmp %g2, %g3
2011238: 02 80 00 0d be 201126c <rtems_task_mode+0x170>
201123c: 01 00 00 00 nop
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
2011240: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
2011244: 80 a0 a0 00 cmp %g2, 0
2011248: 02 80 00 09 be 201126c <rtems_task_mode+0x170> <== NEVER TAKEN
201124c: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
2011250: 84 10 20 01 mov 1, %g2 ! 1 <PROM_START+0x1>
2011254: 03 00 80 87 sethi %hi(0x2021c00), %g1
2011258: 82 10 63 10 or %g1, 0x310, %g1 ! 2021f10 <_Per_CPU_Information>
201125c: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
2011260: 40 00 02 6b call 2011c0c <_Thread_Dispatch>
2011264: 01 00 00 00 nop
}
return RTEMS_SUCCESSFUL;
2011268: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
201126c: 81 c7 e0 08 ret
2011270: 91 e8 00 01 restore %g0, %g1, %o0
0200bdf0 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
200bdf0: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
200bdf4: 80 a6 60 00 cmp %i1, 0
200bdf8: 02 80 00 08 be 200be18 <rtems_task_set_priority+0x28>
200bdfc: 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 ) );
200be00: 03 00 80 83 sethi %hi(0x2020c00), %g1
200be04: c4 08 63 8c ldub [ %g1 + 0x38c ], %g2 ! 2020f8c <rtems_maximum_priority>
200be08: 80 a6 40 02 cmp %i1, %g2
200be0c: 18 80 00 1e bgu 200be84 <rtems_task_set_priority+0x94>
200be10: 82 10 20 13 mov 0x13, %g1
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
200be14: 80 a6 a0 00 cmp %i2, 0
200be18: 02 80 00 1b be 200be84 <rtems_task_set_priority+0x94>
200be1c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
200be20: 90 10 00 18 mov %i0, %o0
200be24: 40 00 09 a6 call 200e4bc <_Thread_Get>
200be28: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200be2c: c2 07 bf fc ld [ %fp + -4 ], %g1
200be30: 80 a0 60 00 cmp %g1, 0
200be34: 12 80 00 14 bne 200be84 <rtems_task_set_priority+0x94>
200be38: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
200be3c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
200be40: 80 a6 60 00 cmp %i1, 0
200be44: 02 80 00 0d be 200be78 <rtems_task_set_priority+0x88>
200be48: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200be4c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
200be50: 80 a0 60 00 cmp %g1, 0
200be54: 02 80 00 06 be 200be6c <rtems_task_set_priority+0x7c>
200be58: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
200be5c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200be60: 80 a0 40 19 cmp %g1, %i1
200be64: 08 80 00 05 bleu 200be78 <rtems_task_set_priority+0x88> <== ALWAYS TAKEN
200be68: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
200be6c: 92 10 00 19 mov %i1, %o1
200be70: 40 00 08 55 call 200dfc4 <_Thread_Change_priority>
200be74: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
200be78: 40 00 09 85 call 200e48c <_Thread_Enable_dispatch>
200be7c: 01 00 00 00 nop
200be80: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200be84: 81 c7 e0 08 ret
200be88: 91 e8 00 01 restore %g0, %g1, %o0
02018324 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
2018324: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2018328: 11 00 80 f4 sethi %hi(0x203d000), %o0
201832c: 92 10 00 18 mov %i0, %o1
2018330: 90 12 23 28 or %o0, 0x328, %o0
2018334: 40 00 0c 3b call 201b420 <_Objects_Get>
2018338: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
201833c: c2 07 bf fc ld [ %fp + -4 ], %g1
2018340: 80 a0 60 00 cmp %g1, 0
2018344: 12 80 00 0c bne 2018374 <rtems_timer_cancel+0x50>
2018348: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
201834c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2018350: 80 a0 60 04 cmp %g1, 4
2018354: 02 80 00 04 be 2018364 <rtems_timer_cancel+0x40> <== NEVER TAKEN
2018358: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
201835c: 40 00 14 07 call 201d378 <_Watchdog_Remove>
2018360: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
2018364: 40 00 10 11 call 201c3a8 <_Thread_Enable_dispatch>
2018368: b0 10 20 00 clr %i0
201836c: 81 c7 e0 08 ret
2018370: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2018374: 81 c7 e0 08 ret
2018378: 91 e8 20 04 restore %g0, 4, %o0
02018834 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2018834: 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;
2018838: 03 00 80 f4 sethi %hi(0x203d000), %g1
201883c: f8 00 63 68 ld [ %g1 + 0x368 ], %i4 ! 203d368 <_Timer_server>
if ( !timer_server )
2018840: 80 a7 20 00 cmp %i4, 0
2018844: 02 80 00 3c be 2018934 <rtems_timer_server_fire_when+0x100>
2018848: 82 10 20 0e mov 0xe, %g1
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
201884c: 21 00 80 f2 sethi %hi(0x203c800), %l0
2018850: 82 14 20 f8 or %l0, 0xf8, %g1 ! 203c8f8 <_TOD>
2018854: c4 08 60 14 ldub [ %g1 + 0x14 ], %g2
2018858: 80 a0 a0 00 cmp %g2, 0
201885c: 02 80 00 36 be 2018934 <rtems_timer_server_fire_when+0x100><== NEVER TAKEN
2018860: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( !routine )
2018864: 80 a6 a0 00 cmp %i2, 0
2018868: 02 80 00 33 be 2018934 <rtems_timer_server_fire_when+0x100>
201886c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
2018870: 7f ff f3 7f call 201566c <_TOD_Validate>
2018874: 90 10 00 19 mov %i1, %o0
2018878: 80 8a 20 ff btst 0xff, %o0
201887c: 02 80 00 2e be 2018934 <rtems_timer_server_fire_when+0x100>
2018880: 82 10 20 14 mov 0x14, %g1
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
2018884: 7f ff f3 40 call 2015584 <_TOD_To_seconds>
2018888: 90 10 00 19 mov %i1, %o0
201888c: b2 10 00 08 mov %o0, %i1
2018890: d0 1c 20 f8 ldd [ %l0 + 0xf8 ], %o0
2018894: 94 10 20 00 clr %o2
2018898: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
201889c: 40 00 4f b7 call 202c778 <__divdi3>
20188a0: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
if ( seconds <= _TOD_Seconds_since_epoch() )
20188a4: 80 a6 40 09 cmp %i1, %o1
20188a8: 08 80 00 23 bleu 2018934 <rtems_timer_server_fire_when+0x100>
20188ac: 82 10 20 14 mov 0x14, %g1
20188b0: 11 00 80 f4 sethi %hi(0x203d000), %o0
20188b4: 92 10 00 18 mov %i0, %o1
20188b8: 90 12 23 28 or %o0, 0x328, %o0
20188bc: 40 00 0a d9 call 201b420 <_Objects_Get>
20188c0: 94 07 bf fc add %fp, -4, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
20188c4: c2 07 bf fc ld [ %fp + -4 ], %g1
20188c8: 80 a0 60 00 cmp %g1, 0
20188cc: 12 80 00 19 bne 2018930 <rtems_timer_server_fire_when+0xfc>
20188d0: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
20188d4: 40 00 12 a9 call 201d378 <_Watchdog_Remove>
20188d8: 90 02 20 10 add %o0, 0x10, %o0
20188dc: d0 1c 20 f8 ldd [ %l0 + 0xf8 ], %o0
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
20188e0: 82 10 20 03 mov 3, %g1
20188e4: 94 10 20 00 clr %o2
20188e8: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20188ec: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
20188f0: f4 27 60 2c st %i2, [ %i5 + 0x2c ]
the_watchdog->id = id;
20188f4: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
the_watchdog->user_data = user_data;
20188f8: f6 27 60 34 st %i3, [ %i5 + 0x34 ]
20188fc: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2018900: 40 00 4f 9e call 202c778 <__divdi3>
2018904: 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 );
2018908: 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();
201890c: 92 26 40 09 sub %i1, %o1, %o1
(*timer_server->schedule_operation)( timer_server, the_timer );
2018910: 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();
2018914: d2 27 60 1c st %o1, [ %i5 + 0x1c ]
(*timer_server->schedule_operation)( timer_server, the_timer );
2018918: 9f c0 40 00 call %g1
201891c: 92 10 00 1d mov %i5, %o1
_Thread_Enable_dispatch();
2018920: 40 00 0e a2 call 201c3a8 <_Thread_Enable_dispatch>
2018924: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2018928: 10 80 00 03 b 2018934 <rtems_timer_server_fire_when+0x100>
201892c: 82 10 20 00 clr %g1 ! 0 <PROM_START>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
2018930: 82 10 20 04 mov 4, %g1
}
2018934: 81 c7 e0 08 ret
2018938: 91 e8 00 01 restore %g0, %g1, %o0
02007d24 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
2007d24: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2007d28: 80 a6 20 04 cmp %i0, 4
2007d2c: 18 80 00 06 bgu 2007d44 <sched_get_priority_max+0x20>
2007d30: 82 10 20 01 mov 1, %g1
2007d34: b1 28 40 18 sll %g1, %i0, %i0
2007d38: 80 8e 20 17 btst 0x17, %i0
2007d3c: 12 80 00 08 bne 2007d5c <sched_get_priority_max+0x38> <== ALWAYS TAKEN
2007d40: 03 00 80 85 sethi %hi(0x2021400), %g1
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2007d44: 40 00 21 79 call 2010328 <__errno>
2007d48: b0 10 3f ff mov -1, %i0
2007d4c: 82 10 20 16 mov 0x16, %g1
2007d50: c2 22 00 00 st %g1, [ %o0 ]
2007d54: 81 c7 e0 08 ret
2007d58: 81 e8 00 00 restore
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
2007d5c: f0 08 63 6c ldub [ %g1 + 0x36c ], %i0
}
2007d60: 81 c7 e0 08 ret
2007d64: 91 ee 3f ff restore %i0, -1, %o0
02007d68 <sched_get_priority_min>:
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
*/
int sched_get_priority_min(
int policy
)
{
2007d68: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2007d6c: 80 a6 20 04 cmp %i0, 4
2007d70: 18 80 00 06 bgu 2007d88 <sched_get_priority_min+0x20>
2007d74: 82 10 20 01 mov 1, %g1
2007d78: 83 28 40 18 sll %g1, %i0, %g1
2007d7c: 80 88 60 17 btst 0x17, %g1
2007d80: 12 80 00 06 bne 2007d98 <sched_get_priority_min+0x30> <== ALWAYS TAKEN
2007d84: b0 10 20 01 mov 1, %i0
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2007d88: 40 00 21 68 call 2010328 <__errno>
2007d8c: b0 10 3f ff mov -1, %i0
2007d90: 82 10 20 16 mov 0x16, %g1
2007d94: c2 22 00 00 st %g1, [ %o0 ]
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
2007d98: 81 c7 e0 08 ret
2007d9c: 81 e8 00 00 restore
02007da0 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
2007da0: 9d e3 bf a0 save %sp, -96, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2007da4: 80 a6 20 00 cmp %i0, 0
2007da8: 02 80 00 0b be 2007dd4 <sched_rr_get_interval+0x34> <== NEVER TAKEN
2007dac: 80 a6 60 00 cmp %i1, 0
2007db0: 7f ff ef 87 call 2003bcc <getpid>
2007db4: 01 00 00 00 nop
2007db8: 80 a6 00 08 cmp %i0, %o0
2007dbc: 02 80 00 06 be 2007dd4 <sched_rr_get_interval+0x34>
2007dc0: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
2007dc4: 40 00 21 59 call 2010328 <__errno>
2007dc8: 01 00 00 00 nop
2007dcc: 10 80 00 07 b 2007de8 <sched_rr_get_interval+0x48>
2007dd0: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3>
if ( !interval )
2007dd4: 12 80 00 08 bne 2007df4 <sched_rr_get_interval+0x54>
2007dd8: 03 00 80 88 sethi %hi(0x2022000), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
2007ddc: 40 00 21 53 call 2010328 <__errno>
2007de0: 01 00 00 00 nop
2007de4: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007de8: c2 22 00 00 st %g1, [ %o0 ]
2007dec: 81 c7 e0 08 ret
2007df0: 91 e8 3f ff restore %g0, -1, %o0
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
2007df4: d0 00 63 60 ld [ %g1 + 0x360 ], %o0
2007df8: 92 10 00 19 mov %i1, %o1
2007dfc: 40 00 0e c2 call 200b904 <_Timespec_From_ticks>
2007e00: b0 10 20 00 clr %i0
return 0;
}
2007e04: 81 c7 e0 08 ret
2007e08: 81 e8 00 00 restore
020084bc <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
20084bc: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
20084c0: 03 00 80 88 sethi %hi(0x2022000), %g1
20084c4: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 2022090 <_Thread_Dispatch_disable_level>
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
20084c8: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
++level;
20084cc: 84 00 a0 01 inc %g2
20084d0: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
20084d4: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
20084d8: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
_Thread_Dispatch_disable_level = level;
20084dc: c4 20 60 90 st %g2, [ %g1 + 0x90 ]
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
20084e0: b4 8e 62 00 andcc %i1, 0x200, %i2
20084e4: 02 80 00 05 be 20084f8 <sem_open+0x3c>
20084e8: b8 10 20 00 clr %i4
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
20084ec: f8 07 a0 50 ld [ %fp + 0x50 ], %i4
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
20084f0: 82 07 a0 4c add %fp, 0x4c, %g1
20084f4: 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 );
20084f8: 37 00 80 88 sethi %hi(0x2022000), %i3
20084fc: 92 10 00 18 mov %i0, %o1
2008500: 90 16 e3 64 or %i3, 0x364, %o0
2008504: 94 07 bf f0 add %fp, -16, %o2
2008508: 7f ff fe 7e call 2007f00 <_POSIX_Name_to_id>
200850c: 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 ) {
2008510: ba 92 20 00 orcc %o0, 0, %i5
2008514: 22 80 00 0e be,a 200854c <sem_open+0x90>
2008518: 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) ) ) {
200851c: 80 a7 60 02 cmp %i5, 2
2008520: 12 80 00 04 bne 2008530 <sem_open+0x74>
2008524: 80 a6 a0 00 cmp %i2, 0
2008528: 12 80 00 20 bne 20085a8 <sem_open+0xec>
200852c: d2 07 bf fc ld [ %fp + -4 ], %o1
_Thread_Enable_dispatch();
2008530: 40 00 0d ee call 200bce8 <_Thread_Enable_dispatch>
2008534: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
2008538: 40 00 24 16 call 2011590 <__errno>
200853c: 01 00 00 00 nop
2008540: fa 22 00 00 st %i5, [ %o0 ]
2008544: 81 c7 e0 08 ret
2008548: 81 e8 00 00 restore
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
200854c: 80 a6 6a 00 cmp %i1, 0xa00
2008550: 12 80 00 0a bne 2008578 <sem_open+0xbc>
2008554: d2 07 bf f0 ld [ %fp + -16 ], %o1
_Thread_Enable_dispatch();
2008558: 40 00 0d e4 call 200bce8 <_Thread_Enable_dispatch>
200855c: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
2008560: 40 00 24 0c call 2011590 <__errno>
2008564: 01 00 00 00 nop
2008568: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
200856c: c2 22 00 00 st %g1, [ %o0 ]
2008570: 81 c7 e0 08 ret
2008574: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
2008578: 94 07 bf f8 add %fp, -8, %o2
200857c: 40 00 09 ea call 200ad24 <_Objects_Get>
2008580: 90 16 e3 64 or %i3, 0x364, %o0
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
the_semaphore->open_count += 1;
2008584: 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 );
2008588: d0 27 bf f4 st %o0, [ %fp + -12 ]
the_semaphore->open_count += 1;
200858c: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
2008590: 40 00 0d d6 call 200bce8 <_Thread_Enable_dispatch>
2008594: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
_Thread_Enable_dispatch();
2008598: 40 00 0d d4 call 200bce8 <_Thread_Enable_dispatch>
200859c: 01 00 00 00 nop
goto return_id;
20085a0: 10 80 00 0d b 20085d4 <sem_open+0x118>
20085a4: 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(
20085a8: 94 10 20 00 clr %o2
20085ac: 96 10 00 1c mov %i4, %o3
20085b0: 98 07 bf f4 add %fp, -12, %o4
20085b4: 40 00 19 b1 call 200ec78 <_POSIX_Semaphore_Create_support>
20085b8: 90 10 00 18 mov %i0, %o0
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
20085bc: 40 00 0d cb call 200bce8 <_Thread_Enable_dispatch>
20085c0: ba 10 00 08 mov %o0, %i5
if ( status == -1 )
20085c4: 80 a7 7f ff cmp %i5, -1
20085c8: 22 80 00 04 be,a 20085d8 <sem_open+0x11c> <== NEVER TAKEN
20085cc: 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;
20085d0: f0 07 bf f4 ld [ %fp + -12 ], %i0
20085d4: b0 06 20 08 add %i0, 8, %i0
#endif
}
20085d8: 81 c7 e0 08 ret
20085dc: 81 e8 00 00 restore
02007d1c <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
2007d1c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
if ( oact )
2007d20: 80 a6 a0 00 cmp %i2, 0
2007d24: 02 80 00 0a be 2007d4c <sigaction+0x30>
2007d28: 83 2e 20 02 sll %i0, 2, %g1
*oact = _POSIX_signals_Vectors[ sig ];
2007d2c: 85 2e 20 04 sll %i0, 4, %g2
2007d30: 82 20 80 01 sub %g2, %g1, %g1
2007d34: 13 00 80 84 sethi %hi(0x2021000), %o1
2007d38: 90 10 00 1a mov %i2, %o0
2007d3c: 92 12 60 c0 or %o1, 0xc0, %o1
2007d40: 94 10 20 0c mov 0xc, %o2
2007d44: 40 00 24 db call 20110b0 <memcpy>
2007d48: 92 02 40 01 add %o1, %g1, %o1
if ( !sig )
2007d4c: 80 a6 20 00 cmp %i0, 0
2007d50: 32 80 00 03 bne,a 2007d5c <sigaction+0x40>
2007d54: 82 06 3f ff add %i0, -1, %g1
2007d58: 30 80 00 06 b,a 2007d70 <sigaction+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2007d5c: 80 a0 60 1f cmp %g1, 0x1f
2007d60: 18 80 00 04 bgu 2007d70 <sigaction+0x54>
2007d64: 80 a6 20 09 cmp %i0, 9
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
2007d68: 12 80 00 08 bne 2007d88 <sigaction+0x6c>
2007d6c: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
2007d70: 40 00 22 7b call 201075c <__errno>
2007d74: 01 00 00 00 nop
2007d78: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007d7c: c2 22 00 00 st %g1, [ %o0 ]
2007d80: 10 80 00 20 b 2007e00 <sigaction+0xe4>
2007d84: 82 10 3f ff mov -1, %g1
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
2007d88: 02 80 00 1e be 2007e00 <sigaction+0xe4> <== NEVER TAKEN
2007d8c: 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 );
2007d90: 7f ff ea f1 call 2002954 <sparc_disable_interrupts>
2007d94: 01 00 00 00 nop
2007d98: b8 10 00 08 mov %o0, %i4
if ( act->sa_handler == SIG_DFL ) {
2007d9c: c2 06 60 08 ld [ %i1 + 8 ], %g1
2007da0: 3b 00 80 84 sethi %hi(0x2021000), %i5
2007da4: 80 a0 60 00 cmp %g1, 0
2007da8: 12 80 00 0a bne 2007dd0 <sigaction+0xb4>
2007dac: ba 17 60 c0 or %i5, 0xc0, %i5
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
2007db0: 83 2e 20 02 sll %i0, 2, %g1
2007db4: 13 00 80 7b sethi %hi(0x201ec00), %o1
2007db8: b1 2e 20 04 sll %i0, 4, %i0
2007dbc: 92 12 60 4c or %o1, 0x4c, %o1
2007dc0: b0 26 00 01 sub %i0, %g1, %i0
2007dc4: 90 07 40 18 add %i5, %i0, %o0
2007dc8: 10 80 00 09 b 2007dec <sigaction+0xd0>
2007dcc: 92 02 40 18 add %o1, %i0, %o1
} else {
_POSIX_signals_Clear_process_signals( sig );
2007dd0: 40 00 17 07 call 200d9ec <_POSIX_signals_Clear_process_signals>
2007dd4: 90 10 00 18 mov %i0, %o0
_POSIX_signals_Vectors[ sig ] = *act;
2007dd8: 83 2e 20 02 sll %i0, 2, %g1
2007ddc: 92 10 00 19 mov %i1, %o1
2007de0: b1 2e 20 04 sll %i0, 4, %i0
2007de4: 90 26 00 01 sub %i0, %g1, %o0
2007de8: 90 07 40 08 add %i5, %o0, %o0
2007dec: 40 00 24 b1 call 20110b0 <memcpy>
2007df0: 94 10 20 0c mov 0xc, %o2
}
_ISR_Enable( level );
2007df4: 7f ff ea dc call 2002964 <sparc_enable_interrupts>
2007df8: 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;
2007dfc: 82 10 20 00 clr %g1
}
2007e00: 81 c7 e0 08 ret
2007e04: 91 e8 00 01 restore %g0, %g1, %o0
02008260 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
2008260: 9d e3 bf 90 save %sp, -112, %sp
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
2008264: 80 a6 20 00 cmp %i0, 0
2008268: 02 80 00 0e be 20082a0 <sigtimedwait+0x40>
200826c: 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 ) {
2008270: 02 80 00 10 be 20082b0 <sigtimedwait+0x50>
2008274: b6 10 20 00 clr %i3
if ( !_Timespec_Is_valid( timeout ) )
2008278: 40 00 0f 0b call 200bea4 <_Timespec_Is_valid>
200827c: 90 10 00 1a mov %i2, %o0
2008280: 80 8a 20 ff btst 0xff, %o0
2008284: 02 80 00 07 be 20082a0 <sigtimedwait+0x40>
2008288: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
200828c: 40 00 0f 18 call 200beec <_Timespec_To_ticks>
2008290: 90 10 00 1a mov %i2, %o0
if ( !interval )
2008294: b6 92 20 00 orcc %o0, 0, %i3
2008298: 12 80 00 07 bne 20082b4 <sigtimedwait+0x54> <== ALWAYS TAKEN
200829c: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
20082a0: 40 00 22 fb call 2010e8c <__errno>
20082a4: 01 00 00 00 nop
20082a8: 10 80 00 63 b 2008434 <sigtimedwait+0x1d4>
20082ac: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
20082b0: 80 a6 60 00 cmp %i1, 0
20082b4: 22 80 00 02 be,a 20082bc <sigtimedwait+0x5c>
20082b8: b2 07 bf f4 add %fp, -12, %i1
the_thread = _Thread_Executing;
20082bc: 21 00 80 85 sethi %hi(0x2021400), %l0
20082c0: a0 14 21 40 or %l0, 0x140, %l0 ! 2021540 <_Per_CPU_Information>
20082c4: fa 04 20 10 ld [ %l0 + 0x10 ], %i5
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
20082c8: 7f ff ea 80 call 2002cc8 <sparc_disable_interrupts>
20082cc: f8 07 61 5c ld [ %i5 + 0x15c ], %i4
20082d0: b4 10 00 08 mov %o0, %i2
if ( *set & api->signals_pending ) {
20082d4: c4 06 00 00 ld [ %i0 ], %g2
20082d8: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1
20082dc: 80 88 80 01 btst %g2, %g1
20082e0: 22 80 00 12 be,a 2008328 <sigtimedwait+0xc8>
20082e4: 03 00 80 85 sethi %hi(0x2021400), %g1
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
20082e8: 7f ff ff c6 call 2008200 <_POSIX_signals_Get_lowest>
20082ec: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals(
20082f0: 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 );
20082f4: 92 10 00 08 mov %o0, %o1
20082f8: d0 26 40 00 st %o0, [ %i1 ]
_POSIX_signals_Clear_signals(
20082fc: 96 10 20 00 clr %o3
2008300: 90 10 00 1c mov %i4, %o0
2008304: 40 00 17 d5 call 200e258 <_POSIX_signals_Clear_signals>
2008308: 98 10 20 00 clr %o4
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
200830c: 7f ff ea 73 call 2002cd8 <sparc_enable_interrupts>
2008310: 90 10 00 1a mov %i2, %o0
the_info->si_code = SI_USER;
2008314: 82 10 20 01 mov 1, %g1
the_info->si_value.sival_int = 0;
2008318: c0 26 60 08 clr [ %i1 + 8 ]
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
200831c: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
return the_info->si_signo;
2008320: 10 80 00 47 b 200843c <sigtimedwait+0x1dc>
2008324: fa 06 40 00 ld [ %i1 ], %i5
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
2008328: c2 00 63 94 ld [ %g1 + 0x394 ], %g1
200832c: 80 88 80 01 btst %g2, %g1
2008330: 22 80 00 12 be,a 2008378 <sigtimedwait+0x118>
2008334: 82 10 3f ff mov -1, %g1
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
2008338: 7f ff ff b2 call 2008200 <_POSIX_signals_Get_lowest>
200833c: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
2008340: 94 10 00 19 mov %i1, %o2
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
2008344: ba 10 00 08 mov %o0, %i5
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
2008348: 96 10 20 01 mov 1, %o3
200834c: 90 10 00 1c mov %i4, %o0
2008350: 92 10 00 1d mov %i5, %o1
2008354: 40 00 17 c1 call 200e258 <_POSIX_signals_Clear_signals>
2008358: 98 10 20 00 clr %o4
_ISR_Enable( level );
200835c: 7f ff ea 5f call 2002cd8 <sparc_enable_interrupts>
2008360: 90 10 00 1a mov %i2, %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2008364: 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;
2008368: fa 26 40 00 st %i5, [ %i1 ]
the_info->si_code = SI_USER;
200836c: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
2008370: 10 80 00 33 b 200843c <sigtimedwait+0x1dc>
2008374: c0 26 60 08 clr [ %i1 + 8 ]
return signo;
}
the_info->si_signo = -1;
2008378: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
200837c: 03 00 80 84 sethi %hi(0x2021000), %g1
2008380: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 2021020 <_Thread_Dispatch_disable_level>
++level;
2008384: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
2008388: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
200838c: 82 10 20 04 mov 4, %g1
2008390: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
the_thread->Wait.option = *set;
2008394: c2 06 00 00 ld [ %i0 ], %g1
the_thread->Wait.return_argument = the_info;
2008398: 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;
200839c: 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;
20083a0: a2 10 20 01 mov 1, %l1
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
20083a4: 35 00 80 85 sethi %hi(0x2021400), %i2
20083a8: b4 16 a3 2c or %i2, 0x32c, %i2 ! 202172c <_POSIX_signals_Wait_queue>
20083ac: f4 27 60 44 st %i2, [ %i5 + 0x44 ]
20083b0: 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 );
20083b4: 7f ff ea 49 call 2002cd8 <sparc_enable_interrupts>
20083b8: 01 00 00 00 nop
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
20083bc: 90 10 00 1a mov %i2, %o0
20083c0: 92 10 00 1b mov %i3, %o1
20083c4: 15 00 80 2f sethi %hi(0x200bc00), %o2
20083c8: 40 00 0d 60 call 200b948 <_Thread_queue_Enqueue_with_handler>
20083cc: 94 12 a0 b4 or %o2, 0xb4, %o2 ! 200bcb4 <_Thread_queue_Timeout>
_Thread_Enable_dispatch();
20083d0: 40 00 0c 19 call 200b434 <_Thread_Enable_dispatch>
20083d4: 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 );
20083d8: d2 06 40 00 ld [ %i1 ], %o1
20083dc: 90 10 00 1c mov %i4, %o0
20083e0: 94 10 00 19 mov %i1, %o2
20083e4: 96 10 20 00 clr %o3
20083e8: 40 00 17 9c call 200e258 <_POSIX_signals_Clear_signals>
20083ec: 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)
20083f0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
20083f4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
20083f8: 80 a0 60 04 cmp %g1, 4
20083fc: 12 80 00 09 bne 2008420 <sigtimedwait+0x1c0>
2008400: 01 00 00 00 nop
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
2008404: fa 06 40 00 ld [ %i1 ], %i5
2008408: 82 07 7f ff add %i5, -1, %g1
200840c: a3 2c 40 01 sll %l1, %g1, %l1
2008410: c2 06 00 00 ld [ %i0 ], %g1
2008414: 80 8c 40 01 btst %l1, %g1
2008418: 12 80 00 09 bne 200843c <sigtimedwait+0x1dc>
200841c: 01 00 00 00 nop
errno = _Thread_Executing->Wait.return_code;
2008420: 40 00 22 9b call 2010e8c <__errno>
2008424: 01 00 00 00 nop
2008428: 03 00 80 85 sethi %hi(0x2021400), %g1
200842c: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 2021550 <_Per_CPU_Information+0x10>
2008430: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2008434: c2 22 00 00 st %g1, [ %o0 ]
return -1;
2008438: ba 10 3f ff mov -1, %i5
}
return the_info->si_signo;
}
200843c: 81 c7 e0 08 ret
2008440: 91 e8 00 1d restore %g0, %i5, %o0
0200a178 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
200a178: 9d e3 bf a0 save %sp, -96, %sp
int status;
status = sigtimedwait( set, NULL, NULL );
200a17c: 92 10 20 00 clr %o1
200a180: 90 10 00 18 mov %i0, %o0
200a184: 7f ff ff 80 call 2009f84 <sigtimedwait>
200a188: 94 10 20 00 clr %o2
if ( status != -1 ) {
200a18c: 80 a2 3f ff cmp %o0, -1
200a190: 02 80 00 06 be 200a1a8 <sigwait+0x30>
200a194: 80 a6 60 00 cmp %i1, 0
if ( sig )
200a198: 32 80 00 09 bne,a 200a1bc <sigwait+0x44> <== ALWAYS TAKEN
200a19c: d0 26 40 00 st %o0, [ %i1 ]
*sig = status;
return 0;
200a1a0: 81 c7 e0 08 ret <== NOT EXECUTED
200a1a4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
}
return errno;
200a1a8: 40 00 21 cb call 20128d4 <__errno>
200a1ac: 01 00 00 00 nop
200a1b0: f0 02 00 00 ld [ %o0 ], %i0
200a1b4: 81 c7 e0 08 ret
200a1b8: 81 e8 00 00 restore
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
200a1bc: b0 10 20 00 clr %i0
}
return errno;
}
200a1c0: 81 c7 e0 08 ret
200a1c4: 81 e8 00 00 restore
02006ff4 <sysconf>:
*/
long sysconf(
int name
)
{
2006ff4: 9d e3 bf a0 save %sp, -96, %sp
if ( name == _SC_CLK_TCK )
2006ff8: 80 a6 20 02 cmp %i0, 2
2006ffc: 12 80 00 09 bne 2007020 <sysconf+0x2c>
2007000: 03 00 80 73 sethi %hi(0x201cc00), %g1
return (TOD_MICROSECONDS_PER_SECOND /
2007004: 03 00 80 6a sethi %hi(0x201a800), %g1
2007008: d2 00 63 d4 ld [ %g1 + 0x3d4 ], %o1 ! 201abd4 <Configuration+0xc>
200700c: 11 00 03 d0 sethi %hi(0xf4000), %o0
2007010: 40 00 45 fb call 20187fc <.udiv>
2007014: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
2007018: 81 c7 e0 08 ret
200701c: 91 e8 00 08 restore %g0, %o0, %o0
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
2007020: 80 a6 20 04 cmp %i0, 4
2007024: 02 80 00 13 be 2007070 <sysconf+0x7c>
2007028: d0 00 61 78 ld [ %g1 + 0x178 ], %o0
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
200702c: 80 a6 20 33 cmp %i0, 0x33
2007030: 02 80 00 10 be 2007070 <sysconf+0x7c>
2007034: 90 10 24 00 mov 0x400, %o0
return 1024;
if ( name == _SC_PAGESIZE )
2007038: 80 a6 20 08 cmp %i0, 8
200703c: 02 80 00 0d be 2007070 <sysconf+0x7c>
2007040: 11 00 00 04 sethi %hi(0x1000), %o0
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
2007044: 80 a6 20 4f cmp %i0, 0x4f
2007048: 02 80 00 0a be 2007070 <sysconf+0x7c> <== NEVER TAKEN
200704c: 90 10 20 20 mov 0x20, %o0
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
2007050: 80 a6 22 03 cmp %i0, 0x203
2007054: 02 80 00 07 be 2007070 <sysconf+0x7c> <== NEVER TAKEN
2007058: 90 10 20 00 clr %o0
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
200705c: 40 00 22 49 call 200f980 <__errno>
2007060: 01 00 00 00 nop
2007064: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007068: c2 22 00 00 st %g1, [ %o0 ]
200706c: 90 10 3f ff mov -1, %o0
}
2007070: b0 10 00 08 mov %o0, %i0
2007074: 81 c7 e0 08 ret
2007078: 81 e8 00 00 restore
020085e0 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
20085e0: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
20085e4: 80 a6 20 01 cmp %i0, 1
20085e8: 12 80 00 13 bne 2008634 <timer_create+0x54>
20085ec: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
20085f0: 02 80 00 11 be 2008634 <timer_create+0x54>
20085f4: 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) {
20085f8: 02 80 00 13 be 2008644 <timer_create+0x64>
20085fc: 03 00 80 88 sethi %hi(0x2022000), %g1
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
2008600: c2 06 40 00 ld [ %i1 ], %g1
2008604: 82 00 7f ff add %g1, -1, %g1
2008608: 80 a0 60 01 cmp %g1, 1
200860c: 28 80 00 03 bleu,a 2008618 <timer_create+0x38> <== ALWAYS TAKEN
2008610: c2 06 60 04 ld [ %i1 + 4 ], %g1
2008614: 30 80 00 08 b,a 2008634 <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 )
2008618: 80 a0 60 00 cmp %g1, 0
200861c: 32 80 00 03 bne,a 2008628 <timer_create+0x48> <== ALWAYS TAKEN
2008620: 82 00 7f ff add %g1, -1, %g1
2008624: 30 80 00 04 b,a 2008634 <timer_create+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
2008628: 80 a0 60 1f cmp %g1, 0x1f
200862c: 28 80 00 06 bleu,a 2008644 <timer_create+0x64> <== ALWAYS TAKEN
2008630: 03 00 80 88 sethi %hi(0x2022000), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
2008634: 40 00 23 d7 call 2011590 <__errno>
2008638: 01 00 00 00 nop
200863c: 10 80 00 10 b 200867c <timer_create+0x9c>
2008640: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
2008644: c4 00 60 90 ld [ %g1 + 0x90 ], %g2
++level;
2008648: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
200864c: c4 20 60 90 st %g2, [ %g1 + 0x90 ]
* 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 );
2008650: 11 00 80 88 sethi %hi(0x2022000), %o0
2008654: 40 00 08 6e call 200a80c <_Objects_Allocate>
2008658: 90 12 23 a4 or %o0, 0x3a4, %o0 ! 20223a4 <_POSIX_Timer_Information>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
200865c: 80 a2 20 00 cmp %o0, 0
2008660: 12 80 00 0a bne 2008688 <timer_create+0xa8>
2008664: 82 10 20 02 mov 2, %g1
_Thread_Enable_dispatch();
2008668: 40 00 0d a0 call 200bce8 <_Thread_Enable_dispatch>
200866c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EAGAIN );
2008670: 40 00 23 c8 call 2011590 <__errno>
2008674: 01 00 00 00 nop
2008678: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
200867c: c2 22 00 00 st %g1, [ %o0 ]
2008680: 81 c7 e0 08 ret
2008684: 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;
2008688: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ]
ptimer->thread_id = _Thread_Executing->Object.id;
200868c: 03 00 80 89 sethi %hi(0x2022400), %g1
2008690: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 2022600 <_Per_CPU_Information+0x10>
if ( evp != NULL ) {
2008694: 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;
2008698: c2 00 60 08 ld [ %g1 + 8 ], %g1
if ( evp != NULL ) {
200869c: 02 80 00 08 be 20086bc <timer_create+0xdc>
20086a0: c2 22 20 38 st %g1, [ %o0 + 0x38 ]
ptimer->inf.sigev_notify = evp->sigev_notify;
20086a4: c2 06 40 00 ld [ %i1 ], %g1
20086a8: c2 22 20 40 st %g1, [ %o0 + 0x40 ]
ptimer->inf.sigev_signo = evp->sigev_signo;
20086ac: c2 06 60 04 ld [ %i1 + 4 ], %g1
20086b0: c2 22 20 44 st %g1, [ %o0 + 0x44 ]
ptimer->inf.sigev_value = evp->sigev_value;
20086b4: c2 06 60 08 ld [ %i1 + 8 ], %g1
20086b8: c2 22 20 48 st %g1, [ %o0 + 0x48 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20086bc: c4 12 20 0a lduh [ %o0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20086c0: 07 00 80 88 sethi %hi(0x2022000), %g3
20086c4: c6 00 e3 c0 ld [ %g3 + 0x3c0 ], %g3 ! 20223c0 <_POSIX_Timer_Information+0x1c>
}
ptimer->overrun = 0;
20086c8: c0 22 20 68 clr [ %o0 + 0x68 ]
ptimer->timer_data.it_value.tv_sec = 0;
20086cc: c0 22 20 5c clr [ %o0 + 0x5c ]
ptimer->timer_data.it_value.tv_nsec = 0;
20086d0: c0 22 20 60 clr [ %o0 + 0x60 ]
ptimer->timer_data.it_interval.tv_sec = 0;
20086d4: c0 22 20 54 clr [ %o0 + 0x54 ]
ptimer->timer_data.it_interval.tv_nsec = 0;
20086d8: c0 22 20 58 clr [ %o0 + 0x58 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20086dc: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
20086e0: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
20086e4: c0 22 20 30 clr [ %o0 + 0x30 ]
the_watchdog->user_data = user_data;
20086e8: c0 22 20 34 clr [ %o0 + 0x34 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20086ec: c2 02 20 08 ld [ %o0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20086f0: 85 28 a0 02 sll %g2, 2, %g2
20086f4: 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;
20086f8: 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;
20086fc: c2 26 80 00 st %g1, [ %i2 ]
_Thread_Enable_dispatch();
2008700: 40 00 0d 7a call 200bce8 <_Thread_Enable_dispatch>
2008704: b0 10 20 00 clr %i0
return 0;
}
2008708: 81 c7 e0 08 ret
200870c: 81 e8 00 00 restore
020071e8 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
20071e8: 9d e3 bf 78 save %sp, -136, %sp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
20071ec: 80 a6 a0 00 cmp %i2, 0
20071f0: 02 80 00 80 be 20073f0 <timer_settime+0x208> <== NEVER TAKEN
20071f4: 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) ) ) {
20071f8: 40 00 0f 83 call 200b004 <_Timespec_Is_valid>
20071fc: 90 06 a0 08 add %i2, 8, %o0
2007200: 80 8a 20 ff btst 0xff, %o0
2007204: 02 80 00 7b be 20073f0 <timer_settime+0x208>
2007208: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
200720c: 40 00 0f 7e call 200b004 <_Timespec_Is_valid>
2007210: 90 10 00 1a mov %i2, %o0
2007214: 80 8a 20 ff btst 0xff, %o0
2007218: 02 80 00 76 be 20073f0 <timer_settime+0x208> <== NEVER TAKEN
200721c: 80 8e 7f fb btst -5, %i1
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
2007220: 12 80 00 74 bne 20073f0 <timer_settime+0x208>
2007224: 90 07 bf f0 add %fp, -16, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
2007228: 92 10 00 1a mov %i2, %o1
200722c: 40 00 25 91 call 2010870 <memcpy>
2007230: 94 10 20 10 mov 0x10, %o2
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
2007234: 80 a6 60 04 cmp %i1, 4
2007238: 12 80 00 1f bne 20072b4 <timer_settime+0xcc>
200723c: 11 00 80 78 sethi %hi(0x201e000), %o0
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
2007240: 90 07 bf e0 add %fp, -32, %o0
2007244: 13 00 80 77 sethi %hi(0x201dc00), %o1
2007248: 40 00 06 74 call 2008c18 <_TOD_Get_with_nanoseconds>
200724c: 92 12 63 68 or %o1, 0x368, %o1 ! 201df68 <_TOD>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
2007250: f8 1a 00 00 ldd [ %o0 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007254: 94 10 20 00 clr %o2
2007258: 90 10 00 1c mov %i4, %o0
200725c: 92 10 00 1d mov %i5, %o1
2007260: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007264: 40 00 48 ed call 2019618 <__divdi3>
2007268: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
200726c: 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);
2007270: d2 27 bf e8 st %o1, [ %fp + -24 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007274: 90 10 00 1c mov %i4, %o0
2007278: 92 10 00 1d mov %i5, %o1
200727c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007280: 40 00 49 d1 call 20199c4 <__moddi3>
2007284: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
2007288: 90 07 bf f8 add %fp, -8, %o0
200728c: d2 27 bf ec st %o1, [ %fp + -20 ]
2007290: 40 00 0f 6f call 200b04c <_Timespec_Less_than>
2007294: 92 07 bf e8 add %fp, -24, %o1
2007298: 80 8a 20 ff btst 0xff, %o0
200729c: 12 80 00 55 bne 20073f0 <timer_settime+0x208>
20072a0: 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 );
20072a4: 90 07 bf e8 add %fp, -24, %o0
20072a8: 40 00 0f 79 call 200b08c <_Timespec_Subtract>
20072ac: 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 *)
20072b0: 11 00 80 78 sethi %hi(0x201e000), %o0
20072b4: 92 10 00 18 mov %i0, %o1
20072b8: 90 12 22 f4 or %o0, 0x2f4, %o0
20072bc: 40 00 08 fe call 20096b4 <_Objects_Get>
20072c0: 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 ) {
20072c4: c2 07 bf dc ld [ %fp + -36 ], %g1
20072c8: 80 a0 60 00 cmp %g1, 0
20072cc: 12 80 00 49 bne 20073f0 <timer_settime+0x208>
20072d0: 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 ) {
20072d4: c2 07 bf f8 ld [ %fp + -8 ], %g1
20072d8: 80 a0 60 00 cmp %g1, 0
20072dc: 12 80 00 14 bne 200732c <timer_settime+0x144>
20072e0: c2 07 bf fc ld [ %fp + -4 ], %g1
20072e4: 80 a0 60 00 cmp %g1, 0
20072e8: 12 80 00 11 bne 200732c <timer_settime+0x144>
20072ec: 01 00 00 00 nop
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
20072f0: 40 00 10 75 call 200b4c4 <_Watchdog_Remove>
20072f4: 90 02 20 10 add %o0, 0x10, %o0
/* The old data of the timer are returned */
if ( ovalue )
20072f8: 80 a6 e0 00 cmp %i3, 0
20072fc: 02 80 00 05 be 2007310 <timer_settime+0x128>
2007300: 90 10 00 1b mov %i3, %o0
*ovalue = ptimer->timer_data;
2007304: 92 06 60 54 add %i1, 0x54, %o1
2007308: 40 00 25 5a call 2010870 <memcpy>
200730c: 94 10 20 10 mov 0x10, %o2
/* The new data are set */
ptimer->timer_data = normalize;
2007310: 90 06 60 54 add %i1, 0x54, %o0
2007314: 92 07 bf f0 add %fp, -16, %o1
2007318: 40 00 25 56 call 2010870 <memcpy>
200731c: 94 10 20 10 mov 0x10, %o2
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
2007320: 82 10 20 04 mov 4, %g1
2007324: 10 80 00 2f b 20073e0 <timer_settime+0x1f8>
2007328: 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 );
200732c: 40 00 0f 69 call 200b0d0 <_Timespec_To_ticks>
2007330: 90 10 00 1a mov %i2, %o0
2007334: d0 26 60 64 st %o0, [ %i1 + 0x64 ]
initial_period = _Timespec_To_ticks( &normalize.it_value );
2007338: 40 00 0f 66 call 200b0d0 <_Timespec_To_ticks>
200733c: 90 07 bf f8 add %fp, -8, %o0
activated = _POSIX_Timer_Insert_helper(
2007340: 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 );
2007344: 92 10 00 08 mov %o0, %o1
activated = _POSIX_Timer_Insert_helper(
2007348: 17 00 80 1d sethi %hi(0x2007400), %o3
200734c: 90 06 60 10 add %i1, 0x10, %o0
2007350: 96 12 e0 08 or %o3, 8, %o3
2007354: 40 00 18 79 call 200d538 <_POSIX_Timer_Insert_helper>
2007358: 98 10 00 19 mov %i1, %o4
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
200735c: 80 8a 20 ff btst 0xff, %o0
2007360: 02 80 00 20 be 20073e0 <timer_settime+0x1f8>
2007364: 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 )
2007368: 02 80 00 05 be 200737c <timer_settime+0x194>
200736c: 90 10 00 1b mov %i3, %o0
*ovalue = ptimer->timer_data;
2007370: 92 06 60 54 add %i1, 0x54, %o1
2007374: 40 00 25 3f call 2010870 <memcpy>
2007378: 94 10 20 10 mov 0x10, %o2
ptimer->timer_data = normalize;
200737c: 94 10 20 10 mov 0x10, %o2
2007380: 92 07 bf f0 add %fp, -16, %o1
2007384: 40 00 25 3b call 2010870 <memcpy>
2007388: 90 06 60 54 add %i1, 0x54, %o0
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
200738c: 82 10 20 03 mov 3, %g1
2007390: 90 07 bf e0 add %fp, -32, %o0
2007394: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
2007398: 13 00 80 77 sethi %hi(0x201dc00), %o1
200739c: 40 00 06 1f call 2008c18 <_TOD_Get_with_nanoseconds>
20073a0: 92 12 63 68 or %o1, 0x368, %o1 ! 201df68 <_TOD>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
20073a4: f8 1a 00 00 ldd [ %o0 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
20073a8: 94 10 20 00 clr %o2
20073ac: 90 10 00 1c mov %i4, %o0
20073b0: 92 10 00 1d mov %i5, %o1
20073b4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20073b8: 40 00 48 98 call 2019618 <__divdi3>
20073bc: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20073c0: 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);
20073c4: d2 26 60 6c st %o1, [ %i1 + 0x6c ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20073c8: 94 10 20 00 clr %o2
20073cc: 92 10 00 1d mov %i5, %o1
20073d0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20073d4: 40 00 49 7c call 20199c4 <__moddi3>
20073d8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
20073dc: d2 26 60 70 st %o1, [ %i1 + 0x70 ]
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
20073e0: 40 00 0c 6d call 200a594 <_Thread_Enable_dispatch>
20073e4: b0 10 20 00 clr %i0
20073e8: 81 c7 e0 08 ret
20073ec: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
20073f0: 40 00 22 cf call 200ff2c <__errno>
20073f4: b0 10 3f ff mov -1, %i0
20073f8: 82 10 20 16 mov 0x16, %g1
20073fc: c2 22 00 00 st %g1, [ %o0 ]
}
2007400: 81 c7 e0 08 ret
2007404: 81 e8 00 00 restore
020073b8 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
20073b8: 9d e3 bf 98 save %sp, -104, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
20073bc: 3b 00 80 7e sethi %hi(0x201f800), %i5
20073c0: ba 17 62 98 or %i5, 0x298, %i5 ! 201fa98 <_POSIX_signals_Ualarm_timer>
20073c4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20073c8: 80 a0 60 00 cmp %g1, 0
20073cc: 12 80 00 0a bne 20073f4 <ualarm+0x3c>
20073d0: b8 10 00 18 mov %i0, %i4
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20073d4: 03 00 80 1c sethi %hi(0x2007000), %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20073d8: c0 27 60 08 clr [ %i5 + 8 ]
the_watchdog->routine = routine;
20073dc: 82 10 63 8c or %g1, 0x38c, %g1
the_watchdog->id = id;
20073e0: c0 27 60 20 clr [ %i5 + 0x20 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20073e4: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20073e8: c0 27 60 24 clr [ %i5 + 0x24 ]
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
20073ec: 10 80 00 1b b 2007458 <ualarm+0xa0>
20073f0: 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 );
20073f4: 40 00 0f f1 call 200b3b8 <_Watchdog_Remove>
20073f8: 90 10 00 1d mov %i5, %o0
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
20073fc: 90 02 3f fe add %o0, -2, %o0
2007400: 80 a2 20 01 cmp %o0, 1
2007404: 18 80 00 15 bgu 2007458 <ualarm+0xa0> <== NEVER TAKEN
2007408: 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);
200740c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2007410: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
2007414: 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);
2007418: 90 02 00 01 add %o0, %g1, %o0
200741c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
2007420: 40 00 0e ac call 200aed0 <_Timespec_From_ticks>
2007424: 90 22 00 01 sub %o0, %g1, %o0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
2007428: c2 07 bf f8 ld [ %fp + -8 ], %g1
remaining += tp.tv_nsec / 1000;
200742c: 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;
2007430: 85 28 60 03 sll %g1, 3, %g2
2007434: 87 28 60 08 sll %g1, 8, %g3
2007438: 84 20 c0 02 sub %g3, %g2, %g2
remaining += tp.tv_nsec / 1000;
200743c: 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;
2007440: b1 28 a0 06 sll %g2, 6, %i0
2007444: b0 26 00 02 sub %i0, %g2, %i0
remaining += tp.tv_nsec / 1000;
2007448: 40 00 4b fa call 201a430 <.div>
200744c: 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;
2007450: b1 2e 20 06 sll %i0, 6, %i0
remaining += tp.tv_nsec / 1000;
2007454: 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 ) {
2007458: 80 a7 20 00 cmp %i4, 0
200745c: 02 80 00 19 be 20074c0 <ualarm+0x108>
2007460: 3b 00 03 d0 sethi %hi(0xf4000), %i5
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2007464: 90 10 00 1c mov %i4, %o0
2007468: 40 00 4b f0 call 201a428 <.udiv>
200746c: 92 17 62 40 or %i5, 0x240, %o1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2007470: 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;
2007474: d0 27 bf f8 st %o0, [ %fp + -8 ]
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2007478: 40 00 4c 98 call 201a6d8 <.urem>
200747c: 90 10 00 1c mov %i4, %o0
2007480: 85 2a 20 07 sll %o0, 7, %g2
2007484: 83 2a 20 02 sll %o0, 2, %g1
2007488: 82 20 80 01 sub %g2, %g1, %g1
200748c: 90 00 40 08 add %g1, %o0, %o0
2007490: 91 2a 20 03 sll %o0, 3, %o0
2007494: d0 27 bf fc st %o0, [ %fp + -4 ]
ticks = _Timespec_To_ticks( &tp );
2007498: 40 00 0e a3 call 200af24 <_Timespec_To_ticks>
200749c: 90 07 bf f8 add %fp, -8, %o0
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
20074a0: 40 00 0e a1 call 200af24 <_Timespec_To_ticks>
20074a4: 90 07 bf f8 add %fp, -8, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20074a8: 13 00 80 7e sethi %hi(0x201f800), %o1
20074ac: 92 12 62 98 or %o1, 0x298, %o1 ! 201fa98 <_POSIX_signals_Ualarm_timer>
20074b0: d0 22 60 0c st %o0, [ %o1 + 0xc ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20074b4: 11 00 80 7c sethi %hi(0x201f000), %o0
20074b8: 40 00 0f 68 call 200b258 <_Watchdog_Insert>
20074bc: 90 12 22 3c or %o0, 0x23c, %o0 ! 201f23c <_Watchdog_Ticks_chain>
}
return remaining;
}
20074c0: 81 c7 e0 08 ret
20074c4: 81 e8 00 00 restore