=============================================================================== 020068ec <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 20068ec: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20068f0: 23 00 80 73 sethi %hi(0x201cc00), %l1 20068f4: e0 04 63 84 ld [ %l1 + 0x384 ], %l0 ! 201cf84 <_API_extensions_List> 20068f8: a2 14 63 84 or %l1, 0x384, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20068fc: a2 04 60 04 add %l1, 4, %l1 2006900: 80 a4 00 11 cmp %l0, %l1 2006904: 02 80 00 09 be 2006928 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 2006908: 01 00 00 00 nop * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 200690c: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006910: 9f c0 40 00 call %g1 2006914: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 2006918: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 200691c: 80 a4 00 11 cmp %l0, %l1 2006920: 32 bf ff fc bne,a 2006910 <_API_extensions_Run_postdriver+0x24> 2006924: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006928: 81 c7 e0 08 ret 200692c: 81 e8 00 00 restore =============================================================================== 02006930 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 2006930: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006934: 23 00 80 73 sethi %hi(0x201cc00), %l1 2006938: e0 04 63 84 ld [ %l1 + 0x384 ], %l0 ! 201cf84 <_API_extensions_List> 200693c: a2 14 63 84 or %l1, 0x384, %l1 2006940: a2 04 60 04 add %l1, 4, %l1 2006944: 80 a4 00 11 cmp %l0, %l1 2006948: 02 80 00 0a be 2006970 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 200694c: 25 00 80 73 sethi %hi(0x201cc00), %l2 2006950: a4 14 a2 00 or %l2, 0x200, %l2 ! 201ce00 <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 2006954: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2006958: 9f c0 40 00 call %g1 200695c: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 2006960: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006964: 80 a4 00 11 cmp %l0, %l1 2006968: 32 bf ff fc bne,a 2006958 <_API_extensions_Run_postswitch+0x28> 200696c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2006970: 81 c7 e0 08 ret 2006974: 81 e8 00 00 restore =============================================================================== 020090ac <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 20090ac: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 20090b0: 03 00 80 7f sethi %hi(0x201fc00), %g1 * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 20090b4: 7f ff ea 23 call 2003940 20090b8: e0 00 63 c0 ld [ %g1 + 0x3c0 ], %l0 ! 201ffc0 <_Thread_Executing> 20090bc: a2 10 00 08 mov %o0, %l1 switch ( the_rwlock->current_state ) { 20090c0: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 20090c4: 80 a0 60 00 cmp %g1, 0 20090c8: 12 80 00 0c bne 20090f8 <_CORE_RWLock_Obtain_for_reading+0x4c> 20090cc: 80 a0 60 01 cmp %g1, 1 case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; the_rwlock->number_of_readers += 1; 20090d0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 20090d4: 84 10 20 01 mov 1, %g2 the_rwlock->number_of_readers += 1; 20090d8: 82 00 60 01 inc %g1 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 20090dc: c4 26 20 44 st %g2, [ %i0 + 0x44 ] the_rwlock->number_of_readers += 1; 20090e0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 20090e4: 7f ff ea 1b call 2003950 20090e8: 01 00 00 00 nop executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 20090ec: c0 24 20 34 clr [ %l0 + 0x34 ] return; 20090f0: 81 c7 e0 08 ret 20090f4: 81 e8 00 00 restore * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 20090f8: 02 80 00 15 be 200914c <_CORE_RWLock_Obtain_for_reading+0xa0> 20090fc: 80 8e a0 ff btst 0xff, %i2 /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 2009100: 02 80 00 0d be 2009134 <_CORE_RWLock_Obtain_for_reading+0x88> 2009104: 82 10 20 01 mov 1, %g1 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 2009108: f2 24 20 20 st %i1, [ %l0 + 0x20 ] executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 200910c: c0 24 20 34 clr [ %l0 + 0x34 ] /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 2009110: f0 24 20 44 st %i0, [ %l0 + 0x44 ] executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 2009114: c0 24 20 30 clr [ %l0 + 0x30 ] 2009118: c2 26 20 30 st %g1, [ %i0 + 0x30 ] executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 200911c: 90 10 00 11 mov %l1, %o0 2009120: 7f ff ea 0c call 2003950 2009124: 35 00 80 24 sethi %hi(0x2009000), %i2 _Thread_queue_Enqueue_with_handler( 2009128: b2 10 00 1b mov %i3, %i1 200912c: 40 00 07 4e call 200ae64 <_Thread_queue_Enqueue_with_handler> 2009130: 95 ee a2 f8 restore %i2, 0x2f8, %o2 /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); 2009134: 7f ff ea 07 call 2003950 2009138: 90 10 00 11 mov %l1, %o0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 200913c: 82 10 20 02 mov 2, %g1 2009140: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 2009144: 81 c7 e0 08 ret 2009148: 81 e8 00 00 restore executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 200914c: 40 00 08 43 call 200b258 <_Thread_queue_First> 2009150: 90 10 00 18 mov %i0, %o0 if ( !waiter ) { 2009154: 80 a2 20 00 cmp %o0, 0 2009158: 12 bf ff ea bne 2009100 <_CORE_RWLock_Obtain_for_reading+0x54><== NEVER TAKEN 200915c: 80 8e a0 ff btst 0xff, %i2 the_rwlock->number_of_readers += 1; 2009160: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2009164: 82 00 60 01 inc %g1 2009168: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 200916c: 7f ff e9 f9 call 2003950 2009170: 90 10 00 11 mov %l1, %o0 executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2009174: c0 24 20 34 clr [ %l0 + 0x34 ] return; 2009178: 81 c7 e0 08 ret 200917c: 81 e8 00 00 restore =============================================================================== 02009204 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 2009204: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 2009208: 03 00 80 7f sethi %hi(0x201fc00), %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 ); 200920c: 7f ff e9 cd call 2003940 2009210: e0 00 63 c0 ld [ %g1 + 0x3c0 ], %l0 ! 201ffc0 <_Thread_Executing> 2009214: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 2009218: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 200921c: 80 a0 60 00 cmp %g1, 0 2009220: 02 80 00 2c be 20092d0 <_CORE_RWLock_Release+0xcc> 2009224: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 2009228: 22 80 00 23 be,a 20092b4 <_CORE_RWLock_Release+0xb0> 200922c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2009230: c0 24 20 34 clr [ %l0 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 2009234: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 2009238: 7f ff e9 c6 call 2003950 200923c: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 2009240: 40 00 06 a7 call 200acdc <_Thread_queue_Dequeue> 2009244: 90 10 00 18 mov %i0, %o0 if ( next ) { 2009248: 80 a2 20 00 cmp %o0, 0 200924c: 22 80 00 25 be,a 20092e0 <_CORE_RWLock_Release+0xdc> 2009250: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 2009254: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 2009258: 80 a0 60 01 cmp %g1, 1 200925c: 02 80 00 23 be 20092e8 <_CORE_RWLock_Release+0xe4> 2009260: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2009264: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2009268: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200926c: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2009270: 10 80 00 0a b 2009298 <_CORE_RWLock_Release+0x94> 2009274: c2 26 20 48 st %g1, [ %i0 + 0x48 ] * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 2009278: 80 a0 60 01 cmp %g1, 1 200927c: 02 80 00 0c be 20092ac <_CORE_RWLock_Release+0xa8> <== NEVER TAKEN 2009280: 92 10 00 08 mov %o0, %o1 return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 2009284: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2009288: 90 10 00 18 mov %i0, %o0 while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 200928c: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2009290: 40 00 07 9f call 200b10c <_Thread_queue_Extract> 2009294: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 2009298: 40 00 07 f0 call 200b258 <_Thread_queue_First> 200929c: 90 10 00 18 mov %i0, %o0 if ( !next || 20092a0: 80 a2 20 00 cmp %o0, 0 20092a4: 32 bf ff f5 bne,a 2009278 <_CORE_RWLock_Release+0x74> 20092a8: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 20092ac: 81 c7 e0 08 ret 20092b0: 91 e8 20 00 restore %g0, 0, %o0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 20092b4: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 20092b8: 80 a0 60 00 cmp %g1, 0 20092bc: 02 bf ff dd be 2009230 <_CORE_RWLock_Release+0x2c> 20092c0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 20092c4: 7f ff e9 a3 call 2003950 20092c8: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 20092cc: 30 80 00 05 b,a 20092e0 <_CORE_RWLock_Release+0xdc> * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 20092d0: 7f ff e9 a0 call 2003950 20092d4: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 20092d8: 82 10 20 02 mov 2, %g1 20092dc: c2 24 20 34 st %g1, [ %l0 + 0x34 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 20092e0: 81 c7 e0 08 ret 20092e4: 81 e8 00 00 restore next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 20092e8: 82 10 20 02 mov 2, %g1 20092ec: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 20092f0: 81 c7 e0 08 ret 20092f4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020092f8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 20092f8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 20092fc: 90 10 00 18 mov %i0, %o0 2009300: 40 00 05 74 call 200a8d0 <_Thread_Get> 2009304: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009308: c2 07 bf fc ld [ %fp + -4 ], %g1 200930c: 80 a0 60 00 cmp %g1, 0 2009310: 12 80 00 08 bne 2009330 <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN 2009314: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2009318: 40 00 08 0c call 200b348 <_Thread_queue_Process_timeout> 200931c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2009320: 03 00 80 7f sethi %hi(0x201fc00), %g1 2009324: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201ff00 <_Thread_Dispatch_disable_level> 2009328: 84 00 bf ff add %g2, -1, %g2 200932c: c4 20 63 00 st %g2, [ %g1 + 0x300 ] 2009330: 81 c7 e0 08 ret 2009334: 81 e8 00 00 restore =============================================================================== 020172e4 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 20172e4: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 20172e8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 20172ec: a0 10 00 18 mov %i0, %l0 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 20172f0: 80 a0 40 1a cmp %g1, %i2 20172f4: 0a 80 00 17 bcs 2017350 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 20172f8: b0 10 20 01 mov 1, %i0 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 20172fc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2017300: 80 a0 60 00 cmp %g1, 0 2017304: 02 80 00 0a be 201732c <_CORE_message_queue_Broadcast+0x48> 2017308: a4 10 20 00 clr %l2 *count = 0; 201730c: c0 27 40 00 clr [ %i5 ] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 2017310: 81 c7 e0 08 ret 2017314: 91 e8 20 00 restore %g0, 0, %o0 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2017318: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 201731c: 40 00 2a 90 call 2021d5c 2017320: a4 04 a0 01 inc %l2 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2017324: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 2017328: f4 20 40 00 st %i2, [ %g1 ] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 201732c: 40 00 0a d5 call 2019e80 <_Thread_queue_Dequeue> 2017330: 90 10 00 10 mov %l0, %o0 2017334: 92 10 00 19 mov %i1, %o1 2017338: a2 10 00 08 mov %o0, %l1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 201733c: 80 a2 20 00 cmp %o0, 0 2017340: 12 bf ff f6 bne 2017318 <_CORE_message_queue_Broadcast+0x34> 2017344: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 2017348: e4 27 40 00 st %l2, [ %i5 ] 201734c: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 2017350: 81 c7 e0 08 ret 2017354: 81 e8 00 00 restore =============================================================================== 02010cac <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 2010cac: 9d e3 bf a0 save %sp, -96, %sp size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 2010cb0: c0 26 20 48 clr [ %i0 + 0x48 ] ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 2010cb4: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 2010cb8: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 2010cbc: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 2010cc0: c0 26 20 64 clr [ %i0 + 0x64 ] /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 2010cc4: 80 8e e0 03 btst 3, %i3 2010cc8: 02 80 00 09 be 2010cec <_CORE_message_queue_Initialize+0x40> 2010ccc: a2 10 00 1b mov %i3, %l1 allocated_message_size += sizeof(uint32_t); 2010cd0: a2 06 e0 04 add %i3, 4, %l1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2010cd4: a2 0c 7f fc and %l1, -4, %l1 } if (allocated_message_size < maximum_message_size) 2010cd8: 80 a6 c0 11 cmp %i3, %l1 2010cdc: 08 80 00 05 bleu 2010cf0 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN 2010ce0: a0 04 60 14 add %l1, 0x14, %l0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2010ce4: 81 c7 e0 08 ret 2010ce8: 91 e8 20 00 restore %g0, 0, %o0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 2010cec: a0 04 60 14 add %l1, 0x14, %l0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 2010cf0: 92 10 00 1a mov %i2, %o1 2010cf4: 40 00 52 af call 20257b0 <.umul> 2010cf8: 90 10 00 10 mov %l0, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 2010cfc: 80 a2 00 11 cmp %o0, %l1 2010d00: 0a bf ff f9 bcs 2010ce4 <_CORE_message_queue_Initialize+0x38><== NEVER TAKEN 2010d04: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2010d08: 40 00 0c bc call 2013ff8 <_Workspace_Allocate> 2010d0c: 01 00 00 00 nop _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2010d10: 80 a2 20 00 cmp %o0, 0 2010d14: 02 bf ff f4 be 2010ce4 <_CORE_message_queue_Initialize+0x38> 2010d18: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2010d1c: 92 10 00 08 mov %o0, %o1 2010d20: 94 10 00 1a mov %i2, %o2 2010d24: 90 06 20 68 add %i0, 0x68, %o0 2010d28: 40 00 17 f4 call 2016cf8 <_Chain_Initialize> 2010d2c: 96 10 00 10 mov %l0, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 2010d30: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2010d34: c0 26 20 54 clr [ %i0 + 0x54 ] 2010d38: 82 18 60 01 xor %g1, 1, %g1 2010d3c: 80 a0 00 01 cmp %g0, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2010d40: 82 06 20 54 add %i0, 0x54, %g1 2010d44: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2010d48: 82 06 20 50 add %i0, 0x50, %g1 2010d4c: 90 10 00 18 mov %i0, %o0 2010d50: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 2010d54: 92 60 3f ff subx %g0, -1, %o1 2010d58: 94 10 20 80 mov 0x80, %o2 2010d5c: 96 10 20 06 mov 6, %o3 2010d60: 40 00 09 4e call 2013298 <_Thread_queue_Initialize> 2010d64: b0 10 20 01 mov 1, %i0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 2010d68: 81 c7 e0 08 ret 2010d6c: 81 e8 00 00 restore =============================================================================== 02006c24 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 2006c24: 9d e3 bf a0 save %sp, -96, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 2006c28: 21 00 80 73 sethi %hi(0x201cc00), %l0 2006c2c: c2 04 21 40 ld [ %l0 + 0x140 ], %g1 ! 201cd40 <_Thread_Dispatch_disable_level> 2006c30: 80 a0 60 00 cmp %g1, 0 2006c34: 02 80 00 05 be 2006c48 <_CORE_mutex_Seize+0x24> 2006c38: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2006c3c: 80 8e a0 ff btst 0xff, %i2 2006c40: 12 80 00 1a bne 2006ca8 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN 2006c44: 03 00 80 73 sethi %hi(0x201cc00), %g1 2006c48: 90 10 00 18 mov %i0, %o0 2006c4c: 40 00 17 6f call 200ca08 <_CORE_mutex_Seize_interrupt_trylock> 2006c50: 92 07 a0 54 add %fp, 0x54, %o1 2006c54: 80 a2 20 00 cmp %o0, 0 2006c58: 02 80 00 12 be 2006ca0 <_CORE_mutex_Seize+0x7c> 2006c5c: 80 8e a0 ff btst 0xff, %i2 2006c60: 02 80 00 1a be 2006cc8 <_CORE_mutex_Seize+0xa4> 2006c64: 01 00 00 00 nop 2006c68: c4 04 21 40 ld [ %l0 + 0x140 ], %g2 2006c6c: 03 00 80 73 sethi %hi(0x201cc00), %g1 2006c70: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 201ce00 <_Thread_Executing> 2006c74: f2 20 60 20 st %i1, [ %g1 + 0x20 ] 2006c78: f0 20 60 44 st %i0, [ %g1 + 0x44 ] 2006c7c: 82 00 a0 01 add %g2, 1, %g1 2006c80: c2 24 21 40 st %g1, [ %l0 + 0x140 ] 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; 2006c84: 82 10 20 01 mov 1, %g1 2006c88: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 2006c8c: 7f ff ed 8c call 20022bc 2006c90: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006c94: 90 10 00 18 mov %i0, %o0 2006c98: 7f ff ff c0 call 2006b98 <_CORE_mutex_Seize_interrupt_blocking> 2006c9c: 92 10 00 1b mov %i3, %o1 2006ca0: 81 c7 e0 08 ret 2006ca4: 81 e8 00 00 restore 2006ca8: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 2006cac: 80 a0 60 01 cmp %g1, 1 2006cb0: 28 bf ff e7 bleu,a 2006c4c <_CORE_mutex_Seize+0x28> 2006cb4: 90 10 00 18 mov %i0, %o0 2006cb8: 90 10 20 00 clr %o0 2006cbc: 92 10 20 00 clr %o1 2006cc0: 40 00 01 a6 call 2007358 <_Internal_error_Occurred> 2006cc4: 94 10 20 13 mov 0x13, %o2 2006cc8: 7f ff ed 7d call 20022bc 2006ccc: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006cd0: 03 00 80 73 sethi %hi(0x201cc00), %g1 2006cd4: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 201ce00 <_Thread_Executing> 2006cd8: 84 10 20 01 mov 1, %g2 2006cdc: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 2006ce0: 81 c7 e0 08 ret 2006ce4: 81 e8 00 00 restore =============================================================================== 02006e84 <_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 ) { 2006e84: 9d e3 bf a0 save %sp, -96, %sp 2006e88: a0 10 00 18 mov %i0, %l0 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 2006e8c: b0 10 20 00 clr %i0 2006e90: 40 00 06 59 call 20087f4 <_Thread_queue_Dequeue> 2006e94: 90 10 00 10 mov %l0, %o0 2006e98: 80 a2 20 00 cmp %o0, 0 2006e9c: 02 80 00 04 be 2006eac <_CORE_semaphore_Surrender+0x28> 2006ea0: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 2006ea4: 81 c7 e0 08 ret 2006ea8: 81 e8 00 00 restore if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 2006eac: 7f ff ed 00 call 20022ac 2006eb0: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 2006eb4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2006eb8: c4 04 20 40 ld [ %l0 + 0x40 ], %g2 2006ebc: 80 a0 40 02 cmp %g1, %g2 2006ec0: 1a 80 00 05 bcc 2006ed4 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN 2006ec4: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2006ec8: 82 00 60 01 inc %g1 2006ecc: b0 10 20 00 clr %i0 2006ed0: c2 24 20 48 st %g1, [ %l0 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2006ed4: 7f ff ec fa call 20022bc 2006ed8: 01 00 00 00 nop } return status; } 2006edc: 81 c7 e0 08 ret 2006ee0: 81 e8 00 00 restore =============================================================================== 0200c9d0 <_Chain_Initialize>: Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 200c9d0: c0 22 20 04 clr [ %o0 + 4 ] next = starting_address; while ( count-- ) { 200c9d4: 80 a2 a0 00 cmp %o2, 0 200c9d8: 02 80 00 08 be 200c9f8 <_Chain_Initialize+0x28> <== NEVER TAKEN 200c9dc: 82 10 00 08 mov %o0, %g1 current->next = next; next->previous = current; 200c9e0: c2 22 60 04 st %g1, [ %o1 + 4 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 200c9e4: d2 20 40 00 st %o1, [ %g1 ] count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 200c9e8: 94 82 bf ff addcc %o2, -1, %o2 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 200c9ec: 82 10 00 09 mov %o1, %g1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 200c9f0: 12 bf ff fc bne 200c9e0 <_Chain_Initialize+0x10> 200c9f4: 92 02 40 0b add %o1, %o3, %o1 next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 200c9f8: 84 02 20 04 add %o0, 4, %g2 200c9fc: c4 20 40 00 st %g2, [ %g1 ] the_chain->last = current; } 200ca00: 81 c3 e0 08 retl 200ca04: c2 22 20 08 st %g1, [ %o0 + 8 ] =============================================================================== 020059ec <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 20059ec: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 20059f0: 03 00 80 73 sethi %hi(0x201cc00), %g1 20059f4: e0 00 62 00 ld [ %g1 + 0x200 ], %l0 ! 201ce00 <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 20059f8: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 20059fc: 7f ff f2 2c call 20022ac 2005a00: e4 04 21 68 ld [ %l0 + 0x168 ], %l2 pending_events = api->pending_events; 2005a04: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 2005a08: a2 8e 00 01 andcc %i0, %g1, %l1 2005a0c: 02 80 00 07 be 2005a28 <_Event_Seize+0x3c> 2005a10: 80 8e 60 01 btst 1, %i1 2005a14: 80 a6 00 11 cmp %i0, %l1 2005a18: 02 80 00 23 be 2005aa4 <_Event_Seize+0xb8> 2005a1c: 80 8e 60 02 btst 2, %i1 2005a20: 12 80 00 21 bne 2005aa4 <_Event_Seize+0xb8> <== ALWAYS TAKEN 2005a24: 80 8e 60 01 btst 1, %i1 _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 2005a28: 12 80 00 18 bne 2005a88 <_Event_Seize+0x9c> 2005a2c: 82 10 20 01 mov 1, %g1 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 2005a30: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t) event_in; 2005a34: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 2005a38: f6 24 20 28 st %i3, [ %l0 + 0x28 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2005a3c: 33 00 80 75 sethi %hi(0x201d400), %i1 2005a40: c2 26 62 74 st %g1, [ %i1 + 0x274 ] ! 201d674 <_Event_Sync_state> _ISR_Enable( level ); 2005a44: 7f ff f2 1e call 20022bc 2005a48: 01 00 00 00 nop if ( ticks ) { 2005a4c: 80 a6 a0 00 cmp %i2, 0 2005a50: 32 80 00 1c bne,a 2005ac0 <_Event_Seize+0xd4> 2005a54: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2005a58: 90 10 00 10 mov %l0, %o0 2005a5c: 40 00 0c e7 call 2008df8 <_Thread_Set_state> 2005a60: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 2005a64: 7f ff f2 12 call 20022ac 2005a68: 01 00 00 00 nop sync_state = _Event_Sync_state; 2005a6c: f0 06 62 74 ld [ %i1 + 0x274 ], %i0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 2005a70: c0 26 62 74 clr [ %i1 + 0x274 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 2005a74: 80 a6 20 01 cmp %i0, 1 2005a78: 02 80 00 1f be 2005af4 <_Event_Seize+0x108> 2005a7c: b2 10 00 10 mov %l0, %i1 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 2005a80: 40 00 08 97 call 2007cdc <_Thread_blocking_operation_Cancel> 2005a84: 95 e8 00 08 restore %g0, %o0, %o2 *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 2005a88: 7f ff f2 0d call 20022bc 2005a8c: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 2005a90: 82 10 20 0d mov 0xd, %g1 ! d 2005a94: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 2005a98: e2 26 c0 00 st %l1, [ %i3 ] 2005a9c: 81 c7 e0 08 ret 2005aa0: 81 e8 00 00 restore pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 2005aa4: 82 28 40 11 andn %g1, %l1, %g1 2005aa8: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 2005aac: 7f ff f2 04 call 20022bc 2005ab0: 01 00 00 00 nop *event_out = seized_events; 2005ab4: e2 26 c0 00 st %l1, [ %i3 ] return; 2005ab8: 81 c7 e0 08 ret 2005abc: 81 e8 00 00 restore Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2005ac0: f4 24 20 54 st %i2, [ %l0 + 0x54 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2005ac4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005ac8: 03 00 80 17 sethi %hi(0x2005c00), %g1 2005acc: 82 10 60 a0 or %g1, 0xa0, %g1 ! 2005ca0 <_Event_Timeout> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005ad0: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2005ad4: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005ad8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005adc: 11 00 80 73 sethi %hi(0x201cc00), %o0 2005ae0: 92 04 20 48 add %l0, 0x48, %o1 2005ae4: 40 00 0e e1 call 2009668 <_Watchdog_Insert> 2005ae8: 90 12 22 20 or %o0, 0x220, %o0 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2005aec: 10 bf ff dc b 2005a5c <_Event_Seize+0x70> 2005af0: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 2005af4: 7f ff f1 f2 call 20022bc 2005af8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02005b58 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2005b58: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 2005b5c: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2005b60: 7f ff f1 d3 call 20022ac 2005b64: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 2005b68: a2 10 00 08 mov %o0, %l1 pending_events = api->pending_events; 2005b6c: c4 04 00 00 ld [ %l0 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 2005b70: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 2005b74: 86 88 40 02 andcc %g1, %g2, %g3 2005b78: 02 80 00 3e be 2005c70 <_Event_Surrender+0x118> 2005b7c: 09 00 80 73 sethi %hi(0x201cc00), %g4 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 2005b80: c8 01 21 dc ld [ %g4 + 0x1dc ], %g4 ! 201cddc <_ISR_Nest_level> 2005b84: 80 a1 20 00 cmp %g4, 0 2005b88: 12 80 00 1d bne 2005bfc <_Event_Surrender+0xa4> 2005b8c: 09 00 80 73 sethi %hi(0x201cc00), %g4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005b90: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 2005b94: 80 89 21 00 btst 0x100, %g4 2005b98: 02 80 00 34 be 2005c68 <_Event_Surrender+0x110> 2005b9c: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005ba0: 02 80 00 04 be 2005bb0 <_Event_Surrender+0x58> 2005ba4: 80 8c a0 02 btst 2, %l2 2005ba8: 02 80 00 30 be 2005c68 <_Event_Surrender+0x110> <== NEVER TAKEN 2005bac: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005bb0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005bb4: 84 28 80 03 andn %g2, %g3, %g2 2005bb8: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 2005bbc: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005bc0: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 2005bc4: 7f ff f1 be call 20022bc 2005bc8: 90 10 00 11 mov %l1, %o0 2005bcc: 7f ff f1 b8 call 20022ac 2005bd0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005bd4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2005bd8: 80 a0 60 02 cmp %g1, 2 2005bdc: 02 80 00 27 be 2005c78 <_Event_Surrender+0x120> 2005be0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005be4: 90 10 00 11 mov %l1, %o0 2005be8: 7f ff f1 b5 call 20022bc 2005bec: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2005bf0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005bf4: 40 00 08 d5 call 2007f48 <_Thread_Clear_state> 2005bf8: 81 e8 00 00 restore /* * 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() && 2005bfc: c8 01 22 00 ld [ %g4 + 0x200 ], %g4 2005c00: 80 a6 00 04 cmp %i0, %g4 2005c04: 32 bf ff e4 bne,a 2005b94 <_Event_Surrender+0x3c> 2005c08: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2005c0c: 09 00 80 75 sethi %hi(0x201d400), %g4 2005c10: da 01 22 74 ld [ %g4 + 0x274 ], %o5 ! 201d674 <_Event_Sync_state> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 2005c14: 80 a3 60 02 cmp %o5, 2 2005c18: 02 80 00 07 be 2005c34 <_Event_Surrender+0xdc> <== NEVER TAKEN 2005c1c: 80 a0 40 03 cmp %g1, %g3 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 2005c20: da 01 22 74 ld [ %g4 + 0x274 ], %o5 /* * 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() && 2005c24: 80 a3 60 01 cmp %o5, 1 2005c28: 32 bf ff db bne,a 2005b94 <_Event_Surrender+0x3c> 2005c2c: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 2005c30: 80 a0 40 03 cmp %g1, %g3 2005c34: 02 80 00 04 be 2005c44 <_Event_Surrender+0xec> 2005c38: 80 8c a0 02 btst 2, %l2 2005c3c: 02 80 00 09 be 2005c60 <_Event_Surrender+0x108> <== NEVER TAKEN 2005c40: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005c44: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2005c48: 84 28 80 03 andn %g2, %g3, %g2 2005c4c: c4 24 00 00 st %g2, [ %l0 ] the_thread->Wait.count = 0; 2005c50: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005c54: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005c58: 82 10 20 03 mov 3, %g1 2005c5c: c2 21 22 74 st %g1, [ %g4 + 0x274 ] } _ISR_Enable( level ); 2005c60: 7f ff f1 97 call 20022bc 2005c64: 91 e8 00 11 restore %g0, %l1, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2005c68: 7f ff f1 95 call 20022bc 2005c6c: 91 e8 00 11 restore %g0, %l1, %o0 /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 2005c70: 7f ff f1 93 call 20022bc 2005c74: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2005c78: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 2005c7c: 7f ff f1 90 call 20022bc 2005c80: 90 10 00 11 mov %l1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 2005c84: 40 00 0e e6 call 200981c <_Watchdog_Remove> 2005c88: 90 06 20 48 add %i0, 0x48, %o0 2005c8c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 2005c90: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005c94: 40 00 08 ad call 2007f48 <_Thread_Clear_state> 2005c98: 81 e8 00 00 restore =============================================================================== 02005ca0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2005ca0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2005ca4: 90 10 00 18 mov %i0, %o0 2005ca8: 40 00 09 d0 call 20083e8 <_Thread_Get> 2005cac: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2005cb0: c2 07 bf fc ld [ %fp + -4 ], %g1 2005cb4: 80 a0 60 00 cmp %g1, 0 2005cb8: 12 80 00 15 bne 2005d0c <_Event_Timeout+0x6c> <== NEVER TAKEN 2005cbc: a0 10 00 08 mov %o0, %l0 * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 2005cc0: 7f ff f1 7b call 20022ac 2005cc4: 01 00 00 00 nop return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005cc8: 03 00 80 73 sethi %hi(0x201cc00), %g1 2005ccc: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 201ce00 <_Thread_Executing> 2005cd0: 80 a4 00 01 cmp %l0, %g1 2005cd4: 02 80 00 10 be 2005d14 <_Event_Timeout+0x74> 2005cd8: c0 24 20 24 clr [ %l0 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005cdc: 82 10 20 06 mov 6, %g1 2005ce0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] _ISR_Enable( level ); 2005ce4: 7f ff f1 76 call 20022bc 2005ce8: 01 00 00 00 nop 2005cec: 90 10 00 10 mov %l0, %o0 2005cf0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005cf4: 40 00 08 95 call 2007f48 <_Thread_Clear_state> 2005cf8: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2005cfc: 03 00 80 73 sethi %hi(0x201cc00), %g1 2005d00: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 201cd40 <_Thread_Dispatch_disable_level> 2005d04: 84 00 bf ff add %g2, -1, %g2 2005d08: c4 20 61 40 st %g2, [ %g1 + 0x140 ] 2005d0c: 81 c7 e0 08 ret 2005d10: 81 e8 00 00 restore } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 2005d14: 03 00 80 75 sethi %hi(0x201d400), %g1 2005d18: c4 00 62 74 ld [ %g1 + 0x274 ], %g2 ! 201d674 <_Event_Sync_state> 2005d1c: 80 a0 a0 01 cmp %g2, 1 2005d20: 32 bf ff f0 bne,a 2005ce0 <_Event_Timeout+0x40> 2005d24: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005d28: 84 10 20 02 mov 2, %g2 2005d2c: c4 20 62 74 st %g2, [ %g1 + 0x274 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005d30: 10 bf ff ec b 2005ce0 <_Event_Timeout+0x40> 2005d34: 82 10 20 06 mov 6, %g1 =============================================================================== 0200cc7c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200cc7c: 9d e3 bf 98 save %sp, -104, %sp Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 200cc80: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200cc84: a0 10 00 18 mov %i0, %l0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 200cc88: 80 a6 40 14 cmp %i1, %l4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200cc8c: e4 06 20 08 ld [ %i0 + 8 ], %l2 200cc90: 18 80 00 72 bgu 200ce58 <_Heap_Allocate_aligned_with_boundary+0x1dc> 200cc94: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200cc98: 80 a6 e0 00 cmp %i3, 0 200cc9c: 12 80 00 6d bne 200ce50 <_Heap_Allocate_aligned_with_boundary+0x1d4> 200cca0: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200cca4: 80 a4 00 12 cmp %l0, %l2 200cca8: 02 80 00 6f be 200ce64 <_Heap_Allocate_aligned_with_boundary+0x1e8> 200ccac: a2 10 20 00 clr %l1 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200ccb0: 82 10 20 04 mov 4, %g1 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 200ccb4: b8 07 60 07 add %i5, 7, %i4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200ccb8: 82 20 40 19 sub %g1, %i1, %g1 200ccbc: 10 80 00 09 b 200cce0 <_Heap_Allocate_aligned_with_boundary+0x64> 200ccc0: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 200ccc4: 80 a6 20 00 cmp %i0, 0 200ccc8: 32 80 00 54 bne,a 200ce18 <_Heap_Allocate_aligned_with_boundary+0x19c><== ALWAYS TAKEN 200cccc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 200ccd0: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200ccd4: 80 a4 00 12 cmp %l0, %l2 200ccd8: 22 80 00 57 be,a 200ce34 <_Heap_Allocate_aligned_with_boundary+0x1b8> 200ccdc: b0 10 20 00 clr %i0 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 200cce0: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200cce4: 80 a5 00 13 cmp %l4, %l3 200cce8: 1a bf ff fa bcc 200ccd0 <_Heap_Allocate_aligned_with_boundary+0x54> 200ccec: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200ccf0: 80 a6 a0 00 cmp %i2, 0 200ccf4: 02 bf ff f4 be 200ccc4 <_Heap_Allocate_aligned_with_boundary+0x48> 200ccf8: b0 04 a0 08 add %l2, 8, %i0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200ccfc: c2 07 bf fc ld [ %fp + -4 ], %g1 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 200cd00: ee 04 20 14 ld [ %l0 + 0x14 ], %l7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 200cd04: a6 0c ff fe and %l3, -2, %l3 200cd08: a6 04 80 13 add %l2, %l3, %l3 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200cd0c: b0 00 40 13 add %g1, %l3, %i0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 200cd10: 82 27 00 17 sub %i4, %l7, %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200cd14: 90 10 00 18 mov %i0, %o0 200cd18: a6 00 40 13 add %g1, %l3, %l3 200cd1c: 40 00 32 24 call 20195ac <.urem> 200cd20: 92 10 00 1a mov %i2, %o1 200cd24: b0 26 00 08 sub %i0, %o0, %i0 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 200cd28: 80 a4 c0 18 cmp %l3, %i0 200cd2c: 1a 80 00 06 bcc 200cd44 <_Heap_Allocate_aligned_with_boundary+0xc8> 200cd30: ac 04 a0 08 add %l2, 8, %l6 200cd34: 90 10 00 13 mov %l3, %o0 200cd38: 40 00 32 1d call 20195ac <.urem> 200cd3c: 92 10 00 1a mov %i2, %o1 200cd40: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200cd44: 80 a6 e0 00 cmp %i3, 0 200cd48: 02 80 00 24 be 200cdd8 <_Heap_Allocate_aligned_with_boundary+0x15c> 200cd4c: 80 a5 80 18 cmp %l6, %i0 /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 200cd50: a6 06 00 19 add %i0, %i1, %l3 200cd54: 92 10 00 1b mov %i3, %o1 200cd58: 40 00 32 15 call 20195ac <.urem> 200cd5c: 90 10 00 13 mov %l3, %o0 200cd60: 90 24 c0 08 sub %l3, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200cd64: 80 a4 c0 08 cmp %l3, %o0 200cd68: 08 80 00 1b bleu 200cdd4 <_Heap_Allocate_aligned_with_boundary+0x158> 200cd6c: 80 a6 00 08 cmp %i0, %o0 200cd70: 1a 80 00 1a bcc 200cdd8 <_Heap_Allocate_aligned_with_boundary+0x15c> 200cd74: 80 a5 80 18 cmp %l6, %i0 alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 200cd78: aa 05 80 19 add %l6, %i1, %l5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 200cd7c: 80 a5 40 08 cmp %l5, %o0 200cd80: 28 80 00 09 bleu,a 200cda4 <_Heap_Allocate_aligned_with_boundary+0x128> 200cd84: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 200cd88: 10 bf ff d3 b 200ccd4 <_Heap_Allocate_aligned_with_boundary+0x58> 200cd8c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200cd90: 1a 80 00 11 bcc 200cdd4 <_Heap_Allocate_aligned_with_boundary+0x158> 200cd94: 80 a5 40 08 cmp %l5, %o0 if ( boundary_line < boundary_floor ) { 200cd98: 38 bf ff cf bgu,a 200ccd4 <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 200cd9c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 200cda0: b0 22 00 19 sub %o0, %i1, %i0 200cda4: 92 10 00 1a mov %i2, %o1 200cda8: 40 00 32 01 call 20195ac <.urem> 200cdac: 90 10 00 18 mov %i0, %o0 200cdb0: 92 10 00 1b mov %i3, %o1 200cdb4: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200cdb8: a6 06 00 19 add %i0, %i1, %l3 200cdbc: 40 00 31 fc call 20195ac <.urem> 200cdc0: 90 10 00 13 mov %l3, %o0 200cdc4: 90 24 c0 08 sub %l3, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200cdc8: 80 a4 c0 08 cmp %l3, %o0 200cdcc: 18 bf ff f1 bgu 200cd90 <_Heap_Allocate_aligned_with_boundary+0x114> 200cdd0: 80 a6 00 08 cmp %i0, %o0 boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 200cdd4: 80 a5 80 18 cmp %l6, %i0 200cdd8: 18 bf ff be bgu 200ccd0 <_Heap_Allocate_aligned_with_boundary+0x54> 200cddc: 82 10 3f f8 mov -8, %g1 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 200cde0: 90 10 00 18 mov %i0, %o0 200cde4: a6 20 40 12 sub %g1, %l2, %l3 200cde8: 92 10 00 1d mov %i5, %o1 200cdec: 40 00 31 f0 call 20195ac <.urem> 200cdf0: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 200cdf4: 90 a4 c0 08 subcc %l3, %o0, %o0 200cdf8: 02 bf ff b4 be 200ccc8 <_Heap_Allocate_aligned_with_boundary+0x4c> 200cdfc: 80 a6 20 00 cmp %i0, 0 200ce00: 80 a5 c0 08 cmp %l7, %o0 200ce04: 18 bf ff b3 bgu 200ccd0 <_Heap_Allocate_aligned_with_boundary+0x54> 200ce08: 80 a6 20 00 cmp %i0, 0 boundary ); } } if ( alloc_begin != 0 ) { 200ce0c: 22 bf ff b2 be,a 200ccd4 <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN 200ce10: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200ce14: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200ce18: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200ce1c: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200ce20: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200ce24: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200ce28: 90 10 00 10 mov %l0, %o0 200ce2c: 7f ff e8 fa call 2007214 <_Heap_Block_allocate> 200ce30: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200ce34: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 200ce38: 80 a0 40 11 cmp %g1, %l1 200ce3c: 1a 80 00 08 bcc 200ce5c <_Heap_Allocate_aligned_with_boundary+0x1e0> 200ce40: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200ce44: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 200ce48: 81 c7 e0 08 ret 200ce4c: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200ce50: 08 80 00 07 bleu 200ce6c <_Heap_Allocate_aligned_with_boundary+0x1f0> 200ce54: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200ce58: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 200ce5c: 81 c7 e0 08 ret 200ce60: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200ce64: 10 bf ff f4 b 200ce34 <_Heap_Allocate_aligned_with_boundary+0x1b8> 200ce68: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200ce6c: 22 bf ff 8e be,a 200cca4 <_Heap_Allocate_aligned_with_boundary+0x28> 200ce70: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 200ce74: 10 bf ff 8d b 200cca8 <_Heap_Allocate_aligned_with_boundary+0x2c> 200ce78: 80 a4 00 12 cmp %l0, %l2 =============================================================================== 02011908 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2011908: 9d e3 bf a0 save %sp, -96, %sp Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 201190c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2011910: a0 10 00 18 mov %i0, %l0 * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 2011914: 80 a6 40 01 cmp %i1, %g1 2011918: 0a 80 00 2a bcs 20119c0 <_Heap_Extend+0xb8> 201191c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 2011920: 80 a6 40 01 cmp %i1, %g1 2011924: 12 80 00 25 bne 20119b8 <_Heap_Extend+0xb0> 2011928: b0 10 20 02 mov 2, %i0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 201192c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 2011930: b4 06 40 1a add %i1, %i2, %i2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 2011934: b2 26 80 11 sub %i2, %l1, %i1 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 2011938: f4 24 20 1c st %i2, [ %l0 + 0x1c ] extend_size = new_heap_area_end 201193c: b2 06 7f f8 add %i1, -8, %i1 2011940: 7f ff ca 7f call 200433c <.urem> 2011944: 90 10 00 19 mov %i1, %o0 2011948: 90 26 40 08 sub %i1, %o0, %o0 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 201194c: d0 26 c0 00 st %o0, [ %i3 ] if( extend_size >= heap->min_block_size ) { 2011950: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2011954: 80 a0 40 08 cmp %g1, %o0 2011958: 18 80 00 18 bgu 20119b8 <_Heap_Extend+0xb0> <== NEVER TAKEN 201195c: b0 10 20 00 clr %i0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 2011960: c2 04 60 04 ld [ %l1 + 4 ], %g1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 2011964: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 2011968: 82 08 60 01 and %g1, 1, %g1 201196c: 82 12 00 01 or %o0, %g1, %g1 2011970: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2011974: 82 02 00 11 add %o0, %l1, %g1 2011978: 84 20 80 01 sub %g2, %g1, %g2 201197c: 84 10 a0 01 or %g2, 1, %g2 2011980: c4 20 60 04 st %g2, [ %g1 + 4 ] heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2011984: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2011988: f2 04 20 2c ld [ %l0 + 0x2c ], %i1 ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 201198c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 2011990: c2 24 20 24 st %g1, [ %l0 + 0x24 ] /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2011994: 82 00 e0 01 add %g3, 1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 2011998: 90 06 40 08 add %i1, %o0, %o0 ++stats->used_blocks; 201199c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] --stats->frees; /* Do not count subsequent call as actual free() */ 20119a0: 82 00 bf ff add %g2, -1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 20119a4: d0 24 20 2c st %o0, [ %l0 + 0x2c ] ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 20119a8: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 20119ac: 90 10 00 10 mov %l0, %o0 20119b0: 7f ff e6 34 call 200b280 <_Heap_Free> 20119b4: 92 04 60 08 add %l1, 8, %o1 } return HEAP_EXTEND_SUCCESSFUL; } 20119b8: 81 c7 e0 08 ret 20119bc: 81 e8 00 00 restore uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 20119c0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 20119c4: 80 a6 40 02 cmp %i1, %g2 20119c8: 0a bf ff d6 bcs 2011920 <_Heap_Extend+0x18> 20119cc: b0 10 20 01 mov 1, %i0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 20119d0: 81 c7 e0 08 ret 20119d4: 81 e8 00 00 restore =============================================================================== 0200ce7c <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200ce7c: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 200ce80: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200ce84: 40 00 31 ca call 20195ac <.urem> 200ce88: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 200ce8c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 200ce90: b2 06 7f f8 add %i1, -8, %i1 200ce94: 90 26 40 08 sub %i1, %o0, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 200ce98: 80 a2 00 01 cmp %o0, %g1 200ce9c: 0a 80 00 36 bcs 200cf74 <_Heap_Free+0xf8> 200cea0: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 200cea4: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 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 200cea8: 80 a2 00 03 cmp %o0, %g3 200ceac: 18 80 00 32 bgu 200cf74 <_Heap_Free+0xf8> 200ceb0: 01 00 00 00 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 200ceb4: da 02 20 04 ld [ %o0 + 4 ], %o5 200ceb8: 88 0b 7f fe and %o5, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200cebc: 84 02 00 04 add %o0, %g4, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 200cec0: 80 a0 40 02 cmp %g1, %g2 200cec4: 18 80 00 2c bgu 200cf74 <_Heap_Free+0xf8> <== NEVER TAKEN 200cec8: 80 a0 c0 02 cmp %g3, %g2 200cecc: 0a 80 00 2a bcs 200cf74 <_Heap_Free+0xf8> <== NEVER TAKEN 200ced0: 01 00 00 00 nop block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 200ced4: d8 00 a0 04 ld [ %g2 + 4 ], %o4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200ced8: 80 8b 20 01 btst 1, %o4 200cedc: 02 80 00 26 be 200cf74 <_Heap_Free+0xf8> <== NEVER TAKEN 200cee0: 96 0b 3f fe and %o4, -2, %o3 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 200cee4: 80 a0 c0 02 cmp %g3, %g2 200cee8: 02 80 00 06 be 200cf00 <_Heap_Free+0x84> 200ceec: 98 10 20 00 clr %o4 #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 200cef0: 98 00 80 0b add %g2, %o3, %o4 200cef4: d8 03 20 04 ld [ %o4 + 4 ], %o4 200cef8: 98 0b 20 01 and %o4, 1, %o4 200cefc: 98 1b 20 01 xor %o4, 1, %o4 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 200cf00: 80 8b 60 01 btst 1, %o5 200cf04: 12 80 00 1e bne 200cf7c <_Heap_Free+0x100> 200cf08: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200cf0c: d4 02 00 00 ld [ %o0 ], %o2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200cf10: 9a 22 00 0a sub %o0, %o2, %o5 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 200cf14: 80 a0 40 0d cmp %g1, %o5 200cf18: 18 80 00 17 bgu 200cf74 <_Heap_Free+0xf8> <== NEVER TAKEN 200cf1c: 80 a0 c0 0d cmp %g3, %o5 200cf20: 0a 80 00 15 bcs 200cf74 <_Heap_Free+0xf8> <== NEVER TAKEN 200cf24: 01 00 00 00 nop return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 200cf28: c2 03 60 04 ld [ %o5 + 4 ], %g1 200cf2c: 80 88 60 01 btst 1, %g1 200cf30: 02 80 00 11 be 200cf74 <_Heap_Free+0xf8> <== NEVER TAKEN 200cf34: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200cf38: 22 80 00 3a be,a 200d020 <_Heap_Free+0x1a4> 200cf3c: 94 01 00 0a add %g4, %o2, %o2 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200cf40: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 200cf44: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200cf48: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200cf4c: 86 00 ff ff add %g3, -1, %g3 200cf50: c6 26 20 38 st %g3, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 200cf54: 96 01 00 0b add %g4, %o3, %o3 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 200cf58: c2 20 a0 0c st %g1, [ %g2 + 0xc ] 200cf5c: 94 02 c0 0a add %o3, %o2, %o2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 200cf60: c4 20 60 08 st %g2, [ %g1 + 8 ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 200cf64: d4 23 40 0a st %o2, [ %o5 + %o2 ] 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; 200cf68: 94 12 a0 01 or %o2, 1, %o2 200cf6c: 10 80 00 10 b 200cfac <_Heap_Free+0x130> 200cf70: d4 23 60 04 st %o2, [ %o5 + 4 ] --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200cf74: 81 c7 e0 08 ret 200cf78: 91 e8 20 00 restore %g0, 0, %o0 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; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200cf7c: 02 80 00 17 be 200cfd8 <_Heap_Free+0x15c> 200cf80: 82 11 20 01 or %g4, 1, %g1 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 200cf84: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 200cf88: c4 00 a0 08 ld [ %g2 + 8 ], %g2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 200cf8c: c2 22 20 0c st %g1, [ %o0 + 0xc ] ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 200cf90: c4 22 20 08 st %g2, [ %o0 + 8 ] uintptr_t const size = block_size + next_block_size; 200cf94: 96 02 c0 04 add %o3, %g4, %o3 new_block->prev = prev; next->prev = new_block; 200cf98: d0 20 a0 0c st %o0, [ %g2 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200cf9c: d6 22 00 0b st %o3, [ %o0 + %o3 ] prev->next = new_block; 200cfa0: d0 20 60 08 st %o0, [ %g1 + 8 ] 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; 200cfa4: 96 12 e0 01 or %o3, 1, %o3 200cfa8: d6 22 20 04 st %o3, [ %o0 + 4 ] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200cfac: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200cfb0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200cfb4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200cfb8: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; stats->free_size += block_size; 200cfbc: 88 00 c0 04 add %g3, %g4, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200cfc0: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; stats->free_size += block_size; 200cfc4: c8 26 20 30 st %g4, [ %i0 + 0x30 ] } } /* Statistics */ --stats->used_blocks; ++stats->frees; 200cfc8: 82 00 60 01 inc %g1 200cfcc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; return( true ); 200cfd0: 81 c7 e0 08 ret 200cfd4: 91 e8 20 01 restore %g0, 1, %o0 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; 200cfd8: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200cfdc: c2 00 a0 04 ld [ %g2 + 4 ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 200cfe0: c6 06 20 08 ld [ %i0 + 8 ], %g3 200cfe4: 82 08 7f fe and %g1, -2, %g1 next_block->prev_size = block_size; 200cfe8: c8 22 00 04 st %g4, [ %o0 + %g4 ] } 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; 200cfec: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200cff0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 new_block->next = next; 200cff4: c6 22 20 08 st %g3, [ %o0 + 8 ] new_block->prev = block_before; 200cff8: f0 22 20 0c st %i0, [ %o0 + 0xc ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 200cffc: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200d000: 82 00 60 01 inc %g1 block_before->next = new_block; next->prev = new_block; 200d004: d0 20 e0 0c st %o0, [ %g3 + 0xc ] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 200d008: d0 26 20 08 st %o0, [ %i0 + 8 ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 200d00c: 80 a0 40 02 cmp %g1, %g2 200d010: 08 bf ff e7 bleu 200cfac <_Heap_Free+0x130> 200d014: c2 26 20 38 st %g1, [ %i0 + 0x38 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 200d018: 10 bf ff e5 b 200cfac <_Heap_Free+0x130> 200d01c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] 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; 200d020: 82 12 a0 01 or %o2, 1, %g1 200d024: c2 23 60 04 st %g1, [ %o5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200d028: c2 00 a0 04 ld [ %g2 + 4 ], %g1 next_block->prev_size = size; 200d02c: d4 22 00 04 st %o2, [ %o0 + %g4 ] _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; 200d030: 82 08 7f fe and %g1, -2, %g1 200d034: 10 bf ff de b 200cfac <_Heap_Free+0x130> 200d038: c2 20 a0 04 st %g1, [ %g2 + 4 ] =============================================================================== 020119d8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 20119d8: 9d e3 bf a0 save %sp, -96, %sp return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 20119dc: c2 06 20 08 ld [ %i0 + 8 ], %g1 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 20119e0: c0 26 40 00 clr [ %i1 ] info->largest = 0; 20119e4: c0 26 60 04 clr [ %i1 + 4 ] info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 20119e8: 80 a6 00 01 cmp %i0, %g1 20119ec: 02 80 00 13 be 2011a38 <_Heap_Get_free_information+0x60> <== NEVER TAKEN 20119f0: c0 26 60 08 clr [ %i1 + 8 ] 20119f4: 88 10 20 01 mov 1, %g4 20119f8: 10 80 00 03 b 2011a04 <_Heap_Get_free_information+0x2c> 20119fc: 86 10 20 00 clr %g3 2011a00: 88 10 00 02 mov %g2, %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; 2011a04: c4 00 60 04 ld [ %g1 + 4 ], %g2 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 2011a08: da 06 60 04 ld [ %i1 + 4 ], %o5 2011a0c: 84 08 bf fe and %g2, -2, %g2 2011a10: 80 a3 40 02 cmp %o5, %g2 2011a14: 1a 80 00 03 bcc 2011a20 <_Heap_Get_free_information+0x48> 2011a18: 86 00 c0 02 add %g3, %g2, %g3 info->largest = the_size; 2011a1c: c4 26 60 04 st %g2, [ %i1 + 4 ] info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 2011a20: c2 00 60 08 ld [ %g1 + 8 ], %g1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 2011a24: 80 a6 00 01 cmp %i0, %g1 2011a28: 12 bf ff f6 bne 2011a00 <_Heap_Get_free_information+0x28> 2011a2c: 84 01 20 01 add %g4, 1, %g2 2011a30: c6 26 60 08 st %g3, [ %i1 + 8 ] 2011a34: c8 26 40 00 st %g4, [ %i1 ] 2011a38: 81 c7 e0 08 ret 2011a3c: 81 e8 00 00 restore =============================================================================== 02011a40 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2011a40: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 2011a44: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 2011a48: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 2011a4c: c0 26 40 00 clr [ %i1 ] the_info->Free.total = 0; 2011a50: c0 26 60 08 clr [ %i1 + 8 ] the_info->Free.largest = 0; 2011a54: c0 26 60 04 clr [ %i1 + 4 ] the_info->Used.number = 0; 2011a58: c0 26 60 0c clr [ %i1 + 0xc ] the_info->Used.total = 0; 2011a5c: c0 26 60 14 clr [ %i1 + 0x14 ] the_info->Used.largest = 0; 2011a60: c0 26 60 10 clr [ %i1 + 0x10 ] while ( the_block != end ) { 2011a64: 80 a0 40 02 cmp %g1, %g2 2011a68: 02 80 00 1a be 2011ad0 <_Heap_Get_information+0x90> <== NEVER TAKEN 2011a6c: 86 10 20 08 mov 8, %g3 2011a70: da 00 60 04 ld [ %g1 + 4 ], %o5 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 2011a74: 92 06 60 0c add %i1, 0xc, %o1 2011a78: 88 0b 7f fe and %o5, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2011a7c: 82 00 40 04 add %g1, %g4, %g1 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; 2011a80: da 00 60 04 ld [ %g1 + 4 ], %o5 while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 2011a84: 80 8b 60 01 btst 1, %o5 2011a88: 12 80 00 03 bne 2011a94 <_Heap_Get_information+0x54> 2011a8c: 86 10 00 09 mov %o1, %g3 2011a90: 86 10 00 19 mov %i1, %g3 info = &the_info->Used; else info = &the_info->Free; info->number++; 2011a94: d4 00 c0 00 ld [ %g3 ], %o2 info->total += the_size; 2011a98: d6 00 e0 08 ld [ %g3 + 8 ], %o3 if ( info->largest < the_size ) 2011a9c: d8 00 e0 04 ld [ %g3 + 4 ], %o4 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 2011aa0: 94 02 a0 01 inc %o2 info->total += the_size; 2011aa4: 96 02 c0 04 add %o3, %g4, %o3 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 2011aa8: d4 20 c0 00 st %o2, [ %g3 ] info->total += the_size; if ( info->largest < the_size ) 2011aac: 80 a3 00 04 cmp %o4, %g4 2011ab0: 1a 80 00 03 bcc 2011abc <_Heap_Get_information+0x7c> 2011ab4: d6 20 e0 08 st %o3, [ %g3 + 8 ] info->largest = the_size; 2011ab8: c8 20 e0 04 st %g4, [ %g3 + 4 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 2011abc: 80 a0 80 01 cmp %g2, %g1 2011ac0: 12 bf ff ef bne 2011a7c <_Heap_Get_information+0x3c> 2011ac4: 88 0b 7f fe and %o5, -2, %g4 2011ac8: c6 06 60 14 ld [ %i1 + 0x14 ], %g3 2011acc: 86 00 e0 08 add %g3, 8, %g3 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 2011ad0: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } 2011ad4: 81 c7 e0 08 ret 2011ad8: 81 e8 00 00 restore =============================================================================== 0201a990 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 201a990: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 201a994: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 201a998: 7f ff fb 05 call 20195ac <.urem> 201a99c: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 201a9a0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 201a9a4: 84 06 7f f8 add %i1, -8, %g2 201a9a8: 84 20 80 08 sub %g2, %o0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 201a9ac: 80 a0 80 01 cmp %g2, %g1 201a9b0: 0a 80 00 16 bcs 201aa08 <_Heap_Size_of_alloc_area+0x78> 201a9b4: 01 00 00 00 nop && (uintptr_t) block <= (uintptr_t) heap->last_block; 201a9b8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 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 201a9bc: 80 a0 80 03 cmp %g2, %g3 201a9c0: 18 80 00 12 bgu 201aa08 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201a9c4: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 201a9c8: c8 00 a0 04 ld [ %g2 + 4 ], %g4 201a9cc: 88 09 3f fe and %g4, -2, %g4 201a9d0: 84 00 80 04 add %g2, %g4, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 201a9d4: 80 a0 40 02 cmp %g1, %g2 201a9d8: 18 80 00 0c bgu 201aa08 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201a9dc: 80 a0 c0 02 cmp %g3, %g2 201a9e0: 0a 80 00 0a bcs 201aa08 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201a9e4: 01 00 00 00 nop } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 201a9e8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 201a9ec: 80 88 60 01 btst 1, %g1 201a9f0: 02 80 00 06 be 201aa08 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN 201a9f4: 84 20 80 19 sub %g2, %i1, %g2 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 201a9f8: 84 00 a0 04 add %g2, 4, %g2 201a9fc: c4 26 80 00 st %g2, [ %i2 ] return true; 201aa00: 81 c7 e0 08 ret 201aa04: 91 e8 20 01 restore %g0, 1, %o0 } 201aa08: 81 c7 e0 08 ret 201aa0c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200818c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 200818c: 9d e3 bf 88 save %sp, -120, %sp uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 2008190: 25 00 80 21 sethi %hi(0x2008400), %l2 2008194: 80 8e a0 ff btst 0xff, %i2 2008198: a4 14 a3 8c or %l2, 0x38c, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 200819c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 20081a0: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 20081a4: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 20081a8: 12 80 00 04 bne 20081b8 <_Heap_Walk+0x2c> 20081ac: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 20081b0: 25 00 80 20 sethi %hi(0x2008000), %l2 20081b4: a4 14 a1 84 or %l2, 0x184, %l2 ! 2008184 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 20081b8: 03 00 80 7d sethi %hi(0x201f400), %g1 20081bc: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 201f6e0 <_System_state_Current> 20081c0: 80 a0 60 03 cmp %g1, 3 20081c4: 22 80 00 04 be,a 20081d4 <_Heap_Walk+0x48> 20081c8: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 20081cc: 81 c7 e0 08 ret 20081d0: 91 e8 20 01 restore %g0, 1, %o0 Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 20081d4: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 20081d8: c4 06 20 08 ld [ %i0 + 8 ], %g2 20081dc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20081e0: 90 10 00 19 mov %i1, %o0 20081e4: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 20081e8: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 20081ec: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 20081f0: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 20081f4: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 20081f8: 92 10 20 00 clr %o1 20081fc: 15 00 80 71 sethi %hi(0x201c400), %o2 2008200: 96 10 00 15 mov %l5, %o3 2008204: 94 12 a2 40 or %o2, 0x240, %o2 2008208: 9f c4 80 00 call %l2 200820c: 98 10 00 13 mov %l3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2008210: 80 a5 60 00 cmp %l5, 0 2008214: 02 80 00 36 be 20082ec <_Heap_Walk+0x160> 2008218: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 200821c: 12 80 00 3c bne 200830c <_Heap_Walk+0x180> 2008220: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2008224: 7f ff e6 28 call 2001ac4 <.urem> 2008228: 92 10 00 15 mov %l5, %o1 200822c: 80 a2 20 00 cmp %o0, 0 2008230: 12 80 00 40 bne 2008330 <_Heap_Walk+0x1a4> 2008234: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 2008238: 7f ff e6 23 call 2001ac4 <.urem> 200823c: 92 10 00 15 mov %l5, %o1 2008240: 80 a2 20 00 cmp %o0, 0 2008244: 32 80 00 44 bne,a 2008354 <_Heap_Walk+0x1c8> 2008248: 90 10 00 19 mov %i1, %o0 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; 200824c: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2008250: ae 8d a0 01 andcc %l6, 1, %l7 2008254: 22 80 00 48 be,a 2008374 <_Heap_Walk+0x1e8> 2008258: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 200825c: d6 04 00 00 ld [ %l0 ], %o3 2008260: 80 a5 40 0b cmp %l5, %o3 2008264: 32 80 00 1a bne,a 20082cc <_Heap_Walk+0x140> 2008268: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 200826c: c2 05 20 04 ld [ %l4 + 4 ], %g1 2008270: 82 08 7f fe and %g1, -2, %g1 2008274: 82 05 00 01 add %l4, %g1, %g1 2008278: c2 00 60 04 ld [ %g1 + 4 ], %g1 200827c: 80 88 60 01 btst 1, %g1 2008280: 22 80 01 23 be,a 200870c <_Heap_Walk+0x580> 2008284: 90 10 00 19 mov %i1, %o0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008288: e2 06 20 08 ld [ %i0 + 8 ], %l1 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 ) { 200828c: 80 a6 00 11 cmp %i0, %l1 2008290: 02 80 00 6f be 200844c <_Heap_Walk+0x2c0> 2008294: f4 06 20 10 ld [ %i0 + 0x10 ], %i2 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; 2008298: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 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 200829c: 80 a7 00 11 cmp %i4, %l1 20082a0: 28 80 00 3c bleu,a 2008390 <_Heap_Walk+0x204> <== ALWAYS TAKEN 20082a4: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 20082a8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20082ac: 96 10 00 11 mov %l1, %o3 20082b0: 92 10 20 01 mov 1, %o1 20082b4: 15 00 80 71 sethi %hi(0x201c400), %o2 20082b8: b0 10 20 00 clr %i0 20082bc: 9f c4 80 00 call %l2 20082c0: 94 12 a3 e8 or %o2, 0x3e8, %o2 20082c4: 81 c7 e0 08 ret 20082c8: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 20082cc: 98 10 00 15 mov %l5, %o4 20082d0: 92 10 20 01 mov 1, %o1 20082d4: 15 00 80 71 sethi %hi(0x201c400), %o2 20082d8: b0 10 20 00 clr %i0 20082dc: 9f c4 80 00 call %l2 20082e0: 94 12 a3 a0 or %o2, 0x3a0, %o2 20082e4: 81 c7 e0 08 ret 20082e8: 81 e8 00 00 restore first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 20082ec: 90 10 00 19 mov %i1, %o0 20082f0: 92 10 20 01 mov 1, %o1 20082f4: 15 00 80 71 sethi %hi(0x201c400), %o2 20082f8: b0 10 20 00 clr %i0 20082fc: 9f c4 80 00 call %l2 2008300: 94 12 a2 d8 or %o2, 0x2d8, %o2 2008304: 81 c7 e0 08 ret 2008308: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 200830c: 90 10 00 19 mov %i1, %o0 2008310: 96 10 00 15 mov %l5, %o3 2008314: 92 10 20 01 mov 1, %o1 2008318: 15 00 80 71 sethi %hi(0x201c400), %o2 200831c: b0 10 20 00 clr %i0 2008320: 9f c4 80 00 call %l2 2008324: 94 12 a2 f0 or %o2, 0x2f0, %o2 2008328: 81 c7 e0 08 ret 200832c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 2008330: 90 10 00 19 mov %i1, %o0 2008334: 96 10 00 13 mov %l3, %o3 2008338: 92 10 20 01 mov 1, %o1 200833c: 15 00 80 71 sethi %hi(0x201c400), %o2 2008340: b0 10 20 00 clr %i0 2008344: 9f c4 80 00 call %l2 2008348: 94 12 a3 10 or %o2, 0x310, %o2 200834c: 81 c7 e0 08 ret 2008350: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2008354: 96 10 00 10 mov %l0, %o3 2008358: 92 10 20 01 mov 1, %o1 200835c: 15 00 80 71 sethi %hi(0x201c400), %o2 2008360: b0 10 20 00 clr %i0 2008364: 9f c4 80 00 call %l2 2008368: 94 12 a3 38 or %o2, 0x338, %o2 200836c: 81 c7 e0 08 ret 2008370: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 2008374: 92 10 20 01 mov 1, %o1 2008378: 15 00 80 71 sethi %hi(0x201c400), %o2 200837c: b0 10 20 00 clr %i0 2008380: 9f c4 80 00 call %l2 2008384: 94 12 a3 70 or %o2, 0x370, %o2 2008388: 81 c7 e0 08 ret 200838c: 81 e8 00 00 restore 2008390: 80 a6 c0 11 cmp %i3, %l1 2008394: 0a bf ff c6 bcs 20082ac <_Heap_Walk+0x120> <== NEVER TAKEN 2008398: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 200839c: 90 04 60 08 add %l1, 8, %o0 20083a0: 7f ff e5 c9 call 2001ac4 <.urem> 20083a4: 92 10 00 1a mov %i2, %o1 20083a8: 80 a2 20 00 cmp %o0, 0 20083ac: 12 80 00 df bne 2008728 <_Heap_Walk+0x59c> <== NEVER TAKEN 20083b0: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 20083b4: c2 04 60 04 ld [ %l1 + 4 ], %g1 20083b8: 82 08 7f fe and %g1, -2, %g1 20083bc: 82 04 40 01 add %l1, %g1, %g1 20083c0: c2 00 60 04 ld [ %g1 + 4 ], %g1 20083c4: 80 88 60 01 btst 1, %g1 20083c8: 12 80 00 ea bne 2008770 <_Heap_Walk+0x5e4> <== NEVER TAKEN 20083cc: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 20083d0: d8 04 60 0c ld [ %l1 + 0xc ], %o4 20083d4: 80 a6 00 0c cmp %i0, %o4 20083d8: 02 80 00 19 be 200843c <_Heap_Walk+0x2b0> <== ALWAYS TAKEN 20083dc: ba 10 00 11 mov %l1, %i5 20083e0: 30 80 00 dc b,a 2008750 <_Heap_Walk+0x5c4> <== NOT EXECUTED 20083e4: 0a bf ff b2 bcs 20082ac <_Heap_Walk+0x120> 20083e8: 90 10 00 19 mov %i1, %o0 20083ec: 80 a6 c0 11 cmp %i3, %l1 20083f0: 0a bf ff b0 bcs 20082b0 <_Heap_Walk+0x124> <== NEVER TAKEN 20083f4: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 20083f8: 90 04 60 08 add %l1, 8, %o0 20083fc: 7f ff e5 b2 call 2001ac4 <.urem> 2008400: 92 10 00 1a mov %i2, %o1 2008404: 80 a2 20 00 cmp %o0, 0 2008408: 32 80 00 c8 bne,a 2008728 <_Heap_Walk+0x59c> 200840c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2008410: c2 04 60 04 ld [ %l1 + 4 ], %g1 2008414: 82 08 7f fe and %g1, -2, %g1 2008418: 82 00 40 11 add %g1, %l1, %g1 200841c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008420: 80 88 60 01 btst 1, %g1 2008424: 32 80 00 d2 bne,a 200876c <_Heap_Walk+0x5e0> 2008428: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 200842c: d8 04 60 0c ld [ %l1 + 0xc ], %o4 2008430: 80 a3 00 1d cmp %o4, %i5 2008434: 12 80 00 c5 bne 2008748 <_Heap_Walk+0x5bc> 2008438: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 200843c: e2 04 60 08 ld [ %l1 + 8 ], %l1 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 ) { 2008440: 80 a6 00 11 cmp %i0, %l1 2008444: 12 bf ff e8 bne 20083e4 <_Heap_Walk+0x258> 2008448: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 200844c: 80 a5 00 10 cmp %l4, %l0 2008450: 02 bf ff 5f be 20081cc <_Heap_Walk+0x40> <== NEVER TAKEN 2008454: 37 00 80 72 sethi %hi(0x201c800), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008458: 35 00 80 72 sethi %hi(0x201c800), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 200845c: 39 00 80 72 sethi %hi(0x201c800), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008460: ba 10 00 15 mov %l5, %i5 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)( 2008464: b6 16 e0 90 or %i3, 0x90, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008468: b4 16 a0 a8 or %i2, 0xa8, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 200846c: b8 17 21 a8 or %i4, 0x1a8, %i4 2008470: aa 10 00 14 mov %l4, %l5 - 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; 2008474: ac 0d bf fe and %l6, -2, %l6 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 2008478: 80 a5 e0 00 cmp %l7, 0 200847c: 02 80 00 16 be 20084d4 <_Heap_Walk+0x348> 2008480: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 2008484: 90 10 00 19 mov %i1, %o0 2008488: 92 10 20 00 clr %o1 200848c: 94 10 00 1b mov %i3, %o2 2008490: 96 10 00 10 mov %l0, %o3 2008494: 9f c4 80 00 call %l2 2008498: 98 10 00 16 mov %l6, %o4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 200849c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 20084a0: 80 a0 40 11 cmp %g1, %l1 20084a4: 28 80 00 18 bleu,a 2008504 <_Heap_Walk+0x378> <== ALWAYS TAKEN 20084a8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 20084ac: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20084b0: 96 10 00 10 mov %l0, %o3 20084b4: 98 10 00 11 mov %l1, %o4 20084b8: 92 10 20 01 mov 1, %o1 20084bc: 15 00 80 72 sethi %hi(0x201c800), %o2 20084c0: b0 10 20 00 clr %i0 20084c4: 9f c4 80 00 call %l2 20084c8: 94 12 a0 d0 or %o2, 0xd0, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 20084cc: 81 c7 e0 08 ret 20084d0: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20084d4: da 04 00 00 ld [ %l0 ], %o5 20084d8: 90 10 00 19 mov %i1, %o0 20084dc: 92 10 20 00 clr %o1 20084e0: 94 10 00 1a mov %i2, %o2 20084e4: 96 10 00 10 mov %l0, %o3 20084e8: 9f c4 80 00 call %l2 20084ec: 98 10 00 16 mov %l6, %o4 20084f0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 20084f4: 80 a0 40 11 cmp %g1, %l1 20084f8: 18 bf ff ee bgu 20084b0 <_Heap_Walk+0x324> <== NEVER TAKEN 20084fc: 90 10 00 19 mov %i1, %o0 2008500: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2008504: 80 a0 40 11 cmp %g1, %l1 2008508: 0a bf ff ea bcs 20084b0 <_Heap_Walk+0x324> 200850c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 2008510: 90 10 00 16 mov %l6, %o0 2008514: 7f ff e5 6c call 2001ac4 <.urem> 2008518: 92 10 00 1d mov %i5, %o1 200851c: 80 a2 20 00 cmp %o0, 0 2008520: 12 80 00 5d bne 2008694 <_Heap_Walk+0x508> 2008524: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 2008528: 18 80 00 65 bgu 20086bc <_Heap_Walk+0x530> 200852c: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 2008530: 3a 80 00 6e bcc,a 20086e8 <_Heap_Walk+0x55c> 2008534: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2008538: c2 04 60 04 ld [ %l1 + 4 ], %g1 200853c: 80 88 60 01 btst 1, %g1 2008540: 12 80 00 40 bne 2008640 <_Heap_Walk+0x4b4> 2008544: 80 a5 40 11 cmp %l5, %l1 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; 2008548: e8 04 20 04 ld [ %l0 + 4 ], %l4 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)( 200854c: d8 04 20 0c ld [ %l0 + 0xc ], %o4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008550: c2 06 20 08 ld [ %i0 + 8 ], %g1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 2008554: ac 0d 3f fe and %l4, -2, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008558: 1b 00 80 72 sethi %hi(0x201c800), %o5 200855c: 80 a0 40 0c cmp %g1, %o4 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 2008560: c6 06 20 0c ld [ %i0 + 0xc ], %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2008564: ae 04 00 16 add %l0, %l6, %l7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2008568: 02 80 00 07 be 2008584 <_Heap_Walk+0x3f8> 200856c: 9a 13 61 98 or %o5, 0x198, %o5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 2008570: 1b 00 80 72 sethi %hi(0x201c800), %o5 2008574: 80 a3 00 18 cmp %o4, %i0 2008578: 02 80 00 03 be 2008584 <_Heap_Walk+0x3f8> 200857c: 9a 13 61 b0 or %o5, 0x1b0, %o5 2008580: 9a 10 00 1c mov %i4, %o5 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 2008584: c2 04 20 08 ld [ %l0 + 8 ], %g1 2008588: 05 00 80 72 sethi %hi(0x201c800), %g2 200858c: 80 a0 c0 01 cmp %g3, %g1 2008590: 02 80 00 07 be 20085ac <_Heap_Walk+0x420> 2008594: 84 10 a1 c0 or %g2, 0x1c0, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2008598: 05 00 80 72 sethi %hi(0x201c800), %g2 200859c: 80 a0 40 18 cmp %g1, %i0 20085a0: 02 80 00 03 be 20085ac <_Heap_Walk+0x420> 20085a4: 84 10 a1 d0 or %g2, 0x1d0, %g2 20085a8: 84 10 00 1c mov %i4, %g2 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)( 20085ac: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20085b0: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 20085b4: 90 10 00 19 mov %i1, %o0 20085b8: 92 10 20 00 clr %o1 20085bc: 15 00 80 72 sethi %hi(0x201c800), %o2 20085c0: 96 10 00 10 mov %l0, %o3 20085c4: 9f c4 80 00 call %l2 20085c8: 94 12 a1 e0 or %o2, 0x1e0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 20085cc: da 05 c0 00 ld [ %l7 ], %o5 20085d0: 80 a5 80 0d cmp %l6, %o5 20085d4: 02 80 00 0c be 2008604 <_Heap_Walk+0x478> 20085d8: 90 10 00 19 mov %i1, %o0 (*printer)( 20085dc: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 20085e0: 96 10 00 10 mov %l0, %o3 20085e4: 98 10 00 16 mov %l6, %o4 20085e8: 92 10 20 01 mov 1, %o1 20085ec: 15 00 80 72 sethi %hi(0x201c800), %o2 20085f0: b0 10 20 00 clr %i0 20085f4: 9f c4 80 00 call %l2 20085f8: 94 12 a2 10 or %o2, 0x210, %o2 20085fc: 81 c7 e0 08 ret 2008600: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 2008604: 80 8d 20 01 btst 1, %l4 2008608: 02 80 00 1c be 2008678 <_Heap_Walk+0x4ec> 200860c: 96 10 00 10 mov %l0, %o3 2008610: c2 06 20 08 ld [ %i0 + 8 ], %g1 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 2008614: 80 a0 40 18 cmp %g1, %i0 2008618: 12 80 00 07 bne 2008634 <_Heap_Walk+0x4a8> <== ALWAYS TAKEN 200861c: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008620: 10 80 00 0f b 200865c <_Heap_Walk+0x4d0> <== NOT EXECUTED 2008624: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED ) { 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 ) { 2008628: 80 a0 40 18 cmp %g1, %i0 200862c: 02 80 00 0a be 2008654 <_Heap_Walk+0x4c8> 2008630: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 2008634: 32 bf ff fd bne,a 2008628 <_Heap_Walk+0x49c> 2008638: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 200863c: 80 a5 40 11 cmp %l5, %l1 2008640: 02 bf fe e3 be 20081cc <_Heap_Walk+0x40> 2008644: a0 10 00 11 mov %l1, %l0 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 ) { 2008648: ec 04 60 04 ld [ %l1 + 4 ], %l6 200864c: 10 bf ff 8a b 2008474 <_Heap_Walk+0x2e8> 2008650: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008654: 90 10 00 19 mov %i1, %o0 2008658: 96 10 00 10 mov %l0, %o3 200865c: 92 10 20 01 mov 1, %o1 2008660: 15 00 80 72 sethi %hi(0x201c800), %o2 2008664: b0 10 20 00 clr %i0 2008668: 9f c4 80 00 call %l2 200866c: 94 12 a2 80 or %o2, 0x280, %o2 2008670: 81 c7 e0 08 ret 2008674: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 2008678: 92 10 20 01 mov 1, %o1 200867c: 15 00 80 72 sethi %hi(0x201c800), %o2 2008680: b0 10 20 00 clr %i0 2008684: 9f c4 80 00 call %l2 2008688: 94 12 a2 50 or %o2, 0x250, %o2 200868c: 81 c7 e0 08 ret 2008690: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 2008694: 90 10 00 19 mov %i1, %o0 2008698: 96 10 00 10 mov %l0, %o3 200869c: 98 10 00 16 mov %l6, %o4 20086a0: 92 10 20 01 mov 1, %o1 20086a4: 15 00 80 72 sethi %hi(0x201c800), %o2 20086a8: b0 10 20 00 clr %i0 20086ac: 9f c4 80 00 call %l2 20086b0: 94 12 a1 00 or %o2, 0x100, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 20086b4: 81 c7 e0 08 ret 20086b8: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 20086bc: 90 10 00 19 mov %i1, %o0 20086c0: 96 10 00 10 mov %l0, %o3 20086c4: 98 10 00 16 mov %l6, %o4 20086c8: 9a 10 00 13 mov %l3, %o5 20086cc: 92 10 20 01 mov 1, %o1 20086d0: 15 00 80 72 sethi %hi(0x201c800), %o2 20086d4: b0 10 20 00 clr %i0 20086d8: 9f c4 80 00 call %l2 20086dc: 94 12 a1 30 or %o2, 0x130, %o2 block, block_size, min_block_size ); return false; 20086e0: 81 c7 e0 08 ret 20086e4: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 20086e8: 96 10 00 10 mov %l0, %o3 20086ec: 98 10 00 11 mov %l1, %o4 20086f0: 92 10 20 01 mov 1, %o1 20086f4: 15 00 80 72 sethi %hi(0x201c800), %o2 20086f8: b0 10 20 00 clr %i0 20086fc: 9f c4 80 00 call %l2 2008700: 94 12 a1 60 or %o2, 0x160, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 2008704: 81 c7 e0 08 ret 2008708: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 200870c: 92 10 20 01 mov 1, %o1 2008710: 15 00 80 71 sethi %hi(0x201c400), %o2 2008714: b0 10 20 00 clr %i0 2008718: 9f c4 80 00 call %l2 200871c: 94 12 a3 d0 or %o2, 0x3d0, %o2 2008720: 81 c7 e0 08 ret 2008724: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2008728: 96 10 00 11 mov %l1, %o3 200872c: 92 10 20 01 mov 1, %o1 2008730: 15 00 80 72 sethi %hi(0x201c800), %o2 2008734: b0 10 20 00 clr %i0 2008738: 9f c4 80 00 call %l2 200873c: 94 12 a0 08 or %o2, 8, %o2 2008740: 81 c7 e0 08 ret 2008744: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 2008748: 90 10 00 19 mov %i1, %o0 200874c: 96 10 00 11 mov %l1, %o3 2008750: 92 10 20 01 mov 1, %o1 2008754: 15 00 80 72 sethi %hi(0x201c800), %o2 2008758: b0 10 20 00 clr %i0 200875c: 9f c4 80 00 call %l2 2008760: 94 12 a0 58 or %o2, 0x58, %o2 2008764: 81 c7 e0 08 ret 2008768: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 200876c: 96 10 00 11 mov %l1, %o3 2008770: 92 10 20 01 mov 1, %o1 2008774: 15 00 80 72 sethi %hi(0x201c800), %o2 2008778: b0 10 20 00 clr %i0 200877c: 9f c4 80 00 call %l2 2008780: 94 12 a0 38 or %o2, 0x38, %o2 2008784: 81 c7 e0 08 ret 2008788: 81 e8 00 00 restore =============================================================================== 020066e4 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 20066e4: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 20066e8: 23 00 80 75 sethi %hi(0x201d400), %l1 20066ec: c2 04 62 b8 ld [ %l1 + 0x2b8 ], %g1 ! 201d6b8 <_IO_Number_of_drivers> 20066f0: 80 a0 60 00 cmp %g1, 0 20066f4: 02 80 00 0c be 2006724 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 20066f8: a2 14 62 b8 or %l1, 0x2b8, %l1 20066fc: a0 10 20 00 clr %l0 (void) rtems_io_initialize( major, 0, NULL ); 2006700: 90 10 00 10 mov %l0, %o0 2006704: 92 10 20 00 clr %o1 2006708: 40 00 18 7e call 200c900 200670c: 94 10 20 00 clr %o2 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2006710: c2 04 40 00 ld [ %l1 ], %g1 2006714: a0 04 20 01 inc %l0 2006718: 80 a0 40 10 cmp %g1, %l0 200671c: 18 bf ff fa bgu 2006704 <_IO_Initialize_all_drivers+0x20> 2006720: 90 10 00 10 mov %l0, %o0 2006724: 81 c7 e0 08 ret 2006728: 81 e8 00 00 restore =============================================================================== 0200672c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 200672c: 9d e3 bf a0 save %sp, -96, %sp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 2006730: 03 00 80 70 sethi %hi(0x201c000), %g1 2006734: 82 10 62 28 or %g1, 0x228, %g1 ! 201c228 drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; 2006738: e6 00 60 2c ld [ %g1 + 0x2c ], %l3 rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; 200673c: e2 00 60 30 ld [ %g1 + 0x30 ], %l1 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 2006740: 80 a4 40 13 cmp %l1, %l3 2006744: 0a 80 00 08 bcs 2006764 <_IO_Manager_initialization+0x38> 2006748: e0 00 60 34 ld [ %g1 + 0x34 ], %l0 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 200674c: 03 00 80 75 sethi %hi(0x201d400), %g1 2006750: e0 20 62 bc st %l0, [ %g1 + 0x2bc ] ! 201d6bc <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 2006754: 03 00 80 75 sethi %hi(0x201d400), %g1 2006758: e2 20 62 b8 st %l1, [ %g1 + 0x2b8 ] ! 201d6b8 <_IO_Number_of_drivers> return; 200675c: 81 c7 e0 08 ret 2006760: 81 e8 00 00 restore * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) 2006764: 83 2c e0 03 sll %l3, 3, %g1 2006768: a5 2c e0 05 sll %l3, 5, %l2 200676c: a4 24 80 01 sub %l2, %g1, %l2 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 2006770: 40 00 0c 8b call 200999c <_Workspace_Allocate_or_fatal_error> 2006774: 90 10 00 12 mov %l2, %o0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2006778: 03 00 80 75 sethi %hi(0x201d400), %g1 memset( 200677c: 94 10 00 12 mov %l2, %o2 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 2006780: e6 20 62 b8 st %l3, [ %g1 + 0x2b8 ] /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 2006784: 25 00 80 75 sethi %hi(0x201d400), %l2 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 2006788: 92 10 20 00 clr %o1 200678c: 40 00 28 23 call 2010818 2006790: d0 24 a2 bc st %o0, [ %l2 + 0x2bc ] _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2006794: 80 a4 60 00 cmp %l1, 0 2006798: 02 bf ff f1 be 200675c <_IO_Manager_initialization+0x30> <== NEVER TAKEN 200679c: da 04 a2 bc ld [ %l2 + 0x2bc ], %o5 20067a0: 82 10 20 00 clr %g1 20067a4: 88 10 20 00 clr %g4 _IO_Driver_address_table[index] = driver_table[index]; 20067a8: c4 04 00 01 ld [ %l0 + %g1 ], %g2 20067ac: 86 04 00 01 add %l0, %g1, %g3 20067b0: c4 23 40 01 st %g2, [ %o5 + %g1 ] 20067b4: d8 00 e0 04 ld [ %g3 + 4 ], %o4 20067b8: 84 03 40 01 add %o5, %g1, %g2 20067bc: d8 20 a0 04 st %o4, [ %g2 + 4 ] 20067c0: d8 00 e0 08 ld [ %g3 + 8 ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20067c4: 88 01 20 01 inc %g4 _IO_Driver_address_table[index] = driver_table[index]; 20067c8: d8 20 a0 08 st %o4, [ %g2 + 8 ] 20067cc: d8 00 e0 0c ld [ %g3 + 0xc ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20067d0: 82 00 60 18 add %g1, 0x18, %g1 _IO_Driver_address_table[index] = driver_table[index]; 20067d4: d8 20 a0 0c st %o4, [ %g2 + 0xc ] 20067d8: d8 00 e0 10 ld [ %g3 + 0x10 ], %o4 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20067dc: 80 a4 40 04 cmp %l1, %g4 _IO_Driver_address_table[index] = driver_table[index]; 20067e0: d8 20 a0 10 st %o4, [ %g2 + 0x10 ] 20067e4: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20067e8: 18 bf ff f0 bgu 20067a8 <_IO_Manager_initialization+0x7c> 20067ec: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 20067f0: 81 c7 e0 08 ret 20067f4: 81 e8 00 00 restore =============================================================================== 02007414 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2007414: 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 ) 2007418: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 200741c: a0 10 00 18 mov %i0, %l0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 2007420: 80 a0 60 00 cmp %g1, 0 2007424: 02 80 00 19 be 2007488 <_Objects_Allocate+0x74> <== NEVER TAKEN 2007428: b0 10 20 00 clr %i0 /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 200742c: a2 04 20 20 add %l0, 0x20, %l1 2007430: 40 00 15 55 call 200c984 <_Chain_Get> 2007434: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2007438: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 200743c: 80 a0 60 00 cmp %g1, 0 2007440: 02 80 00 12 be 2007488 <_Objects_Allocate+0x74> 2007444: 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 ) { 2007448: 80 a2 20 00 cmp %o0, 0 200744c: 02 80 00 11 be 2007490 <_Objects_Allocate+0x7c> 2007450: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2007454: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 2007458: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 200745c: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1 2007460: 40 00 47 a7 call 20192fc <.udiv> 2007464: 90 22 00 01 sub %o0, %g1, %o0 2007468: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 200746c: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2007470: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2007474: c4 00 40 08 ld [ %g1 + %o0 ], %g2 information->inactive--; 2007478: 86 00 ff ff add %g3, -1, %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 200747c: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2007480: c6 34 20 2c sth %g3, [ %l0 + 0x2c ] block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2007484: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; } } return the_object; } 2007488: 81 c7 e0 08 ret 200748c: 81 e8 00 00 restore * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 2007490: 40 00 00 11 call 20074d4 <_Objects_Extend_information> 2007494: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2007498: 40 00 15 3b call 200c984 <_Chain_Get> 200749c: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 20074a0: b0 92 20 00 orcc %o0, 0, %i0 20074a4: 32 bf ff ed bne,a 2007458 <_Objects_Allocate+0x44> 20074a8: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 information->inactive--; } } return the_object; } 20074ac: 81 c7 e0 08 ret 20074b0: 81 e8 00 00 restore =============================================================================== 020074d4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 20074d4: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 20074d8: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 20074dc: 80 a5 20 00 cmp %l4, 0 20074e0: 02 80 00 ab be 200778c <_Objects_Extend_information+0x2b8> 20074e4: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 20074e8: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 20074ec: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 20074f0: ab 2d 60 10 sll %l5, 0x10, %l5 20074f4: 92 10 00 12 mov %l2, %o1 20074f8: 40 00 47 81 call 20192fc <.udiv> 20074fc: 91 35 60 10 srl %l5, 0x10, %o0 2007500: 91 2a 20 10 sll %o0, 0x10, %o0 2007504: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 2007508: 80 a7 20 00 cmp %i4, 0 200750c: 02 80 00 a7 be 20077a8 <_Objects_Extend_information+0x2d4><== NEVER TAKEN 2007510: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 2007514: c2 05 00 00 ld [ %l4 ], %g1 2007518: 80 a0 60 00 cmp %g1, 0 200751c: 02 80 00 a4 be 20077ac <_Objects_Extend_information+0x2d8><== NEVER TAKEN 2007520: a2 10 00 13 mov %l3, %l1 2007524: 10 80 00 06 b 200753c <_Objects_Extend_information+0x68> 2007528: a0 10 20 00 clr %l0 200752c: c2 05 00 01 ld [ %l4 + %g1 ], %g1 2007530: 80 a0 60 00 cmp %g1, 0 2007534: 22 80 00 08 be,a 2007554 <_Objects_Extend_information+0x80> 2007538: ab 35 60 10 srl %l5, 0x10, %l5 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 200753c: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 2007540: a2 04 40 12 add %l1, %l2, %l1 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2007544: 80 a7 00 10 cmp %i4, %l0 2007548: 18 bf ff f9 bgu 200752c <_Objects_Extend_information+0x58> 200754c: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2007550: ab 35 60 10 srl %l5, 0x10, %l5 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 2007554: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2007558: aa 05 40 08 add %l5, %o0, %l5 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 200755c: 82 10 63 ff or %g1, 0x3ff, %g1 2007560: 80 a5 40 01 cmp %l5, %g1 2007564: 18 80 00 96 bgu 20077bc <_Objects_Extend_information+0x2e8><== NEVER TAKEN 2007568: 01 00 00 00 nop /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 200756c: 40 00 47 2a call 2019214 <.umul> 2007570: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2007574: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2007578: 80 a0 60 00 cmp %g1, 0 200757c: 12 80 00 6d bne 2007730 <_Objects_Extend_information+0x25c> 2007580: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 2007584: 40 00 09 06 call 200999c <_Workspace_Allocate_or_fatal_error> 2007588: 01 00 00 00 nop 200758c: a4 10 00 08 mov %o0, %l2 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2007590: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007594: 80 a4 40 01 cmp %l1, %g1 2007598: 2a 80 00 43 bcs,a 20076a4 <_Objects_Extend_information+0x1d0> 200759c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 20075a0: a8 07 20 01 add %i4, 1, %l4 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 20075a4: 91 2d 20 01 sll %l4, 1, %o0 20075a8: 90 02 00 14 add %o0, %l4, %o0 20075ac: 90 05 40 08 add %l5, %o0, %o0 20075b0: 90 02 00 13 add %o0, %l3, %o0 20075b4: 40 00 09 09 call 20099d8 <_Workspace_Allocate> 20075b8: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 20075bc: ac 92 20 00 orcc %o0, 0, %l6 20075c0: 02 80 00 7d be 20077b4 <_Objects_Extend_information+0x2e0> 20075c4: a9 2d 20 02 sll %l4, 2, %l4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 20075c8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20075cc: 80 a4 c0 01 cmp %l3, %g1 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 20075d0: ae 05 80 14 add %l6, %l4, %l7 20075d4: 0a 80 00 5e bcs 200774c <_Objects_Extend_information+0x278> 20075d8: a8 05 c0 14 add %l7, %l4, %l4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 20075dc: 80 a4 e0 00 cmp %l3, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 20075e0: 82 10 20 00 clr %g1 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 20075e4: 02 80 00 08 be 2007604 <_Objects_Extend_information+0x130><== NEVER TAKEN 20075e8: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 20075ec: 85 28 60 02 sll %g1, 2, %g2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 20075f0: 82 00 60 01 inc %g1 20075f4: 80 a4 c0 01 cmp %l3, %g1 20075f8: 18 bf ff fd bgu 20075ec <_Objects_Extend_information+0x118><== NEVER TAKEN 20075fc: c0 20 80 14 clr [ %g2 + %l4 ] 2007600: bb 2f 20 02 sll %i4, 2, %i5 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2007604: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 2007608: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 200760c: 86 04 40 03 add %l1, %g3, %g3 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2007610: 80 a4 40 03 cmp %l1, %g3 2007614: 1a 80 00 0a bcc 200763c <_Objects_Extend_information+0x168><== NEVER TAKEN 2007618: c0 25 80 1d clr [ %l6 + %i5 ] 200761c: 85 2c 60 02 sll %l1, 2, %g2 2007620: 82 10 00 11 mov %l1, %g1 2007624: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 2007628: c0 20 80 00 clr [ %g2 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 200762c: 82 00 60 01 inc %g1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2007630: 80 a0 40 03 cmp %g1, %g3 2007634: 0a bf ff fd bcs 2007628 <_Objects_Extend_information+0x154> 2007638: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 200763c: 7f ff eb 1c call 20022ac 2007640: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2007644: c6 06 00 00 ld [ %i0 ], %g3 2007648: c4 16 20 04 lduh [ %i0 + 4 ], %g2 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 200764c: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2007650: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 2007654: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 2007658: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 200765c: 87 28 e0 18 sll %g3, 0x18, %g3 2007660: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2007664: ec 26 20 34 st %l6, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2007668: ab 2d 60 10 sll %l5, 0x10, %l5 200766c: 03 00 00 40 sethi %hi(0x10000), %g1 2007670: ab 35 60 10 srl %l5, 0x10, %l5 2007674: 82 10 c0 01 or %g3, %g1, %g1 2007678: 82 10 40 02 or %g1, %g2, %g1 200767c: 82 10 40 15 or %g1, %l5, %g1 2007680: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2007684: 7f ff eb 0e call 20022bc 2007688: 01 00 00 00 nop if ( old_tables ) 200768c: 80 a4 e0 00 cmp %l3, 0 2007690: 22 80 00 05 be,a 20076a4 <_Objects_Extend_information+0x1d0> 2007694: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 2007698: 40 00 08 d9 call 20099fc <_Workspace_Free> 200769c: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 20076a0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 20076a4: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 20076a8: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 20076ac: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 20076b0: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20076b4: a6 06 20 20 add %i0, 0x20, %l3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 20076b8: e4 20 40 10 st %l2, [ %g1 + %l0 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 20076bc: 29 00 00 40 sethi %hi(0x10000), %l4 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 20076c0: a4 07 bf f4 add %fp, -12, %l2 20076c4: 40 00 14 c3 call 200c9d0 <_Chain_Initialize> 20076c8: 90 10 00 12 mov %l2, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 20076cc: 30 80 00 0c b,a 20076fc <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 20076d0: c4 16 20 04 lduh [ %i0 + 4 ], %g2 20076d4: 83 28 60 18 sll %g1, 0x18, %g1 20076d8: 85 28 a0 1b sll %g2, 0x1b, %g2 20076dc: 82 10 40 14 or %g1, %l4, %g1 20076e0: 82 10 40 02 or %g1, %g2, %g1 20076e4: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20076e8: 92 10 00 08 mov %o0, %o1 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 20076ec: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 20076f0: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20076f4: 7f ff fc e2 call 2006a7c <_Chain_Append> 20076f8: 90 10 00 13 mov %l3, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 20076fc: 40 00 14 a2 call 200c984 <_Chain_Get> 2007700: 90 10 00 12 mov %l2, %o0 2007704: 80 a2 20 00 cmp %o0, 0 2007708: 32 bf ff f2 bne,a 20076d0 <_Objects_Extend_information+0x1fc> 200770c: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 2007710: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2007714: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 2007718: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 200771c: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2007720: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 2007724: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2007728: 81 c7 e0 08 ret 200772c: 81 e8 00 00 restore * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 2007730: 40 00 08 aa call 20099d8 <_Workspace_Allocate> 2007734: 01 00 00 00 nop if ( !new_object_block ) 2007738: a4 92 20 00 orcc %o0, 0, %l2 200773c: 32 bf ff 96 bne,a 2007594 <_Objects_Extend_information+0xc0> 2007740: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007744: 81 c7 e0 08 ret 2007748: 81 e8 00 00 restore /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 200774c: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 2007750: bb 2f 20 02 sll %i4, 2, %i5 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2007754: 40 00 23 f2 call 201071c 2007758: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 200775c: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2007760: 94 10 00 1d mov %i5, %o2 2007764: 40 00 23 ee call 201071c 2007768: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 200776c: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 2007770: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2007774: 94 04 c0 0a add %l3, %o2, %o2 2007778: 90 10 00 14 mov %l4, %o0 200777c: 40 00 23 e8 call 201071c 2007780: 95 2a a0 02 sll %o2, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2007784: 10 bf ff a1 b 2007608 <_Objects_Extend_information+0x134> 2007788: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 200778c: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2007790: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 2007794: ab 2d 60 10 sll %l5, 0x10, %l5 2007798: a2 10 00 13 mov %l3, %l1 200779c: a0 10 20 00 clr %l0 20077a0: 10 bf ff 6c b 2007550 <_Objects_Extend_information+0x7c> 20077a4: b8 10 20 00 clr %i4 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 20077a8: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 20077ac: 10 bf ff 69 b 2007550 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 20077b0: a0 10 20 00 clr %l0 <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 20077b4: 40 00 08 92 call 20099fc <_Workspace_Free> 20077b8: 90 10 00 12 mov %l2, %o0 return; 20077bc: 81 c7 e0 08 ret 20077c0: 81 e8 00 00 restore =============================================================================== 02007870 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 2007870: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2007874: 80 a6 60 00 cmp %i1, 0 2007878: 12 80 00 04 bne 2007888 <_Objects_Get_information+0x18> 200787c: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 2007880: 81 c7 e0 08 ret 2007884: 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 ); 2007888: 40 00 15 ed call 200d03c <_Objects_API_maximum_class> 200788c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2007890: 80 a2 20 00 cmp %o0, 0 2007894: 22 80 00 15 be,a 20078e8 <_Objects_Get_information+0x78> 2007898: b0 10 20 00 clr %i0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 200789c: 80 a6 40 08 cmp %i1, %o0 20078a0: 38 80 00 12 bgu,a 20078e8 <_Objects_Get_information+0x78> 20078a4: b0 10 20 00 clr %i0 return NULL; if ( !_Objects_Information_table[ the_api ] ) 20078a8: b1 2e 20 02 sll %i0, 2, %i0 20078ac: 03 00 80 73 sethi %hi(0x201cc00), %g1 20078b0: 82 10 60 a0 or %g1, 0xa0, %g1 ! 201cca0 <_Objects_Information_table> 20078b4: c2 00 40 18 ld [ %g1 + %i0 ], %g1 20078b8: 80 a0 60 00 cmp %g1, 0 20078bc: 02 80 00 0b be 20078e8 <_Objects_Get_information+0x78> <== NEVER TAKEN 20078c0: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20078c4: b3 2e 60 02 sll %i1, 2, %i1 20078c8: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 20078cc: 80 a6 20 00 cmp %i0, 0 20078d0: 02 80 00 06 be 20078e8 <_Objects_Get_information+0x78> <== NEVER TAKEN 20078d4: 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 ) 20078d8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20078dc: 80 a0 60 00 cmp %g1, 0 20078e0: 22 80 00 02 be,a 20078e8 <_Objects_Get_information+0x78> 20078e4: b0 10 20 00 clr %i0 return NULL; #endif return info; } 20078e8: 81 c7 e0 08 ret 20078ec: 81 e8 00 00 restore =============================================================================== 02009658 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 2009658: 9d e3 bf 90 save %sp, -112, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 200965c: 80 a6 60 00 cmp %i1, 0 2009660: 12 80 00 05 bne 2009674 <_Objects_Get_name_as_string+0x1c> 2009664: 80 a6 a0 00 cmp %i2, 0 } } *d = '\0'; _Thread_Enable_dispatch(); return name; 2009668: b4 10 20 00 clr %i2 } return NULL; /* unreachable path */ } 200966c: 81 c7 e0 08 ret 2009670: 91 e8 00 1a restore %g0, %i2, %o0 Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 2009674: 02 bf ff fe be 200966c <_Objects_Get_name_as_string+0x14> 2009678: 80 a6 20 00 cmp %i0, 0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 200967c: 12 80 00 04 bne 200968c <_Objects_Get_name_as_string+0x34> 2009680: 03 00 80 ac sethi %hi(0x202b000), %g1 2009684: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 ! 202b390 <_Thread_Executing> 2009688: f0 00 60 08 ld [ %g1 + 8 ], %i0 information = _Objects_Get_information_id( tmpId ); 200968c: 7f ff ff af call 2009548 <_Objects_Get_information_id> 2009690: 90 10 00 18 mov %i0, %o0 if ( !information ) 2009694: a0 92 20 00 orcc %o0, 0, %l0 2009698: 22 bf ff f5 be,a 200966c <_Objects_Get_name_as_string+0x14> 200969c: b4 10 20 00 clr %i2 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 20096a0: 92 10 00 18 mov %i0, %o1 20096a4: 40 00 00 37 call 2009780 <_Objects_Get> 20096a8: 94 07 bf fc add %fp, -4, %o2 switch ( location ) { 20096ac: c2 07 bf fc ld [ %fp + -4 ], %g1 20096b0: 80 a0 60 00 cmp %g1, 0 20096b4: 32 bf ff ee bne,a 200966c <_Objects_Get_name_as_string+0x14> 20096b8: b4 10 20 00 clr %i2 return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 20096bc: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1 20096c0: 80 a0 60 00 cmp %g1, 0 20096c4: 22 80 00 25 be,a 2009758 <_Objects_Get_name_as_string+0x100> 20096c8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name.name_p; 20096cc: c8 02 20 0c ld [ %o0 + 0xc ], %g4 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 20096d0: 80 a1 20 00 cmp %g4, 0 20096d4: 02 80 00 1e be 200974c <_Objects_Get_name_as_string+0xf4> 20096d8: 86 10 00 1a mov %i2, %g3 for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 20096dc: b2 86 7f ff addcc %i1, -1, %i1 20096e0: 02 80 00 1b be 200974c <_Objects_Get_name_as_string+0xf4> <== NEVER TAKEN 20096e4: 86 10 00 1a mov %i2, %g3 20096e8: c2 49 00 00 ldsb [ %g4 ], %g1 20096ec: 80 a0 60 00 cmp %g1, 0 20096f0: 02 80 00 17 be 200974c <_Objects_Get_name_as_string+0xf4> 20096f4: c4 09 00 00 ldub [ %g4 ], %g2 20096f8: 17 00 80 8a sethi %hi(0x2022800), %o3 20096fc: 86 10 00 1a mov %i2, %g3 2009700: 96 12 e3 b8 or %o3, 0x3b8, %o3 2009704: 10 80 00 06 b 200971c <_Objects_Get_name_as_string+0xc4> 2009708: 82 10 20 00 clr %g1 200970c: da 49 00 01 ldsb [ %g4 + %g1 ], %o5 2009710: 80 a3 60 00 cmp %o5, 0 2009714: 02 80 00 0e be 200974c <_Objects_Get_name_as_string+0xf4> 2009718: c4 09 00 01 ldub [ %g4 + %g1 ], %g2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 200971c: d8 02 c0 00 ld [ %o3 ], %o4 2009720: 9a 08 a0 ff and %g2, 0xff, %o5 2009724: 9a 03 00 0d add %o4, %o5, %o5 2009728: da 4b 60 01 ldsb [ %o5 + 1 ], %o5 200972c: 80 8b 60 97 btst 0x97, %o5 2009730: 12 80 00 03 bne 200973c <_Objects_Get_name_as_string+0xe4> 2009734: 82 00 60 01 inc %g1 2009738: 84 10 20 2a mov 0x2a, %g2 200973c: c4 28 c0 00 stb %g2, [ %g3 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2009740: 80 a0 40 19 cmp %g1, %i1 2009744: 0a bf ff f2 bcs 200970c <_Objects_Get_name_as_string+0xb4> 2009748: 86 00 e0 01 inc %g3 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 200974c: 40 00 02 72 call 200a114 <_Thread_Enable_dispatch> 2009750: c0 28 c0 00 clrb [ %g3 ] return name; 2009754: 30 bf ff c6 b,a 200966c <_Objects_Get_name_as_string+0x14> lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 2009758: 88 07 bf f0 add %fp, -16, %g4 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 200975c: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 2009760: c2 2f bf f3 stb %g1, [ %fp + -13 ] } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 2009764: c4 2f bf f0 stb %g2, [ %fp + -16 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 2009768: c0 2f bf f4 clrb [ %fp + -12 ] #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 200976c: 85 30 60 10 srl %g1, 0x10, %g2 lname[ 2 ] = (u32_name >> 8) & 0xff; 2009770: 83 30 60 08 srl %g1, 8, %g1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 2009774: c4 2f bf f1 stb %g2, [ %fp + -15 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 2009778: 10 bf ff d9 b 20096dc <_Objects_Get_name_as_string+0x84> 200977c: c2 2f bf f2 stb %g1, [ %fp + -14 ] =============================================================================== 02018eac <_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; 2018eac: c4 02 20 08 ld [ %o0 + 8 ], %g2 if ( information->maximum >= index ) { 2018eb0: 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; 2018eb4: 84 22 40 02 sub %o1, %g2, %g2 2018eb8: 84 00 a0 01 inc %g2 if ( information->maximum >= index ) { 2018ebc: 80 a0 80 01 cmp %g2, %g1 2018ec0: 18 80 00 09 bgu 2018ee4 <_Objects_Get_no_protection+0x38> 2018ec4: 85 28 a0 02 sll %g2, 2, %g2 if ( (the_object = information->local_table[ index ]) != NULL ) { 2018ec8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2018ecc: d0 00 40 02 ld [ %g1 + %g2 ], %o0 2018ed0: 80 a2 20 00 cmp %o0, 0 2018ed4: 02 80 00 05 be 2018ee8 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 2018ed8: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 2018edc: 81 c3 e0 08 retl 2018ee0: 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; 2018ee4: 82 10 20 01 mov 1, %g1 2018ee8: 90 10 20 00 clr %o0 return NULL; } 2018eec: 81 c3 e0 08 retl 2018ef0: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 020090e0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 20090e0: 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; 20090e4: 92 96 20 00 orcc %i0, 0, %o1 20090e8: 12 80 00 06 bne 2009100 <_Objects_Id_to_name+0x20> 20090ec: 83 32 60 18 srl %o1, 0x18, %g1 20090f0: 03 00 80 89 sethi %hi(0x2022400), %g1 20090f4: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 2022710 <_Thread_Executing> 20090f8: d2 00 60 08 ld [ %g1 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 20090fc: 83 32 60 18 srl %o1, 0x18, %g1 2009100: 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 ) 2009104: 84 00 7f ff add %g1, -1, %g2 2009108: 80 a0 a0 03 cmp %g2, 3 200910c: 18 80 00 11 bgu 2009150 <_Objects_Id_to_name+0x70> 2009110: 83 28 60 02 sll %g1, 2, %g1 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 2009114: 05 00 80 89 sethi %hi(0x2022400), %g2 2009118: 84 10 a1 b0 or %g2, 0x1b0, %g2 ! 20225b0 <_Objects_Information_table> 200911c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2009120: 80 a0 60 00 cmp %g1, 0 2009124: 02 80 00 0b be 2009150 <_Objects_Id_to_name+0x70> 2009128: 85 32 60 1b srl %o1, 0x1b, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 200912c: 85 28 a0 02 sll %g2, 2, %g2 2009130: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 2009134: 80 a2 20 00 cmp %o0, 0 2009138: 02 80 00 06 be 2009150 <_Objects_Id_to_name+0x70> <== NEVER TAKEN 200913c: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 2009140: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 2009144: 80 a0 60 00 cmp %g1, 0 2009148: 02 80 00 04 be 2009158 <_Objects_Id_to_name+0x78> <== ALWAYS TAKEN 200914c: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 2009150: 81 c7 e0 08 ret 2009154: 91 e8 20 03 restore %g0, 3, %o0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 2009158: 7f ff ff c5 call 200906c <_Objects_Get> 200915c: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 2009160: 80 a2 20 00 cmp %o0, 0 2009164: 02 bf ff fb be 2009150 <_Objects_Id_to_name+0x70> 2009168: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200916c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 2009170: b0 10 20 00 clr %i0 2009174: 40 00 02 7a call 2009b5c <_Thread_Enable_dispatch> 2009178: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200917c: 81 c7 e0 08 ret 2009180: 81 e8 00 00 restore =============================================================================== 02008230 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 2008230: 9d e3 bf a0 save %sp, -96, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 2008234: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 2008238: 40 00 28 0c call 2012268 200823c: 90 10 00 1a mov %i2, %o0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 2008240: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2008244: 80 a0 60 00 cmp %g1, 0 2008248: 12 80 00 1d bne 20082bc <_Objects_Set_name+0x8c> 200824c: a0 10 00 08 mov %o0, %l0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 2008250: c4 4e 80 00 ldsb [ %i2 ], %g2 2008254: 80 a2 20 01 cmp %o0, 1 2008258: 08 80 00 13 bleu 20082a4 <_Objects_Set_name+0x74> 200825c: 85 28 a0 18 sll %g2, 0x18, %g2 2008260: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 2008264: 80 a2 20 02 cmp %o0, 2 2008268: 83 28 60 10 sll %g1, 0x10, %g1 200826c: 02 80 00 10 be 20082ac <_Objects_Set_name+0x7c> 2008270: 84 10 40 02 or %g1, %g2, %g2 2008274: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1 2008278: 80 a2 20 03 cmp %o0, 3 200827c: 83 28 60 08 sll %g1, 8, %g1 2008280: 84 10 80 01 or %g2, %g1, %g2 2008284: 02 80 00 03 be 2008290 <_Objects_Set_name+0x60> 2008288: 82 10 20 20 mov 0x20, %g1 200828c: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 2008290: 82 10 80 01 or %g2, %g1, %g1 2008294: b0 10 20 01 mov 1, %i0 2008298: c2 26 60 0c st %g1, [ %i1 + 0xc ] ); } return true; } 200829c: 81 c7 e0 08 ret 20082a0: 81 e8 00 00 restore d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 20082a4: 03 00 08 00 sethi %hi(0x200000), %g1 20082a8: 84 10 80 01 or %g2, %g1, %g2 20082ac: 03 00 00 08 sethi %hi(0x2000), %g1 20082b0: 84 10 80 01 or %g2, %g1, %g2 20082b4: 10 bf ff f7 b 2008290 <_Objects_Set_name+0x60> 20082b8: 82 10 20 20 mov 0x20, %g1 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 20082bc: 90 02 20 01 inc %o0 20082c0: 40 00 07 92 call 200a108 <_Workspace_Allocate> 20082c4: b0 10 20 00 clr %i0 if ( !d ) 20082c8: a2 92 20 00 orcc %o0, 0, %l1 20082cc: 02 bf ff f4 be 200829c <_Objects_Set_name+0x6c> <== NEVER TAKEN 20082d0: 01 00 00 00 nop return false; if ( the_object->name.name_p ) { 20082d4: d0 06 60 0c ld [ %i1 + 0xc ], %o0 20082d8: 80 a2 20 00 cmp %o0, 0 20082dc: 02 80 00 06 be 20082f4 <_Objects_Set_name+0xc4> 20082e0: 92 10 00 1a mov %i2, %o1 _Workspace_Free( (void *)the_object->name.name_p ); 20082e4: 40 00 07 92 call 200a12c <_Workspace_Free> 20082e8: 01 00 00 00 nop the_object->name.name_p = NULL; 20082ec: c0 26 60 0c clr [ %i1 + 0xc ] } strncpy( d, name, length ); 20082f0: 92 10 00 1a mov %i2, %o1 20082f4: 90 10 00 11 mov %l1, %o0 20082f8: 40 00 27 a1 call 201217c 20082fc: 94 10 00 10 mov %l0, %o2 d[length] = '\0'; 2008300: c0 2c 40 10 clrb [ %l1 + %l0 ] the_object->name.name_p = d; 2008304: e2 26 60 0c st %l1, [ %i1 + 0xc ] 2008308: 81 c7 e0 08 ret 200830c: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 02007be0 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2007be0: 9d e3 bf a0 save %sp, -96, %sp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 2007be4: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 2007be8: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 2007bec: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2007bf0: 92 10 00 11 mov %l1, %o1 2007bf4: 40 00 45 c2 call 20192fc <.udiv> 2007bf8: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2007bfc: 80 a2 20 00 cmp %o0, 0 2007c00: 02 80 00 12 be 2007c48 <_Objects_Shrink_information+0x68> <== NEVER TAKEN 2007c04: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 2007c08: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2007c0c: c4 00 c0 00 ld [ %g3 ], %g2 2007c10: 80 a4 40 02 cmp %l1, %g2 2007c14: 12 80 00 09 bne 2007c38 <_Objects_Shrink_information+0x58><== ALWAYS TAKEN 2007c18: 82 10 20 00 clr %g1 2007c1c: 10 80 00 0d b 2007c50 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 2007c20: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 2007c24: a0 04 00 11 add %l0, %l1, %l0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 2007c28: 80 a4 40 02 cmp %l1, %g2 2007c2c: 02 80 00 09 be 2007c50 <_Objects_Shrink_information+0x70> 2007c30: 84 04 a0 04 add %l2, 4, %g2 2007c34: a4 10 00 02 mov %g2, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2007c38: 82 00 60 01 inc %g1 2007c3c: 80 a2 00 01 cmp %o0, %g1 2007c40: 38 bf ff f9 bgu,a 2007c24 <_Objects_Shrink_information+0x44> 2007c44: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 2007c48: 81 c7 e0 08 ret 2007c4c: 81 e8 00 00 restore information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 2007c50: 10 80 00 06 b 2007c68 <_Objects_Shrink_information+0x88> 2007c54: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 2007c58: 80 a4 60 00 cmp %l1, 0 2007c5c: 22 80 00 12 be,a 2007ca4 <_Objects_Shrink_information+0xc4> 2007c60: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2007c64: 90 10 00 11 mov %l1, %o0 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 2007c68: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 2007c6c: 80 a0 40 10 cmp %g1, %l0 2007c70: 0a bf ff fa bcs 2007c58 <_Objects_Shrink_information+0x78> 2007c74: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 2007c78: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2007c7c: 84 04 00 02 add %l0, %g2, %g2 2007c80: 80 a0 40 02 cmp %g1, %g2 2007c84: 1a bf ff f6 bcc 2007c5c <_Objects_Shrink_information+0x7c> 2007c88: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 2007c8c: 40 00 13 34 call 200c95c <_Chain_Extract> 2007c90: 01 00 00 00 nop } } while ( the_object ); 2007c94: 80 a4 60 00 cmp %l1, 0 2007c98: 12 bf ff f4 bne 2007c68 <_Objects_Shrink_information+0x88><== ALWAYS TAKEN 2007c9c: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2007ca0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2007ca4: 40 00 07 56 call 20099fc <_Workspace_Free> 2007ca8: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007cac: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2007cb0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 2007cb4: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 2007cb8: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2007cbc: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 2007cc0: 84 20 c0 02 sub %g3, %g2, %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2007cc4: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007cc8: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 2007ccc: 81 c7 e0 08 ret 2007cd0: 81 e8 00 00 restore =============================================================================== 02006ffc <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 2006ffc: 9d e3 bf 98 save %sp, -104, %sp register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 2007000: a0 07 bf fc add %fp, -4, %l0 2007004: 90 10 00 19 mov %i1, %o0 2007008: 40 00 00 7f call 2007204 <_POSIX_Mutex_Get> 200700c: 92 10 00 10 mov %l0, %o1 2007010: 80 a2 20 00 cmp %o0, 0 2007014: 22 80 00 18 be,a 2007074 <_POSIX_Condition_variables_Wait_support+0x78> 2007018: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 200701c: 03 00 80 7e sethi %hi(0x201f800), %g1 2007020: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 201fa40 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 2007024: 92 10 00 10 mov %l0, %o1 2007028: 84 00 bf ff add %g2, -1, %g2 200702c: 90 10 00 18 mov %i0, %o0 2007030: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 2007034: 7f ff ff 69 call 2006dd8 <_POSIX_Condition_variables_Get> 2007038: 01 00 00 00 nop switch ( location ) { 200703c: c2 07 bf fc ld [ %fp + -4 ], %g1 2007040: 80 a0 60 00 cmp %g1, 0 2007044: 12 80 00 1a bne 20070ac <_POSIX_Condition_variables_Wait_support+0xb0> 2007048: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 200704c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2007050: 80 a0 60 00 cmp %g1, 0 2007054: 02 80 00 0a be 200707c <_POSIX_Condition_variables_Wait_support+0x80> 2007058: 01 00 00 00 nop 200705c: c4 06 40 00 ld [ %i1 ], %g2 2007060: 80 a0 40 02 cmp %g1, %g2 2007064: 02 80 00 06 be 200707c <_POSIX_Condition_variables_Wait_support+0x80> 2007068: 01 00 00 00 nop _Thread_Enable_dispatch(); 200706c: 40 00 0d 69 call 200a610 <_Thread_Enable_dispatch> 2007070: b0 10 20 16 mov 0x16, %i0 ! 16 return EINVAL; 2007074: 81 c7 e0 08 ret 2007078: 81 e8 00 00 restore } (void) pthread_mutex_unlock( mutex ); 200707c: 40 00 00 f5 call 2007450 2007080: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 2007084: 80 8e e0 ff btst 0xff, %i3 2007088: 22 80 00 0b be,a 20070b4 <_POSIX_Condition_variables_Wait_support+0xb8> 200708c: c4 06 40 00 ld [ %i1 ], %g2 status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 2007090: 40 00 0d 60 call 200a610 <_Thread_Enable_dispatch> 2007094: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 2007098: 40 00 00 cd call 20073cc 200709c: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 20070a0: 80 a2 20 00 cmp %o0, 0 20070a4: 02 80 00 1c be 2007114 <_POSIX_Condition_variables_Wait_support+0x118> 20070a8: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 20070ac: 81 c7 e0 08 ret 20070b0: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 20070b4: 23 00 80 7e sethi %hi(0x201f800), %l1 20070b8: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 ! 201fb00 <_Thread_Executing> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 20070bc: c4 24 20 14 st %g2, [ %l0 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 20070c0: c0 20 60 34 clr [ %g1 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 20070c4: c6 06 00 00 ld [ %i0 ], %g3 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 20070c8: 84 04 20 18 add %l0, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 20070cc: c6 20 60 20 st %g3, [ %g1 + 0x20 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 20070d0: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 20070d4: 92 10 00 1a mov %i2, %o1 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; 20070d8: 82 10 20 01 mov 1, %g1 20070dc: 90 10 00 02 mov %g2, %o0 20070e0: 15 00 80 2c sethi %hi(0x200b000), %o2 20070e4: 94 12 a0 28 or %o2, 0x28, %o2 ! 200b028 <_Thread_queue_Timeout> 20070e8: 40 00 0e bd call 200abdc <_Thread_queue_Enqueue_with_handler> 20070ec: c2 24 20 48 st %g1, [ %l0 + 0x48 ] _Thread_Enable_dispatch(); 20070f0: 40 00 0d 48 call 200a610 <_Thread_Enable_dispatch> 20070f4: 01 00 00 00 nop /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 20070f8: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 20070fc: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 2007100: 80 a6 20 74 cmp %i0, 0x74 2007104: 02 bf ff e5 be 2007098 <_POSIX_Condition_variables_Wait_support+0x9c> 2007108: 80 a6 20 00 cmp %i0, 0 200710c: 02 bf ff e3 be 2007098 <_POSIX_Condition_variables_Wait_support+0x9c><== ALWAYS TAKEN 2007110: 01 00 00 00 nop 2007114: 81 c7 e0 08 ret 2007118: 81 e8 00 00 restore =============================================================================== 0200b1e4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200b1e4: 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( 200b1e8: 11 00 80 9c sethi %hi(0x2027000), %o0 200b1ec: 92 10 00 18 mov %i0, %o1 200b1f0: 90 12 23 7c or %o0, 0x37c, %o0 200b1f4: 40 00 0c fc call 200e5e4 <_Objects_Get> 200b1f8: 94 07 bf fc add %fp, -4, %o2 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200b1fc: c2 07 bf fc ld [ %fp + -4 ], %g1 200b200: 80 a0 60 00 cmp %g1, 0 200b204: 22 80 00 08 be,a 200b224 <_POSIX_Message_queue_Receive_support+0x40> 200b208: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200b20c: 40 00 2e c0 call 2016d0c <__errno> 200b210: b0 10 3f ff mov -1, %i0 200b214: 82 10 20 09 mov 9, %g1 200b218: c2 22 00 00 st %g1, [ %o0 ] } 200b21c: 81 c7 e0 08 ret 200b220: 81 e8 00 00 restore the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 200b224: 84 08 60 03 and %g1, 3, %g2 200b228: 80 a0 a0 01 cmp %g2, 1 200b22c: 02 80 00 34 be 200b2fc <_POSIX_Message_queue_Receive_support+0x118> 200b230: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 200b234: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200b238: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200b23c: 80 a0 80 1a cmp %g2, %i2 200b240: 18 80 00 1e bgu 200b2b8 <_POSIX_Message_queue_Receive_support+0xd4> 200b244: 80 8f 20 ff btst 0xff, %i4 length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200b248: 12 80 00 18 bne 200b2a8 <_POSIX_Message_queue_Receive_support+0xc4><== ALWAYS TAKEN 200b24c: 98 10 20 00 clr %o4 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200b250: 82 10 3f ff mov -1, %g1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200b254: 9a 10 00 1d mov %i5, %o5 200b258: 90 02 20 1c add %o0, 0x1c, %o0 200b25c: 92 10 00 18 mov %i0, %o1 200b260: 94 10 00 19 mov %i1, %o2 200b264: 96 07 bf f8 add %fp, -8, %o3 200b268: 40 00 08 80 call 200d468 <_CORE_message_queue_Seize> 200b26c: c2 27 bf f8 st %g1, [ %fp + -8 ] &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200b270: 40 00 0f 6e call 200f028 <_Thread_Enable_dispatch> 200b274: 3b 00 80 9b sethi %hi(0x2026c00), %i5 *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 200b278: c2 07 63 20 ld [ %i5 + 0x320 ], %g1 ! 2026f20 <_Thread_Executing> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 200b27c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 200b280: c6 00 60 34 ld [ %g1 + 0x34 ], %g3 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 200b284: 83 38 a0 1f sra %g2, 0x1f, %g1 200b288: 84 18 40 02 xor %g1, %g2, %g2 200b28c: 82 20 80 01 sub %g2, %g1, %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 200b290: 80 a0 e0 00 cmp %g3, 0 200b294: 12 80 00 11 bne 200b2d8 <_POSIX_Message_queue_Receive_support+0xf4> 200b298: c2 26 c0 00 st %g1, [ %i3 ] return length_out; 200b29c: f0 07 bf f8 ld [ %fp + -8 ], %i0 200b2a0: 81 c7 e0 08 ret 200b2a4: 81 e8 00 00 restore length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200b2a8: 99 30 60 0e srl %g1, 0xe, %o4 200b2ac: 98 1b 20 01 xor %o4, 1, %o4 200b2b0: 10 bf ff e8 b 200b250 <_POSIX_Message_queue_Receive_support+0x6c> 200b2b4: 98 0b 20 01 and %o4, 1, %o4 } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 200b2b8: 40 00 0f 5c call 200f028 <_Thread_Enable_dispatch> 200b2bc: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200b2c0: 40 00 2e 93 call 2016d0c <__errno> 200b2c4: 01 00 00 00 nop 200b2c8: 82 10 20 7a mov 0x7a, %g1 ! 7a 200b2cc: c2 22 00 00 st %g1, [ %o0 ] 200b2d0: 81 c7 e0 08 ret 200b2d4: 81 e8 00 00 restore _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 200b2d8: 40 00 2e 8d call 2016d0c <__errno> 200b2dc: b0 10 3f ff mov -1, %i0 200b2e0: c2 07 63 20 ld [ %i5 + 0x320 ], %g1 200b2e4: b6 10 00 08 mov %o0, %i3 200b2e8: 40 00 00 b0 call 200b5a8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200b2ec: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200b2f0: d0 26 c0 00 st %o0, [ %i3 ] 200b2f4: 81 c7 e0 08 ret 200b2f8: 81 e8 00 00 restore the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 200b2fc: 40 00 0f 4b call 200f028 <_Thread_Enable_dispatch> 200b300: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 200b304: 40 00 2e 82 call 2016d0c <__errno> 200b308: 01 00 00 00 nop 200b30c: 82 10 20 09 mov 9, %g1 ! 9 200b310: c2 22 00 00 st %g1, [ %o0 ] 200b314: 81 c7 e0 08 ret 200b318: 81 e8 00 00 restore =============================================================================== 0200b334 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 200b334: 9d e3 bf 90 save %sp, -112, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 200b338: 80 a6 e0 20 cmp %i3, 0x20 200b33c: 18 80 00 47 bgu 200b458 <_POSIX_Message_queue_Send_support+0x124> 200b340: 11 00 80 9c sethi %hi(0x2027000), %o0 200b344: 92 10 00 18 mov %i0, %o1 200b348: 90 12 23 7c or %o0, 0x37c, %o0 200b34c: 40 00 0c a6 call 200e5e4 <_Objects_Get> 200b350: 94 07 bf fc add %fp, -4, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200b354: c2 07 bf fc ld [ %fp + -4 ], %g1 200b358: 80 a0 60 00 cmp %g1, 0 200b35c: 12 80 00 31 bne 200b420 <_POSIX_Message_queue_Send_support+0xec> 200b360: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 200b364: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200b368: 80 88 60 03 btst 3, %g1 200b36c: 02 80 00 41 be 200b470 <_POSIX_Message_queue_Send_support+0x13c> 200b370: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 200b374: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200b378: 12 80 00 15 bne 200b3cc <_POSIX_Message_queue_Send_support+0x98> 200b37c: 84 10 20 00 clr %g2 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 200b380: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 200b384: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 200b388: 92 10 00 19 mov %i1, %o1 200b38c: 94 10 00 1a mov %i2, %o2 200b390: 96 10 00 18 mov %i0, %o3 200b394: 9a 20 00 1b neg %i3, %o5 200b398: 98 10 20 00 clr %o4 200b39c: 40 00 08 72 call 200d564 <_CORE_message_queue_Submit> 200b3a0: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 200b3a4: 40 00 0f 21 call 200f028 <_Thread_Enable_dispatch> 200b3a8: ba 10 00 08 mov %o0, %i5 * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 200b3ac: 80 a7 60 07 cmp %i5, 7 200b3b0: 02 80 00 19 be 200b414 <_POSIX_Message_queue_Send_support+0xe0><== NEVER TAKEN 200b3b4: 03 00 80 9b sethi %hi(0x2026c00), %g1 msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 200b3b8: 80 a7 60 00 cmp %i5, 0 200b3bc: 12 80 00 1f bne 200b438 <_POSIX_Message_queue_Send_support+0x104> 200b3c0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 200b3c4: 81 c7 e0 08 ret 200b3c8: 81 e8 00 00 restore the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200b3cc: 85 30 60 0e srl %g1, 0xe, %g2 200b3d0: 84 18 a0 01 xor %g2, 1, %g2 200b3d4: 84 08 a0 01 and %g2, 1, %g2 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 200b3d8: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 200b3dc: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 200b3e0: 92 10 00 19 mov %i1, %o1 200b3e4: 94 10 00 1a mov %i2, %o2 200b3e8: 96 10 00 18 mov %i0, %o3 200b3ec: 9a 20 00 1b neg %i3, %o5 200b3f0: 98 10 20 00 clr %o4 200b3f4: 40 00 08 5c call 200d564 <_CORE_message_queue_Submit> 200b3f8: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 200b3fc: 40 00 0f 0b call 200f028 <_Thread_Enable_dispatch> 200b400: ba 10 00 08 mov %o0, %i5 * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 200b404: 80 a7 60 07 cmp %i5, 7 200b408: 12 bf ff ed bne 200b3bc <_POSIX_Message_queue_Send_support+0x88> 200b40c: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 200b410: 03 00 80 9b sethi %hi(0x2026c00), %g1 200b414: c2 00 63 20 ld [ %g1 + 0x320 ], %g1 ! 2026f20 <_Thread_Executing> 200b418: 10 bf ff e8 b 200b3b8 <_POSIX_Message_queue_Send_support+0x84> 200b41c: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200b420: 40 00 2e 3b call 2016d0c <__errno> 200b424: b0 10 3f ff mov -1, %i0 200b428: 82 10 20 09 mov 9, %g1 200b42c: c2 22 00 00 st %g1, [ %o0 ] } 200b430: 81 c7 e0 08 ret 200b434: 81 e8 00 00 restore msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 200b438: 40 00 2e 35 call 2016d0c <__errno> 200b43c: b0 10 3f ff mov -1, %i0 200b440: b8 10 00 08 mov %o0, %i4 200b444: 40 00 00 59 call 200b5a8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200b448: 90 10 00 1d mov %i5, %o0 200b44c: d0 27 00 00 st %o0, [ %i4 ] 200b450: 81 c7 e0 08 ret 200b454: 81 e8 00 00 restore * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 200b458: 40 00 2e 2d call 2016d0c <__errno> 200b45c: b0 10 3f ff mov -1, %i0 200b460: 82 10 20 16 mov 0x16, %g1 200b464: c2 22 00 00 st %g1, [ %o0 ] 200b468: 81 c7 e0 08 ret 200b46c: 81 e8 00 00 restore the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 200b470: 40 00 0e ee call 200f028 <_Thread_Enable_dispatch> 200b474: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 200b478: 40 00 2e 25 call 2016d0c <__errno> 200b47c: 01 00 00 00 nop 200b480: 82 10 20 09 mov 9, %g1 ! 9 200b484: c2 22 00 00 st %g1, [ %o0 ] 200b488: 81 c7 e0 08 ret 200b48c: 81 e8 00 00 restore =============================================================================== 0200bffc <_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 ]; 200bffc: c2 02 21 6c ld [ %o0 + 0x16c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200c000: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 200c004: 80 a0 a0 00 cmp %g2, 0 200c008: 12 80 00 06 bne 200c020 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24><== NEVER TAKEN 200c00c: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200c010: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200c014: 80 a0 a0 01 cmp %g2, 1 200c018: 22 80 00 05 be,a 200c02c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x30> 200c01c: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 200c020: 82 13 c0 00 mov %o7, %g1 200c024: 7f ff f1 bf call 2008720 <_Thread_Enable_dispatch> 200c028: 9e 10 40 00 mov %g1, %o7 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 200c02c: 80 a0 60 00 cmp %g1, 0 200c030: 02 bf ff fc be 200c020 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24> 200c034: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 200c038: 03 00 80 78 sethi %hi(0x201e000), %g1 200c03c: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 201e220 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200c040: 92 10 3f ff mov -1, %o1 200c044: 84 00 bf ff add %g2, -1, %g2 200c048: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 200c04c: 82 13 c0 00 mov %o7, %g1 200c050: 40 00 01 dd call 200c7c4 <_POSIX_Thread_Exit> 200c054: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200d588 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200d588: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200d58c: 7f ff ff f2 call 200d554 <_POSIX_Priority_Is_valid> 200d590: d0 06 40 00 ld [ %i1 ], %o0 200d594: 80 8a 20 ff btst 0xff, %o0 200d598: 02 80 00 0c be 200d5c8 <_POSIX_Thread_Translate_sched_param+0x40><== NEVER TAKEN 200d59c: 80 a6 20 00 cmp %i0, 0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200d5a0: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; if ( policy == SCHED_OTHER ) { 200d5a4: 02 80 00 0b be 200d5d0 <_POSIX_Thread_Translate_sched_param+0x48> 200d5a8: c0 26 c0 00 clr [ %i3 ] *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 200d5ac: 80 a6 20 01 cmp %i0, 1 200d5b0: 02 80 00 2e be 200d668 <_POSIX_Thread_Translate_sched_param+0xe0> 200d5b4: 80 a6 20 02 cmp %i0, 2 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200d5b8: 02 80 00 2f be 200d674 <_POSIX_Thread_Translate_sched_param+0xec> 200d5bc: 80 a6 20 04 cmp %i0, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 200d5c0: 22 80 00 08 be,a 200d5e0 <_POSIX_Thread_Translate_sched_param+0x58> 200d5c4: c2 06 60 08 ld [ %i1 + 8 ], %g1 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 200d5c8: 81 c7 e0 08 ret 200d5cc: 91 e8 20 16 restore %g0, 0x16, %o0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200d5d0: 82 10 20 01 mov 1, %g1 200d5d4: c2 26 80 00 st %g1, [ %i2 ] return 0; 200d5d8: 81 c7 e0 08 ret 200d5dc: 81 e8 00 00 restore *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 200d5e0: 80 a0 60 00 cmp %g1, 0 200d5e4: 32 80 00 07 bne,a 200d600 <_POSIX_Thread_Translate_sched_param+0x78> 200d5e8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 (param->sched_ss_repl_period.tv_nsec == 0) ) 200d5ec: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200d5f0: 80 a0 60 00 cmp %g1, 0 200d5f4: 02 bf ff f5 be 200d5c8 <_POSIX_Thread_Translate_sched_param+0x40> 200d5f8: 01 00 00 00 nop return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200d5fc: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200d600: 80 a0 60 00 cmp %g1, 0 200d604: 12 80 00 06 bne 200d61c <_POSIX_Thread_Translate_sched_param+0x94> 200d608: 01 00 00 00 nop (param->sched_ss_init_budget.tv_nsec == 0) ) 200d60c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200d610: 80 a0 60 00 cmp %g1, 0 200d614: 02 bf ff ed be 200d5c8 <_POSIX_Thread_Translate_sched_param+0x40> 200d618: 01 00 00 00 nop return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200d61c: 7f ff f4 0b call 200a648 <_Timespec_To_ticks> 200d620: 90 06 60 08 add %i1, 8, %o0 200d624: b0 10 00 08 mov %o0, %i0 200d628: 7f ff f4 08 call 200a648 <_Timespec_To_ticks> 200d62c: 90 06 60 10 add %i1, 0x10, %o0 200d630: 80 a6 00 08 cmp %i0, %o0 200d634: 0a bf ff e5 bcs 200d5c8 <_POSIX_Thread_Translate_sched_param+0x40> 200d638: 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 ) ) 200d63c: 7f ff ff c6 call 200d554 <_POSIX_Priority_Is_valid> 200d640: d0 06 60 04 ld [ %i1 + 4 ], %o0 200d644: 80 8a 20 ff btst 0xff, %o0 200d648: 02 bf ff e0 be 200d5c8 <_POSIX_Thread_Translate_sched_param+0x40> 200d64c: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200d650: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200d654: 03 00 80 1a sethi %hi(0x2006800), %g1 200d658: 82 10 60 68 or %g1, 0x68, %g1 ! 2006868 <_POSIX_Threads_Sporadic_budget_callout> 200d65c: c2 26 c0 00 st %g1, [ %i3 ] return 0; 200d660: 81 c7 e0 08 ret 200d664: 91 e8 20 00 restore %g0, 0, %o0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200d668: c0 26 80 00 clr [ %i2 ] return 0; 200d66c: 81 c7 e0 08 ret 200d670: 91 e8 20 00 restore %g0, 0, %o0 } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200d674: f0 26 80 00 st %i0, [ %i2 ] return 0; 200d678: 81 c7 e0 08 ret 200d67c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200658c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 200658c: 9d e3 bf 60 save %sp, -160, %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; 2006590: 03 00 80 75 sethi %hi(0x201d400), %g1 2006594: 82 10 62 6c or %g1, 0x26c, %g1 ! 201d66c maximum = Configuration_POSIX_API.number_of_initialization_threads; 2006598: e6 00 60 30 ld [ %g1 + 0x30 ], %l3 if ( !user_threads || maximum == 0 ) 200659c: 80 a4 e0 00 cmp %l3, 0 20065a0: 02 80 00 1a be 2006608 <_POSIX_Threads_Initialize_user_threads_body+0x7c><== NEVER TAKEN 20065a4: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 20065a8: 80 a4 60 00 cmp %l1, 0 20065ac: 02 80 00 17 be 2006608 <_POSIX_Threads_Initialize_user_threads_body+0x7c><== NEVER TAKEN 20065b0: a4 10 20 00 clr %l2 20065b4: a0 07 bf c0 add %fp, -64, %l0 20065b8: a8 07 bf fc add %fp, -4, %l4 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 20065bc: 40 00 1c 31 call 200d680 20065c0: 90 10 00 10 mov %l0, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 20065c4: 92 10 20 02 mov 2, %o1 20065c8: 40 00 1c 3a call 200d6b0 20065cc: 90 10 00 10 mov %l0, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 20065d0: d2 04 60 04 ld [ %l1 + 4 ], %o1 20065d4: 40 00 1c 48 call 200d6f4 20065d8: 90 10 00 10 mov %l0, %o0 status = pthread_create( 20065dc: d4 04 40 00 ld [ %l1 ], %o2 20065e0: 90 10 00 14 mov %l4, %o0 20065e4: 92 10 00 10 mov %l0, %o1 20065e8: 7f ff ff 19 call 200624c 20065ec: 96 10 20 00 clr %o3 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 20065f0: 80 a2 20 00 cmp %o0, 0 20065f4: 12 80 00 07 bne 2006610 <_POSIX_Threads_Initialize_user_threads_body+0x84> 20065f8: a4 04 a0 01 inc %l2 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 20065fc: 80 a4 c0 12 cmp %l3, %l2 2006600: 18 bf ff ef bgu 20065bc <_POSIX_Threads_Initialize_user_threads_body+0x30><== NEVER TAKEN 2006604: a2 04 60 08 add %l1, 8, %l1 2006608: 81 c7 e0 08 ret 200660c: 81 e8 00 00 restore &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 2006610: 94 10 00 08 mov %o0, %o2 2006614: 92 10 20 01 mov 1, %o1 2006618: 40 00 08 09 call 200863c <_Internal_error_Occurred> 200661c: 90 10 20 02 mov 2, %o0 =============================================================================== 0200c318 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200c318: 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 ]; 200c31c: e0 06 61 6c ld [ %i1 + 0x16c ], %l0 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 200c320: 40 00 04 99 call 200d584 <_Timespec_To_ticks> 200c324: 90 04 20 94 add %l0, 0x94, %o0 200c328: 03 00 80 70 sethi %hi(0x201c000), %g1 200c32c: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 200c330: d2 08 62 24 ldub [ %g1 + 0x224 ], %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 ) { 200c334: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200c338: 92 22 40 02 sub %o1, %g2, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 200c33c: d0 26 60 78 st %o0, [ %i1 + 0x78 ] */ #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 ) { 200c340: 80 a0 60 00 cmp %g1, 0 200c344: 12 80 00 06 bne 200c35c <_POSIX_Threads_Sporadic_budget_TSR+0x44><== NEVER TAKEN 200c348: 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 ) { 200c34c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200c350: 80 a0 40 09 cmp %g1, %o1 200c354: 38 80 00 09 bgu,a 200c378 <_POSIX_Threads_Sporadic_budget_TSR+0x60> 200c358: 90 10 00 19 mov %i1, %o0 #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 200c35c: 40 00 04 8a call 200d584 <_Timespec_To_ticks> 200c360: 90 04 20 8c add %l0, 0x8c, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200c364: 31 00 80 73 sethi %hi(0x201cc00), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200c368: d0 24 20 b0 st %o0, [ %l0 + 0xb0 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200c36c: b2 04 20 a4 add %l0, 0xa4, %i1 200c370: 7f ff f4 be call 2009668 <_Watchdog_Insert> 200c374: 91 ee 22 20 restore %i0, 0x220, %o0 if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 200c378: 7f ff ee 70 call 2007d38 <_Thread_Change_priority> 200c37c: 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 ); 200c380: 40 00 04 81 call 200d584 <_Timespec_To_ticks> 200c384: 90 04 20 8c add %l0, 0x8c, %o0 200c388: 31 00 80 73 sethi %hi(0x201cc00), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200c38c: d0 24 20 b0 st %o0, [ %l0 + 0xb0 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200c390: b2 04 20 a4 add %l0, 0xa4, %i1 200c394: 7f ff f4 b5 call 2009668 <_Watchdog_Insert> 200c398: 91 ee 22 20 restore %i0, 0x220, %o0 =============================================================================== 0200c2c4 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200c2c4: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200c2c8: c6 00 a0 88 ld [ %g2 + 0x88 ], %g3 200c2cc: 05 00 80 70 sethi %hi(0x201c000), %g2 200c2d0: d2 08 a2 24 ldub [ %g2 + 0x224 ], %o1 ! 201c224 */ #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 ) { 200c2d4: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200c2d8: 92 22 40 03 sub %o1, %g3, %o1 /* * 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 */ 200c2dc: 86 10 3f ff mov -1, %g3 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 200c2e0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] */ #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 ) { 200c2e4: 80 a0 a0 00 cmp %g2, 0 200c2e8: 12 80 00 06 bne 200c300 <_POSIX_Threads_Sporadic_budget_callout+0x3c><== NEVER TAKEN 200c2ec: c6 22 20 78 st %g3, [ %o0 + 0x78 ] /* * 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 ) { 200c2f0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200c2f4: 80 a0 40 09 cmp %g1, %o1 200c2f8: 0a 80 00 04 bcs 200c308 <_POSIX_Threads_Sporadic_budget_callout+0x44><== ALWAYS TAKEN 200c2fc: 94 10 20 01 mov 1, %o2 200c300: 81 c3 e0 08 retl <== NOT EXECUTED 200c304: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( the_thread, new_priority, true ); 200c308: 82 13 c0 00 mov %o7, %g1 200c30c: 7f ff ee 8b call 2007d38 <_Thread_Change_priority> 200c310: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200e5b0 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 200e5b0: 9d e3 bf a0 save %sp, -96, %sp POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200e5b4: e4 06 21 6c ld [ %i0 + 0x16c ], %l2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 200e5b8: 84 10 20 01 mov 1, %g2 POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 200e5bc: c2 04 a0 e0 ld [ %l2 + 0xe0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200e5c0: a2 04 a0 e4 add %l2, 0xe4, %l1 200e5c4: 80 a0 40 11 cmp %g1, %l1 200e5c8: 02 80 00 14 be 200e618 <_POSIX_Threads_cancel_run+0x68> 200e5cc: c4 24 a0 d4 st %g2, [ %l2 + 0xd4 ] thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 200e5d0: 7f ff cf 37 call 20022ac 200e5d4: 01 00 00 00 nop handler = (POSIX_Cancel_Handler_control *) 200e5d8: e0 04 60 04 ld [ %l1 + 4 ], %l0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200e5dc: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 200e5e0: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200e5e4: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200e5e8: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 200e5ec: 7f ff cf 34 call 20022bc 200e5f0: 01 00 00 00 nop (*handler->routine)( handler->arg ); 200e5f4: c2 04 20 08 ld [ %l0 + 8 ], %g1 200e5f8: 9f c0 40 00 call %g1 200e5fc: d0 04 20 0c ld [ %l0 + 0xc ], %o0 _Workspace_Free( handler ); 200e600: 7f ff ec ff call 20099fc <_Workspace_Free> 200e604: 90 10 00 10 mov %l0, %o0 POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 200e608: c2 04 a0 e0 ld [ %l2 + 0xe0 ], %g1 200e60c: 80 a0 40 11 cmp %g1, %l1 200e610: 12 bf ff f0 bne 200e5d0 <_POSIX_Threads_cancel_run+0x20> <== NEVER TAKEN 200e614: 01 00 00 00 nop 200e618: 81 c7 e0 08 ret 200e61c: 81 e8 00 00 restore =============================================================================== 02006254 <_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) { 2006254: 9d e3 bf a0 save %sp, -96, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2006258: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 200625c: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2006260: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006264: 80 a0 60 00 cmp %g1, 0 2006268: 12 80 00 0e bne 20062a0 <_POSIX_Timer_TSR+0x4c> 200626c: c4 26 60 68 st %g2, [ %i1 + 0x68 ] ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 2006270: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 2006274: 80 a0 60 00 cmp %g1, 0 2006278: 32 80 00 0b bne,a 20062a4 <_POSIX_Timer_TSR+0x50> <== ALWAYS TAKEN 200627c: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2006280: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 2006284: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * 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 ) ) { 2006288: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 200628c: 40 00 1a a2 call 200cd14 2006290: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 2006294: c0 26 60 68 clr [ %i1 + 0x68 ] 2006298: 81 c7 e0 08 ret 200629c: 81 e8 00 00 restore ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 20062a0: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 20062a4: d4 06 60 08 ld [ %i1 + 8 ], %o2 20062a8: 90 06 60 10 add %i1, 0x10, %o0 20062ac: 17 00 80 18 sethi %hi(0x2006000), %o3 20062b0: 98 10 00 19 mov %i1, %o4 20062b4: 40 00 1b c6 call 200d1cc <_POSIX_Timer_Insert_helper> 20062b8: 96 12 e2 54 or %o3, 0x254, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 20062bc: 80 8a 20 ff btst 0xff, %o0 20062c0: 02 bf ff f6 be 2006298 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN 20062c4: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 20062c8: 40 00 05 da call 2007a30 <_TOD_Get> 20062cc: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 20062d0: 82 10 20 03 mov 3, %g1 /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 20062d4: 10 bf ff ed b 2006288 <_POSIX_Timer_TSR+0x34> 20062d8: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] =============================================================================== 0200e70c <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 200e70c: 9d e3 bf 90 save %sp, -112, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 200e710: 98 10 20 01 mov 1, %o4 200e714: 96 0e a0 ff and %i2, 0xff, %o3 200e718: a0 07 bf f4 add %fp, -12, %l0 200e71c: 90 10 00 18 mov %i0, %o0 200e720: 92 10 00 19 mov %i1, %o1 200e724: 40 00 00 23 call 200e7b0 <_POSIX_signals_Clear_signals> 200e728: 94 10 00 10 mov %l0, %o2 200e72c: 80 8a 20 ff btst 0xff, %o0 200e730: 02 80 00 1e be 200e7a8 <_POSIX_signals_Check_signal+0x9c> 200e734: 83 2e 60 02 sll %i1, 2, %g1 #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 200e738: 07 00 80 74 sethi %hi(0x201d000), %g3 200e73c: 85 2e 60 04 sll %i1, 4, %g2 200e740: 86 10 e2 d4 or %g3, 0x2d4, %g3 200e744: 84 20 80 01 sub %g2, %g1, %g2 200e748: 88 00 c0 02 add %g3, %g2, %g4 200e74c: c2 01 20 08 ld [ %g4 + 8 ], %g1 200e750: 80 a0 60 01 cmp %g1, 1 200e754: 02 80 00 15 be 200e7a8 <_POSIX_signals_Check_signal+0x9c> <== NEVER TAKEN 200e758: 01 00 00 00 nop /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200e75c: c8 01 20 04 ld [ %g4 + 4 ], %g4 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 200e760: e2 06 20 cc ld [ %i0 + 0xcc ], %l1 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200e764: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200e768: 86 11 00 11 or %g4, %l1, %g3 /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200e76c: 80 a0 a0 02 cmp %g2, 2 200e770: 02 80 00 07 be 200e78c <_POSIX_signals_Check_signal+0x80> 200e774: c6 26 20 cc st %g3, [ %i0 + 0xcc ] &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 200e778: 9f c0 40 00 call %g1 200e77c: 90 10 00 19 mov %i1, %o0 } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200e780: e2 26 20 cc st %l1, [ %i0 + 0xcc ] return true; 200e784: 81 c7 e0 08 ret 200e788: 91 e8 20 01 restore %g0, 1, %o0 /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 200e78c: 90 10 00 19 mov %i1, %o0 200e790: 92 10 00 10 mov %l0, %o1 200e794: 9f c0 40 00 call %g1 200e798: 94 10 20 00 clr %o2 } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200e79c: e2 26 20 cc st %l1, [ %i0 + 0xcc ] return true; 200e7a0: 81 c7 e0 08 ret 200e7a4: 91 e8 20 01 restore %g0, 1, %o0 } 200e7a8: 81 c7 e0 08 ret 200e7ac: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200fa4c <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200fa4c: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200fa50: 7f ff ca 17 call 20022ac 200fa54: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200fa58: 85 2e 20 04 sll %i0, 4, %g2 200fa5c: 83 2e 20 02 sll %i0, 2, %g1 200fa60: 82 20 80 01 sub %g2, %g1, %g1 200fa64: 05 00 80 74 sethi %hi(0x201d000), %g2 200fa68: 84 10 a2 d4 or %g2, 0x2d4, %g2 ! 201d2d4 <_POSIX_signals_Vectors> 200fa6c: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200fa70: 80 a0 a0 02 cmp %g2, 2 200fa74: 02 80 00 11 be 200fab8 <_POSIX_signals_Clear_process_signals+0x6c> 200fa78: 05 00 80 75 sethi %hi(0x201d400), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 200fa7c: 05 00 80 75 sethi %hi(0x201d400), %g2 200fa80: c6 00 a0 c8 ld [ %g2 + 0xc8 ], %g3 ! 201d4c8 <_POSIX_signals_Pending> 200fa84: b0 06 3f ff add %i0, -1, %i0 200fa88: 82 10 20 01 mov 1, %g1 200fa8c: 83 28 40 18 sll %g1, %i0, %g1 200fa90: 82 28 c0 01 andn %g3, %g1, %g1 if ( !_POSIX_signals_Pending ) 200fa94: 80 a0 60 00 cmp %g1, 0 200fa98: 12 80 00 06 bne 200fab0 <_POSIX_signals_Clear_process_signals+0x64><== NEVER TAKEN 200fa9c: c2 20 a0 c8 st %g1, [ %g2 + 0xc8 ] _Thread_Do_post_task_switch_extension--; 200faa0: 03 00 80 73 sethi %hi(0x201cc00), %g1 200faa4: c4 00 61 e4 ld [ %g1 + 0x1e4 ], %g2 ! 201cde4 <_Thread_Do_post_task_switch_extension> 200faa8: 84 00 bf ff add %g2, -1, %g2 200faac: c4 20 61 e4 st %g2, [ %g1 + 0x1e4 ] } _ISR_Enable( level ); 200fab0: 7f ff ca 03 call 20022bc 200fab4: 91 e8 00 08 restore %g0, %o0, %o0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200fab8: 84 10 a0 cc or %g2, 0xcc, %g2 200fabc: c6 00 40 02 ld [ %g1 + %g2 ], %g3 200fac0: 82 00 40 02 add %g1, %g2, %g1 200fac4: 82 00 60 04 add %g1, 4, %g1 200fac8: 80 a0 c0 01 cmp %g3, %g1 200facc: 02 bf ff ed be 200fa80 <_POSIX_signals_Clear_process_signals+0x34><== ALWAYS TAKEN 200fad0: 05 00 80 75 sethi %hi(0x201d400), %g2 if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 200fad4: 7f ff c9 fa call 20022bc <== NOT EXECUTED 200fad8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02006df4 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 2006df4: 82 10 20 1b mov 0x1b, %g1 ! 1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2006df8: 86 10 20 01 mov 1, %g3 2006dfc: 84 00 7f ff add %g1, -1, %g2 2006e00: 85 28 c0 02 sll %g3, %g2, %g2 2006e04: 80 88 80 08 btst %g2, %o0 2006e08: 12 80 00 11 bne 2006e4c <_POSIX_signals_Get_highest+0x58> <== NEVER TAKEN 2006e0c: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2006e10: 82 00 60 01 inc %g1 2006e14: 80 a0 60 20 cmp %g1, 0x20 2006e18: 12 bf ff fa bne 2006e00 <_POSIX_signals_Get_highest+0xc> 2006e1c: 84 00 7f ff add %g1, -1, %g2 2006e20: 82 10 20 01 mov 1, %g1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2006e24: 10 80 00 05 b 2006e38 <_POSIX_signals_Get_highest+0x44> 2006e28: 86 10 20 01 mov 1, %g3 */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2006e2c: 80 a0 60 1b cmp %g1, 0x1b 2006e30: 02 80 00 07 be 2006e4c <_POSIX_signals_Get_highest+0x58> <== NEVER TAKEN 2006e34: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) { 2006e38: 84 00 7f ff add %g1, -1, %g2 2006e3c: 85 28 c0 02 sll %g3, %g2, %g2 2006e40: 80 88 80 08 btst %g2, %o0 2006e44: 22 bf ff fa be,a 2006e2c <_POSIX_signals_Get_highest+0x38> 2006e48: 82 00 60 01 inc %g1 * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 2006e4c: 81 c3 e0 08 retl 2006e50: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200bf64 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200bf64: 9d e3 bf a0 save %sp, -96, %sp 200bf68: 25 00 80 75 sethi %hi(0x201d400), %l2 POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200bf6c: e2 06 21 6c ld [ %i0 + 0x16c ], %l1 * * 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 ); 200bf70: 7f ff d8 cf call 20022ac 200bf74: a4 14 a0 c8 or %l2, 0xc8, %l2 200bf78: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200bf7c: c6 04 80 00 ld [ %l2 ], %g3 200bf80: c2 04 60 d0 ld [ %l1 + 0xd0 ], %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 & 200bf84: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200bf88: 82 10 c0 01 or %g3, %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 & 200bf8c: 80 a8 40 02 andncc %g1, %g2, %g0 200bf90: 02 80 00 27 be 200c02c <_POSIX_signals_Post_switch_extension+0xc8> 200bf94: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 200bf98: 7f ff d8 c9 call 20022bc 200bf9c: a0 10 20 1b mov 0x1b, %l0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 200bfa0: 92 10 00 10 mov %l0, %o1 200bfa4: 94 10 20 00 clr %o2 200bfa8: 40 00 09 d9 call 200e70c <_POSIX_signals_Check_signal> 200bfac: 90 10 00 11 mov %l1, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200bfb0: 92 10 00 10 mov %l0, %o1 200bfb4: 90 10 00 11 mov %l1, %o0 200bfb8: 40 00 09 d5 call 200e70c <_POSIX_signals_Check_signal> 200bfbc: 94 10 20 01 mov 1, %o2 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200bfc0: a0 04 20 01 inc %l0 200bfc4: 80 a4 20 20 cmp %l0, 0x20 200bfc8: 12 bf ff f7 bne 200bfa4 <_POSIX_signals_Post_switch_extension+0x40> 200bfcc: 92 10 00 10 mov %l0, %o1 200bfd0: a0 10 20 01 mov 1, %l0 _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 ); 200bfd4: 92 10 00 10 mov %l0, %o1 200bfd8: 94 10 20 00 clr %o2 200bfdc: 40 00 09 cc call 200e70c <_POSIX_signals_Check_signal> 200bfe0: 90 10 00 11 mov %l1, %o0 _POSIX_signals_Check_signal( api, signo, true ); 200bfe4: 92 10 00 10 mov %l0, %o1 200bfe8: 90 10 00 11 mov %l1, %o0 200bfec: 40 00 09 c8 call 200e70c <_POSIX_signals_Check_signal> 200bff0: 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++ ) { 200bff4: a0 04 20 01 inc %l0 200bff8: 80 a4 20 1b cmp %l0, 0x1b 200bffc: 12 bf ff f7 bne 200bfd8 <_POSIX_signals_Post_switch_extension+0x74> 200c000: 92 10 00 10 mov %l0, %o1 * * 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 ); 200c004: 7f ff d8 aa call 20022ac 200c008: 01 00 00 00 nop 200c00c: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 200c010: c6 04 80 00 ld [ %l2 ], %g3 200c014: c2 04 60 d0 ld [ %l1 + 0xd0 ], %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 & 200c018: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 (api->signals_pending | _POSIX_signals_Pending)) ) { 200c01c: 82 10 c0 01 or %g3, %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 & 200c020: 80 a8 40 02 andncc %g1, %g2, %g0 200c024: 12 bf ff dd bne 200bf98 <_POSIX_signals_Post_switch_extension+0x34><== NEVER TAKEN 200c028: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200c02c: 7f ff d8 a4 call 20022bc 200c030: 81 e8 00 00 restore =============================================================================== 0200fb20 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 200fb20: 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 ) ) { 200fb24: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200fb28: 05 04 00 20 sethi %hi(0x10008000), %g2 200fb2c: 88 06 7f ff add %i1, -1, %g4 200fb30: 9a 08 40 02 and %g1, %g2, %o5 200fb34: 86 10 20 01 mov 1, %g3 200fb38: 80 a3 40 02 cmp %o5, %g2 200fb3c: 89 28 c0 04 sll %g3, %g4, %g4 200fb40: 02 80 00 25 be 200fbd4 <_POSIX_signals_Unblock_thread+0xb4> 200fb44: c4 06 21 6c ld [ %i0 + 0x16c ], %g2 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 200fb48: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 200fb4c: 80 a9 00 02 andncc %g4, %g2, %g0 200fb50: 02 80 00 1f be 200fbcc <_POSIX_signals_Unblock_thread+0xac> 200fb54: 05 04 00 00 sethi %hi(0x10000000), %g2 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 200fb58: 80 88 40 02 btst %g1, %g2 200fb5c: 02 80 00 11 be 200fba0 <_POSIX_signals_Unblock_thread+0x80> 200fb60: c6 2e 20 74 stb %g3, [ %i0 + 0x74 ] the_thread->Wait.return_code = EINTR; 200fb64: 84 10 20 04 mov 4, %g2 #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 200fb68: 80 88 60 08 btst 8, %g1 200fb6c: 02 80 00 18 be 200fbcc <_POSIX_signals_Unblock_thread+0xac><== NEVER TAKEN 200fb70: c4 26 20 34 st %g2, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200fb74: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200fb78: 80 a0 60 02 cmp %g1, 2 200fb7c: 02 80 00 36 be 200fc54 <_POSIX_signals_Unblock_thread+0x134><== ALWAYS TAKEN 200fb80: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 200fb84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200fb88: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200fb8c: b0 10 20 00 clr %i0 200fb90: 7f ff e0 ee call 2007f48 <_Thread_Clear_state> 200fb94: 92 12 63 f8 or %o1, 0x3f8, %o1 200fb98: 81 c7 e0 08 ret 200fb9c: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 200fba0: 80 a0 60 00 cmp %g1, 0 200fba4: 12 80 00 0a bne 200fbcc <_POSIX_signals_Unblock_thread+0xac><== NEVER TAKEN 200fba8: 03 00 80 73 sethi %hi(0x201cc00), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 200fbac: c2 00 61 dc ld [ %g1 + 0x1dc ], %g1 ! 201cddc <_ISR_Nest_level> 200fbb0: 80 a0 60 00 cmp %g1, 0 200fbb4: 02 80 00 06 be 200fbcc <_POSIX_signals_Unblock_thread+0xac> 200fbb8: 03 00 80 73 sethi %hi(0x201cc00), %g1 200fbbc: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 201ce00 <_Thread_Executing> 200fbc0: 80 a6 00 01 cmp %i0, %g1 200fbc4: 02 80 00 21 be 200fc48 <_POSIX_signals_Unblock_thread+0x128><== ALWAYS TAKEN 200fbc8: 03 00 80 73 sethi %hi(0x201cc00), %g1 _ISR_Signals_to_thread_executing = true; } } return false; } 200fbcc: 81 c7 e0 08 ret 200fbd0: 91 e8 20 00 restore %g0, 0, %o0 * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 200fbd4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200fbd8: 80 89 00 01 btst %g4, %g1 200fbdc: 22 80 00 12 be,a 200fc24 <_POSIX_signals_Unblock_thread+0x104> 200fbe0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 the_thread->Wait.return_code = EINTR; 200fbe4: 82 10 20 04 mov 4, %g1 200fbe8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 200fbec: 80 a6 a0 00 cmp %i2, 0 200fbf0: 02 80 00 11 be 200fc34 <_POSIX_signals_Unblock_thread+0x114> 200fbf4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 200fbf8: c4 06 80 00 ld [ %i2 ], %g2 200fbfc: c4 20 40 00 st %g2, [ %g1 ] 200fc00: c4 06 a0 04 ld [ %i2 + 4 ], %g2 200fc04: c4 20 60 04 st %g2, [ %g1 + 4 ] 200fc08: c4 06 a0 08 ld [ %i2 + 8 ], %g2 200fc0c: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 200fc10: 90 10 00 18 mov %i0, %o0 200fc14: 7f ff e4 04 call 2008c24 <_Thread_queue_Extract_with_proxy> 200fc18: b0 10 20 01 mov 1, %i0 return true; 200fc1c: 81 c7 e0 08 ret 200fc20: 81 e8 00 00 restore * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 200fc24: 80 a9 00 01 andncc %g4, %g1, %g0 200fc28: 12 bf ff f0 bne 200fbe8 <_POSIX_signals_Unblock_thread+0xc8> 200fc2c: 82 10 20 04 mov 4, %g1 200fc30: 30 bf ff e7 b,a 200fbcc <_POSIX_signals_Unblock_thread+0xac> the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 200fc34: 84 10 20 01 mov 1, %g2 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 200fc38: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 200fc3c: c0 20 60 08 clr [ %g1 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 200fc40: 10 bf ff f4 b 200fc10 <_POSIX_signals_Unblock_thread+0xf0> 200fc44: c4 20 60 04 st %g2, [ %g1 + 4 ] (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 200fc48: c6 28 62 98 stb %g3, [ %g1 + 0x298 ] 200fc4c: 81 c7 e0 08 ret 200fc50: 91 e8 20 00 restore %g0, 0, %o0 _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 200fc54: 7f ff e6 f2 call 200981c <_Watchdog_Remove> 200fc58: 90 06 20 48 add %i0, 0x48, %o0 200fc5c: 10 bf ff cb b 200fb88 <_POSIX_signals_Unblock_thread+0x68> 200fc60: 90 10 00 18 mov %i0, %o0 =============================================================================== 020063d8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 20063d8: 9d e3 bf 98 save %sp, -104, %sp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 20063dc: 03 00 80 70 sethi %hi(0x201c000), %g1 20063e0: 82 10 61 f0 or %g1, 0x1f0, %g1 ! 201c1f0 20063e4: e0 00 60 2c ld [ %g1 + 0x2c ], %l0 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 20063e8: 80 a4 20 00 cmp %l0, 0 20063ec: 02 80 00 1a be 2006454 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 20063f0: e4 00 60 28 ld [ %g1 + 0x28 ], %l2 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 20063f4: 80 a4 a0 00 cmp %l2, 0 20063f8: 02 80 00 17 be 2006454 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN 20063fc: a2 10 20 00 clr %l1 2006400: a6 07 bf fc add %fp, -4, %l3 return_value = rtems_task_create( 2006404: d0 04 00 00 ld [ %l0 ], %o0 2006408: d2 04 20 08 ld [ %l0 + 8 ], %o1 200640c: d4 04 20 04 ld [ %l0 + 4 ], %o2 2006410: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 2006414: d8 04 20 0c ld [ %l0 + 0xc ], %o4 2006418: 7f ff ff 6e call 20061d0 200641c: 9a 10 00 13 mov %l3, %o5 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 2006420: 80 a2 20 00 cmp %o0, 0 2006424: 12 80 00 0f bne 2006460 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> 2006428: 94 10 00 08 mov %o0, %o2 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 200642c: d0 07 bf fc ld [ %fp + -4 ], %o0 2006430: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 2006434: 40 00 00 0f call 2006470 2006438: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 200643c: 80 a2 20 00 cmp %o0, 0 2006440: 12 80 00 07 bne 200645c <_RTEMS_tasks_Initialize_user_tasks_body+0x84> 2006444: a2 04 60 01 inc %l1 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 2006448: 80 a4 80 11 cmp %l2, %l1 200644c: 18 bf ff ee bgu 2006404 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c><== NEVER TAKEN 2006450: a0 04 20 1c add %l0, 0x1c, %l0 2006454: 81 c7 e0 08 ret 2006458: 81 e8 00 00 restore id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 200645c: 94 10 00 08 mov %o0, %o2 2006460: 92 10 20 01 mov 1, %o1 2006464: 40 00 03 bd call 2007358 <_Internal_error_Occurred> 2006468: 90 10 20 01 mov 1, %o0 =============================================================================== 0200c70c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200c70c: 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 ]; 200c710: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 if ( !api ) 200c714: 80 a4 20 00 cmp %l0, 0 200c718: 02 80 00 1f be 200c794 <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN 200c71c: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200c720: 7f ff d6 e3 call 20022ac 200c724: 01 00 00 00 nop signal_set = asr->signals_posted; 200c728: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 200c72c: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 200c730: 7f ff d6 e3 call 20022bc 200c734: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200c738: 80 a4 60 00 cmp %l1, 0 200c73c: 32 80 00 04 bne,a 200c74c <_RTEMS_tasks_Post_switch_extension+0x40> 200c740: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200c744: 81 c7 e0 08 ret 200c748: 81 e8 00 00 restore return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200c74c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200c750: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200c754: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200c758: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200c75c: 94 10 00 12 mov %l2, %o2 200c760: 27 00 00 3f sethi %hi(0xfc00), %l3 200c764: 40 00 09 07 call 200eb80 200c768: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200c76c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 200c770: 9f c0 40 00 call %g1 200c774: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 200c778: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200c77c: 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; 200c780: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200c784: 92 14 e3 ff or %l3, 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; 200c788: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200c78c: 40 00 08 fd call 200eb80 200c790: 94 10 00 12 mov %l2, %o2 200c794: 81 c7 e0 08 ret 200c798: 81 e8 00 00 restore =============================================================================== 0200c630 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 200c630: c2 02 21 78 ld [ %o0 + 0x178 ], %g1 while (tvp) { 200c634: 80 a0 60 00 cmp %g1, 0 200c638: 22 80 00 0b be,a 200c664 <_RTEMS_tasks_Switch_extension+0x34> 200c63c: c2 02 61 78 ld [ %o1 + 0x178 ], %g1 tvp->tval = *tvp->ptr; 200c640: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->gval; 200c644: c6 00 60 08 ld [ %g1 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 200c648: c8 00 80 00 ld [ %g2 ], %g4 200c64c: c8 20 60 0c st %g4, [ %g1 + 0xc ] *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; 200c650: c2 00 40 00 ld [ %g1 ], %g1 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 200c654: 80 a0 60 00 cmp %g1, 0 200c658: 12 bf ff fa bne 200c640 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN 200c65c: c6 20 80 00 st %g3, [ %g2 ] tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 200c660: c2 02 61 78 ld [ %o1 + 0x178 ], %g1 while (tvp) { 200c664: 80 a0 60 00 cmp %g1, 0 200c668: 02 80 00 0a be 200c690 <_RTEMS_tasks_Switch_extension+0x60> 200c66c: 01 00 00 00 nop tvp->gval = *tvp->ptr; 200c670: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->tval; 200c674: c6 00 60 0c ld [ %g1 + 0xc ], %g3 tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; 200c678: c8 00 80 00 ld [ %g2 ], %g4 200c67c: c8 20 60 08 st %g4, [ %g1 + 8 ] *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; 200c680: c2 00 40 00 ld [ %g1 ], %g1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 200c684: 80 a0 60 00 cmp %g1, 0 200c688: 12 bf ff fa bne 200c670 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN 200c68c: c6 20 80 00 st %g3, [ %g2 ] 200c690: 81 c3 e0 08 retl =============================================================================== 02007710 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2007710: 9d e3 bf 98 save %sp, -104, %sp 2007714: 11 00 80 8a sethi %hi(0x2022800), %o0 2007718: 92 10 00 18 mov %i0, %o1 200771c: 90 12 22 a0 or %o0, 0x2a0, %o0 2007720: 40 00 08 06 call 2009738 <_Objects_Get> 2007724: 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 ) { 2007728: c2 07 bf fc ld [ %fp + -4 ], %g1 200772c: 80 a0 60 00 cmp %g1, 0 2007730: 12 80 00 16 bne 2007788 <_Rate_monotonic_Timeout+0x78> <== NEVER TAKEN 2007734: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2007738: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 200773c: 03 00 00 10 sethi %hi(0x4000), %g1 2007740: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2007744: 80 88 80 01 btst %g2, %g1 2007748: 22 80 00 08 be,a 2007768 <_Rate_monotonic_Timeout+0x58> 200774c: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 the_thread->Wait.id == the_period->Object.id ) { 2007750: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2007754: c2 04 20 08 ld [ %l0 + 8 ], %g1 2007758: 80 a0 80 01 cmp %g2, %g1 200775c: 02 80 00 19 be 20077c0 <_Rate_monotonic_Timeout+0xb0> 2007760: 13 04 00 ff sethi %hi(0x1003fc00), %o1 _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 ) { 2007764: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 2007768: 80 a0 60 01 cmp %g1, 1 200776c: 02 80 00 09 be 2007790 <_Rate_monotonic_Timeout+0x80> 2007770: 82 10 20 04 mov 4, %g1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2007774: c2 24 20 38 st %g1, [ %l0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2007778: 03 00 80 8b sethi %hi(0x2022c00), %g1 200777c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 2022c10 <_Thread_Dispatch_disable_level> 2007780: 84 00 bf ff add %g2, -1, %g2 2007784: c4 20 60 10 st %g2, [ %g1 + 0x10 ] 2007788: 81 c7 e0 08 ret 200778c: 81 e8 00 00 restore _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007790: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 2007794: 90 10 00 10 mov %l0, %o0 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007798: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 200779c: 7f ff fe 24 call 200702c <_Rate_monotonic_Initiate_statistics> 20077a0: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20077a4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20077a8: 92 04 20 10 add %l0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20077ac: c2 24 20 1c st %g1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20077b0: 11 00 80 8b sethi %hi(0x2022c00), %o0 20077b4: 40 00 10 02 call 200b7bc <_Watchdog_Insert> 20077b8: 90 12 20 f0 or %o0, 0xf0, %o0 ! 2022cf0 <_Watchdog_Ticks_chain> 20077bc: 30 bf ff ef b,a 2007778 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20077c0: 40 00 09 57 call 2009d1c <_Thread_Clear_state> 20077c4: 92 12 63 f8 or %o1, 0x3f8, %o1 the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 20077c8: 10 bf ff f5 b 200779c <_Rate_monotonic_Timeout+0x8c> 20077cc: 90 10 00 10 mov %l0, %o0 =============================================================================== 02007088 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2007088: 9d e3 bf a0 save %sp, -96, %sp uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 200708c: 03 00 80 8a sethi %hi(0x2022800), %g1 if ((!the_tod) || 2007090: 80 a6 20 00 cmp %i0, 0 2007094: 02 80 00 2e be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN 2007098: d2 00 61 d4 ld [ %g1 + 0x1d4 ], %o1 200709c: 11 00 03 d0 sethi %hi(0xf4000), %o0 20070a0: 40 00 5d bb call 201e78c <.udiv> 20070a4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 (the_tod->ticks >= ticks_per_second) || 20070a8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20070ac: 80 a2 00 01 cmp %o0, %g1 20070b0: 08 80 00 27 bleu 200714c <_TOD_Validate+0xc4> 20070b4: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 20070b8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20070bc: 80 a0 60 3b cmp %g1, 0x3b 20070c0: 18 80 00 23 bgu 200714c <_TOD_Validate+0xc4> 20070c4: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 20070c8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20070cc: 80 a0 60 3b cmp %g1, 0x3b 20070d0: 18 80 00 1f bgu 200714c <_TOD_Validate+0xc4> 20070d4: 01 00 00 00 nop (the_tod->hour >= TOD_HOURS_PER_DAY) || 20070d8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20070dc: 80 a0 60 17 cmp %g1, 0x17 20070e0: 18 80 00 1b bgu 200714c <_TOD_Validate+0xc4> 20070e4: 01 00 00 00 nop (the_tod->month == 0) || 20070e8: c2 06 20 04 ld [ %i0 + 4 ], %g1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 20070ec: 80 a0 60 00 cmp %g1, 0 20070f0: 02 80 00 17 be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN 20070f4: 80 a0 60 0c cmp %g1, 0xc 20070f8: 18 80 00 15 bgu 200714c <_TOD_Validate+0xc4> 20070fc: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 2007100: c4 06 00 00 ld [ %i0 ], %g2 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2007104: 80 a0 a7 c3 cmp %g2, 0x7c3 2007108: 08 80 00 11 bleu 200714c <_TOD_Validate+0xc4> 200710c: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 2007110: c6 06 20 08 ld [ %i0 + 8 ], %g3 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2007114: 80 a0 e0 00 cmp %g3, 0 2007118: 02 80 00 0d be 200714c <_TOD_Validate+0xc4> <== NEVER TAKEN 200711c: 80 88 a0 03 btst 3, %g2 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2007120: 32 80 00 0d bne,a 2007154 <_TOD_Validate+0xcc> 2007124: 83 28 60 02 sll %g1, 2, %g1 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2007128: 82 00 60 0d add %g1, 0xd, %g1 200712c: 05 00 80 84 sethi %hi(0x2021000), %g2 2007130: 83 28 60 02 sll %g1, 2, %g1 2007134: 84 10 a1 1c or %g2, 0x11c, %g2 2007138: c2 00 80 01 ld [ %g2 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 200713c: 80 a0 40 03 cmp %g1, %g3 2007140: b0 60 3f ff subx %g0, -1, %i0 2007144: 81 c7 e0 08 ret 2007148: 81 e8 00 00 restore if ( the_tod->day > days_in_month ) return false; return true; } 200714c: 81 c7 e0 08 ret 2007150: 91 e8 20 00 restore %g0, 0, %o0 return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2007154: 05 00 80 84 sethi %hi(0x2021000), %g2 2007158: 84 10 a1 1c or %g2, 0x11c, %g2 ! 202111c <_TOD_Days_per_month> 200715c: 10 bf ff f8 b 200713c <_TOD_Validate+0xb4> 2007160: c2 00 80 01 ld [ %g2 + %g1 ], %g1 =============================================================================== 02007d38 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007d38: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 2007d3c: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 2007d40: 40 00 04 90 call 2008f80 <_Thread_Set_transient> 2007d44: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 2007d48: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2007d4c: 80 a0 40 19 cmp %g1, %i1 2007d50: 02 80 00 05 be 2007d64 <_Thread_Change_priority+0x2c> 2007d54: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 2007d58: 92 10 00 19 mov %i1, %o1 2007d5c: 40 00 04 0d call 2008d90 <_Thread_Set_priority> 2007d60: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 2007d64: 7f ff e9 52 call 20022ac 2007d68: 01 00 00 00 nop 2007d6c: b0 10 00 08 mov %o0, %i0 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 2007d70: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 2007d74: 80 a4 a0 04 cmp %l2, 4 2007d78: 02 80 00 18 be 2007dd8 <_Thread_Change_priority+0xa0> 2007d7c: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2007d80: 02 80 00 0b be 2007dac <_Thread_Change_priority+0x74> <== ALWAYS TAKEN 2007d84: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 2007d88: 7f ff e9 4d call 20022bc <== NOT EXECUTED 2007d8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007d90: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 2007d94: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 2007d98: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 2007d9c: 32 80 00 0d bne,a 2007dd0 <_Thread_Change_priority+0x98> <== NOT EXECUTED 2007da0: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 2007da4: 81 c7 e0 08 ret 2007da8: 81 e8 00 00 restore */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2007dac: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 2007db0: 7f ff e9 43 call 20022bc 2007db4: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007db8: 03 00 00 ef sethi %hi(0x3bc00), %g1 2007dbc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2007dc0: 80 8c 80 01 btst %l2, %g1 2007dc4: 02 bf ff f8 be 2007da4 <_Thread_Change_priority+0x6c> 2007dc8: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2007dcc: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 2007dd0: 40 00 03 c0 call 2008cd0 <_Thread_queue_Requeue> 2007dd4: 93 e8 00 10 restore %g0, %l0, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 2007dd8: 12 80 00 14 bne 2007e28 <_Thread_Change_priority+0xf0> <== NEVER TAKEN 2007ddc: 23 00 80 73 sethi %hi(0x201cc00), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007de0: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 2007de4: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 2007de8: c6 10 40 00 lduh [ %g1 ], %g3 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2007dec: c0 24 20 10 clr [ %l0 + 0x10 ] 2007df0: 84 10 c0 02 or %g3, %g2, %g2 2007df4: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 2007df8: c4 14 61 f4 lduh [ %l1 + 0x1f4 ], %g2 2007dfc: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 2007e00: 80 8e a0 ff btst 0xff, %i2 2007e04: 82 10 80 01 or %g2, %g1, %g1 2007e08: c2 34 61 f4 sth %g1, [ %l1 + 0x1f4 ] 2007e0c: 02 80 00 48 be 2007f2c <_Thread_Change_priority+0x1f4> 2007e10: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2007e14: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2007e18: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 2007e1c: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 2007e20: e0 20 a0 04 st %l0, [ %g2 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 2007e24: c4 24 00 00 st %g2, [ %l0 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 2007e28: 7f ff e9 25 call 20022bc 2007e2c: 90 10 00 18 mov %i0, %o0 2007e30: 7f ff e9 1f call 20022ac 2007e34: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 2007e38: c2 14 61 f4 lduh [ %l1 + 0x1f4 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 2007e3c: 05 00 80 73 sethi %hi(0x201cc00), %g2 2007e40: 83 28 60 10 sll %g1, 0x10, %g1 2007e44: da 00 a0 94 ld [ %g2 + 0x94 ], %o5 2007e48: 85 30 60 10 srl %g1, 0x10, %g2 2007e4c: 80 a0 a0 ff cmp %g2, 0xff 2007e50: 08 80 00 27 bleu 2007eec <_Thread_Change_priority+0x1b4> 2007e54: 07 00 80 6c sethi %hi(0x201b000), %g3 2007e58: 83 30 60 18 srl %g1, 0x18, %g1 2007e5c: 86 10 e1 f0 or %g3, 0x1f0, %g3 2007e60: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007e64: 09 00 80 73 sethi %hi(0x201cc00), %g4 2007e68: 85 28 a0 10 sll %g2, 0x10, %g2 2007e6c: 88 11 22 70 or %g4, 0x270, %g4 2007e70: 83 30 a0 0f srl %g2, 0xf, %g1 2007e74: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 2007e78: 83 28 60 10 sll %g1, 0x10, %g1 2007e7c: 89 30 60 10 srl %g1, 0x10, %g4 2007e80: 80 a1 20 ff cmp %g4, 0xff 2007e84: 18 80 00 28 bgu 2007f24 <_Thread_Change_priority+0x1ec> 2007e88: 83 30 60 18 srl %g1, 0x18, %g1 2007e8c: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2007e90: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007e94: 85 30 a0 0c srl %g2, 0xc, %g2 2007e98: 83 28 60 10 sll %g1, 0x10, %g1 2007e9c: 83 30 60 10 srl %g1, 0x10, %g1 2007ea0: 82 00 40 02 add %g1, %g2, %g1 2007ea4: 85 28 60 04 sll %g1, 4, %g2 2007ea8: 83 28 60 02 sll %g1, 2, %g1 2007eac: 82 20 80 01 sub %g2, %g1, %g1 2007eb0: c2 03 40 01 ld [ %o5 + %g1 ], %g1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 2007eb4: 05 00 80 73 sethi %hi(0x201cc00), %g2 2007eb8: c4 00 a2 00 ld [ %g2 + 0x200 ], %g2 ! 201ce00 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007ebc: 07 00 80 73 sethi %hi(0x201cc00), %g3 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 2007ec0: 80 a0 40 02 cmp %g1, %g2 2007ec4: 02 80 00 08 be 2007ee4 <_Thread_Change_priority+0x1ac> 2007ec8: c2 20 e1 d0 st %g1, [ %g3 + 0x1d0 ] _Thread_Executing->is_preemptible ) 2007ecc: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 2007ed0: 80 a0 60 00 cmp %g1, 0 2007ed4: 02 80 00 04 be 2007ee4 <_Thread_Change_priority+0x1ac> 2007ed8: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 2007edc: 03 00 80 73 sethi %hi(0x201cc00), %g1 2007ee0: c4 28 62 10 stb %g2, [ %g1 + 0x210 ] ! 201ce10 <_Context_Switch_necessary> _ISR_Enable( level ); 2007ee4: 7f ff e8 f6 call 20022bc 2007ee8: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 2007eec: 86 10 e1 f0 or %g3, 0x1f0, %g3 2007ef0: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007ef4: 09 00 80 73 sethi %hi(0x201cc00), %g4 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 2007ef8: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007efc: 88 11 22 70 or %g4, 0x270, %g4 2007f00: 85 28 a0 10 sll %g2, 0x10, %g2 2007f04: 83 30 a0 0f srl %g2, 0xf, %g1 2007f08: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 2007f0c: 83 28 60 10 sll %g1, 0x10, %g1 2007f10: 89 30 60 10 srl %g1, 0x10, %g4 2007f14: 80 a1 20 ff cmp %g4, 0xff 2007f18: 28 bf ff de bleu,a 2007e90 <_Thread_Change_priority+0x158> 2007f1c: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2007f20: 83 30 60 18 srl %g1, 0x18, %g1 2007f24: 10 bf ff dc b 2007e94 <_Thread_Change_priority+0x15c> 2007f28: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007f2c: 84 00 60 04 add %g1, 4, %g2 2007f30: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 2007f34: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 2007f38: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007f3c: c4 24 20 04 st %g2, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2007f40: 10 bf ff ba b 2007e28 <_Thread_Change_priority+0xf0> 2007f44: e0 20 80 00 st %l0, [ %g2 ] =============================================================================== 02007f48 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 2007f48: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2007f4c: 7f ff e8 d8 call 20022ac 2007f50: a0 10 00 18 mov %i0, %l0 2007f54: b0 10 00 08 mov %o0, %i0 current_state = the_thread->current_state; 2007f58: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & state ) { 2007f5c: 80 8e 40 01 btst %i1, %g1 2007f60: 02 80 00 06 be 2007f78 <_Thread_Clear_state+0x30> 2007f64: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 2007f68: b2 28 40 19 andn %g1, %i1, %i1 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 2007f6c: 80 a6 60 00 cmp %i1, 0 2007f70: 02 80 00 04 be 2007f80 <_Thread_Clear_state+0x38> 2007f74: f2 24 20 10 st %i1, [ %l0 + 0x10 ] the_thread->current_priority == 0 ) _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 2007f78: 7f ff e8 d1 call 20022bc 2007f7c: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007f80: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 2007f84: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 2007f88: c8 10 80 00 lduh [ %g2 ], %g4 2007f8c: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 2007f90: 86 11 00 03 or %g4, %g3, %g3 2007f94: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007f98: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 2007f9c: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 2007fa0: c4 24 00 00 st %g2, [ %l0 ] 2007fa4: 07 00 80 73 sethi %hi(0x201cc00), %g3 old_last_node = the_chain->last; 2007fa8: c4 00 60 08 ld [ %g1 + 8 ], %g2 2007fac: da 10 e1 f4 lduh [ %g3 + 0x1f4 ], %o5 the_chain->last = the_node; 2007fb0: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007fb4: c4 24 20 04 st %g2, [ %l0 + 4 ] 2007fb8: 82 13 40 04 or %o5, %g4, %g1 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2007fbc: e0 20 80 00 st %l0, [ %g2 ] 2007fc0: c2 30 e1 f4 sth %g1, [ %g3 + 0x1f4 ] _ISR_Flash( level ); 2007fc4: 7f ff e8 be call 20022bc 2007fc8: 01 00 00 00 nop 2007fcc: 7f ff e8 b8 call 20022ac 2007fd0: 01 00 00 00 nop * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 2007fd4: 03 00 80 73 sethi %hi(0x201cc00), %g1 2007fd8: c6 00 61 d0 ld [ %g1 + 0x1d0 ], %g3 ! 201cdd0 <_Thread_Heir> 2007fdc: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 2007fe0: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 2007fe4: 80 a0 80 03 cmp %g2, %g3 2007fe8: 1a bf ff e4 bcc 2007f78 <_Thread_Clear_state+0x30> 2007fec: 07 00 80 73 sethi %hi(0x201cc00), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2007ff0: c6 00 e2 00 ld [ %g3 + 0x200 ], %g3 ! 201ce00 <_Thread_Executing> * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 2007ff4: e0 20 61 d0 st %l0, [ %g1 + 0x1d0 ] if ( _Thread_Executing->is_preemptible || 2007ff8: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 2007ffc: 80 a0 60 00 cmp %g1, 0 2008000: 32 80 00 05 bne,a 2008014 <_Thread_Clear_state+0xcc> 2008004: 84 10 20 01 mov 1, %g2 2008008: 80 a0 a0 00 cmp %g2, 0 200800c: 12 bf ff db bne 2007f78 <_Thread_Clear_state+0x30> <== ALWAYS TAKEN 2008010: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 2008014: 03 00 80 73 sethi %hi(0x201cc00), %g1 2008018: c4 28 62 10 stb %g2, [ %g1 + 0x210 ] ! 201ce10 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 200801c: 7f ff e8 a8 call 20022bc 2008020: 81 e8 00 00 restore =============================================================================== 020081d0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 20081d0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 20081d4: 90 10 00 18 mov %i0, %o0 20081d8: 40 00 00 84 call 20083e8 <_Thread_Get> 20081dc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20081e0: c2 07 bf fc ld [ %fp + -4 ], %g1 20081e4: 80 a0 60 00 cmp %g1, 0 20081e8: 12 80 00 08 bne 2008208 <_Thread_Delay_ended+0x38> <== NEVER TAKEN 20081ec: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 20081f0: 7f ff ff 56 call 2007f48 <_Thread_Clear_state> 20081f4: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 20081f8: 03 00 80 73 sethi %hi(0x201cc00), %g1 20081fc: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 201cd40 <_Thread_Dispatch_disable_level> 2008200: 84 00 bf ff add %g2, -1, %g2 2008204: c4 20 61 40 st %g2, [ %g1 + 0x140 ] 2008208: 81 c7 e0 08 ret 200820c: 81 e8 00 00 restore =============================================================================== 02008210 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008210: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 2008214: 2b 00 80 73 sethi %hi(0x201cc00), %l5 _ISR_Disable( level ); 2008218: 7f ff e8 25 call 20022ac 200821c: e0 05 62 00 ld [ %l5 + 0x200 ], %l0 ! 201ce00 <_Thread_Executing> while ( _Context_Switch_necessary == true ) { 2008220: 2d 00 80 73 sethi %hi(0x201cc00), %l6 2008224: c2 0d a2 10 ldub [ %l6 + 0x210 ], %g1 ! 201ce10 <_Context_Switch_necessary> 2008228: 80 a0 60 00 cmp %g1, 0 200822c: 02 80 00 50 be 200836c <_Thread_Dispatch+0x15c> 2008230: 33 00 80 73 sethi %hi(0x201cc00), %i1 2008234: 25 00 80 73 sethi %hi(0x201cc00), %l2 2008238: 35 00 80 73 sethi %hi(0x201cc00), %i2 200823c: a4 14 a2 08 or %l2, 0x208, %l2 #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; 2008240: 31 00 80 73 sethi %hi(0x201cc00), %i0 #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 ); 2008244: 2f 00 80 73 sethi %hi(0x201cc00), %l7 2008248: 03 00 80 73 sethi %hi(0x201cc00), %g1 200824c: ac 15 a2 10 or %l6, 0x210, %l6 2008250: aa 15 62 00 or %l5, 0x200, %l5 2008254: b2 16 61 d0 or %i1, 0x1d0, %i1 2008258: b4 16 a1 cc or %i2, 0x1cc, %i2 200825c: b0 16 20 98 or %i0, 0x98, %i0 2008260: ae 15 e1 c8 or %l7, 0x1c8, %l7 2008264: b6 10 61 40 or %g1, 0x140, %i3 2008268: a8 07 bf f8 add %fp, -8, %l4 200826c: a6 07 bf f0 add %fp, -16, %l3 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2008270: b8 10 20 01 mov 1, %i4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2008274: 10 80 00 34 b 2008344 <_Thread_Dispatch+0x134> 2008278: ba 10 00 12 mov %l2, %i5 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; _ISR_Enable( level ); 200827c: 7f ff e8 10 call 20022bc 2008280: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2008284: 40 00 12 5f call 200cc00 <_TOD_Get_uptime> 2008288: 90 10 00 14 mov %l4, %o0 _Timestamp_Subtract( 200828c: 90 10 00 1d mov %i5, %o0 2008290: 92 10 00 14 mov %l4, %o1 2008294: 40 00 04 21 call 2009318 <_Timespec_Subtract> 2008298: 94 10 00 13 mov %l3, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 200829c: 92 10 00 13 mov %l3, %o1 20082a0: 40 00 04 05 call 20092b4 <_Timespec_Add_to> 20082a4: 90 04 20 84 add %l0, 0x84, %o0 _Thread_Time_of_last_context_switch = uptime; 20082a8: c4 07 bf f8 ld [ %fp + -8 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 20082ac: c2 06 80 00 ld [ %i2 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 20082b0: c4 24 80 00 st %g2, [ %l2 ] 20082b4: c4 07 bf fc ld [ %fp + -4 ], %g2 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 20082b8: 90 10 00 10 mov %l0, %o0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 20082bc: c4 24 a0 04 st %g2, [ %l2 + 4 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 20082c0: 80 a0 60 00 cmp %g1, 0 20082c4: 02 80 00 06 be 20082dc <_Thread_Dispatch+0xcc> <== NEVER TAKEN 20082c8: 92 10 00 11 mov %l1, %o1 executing->libc_reent = *_Thread_libc_reent; 20082cc: c4 00 40 00 ld [ %g1 ], %g2 20082d0: c4 24 21 64 st %g2, [ %l0 + 0x164 ] *_Thread_libc_reent = heir->libc_reent; 20082d4: c4 04 61 64 ld [ %l1 + 0x164 ], %g2 20082d8: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 20082dc: 40 00 04 d1 call 2009620 <_User_extensions_Thread_switch> 20082e0: 01 00 00 00 nop if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 20082e4: 92 04 60 d8 add %l1, 0xd8, %o1 20082e8: 40 00 06 22 call 2009b70 <_CPU_Context_switch> 20082ec: 90 04 20 d8 add %l0, 0xd8, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 20082f0: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 20082f4: 80 a0 60 00 cmp %g1, 0 20082f8: 02 80 00 0d be 200832c <_Thread_Dispatch+0x11c> 20082fc: 01 00 00 00 nop 2008300: d0 05 c0 00 ld [ %l7 ], %o0 2008304: 80 a4 00 08 cmp %l0, %o0 2008308: 02 80 00 09 be 200832c <_Thread_Dispatch+0x11c> 200830c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008310: 02 80 00 04 be 2008320 <_Thread_Dispatch+0x110> 2008314: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008318: 40 00 05 dc call 2009a88 <_CPU_Context_save_fp> 200831c: 90 02 21 60 add %o0, 0x160, %o0 _Context_Restore_fp( &executing->fp_context ); 2008320: 40 00 05 f7 call 2009afc <_CPU_Context_restore_fp> 2008324: 90 04 21 60 add %l0, 0x160, %o0 _Thread_Allocated_fp = executing; 2008328: e0 25 c0 00 st %l0, [ %l7 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 200832c: 7f ff e7 e0 call 20022ac 2008330: e0 05 40 00 ld [ %l5 ], %l0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2008334: c2 0d 80 00 ldub [ %l6 ], %g1 2008338: 80 a0 60 00 cmp %g1, 0 200833c: 02 80 00 0d be 2008370 <_Thread_Dispatch+0x160> 2008340: 03 00 80 73 sethi %hi(0x201cc00), %g1 heir = _Thread_Heir; 2008344: e2 06 40 00 ld [ %i1 ], %l1 _Thread_Dispatch_disable_level = 1; 2008348: f8 26 c0 00 st %i4, [ %i3 ] _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 200834c: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 2008350: c0 2d 80 00 clrb [ %l6 ] _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 2008354: 80 a0 60 01 cmp %g1, 1 2008358: 12 bf ff c9 bne 200827c <_Thread_Dispatch+0x6c> 200835c: e2 25 40 00 st %l1, [ %l5 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008360: c2 06 00 00 ld [ %i0 ], %g1 2008364: 10 bf ff c6 b 200827c <_Thread_Dispatch+0x6c> 2008368: c2 24 60 78 st %g1, [ %l1 + 0x78 ] executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 200836c: 03 00 80 73 sethi %hi(0x201cc00), %g1 2008370: c0 20 61 40 clr [ %g1 + 0x140 ] ! 201cd40 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 2008374: 7f ff e7 d2 call 20022bc 2008378: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 200837c: 03 00 80 73 sethi %hi(0x201cc00), %g1 2008380: c2 00 61 e4 ld [ %g1 + 0x1e4 ], %g1 ! 201cde4 <_Thread_Do_post_task_switch_extension> 2008384: 80 a0 60 00 cmp %g1, 0 2008388: 12 80 00 06 bne 20083a0 <_Thread_Dispatch+0x190> 200838c: 01 00 00 00 nop executing->do_post_task_switch_extension ) { 2008390: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1 2008394: 80 a0 60 00 cmp %g1, 0 2008398: 02 80 00 04 be 20083a8 <_Thread_Dispatch+0x198> 200839c: 01 00 00 00 nop executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 20083a0: 7f ff f9 64 call 2006930 <_API_extensions_Run_postswitch> 20083a4: c0 2c 20 74 clrb [ %l0 + 0x74 ] 20083a8: 81 c7 e0 08 ret 20083ac: 81 e8 00 00 restore =============================================================================== 0200f008 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200f008: 03 00 80 73 sethi %hi(0x201cc00), %g1 200f00c: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 201ce00 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200f010: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200f014: 80 a0 a0 00 cmp %g2, 0 200f018: 12 80 00 0b bne 200f044 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 200f01c: 84 10 20 01 mov 1, %g2 200f020: 05 00 80 73 sethi %hi(0x201cc00), %g2 200f024: c4 00 a1 d0 ld [ %g2 + 0x1d0 ], %g2 ! 201cdd0 <_Thread_Heir> 200f028: 80 a0 40 02 cmp %g1, %g2 200f02c: 02 80 00 0b be 200f058 <_Thread_Evaluate_mode+0x50> 200f030: 01 00 00 00 nop ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 200f034: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 200f038: 80 a0 60 00 cmp %g1, 0 200f03c: 02 80 00 07 be 200f058 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 200f040: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 200f044: 03 00 80 73 sethi %hi(0x201cc00), %g1 200f048: 90 10 20 01 mov 1, %o0 200f04c: c4 28 62 10 stb %g2, [ %g1 + 0x210 ] return true; 200f050: 81 c3 e0 08 retl 200f054: 01 00 00 00 nop } return false; } 200f058: 81 c3 e0 08 retl 200f05c: 90 10 20 00 clr %o0 ! 0 =============================================================================== 0200f060 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200f060: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200f064: 03 00 80 73 sethi %hi(0x201cc00), %g1 200f068: e0 00 62 00 ld [ %g1 + 0x200 ], %l0 ! 201ce00 <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 200f06c: 3f 00 80 3c sethi %hi(0x200f000), %i7 200f070: be 17 e0 60 or %i7, 0x60, %i7 ! 200f060 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200f074: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200f078: 7f ff cc 91 call 20022bc 200f07c: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200f080: 03 00 80 72 sethi %hi(0x201c800), %g1 doneConstructors = 1; 200f084: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200f088: e4 08 61 f8 ldub [ %g1 + 0x1f8 ], %l2 doneConstructors = 1; 200f08c: c4 28 61 f8 stb %g2, [ %g1 + 0x1f8 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200f090: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 200f094: 80 a0 60 00 cmp %g1, 0 200f098: 02 80 00 0b be 200f0c4 <_Thread_Handler+0x64> 200f09c: 23 00 80 73 sethi %hi(0x201cc00), %l1 #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 ); 200f0a0: d0 04 61 c8 ld [ %l1 + 0x1c8 ], %o0 ! 201cdc8 <_Thread_Allocated_fp> 200f0a4: 80 a4 00 08 cmp %l0, %o0 200f0a8: 02 80 00 07 be 200f0c4 <_Thread_Handler+0x64> 200f0ac: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200f0b0: 22 80 00 05 be,a 200f0c4 <_Thread_Handler+0x64> 200f0b4: e0 24 61 c8 st %l0, [ %l1 + 0x1c8 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200f0b8: 7f ff ea 74 call 2009a88 <_CPU_Context_save_fp> 200f0bc: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200f0c0: e0 24 61 c8 st %l0, [ %l1 + 0x1c8 ] /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 200f0c4: 7f ff e8 d9 call 2009428 <_User_extensions_Thread_begin> 200f0c8: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200f0cc: 7f ff e4 b9 call 20083b0 <_Thread_Enable_dispatch> 200f0d0: a5 2c a0 18 sll %l2, 0x18, %l2 /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 200f0d4: 80 a4 a0 00 cmp %l2, 0 200f0d8: 02 80 00 0f be 200f114 <_Thread_Handler+0xb4> 200f0dc: 01 00 00 00 nop INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200f0e0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200f0e4: 80 a0 60 00 cmp %g1, 0 200f0e8: 22 80 00 12 be,a 200f130 <_Thread_Handler+0xd0> 200f0ec: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 200f0f0: 80 a0 60 01 cmp %g1, 1 200f0f4: 22 80 00 13 be,a 200f140 <_Thread_Handler+0xe0> <== ALWAYS TAKEN 200f0f8: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 200f0fc: 7f ff e8 df call 2009478 <_User_extensions_Thread_exitted> 200f100: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200f104: 90 10 20 00 clr %o0 200f108: 92 10 20 01 mov 1, %o1 200f10c: 7f ff e0 93 call 2007358 <_Internal_error_Occurred> 200f110: 94 10 20 06 mov 6, %o2 * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 200f114: 40 00 34 07 call 201c130 <_init> 200f118: 01 00 00 00 nop } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200f11c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200f120: 80 a0 60 00 cmp %g1, 0 200f124: 12 bf ff f4 bne 200f0f4 <_Thread_Handler+0x94> 200f128: 80 a0 60 01 cmp %g1, 1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200f12c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200f130: 9f c0 40 00 call %g1 200f134: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200f138: 10 bf ff f1 b 200f0fc <_Thread_Handler+0x9c> 200f13c: d0 24 20 28 st %o0, [ %l0 + 0x28 ] ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 200f140: 9f c0 40 00 call %g1 200f144: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 200f148: 10 bf ff ed b 200f0fc <_Thread_Handler+0x9c> 200f14c: d0 24 20 28 st %o0, [ %l0 + 0x28 ] =============================================================================== 02008494 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008494: 9d e3 bf a0 save %sp, -96, %sp 2008498: 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; 200849c: c0 26 61 68 clr [ %i1 + 0x168 ] 20084a0: c0 26 61 6c clr [ %i1 + 0x16c ] 20084a4: c0 26 61 70 clr [ %i1 + 0x170 ] extensions_area = NULL; the_thread->libc_reent = NULL; 20084a8: c0 26 61 64 clr [ %i1 + 0x164 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20084ac: e0 00 40 00 ld [ %g1 ], %l0 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 20084b0: 80 a6 a0 00 cmp %i2, 0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20084b4: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 20084b8: 02 80 00 82 be 20086c0 <_Thread_Initialize+0x22c> 20084bc: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 20084c0: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] 20084c4: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 20084c8: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 20084cc: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 20084d0: 80 8f 20 ff btst 0xff, %i4 20084d4: 82 10 20 00 clr %g1 20084d8: 12 80 00 56 bne 2008630 <_Thread_Initialize+0x19c> 20084dc: b4 10 20 00 clr %i2 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 20084e0: 39 00 80 73 sethi %hi(0x201cc00), %i4 20084e4: c4 07 21 e0 ld [ %i4 + 0x1e0 ], %g2 ! 201cde0 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 20084e8: c2 26 60 cc st %g1, [ %i1 + 0xcc ] 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; 20084ec: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20084f0: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 20084f4: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 20084f8: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 20084fc: 80 a0 a0 00 cmp %g2, 0 2008500: 12 80 00 5c bne 2008670 <_Thread_Initialize+0x1dc> 2008504: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 2008508: c0 26 61 74 clr [ %i1 + 0x174 ] 200850c: b6 10 20 00 clr %i3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2008510: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008514: e4 2e 60 ac stb %l2, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2008518: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 200851c: 80 a4 60 02 cmp %l1, 2 2008520: 12 80 00 05 bne 2008534 <_Thread_Initialize+0xa0> 2008524: e2 26 60 b0 st %l1, [ %i1 + 0xb0 ] 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; 2008528: 03 00 80 73 sethi %hi(0x201cc00), %g1 200852c: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 201cc98 <_Thread_Ticks_per_timeslice> 2008530: c2 26 60 78 st %g1, [ %i1 + 0x78 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008534: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008538: 92 10 00 1d mov %i5, %o1 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200853c: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2008540: 82 10 20 01 mov 1, %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008544: 90 10 00 19 mov %i1, %o0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2008548: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 200854c: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2008550: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 2008554: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008558: 40 00 02 0e call 2008d90 <_Thread_Set_priority> 200855c: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008560: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 2008564: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2008568: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200856c: e0 26 60 0c st %l0, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008570: f2 20 80 01 st %i1, [ %g2 + %g1 ] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 2008574: c0 26 60 84 clr [ %i1 + 0x84 ] 2008578: c0 26 60 88 clr [ %i1 + 0x88 ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 200857c: 90 10 00 19 mov %i1, %o0 2008580: 40 00 03 e5 call 2009514 <_User_extensions_Thread_create> 2008584: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2008588: 80 8a 20 ff btst 0xff, %o0 200858c: 12 80 00 27 bne 2008628 <_Thread_Initialize+0x194> 2008590: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 2008594: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 2008598: 80 a2 20 00 cmp %o0, 0 200859c: 22 80 00 05 be,a 20085b0 <_Thread_Initialize+0x11c> 20085a0: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 _Workspace_Free( the_thread->libc_reent ); 20085a4: 40 00 05 16 call 20099fc <_Workspace_Free> 20085a8: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 20085ac: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 20085b0: 80 a2 20 00 cmp %o0, 0 20085b4: 22 80 00 05 be,a 20085c8 <_Thread_Initialize+0x134> 20085b8: d0 06 61 6c ld [ %i1 + 0x16c ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 20085bc: 40 00 05 10 call 20099fc <_Workspace_Free> 20085c0: 01 00 00 00 nop failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 20085c4: d0 06 61 6c ld [ %i1 + 0x16c ], %o0 20085c8: 80 a2 20 00 cmp %o0, 0 20085cc: 22 80 00 05 be,a 20085e0 <_Thread_Initialize+0x14c> 20085d0: d0 06 61 70 ld [ %i1 + 0x170 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 20085d4: 40 00 05 0a call 20099fc <_Workspace_Free> 20085d8: 01 00 00 00 nop failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 20085dc: d0 06 61 70 ld [ %i1 + 0x170 ], %o0 20085e0: 80 a2 20 00 cmp %o0, 0 20085e4: 02 80 00 05 be 20085f8 <_Thread_Initialize+0x164> <== ALWAYS TAKEN 20085e8: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 20085ec: 40 00 05 04 call 20099fc <_Workspace_Free> <== NOT EXECUTED 20085f0: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 20085f4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 20085f8: 02 80 00 05 be 200860c <_Thread_Initialize+0x178> 20085fc: 80 a6 a0 00 cmp %i2, 0 (void) _Workspace_Free( extensions_area ); 2008600: 40 00 04 ff call 20099fc <_Workspace_Free> 2008604: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2008608: 80 a6 a0 00 cmp %i2, 0 200860c: 02 80 00 05 be 2008620 <_Thread_Initialize+0x18c> 2008610: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( fp_area ); 2008614: 40 00 04 fa call 20099fc <_Workspace_Free> 2008618: 90 10 00 1a mov %i2, %o0 #endif _Thread_Stack_Free( the_thread ); 200861c: 90 10 00 19 mov %i1, %o0 2008620: 40 00 02 97 call 200907c <_Thread_Stack_Free> 2008624: b0 10 20 00 clr %i0 return false; } 2008628: 81 c7 e0 08 ret 200862c: 81 e8 00 00 restore /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2008630: 40 00 04 ea call 20099d8 <_Workspace_Allocate> 2008634: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008638: b6 10 20 00 clr %i3 200863c: b4 92 20 00 orcc %o0, 0, %i2 2008640: 02 bf ff d5 be 2008594 <_Thread_Initialize+0x100> 2008644: 82 10 00 1a mov %i2, %g1 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008648: 39 00 80 73 sethi %hi(0x201cc00), %i4 200864c: c4 07 21 e0 ld [ %i4 + 0x1e0 ], %g2 ! 201cde0 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 2008650: c2 26 60 cc st %g1, [ %i1 + 0xcc ] 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; 2008654: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008658: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200865c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2008660: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008664: 80 a0 a0 00 cmp %g2, 0 2008668: 02 bf ff a8 be 2008508 <_Thread_Initialize+0x74> 200866c: c0 26 60 6c clr [ %i1 + 0x6c ] extensions_area = _Workspace_Allocate( 2008670: 84 00 a0 01 inc %g2 2008674: 40 00 04 d9 call 20099d8 <_Workspace_Allocate> 2008678: 91 28 a0 02 sll %g2, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200867c: b6 92 20 00 orcc %o0, 0, %i3 2008680: 02 bf ff c5 be 2008594 <_Thread_Initialize+0x100> 2008684: c8 07 21 e0 ld [ %i4 + 0x1e0 ], %g4 goto failed; } the_thread->extensions = (void **) extensions_area; 2008688: f6 26 61 74 st %i3, [ %i1 + 0x174 ] 200868c: 86 10 00 1b mov %i3, %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++ ) 2008690: 84 10 20 00 clr %g2 2008694: 10 80 00 03 b 20086a0 <_Thread_Initialize+0x20c> 2008698: 82 10 20 00 clr %g1 200869c: c6 06 61 74 ld [ %i1 + 0x174 ], %g3 the_thread->extensions[i] = NULL; 20086a0: 85 28 a0 02 sll %g2, 2, %g2 20086a4: c0 20 c0 02 clr [ %g3 + %g2 ] * 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++ ) 20086a8: 82 00 60 01 inc %g1 20086ac: 80 a1 00 01 cmp %g4, %g1 20086b0: 1a bf ff fb bcc 200869c <_Thread_Initialize+0x208> 20086b4: 84 10 00 01 mov %g1, %g2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 20086b8: 10 bf ff 97 b 2008514 <_Thread_Initialize+0x80> 20086bc: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 20086c0: 90 10 00 19 mov %i1, %o0 20086c4: 40 00 02 53 call 2009010 <_Thread_Stack_Allocate> 20086c8: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 20086cc: 80 a6 c0 08 cmp %i3, %o0 20086d0: 18 80 00 07 bgu 20086ec <_Thread_Initialize+0x258> 20086d4: 80 a2 20 00 cmp %o0, 0 20086d8: 02 80 00 05 be 20086ec <_Thread_Initialize+0x258> <== NEVER TAKEN 20086dc: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 20086e0: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = true; 20086e4: 10 bf ff 79 b 20084c8 <_Thread_Initialize+0x34> 20086e8: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] 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 ) 20086ec: 81 c7 e0 08 ret 20086f0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d2b4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 200d2b4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 200d2b8: 7f ff d4 82 call 20024c0 200d2bc: a0 10 00 18 mov %i0, %l0 200d2c0: b0 10 00 08 mov %o0, %i0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 200d2c4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 200d2c8: 80 88 60 02 btst 2, %g1 200d2cc: 02 80 00 05 be 200d2e0 <_Thread_Resume+0x2c> <== NEVER TAKEN 200d2d0: 82 08 7f fd and %g1, -3, %g1 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 200d2d4: 80 a0 60 00 cmp %g1, 0 200d2d8: 02 80 00 04 be 200d2e8 <_Thread_Resume+0x34> 200d2dc: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _Context_Switch_necessary = true; } } } _ISR_Enable( level ); 200d2e0: 7f ff d4 7c call 20024d0 200d2e4: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 200d2e8: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 200d2ec: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 200d2f0: c8 10 80 00 lduh [ %g2 ], %g4 200d2f4: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 200d2f8: 86 11 00 03 or %g4, %g3, %g3 200d2fc: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200d300: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 200d304: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4 200d308: c4 24 00 00 st %g2, [ %l0 ] 200d30c: 07 00 80 8b sethi %hi(0x2022c00), %g3 old_last_node = the_chain->last; 200d310: c4 00 60 08 ld [ %g1 + 8 ], %g2 200d314: da 10 e3 54 lduh [ %g3 + 0x354 ], %o5 the_chain->last = the_node; 200d318: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200d31c: c4 24 20 04 st %g2, [ %l0 + 4 ] 200d320: 82 13 40 04 or %o5, %g4, %g1 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 200d324: e0 20 80 00 st %l0, [ %g2 ] 200d328: c2 30 e3 54 sth %g1, [ %g3 + 0x354 ] _ISR_Flash( level ); 200d32c: 7f ff d4 69 call 20024d0 200d330: 01 00 00 00 nop 200d334: 7f ff d4 63 call 20024c0 200d338: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 200d33c: 03 00 80 8b sethi %hi(0x2022c00), %g1 200d340: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 ! 2022f30 <_Thread_Heir> 200d344: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 200d348: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 200d34c: 80 a0 80 03 cmp %g2, %g3 200d350: 1a bf ff e4 bcc 200d2e0 <_Thread_Resume+0x2c> 200d354: 07 00 80 8b sethi %hi(0x2022c00), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200d358: c6 00 e3 60 ld [ %g3 + 0x360 ], %g3 ! 2022f60 <_Thread_Executing> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 200d35c: e0 20 63 30 st %l0, [ %g1 + 0x330 ] if ( _Thread_Executing->is_preemptible || 200d360: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1 200d364: 80 a0 60 00 cmp %g1, 0 200d368: 32 80 00 05 bne,a 200d37c <_Thread_Resume+0xc8> 200d36c: 84 10 20 01 mov 1, %g2 200d370: 80 a0 a0 00 cmp %g2, 0 200d374: 12 bf ff db bne 200d2e0 <_Thread_Resume+0x2c> <== ALWAYS TAKEN 200d378: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 200d37c: 03 00 80 8b sethi %hi(0x2022c00), %g1 200d380: c4 28 63 70 stb %g2, [ %g1 + 0x370 ] ! 2022f70 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 200d384: 7f ff d4 53 call 20024d0 200d388: 81 e8 00 00 restore =============================================================================== 0200915c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 200915c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; 2009160: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009164: d0 00 62 00 ld [ %g1 + 0x200 ], %o0 ! 201ce00 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 2009168: c2 0a 20 75 ldub [ %o0 + 0x75 ], %g1 200916c: 80 a0 60 00 cmp %g1, 0 2009170: 02 80 00 24 be 2009200 <_Thread_Tickle_timeslice+0xa4> 2009174: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 2009178: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 200917c: 80 a0 60 00 cmp %g1, 0 2009180: 12 80 00 20 bne 2009200 <_Thread_Tickle_timeslice+0xa4> 2009184: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2009188: c2 02 20 7c ld [ %o0 + 0x7c ], %g1 200918c: 80 a0 60 01 cmp %g1, 1 2009190: 0a 80 00 07 bcs 20091ac <_Thread_Tickle_timeslice+0x50> 2009194: 80 a0 60 02 cmp %g1, 2 2009198: 28 80 00 10 bleu,a 20091d8 <_Thread_Tickle_timeslice+0x7c> 200919c: c2 02 20 78 ld [ %o0 + 0x78 ], %g1 20091a0: 80 a0 60 03 cmp %g1, 3 20091a4: 22 80 00 04 be,a 20091b4 <_Thread_Tickle_timeslice+0x58> <== ALWAYS TAKEN 20091a8: c2 02 20 78 ld [ %o0 + 0x78 ], %g1 20091ac: 81 c7 e0 08 ret 20091b0: 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 ) 20091b4: 82 00 7f ff add %g1, -1, %g1 20091b8: 80 a0 60 00 cmp %g1, 0 20091bc: 12 bf ff fc bne 20091ac <_Thread_Tickle_timeslice+0x50> 20091c0: c2 22 20 78 st %g1, [ %o0 + 0x78 ] (*executing->budget_callout)( executing ); 20091c4: c2 02 20 80 ld [ %o0 + 0x80 ], %g1 20091c8: 9f c0 40 00 call %g1 20091cc: 01 00 00 00 nop 20091d0: 81 c7 e0 08 ret 20091d4: 81 e8 00 00 restore 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 ) { 20091d8: 82 00 7f ff add %g1, -1, %g1 20091dc: 80 a0 60 00 cmp %g1, 0 20091e0: 14 bf ff f3 bg 20091ac <_Thread_Tickle_timeslice+0x50> 20091e4: c2 22 20 78 st %g1, [ %o0 + 0x78 ] _Thread_Reset_timeslice(); 20091e8: 40 00 10 bc call 200d4d8 <_Thread_Reset_timeslice> 20091ec: d0 27 bf fc st %o0, [ %fp + -4 ] executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 20091f0: 03 00 80 73 sethi %hi(0x201cc00), %g1 20091f4: d0 07 bf fc ld [ %fp + -4 ], %o0 20091f8: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 20091fc: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 2009200: 81 c7 e0 08 ret 2009204: 81 e8 00 00 restore =============================================================================== 02009208 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 2009208: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200920c: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009210: e0 00 62 00 ld [ %g1 + 0x200 ], %l0 ! 201ce00 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 2009214: 7f ff e4 26 call 20022ac 2009218: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200921c: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 2009220: c4 04 40 00 ld [ %l1 ], %g2 2009224: c2 04 60 08 ld [ %l1 + 8 ], %g1 2009228: 80 a0 80 01 cmp %g2, %g1 200922c: 02 80 00 19 be 2009290 <_Thread_Yield_processor+0x88> 2009230: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2009234: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2009238: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200923c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009240: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009244: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 2009248: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200924c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2009250: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2009254: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2009258: 7f ff e4 19 call 20022bc 200925c: 01 00 00 00 nop 2009260: 7f ff e4 13 call 20022ac 2009264: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2009268: 03 00 80 73 sethi %hi(0x201cc00), %g1 200926c: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 201cdd0 <_Thread_Heir> 2009270: 80 a4 00 02 cmp %l0, %g2 2009274: 22 80 00 0e be,a 20092ac <_Thread_Yield_processor+0xa4> <== ALWAYS TAKEN 2009278: c4 04 40 00 ld [ %l1 ], %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 200927c: 84 10 20 01 mov 1, %g2 2009280: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009284: c4 28 62 10 stb %g2, [ %g1 + 0x210 ] ! 201ce10 <_Context_Switch_necessary> _ISR_Enable( level ); 2009288: 7f ff e4 0d call 20022bc 200928c: 81 e8 00 00 restore if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 2009290: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009294: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 201cdd0 <_Thread_Heir> 2009298: 80 a4 00 01 cmp %l0, %g1 200929c: 32 bf ff f9 bne,a 2009280 <_Thread_Yield_processor+0x78> <== NEVER TAKEN 20092a0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 20092a4: 7f ff e4 06 call 20022bc 20092a8: 81 e8 00 00 restore _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 20092ac: 10 bf ff f4 b 200927c <_Thread_Yield_processor+0x74> 20092b0: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] =============================================================================== 02008a14 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 2008a14: 9d e3 bf a0 save %sp, -96, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 2008a18: e0 06 60 14 ld [ %i1 + 0x14 ], %l0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2008a1c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2008a20: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2008a24: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2008a28: 82 06 60 38 add %i1, 0x38, %g1 2008a2c: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 2008a30: 2d 00 80 70 sethi %hi(0x201c000), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 2008a34: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2008a38: 80 8c 20 20 btst 0x20, %l0 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 2008a3c: ab 28 60 04 sll %g1, 4, %l5 2008a40: ac 15 a2 24 or %l6, 0x224, %l6 2008a44: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 2008a48: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 2008a4c: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2008a50: 12 80 00 24 bne 2008ae0 <_Thread_queue_Enqueue_priority+0xcc> 2008a54: aa 06 00 15 add %i0, %l5, %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2008a58: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 2008a5c: 7f ff e6 14 call 20022ac 2008a60: 01 00 00 00 nop 2008a64: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 2008a68: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2008a6c: 80 a0 40 16 cmp %g1, %l6 2008a70: 02 80 00 3a be 2008b58 <_Thread_queue_Enqueue_priority+0x144> 2008a74: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 2008a78: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 2008a7c: 80 a4 00 13 cmp %l0, %l3 2008a80: 18 80 00 0b bgu 2008aac <_Thread_queue_Enqueue_priority+0x98> 2008a84: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008a88: 10 80 00 36 b 2008b60 <_Thread_queue_Enqueue_priority+0x14c> 2008a8c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2008a90: 80 a4 40 16 cmp %l1, %l6 2008a94: 02 80 00 32 be 2008b5c <_Thread_queue_Enqueue_priority+0x148> 2008a98: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 2008a9c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 2008aa0: 80 a4 00 13 cmp %l0, %l3 2008aa4: 28 80 00 2f bleu,a 2008b60 <_Thread_queue_Enqueue_priority+0x14c> 2008aa8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 2008aac: 7f ff e6 04 call 20022bc 2008ab0: 90 10 00 12 mov %l2, %o0 2008ab4: 7f ff e5 fe call 20022ac 2008ab8: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008abc: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2008ac0: 80 8d 00 01 btst %l4, %g1 2008ac4: 32 bf ff f3 bne,a 2008a90 <_Thread_queue_Enqueue_priority+0x7c><== ALWAYS TAKEN 2008ac8: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 2008acc: 7f ff e5 fc call 20022bc <== NOT EXECUTED 2008ad0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 2008ad4: 30 bf ff e2 b,a 2008a5c <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 2008ad8: 7f ff e5 f9 call 20022bc 2008adc: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 2008ae0: 7f ff e5 f3 call 20022ac 2008ae4: e6 0d 80 00 ldub [ %l6 ], %l3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2008ae8: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 2008aec: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 2008af0: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2008af4: 80 a0 40 15 cmp %g1, %l5 2008af8: 02 80 00 20 be 2008b78 <_Thread_queue_Enqueue_priority+0x164> 2008afc: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 2008b00: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 2008b04: 80 a4 00 13 cmp %l0, %l3 2008b08: 0a 80 00 0b bcs 2008b34 <_Thread_queue_Enqueue_priority+0x120> 2008b0c: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008b10: 10 80 00 1b b 2008b7c <_Thread_queue_Enqueue_priority+0x168> 2008b14: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2008b18: 80 a4 40 15 cmp %l1, %l5 2008b1c: 02 80 00 17 be 2008b78 <_Thread_queue_Enqueue_priority+0x164> 2008b20: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 2008b24: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 2008b28: 80 a4 00 13 cmp %l0, %l3 2008b2c: 3a 80 00 14 bcc,a 2008b7c <_Thread_queue_Enqueue_priority+0x168> 2008b30: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2008b34: 7f ff e5 e2 call 20022bc 2008b38: 90 10 00 12 mov %l2, %o0 2008b3c: 7f ff e5 dc call 20022ac 2008b40: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008b44: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2008b48: 80 8d 00 01 btst %l4, %g1 2008b4c: 32 bf ff f3 bne,a 2008b18 <_Thread_queue_Enqueue_priority+0x104> 2008b50: e2 04 60 04 ld [ %l1 + 4 ], %l1 2008b54: 30 bf ff e1 b,a 2008ad8 <_Thread_queue_Enqueue_priority+0xc4> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2008b58: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008b5c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008b60: 80 a0 a0 01 cmp %g2, 1 2008b64: 02 80 00 17 be 2008bc0 <_Thread_queue_Enqueue_priority+0x1ac> 2008b68: 80 a4 00 13 cmp %l0, %l3 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 2008b6c: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 2008b70: 81 c7 e0 08 ret 2008b74: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008b78: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008b7c: 80 a0 a0 01 cmp %g2, 1 2008b80: 32 bf ff fc bne,a 2008b70 <_Thread_queue_Enqueue_priority+0x15c> 2008b84: e4 26 80 00 st %l2, [ %i2 ] THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2008b88: 80 a4 00 13 cmp %l0, %l3 2008b8c: 02 80 00 1a be 2008bf4 <_Thread_queue_Enqueue_priority+0x1e0> 2008b90: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2008b94: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2008b98: c2 26 60 04 st %g1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 2008b9c: c4 26 40 00 st %g2, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 2008ba0: f0 26 60 44 st %i0, [ %i1 + 0x44 ] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 2008ba4: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 2008ba8: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008bac: b0 10 20 01 mov 1, %i0 2008bb0: 7f ff e5 c3 call 20022bc 2008bb4: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008bb8: 81 c7 e0 08 ret 2008bbc: 81 e8 00 00 restore THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2008bc0: 02 80 00 0d be 2008bf4 <_Thread_queue_Enqueue_priority+0x1e0> 2008bc4: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008bc8: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008bcc: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2008bd0: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 2008bd4: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 2008bd8: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 2008bdc: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008be0: b0 10 20 01 mov 1, %i0 2008be4: 7f ff e5 b6 call 20022bc 2008be8: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008bec: 81 c7 e0 08 ret 2008bf0: 81 e8 00 00 restore 2008bf4: a2 04 60 3c add %l1, 0x3c, %l1 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 2008bf8: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008bfc: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 2008c00: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 2008c04: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 2008c08: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2008c0c: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008c10: b0 10 20 01 mov 1, %i0 2008c14: 7f ff e5 aa call 20022bc 2008c18: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008c1c: 81 c7 e0 08 ret 2008c20: 81 e8 00 00 restore =============================================================================== 02008cd0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 2008cd0: 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 ) 2008cd4: 80 a6 20 00 cmp %i0, 0 2008cd8: 02 80 00 13 be 2008d24 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 2008cdc: 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 ) { 2008ce0: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 2008ce4: 80 a4 60 01 cmp %l1, 1 2008ce8: 02 80 00 04 be 2008cf8 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 2008cec: 01 00 00 00 nop 2008cf0: 81 c7 e0 08 ret <== NOT EXECUTED 2008cf4: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2008cf8: 7f ff e5 6d call 20022ac 2008cfc: 01 00 00 00 nop 2008d00: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2008d04: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2008d08: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008d0c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008d10: 80 88 80 01 btst %g2, %g1 2008d14: 12 80 00 06 bne 2008d2c <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 2008d18: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 2008d1c: 7f ff e5 68 call 20022bc 2008d20: 90 10 00 10 mov %l0, %o0 2008d24: 81 c7 e0 08 ret 2008d28: 81 e8 00 00 restore ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 2008d2c: 92 10 00 19 mov %i1, %o1 2008d30: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 2008d34: 40 00 11 47 call 200d250 <_Thread_queue_Extract_priority_helper> 2008d38: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2008d3c: 90 10 00 18 mov %i0, %o0 2008d40: 92 10 00 19 mov %i1, %o1 2008d44: 7f ff ff 34 call 2008a14 <_Thread_queue_Enqueue_priority> 2008d48: 94 07 bf fc add %fp, -4, %o2 2008d4c: 30 bf ff f4 b,a 2008d1c <_Thread_queue_Requeue+0x4c> =============================================================================== 02008d50 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008d50: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008d54: 90 10 00 18 mov %i0, %o0 2008d58: 7f ff fd a4 call 20083e8 <_Thread_Get> 2008d5c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008d60: c2 07 bf fc ld [ %fp + -4 ], %g1 2008d64: 80 a0 60 00 cmp %g1, 0 2008d68: 12 80 00 08 bne 2008d88 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 2008d6c: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2008d70: 40 00 11 73 call 200d33c <_Thread_queue_Process_timeout> 2008d74: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2008d78: 03 00 80 73 sethi %hi(0x201cc00), %g1 2008d7c: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 201cd40 <_Thread_Dispatch_disable_level> 2008d80: 84 00 bf ff add %g2, -1, %g2 2008d84: c4 20 61 40 st %g2, [ %g1 + 0x140 ] 2008d88: 81 c7 e0 08 ret 2008d8c: 81 e8 00 00 restore =============================================================================== 020166ec <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20166ec: 9d e3 bf 88 save %sp, -120, %sp 20166f0: 2d 00 80 f9 sethi %hi(0x203e400), %l6 20166f4: ba 07 bf f4 add %fp, -12, %i5 20166f8: a8 07 bf f8 add %fp, -8, %l4 20166fc: a4 07 bf e8 add %fp, -24, %l2 2016700: ae 07 bf ec add %fp, -20, %l7 2016704: 2b 00 80 f9 sethi %hi(0x203e400), %l5 2016708: 39 00 80 f9 sethi %hi(0x203e400), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 201670c: c0 27 bf f8 clr [ %fp + -8 ] 2016710: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 2016714: fa 27 bf fc st %i5, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2016718: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 201671c: e4 27 bf f0 st %l2, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2016720: ee 27 bf e8 st %l7, [ %fp + -24 ] 2016724: ac 15 a2 c4 or %l6, 0x2c4, %l6 2016728: aa 15 62 04 or %l5, 0x204, %l5 201672c: b8 17 21 70 or %i4, 0x170, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016730: a2 06 20 30 add %i0, 0x30, %l1 /* * 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 ); 2016734: a6 06 20 68 add %i0, 0x68, %l3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2016738: b2 06 20 08 add %i0, 8, %i1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 201673c: b4 06 20 40 add %i0, 0x40, %i2 _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; 2016740: b6 10 20 01 mov 1, %i3 { /* * 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; 2016744: fa 26 20 78 st %i5, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2016748: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 201674c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016750: 90 10 00 11 mov %l1, %o0 2016754: 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; 2016758: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201675c: 40 00 12 8c call 201b18c <_Watchdog_Adjust_to_chain> 2016760: 94 10 00 12 mov %l2, %o2 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 2016764: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2016768: e0 05 40 00 ld [ %l5 ], %l0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 201676c: 80 a4 00 09 cmp %l0, %o1 2016770: 38 80 00 2f bgu,a 201682c <_Timer_server_Body+0x140> 2016774: 92 24 00 09 sub %l0, %o1, %o1 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 2016778: 80 a4 00 09 cmp %l0, %o1 201677c: 0a 80 00 30 bcs 201683c <_Timer_server_Body+0x150> 2016780: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2016784: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2016788: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 201678c: 40 00 02 b5 call 2017260 <_Chain_Get> 2016790: 01 00 00 00 nop if ( timer == NULL ) { 2016794: 80 a2 20 00 cmp %o0, 0 2016798: 02 80 00 10 be 20167d8 <_Timer_server_Body+0xec> 201679c: 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 ) { 20167a0: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20167a4: 80 a0 60 01 cmp %g1, 1 20167a8: 02 80 00 29 be 201684c <_Timer_server_Body+0x160> 20167ac: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 20167b0: 12 bf ff f6 bne 2016788 <_Timer_server_Body+0x9c> <== NEVER TAKEN 20167b4: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20167b8: 40 00 12 ab call 201b264 <_Watchdog_Insert> 20167bc: 90 10 00 13 mov %l3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 20167c0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 20167c4: 40 00 02 a7 call 2017260 <_Chain_Get> 20167c8: 01 00 00 00 nop if ( timer == NULL ) { 20167cc: 80 a2 20 00 cmp %o0, 0 20167d0: 32 bf ff f5 bne,a 20167a4 <_Timer_server_Body+0xb8> <== NEVER TAKEN 20167d4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 20167d8: 7f ff e3 aa call 200f680 20167dc: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 20167e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20167e4: 80 a5 00 01 cmp %l4, %g1 20167e8: 02 80 00 1d be 201685c <_Timer_server_Body+0x170> <== ALWAYS TAKEN 20167ec: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20167f0: 7f ff e3 a8 call 200f690 <== NOT EXECUTED 20167f4: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 20167f8: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 20167fc: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016800: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2016804: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2016808: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201680c: 40 00 12 60 call 201b18c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 2016810: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 2016814: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2016818: e0 05 40 00 ld [ %l5 ], %l0 <== NOT EXECUTED /* * 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 ) { 201681c: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 2016820: 08 bf ff d7 bleu 201677c <_Timer_server_Body+0x90> <== NOT EXECUTED 2016824: 01 00 00 00 nop <== NOT EXECUTED /* * 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 ); 2016828: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 201682c: 90 10 00 13 mov %l3, %o0 2016830: 40 00 12 57 call 201b18c <_Watchdog_Adjust_to_chain> 2016834: 94 10 00 12 mov %l2, %o2 2016838: 30 bf ff d3 b,a 2016784 <_Timer_server_Body+0x98> /* * 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 ); 201683c: 90 10 00 13 mov %l3, %o0 2016840: 40 00 12 23 call 201b0cc <_Watchdog_Adjust> 2016844: 92 10 20 01 mov 1, %o1 2016848: 30 bf ff cf b,a 2016784 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 201684c: 92 02 20 10 add %o0, 0x10, %o1 2016850: 40 00 12 85 call 201b264 <_Watchdog_Insert> 2016854: 90 10 00 11 mov %l1, %o0 2016858: 30 bf ff cc b,a 2016788 <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 201685c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2016860: 7f ff e3 8c call 200f690 2016864: 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 ) ) { 2016868: c2 07 bf e8 ld [ %fp + -24 ], %g1 201686c: 80 a5 c0 01 cmp %l7, %g1 2016870: 12 80 00 0c bne 20168a0 <_Timer_server_Body+0x1b4> 2016874: 01 00 00 00 nop 2016878: 30 80 00 13 b,a 20168c4 <_Timer_server_Body+0x1d8> * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 201687c: c0 24 20 08 clr [ %l0 + 8 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 2016880: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 2016884: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 2016888: 7f ff e3 82 call 200f690 201688c: 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 ); 2016890: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 2016894: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2016898: 9f c0 40 00 call %g1 201689c: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 20168a0: 7f ff e3 78 call 200f680 20168a4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20168a8: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 20168ac: 80 a5 c0 10 cmp %l7, %l0 20168b0: 32 bf ff f3 bne,a 201687c <_Timer_server_Body+0x190> 20168b4: c2 04 00 00 ld [ %l0 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 20168b8: 7f ff e3 76 call 200f690 20168bc: 01 00 00 00 nop 20168c0: 30 bf ff a1 b,a 2016744 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 20168c4: c0 2e 20 7c clrb [ %i0 + 0x7c ] 20168c8: c2 07 00 00 ld [ %i4 ], %g1 20168cc: 82 00 60 01 inc %g1 20168d0: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 20168d4: d0 06 00 00 ld [ %i0 ], %o0 20168d8: 40 00 0f 45 call 201a5ec <_Thread_Set_state> 20168dc: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 20168e0: 7f ff ff 59 call 2016644 <_Timer_server_Reset_interval_system_watchdog> 20168e4: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 20168e8: 7f ff ff 6c call 2016698 <_Timer_server_Reset_tod_system_watchdog> 20168ec: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 20168f0: 40 00 0c 3d call 20199e4 <_Thread_Enable_dispatch> 20168f4: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 20168f8: 90 10 00 19 mov %i1, %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; 20168fc: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2016900: 40 00 12 c6 call 201b418 <_Watchdog_Remove> 2016904: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2016908: 40 00 12 c4 call 201b418 <_Watchdog_Remove> 201690c: 90 10 00 1a mov %i2, %o0 2016910: 30 bf ff 8d b,a 2016744 <_Timer_server_Body+0x58> =============================================================================== 020094c4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 20094c4: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 20094c8: 23 00 80 73 sethi %hi(0x201cc00), %l1 20094cc: a2 14 63 78 or %l1, 0x378, %l1 ! 201cf78 <_User_extensions_List> 20094d0: e0 04 60 08 ld [ %l1 + 8 ], %l0 20094d4: 80 a4 00 11 cmp %l0, %l1 20094d8: 02 80 00 0d be 200950c <_User_extensions_Fatal+0x48> <== NEVER TAKEN 20094dc: b2 0e 60 ff and %i1, 0xff, %i1 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 20094e0: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 20094e4: 80 a0 60 00 cmp %g1, 0 20094e8: 02 80 00 05 be 20094fc <_User_extensions_Fatal+0x38> 20094ec: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 20094f0: 92 10 00 19 mov %i1, %o1 20094f4: 9f c0 40 00 call %g1 20094f8: 94 10 00 1a mov %i2, %o2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 20094fc: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009500: 80 a4 00 11 cmp %l0, %l1 2009504: 32 bf ff f8 bne,a 20094e4 <_User_extensions_Fatal+0x20> 2009508: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 200950c: 81 c7 e0 08 ret 2009510: 81 e8 00 00 restore =============================================================================== 02009370 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 2009370: 9d e3 bf a0 save %sp, -96, %sp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 2009374: 07 00 80 70 sethi %hi(0x201c000), %g3 2009378: 86 10 e2 28 or %g3, 0x228, %g3 ! 201c228 initial_extensions = Configuration.User_extension_table; 200937c: e6 00 e0 3c ld [ %g3 + 0x3c ], %l3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2009380: 1b 00 80 73 sethi %hi(0x201cc00), %o5 2009384: 09 00 80 73 sethi %hi(0x201cc00), %g4 2009388: 84 13 63 78 or %o5, 0x378, %g2 200938c: 82 11 21 44 or %g4, 0x144, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2009390: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2009394: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2009398: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 200939c: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20093a0: 84 00 a0 04 add %g2, 4, %g2 20093a4: 82 00 60 04 add %g1, 4, %g1 20093a8: c4 23 63 78 st %g2, [ %o5 + 0x378 ] 20093ac: c2 21 21 44 st %g1, [ %g4 + 0x144 ] _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 20093b0: 80 a4 e0 00 cmp %l3, 0 20093b4: 02 80 00 1b be 2009420 <_User_extensions_Handler_initialization+0xb0> 20093b8: e4 00 e0 38 ld [ %g3 + 0x38 ], %l2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 20093bc: 83 2c a0 02 sll %l2, 2, %g1 20093c0: a3 2c a0 04 sll %l2, 4, %l1 20093c4: a2 24 40 01 sub %l1, %g1, %l1 20093c8: a2 04 40 12 add %l1, %l2, %l1 20093cc: a3 2c 60 02 sll %l1, 2, %l1 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 20093d0: 40 00 01 73 call 200999c <_Workspace_Allocate_or_fatal_error> 20093d4: 90 10 00 11 mov %l1, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20093d8: 94 10 00 11 mov %l1, %o2 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 20093dc: a0 10 00 08 mov %o0, %l0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20093e0: 40 00 1d 0e call 2010818 20093e4: 92 10 20 00 clr %o1 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 20093e8: 80 a4 a0 00 cmp %l2, 0 20093ec: 02 80 00 0d be 2009420 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 20093f0: a2 10 20 00 clr %l1 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 20093f4: 93 2c 60 05 sll %l1, 5, %o1 20093f8: 94 10 20 20 mov 0x20, %o2 20093fc: 92 04 c0 09 add %l3, %o1, %o1 2009400: 40 00 1c c7 call 201071c 2009404: 90 04 20 14 add %l0, 0x14, %o0 _User_extensions_Add_set( extension ); 2009408: 40 00 10 7d call 200d5fc <_User_extensions_Add_set> 200940c: 90 10 00 10 mov %l0, %o0 2009410: a2 04 60 01 inc %l1 2009414: 80 a4 80 11 cmp %l2, %l1 2009418: 18 bf ff f7 bgu 20093f4 <_User_extensions_Handler_initialization+0x84> 200941c: a0 04 20 34 add %l0, 0x34, %l0 2009420: 81 c7 e0 08 ret 2009424: 81 e8 00 00 restore =============================================================================== 02009428 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 2009428: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200942c: 23 00 80 73 sethi %hi(0x201cc00), %l1 2009430: e0 04 63 78 ld [ %l1 + 0x378 ], %l0 ! 201cf78 <_User_extensions_List> 2009434: a2 14 63 78 or %l1, 0x378, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2009438: a2 04 60 04 add %l1, 4, %l1 200943c: 80 a4 00 11 cmp %l0, %l1 2009440: 02 80 00 0c be 2009470 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 2009444: 01 00 00 00 nop !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 2009448: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 200944c: 80 a0 60 00 cmp %g1, 0 2009450: 02 80 00 04 be 2009460 <_User_extensions_Thread_begin+0x38> 2009454: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 2009458: 9f c0 40 00 call %g1 200945c: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2009460: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 2009464: 80 a4 00 11 cmp %l0, %l1 2009468: 32 bf ff f9 bne,a 200944c <_User_extensions_Thread_begin+0x24> 200946c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2009470: 81 c7 e0 08 ret 2009474: 81 e8 00 00 restore =============================================================================== 02009514 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2009514: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 2009518: 23 00 80 73 sethi %hi(0x201cc00), %l1 200951c: e0 04 63 78 ld [ %l1 + 0x378 ], %l0 ! 201cf78 <_User_extensions_List> 2009520: a2 14 63 78 or %l1, 0x378, %l1 2009524: a2 04 60 04 add %l1, 4, %l1 2009528: 80 a4 00 11 cmp %l0, %l1 200952c: 02 80 00 10 be 200956c <_User_extensions_Thread_create+0x58><== NEVER TAKEN 2009530: 25 00 80 73 sethi %hi(0x201cc00), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 2009534: a4 14 a2 00 or %l2, 0x200, %l2 ! 201ce00 <_Thread_Executing> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 2009538: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 200953c: 80 a0 60 00 cmp %g1, 0 2009540: 02 80 00 07 be 200955c <_User_extensions_Thread_create+0x48> 2009544: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2009548: 9f c0 40 00 call %g1 200954c: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 2009550: 80 8a 20 ff btst 0xff, %o0 2009554: 02 80 00 08 be 2009574 <_User_extensions_Thread_create+0x60> 2009558: 01 00 00 00 nop User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200955c: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 2009560: 80 a4 00 11 cmp %l0, %l1 2009564: 32 bf ff f6 bne,a 200953c <_User_extensions_Thread_create+0x28> 2009568: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return false; } } return true; } 200956c: 81 c7 e0 08 ret 2009570: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 2009574: 81 c7 e0 08 ret 2009578: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200957c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 200957c: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 2009580: 23 00 80 73 sethi %hi(0x201cc00), %l1 2009584: a2 14 63 78 or %l1, 0x378, %l1 ! 201cf78 <_User_extensions_List> 2009588: e0 04 60 08 ld [ %l1 + 8 ], %l0 200958c: 80 a4 00 11 cmp %l0, %l1 2009590: 02 80 00 0d be 20095c4 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN 2009594: 25 00 80 73 sethi %hi(0x201cc00), %l2 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( 2009598: a4 14 a2 00 or %l2, 0x200, %l2 ! 201ce00 <_Thread_Executing> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 200959c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 20095a0: 80 a0 60 00 cmp %g1, 0 20095a4: 02 80 00 04 be 20095b4 <_User_extensions_Thread_delete+0x38> 20095a8: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_delete)( 20095ac: 9f c0 40 00 call %g1 20095b0: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 20095b4: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 20095b8: 80 a4 00 11 cmp %l0, %l1 20095bc: 32 bf ff f9 bne,a 20095a0 <_User_extensions_Thread_delete+0x24> 20095c0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 20095c4: 81 c7 e0 08 ret 20095c8: 81 e8 00 00 restore =============================================================================== 02009478 <_User_extensions_Thread_exitted>: } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 2009478: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 200947c: 23 00 80 73 sethi %hi(0x201cc00), %l1 2009480: a2 14 63 78 or %l1, 0x378, %l1 ! 201cf78 <_User_extensions_List> 2009484: e0 04 60 08 ld [ %l1 + 8 ], %l0 2009488: 80 a4 00 11 cmp %l0, %l1 200948c: 02 80 00 0c be 20094bc <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 2009490: 01 00 00 00 nop !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 2009494: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 2009498: 80 a0 60 00 cmp %g1, 0 200949c: 02 80 00 04 be 20094ac <_User_extensions_Thread_exitted+0x34> 20094a0: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 20094a4: 9f c0 40 00 call %g1 20094a8: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 20094ac: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 20094b0: 80 a4 00 11 cmp %l0, %l1 20094b4: 32 bf ff f9 bne,a 2009498 <_User_extensions_Thread_exitted+0x20> 20094b8: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 20094bc: 81 c7 e0 08 ret 20094c0: 81 e8 00 00 restore =============================================================================== 0200a2d4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 200a2d4: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200a2d8: 23 00 80 86 sethi %hi(0x2021800), %l1 200a2dc: e0 04 61 08 ld [ %l1 + 0x108 ], %l0 ! 2021908 <_User_extensions_List> 200a2e0: a2 14 61 08 or %l1, 0x108, %l1 200a2e4: a2 04 60 04 add %l1, 4, %l1 200a2e8: 80 a4 00 11 cmp %l0, %l1 200a2ec: 02 80 00 0d be 200a320 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 200a2f0: 25 00 80 85 sethi %hi(0x2021400), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( 200a2f4: a4 14 a3 90 or %l2, 0x390, %l2 ! 2021790 <_Thread_Executing> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 200a2f8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200a2fc: 80 a0 60 00 cmp %g1, 0 200a300: 02 80 00 04 be 200a310 <_User_extensions_Thread_restart+0x3c> 200a304: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_restart)( 200a308: 9f c0 40 00 call %g1 200a30c: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200a310: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200a314: 80 a4 00 11 cmp %l0, %l1 200a318: 32 bf ff f9 bne,a 200a2fc <_User_extensions_Thread_restart+0x28> 200a31c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200a320: 81 c7 e0 08 ret 200a324: 81 e8 00 00 restore =============================================================================== 020095cc <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 20095cc: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 20095d0: 23 00 80 73 sethi %hi(0x201cc00), %l1 20095d4: e0 04 63 78 ld [ %l1 + 0x378 ], %l0 ! 201cf78 <_User_extensions_List> 20095d8: a2 14 63 78 or %l1, 0x378, %l1 20095dc: a2 04 60 04 add %l1, 4, %l1 20095e0: 80 a4 00 11 cmp %l0, %l1 20095e4: 02 80 00 0d be 2009618 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 20095e8: 25 00 80 73 sethi %hi(0x201cc00), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( 20095ec: a4 14 a2 00 or %l2, 0x200, %l2 ! 201ce00 <_Thread_Executing> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 20095f0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 20095f4: 80 a0 60 00 cmp %g1, 0 20095f8: 02 80 00 04 be 2009608 <_User_extensions_Thread_start+0x3c> 20095fc: 92 10 00 18 mov %i0, %o1 (*the_extension->Callouts.thread_start)( 2009600: 9f c0 40 00 call %g1 2009604: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2009608: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 200960c: 80 a4 00 11 cmp %l0, %l1 2009610: 32 bf ff f9 bne,a 20095f4 <_User_extensions_Thread_start+0x28> 2009614: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2009618: 81 c7 e0 08 ret 200961c: 81 e8 00 00 restore =============================================================================== 02009620 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 2009620: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 2009624: 23 00 80 73 sethi %hi(0x201cc00), %l1 2009628: e0 04 61 44 ld [ %l1 + 0x144 ], %l0 ! 201cd44 <_User_extensions_Switches_list> 200962c: a2 14 61 44 or %l1, 0x144, %l1 2009630: a2 04 60 04 add %l1, 4, %l1 2009634: 80 a4 00 11 cmp %l0, %l1 2009638: 02 80 00 0a be 2009660 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 200963c: 01 00 00 00 nop !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 2009640: c2 04 20 08 ld [ %l0 + 8 ], %g1 2009644: 90 10 00 18 mov %i0, %o0 2009648: 9f c0 40 00 call %g1 200964c: 92 10 00 19 mov %i1, %o1 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 2009650: e0 04 00 00 ld [ %l0 ], %l0 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 2009654: 80 a4 00 11 cmp %l0, %l1 2009658: 32 bf ff fb bne,a 2009644 <_User_extensions_Thread_switch+0x24> 200965c: c2 04 20 08 ld [ %l0 + 8 ], %g1 2009660: 81 c7 e0 08 ret 2009664: 81 e8 00 00 restore =============================================================================== 0200b910 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b910: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b914: 7f ff de 47 call 2003230 200b918: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200b91c: c2 06 00 00 ld [ %i0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200b920: a2 06 20 04 add %i0, 4, %l1 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200b924: 80 a0 40 11 cmp %g1, %l1 200b928: 02 80 00 1f be 200b9a4 <_Watchdog_Adjust+0x94> 200b92c: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b930: 12 80 00 1f bne 200b9ac <_Watchdog_Adjust+0x9c> 200b934: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b938: 80 a6 a0 00 cmp %i2, 0 200b93c: 02 80 00 1a be 200b9a4 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b940: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b944: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b948: 80 a6 80 19 cmp %i2, %i1 200b94c: 1a 80 00 0b bcc 200b978 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN 200b950: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 200b954: 10 80 00 1d b 200b9c8 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200b958: b4 26 40 1a sub %i1, %i2, %i2 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b95c: b4 a6 80 19 subcc %i2, %i1, %i2 200b960: 02 80 00 11 be 200b9a4 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b964: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b968: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b96c: 80 a6 40 1a cmp %i1, %i2 200b970: 38 80 00 16 bgu,a 200b9c8 <_Watchdog_Adjust+0xb8> 200b974: b4 26 40 1a sub %i1, %i2, %i2 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 200b978: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 200b97c: 7f ff de 31 call 2003240 200b980: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b984: 40 00 00 b6 call 200bc5c <_Watchdog_Tickle> 200b988: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 200b98c: 7f ff de 29 call 2003230 200b990: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200b994: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 200b998: 80 a4 40 02 cmp %l1, %g2 200b99c: 12 bf ff f0 bne 200b95c <_Watchdog_Adjust+0x4c> 200b9a0: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 200b9a4: 7f ff de 27 call 2003240 200b9a8: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200b9ac: 12 bf ff fe bne 200b9a4 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b9b0: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b9b4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b9b8: b4 00 80 1a add %g2, %i2, %i2 200b9bc: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200b9c0: 7f ff de 20 call 2003240 200b9c4: 91 e8 00 08 restore %g0, %o0, %o0 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; 200b9c8: 10 bf ff f7 b 200b9a4 <_Watchdog_Adjust+0x94> 200b9cc: f4 20 60 10 st %i2, [ %g1 + 0x10 ] =============================================================================== 0200981c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200981c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009820: 7f ff e2 a3 call 20022ac 2009824: 01 00 00 00 nop previous_state = the_watchdog->state; 2009828: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 200982c: 80 a4 20 01 cmp %l0, 1 2009830: 02 80 00 2a be 20098d8 <_Watchdog_Remove+0xbc> 2009834: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009838: 1a 80 00 09 bcc 200985c <_Watchdog_Remove+0x40> 200983c: 80 a4 20 03 cmp %l0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009840: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009844: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201ce94 <_Watchdog_Ticks_since_boot> 2009848: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200984c: 7f ff e2 9c call 20022bc 2009850: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 2009854: 81 c7 e0 08 ret 2009858: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 200985c: 18 bf ff fa bgu 2009844 <_Watchdog_Remove+0x28> <== NEVER TAKEN 2009860: 03 00 80 73 sethi %hi(0x201cc00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 2009864: c2 06 00 00 ld [ %i0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009868: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200986c: c4 00 40 00 ld [ %g1 ], %g2 2009870: 80 a0 a0 00 cmp %g2, 0 2009874: 02 80 00 07 be 2009890 <_Watchdog_Remove+0x74> 2009878: 05 00 80 73 sethi %hi(0x201cc00), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200987c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009880: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 2009884: 84 00 c0 02 add %g3, %g2, %g2 2009888: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200988c: 05 00 80 73 sethi %hi(0x201cc00), %g2 2009890: c4 00 a2 90 ld [ %g2 + 0x290 ], %g2 ! 201ce90 <_Watchdog_Sync_count> 2009894: 80 a0 a0 00 cmp %g2, 0 2009898: 22 80 00 07 be,a 20098b4 <_Watchdog_Remove+0x98> 200989c: c4 06 20 04 ld [ %i0 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 20098a0: 05 00 80 73 sethi %hi(0x201cc00), %g2 20098a4: c6 00 a1 dc ld [ %g2 + 0x1dc ], %g3 ! 201cddc <_ISR_Nest_level> 20098a8: 05 00 80 73 sethi %hi(0x201cc00), %g2 20098ac: c6 20 a1 fc st %g3, [ %g2 + 0x1fc ] ! 201cdfc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 20098b0: c4 06 20 04 ld [ %i0 + 4 ], %g2 next->previous = previous; previous->next = next; 20098b4: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 20098b8: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 20098bc: 03 00 80 73 sethi %hi(0x201cc00), %g1 20098c0: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201ce94 <_Watchdog_Ticks_since_boot> 20098c4: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 20098c8: 7f ff e2 7d call 20022bc 20098cc: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 20098d0: 81 c7 e0 08 ret 20098d4: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 20098d8: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 20098dc: c0 26 20 08 clr [ %i0 + 8 ] _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 20098e0: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 20098e4: 7f ff e2 76 call 20022bc 20098e8: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 20098ec: 81 c7 e0 08 ret 20098f0: 81 e8 00 00 restore =============================================================================== 0200b104 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200b104: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200b108: 7f ff df 21 call 2002d8c 200b10c: a0 10 00 18 mov %i0, %l0 200b110: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200b114: 11 00 80 82 sethi %hi(0x2020800), %o0 200b118: 94 10 00 19 mov %i1, %o2 200b11c: 90 12 22 08 or %o0, 0x208, %o0 200b120: 7f ff e4 6b call 20042cc 200b124: 92 10 00 10 mov %l0, %o1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200b128: e2 06 40 00 ld [ %i1 ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200b12c: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200b130: 80 a4 40 19 cmp %l1, %i1 200b134: 02 80 00 0f be 200b170 <_Watchdog_Report_chain+0x6c> 200b138: 11 00 80 82 sethi %hi(0x2020800), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200b13c: 92 10 00 11 mov %l1, %o1 200b140: 40 00 00 11 call 200b184 <_Watchdog_Report> 200b144: 90 10 20 00 clr %o0 _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 200b148: e2 04 40 00 ld [ %l1 ], %l1 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 200b14c: 80 a4 40 19 cmp %l1, %i1 200b150: 12 bf ff fc bne 200b140 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200b154: 92 10 00 11 mov %l1, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200b158: 92 10 00 10 mov %l0, %o1 200b15c: 11 00 80 82 sethi %hi(0x2020800), %o0 200b160: 7f ff e4 5b call 20042cc 200b164: 90 12 22 20 or %o0, 0x220, %o0 ! 2020a20 <_Status_Object_name_errors_to_status+0x30> } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 200b168: 7f ff df 0d call 2002d9c 200b16c: 81 e8 00 00 restore _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200b170: 7f ff e4 57 call 20042cc 200b174: 90 12 22 30 or %o0, 0x230, %o0 } _ISR_Enable( level ); 200b178: 7f ff df 09 call 2002d9c 200b17c: 81 e8 00 00 restore =============================================================================== 02006000 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 2006000: 9d e3 bf 98 save %sp, -104, %sp long adjustment; /* * Simple validations */ if ( !delta ) 2006004: a0 96 20 00 orcc %i0, 0, %l0 2006008: 02 80 00 55 be 200615c 200600c: 03 00 03 d0 sethi %hi(0xf4000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 2006010: c4 04 20 04 ld [ %l0 + 4 ], %g2 2006014: 82 10 62 3f or %g1, 0x23f, %g1 2006018: 80 a0 80 01 cmp %g2, %g1 200601c: 18 80 00 50 bgu 200615c 2006020: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 2006024: 22 80 00 06 be,a 200603c 2006028: c2 04 00 00 ld [ %l0 ], %g1 olddelta->tv_sec = 0; olddelta->tv_usec = 0; 200602c: c0 26 60 04 clr [ %i1 + 4 ] 2006030: c4 04 20 04 ld [ %l0 + 4 ], %g2 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 2006034: c0 26 40 00 clr [ %i1 ] olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2006038: c2 04 00 00 ld [ %l0 ], %g1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 200603c: 07 00 80 76 sethi %hi(0x201d800), %g3 2006040: c8 00 e1 64 ld [ %g3 + 0x164 ], %g4 ! 201d964 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2006044: 9b 28 60 08 sll %g1, 8, %o5 2006048: 87 28 60 03 sll %g1, 3, %g3 200604c: 86 23 40 03 sub %o5, %g3, %g3 2006050: 9b 28 e0 06 sll %g3, 6, %o5 2006054: 86 23 40 03 sub %o5, %g3, %g3 2006058: 82 00 c0 01 add %g3, %g1, %g1 200605c: 83 28 60 06 sll %g1, 6, %g1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2006060: 84 00 80 01 add %g2, %g1, %g2 2006064: 80 a0 80 04 cmp %g2, %g4 2006068: 1a 80 00 04 bcc 2006078 200606c: 03 00 80 79 sethi %hi(0x201e400), %g1 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 2006070: 81 c7 e0 08 ret 2006074: 91 e8 20 00 restore %g0, 0, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006078: c4 00 61 b0 ld [ %g1 + 0x1b0 ], %g2 200607c: 84 00 a0 01 inc %g2 2006080: c4 20 61 b0 st %g2, [ %g1 + 0x1b0 ] * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 2006084: a2 07 bf f8 add %fp, -8, %l1 2006088: 40 00 06 68 call 2007a28 <_TOD_Get> 200608c: 90 10 00 11 mov %l1, %o0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2006090: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 2006094: c4 04 00 00 ld [ %l0 ], %g2 2006098: c8 07 bf f8 ld [ %fp + -8 ], %g4 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 200609c: 87 28 60 02 sll %g1, 2, %g3 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 20060a0: 84 01 00 02 add %g4, %g2, %g2 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 20060a4: 89 28 60 07 sll %g1, 7, %g4 20060a8: 86 21 00 03 sub %g4, %g3, %g3 20060ac: 82 00 c0 01 add %g3, %g1, %g1 20060b0: c6 07 bf fc ld [ %fp + -4 ], %g3 20060b4: 83 28 60 03 sll %g1, 3, %g1 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 20060b8: c4 27 bf f8 st %g2, [ %fp + -8 ] ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 20060bc: 82 00 40 03 add %g1, %g3, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 20060c0: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 20060c4: 88 11 21 ff or %g4, 0x1ff, %g4 ! 3b9ac9ff 20060c8: 80 a0 40 04 cmp %g1, %g4 20060cc: 08 80 00 0a bleu 20060f4 20060d0: c2 27 bf fc st %g1, [ %fp + -4 ] ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 20060d4: 07 31 19 4d sethi %hi(0xc4653400), %g3 20060d8: 86 10 e2 00 or %g3, 0x200, %g3 ! c4653600 20060dc: 82 00 40 03 add %g1, %g3, %g1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 20060e0: 80 a0 40 04 cmp %g1, %g4 20060e4: 18 bf ff fe bgu 20060dc <== NEVER TAKEN 20060e8: 84 00 a0 01 inc %g2 20060ec: c4 27 bf f8 st %g2, [ %fp + -8 ] 20060f0: c2 27 bf fc st %g1, [ %fp + -4 ] ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 20060f4: 09 31 19 4d sethi %hi(0xc4653400), %g4 20060f8: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 20060fc: 80 a0 40 04 cmp %g1, %g4 2006100: 18 80 00 0a bgu 2006128 <== NEVER TAKEN 2006104: c4 07 bf f8 ld [ %fp + -8 ], %g2 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 2006108: 07 0e e6 b2 sethi %hi(0x3b9ac800), %g3 200610c: 86 10 e2 00 or %g3, 0x200, %g3 ! 3b9aca00 2006110: 82 00 40 03 add %g1, %g3, %g1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 2006114: 80 a0 40 04 cmp %g1, %g4 2006118: 08 bf ff fe bleu 2006110 200611c: 84 00 bf ff add %g2, -1, %g2 2006120: c2 27 bf fc st %g1, [ %fp + -4 ] 2006124: c4 27 bf f8 st %g2, [ %fp + -8 ] ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 2006128: 40 00 06 6c call 2007ad8 <_TOD_Set> 200612c: 90 10 00 11 mov %l1, %o0 _Thread_Enable_dispatch(); 2006130: 40 00 0b 8b call 2008f5c <_Thread_Enable_dispatch> 2006134: 01 00 00 00 nop /* set the user's output */ if ( olddelta ) 2006138: 80 a6 60 00 cmp %i1, 0 200613c: 02 bf ff cd be 2006070 <== NEVER TAKEN 2006140: 01 00 00 00 nop *olddelta = *delta; 2006144: c2 04 00 00 ld [ %l0 ], %g1 2006148: c2 26 40 00 st %g1, [ %i1 ] 200614c: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006150: c2 26 60 04 st %g1, [ %i1 + 4 ] 2006154: 81 c7 e0 08 ret 2006158: 91 e8 20 00 restore %g0, 0, %o0 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 200615c: 40 00 2a 37 call 2010a38 <__errno> 2006160: b0 10 3f ff mov -1, %i0 2006164: 82 10 20 16 mov 0x16, %g1 2006168: c2 22 00 00 st %g1, [ %o0 ] 200616c: 81 c7 e0 08 ret 2006170: 81 e8 00 00 restore =============================================================================== 02005f60 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 2005f60: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 2005f64: 80 a6 60 00 cmp %i1, 0 2005f68: 02 80 00 20 be 2005fe8 2005f6c: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2005f70: 02 80 00 19 be 2005fd4 2005f74: 80 a6 20 04 cmp %i0, 4 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 2005f78: 02 80 00 12 be 2005fc0 <== NEVER TAKEN 2005f7c: 80 a6 20 02 cmp %i0, 2 return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 2005f80: 02 80 00 10 be 2005fc0 2005f84: 80 a6 20 03 cmp %i0, 3 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 2005f88: 02 80 00 08 be 2005fa8 2005f8c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 2005f90: 40 00 2c 11 call 2010fd4 <__errno> 2005f94: b0 10 3f ff mov -1, %i0 ! ffffffff 2005f98: 82 10 20 16 mov 0x16, %g1 2005f9c: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2005fa0: 81 c7 e0 08 ret 2005fa4: 81 e8 00 00 restore } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 2005fa8: 40 00 2c 0b call 2010fd4 <__errno> 2005fac: b0 10 3f ff mov -1, %i0 2005fb0: 82 10 20 58 mov 0x58, %g1 2005fb4: c2 22 00 00 st %g1, [ %o0 ] 2005fb8: 81 c7 e0 08 ret 2005fbc: 81 e8 00 00 restore } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 2005fc0: 90 10 00 19 mov %i1, %o0 2005fc4: 40 00 08 52 call 200810c <_TOD_Get_uptime_as_timespec> 2005fc8: b0 10 20 00 clr %i0 return 0; 2005fcc: 81 c7 e0 08 ret 2005fd0: 81 e8 00 00 restore { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 2005fd4: 90 10 00 19 mov %i1, %o0 2005fd8: 40 00 08 2e call 2008090 <_TOD_Get> 2005fdc: b0 10 20 00 clr %i0 return 0; 2005fe0: 81 c7 e0 08 ret 2005fe4: 81 e8 00 00 restore clockid_t clock_id, struct timespec *tp ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); 2005fe8: 40 00 2b fb call 2010fd4 <__errno> 2005fec: b0 10 3f ff mov -1, %i0 2005ff0: 82 10 20 16 mov 0x16, %g1 2005ff4: c2 22 00 00 st %g1, [ %o0 ] 2005ff8: 81 c7 e0 08 ret 2005ffc: 81 e8 00 00 restore =============================================================================== 02006000 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 2006000: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 2006004: 80 a6 60 00 cmp %i1, 0 2006008: 02 80 00 24 be 2006098 <== NEVER TAKEN 200600c: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2006010: 02 80 00 0c be 2006040 2006014: 80 a6 20 02 cmp %i0, 2 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 2006018: 02 80 00 1a be 2006080 200601c: 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 ) 2006020: 02 80 00 18 be 2006080 2006024: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 2006028: 40 00 2b eb call 2010fd4 <__errno> 200602c: b0 10 3f ff mov -1, %i0 ! ffffffff 2006030: 82 10 20 16 mov 0x16, %g1 2006034: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2006038: 81 c7 e0 08 ret 200603c: 81 e8 00 00 restore { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 2006040: c4 06 40 00 ld [ %i1 ], %g2 2006044: 03 08 76 b9 sethi %hi(0x21dae400), %g1 2006048: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 200604c: 80 a0 80 01 cmp %g2, %g1 2006050: 08 80 00 12 bleu 2006098 2006054: 03 00 80 7c sethi %hi(0x201f000), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006058: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 201f130 <_Thread_Dispatch_disable_level> 200605c: 84 00 a0 01 inc %g2 2006060: c4 20 61 30 st %g2, [ %g1 + 0x130 ] rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 2006064: 90 10 00 19 mov %i1, %o0 2006068: 40 00 08 3f call 2008164 <_TOD_Set> 200606c: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2006070: 40 00 0d 5e call 20095e8 <_Thread_Enable_dispatch> 2006074: 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; 2006078: 81 c7 e0 08 ret 200607c: 81 e8 00 00 restore else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 2006080: 40 00 2b d5 call 2010fd4 <__errno> 2006084: b0 10 3f ff mov -1, %i0 2006088: 82 10 20 58 mov 0x58, %g1 200608c: c2 22 00 00 st %g1, [ %o0 ] 2006090: 81 c7 e0 08 ret 2006094: 81 e8 00 00 restore if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); 2006098: 40 00 2b cf call 2010fd4 <__errno> 200609c: b0 10 3f ff mov -1, %i0 20060a0: 82 10 20 16 mov 0x16, %g1 20060a4: c2 22 00 00 st %g1, [ %o0 ] 20060a8: 81 c7 e0 08 ret 20060ac: 81 e8 00 00 restore =============================================================================== 0200f714 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 200f714: 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() ) 200f718: 7f ff fb a2 call 200e5a0 200f71c: 01 00 00 00 nop 200f720: 80 a2 00 18 cmp %o0, %i0 200f724: 12 80 00 b6 bne 200f9fc 200f728: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 200f72c: 02 80 00 ba be 200fa14 200f730: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 200f734: 80 a0 60 1f cmp %g1, 0x1f 200f738: 18 80 00 b7 bgu 200fa14 200f73c: 23 00 80 74 sethi %hi(0x201d000), %l1 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 200f740: a5 2e 60 02 sll %i1, 2, %l2 200f744: a2 14 62 d4 or %l1, 0x2d4, %l1 200f748: a7 2e 60 04 sll %i1, 4, %l3 200f74c: 84 24 c0 12 sub %l3, %l2, %g2 200f750: 84 04 40 02 add %l1, %g2, %g2 200f754: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200f758: 80 a0 a0 01 cmp %g2, 1 200f75c: 02 80 00 45 be 200f870 200f760: b0 10 20 00 clr %i0 /* * 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 ) ) 200f764: 80 a6 60 04 cmp %i1, 4 200f768: 02 80 00 44 be 200f878 200f76c: 80 a6 60 08 cmp %i1, 8 200f770: 02 80 00 42 be 200f878 200f774: 80 a6 60 0b cmp %i1, 0xb 200f778: 02 80 00 40 be 200f878 200f77c: a0 10 20 01 mov 1, %l0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 200f780: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 200f784: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 200f788: 80 a6 a0 00 cmp %i2, 0 200f78c: 02 80 00 41 be 200f890 200f790: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 200f794: c2 06 80 00 ld [ %i2 ], %g1 200f798: c2 27 bf fc st %g1, [ %fp + -4 ] 200f79c: 03 00 80 73 sethi %hi(0x201cc00), %g1 200f7a0: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 201cd40 <_Thread_Dispatch_disable_level> 200f7a4: 84 00 a0 01 inc %g2 200f7a8: c4 20 61 40 st %g2, [ %g1 + 0x140 ] /* * 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; 200f7ac: 03 00 80 73 sethi %hi(0x201cc00), %g1 200f7b0: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 201ce00 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200f7b4: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 200f7b8: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 200f7bc: 80 ac 00 02 andncc %l0, %g2, %g0 200f7c0: 12 80 00 1a bne 200f828 200f7c4: 09 00 80 75 sethi %hi(0x201d400), %g4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 200f7c8: c4 01 20 60 ld [ %g4 + 0x60 ], %g2 ! 201d460 <_POSIX_signals_Wait_queue> 200f7cc: 88 11 20 60 or %g4, 0x60, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200f7d0: 88 01 20 04 add %g4, 4, %g4 200f7d4: 80 a0 80 04 cmp %g2, %g4 200f7d8: 02 80 00 30 be 200f898 200f7dc: 82 10 00 02 mov %g2, %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200f7e0: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 200f7e4: 80 8c 00 03 btst %l0, %g3 200f7e8: 02 80 00 0c be 200f818 200f7ec: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f7f0: 10 80 00 0f b 200f82c 200f7f4: 84 10 20 01 mov 1, %g2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 200f7f8: 80 a0 80 04 cmp %g2, %g4 200f7fc: 22 80 00 28 be,a 200f89c <== ALWAYS TAKEN 200f800: 03 00 80 70 sethi %hi(0x201c000), %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200f804: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200f808: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200f80c: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 200f810: 12 80 00 06 bne 200f828 <== NOT EXECUTED 200f814: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 200f818: c6 00 e0 cc ld [ %g3 + 0xcc ], %g3 200f81c: 80 ac 00 03 andncc %l0, %g3, %g0 200f820: 22 bf ff f6 be,a 200f7f8 200f824: c4 00 80 00 ld [ %g2 ], %g2 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f828: 84 10 20 01 mov 1, %g2 /* * 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 ) ) { 200f82c: 90 10 00 01 mov %g1, %o0 200f830: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f834: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * 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 ) ) { 200f838: 40 00 00 ba call 200fb20 <_POSIX_signals_Unblock_thread> 200f83c: 94 07 bf f4 add %fp, -12, %o2 200f840: 80 8a 20 ff btst 0xff, %o0 200f844: 12 80 00 5a bne 200f9ac 200f848: 01 00 00 00 nop /* * 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 ); 200f84c: 40 00 00 a5 call 200fae0 <_POSIX_signals_Set_process_signals> 200f850: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 200f854: a4 24 c0 12 sub %l3, %l2, %l2 200f858: c2 04 40 12 ld [ %l1 + %l2 ], %g1 200f85c: 80 a0 60 02 cmp %g1, 2 200f860: 02 80 00 57 be 200f9bc 200f864: 11 00 80 75 sethi %hi(0x201d400), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 200f868: 7f ff e2 d2 call 20083b0 <_Thread_Enable_dispatch> 200f86c: b0 10 20 00 clr %i0 return 0; } 200f870: 81 c7 e0 08 ret 200f874: 81 e8 00 00 restore * 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 ) ) return pthread_kill( pthread_self(), sig ); 200f878: 40 00 01 38 call 200fd58 200f87c: 01 00 00 00 nop 200f880: 40 00 00 f9 call 200fc64 200f884: 92 10 00 19 mov %i1, %o1 200f888: 81 c7 e0 08 ret 200f88c: 91 e8 00 08 restore %g0, %o0, %o0 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 200f890: 10 bf ff c3 b 200f79c 200f894: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 200f898: 03 00 80 70 sethi %hi(0x201c000), %g1 200f89c: da 08 62 24 ldub [ %g1 + 0x224 ], %o5 ! 201c224 200f8a0: 13 00 80 73 sethi %hi(0x201cc00), %o1 200f8a4: 9a 03 60 01 inc %o5 200f8a8: 92 12 60 a8 or %o1, 0xa8, %o1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 200f8ac: 82 10 20 00 clr %g1 200f8b0: 90 02 60 0c add %o1, 0xc, %o0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 200f8b4: 35 04 00 00 sethi %hi(0x10000000), %i2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 200f8b8: c4 02 40 00 ld [ %o1 ], %g2 200f8bc: 80 a0 a0 00 cmp %g2, 0 200f8c0: 22 80 00 2d be,a 200f974 200f8c4: 92 02 60 04 add %o1, 4, %o1 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 200f8c8: c4 00 a0 04 ld [ %g2 + 4 ], %g2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 200f8cc: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 200f8d0: 80 a3 20 00 cmp %o4, 0 200f8d4: 02 80 00 27 be 200f970 200f8d8: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3 200f8dc: 84 10 20 01 mov 1, %g2 the_thread = (Thread_Control *) object_table[ index ]; 200f8e0: 87 28 a0 02 sll %g2, 2, %g3 200f8e4: c6 02 c0 03 ld [ %o3 + %g3 ], %g3 if ( !the_thread ) 200f8e8: 80 a0 e0 00 cmp %g3, 0 200f8ec: 02 80 00 1e be 200f964 200f8f0: 84 00 a0 01 inc %g2 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 200f8f4: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4 200f8f8: 80 a1 00 0d cmp %g4, %o5 200f8fc: 18 80 00 1b bgu 200f968 200f900: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200f904: d4 00 e1 6c ld [ %g3 + 0x16c ], %o2 200f908: d4 02 a0 cc ld [ %o2 + 0xcc ], %o2 200f90c: 80 ac 00 0a andncc %l0, %o2, %g0 200f910: 02 80 00 16 be 200f968 200f914: 80 a3 00 02 cmp %o4, %g2 * * 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 ) { 200f918: 80 a1 00 0d cmp %g4, %o5 200f91c: 2a 80 00 11 bcs,a 200f960 200f920: 9a 10 00 04 mov %g4, %o5 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 200f924: d4 00 60 10 ld [ %g1 + 0x10 ], %o2 200f928: 80 a2 a0 00 cmp %o2, 0 200f92c: 02 80 00 0f be 200f968 <== NEVER TAKEN 200f930: 80 a3 00 02 cmp %o4, %g2 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 200f934: de 00 e0 10 ld [ %g3 + 0x10 ], %o7 200f938: 80 a3 e0 00 cmp %o7, 0 200f93c: 22 80 00 09 be,a 200f960 200f940: 9a 10 00 04 mov %g4, %o5 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 200f944: 80 8a 80 1a btst %o2, %i2 200f948: 12 80 00 08 bne 200f968 200f94c: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 200f950: 80 8b c0 1a btst %o7, %i2 200f954: 02 80 00 05 be 200f968 200f958: 80 a3 00 02 cmp %o4, %g2 200f95c: 9a 10 00 04 mov %g4, %o5 200f960: 82 10 00 03 mov %g3, %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 200f964: 80 a3 00 02 cmp %o4, %g2 200f968: 1a bf ff df bcc 200f8e4 200f96c: 87 28 a0 02 sll %g2, 2, %g3 200f970: 92 02 60 04 add %o1, 4, %o1 * + 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++) { 200f974: 80 a2 40 08 cmp %o1, %o0 200f978: 32 bf ff d1 bne,a 200f8bc 200f97c: c4 02 40 00 ld [ %o1 ], %g2 } } } } if ( interested ) { 200f980: 80 a0 60 00 cmp %g1, 0 200f984: 02 bf ff b2 be 200f84c 200f988: 84 10 20 01 mov 1, %g2 /* * 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 ) ) { 200f98c: 90 10 00 01 mov %g1, %o0 200f990: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f994: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * 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 ) ) { 200f998: 40 00 00 62 call 200fb20 <_POSIX_signals_Unblock_thread> 200f99c: 94 07 bf f4 add %fp, -12, %o2 200f9a0: 80 8a 20 ff btst 0xff, %o0 200f9a4: 02 bf ff aa be 200f84c <== ALWAYS TAKEN 200f9a8: 01 00 00 00 nop _Thread_Enable_dispatch(); 200f9ac: 7f ff e2 81 call 20083b0 <_Thread_Enable_dispatch> 200f9b0: b0 10 20 00 clr %i0 ! 0 return 0; 200f9b4: 81 c7 e0 08 ret 200f9b8: 81 e8 00 00 restore */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 200f9bc: 7f ff f3 f2 call 200c984 <_Chain_Get> 200f9c0: 90 12 20 54 or %o0, 0x54, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 200f9c4: 80 a2 20 00 cmp %o0, 0 200f9c8: 02 80 00 19 be 200fa2c 200f9cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 200f9d0: 92 10 00 08 mov %o0, %o1 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 200f9d4: c2 22 20 08 st %g1, [ %o0 + 8 ] 200f9d8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f9dc: c2 22 20 0c st %g1, [ %o0 + 0xc ] 200f9e0: c2 07 bf fc ld [ %fp + -4 ], %g1 200f9e4: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 200f9e8: 11 00 80 75 sethi %hi(0x201d400), %o0 200f9ec: 90 12 20 cc or %o0, 0xcc, %o0 ! 201d4cc <_POSIX_signals_Siginfo> 200f9f0: 7f ff dc 23 call 2006a7c <_Chain_Append> 200f9f4: 90 02 00 12 add %o0, %l2, %o0 200f9f8: 30 bf ff 9c b,a 200f868 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 200f9fc: 40 00 01 0c call 200fe2c <__errno> 200fa00: b0 10 3f ff mov -1, %i0 200fa04: 82 10 20 03 mov 3, %g1 200fa08: c2 22 00 00 st %g1, [ %o0 ] 200fa0c: 81 c7 e0 08 ret 200fa10: 81 e8 00 00 restore */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 200fa14: 40 00 01 06 call 200fe2c <__errno> 200fa18: b0 10 3f ff mov -1, %i0 200fa1c: 82 10 20 16 mov 0x16, %g1 200fa20: c2 22 00 00 st %g1, [ %o0 ] 200fa24: 81 c7 e0 08 ret 200fa28: 81 e8 00 00 restore if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 200fa2c: 7f ff e2 61 call 20083b0 <_Thread_Enable_dispatch> 200fa30: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 200fa34: 40 00 00 fe call 200fe2c <__errno> 200fa38: 01 00 00 00 nop 200fa3c: 82 10 20 0b mov 0xb, %g1 ! b 200fa40: c2 22 00 00 st %g1, [ %o0 ] 200fa44: 81 c7 e0 08 ret 200fa48: 81 e8 00 00 restore =============================================================================== 0200aff4 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 200aff4: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200aff8: 03 00 80 9b sethi %hi(0x2026c00), %g1 200affc: c4 00 62 60 ld [ %g1 + 0x260 ], %g2 ! 2026e60 <_Thread_Dispatch_disable_level> Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); 200b000: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 200b004: 84 00 a0 01 inc %g2 200b008: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 200b00c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 200b010: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 200b014: c4 20 62 60 st %g2, [ %g1 + 0x260 ] POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 200b018: a6 8e 62 00 andcc %i1, 0x200, %l3 200b01c: 12 80 00 34 bne 200b0ec 200b020: 23 00 80 9c sethi %hi(0x2027000), %l1 200b024: a8 10 20 00 clr %l4 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 200b028: 40 00 0c 1b call 200e094 <_Objects_Allocate> 200b02c: 90 14 63 7c or %l1, 0x37c, %o0 attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 200b030: a0 92 20 00 orcc %o0, 0, %l0 200b034: 02 80 00 36 be 200b10c <== NEVER TAKEN 200b038: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 200b03c: f2 24 20 14 st %i1, [ %l0 + 0x14 ] status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 200b040: 90 10 00 18 mov %i0, %o0 200b044: 40 00 1f 37 call 2012d20 <_POSIX_Message_queue_Name_to_id> 200b048: 92 07 bf f8 add %fp, -8, %o1 * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 200b04c: a4 92 20 00 orcc %o0, 0, %l2 200b050: 22 80 00 0f be,a 200b08c 200b054: 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) ) ) { 200b058: 80 a4 a0 02 cmp %l2, 2 200b05c: 02 80 00 3f be 200b158 200b060: 80 a4 e0 00 cmp %l3, 0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 200b064: 90 14 63 7c or %l1, 0x37c, %o0 200b068: 40 00 0c f7 call 200e444 <_Objects_Free> 200b06c: 92 10 00 10 mov %l0, %o1 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 200b070: 40 00 0f ee call 200f028 <_Thread_Enable_dispatch> 200b074: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 200b078: 40 00 2f 25 call 2016d0c <__errno> 200b07c: 01 00 00 00 nop 200b080: e4 22 00 00 st %l2, [ %o0 ] 200b084: 81 c7 e0 08 ret 200b088: 81 e8 00 00 restore } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 200b08c: 80 a6 6a 00 cmp %i1, 0xa00 200b090: 02 80 00 27 be 200b12c 200b094: d2 07 bf f8 ld [ %fp + -8 ], %o1 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 200b098: 94 07 bf f0 add %fp, -16, %o2 200b09c: 11 00 80 9c sethi %hi(0x2027000), %o0 200b0a0: 40 00 0d 51 call 200e5e4 <_Objects_Get> 200b0a4: 90 12 21 f0 or %o0, 0x1f0, %o0 ! 20271f0 <_POSIX_Message_queue_Information> /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 200b0a8: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200b0ac: a2 14 63 7c or %l1, 0x37c, %l1 200b0b0: 82 00 60 01 inc %g1 200b0b4: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 200b0b8: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 200b0bc: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 200b0c0: d0 27 bf f4 st %o0, [ %fp + -12 ] 200b0c4: 83 28 60 02 sll %g1, 2, %g1 200b0c8: e0 20 80 01 st %l0, [ %g2 + %g1 ] the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 200b0cc: d0 24 20 10 st %o0, [ %l0 + 0x10 ] _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 200b0d0: 40 00 0f d6 call 200f028 <_Thread_Enable_dispatch> 200b0d4: c0 24 20 0c clr [ %l0 + 0xc ] _Thread_Enable_dispatch(); 200b0d8: 40 00 0f d4 call 200f028 <_Thread_Enable_dispatch> 200b0dc: 01 00 00 00 nop return (mqd_t)the_mq_fd->Object.id; 200b0e0: f0 04 20 08 ld [ %l0 + 8 ], %i0 200b0e4: 81 c7 e0 08 ret 200b0e8: 81 e8 00 00 restore _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 200b0ec: 82 07 a0 54 add %fp, 0x54, %g1 200b0f0: e8 07 a0 50 ld [ %fp + 0x50 ], %l4 200b0f4: c2 27 bf fc st %g1, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 200b0f8: 40 00 0b e7 call 200e094 <_Objects_Allocate> 200b0fc: 90 14 63 7c or %l1, 0x37c, %o0 va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 200b100: a0 92 20 00 orcc %o0, 0, %l0 200b104: 32 bf ff cf bne,a 200b040 200b108: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _Thread_Enable_dispatch(); 200b10c: 40 00 0f c7 call 200f028 <_Thread_Enable_dispatch> 200b110: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENFILE ); 200b114: 40 00 2e fe call 2016d0c <__errno> 200b118: 01 00 00 00 nop 200b11c: 82 10 20 17 mov 0x17, %g1 ! 17 200b120: c2 22 00 00 st %g1, [ %o0 ] 200b124: 81 c7 e0 08 ret 200b128: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 200b12c: 90 14 63 7c or %l1, 0x37c, %o0 200b130: 40 00 0c c5 call 200e444 <_Objects_Free> 200b134: 92 10 00 10 mov %l0, %o1 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 200b138: 40 00 0f bc call 200f028 <_Thread_Enable_dispatch> 200b13c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 200b140: 40 00 2e f3 call 2016d0c <__errno> 200b144: 01 00 00 00 nop 200b148: 82 10 20 11 mov 0x11, %g1 ! 11 200b14c: c2 22 00 00 st %g1, [ %o0 ] 200b150: 81 c7 e0 08 ret 200b154: 81 e8 00 00 restore if ( status ) { /* * 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) ) ) { 200b158: 02 bf ff c4 be 200b068 200b15c: 90 14 63 7c or %l1, 0x37c, %o0 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 200b160: 90 10 00 18 mov %i0, %o0 200b164: 94 10 00 14 mov %l4, %o2 200b168: 92 10 20 01 mov 1, %o1 200b16c: 40 00 1e 8a call 2012b94 <_POSIX_Message_queue_Create_support> 200b170: 96 07 bf f4 add %fp, -12, %o3 ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 200b174: 80 a2 3f ff cmp %o0, -1 200b178: 02 80 00 0e be 200b1b0 200b17c: 90 14 63 7c or %l1, 0x37c, %o0 200b180: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 200b184: a2 14 63 7c or %l1, 0x37c, %l1 200b188: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 200b18c: 83 28 60 02 sll %g1, 2, %g1 200b190: e0 20 80 01 st %l0, [ %g2 + %g1 ] _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 200b194: c2 07 bf f4 ld [ %fp + -12 ], %g1 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 200b198: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 200b19c: 40 00 0f a3 call 200f028 <_Thread_Enable_dispatch> 200b1a0: c2 24 20 10 st %g1, [ %l0 + 0x10 ] return (mqd_t) the_mq_fd->Object.id; 200b1a4: f0 04 20 08 ld [ %l0 + 8 ], %i0 } 200b1a8: 81 c7 e0 08 ret 200b1ac: 81 e8 00 00 restore 200b1b0: 92 10 00 10 mov %l0, %o1 200b1b4: 40 00 0c a4 call 200e444 <_Objects_Free> 200b1b8: b0 10 3f ff mov -1, %i0 /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 200b1bc: 40 00 0f 9b call 200f028 <_Thread_Enable_dispatch> 200b1c0: 01 00 00 00 nop return (mqd_t) -1; 200b1c4: 81 c7 e0 08 ret 200b1c8: 81 e8 00 00 restore =============================================================================== 0201b258 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 201b258: 9d e3 bf a0 save %sp, -96, %sp Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 201b25c: 40 00 00 74 call 201b42c <_Timespec_Is_valid> 201b260: 90 10 00 18 mov %i0, %o0 201b264: 80 8a 20 ff btst 0xff, %o0 201b268: 02 80 00 43 be 201b374 201b26c: 01 00 00 00 nop * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 201b270: c2 06 00 00 ld [ %i0 ], %g1 201b274: 80 a0 60 00 cmp %g1, 0 201b278: 06 80 00 3f bl 201b374 <== NEVER TAKEN 201b27c: 01 00 00 00 nop 201b280: c2 06 20 04 ld [ %i0 + 4 ], %g1 201b284: 80 a0 60 00 cmp %g1, 0 201b288: 06 80 00 3b bl 201b374 <== NEVER TAKEN 201b28c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 201b290: 7f ff c9 f8 call 200da70 <_Timespec_To_ticks> 201b294: 90 10 00 18 mov %i0, %o0 * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 201b298: b0 92 20 00 orcc %o0, 0, %i0 201b29c: 02 80 00 28 be 201b33c 201b2a0: 03 00 80 77 sethi %hi(0x201dc00), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 201b2a4: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 201de40 <_Thread_Dispatch_disable_level> 201b2a8: 84 00 a0 01 inc %g2 201b2ac: c4 20 62 40 st %g2, [ %g1 + 0x240 ] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 201b2b0: 21 00 80 77 sethi %hi(0x201dc00), %l0 201b2b4: d0 04 23 00 ld [ %l0 + 0x300 ], %o0 ! 201df00 <_Thread_Executing> 201b2b8: 13 04 00 00 sethi %hi(0x10000000), %o1 201b2bc: 7f ff b7 f9 call 20092a0 <_Thread_Set_state> 201b2c0: 92 12 60 08 or %o1, 8, %o1 ! 10000008 _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, 201b2c4: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 201b2c8: 11 00 80 77 sethi %hi(0x201dc00), %o0 _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 201b2cc: c4 00 60 08 ld [ %g1 + 8 ], %g2 201b2d0: 90 12 23 20 or %o0, 0x320, %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 201b2d4: c4 20 60 68 st %g2, [ %g1 + 0x68 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 201b2d8: 92 00 60 48 add %g1, 0x48, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 201b2dc: 05 00 80 21 sethi %hi(0x2008400), %g2 201b2e0: 84 10 a2 78 or %g2, 0x278, %g2 ! 2008678 <_Thread_Delay_ended> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 201b2e4: c0 20 60 50 clr [ %g1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 201b2e8: c0 20 60 6c clr [ %g1 + 0x6c ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 201b2ec: f0 20 60 54 st %i0, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 201b2f0: 7f ff ba 38 call 2009bd0 <_Watchdog_Insert> 201b2f4: c4 20 60 64 st %g2, [ %g1 + 0x64 ] _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 201b2f8: 7f ff b5 58 call 2008858 <_Thread_Enable_dispatch> 201b2fc: 01 00 00 00 nop /* calculate time remaining */ if ( rmtp ) { 201b300: 80 a6 60 00 cmp %i1, 0 201b304: 02 80 00 0c be 201b334 201b308: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 201b30c: 92 10 00 19 mov %i1, %o1 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 201b310: c4 00 60 60 ld [ %g1 + 0x60 ], %g2 201b314: c2 00 60 5c ld [ %g1 + 0x5c ], %g1 201b318: 82 20 40 02 sub %g1, %g2, %g1 201b31c: b0 00 40 18 add %g1, %i0, %i0 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 201b320: 40 00 00 2e call 201b3d8 <_Timespec_From_ticks> 201b324: 90 10 00 18 mov %i0, %o0 */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 201b328: 80 a6 20 00 cmp %i0, 0 201b32c: 12 80 00 18 bne 201b38c 201b330: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 201b334: 81 c7 e0 08 ret 201b338: 91 e8 20 00 restore %g0, 0, %o0 201b33c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 201b340: 84 00 a0 01 inc %g2 201b344: c4 20 62 40 st %g2, [ %g1 + 0x240 ] * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); 201b348: 7f ff b8 da call 20096b0 <_Thread_Yield_processor> 201b34c: 01 00 00 00 nop _Thread_Enable_dispatch(); 201b350: 7f ff b5 42 call 2008858 <_Thread_Enable_dispatch> 201b354: 01 00 00 00 nop if ( rmtp ) { 201b358: 80 a6 60 00 cmp %i1, 0 201b35c: 02 bf ff f6 be 201b334 201b360: 01 00 00 00 nop rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 201b364: c0 26 60 04 clr [ %i1 + 4 ] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 201b368: c0 26 40 00 clr [ %i1 ] 201b36c: 81 c7 e0 08 ret 201b370: 81 e8 00 00 restore * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); 201b374: 7f ff d3 f1 call 2010338 <__errno> 201b378: b0 10 3f ff mov -1, %i0 201b37c: 82 10 20 16 mov 0x16, %g1 201b380: c2 22 00 00 st %g1, [ %o0 ] 201b384: 81 c7 e0 08 ret 201b388: 81 e8 00 00 restore #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 201b38c: 7f ff d3 eb call 2010338 <__errno> 201b390: b0 10 3f ff mov -1, %i0 201b394: 82 10 20 04 mov 4, %g1 201b398: c2 22 00 00 st %g1, [ %o0 ] 201b39c: 81 c7 e0 08 ret 201b3a0: 81 e8 00 00 restore =============================================================================== 0200aa04 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 200aa04: 80 a2 20 00 cmp %o0, 0 200aa08: 02 80 00 11 be 200aa4c 200aa0c: 01 00 00 00 nop 200aa10: c2 02 00 00 ld [ %o0 ], %g1 200aa14: 80 a0 60 00 cmp %g1, 0 200aa18: 02 80 00 0d be 200aa4c 200aa1c: 80 a2 60 04 cmp %o1, 4 return EINVAL; switch ( policy ) { 200aa20: 08 80 00 04 bleu 200aa30 200aa24: 82 10 20 01 mov 1, %g1 200aa28: 81 c3 e0 08 retl 200aa2c: 90 10 20 86 mov 0x86, %o0 200aa30: 83 28 40 09 sll %g1, %o1, %g1 200aa34: 80 88 60 17 btst 0x17, %g1 200aa38: 02 bf ff fc be 200aa28 <== NEVER TAKEN 200aa3c: 01 00 00 00 nop case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 200aa40: d2 22 20 14 st %o1, [ %o0 + 0x14 ] return 0; 200aa44: 81 c3 e0 08 retl 200aa48: 90 10 20 00 clr %o0 default: return ENOTSUP; } } 200aa4c: 81 c3 e0 08 retl 200aa50: 90 10 20 16 mov 0x16, %o0 =============================================================================== 02006574 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 2006574: 9d e3 bf 90 save %sp, -112, %sp const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 2006578: 80 a6 20 00 cmp %i0, 0 200657c: 02 80 00 27 be 2006618 2006580: 80 a6 a0 00 cmp %i2, 0 return EINVAL; if ( count == 0 ) 2006584: 02 80 00 25 be 2006618 2006588: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 200658c: 22 80 00 29 be,a 2006630 2006590: b2 07 bf f0 add %fp, -16, %i1 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 2006594: c2 06 40 00 ld [ %i1 ], %g1 2006598: 80 a0 60 00 cmp %g1, 0 200659c: 02 80 00 1f be 2006618 20065a0: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 20065a4: c2 06 60 04 ld [ %i1 + 4 ], %g1 20065a8: 80 a0 60 00 cmp %g1, 0 20065ac: 12 80 00 1b bne 2006618 <== NEVER TAKEN 20065b0: 03 00 80 79 sethi %hi(0x201e400), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20065b4: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 201e6c0 <_Thread_Dispatch_disable_level> /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 20065b8: f4 27 bf fc st %i2, [ %fp + -4 ] 20065bc: 84 00 a0 01 inc %g2 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 20065c0: c0 27 bf f8 clr [ %fp + -8 ] 20065c4: c4 20 62 c0 st %g2, [ %g1 + 0x2c0 ] * 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 *) 20065c8: 23 00 80 7a sethi %hi(0x201e800), %l1 20065cc: 40 00 08 95 call 2008820 <_Objects_Allocate> 20065d0: 90 14 62 d0 or %l1, 0x2d0, %o0 ! 201ead0 <_POSIX_Barrier_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 20065d4: a0 92 20 00 orcc %o0, 0, %l0 20065d8: 02 80 00 12 be 2006620 20065dc: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 20065e0: 40 00 06 07 call 2007dfc <_CORE_barrier_Initialize> 20065e4: 92 07 bf f8 add %fp, -8, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 20065e8: c4 14 20 0a lduh [ %l0 + 0xa ], %g2 20065ec: a2 14 62 d0 or %l1, 0x2d0, %l1 20065f0: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 20065f4: c2 04 20 08 ld [ %l0 + 8 ], %g1 20065f8: 85 28 a0 02 sll %g2, 2, %g2 20065fc: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 2006600: c0 24 20 0c clr [ %l0 + 0xc ] ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 2006604: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 2006608: 40 00 0c 3f call 2009704 <_Thread_Enable_dispatch> 200660c: b0 10 20 00 clr %i0 return 0; 2006610: 81 c7 e0 08 ret 2006614: 81 e8 00 00 restore } 2006618: 81 c7 e0 08 ret 200661c: 91 e8 20 16 restore %g0, 0x16, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 2006620: 40 00 0c 39 call 2009704 <_Thread_Enable_dispatch> 2006624: b0 10 20 0b mov 0xb, %i0 return EAGAIN; 2006628: 81 c7 e0 08 ret 200662c: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 2006630: 7f ff ff 9b call 200649c 2006634: 90 10 00 19 mov %i1, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 2006638: 10 bf ff d8 b 2006598 200663c: c2 06 40 00 ld [ %i1 ], %g1 =============================================================================== 02005d04 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 2005d04: 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 ) 2005d08: 80 a6 20 00 cmp %i0, 0 2005d0c: 02 80 00 12 be 2005d54 2005d10: 03 00 80 7a sethi %hi(0x201e800), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005d14: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 201eb30 <_Thread_Dispatch_disable_level> 2005d18: 84 00 a0 01 inc %g2 2005d1c: c4 20 63 30 st %g2, [ %g1 + 0x330 ] return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 2005d20: 40 00 12 2e call 200a5d8 <_Workspace_Allocate> 2005d24: 90 10 20 10 mov 0x10, %o0 if ( handler ) { 2005d28: 92 92 20 00 orcc %o0, 0, %o1 2005d2c: 02 80 00 08 be 2005d4c <== NEVER TAKEN 2005d30: 03 00 80 7a sethi %hi(0x201e800), %g1 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 2005d34: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 201ebf0 <_Thread_Executing> handler->routine = routine; 2005d38: f0 22 60 08 st %i0, [ %o1 + 8 ] handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 2005d3c: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 handler->routine = routine; handler->arg = arg; 2005d40: f2 22 60 0c st %i1, [ %o1 + 0xc ] _Chain_Append( handler_stack, &handler->Node ); 2005d44: 40 00 06 4f call 2007680 <_Chain_Append> 2005d48: 90 02 20 e0 add %o0, 0xe0, %o0 } _Thread_Enable_dispatch(); 2005d4c: 40 00 0c 6c call 2008efc <_Thread_Enable_dispatch> 2005d50: 81 e8 00 00 restore 2005d54: 81 c7 e0 08 ret 2005d58: 81 e8 00 00 restore =============================================================================== 02006e38 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 2006e38: 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; 2006e3c: 25 00 80 77 sethi %hi(0x201dc00), %l2 2006e40: 80 a6 60 00 cmp %i1, 0 2006e44: 02 80 00 03 be 2006e50 2006e48: a4 14 a2 a0 or %l2, 0x2a0, %l2 2006e4c: a4 10 00 19 mov %i1, %l2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 2006e50: c2 04 a0 04 ld [ %l2 + 4 ], %g1 2006e54: 80 a0 60 01 cmp %g1, 1 2006e58: 02 80 00 06 be 2006e70 <== NEVER TAKEN 2006e5c: 01 00 00 00 nop return EINVAL; if ( !the_attr->is_initialized ) 2006e60: c2 04 80 00 ld [ %l2 ], %g1 2006e64: 80 a0 60 00 cmp %g1, 0 2006e68: 12 80 00 04 bne 2006e78 2006e6c: 03 00 80 7e sethi %hi(0x201f800), %g1 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 2006e70: 81 c7 e0 08 ret 2006e74: 91 e8 20 16 restore %g0, 0x16, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006e78: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 2006e7c: 84 00 a0 01 inc %g2 2006e80: c4 20 62 40 st %g2, [ %g1 + 0x240 ] */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 2006e84: 23 00 80 7f sethi %hi(0x201fc00), %l1 2006e88: 40 00 0a 29 call 200972c <_Objects_Allocate> 2006e8c: 90 14 62 e8 or %l1, 0x2e8, %o0 ! 201fee8 <_POSIX_Condition_variables_Information> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 2006e90: a0 92 20 00 orcc %o0, 0, %l0 2006e94: 02 80 00 15 be 2006ee8 2006e98: 90 04 20 18 add %l0, 0x18, %o0 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 2006e9c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 2006ea0: c2 24 20 10 st %g1, [ %l0 + 0x10 ] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 2006ea4: 92 10 20 00 clr %o1 2006ea8: 94 10 28 00 mov 0x800, %o2 2006eac: 96 10 20 74 mov 0x74, %o3 2006eb0: 40 00 10 28 call 200af50 <_Thread_queue_Initialize> 2006eb4: c0 24 20 14 clr [ %l0 + 0x14 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2006eb8: c4 14 20 0a lduh [ %l0 + 0xa ], %g2 2006ebc: a2 14 62 e8 or %l1, 0x2e8, %l1 2006ec0: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 2006ec4: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006ec8: 85 28 a0 02 sll %g2, 2, %g2 2006ecc: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 2006ed0: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 2006ed4: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 2006ed8: 40 00 0d ce call 200a610 <_Thread_Enable_dispatch> 2006edc: b0 10 20 00 clr %i0 return 0; 2006ee0: 81 c7 e0 08 ret 2006ee4: 81 e8 00 00 restore _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 2006ee8: 40 00 0d ca call 200a610 <_Thread_Enable_dispatch> 2006eec: b0 10 20 0c mov 0xc, %i0 return ENOMEM; 2006ef0: 81 c7 e0 08 ret 2006ef4: 81 e8 00 00 restore =============================================================================== 02006cac : int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) 2006cac: 80 a2 20 00 cmp %o0, 0 2006cb0: 02 80 00 09 be 2006cd4 2006cb4: 01 00 00 00 nop 2006cb8: c2 02 00 00 ld [ %o0 ], %g1 2006cbc: 80 a0 60 00 cmp %g1, 0 2006cc0: 02 80 00 05 be 2006cd4 <== NEVER TAKEN 2006cc4: 01 00 00 00 nop return EINVAL; attr->is_initialized = false; 2006cc8: c0 22 00 00 clr [ %o0 ] return 0; 2006ccc: 81 c3 e0 08 retl 2006cd0: 90 10 20 00 clr %o0 } 2006cd4: 81 c3 e0 08 retl 2006cd8: 90 10 20 16 mov 0x16, %o0 =============================================================================== 0200624c : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 200624c: 9d e3 bf 58 save %sp, -168, %sp 2006250: a0 10 00 18 mov %i0, %l0 int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 2006254: 80 a6 a0 00 cmp %i2, 0 2006258: 02 80 00 66 be 20063f0 200625c: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 2006260: 23 00 80 71 sethi %hi(0x201c400), %l1 2006264: 80 a6 60 00 cmp %i1, 0 2006268: 02 80 00 03 be 2006274 200626c: a2 14 62 20 or %l1, 0x220, %l1 2006270: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 2006274: c2 04 40 00 ld [ %l1 ], %g1 2006278: 80 a0 60 00 cmp %g1, 0 200627c: 22 80 00 5d be,a 20063f0 2006280: b0 10 20 16 mov 0x16, %i0 * 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) ) 2006284: c2 04 60 04 ld [ %l1 + 4 ], %g1 2006288: 80 a0 60 00 cmp %g1, 0 200628c: 02 80 00 07 be 20062a8 2006290: 03 00 80 75 sethi %hi(0x201d400), %g1 2006294: c4 04 60 08 ld [ %l1 + 8 ], %g2 2006298: c2 00 62 a4 ld [ %g1 + 0x2a4 ], %g1 200629c: 80 a0 80 01 cmp %g2, %g1 20062a0: 2a 80 00 54 bcs,a 20063f0 20062a4: b0 10 20 16 mov 0x16, %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 ) { 20062a8: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20062ac: 80 a0 60 01 cmp %g1, 1 20062b0: 02 80 00 52 be 20063f8 20062b4: 80 a0 60 02 cmp %g1, 2 20062b8: 22 80 00 04 be,a 20062c8 20062bc: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 20062c0: 81 c7 e0 08 ret 20062c4: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 20062c8: e4 04 60 14 ld [ %l1 + 0x14 ], %l2 schedparam = the_attr->schedparam; 20062cc: c2 27 bf dc st %g1, [ %fp + -36 ] 20062d0: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 20062d4: c2 27 bf e0 st %g1, [ %fp + -32 ] 20062d8: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 20062dc: c2 27 bf e4 st %g1, [ %fp + -28 ] 20062e0: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 20062e4: c2 27 bf e8 st %g1, [ %fp + -24 ] 20062e8: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 20062ec: c2 27 bf ec st %g1, [ %fp + -20 ] 20062f0: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 20062f4: c2 27 bf f0 st %g1, [ %fp + -16 ] 20062f8: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 20062fc: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 2006300: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2006304: 80 a0 60 00 cmp %g1, 0 2006308: 12 80 00 3a bne 20063f0 200630c: b0 10 20 86 mov 0x86, %i0 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 2006310: 40 00 1c 91 call 200d554 <_POSIX_Priority_Is_valid> 2006314: d0 07 bf dc ld [ %fp + -36 ], %o0 2006318: 80 8a 20 ff btst 0xff, %o0 200631c: 02 80 00 35 be 20063f0 <== NEVER TAKEN 2006320: b0 10 20 16 mov 0x16, %i0 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 2006324: 03 00 80 75 sethi %hi(0x201d400), %g1 return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 2006328: ea 07 bf dc ld [ %fp + -36 ], %l5 200632c: ec 08 62 a8 ldub [ %g1 + 0x2a8 ], %l6 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 2006330: 90 10 00 12 mov %l2, %o0 2006334: 92 07 bf dc add %fp, -36, %o1 2006338: 94 07 bf fc add %fp, -4, %o2 200633c: 40 00 1c 93 call 200d588 <_POSIX_Thread_Translate_sched_param> 2006340: 96 07 bf f8 add %fp, -8, %o3 schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 2006344: b0 92 20 00 orcc %o0, 0, %i0 2006348: 12 80 00 2a bne 20063f0 200634c: 29 00 80 78 sethi %hi(0x201e000), %l4 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 2006350: d0 05 22 48 ld [ %l4 + 0x248 ], %o0 ! 201e248 <_RTEMS_Allocator_Mutex> 2006354: 40 00 06 61 call 2007cd8 <_API_Mutex_Lock> 2006358: 2f 00 80 79 sethi %hi(0x201e400), %l7 * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 200635c: 40 00 08 e7 call 20086f8 <_Objects_Allocate> 2006360: 90 15 e0 20 or %l7, 0x20, %o0 ! 201e420 <_POSIX_Threads_Information> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 2006364: a6 92 20 00 orcc %o0, 0, %l3 2006368: 02 80 00 1f be 20063e4 200636c: 05 00 80 75 sethi %hi(0x201d400), %g2 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 2006370: c2 04 60 08 ld [ %l1 + 8 ], %g1 2006374: d6 00 a2 a4 ld [ %g2 + 0x2a4 ], %o3 2006378: c0 27 bf d4 clr [ %fp + -44 ] 200637c: 97 2a e0 01 sll %o3, 1, %o3 2006380: 80 a2 c0 01 cmp %o3, %g1 2006384: 1a 80 00 03 bcc 2006390 2006388: d4 04 60 04 ld [ %l1 + 4 ], %o2 200638c: 96 10 00 01 mov %g1, %o3 2006390: c2 07 bf fc ld [ %fp + -4 ], %g1 2006394: 9a 0d a0 ff and %l6, 0xff, %o5 2006398: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 200639c: c2 07 bf f8 ld [ %fp + -8 ], %g1 20063a0: 9a 23 40 15 sub %o5, %l5, %o5 20063a4: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 20063a8: 82 07 bf d4 add %fp, -44, %g1 20063ac: c0 23 a0 68 clr [ %sp + 0x68 ] 20063b0: 90 15 e0 20 or %l7, 0x20, %o0 20063b4: aa 10 20 01 mov 1, %l5 20063b8: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 20063bc: ea 23 a0 5c st %l5, [ %sp + 0x5c ] 20063c0: 92 10 00 13 mov %l3, %o1 20063c4: 40 00 0c d5 call 2009718 <_Thread_Initialize> 20063c8: 98 10 20 01 mov 1, %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 20063cc: 80 8a 20 ff btst 0xff, %o0 20063d0: 12 80 00 1d bne 2006444 20063d4: 11 00 80 79 sethi %hi(0x201e400), %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 20063d8: 92 10 00 13 mov %l3, %o1 20063dc: 40 00 09 b3 call 2008aa8 <_Objects_Free> 20063e0: 90 12 20 20 or %o0, 0x20, %o0 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 20063e4: d0 05 22 48 ld [ %l4 + 0x248 ], %o0 20063e8: 40 00 06 52 call 2007d30 <_API_Mutex_Unlock> 20063ec: b0 10 20 0b mov 0xb, %i0 return EAGAIN; 20063f0: 81 c7 e0 08 ret 20063f4: 81 e8 00 00 restore * 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 ]; 20063f8: 03 00 80 78 sethi %hi(0x201e000), %g1 20063fc: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 201e250 <_Thread_Executing> 2006400: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 2006404: c4 00 60 84 ld [ %g1 + 0x84 ], %g2 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 2006408: e4 00 60 80 ld [ %g1 + 0x80 ], %l2 schedparam = api->schedparam; 200640c: c4 27 bf dc st %g2, [ %fp + -36 ] 2006410: c4 00 60 88 ld [ %g1 + 0x88 ], %g2 2006414: c4 27 bf e0 st %g2, [ %fp + -32 ] 2006418: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 200641c: c4 27 bf e4 st %g2, [ %fp + -28 ] 2006420: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 2006424: c4 27 bf e8 st %g2, [ %fp + -24 ] 2006428: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 200642c: c4 27 bf ec st %g2, [ %fp + -20 ] 2006430: c4 00 60 98 ld [ %g1 + 0x98 ], %g2 2006434: c4 27 bf f0 st %g2, [ %fp + -16 ] 2006438: c2 00 60 9c ld [ %g1 + 0x9c ], %g1 break; 200643c: 10 bf ff b1 b 2006300 2006440: c2 27 bf f4 st %g1, [ %fp + -12 ] } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2006444: ec 04 e1 6c ld [ %l3 + 0x16c ], %l6 api->Attributes = *the_attr; 2006448: 92 10 00 11 mov %l1, %o1 200644c: 94 10 20 3c mov 0x3c, %o2 2006450: 40 00 2c 76 call 2011628 2006454: 90 10 00 16 mov %l6, %o0 api->detachstate = the_attr->detachstate; 2006458: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 api->schedpolicy = schedpolicy; 200645c: e4 25 a0 80 st %l2, [ %l6 + 0x80 ] * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 2006460: c2 25 a0 3c st %g1, [ %l6 + 0x3c ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006464: c2 07 bf dc ld [ %fp + -36 ], %g1 * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 2006468: ea 2c e0 74 stb %l5, [ %l3 + 0x74 ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 200646c: c2 25 a0 84 st %g1, [ %l6 + 0x84 ] 2006470: c2 07 bf e0 ld [ %fp + -32 ], %g1 the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 2006474: 94 10 00 1a mov %i2, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006478: c2 25 a0 88 st %g1, [ %l6 + 0x88 ] 200647c: c2 07 bf e4 ld [ %fp + -28 ], %g1 the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 2006480: 96 10 00 1b mov %i3, %o3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006484: c2 25 a0 8c st %g1, [ %l6 + 0x8c ] 2006488: c2 07 bf e8 ld [ %fp + -24 ], %g1 the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 200648c: 90 10 00 13 mov %l3, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006490: c2 25 a0 90 st %g1, [ %l6 + 0x90 ] 2006494: c2 07 bf ec ld [ %fp + -20 ], %g1 the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 2006498: 92 10 20 01 mov 1, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 200649c: c2 25 a0 94 st %g1, [ %l6 + 0x94 ] 20064a0: c2 07 bf f0 ld [ %fp + -16 ], %g1 the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20064a4: 98 10 20 00 clr %o4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 20064a8: c2 25 a0 98 st %g1, [ %l6 + 0x98 ] 20064ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20064b0: 40 00 0f b9 call 200a394 <_Thread_Start> 20064b4: c2 25 a0 9c st %g1, [ %l6 + 0x9c ] _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 20064b8: 80 a4 a0 04 cmp %l2, 4 20064bc: 02 80 00 08 be 20064dc 20064c0: 01 00 00 00 nop } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 20064c4: c2 04 e0 08 ld [ %l3 + 8 ], %g1 _RTEMS_Unlock_allocator(); 20064c8: d0 05 22 48 ld [ %l4 + 0x248 ], %o0 20064cc: 40 00 06 19 call 2007d30 <_API_Mutex_Unlock> 20064d0: c2 24 00 00 st %g1, [ %l0 ] return 0; 20064d4: 81 c7 e0 08 ret 20064d8: 81 e8 00 00 restore return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 20064dc: 40 00 10 5b call 200a648 <_Timespec_To_ticks> 20064e0: 90 05 a0 8c add %l6, 0x8c, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20064e4: 92 05 a0 a4 add %l6, 0xa4, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20064e8: d0 25 a0 b0 st %o0, [ %l6 + 0xb0 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20064ec: 11 00 80 78 sethi %hi(0x201e000), %o0 20064f0: 40 00 11 41 call 200a9f4 <_Watchdog_Insert> 20064f4: 90 12 22 70 or %o0, 0x270, %o0 ! 201e270 <_Watchdog_Ticks_chain> } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 20064f8: 10 bf ff f4 b 20064c8 20064fc: c2 04 e0 08 ld [ %l3 + 8 ], %g1 =============================================================================== 02005ac8 : int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { if ( !attr ) 2005ac8: 80 a2 20 00 cmp %o0, 0 2005acc: 02 80 00 0c be 2005afc 2005ad0: 01 00 00 00 nop return EINVAL; if ( !attr->is_initialized ) 2005ad4: c2 02 00 00 ld [ %o0 ], %g1 2005ad8: 80 a0 60 00 cmp %g1, 0 2005adc: 02 80 00 08 be 2005afc 2005ae0: 80 a2 60 00 cmp %o1, 0 return EINVAL; if ( !type ) 2005ae4: 02 80 00 06 be 2005afc <== NEVER TAKEN 2005ae8: 01 00 00 00 nop return EINVAL; *type = attr->type; 2005aec: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2005af0: 90 10 20 00 clr %o0 return 0; 2005af4: 81 c3 e0 08 retl 2005af8: c2 22 40 00 st %g1, [ %o1 ] } 2005afc: 81 c3 e0 08 retl 2005b00: 90 10 20 16 mov 0x16, %o0 =============================================================================== 020080dc : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 20080dc: 80 a2 20 00 cmp %o0, 0 20080e0: 02 80 00 08 be 2008100 20080e4: 01 00 00 00 nop 20080e8: c2 02 00 00 ld [ %o0 ], %g1 20080ec: 80 a0 60 00 cmp %g1, 0 20080f0: 02 80 00 04 be 2008100 20080f4: 80 a2 60 01 cmp %o1, 1 return EINVAL; switch ( pshared ) { 20080f8: 28 80 00 04 bleu,a 2008108 <== ALWAYS TAKEN 20080fc: d2 22 20 04 st %o1, [ %o0 + 4 ] return 0; default: return EINVAL; } } 2008100: 81 c3 e0 08 retl 2008104: 90 10 20 16 mov 0x16, %o0 switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 2008108: 81 c3 e0 08 retl 200810c: 90 10 20 00 clr %o0 =============================================================================== 02005b54 : int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) 2005b54: 80 a2 20 00 cmp %o0, 0 2005b58: 02 80 00 08 be 2005b78 2005b5c: 01 00 00 00 nop 2005b60: c2 02 00 00 ld [ %o0 ], %g1 2005b64: 80 a0 60 00 cmp %g1, 0 2005b68: 02 80 00 04 be 2005b78 <== NEVER TAKEN 2005b6c: 80 a2 60 03 cmp %o1, 3 return EINVAL; switch ( type ) { 2005b70: 28 80 00 04 bleu,a 2005b80 2005b74: d2 22 20 10 st %o1, [ %o0 + 0x10 ] return 0; default: return EINVAL; } } 2005b78: 81 c3 e0 08 retl 2005b7c: 90 10 20 16 mov 0x16, %o0 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 2005b80: 81 c3 e0 08 retl 2005b84: 90 10 20 00 clr %o0 =============================================================================== 02006944 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 2006944: 9d e3 bf 98 save %sp, -104, %sp if ( !once_control || !init_routine ) 2006948: 80 a6 60 00 cmp %i1, 0 200694c: 02 80 00 0b be 2006978 2006950: a0 10 00 18 mov %i0, %l0 2006954: 80 a6 20 00 cmp %i0, 0 2006958: 02 80 00 08 be 2006978 200695c: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 2006960: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006964: 80 a0 60 00 cmp %g1, 0 2006968: 02 80 00 06 be 2006980 200696c: b0 10 20 00 clr %i0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 2006970: 81 c7 e0 08 ret 2006974: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 2006978: 81 c7 e0 08 ret 200697c: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 2006980: a2 07 bf fc add %fp, -4, %l1 2006984: 90 10 21 00 mov 0x100, %o0 2006988: 92 10 21 00 mov 0x100, %o1 200698c: 40 00 03 09 call 20075b0 2006990: 94 10 00 11 mov %l1, %o2 if ( !once_control->init_executed ) { 2006994: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006998: 80 a0 60 00 cmp %g1, 0 200699c: 02 80 00 09 be 20069c0 <== ALWAYS TAKEN 20069a0: 82 10 20 01 mov 1, %g1 once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 20069a4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED 20069a8: 94 10 00 11 mov %l1, %o2 20069ac: 92 10 21 00 mov 0x100, %o1 20069b0: 40 00 03 00 call 20075b0 20069b4: b0 10 20 00 clr %i0 } return 0; } 20069b8: 81 c7 e0 08 ret 20069bc: 81 e8 00 00 restore if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; 20069c0: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 20069c4: 9f c6 40 00 call %i1 20069c8: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 20069cc: 10 bf ff f7 b 20069a8 20069d0: d0 07 bf fc ld [ %fp + -4 ], %o0 =============================================================================== 02007088 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 2007088: 9d e3 bf 90 save %sp, -112, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 200708c: 80 a6 20 00 cmp %i0, 0 2007090: 02 80 00 23 be 200711c 2007094: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 2007098: 22 80 00 27 be,a 2007134 200709c: b2 07 bf f4 add %fp, -12, %i1 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 20070a0: c2 06 40 00 ld [ %i1 ], %g1 20070a4: 80 a0 60 00 cmp %g1, 0 20070a8: 02 80 00 1d be 200711c <== NEVER TAKEN 20070ac: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 20070b0: c2 06 60 04 ld [ %i1 + 4 ], %g1 20070b4: 80 a0 60 00 cmp %g1, 0 20070b8: 12 80 00 19 bne 200711c <== NEVER TAKEN 20070bc: 03 00 80 7f sethi %hi(0x201fc00), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20070c0: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201ff00 <_Thread_Dispatch_disable_level> 20070c4: 84 00 a0 01 inc %g2 20070c8: c4 20 63 00 st %g2, [ %g1 + 0x300 ] * 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 *) 20070cc: 23 00 80 80 sethi %hi(0x2020000), %l1 20070d0: 40 00 0a 39 call 20099b4 <_Objects_Allocate> 20070d4: 90 14 61 50 or %l1, 0x150, %o0 ! 2020150 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 20070d8: a0 92 20 00 orcc %o0, 0, %l0 20070dc: 02 80 00 12 be 2007124 20070e0: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 20070e4: 40 00 07 e7 call 2009080 <_CORE_RWLock_Initialize> 20070e8: 92 07 bf fc add %fp, -4, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 20070ec: c4 14 20 0a lduh [ %l0 + 0xa ], %g2 20070f0: a2 14 61 50 or %l1, 0x150, %l1 20070f4: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 20070f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 20070fc: 85 28 a0 02 sll %g2, 2, %g2 2007100: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 2007104: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 2007108: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 200710c: 40 00 0d e3 call 200a898 <_Thread_Enable_dispatch> 2007110: b0 10 20 00 clr %i0 return 0; 2007114: 81 c7 e0 08 ret 2007118: 81 e8 00 00 restore } 200711c: 81 c7 e0 08 ret 2007120: 91 e8 20 16 restore %g0, 0x16, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 2007124: 40 00 0d dd call 200a898 <_Thread_Enable_dispatch> 2007128: b0 10 20 0b mov 0xb, %i0 return EAGAIN; 200712c: 81 c7 e0 08 ret 2007130: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 2007134: 40 00 02 7b call 2007b20 2007138: 90 10 00 19 mov %i1, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 200713c: 10 bf ff da b 20070a4 2007140: c2 06 40 00 ld [ %i1 ], %g1 =============================================================================== 020071b0 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 20071b0: 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 ) 20071b4: 80 a6 20 00 cmp %i0, 0 20071b8: 02 80 00 24 be 2007248 20071bc: 92 07 bf f8 add %fp, -8, %o1 * * 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 ); 20071c0: 40 00 1d 45 call 200e6d4 <_POSIX_Absolute_timeout_to_ticks> 20071c4: 90 10 00 19 mov %i1, %o0 20071c8: d2 06 00 00 ld [ %i0 ], %o1 20071cc: a0 10 00 08 mov %o0, %l0 20071d0: 94 07 bf fc add %fp, -4, %o2 20071d4: 11 00 80 80 sethi %hi(0x2020000), %o0 20071d8: 40 00 0b 4b call 2009f04 <_Objects_Get> 20071dc: 90 12 21 50 or %o0, 0x150, %o0 ! 2020150 <_POSIX_RWLock_Information> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 20071e0: c2 07 bf fc ld [ %fp + -4 ], %g1 20071e4: 80 a0 60 00 cmp %g1, 0 20071e8: 12 80 00 18 bne 2007248 20071ec: d6 07 bf f8 ld [ %fp + -8 ], %o3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 20071f0: d2 06 00 00 ld [ %i0 ], %o1 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 20071f4: 82 1c 20 03 xor %l0, 3, %g1 20071f8: 90 02 20 10 add %o0, 0x10, %o0 20071fc: 80 a0 00 01 cmp %g0, %g1 2007200: 98 10 20 00 clr %o4 2007204: a2 60 3f ff subx %g0, -1, %l1 2007208: 40 00 07 a9 call 20090ac <_CORE_RWLock_Obtain_for_reading> 200720c: 94 10 00 11 mov %l1, %o2 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 2007210: 40 00 0d a2 call 200a898 <_Thread_Enable_dispatch> 2007214: 01 00 00 00 nop if ( !do_wait ) { 2007218: 80 a4 60 00 cmp %l1, 0 200721c: 12 80 00 13 bne 2007268 2007220: 03 00 80 7f sethi %hi(0x201fc00), %g1 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 2007224: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 201ffc0 <_Thread_Executing> 2007228: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200722c: 80 a2 20 02 cmp %o0, 2 2007230: 02 80 00 08 be 2007250 2007234: 80 a4 20 00 cmp %l0, 0 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2007238: 40 00 00 40 call 2007338 <_POSIX_RWLock_Translate_core_RWLock_return_code> 200723c: 01 00 00 00 nop 2007240: 81 c7 e0 08 ret 2007244: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2007248: 81 c7 e0 08 ret 200724c: 91 e8 20 16 restore %g0, 0x16, %o0 ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 2007250: 02 bf ff fe be 2007248 <== NEVER TAKEN 2007254: 80 a4 20 02 cmp %l0, 2 2007258: 18 bf ff f8 bgu 2007238 <== NEVER TAKEN 200725c: b0 10 20 74 mov 0x74, %i0 case OBJECTS_ERROR: break; } return EINVAL; } 2007260: 81 c7 e0 08 ret 2007264: 81 e8 00 00 restore ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 2007268: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 200726c: 10 bf ff f3 b 2007238 2007270: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 =============================================================================== 02007274 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 2007274: 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 ) 2007278: 80 a6 20 00 cmp %i0, 0 200727c: 02 80 00 24 be 200730c 2007280: 92 07 bf f8 add %fp, -8, %o1 * * 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 ); 2007284: 40 00 1d 14 call 200e6d4 <_POSIX_Absolute_timeout_to_ticks> 2007288: 90 10 00 19 mov %i1, %o0 200728c: d2 06 00 00 ld [ %i0 ], %o1 2007290: a0 10 00 08 mov %o0, %l0 2007294: 94 07 bf fc add %fp, -4, %o2 2007298: 11 00 80 80 sethi %hi(0x2020000), %o0 200729c: 40 00 0b 1a call 2009f04 <_Objects_Get> 20072a0: 90 12 21 50 or %o0, 0x150, %o0 ! 2020150 <_POSIX_RWLock_Information> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 20072a4: c2 07 bf fc ld [ %fp + -4 ], %g1 20072a8: 80 a0 60 00 cmp %g1, 0 20072ac: 12 80 00 18 bne 200730c 20072b0: d6 07 bf f8 ld [ %fp + -8 ], %o3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 20072b4: d2 06 00 00 ld [ %i0 ], %o1 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 20072b8: 82 1c 20 03 xor %l0, 3, %g1 20072bc: 90 02 20 10 add %o0, 0x10, %o0 20072c0: 80 a0 00 01 cmp %g0, %g1 20072c4: 98 10 20 00 clr %o4 20072c8: a2 60 3f ff subx %g0, -1, %l1 20072cc: 40 00 07 ad call 2009180 <_CORE_RWLock_Obtain_for_writing> 20072d0: 94 10 00 11 mov %l1, %o2 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 20072d4: 40 00 0d 71 call 200a898 <_Thread_Enable_dispatch> 20072d8: 01 00 00 00 nop if ( !do_wait && 20072dc: 80 a4 60 00 cmp %l1, 0 20072e0: 12 80 00 13 bne 200732c 20072e4: 03 00 80 7f sethi %hi(0x201fc00), %g1 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 20072e8: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 201ffc0 <_Thread_Executing> 20072ec: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 20072f0: 80 a2 20 02 cmp %o0, 2 20072f4: 02 80 00 08 be 2007314 20072f8: 80 a4 20 00 cmp %l0, 0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 20072fc: 40 00 00 0f call 2007338 <_POSIX_RWLock_Translate_core_RWLock_return_code> 2007300: 01 00 00 00 nop 2007304: 81 c7 e0 08 ret 2007308: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 200730c: 81 c7 e0 08 ret 2007310: 91 e8 20 16 restore %g0, 0x16, %o0 ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 2007314: 02 bf ff fe be 200730c <== NEVER TAKEN 2007318: 80 a4 20 02 cmp %l0, 2 200731c: 18 bf ff f8 bgu 20072fc <== NEVER TAKEN 2007320: b0 10 20 74 mov 0x74, %i0 case OBJECTS_ERROR: break; } return EINVAL; } 2007324: 81 c7 e0 08 ret 2007328: 81 e8 00 00 restore ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 200732c: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 2007330: 10 bf ff f3 b 20072fc 2007334: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 =============================================================================== 02007b44 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 2007b44: 80 a2 20 00 cmp %o0, 0 2007b48: 02 80 00 08 be 2007b68 2007b4c: 01 00 00 00 nop return EINVAL; if ( !attr->is_initialized ) 2007b50: c2 02 00 00 ld [ %o0 ], %g1 2007b54: 80 a0 60 00 cmp %g1, 0 2007b58: 02 80 00 04 be 2007b68 2007b5c: 80 a2 60 01 cmp %o1, 1 return EINVAL; switch ( pshared ) { 2007b60: 28 80 00 04 bleu,a 2007b70 <== ALWAYS TAKEN 2007b64: d2 22 20 04 st %o1, [ %o0 + 4 ] return 0; default: return EINVAL; } } 2007b68: 81 c3 e0 08 retl 2007b6c: 90 10 20 16 mov 0x16, %o0 switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 2007b70: 81 c3 e0 08 retl 2007b74: 90 10 20 00 clr %o0 =============================================================================== 02008e14 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 2008e14: 9d e3 bf 90 save %sp, -112, %sp 2008e18: a0 10 00 18 mov %i0, %l0 int rc; /* * Check all the parameters */ if ( !param ) 2008e1c: 80 a6 a0 00 cmp %i2, 0 2008e20: 02 80 00 3c be 2008f10 2008e24: b0 10 20 16 mov 0x16, %i0 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 2008e28: 90 10 00 19 mov %i1, %o0 2008e2c: 92 10 00 1a mov %i2, %o1 2008e30: 94 07 bf fc add %fp, -4, %o2 2008e34: 40 00 1a d2 call 200f97c <_POSIX_Thread_Translate_sched_param> 2008e38: 96 07 bf f8 add %fp, -8, %o3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 2008e3c: b0 92 20 00 orcc %o0, 0, %i0 2008e40: 12 80 00 34 bne 2008f10 2008e44: 92 10 00 10 mov %l0, %o1 2008e48: 11 00 80 8a sethi %hi(0x2022800), %o0 2008e4c: 94 07 bf f4 add %fp, -12, %o2 2008e50: 40 00 08 83 call 200b05c <_Objects_Get> 2008e54: 90 12 21 c0 or %o0, 0x1c0, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2008e58: c2 07 bf f4 ld [ %fp + -12 ], %g1 2008e5c: 80 a0 60 00 cmp %g1, 0 2008e60: 12 80 00 2e bne 2008f18 2008e64: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2008e68: e0 02 21 6c ld [ %o0 + 0x16c ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 2008e6c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 2008e70: 80 a0 60 04 cmp %g1, 4 2008e74: 02 80 00 36 be 2008f4c 2008e78: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 2008e7c: f2 24 20 80 st %i1, [ %l0 + 0x80 ] api->schedparam = *param; 2008e80: c2 06 80 00 ld [ %i2 ], %g1 the_thread->budget_algorithm = budget_algorithm; 2008e84: c6 07 bf fc ld [ %fp + -4 ], %g3 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2008e88: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 2008e8c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 the_thread->budget_algorithm = budget_algorithm; 2008e90: c6 24 60 7c st %g3, [ %l1 + 0x7c ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2008e94: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 2008e98: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 2008e9c: c6 07 bf f8 ld [ %fp + -8 ], %g3 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2008ea0: c4 24 20 8c st %g2, [ %l0 + 0x8c ] 2008ea4: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 2008ea8: c6 24 60 80 st %g3, [ %l1 + 0x80 ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2008eac: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 2008eb0: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2008eb4: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2008eb8: c4 24 20 94 st %g2, [ %l0 + 0x94 ] 2008ebc: c4 06 a0 14 ld [ %i2 + 0x14 ], %g2 2008ec0: c4 24 20 98 st %g2, [ %l0 + 0x98 ] 2008ec4: c4 06 a0 18 ld [ %i2 + 0x18 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2008ec8: 06 80 00 10 bl 2008f08 <== NEVER TAKEN 2008ecc: c4 24 20 9c st %g2, [ %l0 + 0x9c ] 2008ed0: 80 a6 60 02 cmp %i1, 2 2008ed4: 14 80 00 13 bg 2008f20 2008ed8: 80 a6 60 04 cmp %i1, 4 2008edc: c2 04 20 84 ld [ %l0 + 0x84 ], %g1 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008ee0: 05 00 80 89 sethi %hi(0x2022400), %g2 2008ee4: 07 00 80 86 sethi %hi(0x2021800), %g3 2008ee8: c4 00 a2 88 ld [ %g2 + 0x288 ], %g2 2008eec: d2 08 e3 d8 ldub [ %g3 + 0x3d8 ], %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2008ef0: 90 10 00 11 mov %l1, %o0 2008ef4: 92 22 40 01 sub %o1, %g1, %o1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008ef8: c4 24 60 78 st %g2, [ %l1 + 0x78 ] the_thread->real_priority = 2008efc: d2 24 60 18 st %o1, [ %l1 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2008f00: 40 00 09 1e call 200b378 <_Thread_Change_priority> 2008f04: 94 10 20 01 mov 1, %o2 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 2008f08: 40 00 0a ba call 200b9f0 <_Thread_Enable_dispatch> 2008f0c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return ESRCH; } 2008f10: 81 c7 e0 08 ret 2008f14: 81 e8 00 00 restore /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2008f18: 81 c7 e0 08 ret 2008f1c: 91 e8 20 03 restore %g0, 3, %o0 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2008f20: 12 bf ff fa bne 2008f08 <== NEVER TAKEN 2008f24: 01 00 00 00 nop true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 2008f28: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] _Watchdog_Remove( &api->Sporadic_timer ); 2008f2c: 40 00 10 4c call 200d05c <_Watchdog_Remove> 2008f30: 90 04 20 a4 add %l0, 0xa4, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 2008f34: 92 10 00 11 mov %l1, %o1 2008f38: 7f ff ff 91 call 2008d7c <_POSIX_Threads_Sporadic_budget_TSR> 2008f3c: 90 10 20 00 clr %o0 break; } _Thread_Enable_dispatch(); 2008f40: 40 00 0a ac call 200b9f0 <_Thread_Enable_dispatch> 2008f44: 01 00 00 00 nop 2008f48: 30 bf ff f2 b,a 2008f10 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 2008f4c: 40 00 10 44 call 200d05c <_Watchdog_Remove> 2008f50: 90 04 20 a4 add %l0, 0xa4, %o0 api->schedpolicy = policy; 2008f54: 10 bf ff cb b 2008e80 2008f58: f2 24 20 80 st %i1, [ %l0 + 0x80 ] =============================================================================== 02006554 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 2006554: 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() ) 2006558: 03 00 80 7a sethi %hi(0x201e800), %g1 200655c: c2 00 63 cc ld [ %g1 + 0x3cc ], %g1 ! 201ebcc <_ISR_Nest_level> 2006560: 80 a0 60 00 cmp %g1, 0 2006564: 12 80 00 15 bne 20065b8 <== NEVER TAKEN 2006568: 03 00 80 7a sethi %hi(0x201e800), %g1 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 200656c: 21 00 80 7a sethi %hi(0x201e800), %l0 2006570: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 2006574: c4 04 23 f0 ld [ %l0 + 0x3f0 ], %g2 2006578: 86 00 e0 01 inc %g3 200657c: c6 20 63 30 st %g3, [ %g1 + 0x330 ] 2006580: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2006584: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 2006588: 80 a0 a0 00 cmp %g2, 0 200658c: 12 80 00 0d bne 20065c0 <== NEVER TAKEN 2006590: 01 00 00 00 nop thread_support->cancelation_requested ) 2006594: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 2006598: 80 a0 60 00 cmp %g1, 0 200659c: 02 80 00 09 be 20065c0 20065a0: 01 00 00 00 nop cancel = true; _Thread_Enable_dispatch(); 20065a4: 40 00 0a 56 call 2008efc <_Thread_Enable_dispatch> 20065a8: b2 10 3f ff mov -1, %i1 ! ffffffff if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 20065ac: f0 04 23 f0 ld [ %l0 + 0x3f0 ], %i0 20065b0: 40 00 1a 99 call 200d014 <_POSIX_Thread_Exit> 20065b4: 81 e8 00 00 restore 20065b8: 81 c7 e0 08 ret <== NOT EXECUTED 20065bc: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20065c0: 40 00 0a 4f call 2008efc <_Thread_Enable_dispatch> 20065c4: 81 e8 00 00 restore =============================================================================== 0200e974 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 200e974: 9d e3 bf 98 save %sp, -104, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 200e978: a0 96 20 00 orcc %i0, 0, %l0 200e97c: 02 80 00 23 be 200ea08 200e980: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 200e984: 80 a6 e0 00 cmp %i3, 0 200e988: 02 80 00 20 be 200ea08 200e98c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 200e990: 80 8e 60 10 btst 0x10, %i1 200e994: 02 80 00 1f be 200ea10 200e998: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 200e99c: 02 80 00 1b be 200ea08 200e9a0: b0 10 20 0a mov 0xa, %i0 200e9a4: 03 00 80 73 sethi %hi(0x201cc00), %g1 200e9a8: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 201cd40 <_Thread_Dispatch_disable_level> if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 200e9ac: c0 27 bf f8 clr [ %fp + -8 ] if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 200e9b0: f4 27 bf fc st %i2, [ %fp + -4 ] 200e9b4: 84 00 a0 01 inc %g2 200e9b8: c4 20 61 40 st %g2, [ %g1 + 0x140 ] * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 200e9bc: 25 00 80 75 sethi %hi(0x201d400), %l2 200e9c0: 7f ff e2 95 call 2007414 <_Objects_Allocate> 200e9c4: 90 14 a2 c0 or %l2, 0x2c0, %o0 ! 201d6c0 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 200e9c8: a2 92 20 00 orcc %o0, 0, %l1 200e9cc: 02 80 00 1e be 200ea44 <== NEVER TAKEN 200e9d0: 90 04 60 14 add %l1, 0x14, %o0 return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 200e9d4: 92 07 bf f8 add %fp, -8, %o1 200e9d8: 40 00 01 4b call 200ef04 <_CORE_barrier_Initialize> 200e9dc: f2 24 60 10 st %i1, [ %l1 + 0x10 ] 200e9e0: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 200e9e4: c6 04 60 08 ld [ %l1 + 8 ], %g3 200e9e8: a4 14 a2 c0 or %l2, 0x2c0, %l2 200e9ec: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200e9f0: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200e9f4: 83 28 60 02 sll %g1, 2, %g1 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 200e9f8: c6 26 c0 00 st %g3, [ %i3 ] 200e9fc: e2 20 80 01 st %l1, [ %g2 + %g1 ] _Thread_Enable_dispatch(); 200ea00: 7f ff e6 6c call 20083b0 <_Thread_Enable_dispatch> 200ea04: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 200ea08: 81 c7 e0 08 ret 200ea0c: 81 e8 00 00 restore if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 200ea10: 82 10 20 01 mov 1, %g1 200ea14: c2 27 bf f8 st %g1, [ %fp + -8 ] 200ea18: 03 00 80 73 sethi %hi(0x201cc00), %g1 200ea1c: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 201cd40 <_Thread_Dispatch_disable_level> the_attributes.maximum_count = maximum_waiters; 200ea20: f4 27 bf fc st %i2, [ %fp + -4 ] 200ea24: 84 00 a0 01 inc %g2 200ea28: c4 20 61 40 st %g2, [ %g1 + 0x140 ] 200ea2c: 25 00 80 75 sethi %hi(0x201d400), %l2 200ea30: 7f ff e2 79 call 2007414 <_Objects_Allocate> 200ea34: 90 14 a2 c0 or %l2, 0x2c0, %o0 ! 201d6c0 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 200ea38: a2 92 20 00 orcc %o0, 0, %l1 200ea3c: 12 bf ff e6 bne 200e9d4 200ea40: 90 04 60 14 add %l1, 0x14, %o0 _Thread_Enable_dispatch(); 200ea44: 7f ff e6 5b call 20083b0 <_Thread_Enable_dispatch> 200ea48: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 200ea4c: 81 c7 e0 08 ret 200ea50: 81 e8 00 00 restore =============================================================================== 02008560 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 2008560: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 2008564: 03 00 80 8c sethi %hi(0x2023000), %g1 2008568: c2 00 61 9c ld [ %g1 + 0x19c ], %g1 ! 202319c <_ISR_Nest_level> rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 200856c: 09 00 80 8e sethi %hi(0x2023800), %g4 if ( rtems_interrupt_is_in_progress() ) 2008570: 80 a0 60 00 cmp %g1, 0 2008574: 84 10 20 12 mov 0x12, %g2 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 2008578: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 200857c: 12 80 00 49 bne 20086a0 2008580: c6 01 22 ac ld [ %g4 + 0x2ac ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 2008584: 80 a6 a0 00 cmp %i2, 0 2008588: 02 80 00 4b be 20086b4 200858c: 80 a6 60 00 cmp %i1, 0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 2008590: 02 80 00 49 be 20086b4 2008594: c6 26 80 00 st %g3, [ %i2 ] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 2008598: c4 06 40 00 ld [ %i1 ], %g2 200859c: 80 a0 a0 00 cmp %g2, 0 20085a0: 22 80 00 42 be,a 20086a8 20085a4: c4 06 60 04 ld [ %i1 + 4 ], %g2 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 20085a8: 80 a0 c0 18 cmp %g3, %i0 20085ac: 08 80 00 3d bleu 20086a0 20085b0: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20085b4: 05 00 80 8c sethi %hi(0x2023000), %g2 20085b8: c6 00 a1 00 ld [ %g2 + 0x100 ], %g3 ! 2023100 <_Thread_Dispatch_disable_level> 20085bc: 86 00 e0 01 inc %g3 20085c0: c6 20 a1 00 st %g3, [ %g2 + 0x100 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 20085c4: 80 a6 20 00 cmp %i0, 0 20085c8: 12 80 00 2b bne 2008674 20085cc: 05 00 80 8e sethi %hi(0x2023800), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 20085d0: da 01 22 ac ld [ %g4 + 0x2ac ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 20085d4: 80 a3 60 00 cmp %o5, 0 20085d8: 02 80 00 3a be 20086c0 <== NEVER TAKEN 20085dc: d8 00 a2 b0 ld [ %g2 + 0x2b0 ], %o4 20085e0: 10 80 00 05 b 20085f4 20085e4: 86 10 00 0c mov %o4, %g3 20085e8: 80 a3 40 18 cmp %o5, %i0 20085ec: 08 80 00 0b bleu 2008618 20085f0: 86 00 e0 18 add %g3, 0x18, %g3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 20085f4: c8 00 c0 00 ld [ %g3 ], %g4 20085f8: 80 a1 20 00 cmp %g4, 0 20085fc: 32 bf ff fb bne,a 20085e8 2008600: b0 06 20 01 inc %i0 2008604: c8 00 e0 04 ld [ %g3 + 4 ], %g4 2008608: 80 a1 20 00 cmp %g4, 0 200860c: 32 bf ff f7 bne,a 20085e8 2008610: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 2008614: 80 a3 40 18 cmp %o5, %i0 2008618: 02 80 00 2b be 20086c4 200861c: f0 26 80 00 st %i0, [ %i2 ] 2008620: 85 2e 20 03 sll %i0, 3, %g2 2008624: 87 2e 20 05 sll %i0, 5, %g3 2008628: 84 20 c0 02 sub %g3, %g2, %g2 200862c: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 2008630: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 2008634: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 2008638: c6 20 80 00 st %g3, [ %g2 ] 200863c: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 2008640: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 2008644: c6 20 a0 04 st %g3, [ %g2 + 4 ] 2008648: c6 00 60 08 ld [ %g1 + 8 ], %g3 200864c: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008650: c6 00 60 0c ld [ %g1 + 0xc ], %g3 2008654: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 2008658: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200865c: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 2008660: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 2008664: 40 00 07 53 call 200a3b0 <_Thread_Enable_dispatch> 2008668: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 200866c: 40 00 27 46 call 2012384 2008670: 81 e8 00 00 restore _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 2008674: c6 00 a2 b0 ld [ %g2 + 0x2b0 ], %g3 2008678: 89 2e 20 05 sll %i0, 5, %g4 200867c: 85 2e 20 03 sll %i0, 3, %g2 2008680: 84 21 00 02 sub %g4, %g2, %g2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 2008684: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 2008688: 80 a1 20 00 cmp %g4, 0 200868c: 02 80 00 12 be 20086d4 2008690: 84 00 c0 02 add %g3, %g2, %g2 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 2008694: 40 00 07 47 call 200a3b0 <_Thread_Enable_dispatch> 2008698: 01 00 00 00 nop 200869c: 84 10 20 0c mov 0xc, %g2 ! c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 20086a0: 81 c7 e0 08 ret 20086a4: 91 e8 00 02 restore %g0, %g2, %o0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 20086a8: 80 a0 a0 00 cmp %g2, 0 20086ac: 12 bf ff c0 bne 20085ac 20086b0: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 20086b4: 84 10 20 09 mov 9, %g2 } 20086b8: 81 c7 e0 08 ret 20086bc: 91 e8 00 02 restore %g0, %g2, %o0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 20086c0: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 20086c4: 40 00 07 3b call 200a3b0 <_Thread_Enable_dispatch> 20086c8: 01 00 00 00 nop return sc; 20086cc: 10 bf ff f5 b 20086a0 20086d0: 84 10 20 05 mov 5, %g2 ! 5 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 20086d4: c6 00 a0 04 ld [ %g2 + 4 ], %g3 20086d8: 80 a0 e0 00 cmp %g3, 0 20086dc: 12 bf ff ee bne 2008694 20086e0: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 20086e4: 10 bf ff d3 b 2008630 20086e8: f0 26 80 00 st %i0, [ %i2 ] =============================================================================== 0200906c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 200906c: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2009070: 80 a6 20 00 cmp %i0, 0 2009074: 02 80 00 23 be 2009100 <== NEVER TAKEN 2009078: 25 00 80 ac sethi %hi(0x202b000), %l2 200907c: a4 14 a2 34 or %l2, 0x234, %l2 ! 202b234 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 2009080: a6 04 a0 10 add %l2, 0x10, %l3 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2009084: c2 04 80 00 ld [ %l2 ], %g1 2009088: 80 a0 60 00 cmp %g1, 0 200908c: 22 80 00 1a be,a 20090f4 2009090: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2009094: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 2009098: 80 a4 60 00 cmp %l1, 0 200909c: 22 80 00 16 be,a 20090f4 20090a0: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 20090a4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 20090a8: 84 90 60 00 orcc %g1, 0, %g2 20090ac: 22 80 00 12 be,a 20090f4 20090b0: a4 04 a0 04 add %l2, 4, %l2 20090b4: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 20090b8: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 20090bc: 83 2c 20 02 sll %l0, 2, %g1 20090c0: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 20090c4: 90 90 60 00 orcc %g1, 0, %o0 20090c8: 02 80 00 05 be 20090dc <== NEVER TAKEN 20090cc: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 20090d0: 9f c6 00 00 call %i0 20090d4: 01 00 00 00 nop 20090d8: c4 14 60 10 lduh [ %l1 + 0x10 ], %g2 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 20090dc: 83 28 a0 10 sll %g2, 0x10, %g1 20090e0: 83 30 60 10 srl %g1, 0x10, %g1 20090e4: 80 a0 40 10 cmp %g1, %l0 20090e8: 3a bf ff f5 bcc,a 20090bc 20090ec: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 20090f0: a4 04 a0 04 add %l2, 4, %l2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 20090f4: 80 a4 80 13 cmp %l2, %l3 20090f8: 32 bf ff e4 bne,a 2009088 20090fc: c2 04 80 00 ld [ %l2 ], %g1 2009100: 81 c7 e0 08 ret 2009104: 81 e8 00 00 restore =============================================================================== 02007c88 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 2007c88: 9d e3 bf a0 save %sp, -96, %sp 2007c8c: 90 10 00 18 mov %i0, %o0 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 2007c90: 80 a6 a0 00 cmp %i2, 0 2007c94: 02 80 00 20 be 2007d14 2007c98: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 2007c9c: 92 10 00 19 mov %i1, %o1 2007ca0: 40 00 07 36 call 2009978 <_Objects_Get_information> 2007ca4: b0 10 20 0a mov 0xa, %i0 if ( !obj_info ) 2007ca8: 80 a2 20 00 cmp %o0, 0 2007cac: 02 80 00 1a be 2007d14 2007cb0: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 2007cb4: c2 02 20 08 ld [ %o0 + 8 ], %g1 info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 2007cb8: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 2007cbc: c4 0a 20 12 ldub [ %o0 + 0x12 ], %g2 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 2007cc0: c2 26 80 00 st %g1, [ %i2 ] info->maximum_id = obj_info->maximum_id; 2007cc4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 info->auto_extend = obj_info->auto_extend; 2007cc8: c4 2e a0 0c stb %g2, [ %i2 + 0xc ] /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 2007ccc: c2 26 a0 04 st %g1, [ %i2 + 4 ] info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 2007cd0: c8 26 a0 08 st %g4, [ %i2 + 8 ] for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 2007cd4: 80 a1 20 00 cmp %g4, 0 2007cd8: 02 80 00 0d be 2007d0c <== NEVER TAKEN 2007cdc: 84 10 20 00 clr %g2 2007ce0: da 02 20 1c ld [ %o0 + 0x1c ], %o5 2007ce4: 86 10 20 01 mov 1, %g3 2007ce8: 82 10 20 01 mov 1, %g1 if ( !obj_info->local_table[i] ) 2007cec: 87 28 e0 02 sll %g3, 2, %g3 2007cf0: c6 03 40 03 ld [ %o5 + %g3 ], %g3 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 2007cf4: 82 00 60 01 inc %g1 if ( !obj_info->local_table[i] ) unallocated++; 2007cf8: 80 a0 00 03 cmp %g0, %g3 2007cfc: 84 60 bf ff subx %g2, -1, %g2 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 2007d00: 80 a1 00 01 cmp %g4, %g1 2007d04: 1a bf ff fa bcc 2007cec 2007d08: 86 10 00 01 mov %g1, %g3 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 2007d0c: c4 26 a0 10 st %g2, [ %i2 + 0x10 ] 2007d10: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 2007d14: 81 c7 e0 08 ret 2007d18: 81 e8 00 00 restore =============================================================================== 02013ea4 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 2013ea4: 9d e3 bf a0 save %sp, -96, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 2013ea8: a0 96 20 00 orcc %i0, 0, %l0 2013eac: 02 80 00 31 be 2013f70 2013eb0: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 2013eb4: 80 a6 60 00 cmp %i1, 0 2013eb8: 02 80 00 32 be 2013f80 2013ebc: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 2013ec0: 02 80 00 30 be 2013f80 <== NEVER TAKEN 2013ec4: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 2013ec8: 02 80 00 2c be 2013f78 2013ecc: 80 a6 a0 00 cmp %i2, 0 2013ed0: 02 80 00 2a be 2013f78 2013ed4: 80 a6 80 1b cmp %i2, %i3 2013ed8: 0a 80 00 28 bcs 2013f78 2013edc: 80 8e e0 07 btst 7, %i3 2013ee0: 12 80 00 26 bne 2013f78 2013ee4: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 2013ee8: 12 80 00 26 bne 2013f80 2013eec: 03 00 80 f9 sethi %hi(0x203e400), %g1 2013ef0: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 203e570 <_Thread_Dispatch_disable_level> 2013ef4: 84 00 a0 01 inc %g2 2013ef8: c4 20 61 70 st %g2, [ %g1 + 0x170 ] * 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 ); 2013efc: 25 00 80 f8 sethi %hi(0x203e000), %l2 2013f00: 40 00 12 97 call 201895c <_Objects_Allocate> 2013f04: 90 14 a3 78 or %l2, 0x378, %o0 ! 203e378 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 2013f08: a2 92 20 00 orcc %o0, 0, %l1 2013f0c: 02 80 00 1f be 2013f88 2013f10: 92 10 00 1b mov %i3, %o1 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 2013f14: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 2013f18: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 2013f1c: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 2013f20: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 2013f24: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 2013f28: 40 00 67 8a call 202dd50 <.udiv> 2013f2c: 90 10 00 1a mov %i2, %o0 2013f30: 92 10 00 19 mov %i1, %o1 2013f34: 94 10 00 08 mov %o0, %o2 2013f38: 96 10 00 1b mov %i3, %o3 2013f3c: b8 04 60 24 add %l1, 0x24, %i4 2013f40: 40 00 0c db call 20172ac <_Chain_Initialize> 2013f44: 90 10 00 1c mov %i4, %o0 2013f48: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 2013f4c: c6 04 60 08 ld [ %l1 + 8 ], %g3 2013f50: a4 14 a3 78 or %l2, 0x378, %l2 2013f54: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2013f58: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2013f5c: 83 28 60 02 sll %g1, 2, %g1 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 2013f60: c6 27 40 00 st %g3, [ %i5 ] 2013f64: e2 20 80 01 st %l1, [ %g2 + %g1 ] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2013f68: 40 00 16 9f call 20199e4 <_Thread_Enable_dispatch> 2013f6c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 2013f70: 81 c7 e0 08 ret 2013f74: 81 e8 00 00 restore } 2013f78: 81 c7 e0 08 ret 2013f7c: 91 e8 20 08 restore %g0, 8, %o0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 2013f80: 81 c7 e0 08 ret 2013f84: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 2013f88: 40 00 16 97 call 20199e4 <_Thread_Enable_dispatch> 2013f8c: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 2013f90: 81 c7 e0 08 ret 2013f94: 81 e8 00 00 restore =============================================================================== 02007248 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 2007248: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 200724c: 11 00 80 8a sethi %hi(0x2022800), %o0 2007250: 92 10 00 18 mov %i0, %o1 2007254: 90 12 22 a0 or %o0, 0x2a0, %o0 2007258: 40 00 09 38 call 2009738 <_Objects_Get> 200725c: 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 ) { 2007260: c2 07 bf fc ld [ %fp + -4 ], %g1 2007264: 80 a0 60 00 cmp %g1, 0 2007268: 02 80 00 04 be 2007278 200726c: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007270: 81 c7 e0 08 ret 2007274: 91 e8 20 04 restore %g0, 4, %o0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 2007278: 23 00 80 8b sethi %hi(0x2022c00), %l1 200727c: c4 02 20 40 ld [ %o0 + 0x40 ], %g2 2007280: c2 04 60 d0 ld [ %l1 + 0xd0 ], %g1 2007284: 80 a0 80 01 cmp %g2, %g1 2007288: 02 80 00 06 be 20072a0 200728c: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2007290: 40 00 0b bd call 200a184 <_Thread_Enable_dispatch> 2007294: b0 10 20 17 mov 0x17, %i0 return RTEMS_NOT_OWNER_OF_RESOURCE; 2007298: 81 c7 e0 08 ret 200729c: 81 e8 00 00 restore } if ( length == RTEMS_PERIOD_STATUS ) { 20072a0: 12 80 00 0e bne 20072d8 20072a4: 01 00 00 00 nop switch ( the_period->state ) { 20072a8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20072ac: 80 a0 60 04 cmp %g1, 4 20072b0: 18 80 00 06 bgu 20072c8 <== NEVER TAKEN 20072b4: b0 10 20 00 clr %i0 20072b8: 83 28 60 02 sll %g1, 2, %g1 20072bc: 05 00 80 81 sethi %hi(0x2020400), %g2 20072c0: 84 10 a2 88 or %g2, 0x288, %g2 ! 2020688 20072c4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20072c8: 40 00 0b af call 200a184 <_Thread_Enable_dispatch> 20072cc: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 20072d0: 81 c7 e0 08 ret 20072d4: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20072d8: 7f ff ef a9 call 200317c 20072dc: 01 00 00 00 nop 20072e0: a6 10 00 08 mov %o0, %l3 switch ( the_period->state ) { 20072e4: e4 04 20 38 ld [ %l0 + 0x38 ], %l2 20072e8: 80 a4 a0 02 cmp %l2, 2 20072ec: 02 80 00 1a be 2007354 20072f0: 80 a4 a0 04 cmp %l2, 4 20072f4: 02 80 00 32 be 20073bc 20072f8: 80 a4 a0 00 cmp %l2, 0 20072fc: 12 bf ff dd bne 2007270 <== NEVER TAKEN 2007300: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2007304: 7f ff ef a2 call 200318c 2007308: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 200730c: 7f ff ff 48 call 200702c <_Rate_monotonic_Initiate_statistics> 2007310: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2007314: 82 10 20 02 mov 2, %g1 2007318: c2 24 20 38 st %g1, [ %l0 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 200731c: 03 00 80 1d sethi %hi(0x2007400), %g1 2007320: 82 10 63 10 or %g1, 0x310, %g1 ! 2007710 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2007324: f0 24 20 30 st %i0, [ %l0 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007328: 92 04 20 10 add %l0, 0x10, %o1 200732c: 11 00 80 8b sethi %hi(0x2022c00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007330: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007334: 90 12 20 f0 or %o0, 0xf0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007338: c0 24 20 18 clr [ %l0 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 200733c: c0 24 20 34 clr [ %l0 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2007340: f2 24 20 3c st %i1, [ %l0 + 0x3c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2007344: c2 24 20 2c st %g1, [ %l0 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007348: 40 00 11 1d call 200b7bc <_Watchdog_Insert> 200734c: b0 10 20 00 clr %i0 2007350: 30 bf ff de b,a 20072c8 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2007354: 7f ff ff 7d call 2007148 <_Rate_monotonic_Update_statistics> 2007358: 90 10 00 10 mov %l0, %o0 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 200735c: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2007360: f2 24 20 3c st %i1, [ %l0 + 0x3c ] /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 2007364: c2 24 20 38 st %g1, [ %l0 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2007368: 7f ff ef 89 call 200318c 200736c: 90 10 00 13 mov %l3, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2007370: c2 04 60 d0 ld [ %l1 + 0xd0 ], %g1 2007374: c4 04 20 08 ld [ %l0 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2007378: 90 10 00 01 mov %g1, %o0 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 200737c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2007380: 40 00 0e 29 call 200ac24 <_Thread_Set_state> 2007384: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2007388: 7f ff ef 7d call 200317c 200738c: 01 00 00 00 nop local_state = the_period->state; 2007390: e6 04 20 38 ld [ %l0 + 0x38 ], %l3 the_period->state = RATE_MONOTONIC_ACTIVE; 2007394: e4 24 20 38 st %l2, [ %l0 + 0x38 ] _ISR_Enable( level ); 2007398: 7f ff ef 7d call 200318c 200739c: 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 ) 20073a0: 80 a4 e0 03 cmp %l3, 3 20073a4: 02 80 00 17 be 2007400 20073a8: d0 04 60 d0 ld [ %l1 + 0xd0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 20073ac: 40 00 0b 76 call 200a184 <_Thread_Enable_dispatch> 20073b0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 20073b4: 81 c7 e0 08 ret 20073b8: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 20073bc: 7f ff ff 63 call 2007148 <_Rate_monotonic_Update_statistics> 20073c0: 90 10 00 10 mov %l0, %o0 _ISR_Enable( level ); 20073c4: 7f ff ef 72 call 200318c 20073c8: 90 10 00 13 mov %l3, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 20073cc: 82 10 20 02 mov 2, %g1 20073d0: 92 04 20 10 add %l0, 0x10, %o1 20073d4: 11 00 80 8b sethi %hi(0x2022c00), %o0 20073d8: 90 12 20 f0 or %o0, 0xf0, %o0 ! 2022cf0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20073dc: f2 24 20 1c st %i1, [ %l0 + 0x1c ] the_period->next_length = length; 20073e0: f2 24 20 3c st %i1, [ %l0 + 0x3c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 20073e4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20073e8: 40 00 10 f5 call 200b7bc <_Watchdog_Insert> 20073ec: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20073f0: 40 00 0b 65 call 200a184 <_Thread_Enable_dispatch> 20073f4: 01 00 00 00 nop return RTEMS_TIMEOUT; 20073f8: 81 c7 e0 08 ret 20073fc: 81 e8 00 00 restore /* * 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 ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2007400: 40 00 0a 47 call 2009d1c <_Thread_Clear_state> 2007404: 13 00 00 10 sethi %hi(0x4000), %o1 2007408: 30 bf ff e9 b,a 20073ac =============================================================================== 0200740c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 200740c: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 2007410: 80 a6 60 00 cmp %i1, 0 2007414: 02 80 00 4d be 2007548 <== NEVER TAKEN 2007418: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 200741c: 13 00 80 81 sethi %hi(0x2020400), %o1 2007420: 9f c6 40 00 call %i1 2007424: 92 12 62 a0 or %o1, 0x2a0, %o1 ! 20206a0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 2007428: 90 10 00 18 mov %i0, %o0 200742c: 13 00 80 81 sethi %hi(0x2020400), %o1 2007430: 9f c6 40 00 call %i1 2007434: 92 12 62 c0 or %o1, 0x2c0, %o1 ! 20206c0 (*print)( context, "--- Wall times are in seconds ---\n" ); 2007438: 90 10 00 18 mov %i0, %o0 200743c: 13 00 80 81 sethi %hi(0x2020400), %o1 2007440: 9f c6 40 00 call %i1 2007444: 92 12 62 e8 or %o1, 0x2e8, %o1 ! 20206e8 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2007448: 90 10 00 18 mov %i0, %o0 200744c: 13 00 80 81 sethi %hi(0x2020400), %o1 2007450: 9f c6 40 00 call %i1 2007454: 92 12 63 10 or %o1, 0x310, %o1 ! 2020710 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 2007458: 90 10 00 18 mov %i0, %o0 200745c: 13 00 80 81 sethi %hi(0x2020400), %o1 2007460: 9f c6 40 00 call %i1 2007464: 92 12 63 60 or %o1, 0x360, %o1 ! 2020760 /* * 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 ; 2007468: 23 00 80 8a sethi %hi(0x2022800), %l1 200746c: a2 14 62 a0 or %l1, 0x2a0, %l1 ! 2022aa0 <_Rate_monotonic_Information> 2007470: e0 04 60 08 ld [ %l1 + 8 ], %l0 2007474: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2007478: 80 a4 00 01 cmp %l0, %g1 200747c: 18 80 00 33 bgu 2007548 <== NEVER TAKEN 2007480: 3b 00 80 81 sethi %hi(0x2020400), %i5 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, 2007484: 39 00 80 81 sethi %hi(0x2020400), %i4 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, 2007488: 35 00 80 81 sethi %hi(0x2020400), %i2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 200748c: 2f 00 80 81 sethi %hi(0x2020400), %l7 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2007490: ba 17 63 b0 or %i5, 0x3b0, %i5 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, 2007494: b8 17 23 d0 or %i4, 0x3d0, %i4 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, 2007498: b4 16 a3 f0 or %i2, 0x3f0, %i2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 200749c: ae 15 e3 c8 or %l7, 0x3c8, %l7 20074a0: a4 07 bf a0 add %fp, -96, %l2 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 20074a4: ac 07 bf d8 add %fp, -40, %l6 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 20074a8: a6 07 bf f8 add %fp, -8, %l3 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 ); 20074ac: aa 07 bf b8 add %fp, -72, %l5 20074b0: 10 80 00 06 b 20074c8 20074b4: a8 07 bf f0 add %fp, -16, %l4 * 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++ ) { 20074b8: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 20074bc: 80 a0 40 10 cmp %g1, %l0 20074c0: 0a 80 00 22 bcs 2007548 20074c4: 01 00 00 00 nop id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 20074c8: 90 10 00 10 mov %l0, %o0 20074cc: 40 00 1c ac call 200e77c 20074d0: 92 10 00 12 mov %l2, %o1 if ( status != RTEMS_SUCCESSFUL ) 20074d4: 80 a2 20 00 cmp %o0, 0 20074d8: 32 bf ff f8 bne,a 20074b8 20074dc: c2 04 60 0c ld [ %l1 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 20074e0: 92 10 00 16 mov %l6, %o1 20074e4: 40 00 1c d5 call 200e838 20074e8: 90 10 00 10 mov %l0, %o0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 20074ec: d0 07 bf d8 ld [ %fp + -40 ], %o0 20074f0: 94 10 00 13 mov %l3, %o2 20074f4: 40 00 00 b7 call 20077d0 20074f8: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 20074fc: d8 1f bf a0 ldd [ %fp + -96 ], %o4 2007500: 92 10 00 1d mov %i5, %o1 2007504: 94 10 00 10 mov %l0, %o2 2007508: 90 10 00 18 mov %i0, %o0 200750c: 9f c6 40 00 call %i1 2007510: 96 10 00 13 mov %l3, %o3 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2007514: c2 07 bf a0 ld [ %fp + -96 ], %g1 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 2007518: 94 10 00 14 mov %l4, %o2 200751c: 90 10 00 15 mov %l5, %o0 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2007520: 80 a0 60 00 cmp %g1, 0 2007524: 12 80 00 0b bne 2007550 2007528: 92 10 00 17 mov %l7, %o1 (*print)( context, "\n" ); 200752c: 9f c6 40 00 call %i1 2007530: 90 10 00 18 mov %i0, %o0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2007534: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 2007538: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 200753c: 80 a0 40 10 cmp %g1, %l0 2007540: 1a bf ff e3 bcc 20074cc <== ALWAYS TAKEN 2007544: 90 10 00 10 mov %l0, %o0 2007548: 81 c7 e0 08 ret 200754c: 81 e8 00 00 restore 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 ); 2007550: 40 00 0f 60 call 200b2d0 <_Timespec_Divide_by_integer> 2007554: 92 10 00 01 mov %g1, %o1 (*print)( context, 2007558: d0 07 bf ac ld [ %fp + -84 ], %o0 200755c: 40 00 5a bd call 201e050 <.div> 2007560: 92 10 23 e8 mov 0x3e8, %o1 2007564: 96 10 00 08 mov %o0, %o3 2007568: d0 07 bf b4 ld [ %fp + -76 ], %o0 200756c: d6 27 bf 9c st %o3, [ %fp + -100 ] 2007570: 40 00 5a b8 call 201e050 <.div> 2007574: 92 10 23 e8 mov 0x3e8, %o1 2007578: c2 07 bf f0 ld [ %fp + -16 ], %g1 200757c: b6 10 00 08 mov %o0, %i3 2007580: d0 07 bf f4 ld [ %fp + -12 ], %o0 2007584: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2007588: 40 00 5a b2 call 201e050 <.div> 200758c: 92 10 23 e8 mov 0x3e8, %o1 2007590: d8 07 bf b0 ld [ %fp + -80 ], %o4 2007594: d6 07 bf 9c ld [ %fp + -100 ], %o3 2007598: d4 07 bf a8 ld [ %fp + -88 ], %o2 200759c: 9a 10 00 1b mov %i3, %o5 20075a0: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 20075a4: 92 10 00 1c mov %i4, %o1 20075a8: 9f c6 40 00 call %i1 20075ac: 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); 20075b0: d2 07 bf a0 ld [ %fp + -96 ], %o1 20075b4: 94 10 00 14 mov %l4, %o2 20075b8: 40 00 0f 46 call 200b2d0 <_Timespec_Divide_by_integer> 20075bc: 90 07 bf d0 add %fp, -48, %o0 (*print)( context, 20075c0: d0 07 bf c4 ld [ %fp + -60 ], %o0 20075c4: 40 00 5a a3 call 201e050 <.div> 20075c8: 92 10 23 e8 mov 0x3e8, %o1 20075cc: 96 10 00 08 mov %o0, %o3 20075d0: d0 07 bf cc ld [ %fp + -52 ], %o0 20075d4: d6 27 bf 9c st %o3, [ %fp + -100 ] 20075d8: 40 00 5a 9e call 201e050 <.div> 20075dc: 92 10 23 e8 mov 0x3e8, %o1 20075e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 20075e4: b6 10 00 08 mov %o0, %i3 20075e8: d0 07 bf f4 ld [ %fp + -12 ], %o0 20075ec: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20075f0: 40 00 5a 98 call 201e050 <.div> 20075f4: 92 10 23 e8 mov 0x3e8, %o1 20075f8: d4 07 bf c0 ld [ %fp + -64 ], %o2 20075fc: d6 07 bf 9c ld [ %fp + -100 ], %o3 2007600: d8 07 bf c8 ld [ %fp + -56 ], %o4 2007604: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2007608: 9a 10 00 1b mov %i3, %o5 200760c: 90 10 00 18 mov %i0, %o0 2007610: 9f c6 40 00 call %i1 2007614: 92 10 00 1a mov %i2, %o1 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2007618: 10 bf ff a8 b 20074b8 200761c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 =============================================================================== 0200763c : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 200763c: 9d e3 bf a0 save %sp, -96, %sp 2007640: 03 00 80 8b sethi %hi(0x2022c00), %g1 2007644: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 2022c10 <_Thread_Dispatch_disable_level> 2007648: 84 00 a0 01 inc %g2 200764c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] /* * Cycle through all possible ids and try to reset 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 ; 2007650: 23 00 80 8a sethi %hi(0x2022800), %l1 2007654: a2 14 62 a0 or %l1, 0x2a0, %l1 ! 2022aa0 <_Rate_monotonic_Information> 2007658: e0 04 60 08 ld [ %l1 + 8 ], %l0 200765c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2007660: 80 a4 00 01 cmp %l0, %g1 2007664: 18 80 00 09 bgu 2007688 <== NEVER TAKEN 2007668: 01 00 00 00 nop id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 200766c: 40 00 00 0a call 2007694 2007670: 90 10 00 10 mov %l0, %o0 /* * Cycle through all possible ids and try to reset 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 ; 2007674: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 2007678: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to reset 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 ; 200767c: 80 a0 40 10 cmp %g1, %l0 2007680: 1a bf ff fb bcc 200766c 2007684: 01 00 00 00 nop } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 2007688: 40 00 0a bf call 200a184 <_Thread_Enable_dispatch> 200768c: 81 e8 00 00 restore =============================================================================== 02014d88 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 2014d88: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 2014d8c: 80 a6 60 00 cmp %i1, 0 2014d90: 02 80 00 22 be 2014e18 2014d94: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( !size ) 2014d98: 02 80 00 20 be 2014e18 2014d9c: 21 00 80 f9 sethi %hi(0x203e400), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 2014da0: 40 00 09 02 call 20171a8 <_API_Mutex_Lock> 2014da4: d0 04 22 28 ld [ %l0 + 0x228 ], %o0 ! 203e628 <_RTEMS_Allocator_Mutex> 2014da8: 92 10 00 18 mov %i0, %o1 2014dac: 11 00 80 f8 sethi %hi(0x203e000), %o0 2014db0: 94 07 bf fc add %fp, -4, %o2 2014db4: 40 00 10 3e call 2018eac <_Objects_Get_no_protection> 2014db8: 90 12 23 f8 or %o0, 0x3f8, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 2014dbc: c2 07 bf fc ld [ %fp + -4 ], %g1 2014dc0: 80 a0 60 00 cmp %g1, 0 2014dc4: 12 80 00 0f bne 2014e00 2014dc8: 80 a0 60 01 cmp %g1, 1 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 2014dcc: 90 02 20 68 add %o0, 0x68, %o0 2014dd0: 92 10 00 19 mov %i1, %o1 2014dd4: 94 10 00 1a mov %i2, %o2 2014dd8: 40 00 0e 92 call 2018820 <_Heap_Size_of_alloc_area> 2014ddc: b0 10 20 09 mov 9, %i0 2014de0: 80 8a 20 ff btst 0xff, %o0 2014de4: 02 80 00 03 be 2014df0 <== NEVER TAKEN 2014de8: 01 00 00 00 nop 2014dec: b0 10 20 00 clr %i0 ! 0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2014df0: 40 00 09 04 call 2017200 <_API_Mutex_Unlock> 2014df4: d0 04 22 28 ld [ %l0 + 0x228 ], %o0 return return_status; 2014df8: 81 c7 e0 08 ret 2014dfc: 81 e8 00 00 restore return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 2014e00: 12 bf ff fb bne 2014dec <== NEVER TAKEN 2014e04: b0 10 20 04 mov 4, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2014e08: 40 00 08 fe call 2017200 <_API_Mutex_Unlock> 2014e0c: d0 04 22 28 ld [ %l0 + 0x228 ], %o0 return return_status; 2014e10: 81 c7 e0 08 ret 2014e14: 81 e8 00 00 restore } 2014e18: 81 c7 e0 08 ret 2014e1c: 91 e8 20 09 restore %g0, 9, %o0 =============================================================================== 020154ac : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 20154ac: 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 ) 20154b0: 80 a6 60 00 cmp %i1, 0 20154b4: 12 80 00 04 bne 20154c4 20154b8: 82 10 20 0a mov 0xa, %g1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20154bc: 81 c7 e0 08 ret 20154c0: 91 e8 00 01 restore %g0, %g1, %o0 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20154c4: 90 10 00 18 mov %i0, %o0 20154c8: 40 00 11 6b call 2019a74 <_Thread_Get> 20154cc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20154d0: c4 07 bf fc ld [ %fp + -4 ], %g2 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20154d4: a2 10 00 08 mov %o0, %l1 switch ( location ) { 20154d8: 80 a0 a0 00 cmp %g2, 0 20154dc: 12 bf ff f8 bne 20154bc 20154e0: 82 10 20 04 mov 4, %g1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 20154e4: e0 02 21 68 ld [ %o0 + 0x168 ], %l0 asr = &api->Signal; 20154e8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20154ec: 80 a0 60 00 cmp %g1, 0 20154f0: 02 80 00 26 be 2015588 20154f4: 01 00 00 00 nop if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 20154f8: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 20154fc: 80 a0 60 00 cmp %g1, 0 2015500: 02 80 00 16 be 2015558 2015504: 01 00 00 00 nop rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 2015508: 7f ff e8 5e call 200f680 201550c: 01 00 00 00 nop *signal_set |= signals; 2015510: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2015514: b2 10 40 19 or %g1, %i1, %i1 2015518: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _ISR_Enable( _level ); 201551c: 7f ff e8 5d call 200f690 2015520: 01 00 00 00 nop _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2015524: 03 00 80 f9 sethi %hi(0x203e400), %g1 2015528: c4 00 62 0c ld [ %g1 + 0x20c ], %g2 ! 203e60c <_ISR_Nest_level> if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 201552c: 82 10 20 01 mov 1, %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2015530: 80 a0 a0 00 cmp %g2, 0 2015534: 02 80 00 10 be 2015574 2015538: c2 2c 60 74 stb %g1, [ %l1 + 0x74 ] 201553c: 05 00 80 f9 sethi %hi(0x203e400), %g2 2015540: c4 00 a2 30 ld [ %g2 + 0x230 ], %g2 ! 203e630 <_Thread_Executing> 2015544: 80 a4 40 02 cmp %l1, %g2 2015548: 12 80 00 0b bne 2015574 <== NEVER TAKEN 201554c: 05 00 80 f9 sethi %hi(0x203e400), %g2 _ISR_Signals_to_thread_executing = true; 2015550: 10 80 00 09 b 2015574 2015554: c2 28 a2 c8 stb %g1, [ %g2 + 0x2c8 ] ! 203e6c8 <_ISR_Signals_to_thread_executing> rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 2015558: 7f ff e8 4a call 200f680 201555c: 01 00 00 00 nop *signal_set |= signals; 2015560: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2015564: b2 10 40 19 or %g1, %i1, %i1 2015568: f2 24 20 18 st %i1, [ %l0 + 0x18 ] _ISR_Enable( _level ); 201556c: 7f ff e8 49 call 200f690 2015570: 01 00 00 00 nop } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 2015574: 40 00 11 1c call 20199e4 <_Thread_Enable_dispatch> 2015578: 01 00 00 00 nop 201557c: 82 10 20 00 clr %g1 ! 0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2015580: 81 c7 e0 08 ret 2015584: 91 e8 00 01 restore %g0, %g1, %o0 _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 2015588: 40 00 11 17 call 20199e4 <_Thread_Enable_dispatch> 201558c: 01 00 00 00 nop return RTEMS_NOT_DEFINED; 2015590: 10 bf ff cb b 20154bc 2015594: 82 10 20 0b mov 0xb, %g1 ! b =============================================================================== 0200eb80 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 200eb80: 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 ) 200eb84: 80 a6 a0 00 cmp %i2, 0 200eb88: 02 80 00 44 be 200ec98 200eb8c: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 200eb90: 03 00 80 73 sethi %hi(0x201cc00), %g1 200eb94: e0 00 62 00 ld [ %g1 + 0x200 ], %l0 ! 201ce00 <_Thread_Executing> api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200eb98: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200eb9c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200eba0: 80 a0 00 02 cmp %g0, %g2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 200eba4: e2 04 21 68 ld [ %l0 + 0x168 ], %l1 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200eba8: a4 60 3f ff subx %g0, -1, %l2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200ebac: 80 a0 60 00 cmp %g1, 0 200ebb0: 12 80 00 3c bne 200eca0 200ebb4: a5 2c a0 08 sll %l2, 8, %l2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200ebb8: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 200ebbc: 80 a0 00 01 cmp %g0, %g1 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 200ebc0: 7f ff ec f1 call 2009f84 <_CPU_ISR_Get_level> 200ebc4: a6 60 3f ff subx %g0, -1, %l3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200ebc8: a7 2c e0 0a sll %l3, 0xa, %l3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 200ebcc: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200ebd0: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200ebd4: 80 8e 61 00 btst 0x100, %i1 200ebd8: 02 80 00 06 be 200ebf0 200ebdc: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 200ebe0: 83 36 20 08 srl %i0, 8, %g1 200ebe4: 82 18 60 01 xor %g1, 1, %g1 200ebe8: 82 08 60 01 and %g1, 1, %g1 200ebec: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ] if ( mask & RTEMS_TIMESLICE_MASK ) { 200ebf0: 80 8e 62 00 btst 0x200, %i1 200ebf4: 02 80 00 0b be 200ec20 200ebf8: 80 8e 60 0f btst 0xf, %i1 if ( _Modes_Is_timeslice(mode_set) ) { 200ebfc: 80 8e 22 00 btst 0x200, %i0 200ec00: 22 80 00 07 be,a 200ec1c 200ec04: c0 24 20 7c clr [ %l0 + 0x7c ] executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200ec08: 03 00 80 73 sethi %hi(0x201cc00), %g1 200ec0c: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 201cc98 <_Thread_Ticks_per_timeslice> 200ec10: c2 24 20 78 st %g1, [ %l0 + 0x78 ] if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200ec14: 82 10 20 01 mov 1, %g1 200ec18: c2 24 20 7c st %g1, [ %l0 + 0x7c ] /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 200ec1c: 80 8e 60 0f btst 0xf, %i1 200ec20: 12 80 00 2d bne 200ecd4 200ec24: 01 00 00 00 nop */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 200ec28: 80 8e 64 00 btst 0x400, %i1 200ec2c: 22 80 00 16 be,a 200ec84 200ec30: a0 10 20 00 clr %l0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200ec34: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 200ec38: b1 36 20 0a srl %i0, 0xa, %i0 200ec3c: b0 1e 20 01 xor %i0, 1, %i0 200ec40: b0 0e 20 01 and %i0, 1, %i0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200ec44: 80 a0 40 18 cmp %g1, %i0 200ec48: 22 80 00 0f be,a 200ec84 200ec4c: a0 10 20 00 clr %l0 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 200ec50: 7f ff cd 97 call 20022ac 200ec54: f0 2c 60 08 stb %i0, [ %l1 + 8 ] _signals = information->signals_pending; 200ec58: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 information->signals_pending = information->signals_posted; 200ec5c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 information->signals_posted = _signals; 200ec60: c4 24 60 14 st %g2, [ %l1 + 0x14 ] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 200ec64: c2 24 60 18 st %g1, [ %l1 + 0x18 ] information->signals_posted = _signals; _ISR_Enable( _level ); 200ec68: 7f ff cd 95 call 20022bc 200ec6c: 01 00 00 00 nop 200ec70: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 200ec74: 80 a0 60 00 cmp %g1, 0 200ec78: 12 80 00 28 bne 200ed18 200ec7c: 82 10 20 01 mov 1, %g1 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 200ec80: a0 10 20 00 clr %l0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 200ec84: 03 00 80 73 sethi %hi(0x201cc00), %g1 200ec88: c2 00 62 e0 ld [ %g1 + 0x2e0 ], %g1 ! 201cee0 <_System_state_Current> 200ec8c: 80 a0 60 03 cmp %g1, 3 200ec90: 02 80 00 16 be 200ece8 <== ALWAYS TAKEN 200ec94: 82 10 20 00 clr %g1 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 200ec98: 81 c7 e0 08 ret 200ec9c: 91 e8 00 01 restore %g0, %g1, %o0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200eca0: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 200eca4: a4 14 a2 00 or %l2, 0x200, %l2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200eca8: 80 a0 00 01 cmp %g0, %g1 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 200ecac: 7f ff ec b6 call 2009f84 <_CPU_ISR_Get_level> 200ecb0: a6 60 3f ff subx %g0, -1, %l3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200ecb4: a7 2c e0 0a sll %l3, 0xa, %l3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 200ecb8: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200ecbc: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200ecc0: 80 8e 61 00 btst 0x100, %i1 200ecc4: 02 bf ff cb be 200ebf0 200ecc8: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 200eccc: 10 bf ff c6 b 200ebe4 200ecd0: 83 36 20 08 srl %i0, 8, %g1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 200ecd4: 90 0e 20 0f and %i0, 0xf, %o0 200ecd8: 7f ff cd 79 call 20022bc 200ecdc: 91 2a 20 08 sll %o0, 8, %o0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 200ece0: 10 bf ff d3 b 200ec2c 200ece4: 80 8e 64 00 btst 0x400, %i1 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 200ece8: 40 00 00 c8 call 200f008 <_Thread_Evaluate_mode> 200ecec: 01 00 00 00 nop 200ecf0: 80 8a 20 ff btst 0xff, %o0 200ecf4: 12 80 00 04 bne 200ed04 200ecf8: 80 8c 20 ff btst 0xff, %l0 200ecfc: 02 bf ff e7 be 200ec98 200ed00: 82 10 20 00 clr %g1 _Thread_Dispatch(); 200ed04: 7f ff e5 43 call 2008210 <_Thread_Dispatch> 200ed08: 01 00 00 00 nop 200ed0c: 82 10 20 00 clr %g1 ! 0 return RTEMS_SUCCESSFUL; } 200ed10: 81 c7 e0 08 ret 200ed14: 91 e8 00 01 restore %g0, %g1, %o0 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 200ed18: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 200ed1c: 10 bf ff da b 200ec84 200ed20: a0 10 20 01 mov 1, %l0 =============================================================================== 0200b944 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 200b944: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 200b948: 80 a6 60 00 cmp %i1, 0 200b94c: 02 80 00 07 be 200b968 200b950: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 200b954: 03 00 80 8c sethi %hi(0x2023000), %g1 200b958: c2 08 61 b4 ldub [ %g1 + 0x1b4 ], %g1 ! 20231b4 200b95c: 80 a6 40 01 cmp %i1, %g1 200b960: 18 80 00 1c bgu 200b9d0 200b964: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 200b968: 80 a6 a0 00 cmp %i2, 0 200b96c: 02 80 00 19 be 200b9d0 200b970: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 200b974: 40 00 08 d7 call 200dcd0 <_Thread_Get> 200b978: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200b97c: c2 07 bf fc ld [ %fp + -4 ], %g1 200b980: 80 a0 60 00 cmp %g1, 0 200b984: 12 80 00 13 bne 200b9d0 200b988: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 200b98c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 200b990: 80 a6 60 00 cmp %i1, 0 200b994: 02 80 00 0d be 200b9c8 200b998: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b99c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200b9a0: 80 a0 60 00 cmp %g1, 0 200b9a4: 02 80 00 06 be 200b9bc 200b9a8: f2 22 20 18 st %i1, [ %o0 + 0x18 ] the_thread->current_priority > new_priority ) 200b9ac: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200b9b0: 80 a6 40 01 cmp %i1, %g1 200b9b4: 1a 80 00 05 bcc 200b9c8 <== ALWAYS TAKEN 200b9b8: 01 00 00 00 nop _Thread_Change_priority( the_thread, new_priority, false ); 200b9bc: 92 10 00 19 mov %i1, %o1 200b9c0: 40 00 07 02 call 200d5c8 <_Thread_Change_priority> 200b9c4: 94 10 20 00 clr %o2 } _Thread_Enable_dispatch(); 200b9c8: 40 00 08 9e call 200dc40 <_Thread_Enable_dispatch> 200b9cc: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200b9d0: 81 c7 e0 08 ret 200b9d4: 81 e8 00 00 restore =============================================================================== 02007814 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 2007814: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 2007818: 80 a6 60 00 cmp %i1, 0 200781c: 02 80 00 09 be 2007840 2007820: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 2007824: 90 10 00 18 mov %i0, %o0 2007828: 40 00 08 55 call 200997c <_Thread_Get> 200782c: 92 07 bf fc add %fp, -4, %o1 switch (location) { 2007830: c4 07 bf fc ld [ %fp + -4 ], %g2 2007834: 80 a0 a0 00 cmp %g2, 0 2007838: 02 80 00 04 be 2007848 200783c: 82 10 20 04 mov 4, %g1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007840: 81 c7 e0 08 ret 2007844: 91 e8 00 01 restore %g0, %g1, %o0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 2007848: d2 02 21 78 ld [ %o0 + 0x178 ], %o1 while (tvp) { 200784c: 80 a2 60 00 cmp %o1, 0 2007850: 02 80 00 10 be 2007890 2007854: 01 00 00 00 nop if (tvp->ptr == ptr) { 2007858: c2 02 60 04 ld [ %o1 + 4 ], %g1 200785c: 80 a0 40 19 cmp %g1, %i1 2007860: 12 80 00 08 bne 2007880 2007864: 84 10 00 09 mov %o1, %g2 if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 2007868: 10 80 00 17 b 20078c4 200786c: c2 02 40 00 ld [ %o1 ], %g1 switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 2007870: 80 a0 40 19 cmp %g1, %i1 2007874: 22 80 00 0c be,a 20078a4 2007878: c2 02 40 00 ld [ %o1 ], %g1 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 200787c: 84 10 00 09 mov %o1, %g2 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 2007880: d2 02 40 00 ld [ %o1 ], %o1 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 2007884: 80 a2 60 00 cmp %o1, 0 2007888: 32 bf ff fa bne,a 2007870 <== ALWAYS TAKEN 200788c: c2 02 60 04 ld [ %o1 + 4 ], %g1 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 2007890: 40 00 08 2d call 2009944 <_Thread_Enable_dispatch> 2007894: 01 00 00 00 nop 2007898: 82 10 20 09 mov 9, %g1 ! 9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200789c: 81 c7 e0 08 ret 20078a0: 91 e8 00 01 restore %g0, %g1, %o0 case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 20078a4: c2 20 80 00 st %g1, [ %g2 ] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 20078a8: 40 00 00 2d call 200795c <_RTEMS_Tasks_Invoke_task_variable_dtor> 20078ac: 01 00 00 00 nop _Thread_Enable_dispatch(); 20078b0: 40 00 08 25 call 2009944 <_Thread_Enable_dispatch> 20078b4: 01 00 00 00 nop 20078b8: 82 10 20 00 clr %g1 ! 0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20078bc: 81 c7 e0 08 ret 20078c0: 91 e8 00 01 restore %g0, %g1, %o0 while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 20078c4: 10 bf ff f9 b 20078a8 20078c8: c2 22 21 78 st %g1, [ %o0 + 0x178 ] =============================================================================== 020078cc : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 20078cc: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 20078d0: 80 a6 60 00 cmp %i1, 0 20078d4: 02 80 00 1c be 2007944 20078d8: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( !result ) 20078dc: 02 80 00 1a be 2007944 20078e0: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 20078e4: 40 00 08 26 call 200997c <_Thread_Get> 20078e8: 92 07 bf fc add %fp, -4, %o1 switch (location) { 20078ec: c2 07 bf fc ld [ %fp + -4 ], %g1 20078f0: 80 a0 60 00 cmp %g1, 0 20078f4: 12 80 00 12 bne 200793c 20078f8: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 20078fc: c2 02 21 78 ld [ %o0 + 0x178 ], %g1 while (tvp) { 2007900: 80 a0 60 00 cmp %g1, 0 2007904: 32 80 00 07 bne,a 2007920 2007908: c4 00 60 04 ld [ %g1 + 4 ], %g2 200790c: 30 80 00 10 b,a 200794c 2007910: 80 a0 60 00 cmp %g1, 0 2007914: 02 80 00 0e be 200794c <== NEVER TAKEN 2007918: 01 00 00 00 nop if (tvp->ptr == ptr) { 200791c: c4 00 60 04 ld [ %g1 + 4 ], %g2 2007920: 80 a0 80 19 cmp %g2, %i1 2007924: 32 bf ff fb bne,a 2007910 2007928: c2 00 40 00 ld [ %g1 ], %g1 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 200792c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 _Thread_Enable_dispatch(); 2007930: b0 10 20 00 clr %i0 2007934: 40 00 08 04 call 2009944 <_Thread_Enable_dispatch> 2007938: c2 26 80 00 st %g1, [ %i2 ] return RTEMS_SUCCESSFUL; 200793c: 81 c7 e0 08 ret 2007940: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2007944: 81 c7 e0 08 ret 2007948: 91 e8 20 09 restore %g0, 9, %o0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 200794c: 40 00 07 fe call 2009944 <_Thread_Enable_dispatch> 2007950: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; 2007954: 81 c7 e0 08 ret 2007958: 81 e8 00 00 restore =============================================================================== 02015ee8 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 2015ee8: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 2015eec: 11 00 80 fb sethi %hi(0x203ec00), %o0 2015ef0: 92 10 00 18 mov %i0, %o1 2015ef4: 90 12 22 f0 or %o0, 0x2f0, %o0 2015ef8: 40 00 0b ff call 2018ef4 <_Objects_Get> 2015efc: 94 07 bf fc add %fp, -4, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2015f00: c2 07 bf fc ld [ %fp + -4 ], %g1 2015f04: 80 a0 60 00 cmp %g1, 0 2015f08: 12 80 00 0a bne 2015f30 2015f0c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 2015f10: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2015f14: 80 a0 60 04 cmp %g1, 4 2015f18: 02 80 00 04 be 2015f28 <== NEVER TAKEN 2015f1c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_timer->Ticker ); 2015f20: 40 00 15 3e call 201b418 <_Watchdog_Remove> 2015f24: 90 02 20 10 add %o0, 0x10, %o0 _Thread_Enable_dispatch(); 2015f28: 40 00 0e af call 20199e4 <_Thread_Enable_dispatch> 2015f2c: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2015f30: 81 c7 e0 08 ret 2015f34: 81 e8 00 00 restore =============================================================================== 020163f4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 20163f4: 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; 20163f8: 03 00 80 fb sethi %hi(0x203ec00), %g1 20163fc: e0 00 63 30 ld [ %g1 + 0x330 ], %l0 ! 203ef30 <_Timer_server> rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 2016400: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 2016404: 80 a4 20 00 cmp %l0, 0 2016408: 02 80 00 34 be 20164d8 201640c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 2016410: 03 00 80 f9 sethi %hi(0x203e400), %g1 2016414: c2 08 61 84 ldub [ %g1 + 0x184 ], %g1 ! 203e584 <_TOD_Is_set> 2016418: 80 a0 60 00 cmp %g1, 0 201641c: 02 80 00 2f be 20164d8 <== NEVER TAKEN 2016420: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !routine ) 2016424: 80 a6 a0 00 cmp %i2, 0 2016428: 02 80 00 2c be 20164d8 201642c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 2016430: 7f ff f3 d2 call 2013378 <_TOD_Validate> 2016434: 90 10 00 19 mov %i1, %o0 2016438: 80 8a 20 ff btst 0xff, %o0 201643c: 12 80 00 04 bne 201644c 2016440: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2016444: 81 c7 e0 08 ret 2016448: 91 e8 20 14 restore %g0, 0x14, %o0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 201644c: 7f ff f3 95 call 20132a0 <_TOD_To_seconds> 2016450: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch() ) 2016454: 25 00 80 f9 sethi %hi(0x203e400), %l2 2016458: c2 04 a2 04 ld [ %l2 + 0x204 ], %g1 ! 203e604 <_TOD_Now> 201645c: 80 a2 00 01 cmp %o0, %g1 2016460: 08 bf ff f9 bleu 2016444 2016464: b2 10 00 08 mov %o0, %i1 2016468: 11 00 80 fb sethi %hi(0x203ec00), %o0 201646c: 92 10 00 11 mov %l1, %o1 2016470: 90 12 22 f0 or %o0, 0x2f0, %o0 2016474: 40 00 0a a0 call 2018ef4 <_Objects_Get> 2016478: 94 07 bf fc add %fp, -4, %o2 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 201647c: c2 07 bf fc ld [ %fp + -4 ], %g1 2016480: a6 10 00 08 mov %o0, %l3 2016484: 80 a0 60 00 cmp %g1, 0 2016488: 12 80 00 14 bne 20164d8 201648c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2016490: 40 00 13 e2 call 201b418 <_Watchdog_Remove> 2016494: 90 02 20 10 add %o0, 0x10, %o0 the_watchdog->routine = routine; the_watchdog->id = id; 2016498: e2 24 e0 30 st %l1, [ %l3 + 0x30 ] the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 201649c: c4 04 a2 04 ld [ %l2 + 0x204 ], %g2 (*timer_server->schedule_operation)( timer_server, the_timer ); 20164a0: c2 04 20 04 ld [ %l0 + 4 ], %g1 20164a4: 90 10 00 10 mov %l0, %o0 20164a8: 92 10 00 13 mov %l3, %o1 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 20164ac: b2 26 40 02 sub %i1, %g2, %i1 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 20164b0: 84 10 20 03 mov 3, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20164b4: f4 24 e0 2c st %i2, [ %l3 + 0x2c ] 20164b8: c4 24 e0 38 st %g2, [ %l3 + 0x38 ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20164bc: f6 24 e0 34 st %i3, [ %l3 + 0x34 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 20164c0: f2 24 e0 1c st %i1, [ %l3 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20164c4: c0 24 e0 18 clr [ %l3 + 0x18 ] (*timer_server->schedule_operation)( timer_server, the_timer ); 20164c8: 9f c0 40 00 call %g1 20164cc: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 20164d0: 40 00 0d 45 call 20199e4 <_Thread_Enable_dispatch> 20164d4: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 20164d8: 81 c7 e0 08 ret 20164dc: 81 e8 00 00 restore =============================================================================== 020069e4 : #include int sched_get_priority_max( int policy ) { 20069e4: 9d e3 bf a0 save %sp, -96, %sp switch ( policy ) { 20069e8: 80 a6 20 04 cmp %i0, 4 20069ec: 08 80 00 08 bleu 2006a0c 20069f0: 82 10 20 01 mov 1, %g1 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 20069f4: 40 00 28 d1 call 2010d38 <__errno> 20069f8: b0 10 3f ff mov -1, %i0 20069fc: 82 10 20 16 mov 0x16, %g1 2006a00: c2 22 00 00 st %g1, [ %o0 ] 2006a04: 81 c7 e0 08 ret 2006a08: 81 e8 00 00 restore int sched_get_priority_max( int policy ) { switch ( policy ) { 2006a0c: b1 28 40 18 sll %g1, %i0, %i0 2006a10: 80 8e 20 17 btst 0x17, %i0 2006a14: 02 bf ff f8 be 20069f4 <== NEVER TAKEN 2006a18: 03 00 80 75 sethi %hi(0x201d400), %g1 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 2006a1c: f0 08 62 a8 ldub [ %g1 + 0x2a8 ], %i0 ! 201d6a8 } 2006a20: 81 c7 e0 08 ret 2006a24: 91 ee 3f ff restore %i0, -1, %o0 =============================================================================== 02006a28 : #include int sched_get_priority_min( int policy ) { 2006a28: 9d e3 bf a0 save %sp, -96, %sp switch ( policy ) { 2006a2c: 80 a6 20 04 cmp %i0, 4 2006a30: 08 80 00 08 bleu 2006a50 2006a34: 82 10 20 01 mov 1, %g1 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2006a38: 40 00 28 c0 call 2010d38 <__errno> 2006a3c: b0 10 3f ff mov -1, %i0 2006a40: 82 10 20 16 mov 0x16, %g1 2006a44: c2 22 00 00 st %g1, [ %o0 ] } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 2006a48: 81 c7 e0 08 ret 2006a4c: 81 e8 00 00 restore int sched_get_priority_min( int policy ) { switch ( policy ) { 2006a50: b1 28 40 18 sll %g1, %i0, %i0 2006a54: 80 8e 20 17 btst 0x17, %i0 2006a58: 02 bf ff f8 be 2006a38 <== NEVER TAKEN 2006a5c: b0 10 20 01 mov 1, %i0 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 2006a60: 81 c7 e0 08 ret 2006a64: 81 e8 00 00 restore =============================================================================== 02006a68 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 2006a68: 9d e3 bf a0 save %sp, -96, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 2006a6c: 80 a6 20 00 cmp %i0, 0 2006a70: 12 80 00 0a bne 2006a98 <== ALWAYS TAKEN 2006a74: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 2006a78: 02 80 00 13 be 2006ac4 2006a7c: 03 00 80 78 sethi %hi(0x201e000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 2006a80: d0 00 60 e8 ld [ %g1 + 0xe8 ], %o0 ! 201e0e8 <_Thread_Ticks_per_timeslice> 2006a84: 92 10 00 19 mov %i1, %o1 2006a88: 40 00 0e c5 call 200a59c <_Timespec_From_ticks> 2006a8c: b0 10 20 00 clr %i0 return 0; } 2006a90: 81 c7 e0 08 ret 2006a94: 81 e8 00 00 restore { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 2006a98: 7f ff f1 a2 call 2003120 2006a9c: 01 00 00 00 nop 2006aa0: 80 a2 00 18 cmp %o0, %i0 2006aa4: 02 bf ff f5 be 2006a78 2006aa8: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 2006aac: 40 00 28 a3 call 2010d38 <__errno> 2006ab0: b0 10 3f ff mov -1, %i0 2006ab4: 82 10 20 03 mov 3, %g1 2006ab8: c2 22 00 00 st %g1, [ %o0 ] 2006abc: 81 c7 e0 08 ret 2006ac0: 81 e8 00 00 restore if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 2006ac4: 40 00 28 9d call 2010d38 <__errno> 2006ac8: b0 10 3f ff mov -1, %i0 2006acc: 82 10 20 16 mov 0x16, %g1 2006ad0: c2 22 00 00 st %g1, [ %o0 ] 2006ad4: 81 c7 e0 08 ret 2006ad8: 81 e8 00 00 restore =============================================================================== 020091f8 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 20091f8: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20091fc: 03 00 80 8c sethi %hi(0x2023000), %g1 2009200: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 20230e0 <_Thread_Dispatch_disable_level> Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); 2009204: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2009208: 84 00 a0 01 inc %g2 200920c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2009210: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2009214: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 2009218: c4 20 60 e0 st %g2, [ %g1 + 0xe0 ] POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 200921c: a0 8e 62 00 andcc %i1, 0x200, %l0 2009220: 12 80 00 26 bne 20092b8 2009224: 82 07 a0 54 add %fp, 0x54, %g1 2009228: a2 10 20 00 clr %l1 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 200922c: 90 10 00 18 mov %i0, %o0 2009230: 40 00 1c 8a call 2010458 <_POSIX_Semaphore_Name_to_id> 2009234: 92 07 bf f8 add %fp, -8, %o1 * 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 ) { 2009238: a4 92 20 00 orcc %o0, 0, %l2 200923c: 22 80 00 0e be,a 2009274 2009240: 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) ) ) { 2009244: 80 a4 a0 02 cmp %l2, 2 2009248: 12 80 00 04 bne 2009258 <== NEVER TAKEN 200924c: 80 a4 20 00 cmp %l0, 0 2009250: 12 80 00 1d bne 20092c4 2009254: 94 10 00 11 mov %l1, %o2 _Thread_Enable_dispatch(); 2009258: 40 00 0b 20 call 200bed8 <_Thread_Enable_dispatch> 200925c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 2009260: 40 00 2c 0e call 2014298 <__errno> 2009264: 01 00 00 00 nop 2009268: e4 22 00 00 st %l2, [ %o0 ] 200926c: 81 c7 e0 08 ret 2009270: 81 e8 00 00 restore /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 2009274: 80 a6 6a 00 cmp %i1, 0xa00 2009278: 02 80 00 1f be 20092f4 200927c: d2 07 bf f8 ld [ %fp + -8 ], %o1 2009280: 94 07 bf f0 add %fp, -16, %o2 2009284: 11 00 80 8c sethi %hi(0x2023000), %o0 2009288: 40 00 08 83 call 200b494 <_Objects_Get> 200928c: 90 12 23 f0 or %o0, 0x3f0, %o0 ! 20233f0 <_POSIX_Semaphore_Information> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 2009290: 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( &the_semaphore_id, &location ); 2009294: d0 27 bf f4 st %o0, [ %fp + -12 ] the_semaphore->open_count += 1; 2009298: 82 00 60 01 inc %g1 _Thread_Enable_dispatch(); 200929c: 40 00 0b 0f call 200bed8 <_Thread_Enable_dispatch> 20092a0: c2 22 20 18 st %g1, [ %o0 + 0x18 ] _Thread_Enable_dispatch(); 20092a4: 40 00 0b 0d call 200bed8 <_Thread_Enable_dispatch> 20092a8: 01 00 00 00 nop return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 20092ac: f0 07 bf f4 ld [ %fp + -12 ], %i0 #endif return id; } 20092b0: 81 c7 e0 08 ret 20092b4: 91 ee 20 08 restore %i0, 8, %o0 _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 20092b8: e2 07 a0 50 ld [ %fp + 0x50 ], %l1 20092bc: 10 bf ff dc b 200922c 20092c0: c2 27 bf fc st %g1, [ %fp + -4 ] /* * 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( 20092c4: 90 10 00 18 mov %i0, %o0 20092c8: 92 10 20 00 clr %o1 20092cc: 40 00 1c 08 call 20102ec <_POSIX_Semaphore_Create_support> 20092d0: 96 07 bf f4 add %fp, -12, %o3 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 20092d4: 40 00 0b 01 call 200bed8 <_Thread_Enable_dispatch> 20092d8: a0 10 00 08 mov %o0, %l0 if ( status == -1 ) 20092dc: 80 a4 3f ff cmp %l0, -1 20092e0: 02 bf ff e3 be 200926c 20092e4: b0 10 3f ff mov -1, %i0 return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 20092e8: f0 07 bf f4 ld [ %fp + -12 ], %i0 20092ec: 81 c7 e0 08 ret 20092f0: 91 ee 20 08 restore %i0, 8, %o0 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 20092f4: 40 00 0a f9 call 200bed8 <_Thread_Enable_dispatch> 20092f8: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 20092fc: 40 00 2b e7 call 2014298 <__errno> 2009300: 01 00 00 00 nop 2009304: 82 10 20 11 mov 0x11, %g1 ! 11 2009308: c2 22 00 00 st %g1, [ %o0 ] 200930c: 81 c7 e0 08 ret 2009310: 81 e8 00 00 restore =============================================================================== 02009370 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 2009370: 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 ); 2009374: 90 10 00 19 mov %i1, %o0 2009378: 40 00 19 6c call 200f928 <_POSIX_Absolute_timeout_to_ticks> 200937c: 92 07 bf fc add %fp, -4, %o1 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 2009380: 80 a2 20 03 cmp %o0, 3 2009384: 02 80 00 07 be 20093a0 <== ALWAYS TAKEN 2009388: d4 07 bf fc ld [ %fp + -4 ], %o2 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 200938c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2009390: 40 00 1c 54 call 20104e0 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 2009394: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 2009398: 81 c7 e0 08 ret <== NOT EXECUTED 200939c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 20093a0: 90 10 00 18 mov %i0, %o0 20093a4: 40 00 1c 4f call 20104e0 <_POSIX_Semaphore_Wait_support> 20093a8: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 20093ac: 81 c7 e0 08 ret 20093b0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200696c : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 200696c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; if ( oact ) 2006970: 80 a6 a0 00 cmp %i2, 0 2006974: 02 80 00 0d be 20069a8 2006978: 87 2e 20 04 sll %i0, 4, %g3 *oact = _POSIX_signals_Vectors[ sig ]; 200697c: 05 00 80 7d sethi %hi(0x201f400), %g2 2006980: 83 2e 20 02 sll %i0, 2, %g1 2006984: 84 10 a2 c4 or %g2, 0x2c4, %g2 2006988: 82 20 c0 01 sub %g3, %g1, %g1 200698c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 2006990: 82 00 80 01 add %g2, %g1, %g1 2006994: c6 26 80 00 st %g3, [ %i2 ] 2006998: c4 00 60 04 ld [ %g1 + 4 ], %g2 200699c: c4 26 a0 04 st %g2, [ %i2 + 4 ] 20069a0: c2 00 60 08 ld [ %g1 + 8 ], %g1 20069a4: c2 26 a0 08 st %g1, [ %i2 + 8 ] if ( !sig ) 20069a8: 80 a6 20 00 cmp %i0, 0 20069ac: 02 80 00 33 be 2006a78 20069b0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 20069b4: 82 06 3f ff add %i0, -1, %g1 20069b8: 80 a0 60 1f cmp %g1, 0x1f 20069bc: 18 80 00 2f bgu 2006a78 20069c0: 80 a6 20 09 cmp %i0, 9 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 20069c4: 02 80 00 2d be 2006a78 20069c8: 80 a6 60 00 cmp %i1, 0 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 20069cc: 02 80 00 1a be 2006a34 <== NEVER TAKEN 20069d0: 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 ); 20069d4: 7f ff ef da call 200293c 20069d8: 01 00 00 00 nop 20069dc: b4 10 00 08 mov %o0, %i2 if ( act->sa_handler == SIG_DFL ) { 20069e0: c2 06 60 08 ld [ %i1 + 8 ], %g1 20069e4: 80 a0 60 00 cmp %g1, 0 20069e8: 02 80 00 15 be 2006a3c 20069ec: 83 2e 20 04 sll %i0, 4, %g1 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 20069f0: 40 00 1a 75 call 200d3c4 <_POSIX_signals_Clear_process_signals> 20069f4: 90 10 00 18 mov %i0, %o0 _POSIX_signals_Vectors[ sig ] = *act; 20069f8: c4 06 40 00 ld [ %i1 ], %g2 20069fc: 87 2e 20 04 sll %i0, 4, %g3 2006a00: 03 00 80 7d sethi %hi(0x201f400), %g1 2006a04: b1 2e 20 02 sll %i0, 2, %i0 2006a08: 82 10 62 c4 or %g1, 0x2c4, %g1 2006a0c: b0 20 c0 18 sub %g3, %i0, %i0 2006a10: c4 20 40 18 st %g2, [ %g1 + %i0 ] 2006a14: c4 06 60 04 ld [ %i1 + 4 ], %g2 2006a18: b0 00 40 18 add %g1, %i0, %i0 2006a1c: c4 26 20 04 st %g2, [ %i0 + 4 ] 2006a20: c2 06 60 08 ld [ %i1 + 8 ], %g1 2006a24: c2 26 20 08 st %g1, [ %i0 + 8 ] } _ISR_Enable( level ); 2006a28: 7f ff ef c9 call 200294c 2006a2c: 90 10 00 1a mov %i2, %o0 2006a30: 82 10 20 00 clr %g1 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 2006a34: 81 c7 e0 08 ret 2006a38: 91 e8 00 01 restore %g0, %g1, %o0 * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 2006a3c: b1 2e 20 02 sll %i0, 2, %i0 2006a40: b0 20 40 18 sub %g1, %i0, %i0 2006a44: 03 00 80 76 sethi %hi(0x201d800), %g1 2006a48: 82 10 61 00 or %g1, 0x100, %g1 ! 201d900 <_POSIX_signals_Default_vectors> 2006a4c: c8 00 40 18 ld [ %g1 + %i0 ], %g4 2006a50: 82 00 40 18 add %g1, %i0, %g1 2006a54: c6 00 60 08 ld [ %g1 + 8 ], %g3 2006a58: c4 00 60 04 ld [ %g1 + 4 ], %g2 2006a5c: 03 00 80 7d sethi %hi(0x201f400), %g1 2006a60: 82 10 62 c4 or %g1, 0x2c4, %g1 ! 201f6c4 <_POSIX_signals_Vectors> 2006a64: c8 20 40 18 st %g4, [ %g1 + %i0 ] 2006a68: b0 00 40 18 add %g1, %i0, %i0 2006a6c: c6 26 20 08 st %g3, [ %i0 + 8 ] 2006a70: 10 bf ff ee b 2006a28 2006a74: c4 26 20 04 st %g2, [ %i0 + 4 ] * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 2006a78: 40 00 29 57 call 2010fd4 <__errno> 2006a7c: 01 00 00 00 nop 2006a80: 82 10 20 16 mov 0x16, %g1 ! 16 2006a84: c2 22 00 00 st %g1, [ %o0 ] 2006a88: 10 bf ff eb b 2006a34 2006a8c: 82 10 3f ff mov -1, %g1 =============================================================================== 02008c00 : #include int sigsuspend( const sigset_t *sigmask ) { 2008c00: 9d e3 bf 98 save %sp, -104, %sp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 2008c04: 90 10 20 01 mov 1, %o0 2008c08: 92 10 00 18 mov %i0, %o1 2008c0c: a0 07 bf fc add %fp, -4, %l0 2008c10: 7f ff ff f1 call 2008bd4 2008c14: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 2008c18: a2 07 bf f8 add %fp, -8, %l1 2008c1c: 7f ff ff b7 call 2008af8 2008c20: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 2008c24: 90 10 00 11 mov %l1, %o0 2008c28: 92 10 20 00 clr %o1 2008c2c: 40 00 00 2b call 2008cd8 2008c30: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 2008c34: 92 10 00 10 mov %l0, %o1 status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); (void) sigfillset( &all_signals ); status = sigtimedwait( &all_signals, NULL, NULL ); 2008c38: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 2008c3c: 94 10 20 00 clr %o2 2008c40: 7f ff ff e5 call 2008bd4 2008c44: 90 10 20 00 clr %o0 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 2008c48: 80 a4 7f ff cmp %l1, -1 2008c4c: 12 80 00 05 bne 2008c60 <== ALWAYS TAKEN 2008c50: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 2008c54: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2008c58: 81 c7 e0 08 ret <== NOT EXECUTED 2008c5c: 81 e8 00 00 restore <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 2008c60: 40 00 28 b4 call 2012f30 <__errno> 2008c64: b0 10 3f ff mov -1, %i0 2008c68: 82 10 20 04 mov 4, %g1 2008c6c: c2 22 00 00 st %g1, [ %o0 ] 2008c70: 81 c7 e0 08 ret 2008c74: 81 e8 00 00 restore =============================================================================== 02006e54 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 2006e54: 9d e3 bf 90 save %sp, -112, %sp ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 2006e58: 80 a6 20 00 cmp %i0, 0 2006e5c: 02 80 00 69 be 2007000 2006e60: 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 ) { 2006e64: 22 80 00 0c be,a 2006e94 2006e68: b4 10 20 00 clr %i2 if ( !_Timespec_Is_valid( timeout ) ) 2006e6c: 40 00 0e e2 call 200a9f4 <_Timespec_Is_valid> 2006e70: 90 10 00 1a mov %i2, %o0 2006e74: 80 8a 20 ff btst 0xff, %o0 2006e78: 02 80 00 62 be 2007000 2006e7c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 2006e80: 40 00 0f 04 call 200aa90 <_Timespec_To_ticks> 2006e84: 90 10 00 1a mov %i2, %o0 if ( !interval ) 2006e88: b4 92 20 00 orcc %o0, 0, %i2 2006e8c: 02 80 00 5d be 2007000 <== NEVER TAKEN 2006e90: 01 00 00 00 nop /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 2006e94: 80 a6 60 00 cmp %i1, 0 2006e98: 02 80 00 03 be 2006ea4 2006e9c: a0 07 bf f4 add %fp, -12, %l0 2006ea0: a0 10 00 19 mov %i1, %l0 the_thread = _Thread_Executing; 2006ea4: 23 00 80 7d sethi %hi(0x201f400), %l1 2006ea8: f2 04 62 60 ld [ %l1 + 0x260 ], %i1 ! 201f660 <_Thread_Executing> * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 2006eac: 7f ff ef 82 call 2002cb4 2006eb0: e6 06 61 6c ld [ %i1 + 0x16c ], %l3 2006eb4: a4 10 00 08 mov %o0, %l2 if ( *set & api->signals_pending ) { 2006eb8: c2 06 00 00 ld [ %i0 ], %g1 2006ebc: c4 04 e0 d0 ld [ %l3 + 0xd0 ], %g2 2006ec0: 80 88 40 02 btst %g1, %g2 2006ec4: 12 80 00 3e bne 2006fbc 2006ec8: 01 00 00 00 nop return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 2006ecc: 05 00 80 7f sethi %hi(0x201fc00), %g2 2006ed0: c4 00 a1 28 ld [ %g2 + 0x128 ], %g2 ! 201fd28 <_POSIX_signals_Pending> 2006ed4: 80 88 40 02 btst %g1, %g2 2006ed8: 12 80 00 28 bne 2006f78 2006edc: 03 00 80 7d sethi %hi(0x201f400), %g1 2006ee0: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 ! 201f5a0 <_Thread_Dispatch_disable_level> 2006ee4: 84 00 a0 01 inc %g2 2006ee8: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 2006eec: 82 10 3f ff mov -1, %g1 2006ef0: c2 24 00 00 st %g1, [ %l0 ] _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 2006ef4: 82 10 20 04 mov 4, %g1 2006ef8: c2 26 60 34 st %g1, [ %i1 + 0x34 ] the_thread->Wait.option = *set; 2006efc: c2 06 00 00 ld [ %i0 ], %g1 the_thread->Wait.return_argument = the_info; 2006f00: e0 26 60 28 st %l0, [ %i1 + 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; 2006f04: c2 26 60 30 st %g1, [ %i1 + 0x30 ] } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 2006f08: 25 00 80 7f sethi %hi(0x201fc00), %l2 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; 2006f0c: 82 10 20 01 mov 1, %g1 2006f10: a4 14 a0 c0 or %l2, 0xc0, %l2 2006f14: e4 26 60 44 st %l2, [ %i1 + 0x44 ] 2006f18: c2 24 a0 30 st %g1, [ %l2 + 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 ); 2006f1c: 7f ff ef 6a call 2002cc4 2006f20: 01 00 00 00 nop _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 2006f24: 90 10 00 12 mov %l2, %o0 2006f28: 92 10 00 1a mov %i2, %o1 2006f2c: 15 00 80 29 sethi %hi(0x200a400), %o2 2006f30: 40 00 0c 4a call 200a058 <_Thread_queue_Enqueue_with_handler> 2006f34: 94 12 a0 2c or %o2, 0x2c, %o2 ! 200a42c <_Thread_queue_Timeout> _Thread_Enable_dispatch(); 2006f38: 40 00 0a d5 call 2009a8c <_Thread_Enable_dispatch> 2006f3c: 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 ); 2006f40: d2 04 00 00 ld [ %l0 ], %o1 2006f44: 94 10 00 10 mov %l0, %o2 2006f48: 96 10 20 00 clr %o3 2006f4c: 98 10 20 00 clr %o4 2006f50: 40 00 1b 24 call 200dbe0 <_POSIX_signals_Clear_signals> 2006f54: 90 10 00 13 mov %l3, %o0 errno = _Thread_Executing->Wait.return_code; 2006f58: 40 00 29 0b call 2011384 <__errno> 2006f5c: 01 00 00 00 nop 2006f60: c2 04 62 60 ld [ %l1 + 0x260 ], %g1 2006f64: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2006f68: c2 22 00 00 st %g1, [ %o0 ] return the_info->si_signo; 2006f6c: f0 04 00 00 ld [ %l0 ], %i0 } 2006f70: 81 c7 e0 08 ret 2006f74: 81 e8 00 00 restore } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 2006f78: 7f ff ff 9f call 2006df4 <_POSIX_signals_Get_highest> 2006f7c: 90 10 00 02 mov %g2, %o0 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 2006f80: 94 10 00 10 mov %l0, %o2 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 2006f84: b0 10 00 08 mov %o0, %i0 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 2006f88: 96 10 20 01 mov 1, %o3 2006f8c: 90 10 00 13 mov %l3, %o0 2006f90: 92 10 00 18 mov %i0, %o1 2006f94: 40 00 1b 13 call 200dbe0 <_POSIX_signals_Clear_signals> 2006f98: 98 10 20 00 clr %o4 _ISR_Enable( level ); 2006f9c: 7f ff ef 4a call 2002cc4 2006fa0: 90 10 00 12 mov %l2, %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 2006fa4: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 2006fa8: c0 24 20 08 clr [ %l0 + 8 ] if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; 2006fac: f0 24 00 00 st %i0, [ %l0 ] the_info->si_code = SI_USER; 2006fb0: c2 24 20 04 st %g1, [ %l0 + 4 ] the_info->si_value.sival_int = 0; return signo; 2006fb4: 81 c7 e0 08 ret 2006fb8: 81 e8 00 00 restore /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 2006fbc: 7f ff ff 8e call 2006df4 <_POSIX_signals_Get_highest> 2006fc0: 90 10 00 02 mov %g2, %o0 _POSIX_signals_Clear_signals( 2006fc4: 94 10 00 10 mov %l0, %o2 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 2006fc8: 92 10 00 08 mov %o0, %o1 _POSIX_signals_Clear_signals( 2006fcc: 96 10 20 00 clr %o3 2006fd0: 90 10 00 13 mov %l3, %o0 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 2006fd4: d2 24 00 00 st %o1, [ %l0 ] _POSIX_signals_Clear_signals( 2006fd8: 40 00 1b 02 call 200dbe0 <_POSIX_signals_Clear_signals> 2006fdc: 98 10 20 00 clr %o4 the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 2006fe0: 7f ff ef 39 call 2002cc4 2006fe4: 90 10 00 12 mov %l2, %o0 the_info->si_code = SI_USER; 2006fe8: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 2006fec: c0 24 20 08 clr [ %l0 + 8 ] return the_info->si_signo; 2006ff0: f0 04 00 00 ld [ %l0 ], %i0 false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; 2006ff4: c2 24 20 04 st %g1, [ %l0 + 4 ] the_info->si_value.sival_int = 0; return the_info->si_signo; 2006ff8: 81 c7 e0 08 ret 2006ffc: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 2007000: 40 00 28 e1 call 2011384 <__errno> 2007004: b0 10 3f ff mov -1, %i0 2007008: 82 10 20 16 mov 0x16, %g1 200700c: c2 22 00 00 st %g1, [ %o0 ] 2007010: 81 c7 e0 08 ret 2007014: 81 e8 00 00 restore =============================================================================== 02008eb0 : int sigwait( const sigset_t *set, int *sig ) { 2008eb0: 9d e3 bf a0 save %sp, -96, %sp int status; status = sigtimedwait( set, NULL, NULL ); 2008eb4: 92 10 20 00 clr %o1 2008eb8: 90 10 00 18 mov %i0, %o0 2008ebc: 7f ff ff 87 call 2008cd8 2008ec0: 94 10 20 00 clr %o2 if ( status != -1 ) { 2008ec4: 80 a2 3f ff cmp %o0, -1 2008ec8: 02 80 00 07 be 2008ee4 2008ecc: 80 a6 60 00 cmp %i1, 0 if ( sig ) 2008ed0: 02 80 00 03 be 2008edc <== NEVER TAKEN 2008ed4: b0 10 20 00 clr %i0 *sig = status; 2008ed8: d0 26 40 00 st %o0, [ %i1 ] 2008edc: 81 c7 e0 08 ret 2008ee0: 81 e8 00 00 restore return 0; } return errno; 2008ee4: 40 00 28 13 call 2012f30 <__errno> 2008ee8: 01 00 00 00 nop 2008eec: f0 02 00 00 ld [ %o0 ], %i0 } 2008ef0: 81 c7 e0 08 ret 2008ef4: 81 e8 00 00 restore =============================================================================== 02005b6c : */ long sysconf( int name ) { 2005b6c: 9d e3 bf a0 save %sp, -96, %sp if ( name == _SC_CLK_TCK ) 2005b70: 80 a6 20 02 cmp %i0, 2 2005b74: 02 80 00 0f be 2005bb0 2005b78: 82 10 00 18 mov %i0, %g1 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 2005b7c: 80 a6 20 04 cmp %i0, 4 2005b80: 02 80 00 13 be 2005bcc 2005b84: 80 a6 20 33 cmp %i0, 0x33 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 2005b88: 02 80 00 08 be 2005ba8 2005b8c: b0 10 24 00 mov 0x400, %i0 return 1024; if ( name == _SC_PAGESIZE ) 2005b90: 80 a0 60 08 cmp %g1, 8 2005b94: 02 80 00 05 be 2005ba8 2005b98: b0 06 2c 00 add %i0, 0xc00, %i0 return PAGE_SIZE; #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ 2005b9c: 80 a0 62 03 cmp %g1, 0x203 2005ba0: 12 80 00 0f bne 2005bdc <== ALWAYS TAKEN 2005ba4: b0 10 20 00 clr %i0 return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 2005ba8: 81 c7 e0 08 ret 2005bac: 81 e8 00 00 restore long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 2005bb0: 03 00 80 75 sethi %hi(0x201d400), %g1 2005bb4: d2 00 62 08 ld [ %g1 + 0x208 ], %o1 ! 201d608 2005bb8: 11 00 03 d0 sethi %hi(0xf4000), %o0 2005bbc: 40 00 50 a5 call 2019e50 <.udiv> 2005bc0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 2005bc4: 81 c7 e0 08 ret 2005bc8: 91 e8 00 08 restore %g0, %o0, %o0 rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; 2005bcc: 03 00 80 75 sethi %hi(0x201d400), %g1 2005bd0: f0 00 61 24 ld [ %g1 + 0x124 ], %i0 ! 201d524 2005bd4: 81 c7 e0 08 ret 2005bd8: 81 e8 00 00 restore #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 2005bdc: 40 00 2a 19 call 2010440 <__errno> 2005be0: b0 10 3f ff mov -1, %i0 2005be4: 82 10 20 16 mov 0x16, %g1 2005be8: c2 22 00 00 st %g1, [ %o0 ] } 2005bec: 81 c7 e0 08 ret 2005bf0: 81 e8 00 00 restore =============================================================================== 02005edc : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 2005edc: 9d e3 bf a0 save %sp, -96, %sp POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 2005ee0: 80 a6 20 01 cmp %i0, 1 2005ee4: 12 80 00 3d bne 2005fd8 2005ee8: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 2005eec: 02 80 00 3b be 2005fd8 2005ef0: 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) { 2005ef4: 02 80 00 0e be 2005f2c 2005ef8: 03 00 80 85 sethi %hi(0x2021400), %g1 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 2005efc: c2 06 40 00 ld [ %i1 ], %g1 2005f00: 82 00 7f ff add %g1, -1, %g1 2005f04: 80 a0 60 01 cmp %g1, 1 2005f08: 18 80 00 34 bgu 2005fd8 <== NEVER TAKEN 2005f0c: 01 00 00 00 nop ( 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 ) 2005f10: c2 06 60 04 ld [ %i1 + 4 ], %g1 2005f14: 80 a0 60 00 cmp %g1, 0 2005f18: 02 80 00 30 be 2005fd8 <== NEVER TAKEN 2005f1c: 82 00 7f ff add %g1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 2005f20: 80 a0 60 1f cmp %g1, 0x1f 2005f24: 18 80 00 2d bgu 2005fd8 <== NEVER TAKEN 2005f28: 03 00 80 85 sethi %hi(0x2021400), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005f2c: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 2021470 <_Thread_Dispatch_disable_level> 2005f30: 84 00 a0 01 inc %g2 2005f34: c4 20 60 70 st %g2, [ %g1 + 0x70 ] * 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 ); 2005f38: 21 00 80 85 sethi %hi(0x2021400), %l0 2005f3c: 40 00 08 28 call 2007fdc <_Objects_Allocate> 2005f40: 90 14 23 c0 or %l0, 0x3c0, %o0 ! 20217c0 <_POSIX_Timer_Information> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 2005f44: 80 a2 20 00 cmp %o0, 0 2005f48: 02 80 00 2a be 2005ff0 2005f4c: 82 10 20 02 mov 2, %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 2005f50: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ] ptimer->thread_id = _Thread_Executing->Object.id; 2005f54: 03 00 80 85 sethi %hi(0x2021400), %g1 2005f58: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 2021530 <_Thread_Executing> if ( evp != NULL ) { 2005f5c: 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; 2005f60: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( evp != NULL ) { 2005f64: 02 80 00 08 be 2005f84 2005f68: c2 22 20 38 st %g1, [ %o0 + 0x38 ] ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 2005f6c: c2 06 60 08 ld [ %i1 + 8 ], %g1 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 2005f70: c6 06 40 00 ld [ %i1 ], %g3 ptimer->inf.sigev_signo = evp->sigev_signo; 2005f74: c4 06 60 04 ld [ %i1 + 4 ], %g2 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 2005f78: c6 22 20 40 st %g3, [ %o0 + 0x40 ] ptimer->inf.sigev_signo = evp->sigev_signo; 2005f7c: c4 22 20 44 st %g2, [ %o0 + 0x44 ] ptimer->inf.sigev_value = evp->sigev_value; 2005f80: c2 22 20 48 st %g1, [ %o0 + 0x48 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005f84: c4 12 20 0a lduh [ %o0 + 0xa ], %g2 2005f88: a0 14 23 c0 or %l0, 0x3c0, %l0 2005f8c: c6 04 20 1c ld [ %l0 + 0x1c ], %g3 2005f90: c2 02 20 08 ld [ %o0 + 8 ], %g1 2005f94: 85 28 a0 02 sll %g2, 2, %g2 2005f98: 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; 2005f9c: c0 22 20 0c clr [ %o0 + 0xc ] } ptimer->overrun = 0; 2005fa0: c0 22 20 68 clr [ %o0 + 0x68 ] ptimer->timer_data.it_value.tv_sec = 0; 2005fa4: c0 22 20 5c clr [ %o0 + 0x5c ] ptimer->timer_data.it_value.tv_nsec = 0; 2005fa8: c0 22 20 60 clr [ %o0 + 0x60 ] ptimer->timer_data.it_interval.tv_sec = 0; 2005fac: c0 22 20 54 clr [ %o0 + 0x54 ] ptimer->timer_data.it_interval.tv_nsec = 0; 2005fb0: c0 22 20 58 clr [ %o0 + 0x58 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2005fb4: c0 22 20 30 clr [ %o0 + 0x30 ] _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 2005fb8: c2 26 80 00 st %g1, [ %i2 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005fbc: c0 22 20 18 clr [ %o0 + 0x18 ] the_watchdog->routine = routine; 2005fc0: c0 22 20 2c clr [ %o0 + 0x2c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2005fc4: c0 22 20 34 clr [ %o0 + 0x34 ] _Thread_Enable_dispatch(); 2005fc8: 40 00 0b be call 2008ec0 <_Thread_Enable_dispatch> 2005fcc: b0 10 20 00 clr %i0 return 0; } 2005fd0: 81 c7 e0 08 ret 2005fd4: 81 e8 00 00 restore if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 2005fd8: 40 00 2a 7d call 20109cc <__errno> 2005fdc: b0 10 3f ff mov -1, %i0 2005fe0: 82 10 20 16 mov 0x16, %g1 2005fe4: c2 22 00 00 st %g1, [ %o0 ] 2005fe8: 81 c7 e0 08 ret 2005fec: 81 e8 00 00 restore /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 2005ff0: 40 00 0b b4 call 2008ec0 <_Thread_Enable_dispatch> 2005ff4: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 2005ff8: 40 00 2a 75 call 20109cc <__errno> 2005ffc: 01 00 00 00 nop 2006000: 82 10 20 0b mov 0xb, %g1 ! b 2006004: c2 22 00 00 st %g1, [ %o0 ] 2006008: 81 c7 e0 08 ret 200600c: 81 e8 00 00 restore =============================================================================== 02006010 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 2006010: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 2006014: 80 a6 a0 00 cmp %i2, 0 2006018: 02 80 00 89 be 200623c <== NEVER TAKEN 200601c: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 2006020: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 2006024: 82 10 61 ff or %g1, 0x1ff, %g1 2006028: 80 a0 80 01 cmp %g2, %g1 200602c: 18 80 00 84 bgu 200623c 2006030: 01 00 00 00 nop ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 2006034: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2006038: 80 a0 80 01 cmp %g2, %g1 200603c: 18 80 00 80 bgu 200623c <== NEVER TAKEN 2006040: 80 a6 60 00 cmp %i1, 0 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 2006044: 12 80 00 7c bne 2006234 2006048: 80 a6 60 04 cmp %i1, 4 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 200604c: c8 06 80 00 ld [ %i2 ], %g4 2006050: c6 06 a0 04 ld [ %i2 + 4 ], %g3 2006054: c4 06 a0 08 ld [ %i2 + 8 ], %g2 2006058: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 200605c: c8 27 bf e4 st %g4, [ %fp + -28 ] 2006060: c6 27 bf e8 st %g3, [ %fp + -24 ] 2006064: c4 27 bf ec st %g2, [ %fp + -20 ] /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 2006068: 80 a6 60 04 cmp %i1, 4 200606c: 02 80 00 3b be 2006158 2006070: c2 27 bf f0 st %g1, [ %fp + -16 ] RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 2006074: 92 10 00 18 mov %i0, %o1 2006078: 11 00 80 85 sethi %hi(0x2021400), %o0 200607c: 94 07 bf fc add %fp, -4, %o2 2006080: 40 00 09 2b call 200852c <_Objects_Get> 2006084: 90 12 23 c0 or %o0, 0x3c0, %o0 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 2006088: c2 07 bf fc ld [ %fp + -4 ], %g1 200608c: 80 a0 60 00 cmp %g1, 0 2006090: 12 80 00 48 bne 20061b0 <== NEVER TAKEN 2006094: a0 10 00 08 mov %o0, %l0 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 ) { 2006098: c2 07 bf ec ld [ %fp + -20 ], %g1 200609c: 80 a0 60 00 cmp %g1, 0 20060a0: 12 80 00 05 bne 20060b4 20060a4: c2 07 bf f0 ld [ %fp + -16 ], %g1 20060a8: 80 a0 60 00 cmp %g1, 0 20060ac: 02 80 00 47 be 20061c8 20060b0: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 20060b4: 40 00 0f 85 call 2009ec8 <_Timespec_To_ticks> 20060b8: 90 10 00 1a mov %i2, %o0 20060bc: d0 24 20 64 st %o0, [ %l0 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 20060c0: 40 00 0f 82 call 2009ec8 <_Timespec_To_ticks> 20060c4: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 20060c8: d4 04 20 08 ld [ %l0 + 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 ); 20060cc: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 20060d0: 17 00 80 18 sethi %hi(0x2006000), %o3 20060d4: 90 04 20 10 add %l0, 0x10, %o0 20060d8: 96 12 e2 54 or %o3, 0x254, %o3 20060dc: 40 00 1c 3c call 200d1cc <_POSIX_Timer_Insert_helper> 20060e0: 98 10 00 10 mov %l0, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 20060e4: 80 8a 20 ff btst 0xff, %o0 20060e8: 02 80 00 18 be 2006148 20060ec: 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 ) 20060f0: 02 80 00 0b be 200611c 20060f4: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 20060f8: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 20060fc: c2 26 c0 00 st %g1, [ %i3 ] 2006100: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 2006104: c2 26 e0 04 st %g1, [ %i3 + 4 ] 2006108: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 200610c: c2 26 e0 08 st %g1, [ %i3 + 8 ] 2006110: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 2006114: c2 26 e0 0c st %g1, [ %i3 + 0xc ] ptimer->timer_data = normalize; 2006118: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 200611c: 84 10 20 03 mov 3, %g2 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 2006120: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 2006124: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 2006128: 90 04 20 6c add %l0, 0x6c, %o0 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 200612c: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 2006130: c2 07 bf ec ld [ %fp + -20 ], %g1 2006134: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 2006138: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 200613c: c4 2c 20 3c stb %g2, [ %l0 + 0x3c ] _TOD_Get( &ptimer->time ); 2006140: 40 00 06 3c call 2007a30 <_TOD_Get> 2006144: c2 24 20 60 st %g1, [ %l0 + 0x60 ] _Thread_Enable_dispatch(); 2006148: 40 00 0b 5e call 2008ec0 <_Thread_Enable_dispatch> 200614c: b0 10 20 00 clr %i0 return 0; 2006150: 81 c7 e0 08 ret 2006154: 81 e8 00 00 restore normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 2006158: a0 07 bf f4 add %fp, -12, %l0 200615c: 40 00 06 35 call 2007a30 <_TOD_Get> 2006160: 90 10 00 10 mov %l0, %o0 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 2006164: a2 07 bf ec add %fp, -20, %l1 2006168: 90 10 00 10 mov %l0, %o0 200616c: 40 00 0f 2f call 2009e28 <_Timespec_Greater_than> 2006170: 92 10 00 11 mov %l1, %o1 2006174: 80 8a 20 ff btst 0xff, %o0 2006178: 12 80 00 31 bne 200623c 200617c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 2006180: 92 10 00 11 mov %l1, %o1 2006184: 40 00 0f 3b call 2009e70 <_Timespec_Subtract> 2006188: 94 10 00 11 mov %l1, %o2 200618c: 92 10 00 18 mov %i0, %o1 2006190: 11 00 80 85 sethi %hi(0x2021400), %o0 2006194: 94 07 bf fc add %fp, -4, %o2 2006198: 40 00 08 e5 call 200852c <_Objects_Get> 200619c: 90 12 23 c0 or %o0, 0x3c0, %o0 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 20061a0: c2 07 bf fc ld [ %fp + -4 ], %g1 20061a4: 80 a0 60 00 cmp %g1, 0 20061a8: 02 bf ff bc be 2006098 20061ac: a0 10 00 08 mov %o0, %l0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 20061b0: 40 00 2a 07 call 20109cc <__errno> 20061b4: b0 10 3f ff mov -1, %i0 20061b8: 82 10 20 16 mov 0x16, %g1 20061bc: c2 22 00 00 st %g1, [ %o0 ] } 20061c0: 81 c7 e0 08 ret 20061c4: 81 e8 00 00 restore 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 20061c8: 40 00 10 89 call 200a3ec <_Watchdog_Remove> 20061cc: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 20061d0: 80 a6 e0 00 cmp %i3, 0 20061d4: 02 80 00 0b be 2006200 20061d8: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 20061dc: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 20061e0: c2 26 c0 00 st %g1, [ %i3 ] 20061e4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 20061e8: c2 26 e0 04 st %g1, [ %i3 + 4 ] 20061ec: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 20061f0: c2 26 e0 08 st %g1, [ %i3 + 8 ] 20061f4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 20061f8: c2 26 e0 0c st %g1, [ %i3 + 0xc ] /* The new data are set */ ptimer->timer_data = normalize; 20061fc: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2006200: 84 10 20 04 mov 4, %g2 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 2006204: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 2006208: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 200620c: b0 10 20 00 clr %i0 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 2006210: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 2006214: c2 07 bf ec ld [ %fp + -20 ], %g1 2006218: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 200621c: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2006220: c4 2c 20 3c stb %g2, [ %l0 + 0x3c ] /* Returns with success */ _Thread_Enable_dispatch(); 2006224: 40 00 0b 27 call 2008ec0 <_Thread_Enable_dispatch> 2006228: c2 24 20 60 st %g1, [ %l0 + 0x60 ] return 0; 200622c: 81 c7 e0 08 ret 2006230: 81 e8 00 00 restore ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 2006234: 22 bf ff 87 be,a 2006050 2006238: c8 06 80 00 ld [ %i2 ], %g4 if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 200623c: 40 00 29 e4 call 20109cc <__errno> 2006240: b0 10 3f ff mov -1, %i0 2006244: 82 10 20 16 mov 0x16, %g1 2006248: c2 22 00 00 st %g1, [ %o0 ] 200624c: 81 c7 e0 08 ret 2006250: 81 e8 00 00 restore =============================================================================== 02005e40 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 2005e40: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 2005e44: 21 00 80 7c sethi %hi(0x201f000), %l0 2005e48: a0 14 23 dc or %l0, 0x3dc, %l0 ! 201f3dc <_POSIX_signals_Ualarm_timer> 2005e4c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2005e50: 80 a0 60 00 cmp %g1, 0 2005e54: 02 80 00 24 be 2005ee4 2005e58: a2 10 00 18 mov %i0, %l1 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 2005e5c: 40 00 10 3d call 2009f50 <_Watchdog_Remove> 2005e60: 90 10 00 10 mov %l0, %o0 if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 2005e64: 90 02 3f fe add %o0, -2, %o0 2005e68: 80 a2 20 01 cmp %o0, 1 2005e6c: 08 80 00 26 bleu 2005f04 <== ALWAYS TAKEN 2005e70: b0 10 20 00 clr %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 ) { 2005e74: 80 a4 60 00 cmp %l1, 0 2005e78: 02 80 00 19 be 2005edc 2005e7c: 25 00 03 d0 sethi %hi(0xf4000), %l2 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 2005e80: 90 10 00 11 mov %l1, %o0 2005e84: 40 00 53 b3 call 201ad50 <.udiv> 2005e88: 92 14 a2 40 or %l2, 0x240, %o1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005e8c: 92 14 a2 40 or %l2, 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; 2005e90: d0 27 bf f8 st %o0, [ %fp + -8 ] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005e94: 40 00 54 5b call 201b000 <.urem> 2005e98: 90 10 00 11 mov %l1, %o0 2005e9c: 85 2a 20 07 sll %o0, 7, %g2 2005ea0: 83 2a 20 02 sll %o0, 2, %g1 2005ea4: 82 20 80 01 sub %g2, %g1, %g1 2005ea8: 90 00 40 08 add %g1, %o0, %o0 2005eac: 91 2a 20 03 sll %o0, 3, %o0 ticks = _Timespec_To_ticks( &tp ); 2005eb0: a2 07 bf f8 add %fp, -8, %l1 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005eb4: d0 27 bf fc st %o0, [ %fp + -4 ] ticks = _Timespec_To_ticks( &tp ); 2005eb8: 40 00 0e ad call 200996c <_Timespec_To_ticks> 2005ebc: 90 10 00 11 mov %l1, %o0 if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 2005ec0: 40 00 0e ab call 200996c <_Timespec_To_ticks> 2005ec4: 90 10 00 11 mov %l1, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005ec8: 92 10 00 10 mov %l0, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2005ecc: d0 24 20 0c st %o0, [ %l0 + 0xc ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005ed0: 11 00 80 7a sethi %hi(0x201e800), %o0 2005ed4: 40 00 0f b2 call 2009d9c <_Watchdog_Insert> 2005ed8: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 201ebb0 <_Watchdog_Ticks_chain> } return remaining; } 2005edc: 81 c7 e0 08 ret 2005ee0: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005ee4: 03 00 80 17 sethi %hi(0x2005c00), %g1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005ee8: c0 24 20 08 clr [ %l0 + 8 ] the_watchdog->routine = routine; 2005eec: 82 10 63 54 or %g1, 0x354, %g1 the_watchdog->id = id; 2005ef0: c0 24 20 20 clr [ %l0 + 0x20 ] the_watchdog->user_data = user_data; 2005ef4: c0 24 20 24 clr [ %l0 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005ef8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2005efc: 10 bf ff de b 2005e74 2005f00: 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); 2005f04: c4 04 20 0c ld [ %l0 + 0xc ], %g2 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005f08: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 * 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); 2005f0c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005f10: 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); 2005f14: 90 02 00 02 add %o0, %g2, %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005f18: 40 00 0e 6a call 20098c0 <_Timespec_From_ticks> 2005f1c: 90 22 00 01 sub %o0, %g1, %o0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 2005f20: c2 07 bf f8 ld [ %fp + -8 ], %g1 remaining += tp.tv_nsec / 1000; 2005f24: 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; 2005f28: 85 28 60 03 sll %g1, 3, %g2 2005f2c: 87 28 60 08 sll %g1, 8, %g3 2005f30: 84 20 c0 02 sub %g3, %g2, %g2 remaining += tp.tv_nsec / 1000; 2005f34: 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; 2005f38: b1 28 a0 06 sll %g2, 6, %i0 2005f3c: b0 26 00 02 sub %i0, %g2, %i0 remaining += tp.tv_nsec / 1000; 2005f40: 40 00 53 86 call 201ad58 <.div> 2005f44: 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; 2005f48: b1 2e 20 06 sll %i0, 6, %i0 remaining += tp.tv_nsec / 1000; 2005f4c: 10 bf ff ca b 2005e74 2005f50: b0 02 00 18 add %o0, %i0, %i0