02006184 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2006184: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006188: 03 00 80 61 sethi %hi(0x2018400), %g1 200618c: e0 00 60 14 ld [ %g1 + 0x14 ], %l0 ! 2018414 <_API_extensions_List> 2006190: 82 10 60 14 or %g1, 0x14, %g1 2006194: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006198: 80 a4 00 11 cmp %l0, %l1 200619c: 02 80 00 0c be 20061cc <_API_extensions_Run_postdriver+0x48> 20061a0: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 20061a4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20061a8: 80 a0 60 00 cmp %g1, 0 20061ac: 22 80 00 05 be,a 20061c0 <_API_extensions_Run_postdriver+0x3c> 20061b0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 20061b4: 9f c0 40 00 call %g1 20061b8: 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 ) { 20061bc: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 20061c0: 80 a4 00 11 cmp %l0, %l1 20061c4: 32 bf ff f9 bne,a 20061a8 <_API_extensions_Run_postdriver+0x24> 20061c8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20061cc: 81 c7 e0 08 ret 20061d0: 81 e8 00 00 restore 020061d4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 20061d4: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20061d8: 03 00 80 61 sethi %hi(0x2018400), %g1 20061dc: e0 00 60 14 ld [ %g1 + 0x14 ], %l0 ! 2018414 <_API_extensions_List> 20061e0: 82 10 60 14 or %g1, 0x14, %g1 20061e4: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 20061e8: 80 a4 00 11 cmp %l0, %l1 20061ec: 02 80 00 0d be 2006220 <_API_extensions_Run_postswitch+0x4c> 20061f0: 03 00 80 60 sethi %hi(0x2018000), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 20061f4: a4 10 62 94 or %g1, 0x294, %l2 ! 2018294 <_Thread_Executing> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 20061f8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20061fc: 80 a0 60 00 cmp %g1, 0 2006200: 22 80 00 05 be,a 2006214 <_API_extensions_Run_postswitch+0x40> 2006204: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 2006208: 9f c0 40 00 call %g1 200620c: 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 ) { 2006210: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006214: 80 a4 00 11 cmp %l0, %l1 2006218: 32 bf ff f9 bne,a 20061fc <_API_extensions_Run_postswitch+0x28> 200621c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2006220: 81 c7 e0 08 ret 2006224: 81 e8 00 00 restore 02006134 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 2006134: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006138: 03 00 80 61 sethi %hi(0x2018400), %g1 200613c: e0 00 60 14 ld [ %g1 + 0x14 ], %l0 ! 2018414 <_API_extensions_List> 2006140: 82 10 60 14 or %g1, 0x14, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2006144: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006148: 80 a4 00 11 cmp %l0, %l1 200614c: 02 80 00 0c be 200617c <_API_extensions_Run_predriver+0x48> 2006150: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 2006154: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006158: 80 a0 60 00 cmp %g1, 0 200615c: 22 80 00 05 be,a 2006170 <_API_extensions_Run_predriver+0x3c> 2006160: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 2006164: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006168: 01 00 00 00 nop <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 200616c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006170: 80 a4 00 11 cmp %l0, %l1 2006174: 32 bf ff f9 bne,a 2006158 <_API_extensions_Run_predriver+0x24> 2006178: c2 04 20 08 ld [ %l0 + 8 ], %g1 200617c: 81 c7 e0 08 ret 2006180: 81 e8 00 00 restore 020085d4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 20085d4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 20085d8: 03 00 80 6b sethi %hi(0x201ac00), %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 ); 20085dc: 7f ff ea 10 call 2002e1c 20085e0: e0 00 61 74 ld [ %g1 + 0x174 ], %l0 ! 201ad74 <_Thread_Executing> 20085e4: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 20085e8: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 20085ec: 80 a0 60 00 cmp %g1, 0 20085f0: 02 80 00 2d be 20086a4 <_CORE_RWLock_Release+0xd0> 20085f4: 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 ) { 20085f8: 22 80 00 23 be,a 2008684 <_CORE_RWLock_Release+0xb0> 20085fc: 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; 2008600: 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; 2008604: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 2008608: 7f ff ea 09 call 2002e2c 200860c: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 2008610: 40 00 06 42 call 2009f18 <_Thread_queue_Dequeue> 2008614: 90 10 00 18 mov %i0, %o0 if ( next ) { 2008618: 80 a2 20 00 cmp %o0, 0 200861c: 02 80 00 18 be 200867c <_CORE_RWLock_Release+0xa8> 2008620: 01 00 00 00 nop if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 2008624: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 2008628: 80 a0 60 01 cmp %g1, 1 200862c: 02 80 00 24 be 20086bc <_CORE_RWLock_Release+0xe8> 2008630: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2008634: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2008638: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200863c: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2008640: 10 80 00 0a b 2008668 <_CORE_RWLock_Release+0x94> 2008644: 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 || 2008648: 80 a0 60 01 cmp %g1, 1 200864c: 02 80 00 0c be 200867c <_CORE_RWLock_Release+0xa8> 2008650: 92 10 00 08 mov %o0, %o1 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 2008654: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2008658: 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; 200865c: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2008660: 40 00 07 54 call 200a3b0 <_Thread_queue_Extract> 2008664: 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 ); 2008668: 40 00 07 a3 call 200a4f4 <_Thread_queue_First> 200866c: 90 10 00 18 mov %i0, %o0 if ( !next || 2008670: 80 a2 20 00 cmp %o0, 0 2008674: 32 bf ff f5 bne,a 2008648 <_CORE_RWLock_Release+0x74> 2008678: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200867c: 81 c7 e0 08 ret 2008680: 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; 2008684: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 2008688: 80 a0 60 00 cmp %g1, 0 200868c: 02 bf ff dd be 2008600 <_CORE_RWLock_Release+0x2c> 2008690: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 2008694: 7f ff e9 e6 call 2002e2c 2008698: b0 10 20 00 clr %i0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200869c: 81 c7 e0 08 ret 20086a0: 81 e8 00 00 restore * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 20086a4: 7f ff e9 e2 call 2002e2c <== NOT EXECUTED 20086a8: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 20086ac: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 20086b0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 20086b4: 81 c7 e0 08 ret <== NOT EXECUTED 20086b8: 81 e8 00 00 restore <== NOT EXECUTED 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; 20086bc: 82 10 20 02 mov 2, %g1 20086c0: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 20086c4: 81 c7 e0 08 ret 20086c8: 91 e8 20 00 restore %g0, 0, %o0 02012720 <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 2012720: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 2012724: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 2012728: a4 10 00 18 mov %i0, %l2 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 201272c: 80 a0 40 1a cmp %g1, %i2 2012730: 0a 80 00 17 bcs 201278c <_CORE_message_queue_Broadcast+0x6c> 2012734: 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 ) { 2012738: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 201273c: 80 a0 60 00 cmp %g1, 0 2012740: 02 80 00 0a be 2012768 <_CORE_message_queue_Broadcast+0x48> 2012744: a2 10 20 00 clr %l1 *count = 0; 2012748: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 201274c: 81 c7 e0 08 ret <== NOT EXECUTED 2012750: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2012754: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2012758: 40 00 23 db call 201b6c4 201275c: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2012760: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2012764: 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))) { 2012768: 40 00 0a 40 call 2015068 <_Thread_queue_Dequeue> 201276c: 90 10 00 12 mov %l2, %o0 2012770: 92 10 00 19 mov %i1, %o1 2012774: a0 10 00 08 mov %o0, %l0 2012778: 80 a2 20 00 cmp %o0, 0 201277c: 12 bf ff f6 bne 2012754 <_CORE_message_queue_Broadcast+0x34> 2012780: 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; 2012784: e2 27 40 00 st %l1, [ %i5 ] 2012788: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 201278c: 81 c7 e0 08 ret 2012790: 81 e8 00 00 restore 020149e0 <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 20149e0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 20149e4: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 20149e8: a2 10 00 18 mov %i0, %l1 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 20149ec: 80 a0 40 1a cmp %g1, %i2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 20149f0: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 20149f4: 0a 80 00 22 bcs 2014a7c <_CORE_message_queue_Submit+0x9c> 20149f8: b0 10 20 01 mov 1, %i0 /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 20149fc: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 2014a00: 80 a0 a0 00 cmp %g2, 0 2014a04: 02 80 00 22 be 2014a8c <_CORE_message_queue_Submit+0xac> 2014a08: 01 00 00 00 nop /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 2014a0c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 2014a10: 80 a0 40 02 cmp %g1, %g2 2014a14: 18 80 00 2b bgu 2014ac0 <_CORE_message_queue_Submit+0xe0> 2014a18: 80 a4 a0 00 cmp %l2, 0 * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 2014a1c: 02 80 00 18 be 2014a7c <_CORE_message_queue_Submit+0x9c> 2014a20: b0 10 20 02 mov 2, %i0 /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 2014a24: 03 00 80 a5 sethi %hi(0x2029400), %g1 2014a28: c4 00 60 00 ld [ %g1 ], %g2 2014a2c: 80 a0 a0 00 cmp %g2, 0 2014a30: 32 80 00 13 bne,a 2014a7c <_CORE_message_queue_Submit+0x9c> 2014a34: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 2014a38: 03 00 80 a5 sethi %hi(0x2029400), %g1 _ISR_Disable( level ); 2014a3c: 7f ff b6 e6 call 20025d4 2014a40: e0 00 60 24 ld [ %g1 + 0x24 ], %l0 ! 2029424 <_Thread_Executing> 2014a44: 82 10 20 01 mov 1, %g1 2014a48: c2 24 60 30 st %g1, [ %l1 + 0x30 ] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 2014a4c: fa 24 20 24 st %i5, [ %l0 + 0x24 ] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 2014a50: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 2014a54: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 2014a58: f4 24 20 30 st %i2, [ %l0 + 0x30 ] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 2014a5c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 2014a60: 7f ff b6 e1 call 20025e4 2014a64: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 2014a68: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 2014a6c: 90 10 00 11 mov %l1, %o0 2014a70: 15 00 80 3b sethi %hi(0x200ec00), %o2 2014a74: 7f ff e7 56 call 200e7cc <_Thread_queue_Enqueue_with_handler> 2014a78: 94 12 a0 24 or %o2, 0x24, %o2 ! 200ec24 <_Thread_queue_Timeout> 2014a7c: 81 c7 e0 08 ret 2014a80: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 2014a84: 81 c7 e0 08 ret <== NOT EXECUTED 2014a88: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 2014a8c: 7f ff e6 ec call 200e63c <_Thread_queue_Dequeue> 2014a90: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 2014a94: a0 92 20 00 orcc %o0, 0, %l0 2014a98: 02 80 00 1b be 2014b04 <_CORE_message_queue_Submit+0x124> 2014a9c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2014aa0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2014aa4: 40 00 15 51 call 2019fe8 2014aa8: 94 10 00 1a mov %i2, %o2 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2014aac: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 2014ab0: fa 24 20 24 st %i5, [ %l0 + 0x24 ] _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2014ab4: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 2014ab8: 81 c7 e0 08 ret 2014abc: 91 e8 20 00 restore %g0, 0, %o0 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 2014ac0: 7f ff df 9b call 200c92c <_Chain_Get> 2014ac4: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 2014ac8: a0 92 20 00 orcc %o0, 0, %l0 2014acc: 02 bf ff ee be 2014a84 <_CORE_message_queue_Submit+0xa4> 2014ad0: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2014ad4: 94 10 00 1a mov %i2, %o2 2014ad8: 40 00 15 44 call 2019fe8 2014adc: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 2014ae0: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 2014ae4: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 2014ae8: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 2014aec: 92 10 00 10 mov %l0, %o1 2014af0: 94 10 00 1d mov %i5, %o2 2014af4: 40 00 0d 24 call 2017f84 <_CORE_message_queue_Insert_message> 2014af8: b0 10 20 00 clr %i0 2014afc: 81 c7 e0 08 ret 2014b00: 81 e8 00 00 restore * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 2014b04: 10 bf ff c2 b 2014a0c <_CORE_message_queue_Submit+0x2c> 2014b08: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 0200bfd0 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 200bfd0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 200bfd4: 03 00 80 60 sethi %hi(0x2018000), %g1 200bfd8: c6 00 62 94 ld [ %g1 + 0x294 ], %g3 ! 2018294 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 200bfdc: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200bfe0: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200bfe4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200bfe8: 80 a0 60 00 cmp %g1, 0 200bfec: 22 80 00 12 be,a 200c034 <_CORE_mutex_Seize_interrupt_trylock+0x64> 200bff0: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 200bff4: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200bff8: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 200bffc: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200c000: c2 26 20 60 st %g1, [ %i0 + 0x60 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 200c004: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200c008: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200c00c: 80 a0 a0 02 cmp %g2, 2 200c010: 02 80 00 0e be 200c048 <_CORE_mutex_Seize_interrupt_trylock+0x78> 200c014: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 200c018: 80 a0 a0 03 cmp %g2, 3 200c01c: 22 80 00 0d be,a 200c050 <_CORE_mutex_Seize_interrupt_trylock+0x80> 200c020: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 200c024: 7f ff d7 64 call 2001db4 200c028: b0 10 20 00 clr %i0 200c02c: 81 c7 e0 08 ret 200c030: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 200c034: 80 a0 c0 01 cmp %g3, %g1 200c038: 22 80 00 2a be,a 200c0e0 <_CORE_mutex_Seize_interrupt_trylock+0x110> 200c03c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200c040: 81 c7 e0 08 ret 200c044: 91 e8 20 01 restore %g0, 1, %o0 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 200c048: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200c04c: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 200c050: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200c054: 12 bf ff f4 bne 200c024 <_CORE_mutex_Seize_interrupt_trylock+0x54> 200c058: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200c05c: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 200c060: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 if ( current == ceiling ) { 200c064: 80 a0 80 01 cmp %g2, %g1 200c068: 02 80 00 2f be 200c124 <_CORE_mutex_Seize_interrupt_trylock+0x154> 200c06c: 01 00 00 00 nop _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 200c070: 1a 80 00 11 bcc 200c0b4 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 200c074: 82 10 20 06 mov 6, %g1 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200c078: 05 00 80 60 sethi %hi(0x2018000), %g2 200c07c: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> 200c080: 82 00 60 01 inc %g1 200c084: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 200c088: 7f ff d7 4b call 2001db4 200c08c: 01 00 00 00 nop _Thread_Change_priority( 200c090: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200c094: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200c098: 94 10 20 00 clr %o2 200c09c: 7f ff ed 26 call 2007534 <_Thread_Change_priority> 200c0a0: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 200c0a4: 7f ff ee ba call 2007b8c <_Thread_Enable_dispatch> 200c0a8: 01 00 00 00 nop 200c0ac: 81 c7 e0 08 ret 200c0b0: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200c0b4: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 200c0b8: c0 26 20 54 clr [ %i0 + 0x54 ] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 200c0bc: 84 10 20 01 mov 1, %g2 200c0c0: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200c0c4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 200c0c8: 82 00 7f ff add %g1, -1, %g1 200c0cc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] _ISR_Enable( level ); 200c0d0: 7f ff d7 39 call 2001db4 200c0d4: b0 10 20 00 clr %i0 200c0d8: 81 c7 e0 08 ret 200c0dc: 81 e8 00 00 restore * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 200c0e0: 80 a0 60 00 cmp %g1, 0 200c0e4: 22 80 00 0a be,a 200c10c <_CORE_mutex_Seize_interrupt_trylock+0x13c> 200c0e8: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200c0ec: 80 a0 60 01 cmp %g1, 1 200c0f0: 12 bf ff d4 bne 200c040 <_CORE_mutex_Seize_interrupt_trylock+0x70> 200c0f4: 82 10 20 02 mov 2, %g1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 200c0f8: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 200c0fc: 7f ff d7 2e call 2001db4 200c100: b0 10 20 00 clr %i0 200c104: 81 c7 e0 08 ret 200c108: 81 e8 00 00 restore * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 200c10c: 82 00 60 01 inc %g1 200c110: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 200c114: 7f ff d7 28 call 2001db4 200c118: b0 10 20 00 clr %i0 200c11c: 81 c7 e0 08 ret 200c120: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 200c124: 7f ff d7 24 call 2001db4 <== NOT EXECUTED 200c128: b0 10 20 00 clr %i0 <== NOT EXECUTED 200c12c: 81 c7 e0 08 ret <== NOT EXECUTED 200c130: 81 e8 00 00 restore <== NOT EXECUTED 020065a4 <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 20065a4: 9d e3 bf 98 save %sp, -104, %sp * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 20065a8: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 20065ac: a0 10 00 18 mov %i0, %l0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 20065b0: 80 a0 60 00 cmp %g1, 0 20065b4: 02 80 00 07 be 20065d0 <_CORE_mutex_Surrender+0x2c> 20065b8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 20065bc: 03 00 80 60 sethi %hi(0x2018000), %g1 20065c0: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 20065c4: 80 a2 00 02 cmp %o0, %g2 20065c8: 12 80 00 2e bne 2006680 <_CORE_mutex_Surrender+0xdc> 20065cc: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 20065d0: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 20065d4: 80 a0 60 00 cmp %g1, 0 20065d8: 02 80 00 22 be 2006660 <_CORE_mutex_Surrender+0xbc> 20065dc: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 20065e0: 80 a0 60 00 cmp %g1, 0 20065e4: 12 80 00 21 bne 2006668 <_CORE_mutex_Surrender+0xc4> 20065e8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 20065ec: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 20065f0: 80 a0 a0 02 cmp %g2, 2 20065f4: 02 80 00 31 be 20066b8 <_CORE_mutex_Surrender+0x114> 20065f8: 80 a0 a0 03 cmp %g2, 3 20065fc: 22 80 00 30 be,a 20066bc <_CORE_mutex_Surrender+0x118> 2006600: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 2006604: c0 24 20 5c clr [ %l0 + 0x5c ] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 2006608: 80 a0 a0 02 cmp %g2, 2 200660c: 02 80 00 1f be 2006688 <_CORE_mutex_Surrender+0xe4> 2006610: c0 24 20 60 clr [ %l0 + 0x60 ] 2006614: 80 a0 a0 03 cmp %g2, 3 2006618: 22 80 00 1d be,a 200668c <_CORE_mutex_Surrender+0xe8> 200661c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 2006620: 40 00 06 55 call 2007f74 <_Thread_queue_Dequeue> 2006624: 90 10 00 10 mov %l0, %o0 2006628: 86 92 20 00 orcc %o0, 0, %g3 200662c: 02 80 00 37 be 2006708 <_CORE_mutex_Surrender+0x164> 2006630: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 2006634: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 2006638: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 200663c: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 2006640: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 2006644: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 2006648: 80 a0 a0 02 cmp %g2, 2 200664c: 02 80 00 2a be 20066f4 <_CORE_mutex_Surrender+0x150> 2006650: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 2006654: 80 a0 a0 03 cmp %g2, 3 2006658: 22 80 00 1c be,a 20066c8 <_CORE_mutex_Surrender+0x124> 200665c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 2006660: 81 c7 e0 08 ret 2006664: 91 e8 20 00 restore %g0, 0, %o0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 2006668: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 200666c: 80 a0 60 00 cmp %g1, 0 2006670: 02 bf ff fc be 2006660 <_CORE_mutex_Surrender+0xbc> 2006674: 80 a0 60 01 cmp %g1, 1 2006678: 12 bf ff dd bne 20065ec <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 200667c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 2006680: 81 c7 e0 08 ret 2006684: 81 e8 00 00 restore _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 2006688: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200668c: 80 a0 60 00 cmp %g1, 0 2006690: 12 bf ff e4 bne 2006620 <_CORE_mutex_Surrender+0x7c> 2006694: 01 00 00 00 nop 2006698: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 200669c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 20066a0: 80 a2 40 01 cmp %o1, %g1 20066a4: 02 bf ff df be 2006620 <_CORE_mutex_Surrender+0x7c> 20066a8: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 20066ac: 40 00 03 a2 call 2007534 <_Thread_Change_priority> 20066b0: 94 10 20 01 mov 1, %o2 ! 1 20066b4: 30 bf ff db b,a 2006620 <_CORE_mutex_Surrender+0x7c> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 20066b8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20066bc: 82 00 7f ff add %g1, -1, %g1 20066c0: 10 bf ff d1 b 2006604 <_CORE_mutex_Surrender+0x60> 20066c4: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < 20066c8: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 20066cc: 82 00 60 01 inc %g1 20066d0: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 20066d4: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 20066d8: 80 a2 40 02 cmp %o1, %g2 20066dc: 1a bf ff e1 bcc 2006660 <_CORE_mutex_Surrender+0xbc> 20066e0: 94 10 20 00 clr %o2 the_thread->current_priority){ _Thread_Change_priority( 20066e4: 40 00 03 94 call 2007534 <_Thread_Change_priority> 20066e8: b0 10 20 00 clr %i0 20066ec: 81 c7 e0 08 ret 20066f0: 81 e8 00 00 restore case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 20066f4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 20066f8: 82 00 60 01 inc %g1 20066fc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 2006700: 81 c7 e0 08 ret 2006704: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 2006708: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 200670c: 81 c7 e0 08 ret 2006710: 91 e8 20 00 restore %g0, 0, %o0 02007144 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 2007144: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 2007148: 7f ff ec ee call 2002500 200714c: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 2007150: c2 06 20 04 ld [ %i0 + 4 ], %g1 2007154: 80 a0 60 00 cmp %g1, 0 2007158: 02 80 00 0c be 2007188 <_CORE_spinlock_Release+0x44> 200715c: 03 00 80 50 sethi %hi(0x2014000), %g1 } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 2007160: c4 00 61 24 ld [ %g1 + 0x124 ], %g2 ! 2014124 <_Thread_Executing> 2007164: c6 06 20 0c ld [ %i0 + 0xc ], %g3 2007168: c2 00 a0 08 ld [ %g2 + 8 ], %g1 200716c: 80 a0 c0 01 cmp %g3, %g1 2007170: 02 80 00 0a be 2007198 <_CORE_spinlock_Release+0x54> 2007174: 01 00 00 00 nop _ISR_Enable( level ); 2007178: 7f ff ec e6 call 2002510 <== NOT EXECUTED 200717c: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 2007180: 81 c7 e0 08 ret <== NOT EXECUTED 2007184: 81 e8 00 00 restore <== NOT EXECUTED /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { _ISR_Enable( level ); 2007188: 7f ff ec e2 call 2002510 200718c: b0 10 20 06 mov 6, %i0 2007190: 81 c7 e0 08 ret 2007194: 81 e8 00 00 restore } /* * Let it be unlocked. */ the_spinlock->users -= 1; 2007198: c2 06 20 08 ld [ %i0 + 8 ], %g1 200719c: 82 00 7f ff add %g1, -1, %g1 20071a0: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 20071a4: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 20071a8: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 20071ac: 7f ff ec d9 call 2002510 20071b0: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 20071b4: 81 c7 e0 08 ret 20071b8: 81 e8 00 00 restore 020071bc <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 20071bc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 20071c0: 05 00 80 50 sethi %hi(0x2014000), %g2 20071c4: c2 00 a1 b4 ld [ %g2 + 0x1b4 ], %g1 ! 20141b4 <_Watchdog_Ticks_since_boot> 20071c8: a2 10 a1 b4 or %g2, 0x1b4, %l1 _ISR_Disable( level ); 20071cc: 7f ff ec cd call 2002500 20071d0: a0 06 80 01 add %i2, %g1, %l0 20071d4: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 20071d8: c2 06 20 04 ld [ %i0 + 4 ], %g1 20071dc: 80 a0 60 01 cmp %g1, 1 20071e0: 02 80 00 34 be 20072b0 <_CORE_spinlock_Wait+0xf4> 20071e4: 03 00 80 50 sethi %hi(0x2014000), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 20071e8: c2 06 20 08 ld [ %i0 + 8 ], %g1 20071ec: 82 00 60 01 inc %g1 20071f0: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 20071f4: c4 06 20 04 ld [ %i0 + 4 ], %g2 20071f8: 80 a0 a0 00 cmp %g2, 0 20071fc: 02 80 00 1a be 2007264 <_CORE_spinlock_Wait+0xa8> 2007200: 80 8e 60 ff btst 0xff, %i1 2007204: 03 00 80 50 sethi %hi(0x2014000), %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 2007208: 02 80 00 22 be 2007290 <_CORE_spinlock_Wait+0xd4> 200720c: b2 10 60 60 or %g1, 0x60, %i1 ! 2014060 <_Thread_Dispatch_disable_level> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 2007210: 80 a6 a0 00 cmp %i2, 0 2007214: 02 80 00 06 be 200722c <_CORE_spinlock_Wait+0x70> 2007218: 01 00 00 00 nop 200721c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 2007220: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 2007224: 08 80 00 2d bleu 20072d8 <_CORE_spinlock_Wait+0x11c> <== NOT EXECUTED 2007228: 01 00 00 00 nop <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 200722c: 7f ff ec b9 call 2002510 2007230: 90 10 00 04 mov %g4, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 2007234: 40 00 04 f5 call 2008608 <_Thread_Enable_dispatch> 2007238: 01 00 00 00 nop 200723c: c2 06 40 00 ld [ %i1 ], %g1 2007240: 82 00 60 01 inc %g1 2007244: c2 26 40 00 st %g1, [ %i1 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 2007248: 7f ff ec ae call 2002500 200724c: 01 00 00 00 nop 2007250: 88 10 00 08 mov %o0, %g4 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 2007254: c2 06 20 04 ld [ %i0 + 4 ], %g1 2007258: 80 a0 60 00 cmp %g1, 0 200725c: 12 bf ff ee bne 2007214 <_CORE_spinlock_Wait+0x58> 2007260: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 2007264: 03 00 80 50 sethi %hi(0x2014000), %g1 2007268: c6 00 61 24 ld [ %g1 + 0x124 ], %g3 ! 2014124 <_Thread_Executing> return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 200726c: 84 10 20 01 mov 1, %g2 2007270: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 2007274: c2 00 e0 08 ld [ %g3 + 8 ], %g1 2007278: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 200727c: b0 10 20 00 clr %i0 2007280: 7f ff ec a4 call 2002510 2007284: 90 10 00 04 mov %g4, %o0 2007288: 81 c7 e0 08 ret 200728c: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 2007290: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 2007294: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2007298: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 200729c: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 20072a0: 7f ff ec 9c call 2002510 <== NOT EXECUTED 20072a4: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 20072a8: 81 c7 e0 08 ret <== NOT EXECUTED 20072ac: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 20072b0: c4 00 61 24 ld [ %g1 + 0x124 ], %g2 20072b4: c6 06 20 0c ld [ %i0 + 0xc ], %g3 20072b8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 20072bc: 80 a0 c0 01 cmp %g3, %g1 20072c0: 12 bf ff ca bne 20071e8 <_CORE_spinlock_Wait+0x2c> 20072c4: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 20072c8: 7f ff ec 92 call 2002510 20072cc: b0 10 20 01 mov 1, %i0 ! 1 20072d0: 81 c7 e0 08 ret 20072d4: 81 e8 00 00 restore /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 20072d8: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 20072dc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20072e0: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 20072e4: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 20072e8: 7f ff ec 8a call 2002510 <== NOT EXECUTED 20072ec: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 20072f0: 81 c7 e0 08 ret <== NOT EXECUTED 20072f4: 81 e8 00 00 restore <== NOT EXECUTED 02024634 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 2024634: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 2024638: 7f ff 79 e9 call 2002ddc <== NOT EXECUTED 202463c: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2024640: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2024644: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2024648: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 202464c: f2 20 60 04 st %i1, [ %g1 + 4 ] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 2024650: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 2024654: 7f ff 79 e6 call 2002dec <== NOT EXECUTED 2024658: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 202465c: 01 00 00 00 nop 0200be90 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 200be90: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 200be94: c4 00 62 98 ld [ %g1 + 0x298 ], %g2 ! 2018298 <_Debug_Level> <== NOT EXECUTED 200be98: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 200be9c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 200bea0: 81 c3 e0 08 retl <== NOT EXECUTED 200bea4: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 020052e4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 20052e4: 9d e3 bf 98 save %sp, -104, %sp rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 20052e8: f2 06 21 68 ld [ %i0 + 0x168 ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 20052ec: 7f ff f2 ae call 2001da4 20052f0: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 20052f4: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 20052f8: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 20052fc: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 2005300: 9a 88 c0 04 andcc %g3, %g4, %o5 2005304: 02 80 00 28 be 20053a4 <_Event_Surrender+0xc0> 2005308: 03 00 80 60 sethi %hi(0x2018000), %g1 /* * 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() && 200530c: c4 00 62 70 ld [ %g1 + 0x270 ], %g2 ! 2018270 <_ISR_Nest_level> 2005310: 80 a0 a0 00 cmp %g2, 0 2005314: 22 80 00 08 be,a 2005334 <_Event_Surrender+0x50> 2005318: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200531c: 03 00 80 60 sethi %hi(0x2018000), %g1 2005320: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 2005324: 80 a6 00 02 cmp %i0, %g2 2005328: 02 80 00 2a be 20053d0 <_Event_Surrender+0xec> 200532c: 19 00 80 62 sethi %hi(0x2018800), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005330: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2005334: 80 88 61 00 btst 0x100, %g1 2005338: 02 80 00 19 be 200539c <_Event_Surrender+0xb8> 200533c: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005340: 02 80 00 04 be 2005350 <_Event_Surrender+0x6c> 2005344: 80 8c 60 02 btst 2, %l1 2005348: 02 80 00 15 be 200539c <_Event_Surrender+0xb8> 200534c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005350: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005354: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005358: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 200535c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005360: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 2005364: 7f ff f2 94 call 2001db4 2005368: 90 10 00 10 mov %l0, %o0 200536c: 7f ff f2 8e call 2001da4 2005370: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005374: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2005378: 80 a0 60 02 cmp %g1, 2 200537c: 02 80 00 0c be 20053ac <_Event_Surrender+0xc8> 2005380: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005384: 90 10 00 10 mov %l0, %o0 2005388: 7f ff f2 8b call 2001db4 200538c: 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 ); 2005390: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005394: 40 00 08 e5 call 2007728 <_Thread_Clear_state> 2005398: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200539c: 7f ff f2 86 call 2001db4 <== NOT EXECUTED 20053a0: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 20053a4: 7f ff f2 84 call 2001db4 20053a8: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 20053ac: 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 ); 20053b0: 7f ff f2 81 call 2001db4 20053b4: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 20053b8: 40 00 0f 16 call 2009010 <_Watchdog_Remove> 20053bc: 90 06 20 48 add %i0, 0x48, %o0 20053c0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 20053c4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 20053c8: 40 00 08 d8 call 2007728 <_Thread_Clear_state> 20053cc: 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() && 20053d0: c2 03 22 f0 ld [ %o4 + 0x2f0 ], %g1 20053d4: 80 a0 60 01 cmp %g1, 1 20053d8: 02 80 00 07 be 20053f4 <_Event_Surrender+0x110> 20053dc: 80 a0 c0 0d cmp %g3, %o5 20053e0: c2 03 22 f0 ld [ %o4 + 0x2f0 ], %g1 <== NOT EXECUTED 20053e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 20053e8: 32 bf ff d3 bne,a 2005334 <_Event_Surrender+0x50> <== NOT EXECUTED 20053ec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 20053f0: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 20053f4: 02 80 00 04 be 2005404 <_Event_Surrender+0x120> 20053f8: 80 8c 60 02 btst 2, %l1 20053fc: 02 80 00 09 be 2005420 <_Event_Surrender+0x13c> <== NOT EXECUTED 2005400: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2005404: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005408: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 200540c: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 2005410: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005414: 82 10 20 03 mov 3, %g1 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005418: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 200541c: c2 23 22 f0 st %g1, [ %o4 + 0x2f0 ] } _ISR_Enable( level ); 2005420: 7f ff f2 65 call 2001db4 2005424: 91 e8 00 10 restore %g0, %l0, %o0 2005428: 01 00 00 00 nop 0200542c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 200542c: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2005430: 90 10 00 18 mov %i0, %o0 2005434: 40 00 09 e4 call 2007bc4 <_Thread_Get> 2005438: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 200543c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005440: 80 a0 60 00 cmp %g1, 0 2005444: 12 80 00 19 bne 20054a8 <_Event_Timeout+0x7c> 2005448: b0 10 00 08 mov %o0, %i0 * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 200544c: 7f ff f2 56 call 2001da4 2005450: 01 00 00 00 nop 2005454: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 2005458: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200545c: 80 a0 60 00 cmp %g1, 0 2005460: 02 80 00 14 be 20054b0 <_Event_Timeout+0x84> 2005464: 03 00 80 60 sethi %hi(0x2018000), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005468: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 200546c: 80 a6 00 02 cmp %i0, %g2 2005470: 02 80 00 18 be 20054d0 <_Event_Timeout+0xa4> 2005474: c0 26 20 24 clr [ %i0 + 0x24 ] (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005478: 82 10 20 06 mov 6, %g1 200547c: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 2005480: 7f ff f2 4d call 2001db4 2005484: 90 10 00 03 mov %g3, %o0 2005488: 90 10 00 18 mov %i0, %o0 200548c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005490: 40 00 08 a6 call 2007728 <_Thread_Clear_state> 2005494: 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; 2005498: 05 00 80 60 sethi %hi(0x2018000), %g2 200549c: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> 20054a0: 82 00 7f ff add %g1, -1, %g1 20054a4: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] 20054a8: 81 c7 e0 08 ret 20054ac: 81 e8 00 00 restore 20054b0: 05 00 80 60 sethi %hi(0x2018000), %g2 <== NOT EXECUTED 20054b4: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 20054b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20054bc: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 20054c0: 7f ff f2 3d call 2001db4 <== NOT EXECUTED 20054c4: 01 00 00 00 nop <== NOT EXECUTED 20054c8: 81 c7 e0 08 ret <== NOT EXECUTED 20054cc: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 20054d0: 05 00 80 62 sethi %hi(0x2018800), %g2 20054d4: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 2018af0 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 20054d8: 80 a0 60 01 cmp %g1, 1 20054dc: 38 bf ff e8 bgu,a 200547c <_Event_Timeout+0x50> 20054e0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 20054e4: 82 10 20 02 mov 2, %g1 20054e8: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20054ec: 10 bf ff e4 b 200547c <_Event_Timeout+0x50> 20054f0: 82 10 20 06 mov 6, %g1 02008b38 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 2008b38: 9d e3 bf 98 save %sp, -104, %sp uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 2008b3c: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 2008b40: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2008b44: 90 10 00 19 mov %i1, %o0 2008b48: 92 10 00 16 mov %l6, %o1 2008b4c: 40 00 01 82 call 2009154 <_Heap_Calc_block_size> 2008b50: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 2008b54: ae 92 20 00 orcc %o0, 0, %l7 2008b58: 02 80 00 69 be 2008cfc <_Heap_Allocate_aligned+0x1c4> 2008b5c: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 2008b60: 80 a6 a0 00 cmp %i2, 0 2008b64: 22 80 00 02 be,a 2008b6c <_Heap_Allocate_aligned+0x34> 2008b68: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 2008b6c: e2 05 60 08 ld [ %l5 + 8 ], %l1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 2008b70: 80 a5 40 11 cmp %l5, %l1 2008b74: 02 80 00 62 be 2008cfc <_Heap_Allocate_aligned+0x1c4> 2008b78: a8 10 20 00 clr %l4 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2008b7c: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008b80: 92 10 00 1a mov %i2, %o1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2008b84: a4 08 7f fe and %g1, -2, %l2 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 2008b88: a6 04 40 12 add %l1, %l2, %l3 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 2008b8c: 80 a5 c0 12 cmp %l7, %l2 return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; aligned_user_addr = block_end - end_to_user_offs; 2008b90: a0 24 c0 19 sub %l3, %i1, %l0 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 2008b94: 18 80 00 22 bgu 2008c1c <_Heap_Allocate_aligned+0xe4> 2008b98: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008b9c: 40 00 40 a5 call 2018e30 <.urem> 2008ba0: 01 00 00 00 nop _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 2008ba4: 92 10 00 16 mov %l6, %o1 2008ba8: b0 24 00 08 sub %l0, %o0, %i0 2008bac: 40 00 40 a1 call 2018e30 <.urem> 2008bb0: 90 10 00 18 mov %i0, %o0 2008bb4: a0 04 60 08 add %l1, 8, %l0 2008bb8: 84 26 00 08 sub %i0, %o0, %g2 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 2008bbc: 80 a4 00 02 cmp %l0, %g2 2008bc0: 38 80 00 18 bgu,a 2008c20 <_Heap_Allocate_aligned+0xe8> 2008bc4: e2 04 60 08 ld [ %l1 + 8 ], %l1 /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 2008bc8: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 2008bcc: 82 20 80 10 sub %g2, %l0, %g1 2008bd0: 80 a0 40 1d cmp %g1, %i5 2008bd4: 1a 80 00 1e bcc 2008c4c <_Heap_Allocate_aligned+0x114> 2008bd8: 80 a6 20 00 cmp %i0, 0 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 2008bdc: 82 26 00 10 sub %i0, %l0, %g1 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 2008be0: 90 10 00 10 mov %l0, %o0 2008be4: 92 10 00 1a mov %i2, %o1 2008be8: 80 a5 80 01 cmp %l6, %g1 2008bec: 18 80 00 17 bgu 2008c48 <_Heap_Allocate_aligned+0x110> 2008bf0: 84 10 00 10 mov %l0, %g2 2008bf4: 40 00 40 8f call 2018e30 <.urem> <== NOT EXECUTED 2008bf8: 01 00 00 00 nop <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 2008bfc: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED *value = r ? v - r + a : v; 2008c00: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 2008c04: 86 10 20 00 clr %g3 <== NOT EXECUTED 2008c08: 12 80 00 35 bne 2008cdc <_Heap_Allocate_aligned+0x1a4> <== NOT EXECUTED 2008c0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2008c10: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008c14: 38 80 00 0d bgu,a 2008c48 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008c18: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 2008c1c: e2 04 60 08 ld [ %l1 + 8 ], %l1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 2008c20: 80 a5 40 11 cmp %l5, %l1 2008c24: 12 bf ff d6 bne 2008b7c <_Heap_Allocate_aligned+0x44> 2008c28: a8 05 20 01 inc %l4 2008c2c: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 2008c30: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 2008c34: 80 a0 40 14 cmp %g1, %l4 2008c38: 2a 80 00 02 bcs,a 2008c40 <_Heap_Allocate_aligned+0x108> 2008c3c: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 2008c40: 81 c7 e0 08 ret 2008c44: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 2008c48: 80 a6 20 00 cmp %i0, 0 2008c4c: 22 bf ff f5 be,a 2008c20 <_Heap_Allocate_aligned+0xe8> 2008c50: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 2008c54: 82 04 e0 08 add %l3, 8, %g1 2008c58: 88 20 40 02 sub %g1, %g2, %g4 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 2008c5c: 84 24 80 04 sub %l2, %g4, %g2 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 2008c60: 80 a0 80 1d cmp %g2, %i5 2008c64: 2a 80 00 29 bcs,a 2008d08 <_Heap_Allocate_aligned+0x1d0> 2008c68: c6 04 60 08 ld [ %l1 + 8 ], %g3 /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 2008c6c: 82 10 a0 01 or %g2, 1, %g1 2008c70: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 2008c74: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 2008c78: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 2008c7c: c8 24 60 04 st %g4, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2008c80: 84 04 40 04 add %l1, %g4, %g2 _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 2008c84: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2008c88: 82 10 60 01 or %g1, 1, %g1 2008c8c: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 2008c90: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 2008c94: c2 05 60 34 ld [ %l5 + 0x34 ], %g1 stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 2008c98: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 2008c9c: 80 a0 c0 01 cmp %g3, %g1 2008ca0: 1a 80 00 03 bcc 2008cac <_Heap_Allocate_aligned+0x174> 2008ca4: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 2008ca8: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 2008cac: c2 05 60 40 ld [ %l5 + 0x40 ], %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 2008cb0: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 2008cb4: c4 05 60 48 ld [ %l5 + 0x48 ], %g2 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 2008cb8: 82 00 60 01 inc %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 2008cbc: 86 00 e0 01 inc %g3 stats->allocs += 1; 2008cc0: 84 00 a0 01 inc %g2 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 2008cc4: 86 00 c0 14 add %g3, %l4, %g3 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 2008cc8: c2 25 60 40 st %g1, [ %l5 + 0x40 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 2008ccc: c4 25 60 48 st %g2, [ %l5 + 0x48 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 2008cd0: c6 25 60 4c st %g3, [ %l5 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 2008cd4: 10 bf ff d7 b 2008c30 <_Heap_Allocate_aligned+0xf8> 2008cd8: 90 10 00 18 mov %i0, %o0 ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; *value = r ? v - r + a : v; 2008cdc: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 2008ce0: 90 20 40 04 sub %g1, %g4, %o0 <== NOT EXECUTED 2008ce4: 86 22 00 10 sub %o0, %l0, %g3 <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 2008ce8: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008cec: 28 bf ff cd bleu,a 2008c20 <_Heap_Allocate_aligned+0xe8> <== NOT EXECUTED 2008cf0: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 2008cf4: 10 bf ff d5 b 2008c48 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008cf8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 2008cfc: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 2008d00: 81 c7 e0 08 ret <== NOT EXECUTED 2008d04: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 2008d08: c4 04 60 0c ld [ %l1 + 0xc ], %g2 /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 2008d0c: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 2008d10: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 2008d14: 82 00 7f ff add %g1, -1, %g1 { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 2008d18: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008d1c: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 2008d20: 10 bf ff d8 b 2008c80 <_Heap_Allocate_aligned+0x148> 2008d24: 88 10 00 12 mov %l2, %g4 0202fc4c <_Heap_Get_information>: Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 202fc4c: d6 02 20 24 ld [ %o0 + 0x24 ], %o3 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 202fc50: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 202fc54: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 202fc58: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 202fc5c: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 202fc60: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 202fc64: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 202fc68: 80 a0 40 0b cmp %g1, %o3 202fc6c: 02 80 00 26 be 202fd04 <_Heap_Get_information+0xb8> 202fc70: c0 22 60 10 clr [ %o1 + 0x10 ] 202fc74: 10 80 00 0e b 202fcac <_Heap_Get_information+0x60> 202fc78: d8 00 60 04 ld [ %g1 + 4 ], %o4 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 202fc7c: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 202fc80: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 202fc84: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 202fc88: 84 00 80 04 add %g2, %g4, %g2 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 202fc8c: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 202fc90: 80 a0 c0 04 cmp %g3, %g4 202fc94: 1a 80 00 03 bcc 202fca0 <_Heap_Get_information+0x54> 202fc98: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 202fc9c: c8 22 60 10 st %g4, [ %o1 + 0x10 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 202fca0: 80 a2 c0 0d cmp %o3, %o5 202fca4: 02 80 00 18 be 202fd04 <_Heap_Get_information+0xb8> 202fca8: 82 10 00 0d mov %o5, %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 202fcac: 88 0b 3f fe and %o4, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 202fcb0: 9a 00 40 04 add %g1, %g4, %o5 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 202fcb4: d8 03 60 04 ld [ %o5 + 4 ], %o4 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 202fcb8: 80 8b 20 01 btst 1, %o4 202fcbc: 32 bf ff f0 bne,a 202fc7c <_Heap_Get_information+0x30> 202fcc0: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 202fcc4: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 202fcc8: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 202fccc: c6 02 60 04 ld [ %o1 + 4 ], %g3 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 202fcd0: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 202fcd4: 84 00 80 04 add %g2, %g4, %g2 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 202fcd8: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 202fcdc: 80 a0 c0 04 cmp %g3, %g4 202fce0: 1a 80 00 03 bcc 202fcec <_Heap_Get_information+0xa0> 202fce4: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 202fce8: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 202fcec: c2 03 40 00 ld [ %o5 ], %g1 202fcf0: 80 a0 40 04 cmp %g1, %g4 202fcf4: 02 bf ff ec be 202fca4 <_Heap_Get_information+0x58> 202fcf8: 80 a2 c0 0d cmp %o3, %o5 202fcfc: 81 c3 e0 08 retl <== NOT EXECUTED 202fd00: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 202fd04: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 202fd08: 90 10 20 00 clr %o0 202fd0c: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 202fd10: 81 c3 e0 08 retl 202fd14: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 020159c0 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 20159c0: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 20159c4: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 20159c8: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 20159cc: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 20159d0: c0 27 00 00 clr [ %i4 ] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 20159d4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 20159d8: 7f ff fb 8e call 2014810 <.urem> 20159dc: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 20159e0: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 20159e4: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 20159e8: 82 06 7f f8 add %i1, -8, %g1 20159ec: a2 20 40 08 sub %g1, %o0, %l1 _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 20159f0: 80 a4 40 04 cmp %l1, %g4 20159f4: 84 60 3f ff subx %g0, -1, %g2 20159f8: 80 a0 c0 11 cmp %g3, %l1 20159fc: 82 60 3f ff subx %g0, -1, %g1 2015a00: 80 88 80 01 btst %g2, %g1 2015a04: 02 80 00 2f be 2015ac0 <_Heap_Resize_block+0x100> 2015a08: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 2015a0c: da 04 60 04 ld [ %l1 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2015a10: b0 0b 7f fe and %o5, -2, %i0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2015a14: a4 04 40 18 add %l1, %i0, %l2 old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 2015a18: 80 a4 80 04 cmp %l2, %g4 2015a1c: 84 60 3f ff subx %g0, -1, %g2 2015a20: 80 a0 c0 12 cmp %g3, %l2 2015a24: 82 60 3f ff subx %g0, -1, %g1 2015a28: 80 88 80 01 btst %g2, %g1 2015a2c: 02 80 00 25 be 2015ac0 <_Heap_Resize_block+0x100> 2015a30: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2015a34: c2 04 a0 04 ld [ %l2 + 4 ], %g1 2015a38: 80 88 60 01 btst 1, %g1 2015a3c: 02 80 00 21 be 2015ac0 <_Heap_Resize_block+0x100> 2015a40: ae 08 7f fe and %g1, -2, %l7 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 2015a44: 80 a0 c0 12 cmp %g3, %l2 2015a48: a8 10 20 01 mov 1, %l4 2015a4c: 02 80 00 04 be 2015a5c <_Heap_Resize_block+0x9c> 2015a50: 82 04 80 17 add %l2, %l7, %g1 2015a54: c2 00 60 04 ld [ %g1 + 4 ], %g1 2015a58: a8 08 60 01 and %g1, 1, %l4 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 2015a5c: 82 24 80 19 sub %l2, %i1, %g1 2015a60: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 2015a64: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 2015a68: 80 a0 40 1a cmp %g1, %i2 2015a6c: 1a 80 00 17 bcc 2015ac8 <_Heap_Resize_block+0x108> 2015a70: b6 0b 60 01 and %o5, 1, %i3 /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 2015a74: 80 8d 20 ff btst 0xff, %l4 2015a78: 12 80 00 10 bne 2015ab8 <_Heap_Resize_block+0xf8> 2015a7c: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 2015a80: 92 10 00 15 mov %l5, %o1 2015a84: 7f ff fb 63 call 2014810 <.urem> 2015a88: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 2015a8c: 80 a2 20 00 cmp %o0, 0 2015a90: 02 80 00 05 be 2015aa4 <_Heap_Resize_block+0xe4> 2015a94: 80 a4 00 16 cmp %l0, %l6 2015a98: 82 04 00 15 add %l0, %l5, %g1 2015a9c: a0 20 40 08 sub %g1, %o0, %l0 2015aa0: 80 a4 00 16 cmp %l0, %l6 2015aa4: 0a 80 00 2e bcs 2015b5c <_Heap_Resize_block+0x19c> 2015aa8: 90 10 00 10 mov %l0, %o0 else { uint32_t add_block_size = size - old_user_size; _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 2015aac: 80 a5 c0 08 cmp %l7, %o0 2015ab0: 1a 80 00 32 bcc 2015b78 <_Heap_Resize_block+0x1b8> 2015ab4: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 2015ab8: 81 c7 e0 08 ret 2015abc: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 2015ac0: 81 c7 e0 08 ret 2015ac4: 91 e8 20 02 restore %g0, 2, %o0 --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 2015ac8: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 2015acc: 92 10 00 15 mov %l5, %o1 2015ad0: 7f ff fb 50 call 2014810 <.urem> 2015ad4: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 2015ad8: a0 a4 00 08 subcc %l0, %o0, %l0 2015adc: 22 80 00 1c be,a 2015b4c <_Heap_Resize_block+0x18c> 2015ae0: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 2015ae4: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 2015ae8: 80 a5 80 02 cmp %l6, %g2 2015aec: 18 80 00 1e bgu 2015b64 <_Heap_Resize_block+0x1a4> 2015af0: 82 25 80 02 sub %l6, %g2, %g1 _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 2015af4: 80 8d 20 ff btst 0xff, %l4 2015af8: 12 80 00 2a bne 2015ba0 <_Heap_Resize_block+0x1e0> 2015afc: 80 a5 80 10 cmp %l6, %l0 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 2015b00: 82 10 80 1b or %g2, %i3, %g1 2015b04: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2015b08: 86 04 40 02 add %l1, %g2, %g3 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 2015b0c: d8 04 a0 0c ld [ %l2 + 0xc ], %o4 if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 2015b10: 88 04 00 17 add %l0, %l7, %g4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 2015b14: da 04 a0 08 ld [ %l2 + 8 ], %o5 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 2015b18: c8 24 80 17 st %g4, [ %l2 + %l7 ] _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 2015b1c: 84 11 20 01 or %g4, 1, %g2 2015b20: c4 20 e0 04 st %g2, [ %g3 + 4 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 2015b24: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 2015b28: da 20 e0 08 st %o5, [ %g3 + 8 ] 2015b2c: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 2015b30: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 2015b34: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 2015b38: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 2015b3c: c6 23 60 0c st %g3, [ %o5 + 0xc ] 2015b40: c6 23 20 08 st %g3, [ %o4 + 8 ] 2015b44: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2015b48: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 2015b4c: 82 00 60 01 inc %g1 2015b50: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 2015b54: 81 c7 e0 08 ret 2015b58: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 2015b5c: 10 bf ff d4 b 2015aac <_Heap_Resize_block+0xec> 2015b60: 90 10 00 16 mov %l6, %o0 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 2015b64: a0 a4 00 01 subcc %l0, %g1, %l0 2015b68: 12 bf ff e3 bne 2015af4 <_Heap_Resize_block+0x134> 2015b6c: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2015b70: 10 bf ff f7 b 2015b4c <_Heap_Resize_block+0x18c> 2015b74: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 2015b78: 92 10 00 12 mov %l2, %o1 2015b7c: 7f ff c3 bd call 2006a70 <_Heap_Block_allocate> 2015b80: 90 10 00 13 mov %l3, %o0 _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 2015b84: 90 02 00 18 add %o0, %i0, %o0 2015b88: 90 12 00 1b or %o0, %i3, %o0 2015b8c: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 2015b90: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 2015b94: 82 00 7f ff add %g1, -1, %g1 2015b98: 10 bf ff ec b 2015b48 <_Heap_Resize_block+0x188> 2015b9c: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 2015ba0: 38 bf ff eb bgu,a 2015b4c <_Heap_Resize_block+0x18c> <== NOT EXECUTED 2015ba4: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 2015ba8: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2015bac: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 2015bb0: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 2015bb4: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 2015bb8: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 2015bbc: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2015bc0: c4 04 e0 50 ld [ %l3 + 0x50 ], %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 2015bc4: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2015bc8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 2015bcc: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2015bd0: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 2015bd4: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 2015bd8: 7f ff d9 b2 call 200c2a0 <_Heap_Free> <== NOT EXECUTED 2015bdc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 2015be0: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 2015be4: 10 bf ff d9 b 2015b48 <_Heap_Resize_block+0x188> <== NOT EXECUTED 2015be8: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 0200eeb4 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 200eeb4: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200eeb8: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 200eebc: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200eec0: 06 80 00 8c bl 200f0f0 <_Heap_Walk+0x23c> 200eec4: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 200eec8: c2 04 60 04 ld [ %l1 + 4 ], %g1 200eecc: 80 88 60 01 btst 1, %g1 200eed0: 02 80 00 81 be 200f0d4 <_Heap_Walk+0x220> 200eed4: a6 10 20 00 clr %l3 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { 200eed8: c4 04 40 00 ld [ %l1 ], %g2 200eedc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200eee0: 80 a0 80 01 cmp %g2, %g1 200eee4: 02 80 00 08 be 200ef04 <_Heap_Walk+0x50> 200eee8: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 200eeec: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200eef0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200eef4: 90 12 21 98 or %o0, 0x198, %o0 <== NOT EXECUTED 200eef8: 7f ff d7 53 call 2004c44 <== NOT EXECUTED 200eefc: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 200ef00: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 200ef04: 22 80 00 63 be,a 200f090 <_Heap_Walk+0x1dc> 200ef08: a2 10 00 16 mov %l6, %l1 <== NOT EXECUTED printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 200ef0c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200ef10: c8 04 60 04 ld [ %l1 + 4 ], %g4 200ef14: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200ef18: a4 09 3f fe and %g4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 200ef1c: a0 04 40 12 add %l1, %l2, %l0 200ef20: 80 a4 00 01 cmp %l0, %g1 200ef24: 84 60 3f ff subx %g0, -1, %g2 200ef28: 80 a0 c0 10 cmp %g3, %l0 200ef2c: 82 60 3f ff subx %g0, -1, %g1 200ef30: 80 88 80 01 btst %g2, %g1 200ef34: 02 80 00 77 be 200f110 <_Heap_Walk+0x25c> 200ef38: 03 00 80 6b sethi %hi(0x201ac00), %g1 Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); printk("PASS: %d !the_block not in the free list", source); 200ef3c: 05 00 80 6f sethi %hi(0x201bc00), %g2 { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 200ef40: ba 10 63 d8 or %g1, 0x3d8, %i5 printk("PASS: %d !the_block not in the free list", source); 200ef44: ae 10 a2 58 or %g2, 0x258, %l7 printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 200ef48: 03 00 80 6f sethi %hi(0x201bc00), %g1 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200ef4c: 05 00 80 6f sethi %hi(0x201bc00), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 200ef50: a8 09 20 01 and %g4, 1, %l4 error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 200ef54: b8 10 62 28 or %g1, 0x228, %i4 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200ef58: b6 10 a1 f8 or %g2, 0x1f8, %i3 200ef5c: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 200ef60: c2 04 20 04 ld [ %l0 + 4 ], %g1 200ef64: 80 88 60 01 btst 1, %g1 200ef68: 12 80 00 20 bne 200efe8 <_Heap_Walk+0x134> 200ef6c: 80 a4 e0 00 cmp %l3, 0 if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 200ef70: c2 04 00 00 ld [ %l0 ], %g1 200ef74: 80 a0 40 12 cmp %g1, %l2 200ef78: 02 80 00 07 be 200ef94 <_Heap_Walk+0xe0> 200ef7c: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200ef80: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200ef84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200ef88: 7f ff d7 2f call 2004c44 <== NOT EXECUTED 200ef8c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 200ef90: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 200ef94: 32 80 00 0a bne,a 200efbc <_Heap_Walk+0x108> 200ef98: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 200ef9c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 200efa0: 12 80 00 49 bne 200f0c4 <_Heap_Walk+0x210> <== NOT EXECUTED 200efa4: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200efa8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200efac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200efb0: 7f ff d7 25 call 2004c44 <== NOT EXECUTED 200efb4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 200efb8: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 200efbc: 80 a0 40 11 cmp %g1, %l1 200efc0: 02 80 00 0a be 200efe8 <_Heap_Walk+0x134> 200efc4: 80 a4 e0 00 cmp %l3, 0 200efc8: 80 a6 00 01 cmp %i0, %g1 200efcc: 02 80 00 58 be 200f12c <_Heap_Walk+0x278> 200efd0: 80 a0 40 11 cmp %g1, %l1 block = block->next; 200efd4: c2 00 60 08 ld [ %g1 + 8 ], %g1 error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 200efd8: 80 a0 40 11 cmp %g1, %l1 200efdc: 12 bf ff fc bne 200efcc <_Heap_Walk+0x118> 200efe0: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 200efe4: 80 a4 e0 00 cmp %l3, 0 200efe8: 32 80 00 58 bne,a 200f148 <_Heap_Walk+0x294> 200efec: 27 00 80 6b sethi %hi(0x201ac00), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200eff0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200eff4: 80 a0 40 12 cmp %g1, %l2 200eff8: 18 80 00 40 bgu 200f0f8 <_Heap_Walk+0x244> 200effc: 11 00 80 6f sethi %hi(0x201bc00), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 200f000: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200f004: 40 00 27 8b call 2018e30 <.urem> 200f008: 90 10 00 12 mov %l2, %o0 200f00c: 80 a2 20 00 cmp %o0, 0 200f010: 12 80 00 15 bne 200f064 <_Heap_Walk+0x1b0> 200f014: 80 a4 e0 00 cmp %l3, 0 printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 200f018: 12 80 00 17 bne 200f074 <_Heap_Walk+0x1c0> 200f01c: 80 a5 80 10 cmp %l6, %l0 if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 200f020: 02 80 00 1c be 200f090 <_Heap_Walk+0x1dc> 200f024: a2 10 00 16 mov %l6, %l1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200f028: c8 04 20 04 ld [ %l0 + 4 ], %g4 printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 200f02c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 200f030: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200f034: a4 09 3f fe and %g4, -2, %l2 200f038: a0 04 00 12 add %l0, %l2, %l0 200f03c: 80 a4 00 01 cmp %l0, %g1 200f040: 84 60 3f ff subx %g0, -1, %g2 200f044: 80 a0 c0 10 cmp %g3, %l0 200f048: 82 60 3f ff subx %g0, -1, %g1 200f04c: 80 88 80 01 btst %g2, %g1 200f050: 02 80 00 2f be 200f10c <_Heap_Walk+0x258> 200f054: a8 09 20 01 and %g4, 1, %l4 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 200f058: a2 10 00 15 mov %l5, %l1 200f05c: 10 bf ff c1 b 200ef60 <_Heap_Walk+0xac> 200f060: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); 200f064: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f068: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f06c: 7f ff d6 f6 call 2004c44 <== NOT EXECUTED 200f070: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200f074: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 200f078: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f07c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f080: 90 12 22 d8 or %o0, 0x2d8, %o0 <== NOT EXECUTED 200f084: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200f088: 7f ff d6 ef call 2004c44 <== NOT EXECUTED 200f08c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 200f090: d6 06 20 10 ld [ %i0 + 0x10 ], %o3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200f094: c2 04 60 04 ld [ %l1 + 4 ], %g1 200f098: 94 08 7f fe and %g1, -2, %o2 200f09c: 80 a2 c0 0a cmp %o3, %o2 200f0a0: 02 80 00 07 be 200f0bc <_Heap_Walk+0x208> 200f0a4: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 200f0a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f0ac: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f0b0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200f0b4: 7f ff d6 e4 call 2004c44 <== NOT EXECUTED 200f0b8: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 200f0bc: 81 c7 e0 08 ret 200f0c0: 81 e8 00 00 restore if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); 200f0c4: 7f ff d6 e0 call 2004c44 <== NOT EXECUTED 200f0c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200f0cc: 10 bf ff b8 b 200efac <_Heap_Walk+0xf8> <== NOT EXECUTED 200f0d0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 200f0d4: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f0d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f0dc: 90 12 21 60 or %o0, 0x160, %o0 <== NOT EXECUTED 200f0e0: 7f ff d6 d9 call 2004c44 <== NOT EXECUTED 200f0e4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 200f0e8: 10 bf ff 7d b 200eedc <_Heap_Walk+0x28> <== NOT EXECUTED 200f0ec: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 200f0f0: 10 bf ff 76 b 200eec8 <_Heap_Walk+0x14> <== NOT EXECUTED 200f0f4: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED } if (do_dump || error) printk("\n"); if (the_size < the_heap->min_block_size) { printk("PASS: %d !block size is too small\n", source); 200f0f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f0fc: 7f ff d6 d2 call 2004c44 <== NOT EXECUTED 200f100: 90 12 22 88 or %o0, 0x288, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200f104: 10 bf ff dd b 200f078 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200f108: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 200f10c: a2 10 00 15 mov %l5, %l1 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 200f110: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 200f114: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f118: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f11c: 7f ff d6 ca call 2004c44 <== NOT EXECUTED 200f120: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200f124: 10 bf ff d5 b 200f078 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200f128: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { 200f12c: 02 bf ff ae be 200efe4 <_Heap_Walk+0x130> <== NOT EXECUTED 200f130: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 200f134: 12 80 00 0a bne 200f15c <_Heap_Walk+0x2a8> <== NOT EXECUTED 200f138: 27 00 80 6b sethi %hi(0x201ac00), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200f13c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200f140: 7f ff d6 c1 call 2004c44 <== NOT EXECUTED 200f144: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200f148: 90 14 e3 d8 or %l3, 0x3d8, %o0 <== NOT EXECUTED 200f14c: 7f ff d6 be call 2004c44 <== NOT EXECUTED 200f150: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200f154: 10 bf ff a8 b 200eff4 <_Heap_Walk+0x140> <== NOT EXECUTED 200f158: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 200f15c: 7f ff d6 ba call 2004c44 <== NOT EXECUTED 200f160: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200f164: 10 bf ff f7 b 200f140 <_Heap_Walk+0x28c> <== NOT EXECUTED 200f168: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 02006be0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006be0: 9d e3 bf 98 save %sp, -104, %sp * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 2006be4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006be8: 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 ) 2006bec: 80 a0 60 00 cmp %g1, 0 2006bf0: 02 80 00 1d be 2006c64 <_Objects_Allocate+0x84> 2006bf4: 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 ); 2006bf8: a2 04 20 20 add %l0, 0x20, %l1 2006bfc: 40 00 14 ca call 200bf24 <_Chain_Get> 2006c00: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2006c04: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 2006c08: 80 a0 60 00 cmp %g1, 0 2006c0c: 02 80 00 16 be 2006c64 <_Objects_Allocate+0x84> 2006c10: 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 ) { 2006c14: 80 a2 20 00 cmp %o0, 0 2006c18: 02 80 00 15 be 2006c6c <_Objects_Allocate+0x8c> 2006c1c: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006c20: c4 06 20 08 ld [ %i0 + 8 ], %g2 2006c24: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c28: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006c2c: 03 00 00 3f sethi %hi(0xfc00), %g1 2006c30: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006c34: 84 08 80 01 and %g2, %g1, %g2 2006c38: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c3c: 40 00 36 49 call 2014560 <.udiv> 2006c40: 90 20 80 08 sub %g2, %o0, %o0 2006c44: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 2006c48: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2006c4c: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c50: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 2006c54: 82 00 7f ff add %g1, -1, %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c58: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2006c5c: c2 34 20 2c sth %g1, [ %l0 + 0x2c ] block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c60: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 2006c64: 81 c7 e0 08 ret 2006c68: 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 ); 2006c6c: 40 00 00 14 call 2006cbc <_Objects_Extend_information> 2006c70: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2006c74: 40 00 14 ac call 200bf24 <_Chain_Get> 2006c78: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 2006c7c: b0 92 20 00 orcc %o0, 0, %i0 2006c80: 32 bf ff e9 bne,a 2006c24 <_Objects_Allocate+0x44> 2006c84: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 2006c88: 81 c7 e0 08 ret <== NOT EXECUTED 2006c8c: 81 e8 00 00 restore <== NOT EXECUTED 02006cbc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2006cbc: 9d e3 bf 88 save %sp, -120, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 2006cc0: c4 06 20 08 ld [ %i0 + 8 ], %g2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 2006cc4: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2006cc8: 03 00 00 3f sethi %hi(0xfc00), %g1 2006ccc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006cd0: a8 08 80 01 and %g2, %g1, %l4 2006cd4: 80 a5 40 14 cmp %l5, %l4 2006cd8: 1a 80 00 79 bcc 2006ebc <_Objects_Extend_information+0x200> 2006cdc: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2006ce0: a6 10 00 14 mov %l4, %l3 2006ce4: a4 10 20 00 clr %l2 2006ce8: a2 10 20 00 clr %l1 2006cec: ac 10 20 01 mov 1, %l6 2006cf0: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 2006cf4: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006cf8: 80 a0 60 00 cmp %g1, 0 2006cfc: 12 80 00 8d bne 2006f30 <_Objects_Extend_information+0x274> 2006d00: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 2006d04: 90 02 00 14 add %o0, %l4, %o0 2006d08: 90 02 00 1d add %o0, %i5, %o0 2006d0c: 40 00 09 30 call 20091cc <_Workspace_Allocate_or_fatal_error> 2006d10: 91 2a 20 02 sll %o0, 2, %o0 2006d14: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d18: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006d1c: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d20: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006d24: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d28: 18 80 00 94 bgu 2006f78 <_Objects_Extend_information+0x2bc> 2006d2c: a0 05 80 02 add %l6, %g2, %l0 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006d30: 80 a5 20 00 cmp %l4, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006d34: 84 10 20 00 clr %g2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006d38: 02 80 00 08 be 2006d58 <_Objects_Extend_information+0x9c> 2006d3c: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 2006d40: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006d44: 84 00 a0 01 inc %g2 2006d48: 80 a0 80 14 cmp %g2, %l4 2006d4c: 0a bf ff fd bcs 2006d40 <_Objects_Extend_information+0x84> 2006d50: c0 24 00 01 clr [ %l0 + %g1 ] 2006d54: ab 2c a0 02 sll %l2, 2, %l5 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 2006d58: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006d5c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006d60: 86 04 c0 01 add %l3, %g1, %g3 2006d64: 80 a4 c0 03 cmp %l3, %g3 2006d68: 1a 80 00 0a bcc 2006d90 <_Objects_Extend_information+0xd4> 2006d6c: c0 25 c0 15 clr [ %l7 + %l5 ] 2006d70: 83 2c e0 02 sll %l3, 2, %g1 2006d74: 84 04 00 01 add %l0, %g1, %g2 2006d78: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 2006d7c: 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++ ) { 2006d80: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006d84: 80 a0 40 03 cmp %g1, %g3 2006d88: 0a bf ff fd bcs 2006d7c <_Objects_Extend_information+0xc0> 2006d8c: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2006d90: 7f ff ec 05 call 2001da4 2006d94: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006d98: c2 06 00 00 ld [ %i0 ], %g1 2006d9c: c8 16 20 04 lduh [ %i0 + 4 ], %g4 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 2006da0: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006da4: 89 29 20 1b sll %g4, 0x1b, %g4 2006da8: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006dac: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006db0: 87 30 e0 10 srl %g3, 0x10, %g3 2006db4: 05 00 00 40 sethi %hi(0x10000), %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 2006db8: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006dbc: 83 28 60 18 sll %g1, 0x18, %g1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 2006dc0: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2006dc4: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006dc8: ee 26 20 34 st %l7, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006dcc: 82 10 40 04 or %g1, %g4, %g1 2006dd0: 82 10 40 03 or %g1, %g3, %g1 2006dd4: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006dd8: 7f ff eb f7 call 2001db4 2006ddc: 01 00 00 00 nop if ( old_tables ) 2006de0: 80 a4 20 00 cmp %l0, 0 2006de4: 22 80 00 05 be,a 2006df8 <_Objects_Extend_information+0x13c> 2006de8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 2006dec: 40 00 08 ea call 2009194 <_Workspace_Free> 2006df0: 90 10 00 10 mov %l0, %o0 2006df4: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 2006df8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006dfc: 80 a0 60 00 cmp %g1, 0 2006e00: 02 80 00 55 be 2006f54 <_Objects_Extend_information+0x298> 2006e04: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 2006e08: 90 10 00 10 mov %l0, %o0 2006e0c: 40 00 35 9b call 2014478 <.umul> 2006e10: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006e14: 40 00 08 e7 call 20091b0 <_Workspace_Allocate> 2006e18: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006e1c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 2006e20: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006e24: d2 00 40 14 ld [ %g1 + %l4 ], %o1 2006e28: 80 a2 60 00 cmp %o1, 0 2006e2c: 02 80 00 64 be 2006fbc <_Objects_Extend_information+0x300> 2006e30: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e34: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2006e38: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e3c: a0 10 00 13 mov %l3, %l0 2006e40: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e44: a6 07 bf ec add %fp, -20, %l3 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006e48: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e4c: 40 00 14 49 call 200bf70 <_Chain_Initialize> 2006e50: 90 10 00 13 mov %l3, %o0 2006e54: 30 80 00 0c b,a 2006e84 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006e58: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2006e5c: 83 28 60 18 sll %g1, 0x18, %g1 2006e60: 85 28 a0 1b sll %g2, 0x1b, %g2 2006e64: 82 10 40 12 or %g1, %l2, %g1 2006e68: 82 10 40 02 or %g1, %g2, %g1 2006e6c: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e70: 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( 2006e74: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2006e78: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e7c: 7f ff fd 2f call 2006338 <_Chain_Append> 2006e80: 90 10 00 11 mov %l1, %o0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 2006e84: 40 00 14 28 call 200bf24 <_Chain_Get> 2006e88: 90 10 00 13 mov %l3, %o0 2006e8c: 80 a2 20 00 cmp %o0, 0 2006e90: 32 bf ff f2 bne,a 2006e58 <_Objects_Extend_information+0x19c> 2006e94: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006e98: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2006e9c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 2006ea0: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006ea4: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 2006ea8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006eac: 82 00 40 04 add %g1, %g4, %g1 2006eb0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006eb4: 81 c7 e0 08 ret 2006eb8: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006ebc: 90 10 00 15 mov %l5, %o0 2006ec0: 40 00 35 a8 call 2014560 <.udiv> 2006ec4: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 2006ec8: a4 92 20 00 orcc %o0, 0, %l2 2006ecc: 02 80 00 3e be 2006fc4 <_Objects_Extend_information+0x308> 2006ed0: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 2006ed4: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 2006ed8: c2 00 80 00 ld [ %g2 ], %g1 2006edc: 80 a0 60 00 cmp %g1, 0 2006ee0: 12 80 00 08 bne 2006f00 <_Objects_Extend_information+0x244> 2006ee4: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2006ee8: 10 80 00 0c b 2006f18 <_Objects_Extend_information+0x25c> <== NOT EXECUTED 2006eec: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 2006ef0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2006ef4: 80 a0 60 00 cmp %g1, 0 2006ef8: 02 80 00 08 be 2006f18 <_Objects_Extend_information+0x25c> 2006efc: 80 a4 c0 15 cmp %l3, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2006f00: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 2006f04: a6 04 c0 10 add %l3, %l0, %l3 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2006f08: 80 a4 80 11 cmp %l2, %l1 2006f0c: 18 bf ff f9 bgu 2006ef0 <_Objects_Extend_information+0x234> 2006f10: 83 2c 60 02 sll %l1, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2006f14: 80 a4 c0 15 cmp %l3, %l5 2006f18: 2a bf ff b9 bcs,a 2006dfc <_Objects_Extend_information+0x140> 2006f1c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006f20: ac 04 a0 01 add %l2, 1, %l6 2006f24: 83 2d a0 01 sll %l6, 1, %g1 2006f28: 10 bf ff 73 b 2006cf4 <_Objects_Extend_information+0x38> 2006f2c: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 2006f30: 90 02 00 14 add %o0, %l4, %o0 2006f34: 90 02 00 1d add %o0, %i5, %o0 2006f38: 40 00 08 9e call 20091b0 <_Workspace_Allocate> 2006f3c: 91 2a 20 02 sll %o0, 2, %o0 block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 2006f40: ae 92 20 00 orcc %o0, 0, %l7 2006f44: 32 bf ff 76 bne,a 2006d1c <_Objects_Extend_information+0x60> 2006f48: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006f4c: 81 c7 e0 08 ret <== NOT EXECUTED 2006f50: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 2006f54: 90 10 00 10 mov %l0, %o0 2006f58: 40 00 35 48 call 2014478 <.umul> 2006f5c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006f60: 40 00 08 9b call 20091cc <_Workspace_Allocate_or_fatal_error> 2006f64: a9 2c 60 02 sll %l1, 2, %l4 2006f68: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006f6c: d0 24 00 14 st %o0, [ %l0 + %l4 ] 2006f70: 10 bf ff b1 b 2006e34 <_Objects_Extend_information+0x178> 2006f74: d2 00 40 14 ld [ %g1 + %l4 ], %o1 /* * 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, 2006f78: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 2006f7c: ab 2c a0 02 sll %l2, 2, %l5 2006f80: 90 10 00 17 mov %l7, %o0 2006f84: 40 00 1c 9e call 200e1fc 2006f88: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006f8c: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2006f90: 94 10 00 15 mov %l5, %o2 2006f94: 40 00 1c 9a call 200e1fc 2006f98: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006f9c: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 2006fa0: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006fa4: 94 05 00 0a add %l4, %o2, %o2 2006fa8: 90 10 00 10 mov %l0, %o0 2006fac: 40 00 1c 94 call 200e1fc 2006fb0: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 2006fb4: 10 bf ff 6a b 2006d5c <_Objects_Extend_information+0xa0> 2006fb8: c0 25 80 15 clr [ %l6 + %l5 ] 2006fbc: 81 c7 e0 08 ret <== NOT EXECUTED 2006fc0: 81 e8 00 00 restore <== NOT EXECUTED if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2006fc4: 10 bf ff d4 b 2006f14 <_Objects_Extend_information+0x258> <== NOT EXECUTED 2006fc8: a2 10 20 00 clr %l1 <== NOT EXECUTED 0200707c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 200707c: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 2007080: 82 06 3f ff add %i0, -1, %g1 2007084: 80 a0 60 03 cmp %g1, 3 2007088: 38 80 00 1e bgu,a 2007100 <_Objects_Get_information+0x84> 200708c: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2007090: 80 a6 60 00 cmp %i1, 0 2007094: 12 80 00 04 bne 20070a4 <_Objects_Get_information+0x28> 2007098: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 200709c: 81 c7 e0 08 ret 20070a0: 91 e8 20 00 restore %g0, 0, %o0 return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 20070a4: 40 00 14 fb call 200c490 <_Objects_API_maximum_class> 20070a8: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 20070ac: 80 a2 20 00 cmp %o0, 0 20070b0: 06 bf ff fb bl 200709c <_Objects_Get_information+0x20> 20070b4: 80 a2 00 19 cmp %o0, %i1 20070b8: 2a 80 00 12 bcs,a 2007100 <_Objects_Get_information+0x84> 20070bc: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 20070c0: 85 2e 20 02 sll %i0, 2, %g2 20070c4: 03 00 80 60 sethi %hi(0x2018000), %g1 20070c8: 82 10 61 30 or %g1, 0x130, %g1 ! 2018130 <_Objects_Information_table> 20070cc: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20070d0: 80 a0 a0 00 cmp %g2, 0 20070d4: 02 80 00 0b be 2007100 <_Objects_Get_information+0x84> 20070d8: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20070dc: 83 2e 60 02 sll %i1, 2, %g1 20070e0: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 20070e4: 80 a6 20 00 cmp %i0, 0 20070e8: 02 80 00 06 be 2007100 <_Objects_Get_information+0x84> 20070ec: 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 ) 20070f0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20070f4: 80 a0 60 00 cmp %g1, 0 20070f8: 22 80 00 02 be,a 2007100 <_Objects_Get_information+0x84> 20070fc: b0 10 20 00 clr %i0 return NULL; #endif return info; } 2007100: 81 c7 e0 08 ret 2007104: 81 e8 00 00 restore 020183b0 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 20183b0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 20183b4: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 20183b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 20183bc: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 20183c0: 22 80 00 02 be,a 20183c8 <_Objects_Get_next+0x18> <== NOT EXECUTED 20183c4: f2 06 20 08 ld [ %i0 + 8 ], %i1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 20183c8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 20183cc: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 20183d0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 20183d4: 82 0e 40 10 and %i1, %l0, %g1 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 20183d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20183dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 20183e0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20183e4: 0a 80 00 0b bcs 2018410 <_Objects_Get_next+0x60> <== NOT EXECUTED 20183e8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 20183ec: 7f ff d4 e9 call 200d790 <_Objects_Get> <== NOT EXECUTED 20183f0: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 20183f4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 20183f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20183fc: 32 bf ff f6 bne,a 20183d4 <_Objects_Get_next+0x24> <== NOT EXECUTED 2018400: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 2018404: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2018408: 81 c7 e0 08 ret <== NOT EXECUTED 201840c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 2018410: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2018414: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 2018418: 90 10 20 00 clr %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 201841c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2018420: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 2018424: 81 c7 e0 08 ret <== NOT EXECUTED 2018428: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02008480 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008480: 9d e3 bf 90 save %sp, -112, %sp 2008484: 92 10 00 18 mov %i0, %o1 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 2008488: 80 a6 60 00 cmp %i1, 0 200848c: 02 80 00 24 be 200851c <_Objects_Id_to_name+0x9c> 2008490: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2008494: 80 a2 60 00 cmp %o1, 0 2008498: 02 80 00 26 be 2008530 <_Objects_Id_to_name+0xb0> 200849c: 03 00 80 72 sethi %hi(0x201c800), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 20084a0: 83 32 60 18 srl %o1, 0x18, %g1 20084a4: 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 ) 20084a8: 84 00 7f ff add %g1, -1, %g2 20084ac: 80 a0 a0 03 cmp %g2, 3 20084b0: 38 80 00 1b bgu,a 200851c <_Objects_Id_to_name+0x9c> 20084b4: b0 10 20 03 mov 3, %i0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 20084b8: 85 28 60 02 sll %g1, 2, %g2 20084bc: 03 00 80 71 sethi %hi(0x201c400), %g1 20084c0: 82 10 63 50 or %g1, 0x350, %g1 ! 201c750 <_Objects_Information_table> 20084c4: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20084c8: 80 a0 a0 00 cmp %g2, 0 20084cc: 02 80 00 16 be 2008524 <_Objects_Id_to_name+0xa4> 20084d0: 83 32 60 1b srl %o1, 0x1b, %g1 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 20084d4: 83 28 60 02 sll %g1, 2, %g1 20084d8: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 20084dc: 80 a2 20 00 cmp %o0, 0 20084e0: 02 80 00 0f be 200851c <_Objects_Id_to_name+0x9c> 20084e4: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 20084e8: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 20084ec: 80 a0 60 00 cmp %g1, 0 20084f0: 12 80 00 0e bne 2008528 <_Objects_Id_to_name+0xa8> 20084f4: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 20084f8: 7f ff ff c5 call 200840c <_Objects_Get> 20084fc: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 2008500: 80 a2 20 00 cmp %o0, 0 2008504: 22 80 00 06 be,a 200851c <_Objects_Id_to_name+0x9c> 2008508: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 200850c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 2008510: b0 10 20 00 clr %i0 2008514: 40 00 02 77 call 2008ef0 <_Thread_Enable_dispatch> 2008518: c2 26 40 00 st %g1, [ %i1 ] 200851c: 81 c7 e0 08 ret 2008520: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008524: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 2008528: 81 c7 e0 08 ret <== NOT EXECUTED 200852c: 81 e8 00 00 restore <== NOT EXECUTED Objects_Locations ignored_location; if ( !name ) return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2008530: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2 2008534: d2 00 a0 08 ld [ %g2 + 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); 2008538: 83 32 60 18 srl %o1, 0x18, %g1 200853c: 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 ) 2008540: 84 00 7f ff add %g1, -1, %g2 2008544: 80 a0 a0 03 cmp %g2, 3 2008548: 38 bf ff f5 bgu,a 200851c <_Objects_Id_to_name+0x9c> 200854c: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 2008550: 10 bf ff db b 20084bc <_Objects_Id_to_name+0x3c> 2008554: 85 28 60 02 sll %g1, 2, %g2 02012ab0 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 2012ab0: 9d e3 bf 98 save %sp, -104, %sp 2012ab4: a8 10 00 18 mov %i0, %l4 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 2012ab8: 80 a6 a0 00 cmp %i2, 0 2012abc: 02 80 00 1d be 2012b30 <_Objects_Name_to_id_string+0x80> 2012ac0: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 2012ac4: 80 a6 60 00 cmp %i1, 0 2012ac8: 22 80 00 1a be,a 2012b30 <_Objects_Name_to_id_string+0x80> 2012acc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 2012ad0: e6 15 20 10 lduh [ %l4 + 0x10 ], %l3 2012ad4: 80 a4 e0 00 cmp %l3, 0 2012ad8: 22 80 00 16 be,a 2012b30 <_Objects_Name_to_id_string+0x80> 2012adc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2012ae0: e4 05 20 1c ld [ %l4 + 0x1c ], %l2 2012ae4: a0 10 20 01 mov 1, %l0 the_object = information->local_table[ index ]; 2012ae8: 83 2c 20 02 sll %l0, 2, %g1 2012aec: e2 04 80 01 ld [ %l2 + %g1 ], %l1 if ( !the_object ) 2012af0: 80 a4 60 00 cmp %l1, 0 2012af4: 02 80 00 0b be 2012b20 <_Objects_Name_to_id_string+0x70> 2012af8: a0 04 20 01 inc %l0 continue; if ( !the_object->name.name_p ) 2012afc: d2 04 60 0c ld [ %l1 + 0xc ], %o1 2012b00: 80 a2 60 00 cmp %o1, 0 2012b04: 02 80 00 07 be 2012b20 <_Objects_Name_to_id_string+0x70> 2012b08: 90 10 00 19 mov %i1, %o0 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 2012b0c: 40 00 0c e5 call 2015ea0 2012b10: d4 15 20 3a lduh [ %l4 + 0x3a ], %o2 2012b14: 80 a2 20 00 cmp %o0, 0 2012b18: 22 80 00 08 be,a 2012b38 <_Objects_Name_to_id_string+0x88> 2012b1c: c2 04 60 08 ld [ %l1 + 8 ], %g1 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2012b20: 80 a4 00 13 cmp %l0, %l3 2012b24: 08 bf ff f2 bleu 2012aec <_Objects_Name_to_id_string+0x3c> 2012b28: 83 2c 20 02 sll %l0, 2, %g1 2012b2c: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 2012b30: 81 c7 e0 08 ret 2012b34: 81 e8 00 00 restore if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 2012b38: c2 26 80 00 st %g1, [ %i2 ] 2012b3c: 81 c7 e0 08 ret 2012b40: 91 e8 20 00 restore %g0, 0, %o0 02007300 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 2007300: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 2007304: 80 a2 e0 00 cmp %o3, 0 2007308: 02 80 00 20 be 2007388 <_Objects_Name_to_id_u32+0x88> 200730c: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 2007310: 80 a2 60 00 cmp %o1, 0 2007314: 22 80 00 1d be,a 2007388 <_Objects_Name_to_id_u32+0x88> 2007318: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 200731c: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 2007320: 85 28 60 10 sll %g1, 0x10, %g2 2007324: 80 a0 a0 00 cmp %g2, 0 2007328: 22 80 00 18 be,a 2007388 <_Objects_Name_to_id_u32+0x88> 200732c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2007330: 80 a2 a0 00 cmp %o2, 0 2007334: 12 80 00 17 bne 2007390 <_Objects_Name_to_id_u32+0x90> 2007338: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 200733c: 89 30 a0 10 srl %g2, 0x10, %g4 2007340: 80 a1 20 00 cmp %g4, 0 2007344: 02 80 00 11 be 2007388 <_Objects_Name_to_id_u32+0x88> 2007348: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 200734c: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 2007350: 86 10 20 01 mov 1, %g3 if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 2007354: 83 28 e0 02 sll %g3, 2, %g1 2007358: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 200735c: 80 a0 a0 00 cmp %g2, 0 2007360: 02 80 00 06 be 2007378 <_Objects_Name_to_id_u32+0x78> 2007364: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 2007368: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200736c: 80 a0 40 09 cmp %g1, %o1 2007370: 22 80 00 0f be,a 20073ac <_Objects_Name_to_id_u32+0xac> 2007374: c2 00 a0 08 ld [ %g2 + 8 ], %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2007378: 80 a0 c0 04 cmp %g3, %g4 200737c: 08 bf ff f7 bleu 2007358 <_Objects_Name_to_id_u32+0x58> 2007380: 83 28 e0 02 sll %g3, 2, %g1 2007384: 90 10 20 01 mov 1, %o0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 2007388: 81 c3 e0 08 retl 200738c: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2007390: 82 10 63 ff or %g1, 0x3ff, %g1 2007394: 80 a2 80 01 cmp %o2, %g1 2007398: 02 bf ff e9 be 200733c <_Objects_Name_to_id_u32+0x3c> 200739c: 80 a2 a0 01 cmp %o2, 1 20073a0: 02 bf ff e7 be 200733c <_Objects_Name_to_id_u32+0x3c> 20073a4: 90 10 20 01 mov 1, %o0 20073a8: 30 bf ff f8 b,a 2007388 <_Objects_Name_to_id_u32+0x88> the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 20073ac: 90 10 20 00 clr %o0 20073b0: 81 c3 e0 08 retl 20073b4: c2 22 c0 00 st %g1, [ %o3 ] 020073c0 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 20073c0: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 20073c4: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 20073c8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 20073cc: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 20073d0: 03 00 00 3f sethi %hi(0xfc00), %g1 20073d4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20073d8: 92 10 00 10 mov %l0, %o1 20073dc: a4 08 80 01 and %g2, %g1, %l2 20073e0: 40 00 34 60 call 2014560 <.udiv> 20073e4: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 20073e8: 80 a2 20 00 cmp %o0, 0 20073ec: 02 80 00 12 be 2007434 <_Objects_Shrink_information+0x74> 20073f0: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 20073f4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 20073f8: c2 00 c0 00 ld [ %g3 ], %g1 20073fc: 80 a4 00 01 cmp %l0, %g1 2007400: 12 80 00 09 bne 2007424 <_Objects_Shrink_information+0x64> 2007404: a2 10 20 04 mov 4, %l1 2007408: 10 80 00 0d b 200743c <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 200740c: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 2007410: a4 04 80 10 add %l2, %l0, %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++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 2007414: 80 a4 00 01 cmp %l0, %g1 2007418: 02 80 00 09 be 200743c <_Objects_Shrink_information+0x7c> 200741c: 82 04 60 04 add %l1, 4, %g1 2007420: a2 10 00 01 mov %g1, %l1 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2007424: 84 00 a0 01 inc %g2 2007428: 80 a2 00 02 cmp %o0, %g2 200742c: 38 bf ff f9 bgu,a 2007410 <_Objects_Shrink_information+0x50> 2007430: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 2007434: 81 c7 e0 08 ret 2007438: 81 e8 00 00 restore 200743c: 03 00 00 3f sethi %hi(0xfc00), %g1 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 2007440: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2007444: 10 80 00 0f b 2007480 <_Objects_Shrink_information+0xc0> 2007448: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 200744c: 82 04 80 01 add %l2, %g1, %g1 2007450: 80 a0 40 03 cmp %g1, %g3 2007454: 08 80 00 10 bleu 2007494 <_Objects_Shrink_information+0xd4> 2007458: 90 10 00 02 mov %g2, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 200745c: 40 00 12 a8 call 200befc <_Chain_Extract> 2007460: e0 00 80 00 ld [ %g2 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2007464: 80 a4 20 00 cmp %l0, 0 2007468: 22 80 00 10 be,a 20074a8 <_Objects_Shrink_information+0xe8> 200746c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2007470: c2 04 00 00 ld [ %l0 ], %g1 2007474: 80 a0 60 00 cmp %g1, 0 2007478: 02 80 00 0b be 20074a4 <_Objects_Shrink_information+0xe4> 200747c: 84 10 00 10 mov %l0, %g2 2007480: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007484: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 2007488: 80 a0 c0 12 cmp %g3, %l2 200748c: 3a bf ff f0 bcc,a 200744c <_Objects_Shrink_information+0x8c> 2007490: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 2007494: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2007498: 80 a4 20 00 cmp %l0, 0 200749c: 32 bf ff f6 bne,a 2007474 <_Objects_Shrink_information+0xb4> 20074a0: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 20074a4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20074a8: 40 00 07 3b call 2009194 <_Workspace_Free> 20074ac: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 20074b0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 20074b4: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 20074b8: c0 20 80 11 clr [ %g2 + %l1 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 20074bc: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 20074c0: c4 06 20 14 ld [ %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; 20074c4: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 20074c8: 82 20 40 02 sub %g1, %g2, %g1 20074cc: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 20074d0: 81 c7 e0 08 ret 20074d4: 81 e8 00 00 restore 0200600c <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 200600c: 9d e3 bf 98 save %sp, -104, %sp /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; 2006010: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 2006014: 80 a6 20 00 cmp %i0, 0 2006018: 02 80 00 1f be 2006094 <_POSIX_API_Initialize+0x88> 200601c: 03 00 80 59 sethi %hi(0x2016400), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 2006020: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 2006024: 05 00 80 60 sethi %hi(0x2018000), %g2 2006028: 03 00 80 61 sethi %hi(0x2018400), %g1 200602c: 82 10 62 a4 or %g1, 0x2a4, %g1 ! 20186a4 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 2006030: 40 00 15 05 call 200b444 <_POSIX_signals_Manager_Initialization> 2006034: c2 20 a1 3c st %g1, [ %g2 + 0x13c ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 2006038: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 200603c: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 2006040: 40 00 15 8d call 200b674 <_POSIX_Threads_Manager_initialization> 2006044: d0 06 00 00 ld [ %i0 ], %o0 api_configuration->maximum_threads, api_configuration->number_of_initialization_threads, api_configuration->User_initialization_threads_table ); _POSIX_Condition_variables_Manager_initialization( 2006048: 40 00 14 a8 call 200b2e8 <_POSIX_Condition_variables_Manager_initialization> 200604c: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 2006050: 40 00 14 b3 call 200b31c <_POSIX_Key_Manager_initialization> 2006054: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 2006058: 40 00 14 d4 call 200b3a8 <_POSIX_Mutex_Manager_initialization> 200605c: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 2006060: 40 00 14 bc call 200b350 <_POSIX_Message_queue_Manager_initialization> 2006064: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 2006068: 40 00 16 4a call 200b990 <_POSIX_Semaphore_Manager_initialization> 200606c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 2006070: 40 00 16 3b call 200b95c <_POSIX_Timer_Manager_initialization> 2006074: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 2006078: 40 00 14 d9 call 200b3dc <_POSIX_Barrier_Manager_initialization> 200607c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 2006080: 40 00 14 e4 call 200b410 <_POSIX_RWLock_Manager_initialization> 2006084: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 2006088: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 200608c: 40 00 15 63 call 200b618 <_POSIX_Spinlock_Manager_initialization> 2006090: 81 e8 00 00 restore /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) 2006094: 10 bf ff e3 b 2006020 <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 2006098: b0 10 62 20 or %g1, 0x220, %i0 <== NOT EXECUTED 02006180 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 2006180: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 2006184: 80 a6 20 00 cmp %i0, 0 2006188: 02 80 00 12 be 20061d0 <_POSIX_Condition_variables_Get+0x50> 200618c: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 2006190: f2 06 00 00 ld [ %i0 ], %i1 2006194: 80 a6 7f ff cmp %i1, -1 2006198: 02 80 00 05 be 20061ac <_POSIX_Condition_variables_Get+0x2c> 200619c: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 20061a0: 31 00 80 5e sethi %hi(0x2017800), %i0 20061a4: 40 00 0c 52 call 20092ec <_Objects_Get> 20061a8: 91 ee 21 04 restore %i0, 0x104, %o0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 20061ac: 40 00 00 0d call 20061e0 <== NOT EXECUTED 20061b0: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 20061b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20061b8: 12 80 00 07 bne 20061d4 <_POSIX_Condition_variables_Get+0x54> <== NOT EXECUTED 20061bc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20061c0: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 20061c4: 31 00 80 5e sethi %hi(0x2017800), %i0 <== NOT EXECUTED 20061c8: 40 00 0c 49 call 20092ec <_Objects_Get> <== NOT EXECUTED 20061cc: 91 ee 21 04 restore %i0, 0x104, %o0 <== NOT EXECUTED * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); if ( status ) { *location = OBJECTS_ERROR; 20061d0: 82 10 20 01 mov 1, %g1 20061d4: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 20061d8: 81 c7 e0 08 ret 20061dc: 91 e8 20 00 restore %g0, 0, %o0 02006398 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 2006398: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 200639c: a0 07 bf f4 add %fp, -12, %l0 20063a0: 90 10 00 19 mov %i1, %o0 20063a4: 40 00 00 7f call 20065a0 <_POSIX_Mutex_Get> 20063a8: 92 10 00 10 mov %l0, %o1 20063ac: 80 a2 20 00 cmp %o0, 0 20063b0: 22 80 00 18 be,a 2006410 <_POSIX_Condition_variables_Wait_support+0x78> 20063b4: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20063b8: 03 00 80 5d sethi %hi(0x2017400), %g1 20063bc: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 2017470 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 20063c0: 92 10 00 10 mov %l0, %o1 20063c4: 84 00 bf ff add %g2, -1, %g2 20063c8: 90 10 00 18 mov %i0, %o0 20063cc: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 20063d0: 7f ff ff 6c call 2006180 <_POSIX_Condition_variables_Get> 20063d4: 01 00 00 00 nop switch ( location ) { 20063d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20063dc: 80 a0 60 00 cmp %g1, 0 20063e0: 12 80 00 1a bne 2006448 <_POSIX_Condition_variables_Wait_support+0xb0> 20063e4: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 20063e8: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 20063ec: 80 a0 a0 00 cmp %g2, 0 20063f0: 02 80 00 0a be 2006418 <_POSIX_Condition_variables_Wait_support+0x80> 20063f4: 01 00 00 00 nop 20063f8: c2 06 40 00 ld [ %i1 ], %g1 20063fc: 80 a0 80 01 cmp %g2, %g1 2006400: 02 80 00 06 be 2006418 <_POSIX_Condition_variables_Wait_support+0x80> 2006404: 01 00 00 00 nop _Thread_Enable_dispatch(); 2006408: 40 00 0e 0e call 2009c40 <_Thread_Enable_dispatch> <== NOT EXECUTED 200640c: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 2006410: 81 c7 e0 08 ret 2006414: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 2006418: 40 00 00 ff call 2006814 200641c: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 2006420: 80 8e e0 ff btst 0xff, %i3 2006424: 22 80 00 0b be,a 2006450 <_POSIX_Condition_variables_Wait_support+0xb8> 2006428: c2 06 40 00 ld [ %i1 ], %g1 status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 200642c: 40 00 0e 05 call 2009c40 <_Thread_Enable_dispatch> 2006430: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 2006434: 40 00 00 d7 call 2006790 2006438: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 200643c: 80 a2 20 00 cmp %o0, 0 2006440: 02 80 00 1c be 20064b0 <_POSIX_Condition_variables_Wait_support+0x118> 2006444: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 2006448: 81 c7 e0 08 ret 200644c: 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; 2006450: 21 00 80 5d sethi %hi(0x2017400), %l0 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 2006454: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 2006458: c4 04 21 34 ld [ %l0 + 0x134 ], %g2 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 200645c: c8 06 00 00 ld [ %i0 ], %g4 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; 2006460: 86 04 60 18 add %l1, 0x18, %g3 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; 2006464: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 2006468: 92 10 00 1a mov %i2, %o1 200646c: 90 10 00 03 mov %g3, %o0 2006470: 15 00 80 29 sethi %hi(0x200a400), %o2 2006474: 94 12 a2 90 or %o2, 0x290, %o2 ! 200a690 <_Thread_queue_Timeout> 2006478: c2 24 60 48 st %g1, [ %l1 + 0x48 ] 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; _Thread_Executing->Wait.id = *cond; 200647c: c8 20 a0 20 st %g4, [ %g2 + 0x20 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 2006480: c0 20 a0 34 clr [ %g2 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 2006484: 40 00 0f 4d call 200a1b8 <_Thread_queue_Enqueue_with_handler> 2006488: c6 20 a0 44 st %g3, [ %g2 + 0x44 ] _Thread_Enable_dispatch(); 200648c: 40 00 0d ed call 2009c40 <_Thread_Enable_dispatch> 2006490: 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; 2006494: c2 04 21 34 ld [ %l0 + 0x134 ], %g1 2006498: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 200649c: 80 a6 20 00 cmp %i0, 0 20064a0: 02 bf ff e5 be 2006434 <_POSIX_Condition_variables_Wait_support+0x9c> 20064a4: 80 a6 20 74 cmp %i0, 0x74 20064a8: 02 bf ff e3 be 2006434 <_POSIX_Condition_variables_Wait_support+0x9c> 20064ac: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 20064b0: 81 c7 e0 08 ret 20064b4: 81 e8 00 00 restore 0200d058 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200d058: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 200d05c: 03 00 80 61 sethi %hi(0x2018400), %g1 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 200d060: c6 06 20 08 ld [ %i0 + 8 ], %g3 200d064: a4 10 62 24 or %g1, 0x224, %l2 200d068: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 200d06c: 85 30 e0 18 srl %g3, 0x18, %g2 200d070: 89 28 60 10 sll %g1, 0x10, %g4 200d074: 84 08 a0 07 and %g2, 7, %g2 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { value = the_key->Values[ thread_api ][ thread_index ]; 200d078: 03 00 00 3f sethi %hi(0xfc00), %g1 200d07c: 84 00 a0 06 add %g2, 6, %g2 200d080: 82 10 63 ff or %g1, 0x3ff, %g1 200d084: ab 28 a0 02 sll %g2, 2, %l5 200d088: 86 08 c0 01 and %g3, %g1, %g3 200d08c: a8 10 20 00 clr %l4 200d090: a7 28 e0 02 sll %g3, 2, %l3 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200d094: 80 a1 20 00 cmp %g4, 0 200d098: 02 80 00 29 be 200d13c <_POSIX_Keys_Run_destructors+0xe4> 200d09c: a0 10 20 01 mov 1, %l0 200d0a0: a2 10 20 01 mov 1, %l1 the_key = (POSIX_Keys_Control *) 200d0a4: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 200d0a8: 83 2c 20 02 sll %l0, 2, %g1 200d0ac: f0 00 80 01 ld [ %g2 + %g1 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 200d0b0: 80 a6 20 00 cmp %i0, 0 200d0b4: 02 80 00 16 be 200d10c <_POSIX_Keys_Run_destructors+0xb4> 200d0b8: a0 04 20 01 inc %l0 200d0bc: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 200d0c0: 80 a0 60 00 cmp %g1, 0 200d0c4: 22 80 00 13 be,a 200d110 <_POSIX_Keys_Run_destructors+0xb8> 200d0c8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED 200d0cc: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200d0d0: 80 a0 e0 00 cmp %g3, 0 200d0d4: 22 80 00 0f be,a 200d110 <_POSIX_Keys_Run_destructors+0xb8> 200d0d8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 200d0dc: c2 06 00 15 ld [ %i0 + %l5 ], %g1 200d0e0: c4 00 40 13 ld [ %g1 + %l3 ], %g2 if ( value ) { 200d0e4: 90 90 a0 00 orcc %g2, 0, %o0 200d0e8: 22 80 00 0a be,a 200d110 <_POSIX_Keys_Run_destructors+0xb8> 200d0ec: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 200d0f0: 9f c0 c0 00 call %g3 200d0f4: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 200d0f8: c2 06 00 15 ld [ %i0 + %l5 ], %g1 200d0fc: c4 00 40 13 ld [ %g1 + %l3 ], %g2 200d100: 80 a0 00 02 cmp %g0, %g2 200d104: 82 40 3f ff addx %g0, -1, %g1 200d108: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200d10c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 200d110: 89 28 60 10 sll %g1, 0x10, %g4 200d114: 83 31 20 10 srl %g4, 0x10, %g1 200d118: 80 a0 40 10 cmp %g1, %l0 200d11c: 3a bf ff e3 bcc,a 200d0a8 <_POSIX_Keys_Run_destructors+0x50> 200d120: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 200d124: 80 8c 60 ff btst 0xff, %l1 200d128: 12 80 00 05 bne 200d13c <_POSIX_Keys_Run_destructors+0xe4> 200d12c: a8 05 20 01 inc %l4 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 200d130: 80 a5 20 04 cmp %l4, 4 200d134: 12 bf ff d9 bne 200d098 <_POSIX_Keys_Run_destructors+0x40> 200d138: 80 a1 20 00 cmp %g4, 0 200d13c: 81 c7 e0 08 ret 200d140: 81 e8 00 00 restore 020115c0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20115c0: 9d e3 bf 98 save %sp, -104, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 20115c4: 92 10 20 ff mov 0xff, %o1 20115c8: 90 10 00 18 mov %i0, %o0 20115cc: 40 00 12 c5 call 20160e0 20115d0: a8 10 00 18 mov %i0, %l4 if ( n > NAME_MAX ) 20115d4: b0 10 20 5b mov 0x5b, %i0 20115d8: 80 a2 20 ff cmp %o0, 0xff 20115dc: 18 80 00 37 bgu 20116b8 <_POSIX_Message_queue_Create_support+0xf8> 20115e0: a4 10 00 08 mov %o0, %l2 20115e4: 05 00 80 8a sethi %hi(0x2022800), %g2 20115e8: c2 00 a1 c0 ld [ %g2 + 0x1c0 ], %g1 ! 20229c0 <_Thread_Dispatch_disable_level> 20115ec: 82 00 60 01 inc %g1 20115f0: c2 20 a1 c0 st %g1, [ %g2 + 0x1c0 ] * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 20115f4: 80 a6 a0 00 cmp %i2, 0 20115f8: 22 80 00 32 be,a 20116c0 <_POSIX_Message_queue_Create_support+0x100> 20115fc: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 2011600: e2 06 a0 04 ld [ %i2 + 4 ], %l1 2011604: 80 a4 60 00 cmp %l1, 0 2011608: 04 80 00 3d ble 20116fc <_POSIX_Message_queue_Create_support+0x13c> 201160c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 2011610: f4 06 a0 08 ld [ %i2 + 8 ], %i2 2011614: 80 a6 a0 00 cmp %i2, 0 2011618: 04 80 00 39 ble 20116fc <_POSIX_Message_queue_Create_support+0x13c> 201161c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 2011620: 27 00 80 8b sethi %hi(0x2022c00), %l3 2011624: 7f ff ed 80 call 200cc24 <_Objects_Allocate> 2011628: 90 14 e1 50 or %l3, 0x150, %o0 ! 2022d50 <_POSIX_Message_queue_Information> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 201162c: a0 92 20 00 orcc %o0, 0, %l0 2011630: 02 80 00 3b be 201171c <_POSIX_Message_queue_Create_support+0x15c> 2011634: 84 10 20 01 mov 1, %g2 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 2011638: 82 10 20 01 mov 1, %g1 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 201163c: f2 24 20 10 st %i1, [ %l0 + 0x10 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 2011640: 90 10 00 12 mov %l2, %o0 } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 2011644: c4 2c 20 15 stb %g2, [ %l0 + 0x15 ] rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; 2011648: c4 24 20 18 st %g2, [ %l0 + 0x18 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 201164c: 7f ff f7 38 call 200f32c <_Workspace_Allocate> 2011650: c2 2c 20 14 stb %g1, [ %l0 + 0x14 ] if (!name) { 2011654: b2 92 20 00 orcc %o0, 0, %i1 2011658: 22 80 00 39 be,a 201173c <_POSIX_Message_queue_Create_support+0x17c> 201165c: 90 14 e1 50 or %l3, 0x150, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 2011660: 40 00 10 35 call 2015734 2011664: 92 10 00 14 mov %l4, %o1 */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 2011668: 94 10 00 11 mov %l1, %o2 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 201166c: c0 24 20 5c clr [ %l0 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 2011670: 96 10 00 1a mov %i2, %o3 2011674: 90 04 20 1c add %l0, 0x1c, %o0 2011678: 40 00 03 80 call 2012478 <_CORE_message_queue_Initialize> 201167c: 92 04 20 5c add %l0, 0x5c, %o1 2011680: 80 8a 20 ff btst 0xff, %o0 2011684: 02 80 00 11 be 20116c8 <_POSIX_Message_queue_Create_support+0x108> 2011688: 82 14 e1 50 or %l3, 0x150, %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 201168c: c4 04 20 08 ld [ %l0 + 8 ], %g2 2011690: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2011694: 03 00 00 3f sethi %hi(0xfc00), %g1 2011698: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 201169c: 84 08 80 01 and %g2, %g1, %g2 20116a0: 85 28 a0 02 sll %g2, 2, %g2 20116a4: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 20116a8: f2 24 20 0c st %i1, [ %l0 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 20116ac: e0 26 c0 00 st %l0, [ %i3 ] _Thread_Enable_dispatch(); 20116b0: 7f ff f1 46 call 200dbc8 <_Thread_Enable_dispatch> 20116b4: b0 10 20 00 clr %i0 return 0; } 20116b8: 81 c7 e0 08 ret 20116bc: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 20116c0: 10 bf ff d8 b 2011620 <_POSIX_Message_queue_Create_support+0x60> 20116c4: a2 10 20 0a mov 0xa, %l1 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 20116c8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20116cc: 7f ff ee 51 call 200d010 <_Objects_Free> <== NOT EXECUTED 20116d0: 90 14 e1 50 or %l3, 0x150, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 20116d4: 7f ff f7 0f call 200f310 <_Workspace_Free> <== NOT EXECUTED 20116d8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 20116dc: 7f ff f1 3b call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 20116e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 20116e4: 40 00 0a e0 call 2014264 <__errno> <== NOT EXECUTED 20116e8: 01 00 00 00 nop <== NOT EXECUTED 20116ec: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 20116f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20116f4: 81 c7 e0 08 ret <== NOT EXECUTED 20116f8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 20116fc: 7f ff f1 33 call 200dbc8 <_Thread_Enable_dispatch> 2011700: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 2011704: 40 00 0a d8 call 2014264 <__errno> 2011708: 01 00 00 00 nop 201170c: 82 10 20 16 mov 0x16, %g1 ! 16 2011710: c2 22 00 00 st %g1, [ %o0 ] 2011714: 81 c7 e0 08 ret 2011718: 81 e8 00 00 restore attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 201171c: 7f ff f1 2b call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011720: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 2011724: 40 00 0a d0 call 2014264 <__errno> <== NOT EXECUTED 2011728: 01 00 00 00 nop <== NOT EXECUTED 201172c: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED 2011730: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011734: 81 c7 e0 08 ret <== NOT EXECUTED 2011738: 81 e8 00 00 restore <== NOT EXECUTED 201173c: 7f ff ee 35 call 200d010 <_Objects_Free> <== NOT EXECUTED 2011740: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 2011744: 7f ff f1 21 call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011748: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 201174c: 40 00 0a c6 call 2014264 <__errno> <== NOT EXECUTED 2011750: 01 00 00 00 nop <== NOT EXECUTED 2011754: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2011758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201175c: 81 c7 e0 08 ret <== NOT EXECUTED 2011760: 81 e8 00 00 restore <== NOT EXECUTED 020096c4 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 20096c4: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 20096c8: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 20096cc: 80 a0 60 00 cmp %g1, 0 20096d0: 12 80 00 16 bne 2009728 <_POSIX_Message_queue_Delete+0x64> 20096d4: b2 10 00 18 mov %i0, %i1 20096d8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20096dc: 80 a0 60 00 cmp %g1, 0 20096e0: 12 80 00 12 bne 2009728 <_POSIX_Message_queue_Delete+0x64> 20096e4: 01 00 00 00 nop /* the name memory may have been freed by unlink. */ Objects_Control *the_object = &the_mq->Object; if ( the_object->name.name_p ) 20096e8: d0 06 20 0c ld [ %i0 + 0xc ], %o0 20096ec: 80 a2 20 00 cmp %o0, 0 20096f0: 02 80 00 04 be 2009700 <_POSIX_Message_queue_Delete+0x3c> 20096f4: 31 00 80 8b sethi %hi(0x2022c00), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 20096f8: 40 00 17 06 call 200f310 <_Workspace_Free> <== NOT EXECUTED 20096fc: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 2009700: 92 10 00 19 mov %i1, %o1 2009704: 40 00 0d 74 call 200ccd4 <_Objects_Close> 2009708: 90 16 21 50 or %i0, 0x150, %o0 _CORE_message_queue_Close( 200970c: 90 06 60 1c add %i1, 0x1c, %o0 2009710: 92 10 20 00 clr %o1 2009714: 94 10 20 05 mov 5, %o2 2009718: 40 00 0a 5c call 200c088 <_CORE_message_queue_Close> 200971c: b0 16 21 50 or %i0, 0x150, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 2009720: 40 00 0e 3c call 200d010 <_Objects_Free> 2009724: 81 e8 00 00 restore 2009728: 81 c7 e0 08 ret 200972c: 81 e8 00 00 restore 02009c20 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 2009c20: 9d e3 bf 88 save %sp, -120, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 2009c24: 80 a6 e0 20 cmp %i3, 0x20 2009c28: 18 80 00 47 bgu 2009d44 <_POSIX_Message_queue_Send_support+0x124> 2009c2c: 11 00 80 8b sethi %hi(0x2022c00), %o0 2009c30: 92 10 00 18 mov %i0, %o1 2009c34: 90 12 22 cc or %o0, 0x2cc, %o0 2009c38: 40 00 0d 63 call 200d1c4 <_Objects_Get> 2009c3c: 94 07 bf f4 add %fp, -12, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 2009c40: c2 07 bf f4 ld [ %fp + -12 ], %g1 2009c44: 80 a0 60 00 cmp %g1, 0 2009c48: 12 80 00 31 bne 2009d0c <_POSIX_Message_queue_Send_support+0xec> 2009c4c: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 2009c50: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 2009c54: 80 88 a0 03 btst 3, %g2 2009c58: 02 80 00 41 be 2009d5c <_POSIX_Message_queue_Send_support+0x13c> 2009c5c: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 2009c60: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 2009c64: 12 80 00 15 bne 2009cb8 <_POSIX_Message_queue_Send_support+0x98> 2009c68: 82 10 20 00 clr %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 2009c6c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] <== NOT EXECUTED 2009c70: fa 23 a0 60 st %i5, [ %sp + 0x60 ] <== NOT EXECUTED 2009c74: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2009c78: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 2009c7c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 2009c80: 9a 20 00 1b neg %i3, %o5 <== NOT EXECUTED 2009c84: 98 10 20 00 clr %o4 <== NOT EXECUTED 2009c88: 40 00 09 65 call 200c21c <_CORE_message_queue_Submit> <== NOT EXECUTED 2009c8c: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 2009c90: 40 00 0f ce call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2009c94: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED * 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 ) 2009c98: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 2009c9c: 02 80 00 19 be 2009d00 <_POSIX_Message_queue_Send_support+0xe0> <== NOT EXECUTED 2009ca0: 03 00 80 8a sethi %hi(0x2022800), %g1 <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 2009ca4: 80 a7 60 00 cmp %i5, 0 2009ca8: 12 80 00 1f bne 2009d24 <_POSIX_Message_queue_Send_support+0x104> 2009cac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 2009cb0: 81 c7 e0 08 ret 2009cb4: 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 ) 2009cb8: 83 30 a0 0e srl %g2, 0xe, %g1 2009cbc: 82 18 60 01 xor %g1, 1, %g1 2009cc0: 82 08 60 01 and %g1, 1, %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 2009cc4: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 2009cc8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2009ccc: 92 10 00 19 mov %i1, %o1 2009cd0: 94 10 00 1a mov %i2, %o2 2009cd4: 96 10 00 18 mov %i0, %o3 2009cd8: 9a 20 00 1b neg %i3, %o5 2009cdc: 98 10 20 00 clr %o4 2009ce0: 40 00 09 4f call 200c21c <_CORE_message_queue_Submit> 2009ce4: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 2009ce8: 40 00 0f b8 call 200dbc8 <_Thread_Enable_dispatch> 2009cec: 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 ) 2009cf0: 80 a7 60 07 cmp %i5, 7 2009cf4: 12 bf ff ed bne 2009ca8 <_POSIX_Message_queue_Send_support+0x88> 2009cf8: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 2009cfc: 03 00 80 8a sethi %hi(0x2022800), %g1 2009d00: c4 00 62 84 ld [ %g1 + 0x284 ], %g2 ! 2022a84 <_Thread_Executing> 2009d04: 10 bf ff e8 b 2009ca4 <_POSIX_Message_queue_Send_support+0x84> 2009d08: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 2009d0c: 40 00 29 56 call 2014264 <__errno> 2009d10: b0 10 3f ff mov -1, %i0 2009d14: 82 10 20 09 mov 9, %g1 2009d18: c2 22 00 00 st %g1, [ %o0 ] } 2009d1c: 81 c7 e0 08 ret 2009d20: 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( 2009d24: 40 00 29 50 call 2014264 <__errno> 2009d28: b0 10 3f ff mov -1, %i0 2009d2c: a0 10 00 08 mov %o0, %l0 2009d30: 40 00 00 5b call 2009e9c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 2009d34: 90 10 00 1d mov %i5, %o0 2009d38: d0 24 00 00 st %o0, [ %l0 ] 2009d3c: 81 c7 e0 08 ret 2009d40: 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 ); 2009d44: 40 00 29 48 call 2014264 <__errno> 2009d48: b0 10 3f ff mov -1, %i0 2009d4c: 82 10 20 16 mov 0x16, %g1 2009d50: c2 22 00 00 st %g1, [ %o0 ] 2009d54: 81 c7 e0 08 ret 2009d58: 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(); 2009d5c: 40 00 0f 9b call 200dbc8 <_Thread_Enable_dispatch> 2009d60: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 2009d64: 40 00 29 40 call 2014264 <__errno> 2009d68: 01 00 00 00 nop 2009d6c: 82 10 20 09 mov 9, %g1 ! 9 2009d70: c2 22 00 00 st %g1, [ %o0 ] 2009d74: 81 c7 e0 08 ret 2009d78: 81 e8 00 00 restore 0200729c <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 200729c: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 20072a0: 80 a6 20 00 cmp %i0, 0 20072a4: 02 80 00 12 be 20072ec <_POSIX_Mutex_Get+0x50> 20072a8: b4 10 00 19 mov %i1, %i2 20072ac: f2 06 00 00 ld [ %i0 ], %i1 20072b0: 80 a6 7f ff cmp %i1, -1 20072b4: 02 80 00 05 be 20072c8 <_POSIX_Mutex_Get+0x2c> 20072b8: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 20072bc: 31 00 80 66 sethi %hi(0x2019800), %i0 20072c0: 40 00 0c 3c call 200a3b0 <_Objects_Get> 20072c4: 91 ee 20 80 restore %i0, 0x80, %o0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 20072c8: 40 00 00 20 call 2007348 <== NOT EXECUTED 20072cc: 92 10 20 00 clr %o1 <== NOT EXECUTED 20072d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20072d4: 12 80 00 07 bne 20072f0 <_POSIX_Mutex_Get+0x54> <== NOT EXECUTED 20072d8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20072dc: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 20072e0: 31 00 80 66 sethi %hi(0x2019800), %i0 <== NOT EXECUTED 20072e4: 40 00 0c 33 call 200a3b0 <_Objects_Get> <== NOT EXECUTED 20072e8: 91 ee 20 80 restore %i0, 0x80, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 20072ec: 82 10 20 01 mov 1, %g1 20072f0: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 20072f4: 81 c7 e0 08 ret 20072f8: 91 e8 20 00 restore %g0, 0, %o0 02007234 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 2007234: 9d e3 bf 98 save %sp, -104, %sp 2007238: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 200723c: 80 a6 20 00 cmp %i0, 0 2007240: 02 80 00 13 be 200728c <_POSIX_Mutex_Get_interrupt_disable+0x58> 2007244: b6 10 00 1a mov %i2, %i3 2007248: f2 06 00 00 ld [ %i0 ], %i1 200724c: 80 a6 7f ff cmp %i1, -1 2007250: 02 80 00 05 be 2007264 <_POSIX_Mutex_Get_interrupt_disable+0x30> 2007254: b4 10 00 10 mov %l0, %i2 return (POSIX_Mutex_Control *) 2007258: 31 00 80 66 sethi %hi(0x2019800), %i0 200725c: 40 00 0c 37 call 200a338 <_Objects_Get_isr_disable> 2007260: 91 ee 20 80 restore %i0, 0x80, %o0 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 2007264: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2007268: 40 00 00 38 call 2007348 <== NOT EXECUTED 200726c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2007270: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2007274: 12 80 00 06 bne 200728c <_POSIX_Mutex_Get_interrupt_disable+0x58> <== NOT EXECUTED 2007278: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED 200727c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 2007280: 31 00 80 66 sethi %hi(0x2019800), %i0 <== NOT EXECUTED 2007284: 40 00 0c 2d call 200a338 <_Objects_Get_isr_disable> <== NOT EXECUTED 2007288: 91 ee 20 80 restore %i0, 0x80, %o0 <== NOT EXECUTED ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 200728c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2007290: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 2007294: 81 c7 e0 08 ret <== NOT EXECUTED 2007298: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0200eff4 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 200eff4: 9d e3 bf 98 save %sp, -104, %sp 200eff8: 03 00 80 7a sethi %hi(0x201e800), %g1 200effc: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 201e950 <_Thread_Dispatch_disable_level> 200f000: 84 00 a0 01 inc %g2 200f004: c4 20 61 50 st %g2, [ %g1 + 0x150 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 200f008: 80 a6 60 00 cmp %i1, 0 200f00c: 12 80 00 2e bne 200f0c4 <_POSIX_Semaphore_Create_support+0xd0> 200f010: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 200f014: 02 80 00 07 be 200f030 <_POSIX_Semaphore_Create_support+0x3c> 200f018: 21 00 80 7b sethi %hi(0x201ec00), %l0 if( strlen(name) > PATH_MAX ) { 200f01c: 40 00 0f ec call 2012fcc 200f020: 90 10 00 18 mov %i0, %o0 200f024: 80 a2 20 ff cmp %o0, 0xff 200f028: 18 80 00 2f bgu 200f0e4 <_POSIX_Semaphore_Create_support+0xf0> 200f02c: 21 00 80 7b sethi %hi(0x201ec00), %l0 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 200f030: 7f ff eb 9e call 2009ea8 <_Objects_Allocate> 200f034: 90 14 20 60 or %l0, 0x60, %o0 ! 201ec60 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 200f038: b2 92 20 00 orcc %o0, 0, %i1 200f03c: 02 80 00 32 be 200f104 <_POSIX_Semaphore_Create_support+0x110> 200f040: 80 a6 20 00 cmp %i0, 0 rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { 200f044: 02 80 00 1c be 200f0b4 <_POSIX_Semaphore_Create_support+0xc0> 200f048: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200f04c: 84 10 20 01 mov 1, %g2 } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 200f050: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 200f054: c4 2e 60 15 stb %g2, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200f058: c4 26 60 18 st %g2, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 200f05c: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200f060: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200f064: 94 10 00 1a mov %i2, %o2 200f068: 90 06 60 1c add %i1, 0x1c, %o0 200f06c: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200f070: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200f074: 7f ff ea 5e call 20099ec <_CORE_semaphore_Initialize> 200f078: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200f07c: 82 14 20 60 or %l0, 0x60, %g1 200f080: c4 06 60 08 ld [ %i1 + 8 ], %g2 200f084: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 200f088: 03 00 00 3f sethi %hi(0xfc00), %g1 200f08c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200f090: 84 08 80 01 and %g2, %g1, %g2 200f094: 85 28 a0 02 sll %g2, 2, %g2 200f098: f2 20 c0 02 st %i1, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 200f09c: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 200f0a0: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 200f0a4: 7f ff ef 3e call 200ad9c <_Thread_Enable_dispatch> 200f0a8: b0 10 20 00 clr %i0 return 0; } 200f0ac: 81 c7 e0 08 ret 200f0b0: 81 e8 00 00 restore if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 200f0b4: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 200f0b8: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 200f0bc: 10 bf ff e9 b 200f060 <_POSIX_Semaphore_Create_support+0x6c> 200f0c0: c0 2e 60 15 clrb [ %i1 + 0x15 ] _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); 200f0c4: 7f ff ef 36 call 200ad9c <_Thread_Enable_dispatch> 200f0c8: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSYS ); 200f0cc: 40 00 08 f6 call 20114a4 <__errno> 200f0d0: 01 00 00 00 nop 200f0d4: 82 10 20 58 mov 0x58, %g1 ! 58 200f0d8: c2 22 00 00 st %g1, [ %o0 ] 200f0dc: 81 c7 e0 08 ret 200f0e0: 81 e8 00 00 restore } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); 200f0e4: 7f ff ef 2e call 200ad9c <_Thread_Enable_dispatch> <== NOT EXECUTED 200f0e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200f0ec: 40 00 08 ee call 20114a4 <__errno> <== NOT EXECUTED 200f0f0: 01 00 00 00 nop <== NOT EXECUTED 200f0f4: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED 200f0f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f0fc: 81 c7 e0 08 ret <== NOT EXECUTED 200f100: 81 e8 00 00 restore <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 200f104: 7f ff ef 26 call 200ad9c <_Thread_Enable_dispatch> 200f108: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSPC ); 200f10c: 40 00 08 e6 call 20114a4 <__errno> 200f110: 01 00 00 00 nop 200f114: 82 10 20 1c mov 0x1c, %g1 ! 1c 200f118: c2 22 00 00 st %g1, [ %o0 ] 200f11c: 81 c7 e0 08 ret 200f120: 81 e8 00 00 restore 0200b8d8 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 200b8d8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b8dc: f0 06 61 6c ld [ %i1 + 0x16c ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 200b8e0: 40 00 04 3f call 200c9dc <_Timespec_To_ticks> 200b8e4: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 200b8e8: 80 a2 20 00 cmp %o0, 0 200b8ec: 22 80 00 02 be,a 200b8f4 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 200b8f0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 200b8f4: c2 06 20 98 ld [ %i0 + 0x98 ], %g1 the_thread->cpu_time_budget = ticks; new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b8f8: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 200b8fc: 84 10 20 ff mov 0xff, %g2 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); if ( !ticks ) ticks = 1; the_thread->cpu_time_budget = ticks; 200b900: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 200b904: 92 20 80 01 sub %g2, %g1, %o1 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b908: 80 a0 e0 00 cmp %g3, 0 200b90c: 02 80 00 10 be 200b94c <_POSIX_Threads_Sporadic_budget_TSR+0x74> 200b910: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 200b914: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200b918: 80 a0 40 09 cmp %g1, %o1 200b91c: 18 80 00 0d bgu 200b950 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 200b920: 90 10 00 19 mov %i1, %o0 the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 200b924: 40 00 04 2e call 200c9dc <_Timespec_To_ticks> 200b928: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 200b92c: 80 a2 20 00 cmp %o0, 0 200b930: 22 80 00 02 be,a 200b938 <_POSIX_Threads_Sporadic_budget_TSR+0x60> 200b934: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200b938: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200b93c: b2 06 20 9c add %i0, 0x9c, %i1 200b940: 31 00 80 60 sethi %hi(0x2018000), %i0 200b944: 7f ff f5 48 call 2008e64 <_Watchdog_Insert> 200b948: 91 ee 22 b4 restore %i0, 0x2b4, %o0 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 200b94c: 90 10 00 19 mov %i1, %o0 200b950: 7f ff ee f9 call 2007534 <_Thread_Change_priority> 200b954: 94 10 20 01 mov 1, %o2 200b958: 30 bf ff f3 b,a 200b924 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 0200b888 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b888: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b88c: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 200b890: c6 00 a0 84 ld [ %g2 + 0x84 ], %g3 * 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 */ 200b894: 82 10 3f ff mov -1, %g1 200b898: 84 10 20 ff mov 0xff, %g2 200b89c: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 200b8a0: 92 20 80 03 sub %g2, %g3, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b8a4: 80 a1 20 00 cmp %g4, 0 200b8a8: 02 80 00 06 be 200b8c0 <_POSIX_Threads_Sporadic_budget_callout+0x38> 200b8ac: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 200b8b0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 200b8b4: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 200b8b8: 08 80 00 06 bleu 200b8d0 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 200b8bc: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 200b8c0: 94 10 20 01 mov 1, %o2 ! 1 200b8c4: 82 13 c0 00 mov %o7, %g1 200b8c8: 7f ff ef 1b call 2007534 <_Thread_Change_priority> 200b8cc: 9e 10 40 00 mov %g1, %o7 200b8d0: 81 c3 e0 08 retl <== NOT EXECUTED 200b8d4: 01 00 00 00 nop 0200cfe8 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 200cfe8: 9d e3 bf 98 save %sp, -104, %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 ]; 200cfec: e2 06 21 6c ld [ %i0 + 0x16c ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 200cff0: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 200cff4: c4 04 60 d8 ld [ %l1 + 0xd8 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200cff8: b0 04 60 dc add %l1, 0xdc, %i0 200cffc: 80 a0 80 18 cmp %g2, %i0 200d000: 02 80 00 14 be 200d050 <_POSIX_Threads_cancel_run+0x68> 200d004: c2 24 60 cc st %g1, [ %l1 + 0xcc ] _ISR_Disable( level ); 200d008: 7f ff d3 67 call 2001da4 <== NOT EXECUTED 200d00c: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 200d010: e0 06 20 04 ld [ %i0 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200d014: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 200d018: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 200d01c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200d020: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 200d024: 7f ff d3 64 call 2001db4 <== NOT EXECUTED 200d028: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 200d02c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 200d030: 9f c0 40 00 call %g1 <== NOT EXECUTED 200d034: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 200d038: 7f ff f0 57 call 2009194 <_Workspace_Free> <== NOT EXECUTED 200d03c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 200d040: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 200d044: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 200d048: 12 bf ff f0 bne 200d008 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED 200d04c: 01 00 00 00 nop <== NOT EXECUTED 200d050: 81 c7 e0 08 ret 200d054: 81 e8 00 00 restore 0200dff0 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 200dff0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 200dff4: 7f ff f4 ba call 200b2dc <_Watchdog_Remove> 200dff8: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200dffc: 7f ff d2 d1 call 2002b40 200e000: 01 00 00 00 nop 200e004: a0 10 00 08 mov %o0, %l0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 200e008: c2 06 20 08 ld [ %i0 + 8 ], %g1 200e00c: 80 a0 60 00 cmp %g1, 0 200e010: 12 80 00 0f bne 200e04c <_POSIX_Timer_Insert_helper+0x5c> 200e014: 92 10 00 18 mov %i0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 200e018: f6 26 20 1c st %i3, [ %i0 + 0x1c ] the_watchdog->id = id; 200e01c: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 200e020: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200e024: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200e028: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200e02c: 11 00 80 74 sethi %hi(0x201d000), %o0 200e030: 7f ff f4 40 call 200b130 <_Watchdog_Insert> 200e034: 90 12 20 84 or %o0, 0x84, %o0 ! 201d084 <_Watchdog_Ticks_chain> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 200e038: b0 10 20 01 mov 1, %i0 200e03c: 7f ff d2 c5 call 2002b50 200e040: 90 10 00 10 mov %l0, %o0 return true; } 200e044: 81 c7 e0 08 ret 200e048: 81 e8 00 00 restore /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 200e04c: 7f ff d2 c1 call 2002b50 <== NOT EXECUTED 200e050: b0 10 20 00 clr %i0 <== NOT EXECUTED 200e054: 81 c7 e0 08 ret <== NOT EXECUTED 200e058: 81 e8 00 00 restore <== NOT EXECUTED 02007100 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 2007100: 9d e3 bf 98 save %sp, -104, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2007104: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007108: c4 06 60 54 ld [ %i1 + 0x54 ], %g2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 200710c: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007110: 80 a0 a0 00 cmp %g2, 0 2007114: 12 80 00 0e bne 200714c <_POSIX_Timer_TSR+0x4c> 2007118: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 200711c: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 2007120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007124: 32 80 00 0b bne,a 2007150 <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 2007128: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 <== NOT EXECUTED /* 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; 200712c: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 2007130: 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 ) ) { 2007134: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2007138: 40 00 1a cd call 200dc6c 200713c: 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; 2007140: c0 26 60 68 clr [ %i1 + 0x68 ] 2007144: 81 c7 e0 08 ret 2007148: 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( 200714c: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2007150: d4 06 60 08 ld [ %i1 + 8 ], %o2 2007154: 90 06 60 10 add %i1, 0x10, %o0 2007158: 17 00 80 1c sethi %hi(0x2007000), %o3 200715c: 98 10 00 19 mov %i1, %o4 2007160: 40 00 1b a4 call 200dff0 <_POSIX_Timer_Insert_helper> 2007164: 96 12 e1 00 or %o3, 0x100, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2007168: 80 8a 20 ff btst 0xff, %o0 200716c: 02 bf ff f6 be 2007144 <_POSIX_Timer_TSR+0x44> 2007170: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 2007174: 40 00 06 22 call 20089fc <_TOD_Get> 2007178: 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; 200717c: 82 10 20 03 mov 3, %g1 2007180: 10 bf ff ed b 2007134 <_POSIX_Timer_TSR+0x34> 2007184: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 0200d1ec <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 200d1ec: 9d e3 bf 98 save %sp, -104, %sp sigset_t signals_blocked; ISR_Level level; bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 200d1f0: 82 10 20 01 mov 1, %g1 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 200d1f4: 80 8f 20 ff btst 0xff, %i4 sigset_t signals_blocked; ISR_Level level; bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 200d1f8: 84 06 7f ff add %i1, -1, %g2 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 200d1fc: b8 10 3f ff mov -1, %i4 200d200: 02 80 00 04 be 200d210 <_POSIX_signals_Clear_signals+0x24> 200d204: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 200d208: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 200d20c: b8 38 00 01 xnor %g0, %g1, %i4 signals_blocked = SIGNAL_ALL_MASK; /* XXX this is not right for siginfo type signals yet */ /* XXX since they can't be cleared the same way */ _ISR_Disable( level ); 200d210: 7f ff d2 e5 call 2001da4 200d214: 01 00 00 00 nop 200d218: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 200d21c: 80 8e e0 ff btst 0xff, %i3 200d220: 22 80 00 33 be,a 200d2ec <_POSIX_signals_Clear_signals+0x100> 200d224: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 200d228: 05 00 80 62 sethi %hi(0x2018800), %g2 200d22c: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 ! 201896c <_POSIX_signals_Pending> 200d230: 82 0c 00 01 and %l0, %g1, %g1 200d234: 80 88 40 1c btst %g1, %i4 200d238: 02 80 00 37 be 200d314 <_POSIX_signals_Clear_signals+0x128> 200d23c: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200d240: 87 2e 60 04 sll %i1, 4, %g3 200d244: 03 00 80 61 sethi %hi(0x2018400), %g1 200d248: 86 20 c0 02 sub %g3, %g2, %g3 200d24c: 82 10 63 a0 or %g1, 0x3a0, %g1 200d250: c4 00 40 03 ld [ %g1 + %g3 ], %g2 200d254: 80 a0 a0 02 cmp %g2, 2 200d258: 12 80 00 34 bne 200d328 <_POSIX_signals_Clear_signals+0x13c> 200d25c: 03 00 80 62 sethi %hi(0x2018800), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 200d260: 88 10 61 70 or %g1, 0x170, %g4 ! 2018970 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200d264: c4 00 c0 04 ld [ %g3 + %g4 ], %g2 200d268: 98 00 c0 04 add %g3, %g4, %o4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200d26c: 9a 03 20 04 add %o4, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 200d270: 80 a0 80 0d cmp %g2, %o5 200d274: 02 80 00 34 be 200d344 <_POSIX_signals_Clear_signals+0x158> 200d278: b8 10 20 00 clr %i4 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 200d27c: c2 00 80 00 ld [ %g2 ], %g1 200d280: b8 10 00 02 mov %g2, %i4 the_chain->first = new_first; 200d284: c2 20 c0 04 st %g1, [ %g3 + %g4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200d288: 80 a3 40 01 cmp %o5, %g1 200d28c: 02 80 00 2e be 200d344 <_POSIX_signals_Clear_signals+0x158> 200d290: d8 20 60 04 st %o4, [ %g1 + 4 ] _POSIX_signals_Clear_process_signals( mask ); if ( psiginfo ) { 200d294: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 200d298: 02 80 00 1b be 200d304 <_POSIX_signals_Clear_signals+0x118> 200d29c: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 200d2a0: c2 07 20 08 ld [ %i4 + 8 ], %g1 the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node; 200d2a4: b0 10 20 01 mov 1, %i0 200d2a8: c2 26 80 00 st %g1, [ %i2 ] 200d2ac: c4 07 20 0c ld [ %i4 + 0xc ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200d2b0: 03 00 80 62 sethi %hi(0x2018800), %g1 200d2b4: c4 26 a0 04 st %g2, [ %i2 + 4 ] 200d2b8: 82 10 61 24 or %g1, 0x124, %g1 200d2bc: c6 07 20 10 ld [ %i4 + 0x10 ], %g3 200d2c0: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 200d2c4: 82 00 7f fc add %g1, -4, %g1 200d2c8: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 200d2cc: f8 20 60 08 st %i4, [ %g1 + 8 ] 200d2d0: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200d2d4: c4 27 20 04 st %g2, [ %i4 + 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; 200d2d8: f8 20 80 00 st %i4, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 200d2dc: 7f ff d2 b6 call 2001db4 200d2e0: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d2e4: 81 c7 e0 08 ret 200d2e8: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 200d2ec: 82 0c 00 02 and %l0, %g2, %g1 200d2f0: 80 88 40 1c btst %g1, %i4 200d2f4: 02 80 00 08 be 200d314 <_POSIX_signals_Clear_signals+0x128> 200d2f8: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 200d2fc: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 200d300: b0 10 20 01 mov 1, %i0 do_callout = true; } } _ISR_Enable( level ); 200d304: 7f ff d2 ac call 2001db4 200d308: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d30c: 81 c7 e0 08 ret 200d310: 81 e8 00 00 restore _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 200d314: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 200d318: 7f ff d2 a7 call 2001db4 200d31c: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d320: 81 c7 e0 08 ret 200d324: 81 e8 00 00 restore &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 200d328: 90 10 00 10 mov %l0, %o0 200d32c: 40 00 01 aa call 200d9d4 <_POSIX_signals_Clear_process_signals> 200d330: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 200d334: 7f ff d2 a0 call 2001db4 200d338: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d33c: 81 c7 e0 08 ret 200d340: 81 e8 00 00 restore if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) _POSIX_signals_Clear_process_signals( mask ); 200d344: 40 00 01 a4 call 200d9d4 <_POSIX_signals_Clear_process_signals> 200d348: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 200d34c: 10 bf ff d3 b 200d298 <_POSIX_signals_Clear_signals+0xac> 200d350: 80 a7 20 00 cmp %i4, 0 02006324 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 2006324: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2006328: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 200632c: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2006330: 82 02 3f ff add %o0, -1, %g1 2006334: 83 28 80 01 sll %g2, %g1, %g1 2006338: 80 88 40 03 btst %g1, %g3 200633c: 12 80 00 11 bne 2006380 <_POSIX_signals_Get_highest+0x5c> 2006340: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2006344: 90 02 20 01 inc %o0 2006348: 80 a2 20 20 cmp %o0, 0x20 200634c: 12 bf ff fa bne 2006334 <_POSIX_signals_Get_highest+0x10> 2006350: 82 02 3f ff add %o0, -1, %g1 2006354: 90 10 20 01 mov 1, %o0 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2006358: 10 80 00 05 b 200636c <_POSIX_signals_Get_highest+0x48> 200635c: 84 10 20 01 mov 1, %g2 return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2006360: 80 a2 20 1b cmp %o0, 0x1b 2006364: 02 80 00 09 be 2006388 <_POSIX_signals_Get_highest+0x64> 2006368: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 200636c: 82 02 3f ff add %o0, -1, %g1 2006370: 83 28 80 01 sll %g2, %g1, %g1 2006374: 80 88 40 03 btst %g1, %g3 2006378: 22 bf ff fa be,a 2006360 <_POSIX_signals_Get_highest+0x3c> 200637c: 90 02 20 01 inc %o0 return signo; } return 0; } 2006380: 81 c3 e0 08 retl 2006384: 01 00 00 00 nop 2006388: 81 c3 e0 08 retl <== NOT EXECUTED 200638c: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 0200b504 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200b504: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b508: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 if ( !api ) 200b50c: 80 a4 20 00 cmp %l0, 0 200b510: 02 80 00 3c be 200b600 <_POSIX_signals_Post_switch_extension+0xfc> 200b514: 03 00 80 62 sethi %hi(0x2018800), %g1 200b518: a2 10 61 6c or %g1, 0x16c, %l1 ! 201896c <_POSIX_signals_Pending> * 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) { restart: _ISR_Disable( level ); 200b51c: 7f ff da 22 call 2001da4 200b520: 01 00 00 00 nop 200b524: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 200b528: c2 04 40 00 ld [ %l1 ], %g1 200b52c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 200b530: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 200b534: 82 10 40 02 or %g1, %g2, %g1 200b538: 80 a8 40 03 andncc %g1, %g3, %g0 200b53c: 02 80 00 2f be 200b5f8 <_POSIX_signals_Post_switch_extension+0xf4> 200b540: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 200b544: 7f ff da 1c call 2001db4 200b548: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 200b54c: 92 10 00 18 mov %i0, %o1 200b550: 94 10 20 00 clr %o2 200b554: 40 00 06 fc call 200d144 <_POSIX_signals_Check_signal> 200b558: 90 10 00 10 mov %l0, %o0 200b55c: 80 8a 20 ff btst 0xff, %o0 200b560: 12 bf ff ef bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b564: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200b568: 90 10 00 10 mov %l0, %o0 200b56c: 94 10 20 01 mov 1, %o2 200b570: 40 00 06 f5 call 200d144 <_POSIX_signals_Check_signal> 200b574: b0 06 20 01 inc %i0 200b578: 80 8a 20 ff btst 0xff, %o0 200b57c: 12 bf ff e8 bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b580: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200b584: 12 bf ff f3 bne 200b550 <_POSIX_signals_Post_switch_extension+0x4c> 200b588: 92 10 00 18 mov %i0, %o1 200b58c: b0 10 20 01 mov 1, %i0 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 200b590: 92 10 00 18 mov %i0, %o1 200b594: 94 10 20 00 clr %o2 200b598: 40 00 06 eb call 200d144 <_POSIX_signals_Check_signal> 200b59c: 90 10 00 10 mov %l0, %o0 200b5a0: 80 8a 20 ff btst 0xff, %o0 200b5a4: 12 bf ff de bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b5a8: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200b5ac: 90 10 00 10 mov %l0, %o0 200b5b0: 94 10 20 01 mov 1, %o2 200b5b4: 40 00 06 e4 call 200d144 <_POSIX_signals_Check_signal> 200b5b8: b0 06 20 01 inc %i0 200b5bc: 80 8a 20 ff btst 0xff, %o0 200b5c0: 12 bf ff d7 bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b5c4: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 200b5c8: 12 bf ff f3 bne 200b594 <_POSIX_signals_Post_switch_extension+0x90> 200b5cc: 92 10 00 18 mov %i0, %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) { restart: _ISR_Disable( level ); 200b5d0: 7f ff d9 f5 call 2001da4 <== NOT EXECUTED 200b5d4: 01 00 00 00 nop <== NOT EXECUTED 200b5d8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( !(~api->signals_blocked & 200b5dc: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 200b5e0: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 <== NOT EXECUTED 200b5e4: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 <== NOT EXECUTED 200b5e8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 200b5ec: 80 a8 40 03 andncc %g1, %g3, %g0 <== NOT EXECUTED 200b5f0: 12 bf ff d5 bne 200b544 <_POSIX_signals_Post_switch_extension+0x40> <== NOT EXECUTED 200b5f4: 01 00 00 00 nop <== NOT EXECUTED (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200b5f8: 7f ff d9 ef call 2001db4 200b5fc: 81 e8 00 00 restore 200b600: 81 c7 e0 08 ret <== NOT EXECUTED 200b604: 81 e8 00 00 restore <== NOT EXECUTED 02005514 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 2005514: 9d e3 bf 98 save %sp, -104, %sp /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 2005518: 7f ff f3 ac call 20023c8 200551c: 33 00 80 58 sethi %hi(0x2016000), %i1 2005520: 7f ff ff 07 call 200513c 2005524: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 2005528: 40 00 10 93 call 2009774 <_Watchdog_Remove> 200552c: 90 16 63 14 or %i1, 0x314, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005530: 31 00 80 59 sethi %hi(0x2016400), %i0 2005534: b2 16 63 14 or %i1, 0x314, %i1 2005538: 40 00 10 24 call 20095c8 <_Watchdog_Insert> 200553c: 91 ee 21 54 restore %i0, 0x154, %o0 2005540: 01 00 00 00 nop <== NOT EXECUTED 02022cf8 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 2022cf8: 9d e3 bf 98 save %sp, -104, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 2022cfc: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 2022d00: 07 04 00 20 sethi %hi(0x10008000), %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 2022d04: 84 06 7f ff add %i1, -1, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 2022d08: 82 09 00 03 and %g4, %g3, %g1 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 2022d0c: 9a 10 20 01 mov 1, %o5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 2022d10: 80 a0 40 03 cmp %g1, %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 2022d14: 85 2b 40 02 sll %o5, %g2, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 2022d18: 02 80 00 25 be 2022dac <_POSIX_signals_Unblock_thread+0xb4> 2022d1c: c6 06 21 6c ld [ %i0 + 0x16c ], %g3 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 2022d20: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 2022d24: 80 a8 80 01 andncc %g2, %g1, %g0 2022d28: 02 80 00 1f be 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d2c: 03 04 00 00 sethi %hi(0x10000000), %g1 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 2022d30: 80 89 00 01 btst %g4, %g1 2022d34: 02 80 00 11 be 2022d78 <_POSIX_signals_Unblock_thread+0x80> 2022d38: da 2e 20 75 stb %o5, [ %i0 + 0x75 ] the_thread->Wait.return_code = EINTR; 2022d3c: 82 10 20 04 mov 4, %g1 #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) ){ 2022d40: 80 89 20 08 btst 8, %g4 2022d44: 02 80 00 18 be 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d48: c2 26 20 34 st %g1, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 2022d4c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2022d50: 80 a0 60 02 cmp %g1, 2 2022d54: 02 80 00 36 be 2022e2c <_POSIX_signals_Unblock_thread+0x134> 2022d58: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2022d5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022d60: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2022d64: b0 10 20 00 clr %i0 2022d68: 7f ff ac 0c call 200dd98 <_Thread_Clear_state> 2022d6c: 92 12 63 f8 or %o1, 0x3f8, %o1 2022d70: 81 c7 e0 08 ret 2022d74: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 2022d78: 80 a1 20 00 cmp %g4, 0 2022d7c: 12 80 00 0a bne 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d80: 03 00 80 a5 sethi %hi(0x2029400), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2022d84: c4 00 60 00 ld [ %g1 ], %g2 2022d88: 80 a0 a0 00 cmp %g2, 0 2022d8c: 02 80 00 06 be 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d90: 03 00 80 a5 sethi %hi(0x2029400), %g1 2022d94: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 ! 2029424 <_Thread_Executing> 2022d98: 80 a6 00 02 cmp %i0, %g2 2022d9c: 02 80 00 1c be 2022e0c <_POSIX_signals_Unblock_thread+0x114> 2022da0: 03 00 80 a5 sethi %hi(0x2029400), %g1 _ISR_Signals_to_thread_executing = TRUE; } } return false; } 2022da4: 81 c7 e0 08 ret 2022da8: 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) ) { 2022dac: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2022db0: 80 88 80 01 btst %g2, %g1 2022db4: 22 80 00 12 be,a 2022dfc <_POSIX_signals_Unblock_thread+0x104> 2022db8: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 the_thread->Wait.return_code = EINTR; 2022dbc: 82 10 20 04 mov 4, %g1 2022dc0: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 2022dc4: 80 a6 a0 00 cmp %i2, 0 2022dc8: 02 80 00 14 be 2022e18 <_POSIX_signals_Unblock_thread+0x120> 2022dcc: c6 06 20 28 ld [ %i0 + 0x28 ], %g3 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 2022dd0: c2 06 80 00 ld [ %i2 ], %g1 2022dd4: c2 20 c0 00 st %g1, [ %g3 ] 2022dd8: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2022ddc: c4 20 e0 04 st %g2, [ %g3 + 4 ] 2022de0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 2022de4: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 2022de8: 90 10 00 18 mov %i0, %o0 2022dec: 7f ff af 3a call 200ead4 <_Thread_queue_Extract_with_proxy> 2022df0: b0 10 20 01 mov 1, %i0 2022df4: 81 c7 e0 08 ret 2022df8: 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) ) { 2022dfc: 80 a8 80 01 andncc %g2, %g1, %g0 2022e00: 12 bf ff f0 bne 2022dc0 <_POSIX_signals_Unblock_thread+0xc8> 2022e04: 82 10 20 04 mov 4, %g1 2022e08: 30 bf ff e7 b,a 2022da4 <_POSIX_signals_Unblock_thread+0xac> (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; 2022e0c: da 28 60 b8 stb %o5, [ %g1 + 0xb8 ] 2022e10: 81 c7 e0 08 ret 2022e14: 91 e8 20 00 restore %g0, 0, %o0 the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 2022e18: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 2022e1c: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 2022e20: c0 20 e0 08 clr [ %g3 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 2022e24: 10 bf ff f1 b 2022de8 <_POSIX_signals_Unblock_thread+0xf0> 2022e28: c2 20 e0 04 st %g1, [ %g3 + 4 ] _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 ); 2022e2c: 7f ff b2 49 call 200f750 <_Watchdog_Remove> 2022e30: 90 06 20 48 add %i0, 0x48, %o0 2022e34: 10 bf ff cb b 2022d60 <_POSIX_signals_Unblock_thread+0x68> 2022e38: 90 10 00 18 mov %i0, %o0 02024e2c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2024e2c: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 2024e30: 80 a6 20 00 cmp %i0, 0 2024e34: 02 80 00 10 be 2024e74 <_Protected_heap_Get_information+0x48> 2024e38: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 2024e3c: 02 80 00 0e be 2024e74 <_Protected_heap_Get_information+0x48> 2024e40: 23 00 81 7a sethi %hi(0x205e800), %l1 return false; _RTEMS_Lock_allocator(); 2024e44: 7f ff 91 cf call 2009580 <_API_Mutex_Lock> 2024e48: d0 04 63 4c ld [ %l1 + 0x34c ], %o0 ! 205eb4c <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 2024e4c: 90 10 00 18 mov %i0, %o0 2024e50: 40 00 2b 7f call 202fc4c <_Heap_Get_information> 2024e54: 92 10 00 19 mov %i1, %o1 2024e58: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 2024e5c: 7f ff 91 df call 20095d8 <_API_Mutex_Unlock> 2024e60: d0 04 63 4c ld [ %l1 + 0x34c ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 2024e64: 80 a0 00 10 cmp %g0, %l0 2024e68: 82 60 3f ff subx %g0, -1, %g1 2024e6c: 81 c7 e0 08 ret 2024e70: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 2024e74: 81 c7 e0 08 ret <== NOT EXECUTED 2024e78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006e3c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2006e3c: 9d e3 bf 90 save %sp, -112, %sp 2006e40: 11 00 80 74 sethi %hi(0x201d000), %o0 2006e44: 92 10 00 18 mov %i0, %o1 2006e48: 90 12 21 0c or %o0, 0x10c, %o0 2006e4c: 40 00 08 19 call 2008eb0 <_Objects_Get> 2006e50: 94 07 bf f4 add %fp, -12, %o2 /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2006e54: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006e58: 80 a0 60 00 cmp %g1, 0 2006e5c: 12 80 00 11 bne 2006ea0 <_Rate_monotonic_Timeout+0x64> 2006e60: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2006e64: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006e68: 03 00 00 10 sethi %hi(0x4000), %g1 2006e6c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2006e70: 80 88 80 01 btst %g2, %g1 2006e74: 32 80 00 0d bne,a 2006ea8 <_Rate_monotonic_Timeout+0x6c> 2006e78: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 _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 ) { 2006e7c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2006e80: 80 a0 60 01 cmp %g1, 1 2006e84: 02 80 00 12 be 2006ecc <_Rate_monotonic_Timeout+0x90> 2006e88: 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; 2006e8c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2006e90: 05 00 80 74 sethi %hi(0x201d000), %g2 2006e94: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 201d280 <_Thread_Dispatch_disable_level> 2006e98: 82 00 7f ff add %g1, -1, %g1 2006e9c: c2 20 a2 80 st %g1, [ %g2 + 0x280 ] 2006ea0: 81 c7 e0 08 ret 2006ea4: 81 e8 00 00 restore the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006ea8: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006eac: 80 a0 80 01 cmp %g2, %g1 2006eb0: 32 bf ff f4 bne,a 2006e80 <_Rate_monotonic_Timeout+0x44> 2006eb4: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2006eb8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006ebc: 40 00 09 67 call 2009458 <_Thread_Clear_state> 2006ec0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 2006ec4: 10 80 00 05 b 2006ed8 <_Rate_monotonic_Timeout+0x9c> 2006ec8: 90 10 00 18 mov %i0, %o0 _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2006ecc: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006ed0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2006ed4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006ed8: 7f ff fe 2e call 2006790 <_Rate_monotonic_Initiate_statistics> 2006edc: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006ee0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006ee4: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006ee8: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006eec: 11 00 80 74 sethi %hi(0x201d000), %o0 2006ef0: 40 00 10 0e call 200af28 <_Watchdog_Insert> 2006ef4: 90 12 23 64 or %o0, 0x364, %o0 ! 201d364 <_Watchdog_Ticks_chain> 2006ef8: 30 bf ff e6 b,a 2006e90 <_Rate_monotonic_Timeout+0x54> 020078e4 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 20078e4: 9d e3 bf 78 save %sp, -136, %sp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 20078e8: 35 00 80 60 sethi %hi(0x2018000), %i2 20078ec: 7f ff fc bd call 2006be0 <_Objects_Allocate> 20078f0: 90 16 a3 30 or %i2, 0x330, %o0 ! 2018330 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20078f4: 37 00 80 60 sethi %hi(0x2018000), %i3 20078f8: c2 06 e1 d0 ld [ %i3 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 20078fc: 39 00 80 60 sethi %hi(0x2018000), %i4 2007900: 82 00 60 01 inc %g1 2007904: d0 27 23 7c st %o0, [ %i4 + 0x37c ] 2007908: c2 26 e1 d0 st %g1, [ %i3 + 0x1d0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 200790c: 33 00 80 60 sethi %hi(0x2018000), %i1 2007910: c2 06 62 6c ld [ %i1 + 0x26c ], %g1 ! 201826c <_Configuration_Table> 2007914: 05 00 80 5c sethi %hi(0x2017000), %g2 2007918: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 200791c: d6 00 a3 a0 ld [ %g2 + 0x3a0 ], %o3 2007920: 03 00 80 59 sethi %hi(0x2016400), %g1 2007924: 82 10 62 68 or %g1, 0x268, %g1 ! 2016668 <_Status_Object_name_errors_to_status+0x14> 2007928: c2 27 bf f4 st %g1, [ %fp + -12 ] 200792c: 80 a2 c0 03 cmp %o3, %g3 2007930: 1a 80 00 03 bcc 200793c <_Thread_Create_idle+0x58> 2007934: d2 07 23 7c ld [ %i4 + 0x37c ], %o1 2007938: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 200793c: 03 00 80 5c sethi %hi(0x2017000), %g1 2007940: da 08 63 a4 ldub [ %g1 + 0x3a4 ], %o5 ! 20173a4 2007944: 84 07 bf f4 add %fp, -12, %g2 2007948: 82 10 20 01 mov 1, %g1 200794c: c0 23 a0 60 clr [ %sp + 0x60 ] 2007950: c0 23 a0 64 clr [ %sp + 0x64 ] 2007954: c0 23 a0 68 clr [ %sp + 0x68 ] 2007958: 90 16 a3 30 or %i2, 0x330, %o0 200795c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2007960: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 2007964: 94 10 20 00 clr %o2 2007968: 40 00 00 c3 call 2007c74 <_Thread_Initialize> 200796c: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 2007970: c4 06 62 6c ld [ %i1 + 0x26c ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2007974: c2 06 e1 d0 ld [ %i3 + 0x1d0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007978: c6 07 23 7c ld [ %i4 + 0x37c ], %g3 200797c: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 2007980: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 2007984: c2 26 e1 d0 st %g1, [ %i3 + 0x1d0 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007988: 05 00 80 60 sethi %hi(0x2018000), %g2 200798c: 03 00 80 60 sethi %hi(0x2018000), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 2007990: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007994: c6 20 a2 94 st %g3, [ %g2 + 0x294 ] 2007998: c6 20 62 60 st %g3, [ %g1 + 0x260 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 200799c: b2 10 20 00 clr %i1 20079a0: b6 10 20 00 clr %i3 20079a4: 40 00 03 e0 call 2008924 <_Thread_Start> 20079a8: 99 e8 20 00 restore %g0, 0, %o4 20079ac: 01 00 00 00 nop 02007bc4 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 2007bc4: 86 10 00 08 mov %o0, %g3 uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 2007bc8: 80 a2 20 00 cmp %o0, 0 2007bcc: 02 80 00 1d be 2007c40 <_Thread_Get+0x7c> 2007bd0: 94 10 00 09 mov %o1, %o2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 2007bd4: 83 32 20 18 srl %o0, 0x18, %g1 2007bd8: 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 ) 2007bdc: 84 00 7f ff add %g1, -1, %g2 2007be0: 80 a0 a0 03 cmp %g2, 3 2007be4: 38 80 00 14 bgu,a 2007c34 <_Thread_Get+0x70> 2007be8: 82 10 20 01 mov 1, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 2007bec: 89 32 20 1b srl %o0, 0x1b, %g4 2007bf0: 80 a1 20 01 cmp %g4, 1 2007bf4: 12 80 00 0f bne 2007c30 <_Thread_Get+0x6c> 2007bf8: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 2007bfc: 03 00 80 60 sethi %hi(0x2018000), %g1 2007c00: 82 10 61 30 or %g1, 0x130, %g1 ! 2018130 <_Objects_Information_table> 2007c04: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 2007c08: 80 a0 60 00 cmp %g1, 0 2007c0c: 22 80 00 17 be,a 2007c68 <_Thread_Get+0xa4> 2007c10: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 2007c14: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 2007c18: 80 a2 20 00 cmp %o0, 0 2007c1c: 02 80 00 11 be 2007c60 <_Thread_Get+0x9c> 2007c20: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 2007c24: 82 13 c0 00 mov %o7, %g1 2007c28: 7f ff fd 56 call 2007180 <_Objects_Get> 2007c2c: 9e 10 40 00 mov %g1, %o7 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 2007c30: 82 10 20 01 mov 1, %g1 2007c34: 90 10 20 00 clr %o0 2007c38: 81 c3 e0 08 retl 2007c3c: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007c40: 03 00 80 60 sethi %hi(0x2018000), %g1 2007c44: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20181d0 <_Thread_Dispatch_disable_level> 2007c48: 84 00 a0 01 inc %g2 2007c4c: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 2007c50: 03 00 80 60 sethi %hi(0x2018000), %g1 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 2007c54: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 2007c58: 81 c3 e0 08 retl 2007c5c: d0 00 62 94 ld [ %g1 + 0x294 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 2007c60: 81 c3 e0 08 retl <== NOT EXECUTED 2007c64: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 2007c68: 81 c3 e0 08 retl 2007c6c: 90 10 20 00 clr %o0 0200d784 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200d784: 9d e3 bf 98 save %sp, -104, %sp #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200d788: 03 00 80 60 sethi %hi(0x2018000), %g1 200d78c: e0 00 62 94 ld [ %g1 + 0x294 ], %l0 ! 2018294 <_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(); 200d790: 3f 00 80 35 sethi %hi(0x200d400), %i7 200d794: be 17 e3 84 or %i7, 0x384, %i7 ! 200d784 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200d798: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200d79c: 7f ff d1 86 call 2001db4 200d7a0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 200d7a4: 07 00 80 5f sethi %hi(0x2017c00), %g3 doneConstructors = 1; 200d7a8: 82 10 20 01 mov 1, %g1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 200d7ac: e4 08 e2 e0 ldub [ %g3 + 0x2e0 ], %l2 doneConstructors = 1; 200d7b0: c2 28 e2 e0 stb %g1, [ %g3 + 0x2e0 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { 200d7b4: c4 04 21 60 ld [ %l0 + 0x160 ], %g2 200d7b8: 80 a0 a0 00 cmp %g2, 0 200d7bc: 02 80 00 0b be 200d7e8 <_Thread_Handler+0x64> 200d7c0: 23 00 80 60 sethi %hi(0x2018000), %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 ); 200d7c4: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 ! 2018258 <_Thread_Allocated_fp> 200d7c8: 80 a4 00 08 cmp %l0, %o0 200d7cc: 02 80 00 07 be 200d7e8 <_Thread_Handler+0x64> 200d7d0: 80 a2 20 00 cmp %o0, 0 if ( _Thread_Allocated_fp != NULL ) 200d7d4: 22 80 00 05 be,a 200d7e8 <_Thread_Handler+0x64> 200d7d8: e0 24 62 58 st %l0, [ %l1 + 0x258 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200d7dc: 7f ff ee ac call 200928c <_CPU_Context_save_fp> 200d7e0: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200d7e4: e0 24 62 58 st %l0, [ %l1 + 0x258 ] * 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 ); 200d7e8: 7f ff ed 0d call 2008c1c <_User_extensions_Thread_begin> 200d7ec: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200d7f0: 7f ff e8 e7 call 2007b8c <_Thread_Enable_dispatch> 200d7f4: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 200d7f8: 83 2c a0 18 sll %l2, 0x18, %g1 200d7fc: 80 a0 60 00 cmp %g1, 0 200d800: 02 80 00 1e be 200d878 <_Thread_Handler+0xf4> 200d804: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200d808: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200d80c: 80 a0 60 01 cmp %g1, 1 200d810: 22 80 00 21 be,a 200d894 <_Thread_Handler+0x110> 200d814: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200d818: 80 a0 60 01 cmp %g1, 1 200d81c: 1a 80 00 0c bcc 200d84c <_Thread_Handler+0xc8> 200d820: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 200d824: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200d828: 9f c0 40 00 call %g1 200d82c: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 200d830: d0 24 20 28 st %o0, [ %l0 + 0x28 ] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 200d834: 7f ff ed 0e call 2008c6c <_User_extensions_Thread_exitted> 200d838: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200d83c: 90 10 20 00 clr %o0 200d840: 92 10 20 01 mov 1, %o1 200d844: 7f ff e4 b7 call 2006b20 <_Internal_error_Occurred> 200d848: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200d84c: 22 80 00 16 be,a 200d8a4 <_Thread_Handler+0x120> <== NOT EXECUTED 200d850: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200d854: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 200d858: 12 bf ff f7 bne 200d834 <_Thread_Handler+0xb0> <== NOT EXECUTED 200d85c: 01 00 00 00 nop <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200d860: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200d864: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED 200d868: 9f c0 40 00 call %g1 <== NOT EXECUTED 200d86c: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED 200d870: 10 bf ff f1 b 200d834 <_Thread_Handler+0xb0> <== NOT EXECUTED 200d874: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED * 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 (); 200d878: 40 00 26 90 call 20172b8 <_init> 200d87c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200d880: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200d884: 80 a0 60 01 cmp %g1, 1 200d888: 12 bf ff e5 bne 200d81c <_Thread_Handler+0x98> 200d88c: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 200d890: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200d894: 9f c0 40 00 call %g1 200d898: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 200d89c: 10 bf ff e6 b 200d834 <_Thread_Handler+0xb0> 200d8a0: d0 24 20 28 st %o0, [ %l0 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 200d8a4: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200d8a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 200d8ac: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED 200d8b0: 10 bf ff e1 b 200d834 <_Thread_Handler+0xb0> <== NOT EXECUTED 200d8b4: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED 02007c74 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007c74: 9d e3 bf 98 save %sp, -104, %sp 2007c78: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007c7c: 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 ) { 2007c80: e4 00 40 00 ld [ %g1 ], %l2 2007c84: e6 07 a0 60 ld [ %fp + 0x60 ], %l3 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007c88: 02 80 00 69 be 2007e2c <_Thread_Initialize+0x1b8> 2007c8c: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 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; 2007c90: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 2007c94: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2007c98: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 2007c9c: 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 ) { 2007ca0: 80 8f 20 ff btst 0xff, %i4 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) { _Thread_Stack_Free( the_thread ); return FALSE; 2007ca4: b4 10 20 00 clr %i2 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2007ca8: 12 80 00 43 bne 2007db4 <_Thread_Initialize+0x140> 2007cac: 82 10 20 00 clr %g1 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007cb0: 37 00 80 60 sethi %hi(0x2018000), %i3 2007cb4: d0 06 e2 74 ld [ %i3 + 0x274 ], %o0 ! 2018274 <_Thread_Maximum_extensions> } else fp_area = NULL; the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 2007cb8: c2 26 60 cc st %g1, [ %i1 + 0xcc ] fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 2007cbc: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007cc0: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2007cc4: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007cc8: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007ccc: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 2007cd0: c0 26 61 64 clr [ %i1 + 0x164 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007cd4: 80 a2 20 00 cmp %o0, 0 2007cd8: 12 80 00 41 bne 2007ddc <_Thread_Initialize+0x168> 2007cdc: b8 16 e2 74 or %i3, 0x274, %i4 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 2007ce0: c0 26 61 74 clr [ %i1 + 0x174 ] 2007ce4: a0 10 20 00 clr %l0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007ce8: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2007cec: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007cf0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 2007cf4: 80 a4 e0 02 cmp %l3, 2 2007cf8: 12 80 00 05 bne 2007d0c <_Thread_Initialize+0x98> 2007cfc: e6 26 60 b0 st %l3, [ %i1 + 0xb0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007d00: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 2007d04: c4 00 61 28 ld [ %g1 + 0x128 ], %g2 ! 2018128 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 2007d08: c4 26 60 78 st %g2, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 2007d0c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007d10: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 2007d14: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2007d18: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007d1c: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2007d20: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 2007d24: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2007d28: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 2007d2c: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 2007d30: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007d34: 40 00 02 1a call 200859c <_Thread_Set_priority> 2007d38: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007d3c: c4 06 60 08 ld [ %i1 + 8 ], %g2 2007d40: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007d44: 03 00 00 3f sethi %hi(0xfc00), %g1 2007d48: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007d4c: 84 08 80 01 and %g2, %g1, %g2 2007d50: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2007d54: e4 26 60 0c st %l2, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 2007d58: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 2007d5c: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007d60: f2 20 c0 02 st %i1, [ %g3 + %g2 ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 2007d64: 90 10 00 19 mov %i1, %o0 2007d68: 40 00 03 e9 call 2008d0c <_User_extensions_Thread_create> 2007d6c: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 2007d70: 80 8a 20 ff btst 0xff, %o0 2007d74: 12 80 00 0e bne 2007dac <_Thread_Initialize+0x138> 2007d78: 80 a4 20 00 cmp %l0, 0 if ( extensions_area ) 2007d7c: 02 80 00 05 be 2007d90 <_Thread_Initialize+0x11c> <== NOT EXECUTED 2007d80: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 2007d84: 40 00 05 04 call 2009194 <_Workspace_Free> <== NOT EXECUTED 2007d88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007d8c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007d90: 02 80 00 05 be 2007da4 <_Thread_Initialize+0x130> <== NOT EXECUTED 2007d94: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007d98: 40 00 04 ff call 2009194 <_Workspace_Free> <== NOT EXECUTED 2007d9c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007da0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007da4: 40 00 02 ba call 200888c <_Thread_Stack_Free> <== NOT EXECUTED 2007da8: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 2007dac: 81 c7 e0 08 ret 2007db0: 81 e8 00 00 restore */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2007db4: 40 00 04 ff call 20091b0 <_Workspace_Allocate> 2007db8: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) { 2007dbc: b4 92 20 00 orcc %o0, 0, %i2 2007dc0: 12 bf ff bc bne 2007cb0 <_Thread_Initialize+0x3c> 2007dc4: 82 10 00 1a mov %i2, %g1 _Thread_Stack_Free( the_thread ); 2007dc8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007dcc: 40 00 02 b0 call 200888c <_Thread_Stack_Free> <== NOT EXECUTED 2007dd0: b0 10 20 00 clr %i0 <== NOT EXECUTED 2007dd4: 81 c7 e0 08 ret <== NOT EXECUTED 2007dd8: 81 e8 00 00 restore <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 2007ddc: 90 02 20 01 inc %o0 2007de0: 40 00 04 f4 call 20091b0 <_Workspace_Allocate> 2007de4: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 2007de8: a0 92 20 00 orcc %o0, 0, %l0 2007dec: 02 80 00 1b be 2007e58 <_Thread_Initialize+0x1e4> 2007df0: c2 06 e2 74 ld [ %i3 + 0x274 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007df4: 80 a0 7f ff cmp %g1, -1 2007df8: 02 bf ff bc be 2007ce8 <_Thread_Initialize+0x74> 2007dfc: e0 26 61 74 st %l0, [ %i1 + 0x174 ] 2007e00: 86 10 20 00 clr %g3 2007e04: 88 10 00 10 mov %l0, %g4 2007e08: c4 07 00 00 ld [ %i4 ], %g2 the_thread->extensions[i] = NULL; 2007e0c: 83 28 e0 02 sll %g3, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007e10: 86 00 e0 01 inc %g3 2007e14: 84 00 a0 01 inc %g2 2007e18: 80 a0 80 03 cmp %g2, %g3 2007e1c: 18 bf ff fb bgu 2007e08 <_Thread_Initialize+0x194> 2007e20: c0 21 00 01 clr [ %g4 + %g1 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007e24: 10 bf ff b2 b 2007cec <_Thread_Initialize+0x78> 2007e28: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2007e2c: 90 10 00 19 mov %i1, %o0 2007e30: 40 00 02 7b call 200881c <_Thread_Stack_Allocate> 2007e34: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2007e38: 80 a2 20 00 cmp %o0, 0 2007e3c: 02 80 00 0e be 2007e74 <_Thread_Initialize+0x200> 2007e40: 80 a6 c0 08 cmp %i3, %o0 2007e44: 18 80 00 0c bgu 2007e74 <_Thread_Initialize+0x200> 2007e48: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 2007e4c: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 2007e50: 10 bf ff 92 b 2007c98 <_Thread_Initialize+0x24> 2007e54: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007e58: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007e5c: 02 80 00 04 be 2007e6c <_Thread_Initialize+0x1f8> <== NOT EXECUTED 2007e60: 01 00 00 00 nop <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007e64: 40 00 04 cc call 2009194 <_Workspace_Free> <== NOT EXECUTED 2007e68: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007e6c: 40 00 02 88 call 200888c <_Thread_Stack_Free> <== NOT EXECUTED 2007e70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007e74: 81 c7 e0 08 ret 2007e78: 91 e8 20 00 restore %g0, 0, %o0 0200d680 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 200d680: 9d e3 bf 98 save %sp, -104, %sp the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 200d684: c4 1e 20 b0 ldd [ %i0 + 0xb0 ], %g2 Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200d688: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200d68c: c4 26 20 7c st %g2, [ %i0 + 0x7c ] Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200d690: c2 2e 20 76 stb %g1, [ %i0 + 0x76 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 200d694: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 200d698: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 200d69c: f4 26 20 a8 st %i2, [ %i0 + 0xa8 ] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 200d6a0: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 200d6a4: c0 26 20 70 clr [ %i0 + 0x70 ] the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 200d6a8: 7f ff ee 43 call 2008fb4 <_Thread_queue_Extract_with_proxy> 200d6ac: 90 10 00 18 mov %i0, %o0 200d6b0: 80 8a 20 ff btst 0xff, %o0 200d6b4: 32 80 00 07 bne,a 200d6d0 <_Thread_Reset+0x50> 200d6b8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200d6bc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200d6c0: 80 a0 60 02 cmp %g1, 2 200d6c4: 02 80 00 0c be 200d6f4 <_Thread_Reset+0x74> 200d6c8: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200d6cc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 200d6d0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200d6d4: 80 a0 40 19 cmp %g1, %i1 200d6d8: 02 80 00 05 be 200d6ec <_Thread_Reset+0x6c> 200d6dc: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 200d6e0: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 200d6e4: 7f ff ee bb call 20091d0 <_Thread_Set_priority> 200d6e8: 81 e8 00 00 restore 200d6ec: 81 c7 e0 08 ret 200d6f0: 81 e8 00 00 restore the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 200d6f4: 7f ff f1 69 call 2009c98 <_Watchdog_Remove> <== NOT EXECUTED 200d6f8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200d6fc: 10 bf ff f5 b 200d6d0 <_Thread_Reset+0x50> <== NOT EXECUTED 200d700: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 0200c934 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200c934: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200c938: 03 00 80 60 sethi %hi(0x2018000), %g1 200c93c: e0 00 62 94 ld [ %g1 + 0x294 ], %l0 ! 2018294 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200c940: 7f ff d5 19 call 2001da4 200c944: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200c948: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200c94c: c4 04 40 00 ld [ %l1 ], %g2 200c950: c2 04 60 08 ld [ %l1 + 8 ], %g1 200c954: 80 a0 80 01 cmp %g2, %g1 200c958: 02 80 00 18 be 200c9b8 <_Thread_Reset_timeslice+0x84> 200c95c: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200c960: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 200c964: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200c968: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c96c: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c970: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 200c974: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200c978: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c97c: 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; 200c980: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200c984: 7f ff d5 0c call 2001db4 200c988: 01 00 00 00 nop 200c98c: 7f ff d5 06 call 2001da4 200c990: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200c994: 07 00 80 60 sethi %hi(0x2018000), %g3 200c998: c2 00 e2 60 ld [ %g3 + 0x260 ], %g1 ! 2018260 <_Thread_Heir> 200c99c: 80 a4 00 01 cmp %l0, %g1 200c9a0: 02 80 00 08 be 200c9c0 <_Thread_Reset_timeslice+0x8c> 200c9a4: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 200c9a8: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 200c9ac: c4 28 62 a4 stb %g2, [ %g1 + 0x2a4 ] ! 20182a4 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 200c9b0: 7f ff d5 01 call 2001db4 <== NOT EXECUTED 200c9b4: 81 e8 00 00 restore <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 200c9b8: 7f ff d4 ff call 2001db4 200c9bc: 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; 200c9c0: c2 04 40 00 ld [ %l1 ], %g1 200c9c4: c2 20 e2 60 st %g1, [ %g3 + 0x260 ] _Context_Switch_necessary = TRUE; 200c9c8: 03 00 80 60 sethi %hi(0x2018000), %g1 200c9cc: c4 28 62 a4 stb %g2, [ %g1 + 0x2a4 ] ! 20182a4 <_Context_Switch_necessary> _ISR_Enable( level ); 200c9d0: 7f ff d4 f9 call 2001db4 200c9d4: 81 e8 00 00 restore 200c9d8: 01 00 00 00 nop 02009ee4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 2009ee4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2009ee8: 7f ff e2 cc call 2002a18 2009eec: 01 00 00 00 nop 2009ef0: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 2009ef4: 80 8e 60 ff btst 0xff, %i1 2009ef8: 22 80 00 0d be,a 2009f2c <_Thread_Resume+0x48> 2009efc: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 2009f00: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 2009f04: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 2009f08: 80 88 60 02 btst 2, %g1 2009f0c: 02 80 00 06 be 2009f24 <_Thread_Resume+0x40> 2009f10: 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); 2009f14: 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 ) ) { 2009f18: 80 a0 60 00 cmp %g1, 0 2009f1c: 02 80 00 0a be 2009f44 <_Thread_Resume+0x60> 2009f20: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 2009f24: 7f ff e2 c1 call 2002a28 2009f28: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 2009f2c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 2009f30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2009f34: 02 bf ff f4 be 2009f04 <_Thread_Resume+0x20> <== NOT EXECUTED 2009f38: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 2009f3c: 7f ff e2 bb call 2002a28 <== NOT EXECUTED 2009f40: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2009f44: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 2009f48: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2009f4c: c2 11 00 00 lduh [ %g4 ], %g1 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); 2009f50: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 2009f54: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009f58: 1b 00 80 93 sethi %hi(0x2024c00), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2009f5c: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009f60: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009f64: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 2009f68: c2 26 00 00 st %g1, [ %i0 ] 2009f6c: c4 13 60 c8 lduh [ %o5 + 0xc8 ], %g2 old_last_node = the_chain->last; 2009f70: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 2009f74: f0 20 e0 08 st %i0, [ %g3 + 8 ] 2009f78: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2009f7c: c8 26 20 04 st %g4, [ %i0 + 4 ] 2009f80: c4 33 60 c8 sth %g2, [ %o5 + 0xc8 ] 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; 2009f84: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 2009f88: 7f ff e2 a8 call 2002a28 2009f8c: 90 10 00 10 mov %l0, %o0 2009f90: 7f ff e2 a2 call 2002a18 2009f94: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 2009f98: 09 00 80 93 sethi %hi(0x2024c00), %g4 2009f9c: c4 01 20 a0 ld [ %g4 + 0xa0 ], %g2 ! 2024ca0 <_Thread_Heir> 2009fa0: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 2009fa4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2009fa8: 80 a0 c0 01 cmp %g3, %g1 2009fac: 1a bf ff de bcc 2009f24 <_Thread_Resume+0x40> 2009fb0: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009fb4: 03 00 80 93 sethi %hi(0x2024c00), %g1 2009fb8: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 ! 2024cd4 <_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; 2009fbc: f0 21 20 a0 st %i0, [ %g4 + 0xa0 ] if ( _Thread_Executing->is_preemptible || 2009fc0: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 2009fc4: 80 a0 60 00 cmp %g1, 0 2009fc8: 02 80 00 06 be 2009fe0 <_Thread_Resume+0xfc> 2009fcc: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009fd0: 84 10 20 01 mov 1, %g2 2009fd4: 03 00 80 93 sethi %hi(0x2024c00), %g1 2009fd8: c4 28 60 e4 stb %g2, [ %g1 + 0xe4 ] ! 2024ce4 <_Context_Switch_necessary> 2009fdc: 30 bf ff d2 b,a 2009f24 <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009fe0: 12 bf ff d1 bne 2009f24 <_Thread_Resume+0x40> 2009fe4: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009fe8: 10 bf ff fc b 2009fd8 <_Thread_Resume+0xf4> <== NOT EXECUTED 2009fec: 03 00 80 93 sethi %hi(0x2024c00), %g1 <== NOT EXECUTED 0200881c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 200881c: 9d e3 bf 98 save %sp, -104, %sp 2008820: 03 00 80 5c sethi %hi(0x2017000), %g1 2008824: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 20173a0 2008828: 80 a6 40 01 cmp %i1, %g1 200882c: 2a 80 00 02 bcs,a 2008834 <_Thread_Stack_Allocate+0x18> 2008830: b2 10 00 01 mov %g1, %i1 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 2008834: 03 00 80 60 sethi %hi(0x2018000), %g1 2008838: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 201826c <_Configuration_Table> 200883c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 2008840: 80 a0 60 00 cmp %g1, 0 2008844: 22 80 00 0a be,a 200886c <_Thread_Stack_Allocate+0x50> 2008848: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 200884c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008850: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008854: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 2008858: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 200885c: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 2008860: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 2008864: 81 c7 e0 08 ret <== NOT EXECUTED 2008868: 81 e8 00 00 restore <== NOT EXECUTED * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 200886c: 40 00 02 51 call 20091b0 <_Workspace_Allocate> 2008870: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008874: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 2008878: 80 a0 00 08 cmp %g0, %o0 200887c: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 2008880: b0 0e 40 18 and %i1, %i0, %i0 2008884: 81 c7 e0 08 ret 2008888: 81 e8 00 00 restore 0200888c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 200888c: 9d e3 bf 98 save %sp, -104, %sp /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 2008890: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 2008894: 80 a0 60 00 cmp %g1, 0 2008898: 02 80 00 09 be 20088bc <_Thread_Stack_Free+0x30> 200889c: 03 00 80 60 sethi %hi(0x2018000), %g1 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) 20088a0: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 201826c <_Configuration_Table> 20088a4: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 20088a8: 80 a0 60 00 cmp %g1, 0 20088ac: 22 80 00 06 be,a 20088c4 <_Thread_Stack_Free+0x38> 20088b0: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 20088b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20088b8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 20088bc: 81 c7 e0 08 ret <== NOT EXECUTED 20088c0: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 20088c4: 40 00 02 34 call 2009194 <_Workspace_Free> 20088c8: 81 e8 00 00 restore 20088cc: 01 00 00 00 nop 0200819c <_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 ) { 200819c: 9d e3 bf 98 save %sp, -104, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 20081a0: e4 06 60 14 ld [ %i1 + 0x14 ], %l2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20081a4: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20081a8: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20081ac: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 20081b0: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 20081b4: c4 26 60 40 st %g2, [ %i1 + 0x40 ] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 20081b8: ac 10 00 18 mov %i0, %l6 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 20081bc: 80 8c a0 20 btst 0x20, %l2 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 20081c0: 83 34 a0 06 srl %l2, 6, %g1 20081c4: 12 80 00 30 bne 2008284 <_Thread_queue_Enqueue_priority+0xe8> 20081c8: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20081cc: 85 28 60 04 sll %g1, 4, %g2 20081d0: 83 28 60 02 sll %g1, 2, %g1 20081d4: 82 20 80 01 sub %g2, %g1, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 20081d8: b0 10 00 01 mov %g1, %i0 20081dc: 82 05 80 01 add %l6, %g1, %g1 20081e0: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 20081e4: 7f ff e6 f0 call 2001da4 20081e8: 01 00 00 00 nop 20081ec: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 20081f0: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 20081f4: 80 a4 00 13 cmp %l0, %l3 20081f8: 32 80 00 18 bne,a 2008258 <_Thread_queue_Enqueue_priority+0xbc> 20081fc: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 2008200: 10 80 00 81 b 2008404 <_Thread_queue_Enqueue_priority+0x268> 2008204: a2 10 3f ff mov -1, %l1 if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 2008208: 80 a4 00 13 cmp %l0, %l3 200820c: 02 80 00 17 be 2008268 <_Thread_queue_Enqueue_priority+0xcc> 2008210: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 2008214: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2008218: 80 a4 80 11 cmp %l2, %l1 200821c: 28 80 00 14 bleu,a 200826c <_Thread_queue_Enqueue_priority+0xd0> 2008220: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 2008224: 7f ff e6 e4 call 2001db4 2008228: 90 10 00 14 mov %l4, %o0 200822c: 7f ff e6 de call 2001da4 2008230: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008234: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2008238: 80 8d 40 01 btst %l5, %g1 200823c: 02 80 00 6b be 20083e8 <_Thread_queue_Enqueue_priority+0x24c> 2008240: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 2008244: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 2008248: 80 a4 00 13 cmp %l0, %l3 200824c: 02 80 00 07 be 2008268 <_Thread_queue_Enqueue_priority+0xcc> 2008250: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 2008254: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2008258: 80 a4 80 11 cmp %l2, %l1 200825c: 38 bf ff eb bgu,a 2008208 <_Thread_queue_Enqueue_priority+0x6c> 2008260: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 2008264: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008268: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 200826c: 80 a6 20 01 cmp %i0, 1 2008270: 02 80 00 47 be 200838c <_Thread_queue_Enqueue_priority+0x1f0> 2008274: 80 a4 80 11 cmp %l2, %l1 * 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; 2008278: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 200827c: 81 c7 e0 08 ret <== NOT EXECUTED 2008280: 81 e8 00 00 restore <== NOT EXECUTED the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008284: 85 28 60 04 sll %g1, 4, %g2 2008288: 83 28 60 02 sll %g1, 2, %g1 200828c: 82 20 80 01 sub %g2, %g1, %g1 2008290: 05 00 80 5c sethi %hi(0x2017000), %g2 2008294: a6 06 00 01 add %i0, %g1, %l3 2008298: ae 10 a3 a4 or %g2, 0x3a4, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 200829c: b0 10 00 13 mov %l3, %i0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 20082a0: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 20082a4: 7f ff e6 c0 call 2001da4 20082a8: a2 00 60 01 add %g1, 1, %l1 20082ac: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 20082b0: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 20082b4: 80 a4 c0 10 cmp %l3, %l0 20082b8: 22 80 00 25 be,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 20082bc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 20082c0: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 20082c4: 80 a4 80 11 cmp %l2, %l1 20082c8: 3a 80 00 21 bcc,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 20082cc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 20082d0: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 20082d4: 80 a4 c0 10 cmp %l3, %l0 20082d8: 32 80 00 19 bne,a 200833c <_Thread_queue_Enqueue_priority+0x1a0> 20082dc: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 20082e0: 10 80 00 1b b 200834c <_Thread_queue_Enqueue_priority+0x1b0> 20082e4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 20082e8: 7f ff e6 b3 call 2001db4 20082ec: 90 10 00 14 mov %l4, %o0 20082f0: 7f ff e6 ad call 2001da4 20082f4: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20082f8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20082fc: 80 8d 40 01 btst %l5, %g1 2008300: 02 80 00 3d be 20083f4 <_Thread_queue_Enqueue_priority+0x258> 2008304: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 2008308: e0 04 20 04 ld [ %l0 + 4 ], %l0 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 ) ) { 200830c: 80 a4 00 13 cmp %l0, %l3 2008310: 22 80 00 0f be,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 2008314: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 2008318: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 200831c: 80 a4 80 11 cmp %l2, %l1 2008320: 3a 80 00 0b bcc,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 2008324: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2008328: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 200832c: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 2008330: 22 80 00 07 be,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 2008334: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 2008338: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 200833c: 80 a4 80 11 cmp %l2, %l1 2008340: 0a bf ff ea bcs 20082e8 <_Thread_queue_Enqueue_priority+0x14c> 2008344: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008348: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 200834c: 80 a6 20 01 cmp %i0, 1 2008350: 12 bf ff ca bne 2008278 <_Thread_queue_Enqueue_priority+0xdc> 2008354: 90 10 00 14 mov %l4, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2008358: 80 a4 80 11 cmp %l2, %l1 200835c: 02 80 00 18 be 20083bc <_Thread_queue_Enqueue_priority+0x220> 2008360: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2008364: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2008368: e0 26 60 04 st %l0, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 200836c: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 2008370: ec 26 60 44 st %l6, [ %i1 + 0x44 ] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 2008374: f2 20 60 04 st %i1, [ %g1 + 4 ] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 2008378: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 200837c: 7f ff e6 8e call 2001db4 2008380: 01 00 00 00 nop 2008384: 81 c7 e0 08 ret 2008388: 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 ) 200838c: 02 80 00 0c be 20083bc <_Thread_queue_Enqueue_priority+0x220> 2008390: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008394: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008398: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 200839c: 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; 20083a0: ec 26 60 44 st %l6, [ %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; 20083a4: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 20083a8: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20083ac: 7f ff e6 82 call 2001db4 20083b0: 90 10 00 14 mov %l4, %o0 20083b4: 81 c7 e0 08 ret 20083b8: 81 e8 00 00 restore 20083bc: 82 04 20 3c add %l0, 0x3c, %g1 _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; 20083c0: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 20083c4: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 20083c8: 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; 20083cc: ec 26 60 44 st %l6, [ %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; 20083d0: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 20083d4: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20083d8: 7f ff e6 77 call 2001db4 20083dc: b0 10 20 01 mov 1, %i0 20083e0: 81 c7 e0 08 ret 20083e4: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 20083e8: 7f ff e6 73 call 2001db4 <== NOT EXECUTED 20083ec: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 20083f0: 30 bf ff 7d b,a 20081e4 <_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 ); 20083f4: 7f ff e6 70 call 2001db4 <== NOT EXECUTED 20083f8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 20083fc: 10 bf ff aa b 20082a4 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 2008400: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008404: 10 bf ff 9a b 200826c <_Thread_queue_Enqueue_priority+0xd0> 2008408: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 0200d8b8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200d8b8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200d8bc: 7f ff d1 3a call 2001da4 200d8c0: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200d8c4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200d8c8: 03 00 00 ef sethi %hi(0x3bc00), %g1 200d8cc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200d8d0: 80 88 80 01 btst %g2, %g1 200d8d4: 02 80 00 19 be 200d938 <_Thread_queue_Extract_fifo+0x80> 200d8d8: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200d8dc: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 200d8e0: c4 06 60 04 ld [ %i1 + 4 ], %g2 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200d8e4: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 200d8e8: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200d8ec: c4 20 60 04 st %g2, [ %g1 + 4 ] 200d8f0: 80 a0 e0 02 cmp %g3, 2 200d8f4: 02 80 00 07 be 200d910 <_Thread_queue_Extract_fifo+0x58> 200d8f8: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 200d8fc: 7f ff d1 2e call 2001db4 200d900: 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 ); 200d904: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200d908: 7f ff e7 88 call 2007728 <_Thread_Clear_state> 200d90c: 81 e8 00 00 restore 200d910: 82 10 20 03 mov 3, %g1 200d914: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200d918: 7f ff d1 27 call 2001db4 200d91c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 200d920: 7f ff ed bc call 2009010 <_Watchdog_Remove> 200d924: 90 06 60 48 add %i1, 0x48, %o0 200d928: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200d92c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200d930: 7f ff e7 7e call 2007728 <_Thread_Clear_state> 200d934: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 200d938: 7f ff d1 1f call 2001db4 <== NOT EXECUTED 200d93c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200d940: 01 00 00 00 nop 0200c6bc <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 200c6bc: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 200c6c0: 7f ff d5 b9 call 2001da4 200c6c4: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200c6c8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200c6cc: 03 00 00 ef sethi %hi(0x3bc00), %g1 200c6d0: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200c6d4: 80 88 80 01 btst %g2, %g1 200c6d8: 02 80 00 23 be 200c764 <_Thread_queue_Extract_priority_helper+0xa8> 200c6dc: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200c6e0: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 200c6e4: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200c6e8: 80 a0 c0 01 cmp %g3, %g1 200c6ec: 02 80 00 2a be 200c794 <_Thread_queue_Extract_priority_helper+0xd8> 200c6f0: c2 06 60 04 ld [ %i1 + 4 ], %g1 new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 200c6f4: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 200c6f8: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 200c6fc: c6 20 a0 04 st %g3, [ %g2 + 4 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 200c700: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 200c704: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 200c708: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 200c70c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 200c710: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 200c714: 80 a0 80 01 cmp %g2, %g1 200c718: 02 80 00 07 be 200c734 <_Thread_queue_Extract_priority_helper+0x78> 200c71c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 200c720: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 200c724: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 200c728: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 200c72c: 82 00 e0 3c add %g3, 0x3c, %g1 200c730: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 200c734: 80 8e a0 ff btst 0xff, %i2 200c738: 12 80 00 0d bne 200c76c <_Thread_queue_Extract_priority_helper+0xb0> 200c73c: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200c740: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200c744: 80 a0 60 02 cmp %g1, 2 200c748: 02 80 00 0b be 200c774 <_Thread_queue_Extract_priority_helper+0xb8> 200c74c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200c750: 7f ff d5 99 call 2001db4 200c754: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200c758: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200c75c: 7f ff eb f3 call 2007728 <_Thread_Clear_state> 200c760: 81 e8 00 00 restore Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 200c764: 7f ff d5 94 call 2001db4 <== NOT EXECUTED 200c768: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 200c76c: 7f ff d5 92 call 2001db4 200c770: 91 e8 00 08 restore %g0, %o0, %o0 200c774: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200c778: 7f ff d5 8f call 2001db4 200c77c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200c780: 7f ff f2 24 call 2009010 <_Watchdog_Remove> 200c784: 90 06 20 48 add %i0, 0x48, %o0 200c788: b2 16 63 f8 or %i1, 0x3f8, %i1 200c78c: 7f ff eb e7 call 2007728 <_Thread_Clear_state> 200c790: 81 e8 00 00 restore new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 200c794: c2 20 a0 04 st %g1, [ %g2 + 4 ] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 200c798: 10 bf ff e7 b 200c734 <_Thread_queue_Extract_priority_helper+0x78> 200c79c: c4 20 40 00 st %g2, [ %g1 ] 0200c7a0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 200c7a0: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 200c7a4: d0 02 20 44 ld [ %o0 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 200c7a8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 200c7ac: 80 a0 e0 00 cmp %g3, 0 200c7b0: 02 80 00 06 be 200c7c8 <_Thread_queue_Process_timeout+0x28> 200c7b4: 03 00 80 60 sethi %hi(0x2018000), %g1 200c7b8: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 200c7bc: 80 a2 40 02 cmp %o1, %g2 200c7c0: 02 80 00 07 be 200c7dc <_Thread_queue_Process_timeout+0x3c> 200c7c4: 80 a0 e0 03 cmp %g3, 3 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200c7c8: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200c7cc: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200c7d0: 82 13 c0 00 mov %o7, %g1 200c7d4: 7f ff ff af call 200c690 <_Thread_queue_Extract> 200c7d8: 9e 10 40 00 mov %g1, %o7 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 200c7dc: 02 80 00 06 be 200c7f4 <_Thread_queue_Process_timeout+0x54> 200c7e0: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200c7e4: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200c7e8: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200c7ec: 81 c3 e0 08 retl 200c7f0: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 200c7f4: 81 c3 e0 08 retl <== NOT EXECUTED 200c7f8: 01 00 00 00 nop 020084dc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20084dc: 9d e3 bf 90 save %sp, -112, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 20084e0: 80 a6 20 00 cmp %i0, 0 20084e4: 02 80 00 13 be 2008530 <_Thread_queue_Requeue+0x54> 20084e8: 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 ) { 20084ec: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 20084f0: 80 a4 20 01 cmp %l0, 1 20084f4: 02 80 00 04 be 2008504 <_Thread_queue_Requeue+0x28> 20084f8: 01 00 00 00 nop 20084fc: 81 c7 e0 08 ret <== NOT EXECUTED 2008500: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2008504: 7f ff e6 28 call 2001da4 2008508: 01 00 00 00 nop 200850c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2008510: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2008514: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008518: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200851c: 80 88 80 01 btst %g2, %g1 2008520: 12 80 00 06 bne 2008538 <_Thread_queue_Requeue+0x5c> 2008524: 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 ); 2008528: 7f ff e6 23 call 2001db4 200852c: 90 10 00 11 mov %l1, %o0 2008530: 81 c7 e0 08 ret 2008534: 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 ); 2008538: 92 10 00 19 mov %i1, %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; 200853c: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 2008540: 40 00 10 5f call 200c6bc <_Thread_queue_Extract_priority_helper> 2008544: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2008548: 90 10 00 18 mov %i0, %o0 200854c: 92 10 00 19 mov %i1, %o1 2008550: 7f ff ff 13 call 200819c <_Thread_queue_Enqueue_priority> 2008554: 94 07 bf f4 add %fp, -12, %o2 2008558: 30 bf ff f4 b,a 2008528 <_Thread_queue_Requeue+0x4c> 02011b30 <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 2011b30: 9d e3 bf 98 save %sp, -104, %sp 2011b34: 03 00 80 c8 sethi %hi(0x2032000), %g1 break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 2011b38: 05 00 80 c8 sethi %hi(0x2032000), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011b3c: a0 10 60 54 or %g1, 0x54, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 2011b40: 03 00 80 c8 sethi %hi(0x2032000), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 2011b44: a4 10 a0 48 or %g2, 0x48, %l2 the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 2011b48: a2 10 60 34 or %g1, 0x34, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011b4c: 40 00 02 ca call 2012674 <_Chain_Get> 2011b50: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011b54: 80 a2 20 00 cmp %o0, 0 2011b58: 02 80 00 0f be 2011b94 <_Timer_Server_process_insertions+0x64> 2011b5c: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2011b60: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011b64: 80 a0 60 01 cmp %g1, 1 2011b68: 02 80 00 12 be 2011bb0 <_Timer_Server_process_insertions+0x80> 2011b6c: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2011b70: 02 80 00 0b be 2011b9c <_Timer_Server_process_insertions+0x6c> 2011b74: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011b78: 7f ff ff ee call 2011b30 <_Timer_Server_process_insertions> <== NOT EXECUTED 2011b7c: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011b80: 40 00 02 bd call 2012674 <_Chain_Get> 2011b84: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011b88: 80 a2 20 00 cmp %o0, 0 2011b8c: 32 bf ff f6 bne,a 2011b64 <_Timer_Server_process_insertions+0x34> 2011b90: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 2011b94: 81 c7 e0 08 ret 2011b98: 81 e8 00 00 restore break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 2011b9c: 40 00 12 58 call 20164fc <_Watchdog_Insert> 2011ba0: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011ba4: 7f ff ff e3 call 2011b30 <_Timer_Server_process_insertions> 2011ba8: 01 00 00 00 nop 2011bac: 30 bf ff f5 b,a 2011b80 <_Timer_Server_process_insertions+0x50> the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 2011bb0: 92 02 20 10 add %o0, 0x10, %o1 2011bb4: 40 00 12 52 call 20164fc <_Watchdog_Insert> 2011bb8: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011bbc: 7f ff ff dd call 2011b30 <_Timer_Server_process_insertions> 2011bc0: 01 00 00 00 nop 2011bc4: 30 bf ff ef b,a 2011b80 <_Timer_Server_process_insertions+0x50> 0200a714 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a714: 9d e3 bf 98 save %sp, -104, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a718: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 200a71c: de 06 60 04 ld [ %i1 + 4 ], %o7 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a720: 91 38 60 1f sra %g1, 0x1f, %o0 200a724: 92 10 00 01 mov %g1, %o1 200a728: 83 30 60 1d srl %g1, 0x1d, %g1 200a72c: 87 2a 60 03 sll %o1, 3, %g3 200a730: 85 2a 20 03 sll %o0, 3, %g2 200a734: 84 10 40 02 or %g1, %g2, %g2 200a738: 83 30 e0 1b srl %g3, 0x1b, %g1 200a73c: 99 28 a0 05 sll %g2, 5, %o4 200a740: 9b 28 e0 05 sll %g3, 5, %o5 200a744: 98 10 40 0c or %g1, %o4, %o4 200a748: 9a a3 40 03 subcc %o5, %g3, %o5 200a74c: 83 33 60 1a srl %o5, 0x1a, %g1 200a750: 98 63 00 02 subx %o4, %g2, %o4 200a754: 97 2b 60 06 sll %o5, 6, %o3 200a758: 95 2b 20 06 sll %o4, 6, %o2 200a75c: 96 a2 c0 0d subcc %o3, %o5, %o3 200a760: 94 10 40 0a or %g1, %o2, %o2 200a764: 94 62 80 0c subx %o2, %o4, %o2 200a768: 96 82 c0 09 addcc %o3, %o1, %o3 200a76c: 94 42 80 08 addx %o2, %o0, %o2 200a770: 83 32 e0 1e srl %o3, 0x1e, %g1 200a774: 85 2a a0 02 sll %o2, 2, %g2 200a778: 84 10 40 02 or %g1, %g2, %g2 200a77c: 87 2a e0 02 sll %o3, 2, %g3 200a780: 96 82 c0 03 addcc %o3, %g3, %o3 200a784: 94 42 80 02 addx %o2, %g2, %o2 200a788: 83 32 e0 1e srl %o3, 0x1e, %g1 200a78c: 85 2a a0 02 sll %o2, 2, %g2 200a790: 84 10 40 02 or %g1, %g2, %g2 200a794: 87 2a e0 02 sll %o3, 2, %g3 200a798: 96 82 c0 03 addcc %o3, %g3, %o3 200a79c: 94 42 80 02 addx %o2, %g2, %o2 200a7a0: 83 32 e0 1e srl %o3, 0x1e, %g1 200a7a4: 85 2a a0 02 sll %o2, 2, %g2 200a7a8: 84 10 40 02 or %g1, %g2, %g2 200a7ac: 87 2a e0 02 sll %o3, 2, %g3 200a7b0: 96 82 c0 03 addcc %o3, %g3, %o3 200a7b4: 94 42 80 02 addx %o2, %g2, %o2 200a7b8: 85 32 e0 17 srl %o3, 0x17, %g2 200a7bc: 83 2a a0 09 sll %o2, 9, %g1 200a7c0: 9b 2a e0 09 sll %o3, 9, %o5 200a7c4: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 200a7c8: 96 83 40 0f addcc %o5, %o7, %o3 200a7cc: 85 3b e0 1f sra %o7, 0x1f, %g2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 200a7d0: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a7d4: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 200a7d8: 80 92 80 0b orcc %o2, %o3, %g0 200a7dc: 02 80 00 5d be 200a950 <_Timespec_Divide+0x23c> 200a7e0: d0 06 00 00 ld [ %i0 ], %o0 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a7e4: 92 10 00 08 mov %o0, %o1 200a7e8: 83 32 60 1d srl %o1, 0x1d, %g1 200a7ec: 9b 2a 60 03 sll %o1, 3, %o5 200a7f0: 91 3a 20 1f sra %o0, 0x1f, %o0 200a7f4: 99 2a 20 03 sll %o0, 3, %o4 200a7f8: 98 10 40 0c or %g1, %o4, %o4 200a7fc: 83 33 60 1b srl %o5, 0x1b, %g1 200a800: 85 2b 20 05 sll %o4, 5, %g2 200a804: 87 2b 60 05 sll %o5, 5, %g3 200a808: 84 10 40 02 or %g1, %g2, %g2 200a80c: 86 a0 c0 0d subcc %g3, %o5, %g3 200a810: 83 30 e0 1a srl %g3, 0x1a, %g1 200a814: 84 60 80 0c subx %g2, %o4, %g2 200a818: 9b 28 e0 06 sll %g3, 6, %o5 200a81c: 99 28 a0 06 sll %g2, 6, %o4 200a820: 9a a3 40 03 subcc %o5, %g3, %o5 200a824: 98 10 40 0c or %g1, %o4, %o4 200a828: 98 63 00 02 subx %o4, %g2, %o4 200a82c: 9a 83 40 09 addcc %o5, %o1, %o5 200a830: 83 33 60 1e srl %o5, 0x1e, %g1 200a834: 98 43 00 08 addx %o4, %o0, %o4 200a838: 87 2b 60 02 sll %o5, 2, %g3 200a83c: 85 2b 20 02 sll %o4, 2, %g2 200a840: 9a 83 40 03 addcc %o5, %g3, %o5 200a844: 84 10 40 02 or %g1, %g2, %g2 200a848: 83 33 60 1e srl %o5, 0x1e, %g1 200a84c: 98 43 00 02 addx %o4, %g2, %o4 200a850: 87 2b 60 02 sll %o5, 2, %g3 200a854: 85 2b 20 02 sll %o4, 2, %g2 200a858: 9a 83 40 03 addcc %o5, %g3, %o5 200a85c: 84 10 40 02 or %g1, %g2, %g2 200a860: 83 33 60 1e srl %o5, 0x1e, %g1 200a864: 98 43 00 02 addx %o4, %g2, %o4 200a868: 87 2b 60 02 sll %o5, 2, %g3 200a86c: 85 2b 20 02 sll %o4, 2, %g2 200a870: 9a 83 40 03 addcc %o5, %g3, %o5 200a874: 84 10 40 02 or %g1, %g2, %g2 200a878: 98 43 00 02 addx %o4, %g2, %o4 200a87c: 83 2b 20 09 sll %o4, 9, %g1 200a880: 89 33 60 17 srl %o5, 0x17, %g4 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a884: a6 10 00 12 mov %l2, %l3 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a888: a0 11 00 01 or %g4, %g1, %l0 200a88c: a3 2b 60 09 sll %o5, 9, %l1 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a890: a2 84 40 13 addcc %l1, %l3, %l1 200a894: 83 34 60 1e srl %l1, 0x1e, %g1 200a898: 87 2c 60 02 sll %l1, 2, %g3 200a89c: a5 3c a0 1f sra %l2, 0x1f, %l2 200a8a0: a0 44 00 12 addx %l0, %l2, %l0 200a8a4: 85 2c 20 02 sll %l0, 2, %g2 200a8a8: 84 10 40 02 or %g1, %g2, %g2 200a8ac: 83 30 e0 1b srl %g3, 0x1b, %g1 200a8b0: 99 28 a0 05 sll %g2, 5, %o4 200a8b4: 9b 28 e0 05 sll %g3, 5, %o5 200a8b8: 98 10 40 0c or %g1, %o4, %o4 200a8bc: 9a a3 40 03 subcc %o5, %g3, %o5 200a8c0: 98 63 00 02 subx %o4, %g2, %o4 200a8c4: 9a 83 40 11 addcc %o5, %l1, %o5 200a8c8: 83 33 60 1e srl %o5, 0x1e, %g1 200a8cc: 98 43 00 10 addx %o4, %l0, %o4 200a8d0: 87 2b 60 02 sll %o5, 2, %g3 200a8d4: 85 2b 20 02 sll %o4, 2, %g2 200a8d8: 9a 83 40 03 addcc %o5, %g3, %o5 200a8dc: 84 10 40 02 or %g1, %g2, %g2 200a8e0: 83 33 60 1e srl %o5, 0x1e, %g1 200a8e4: 87 2b 60 02 sll %o5, 2, %g3 200a8e8: 98 43 00 02 addx %o4, %g2, %o4 200a8ec: 9a 83 40 03 addcc %o5, %g3, %o5 200a8f0: 85 2b 20 02 sll %o4, 2, %g2 200a8f4: 84 10 40 02 or %g1, %g2, %g2 200a8f8: 83 33 60 1b srl %o5, 0x1b, %g1 200a8fc: 98 43 00 02 addx %o4, %g2, %o4 200a900: 99 2b 20 05 sll %o4, 5, %o4 200a904: 98 10 40 0c or %g1, %o4, %o4 200a908: 93 2b 60 05 sll %o5, 5, %o1 200a90c: 40 00 36 52 call 2018254 <__udivdi3> 200a910: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 200a914: 94 10 20 00 clr %o2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a918: a0 10 00 08 mov %o0, %l0 200a91c: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 200a920: 96 10 23 e8 mov 0x3e8, %o3 200a924: 40 00 36 4c call 2018254 <__udivdi3> 200a928: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 200a92c: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a930: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 200a934: 94 10 20 00 clr %o2 200a938: 92 10 00 11 mov %l1, %o1 200a93c: 40 00 37 22 call 20185c4 <__umoddi3> 200a940: 96 10 23 e8 mov 0x3e8, %o3 200a944: d2 26 c0 00 st %o1, [ %i3 ] 200a948: 81 c7 e0 08 ret 200a94c: 81 e8 00 00 restore left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 200a950: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 200a954: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 200a958: 81 c7 e0 08 ret <== NOT EXECUTED 200a95c: 81 e8 00 00 restore <== NOT EXECUTED 0200f330 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 200f330: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 200f334: 40 00 15 24 call 20147c4 <_Chain_Extract> 200f338: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 200f33c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200f340: 80 a0 60 00 cmp %g1, 0 200f344: 02 80 00 04 be 200f354 <_User_extensions_Remove_set+0x24> 200f348: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 200f34c: 40 00 15 1e call 20147c4 <_Chain_Extract> <== NOT EXECUTED 200f350: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 200f354: 81 c7 e0 08 ret 200f358: 81 e8 00 00 restore 02008d0c <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2008d0c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 2008d10: 03 00 80 61 sethi %hi(0x2018400), %g1 2008d14: e0 00 60 08 ld [ %g1 + 8 ], %l0 ! 2018408 <_User_extensions_List> 2008d18: 82 10 60 08 or %g1, 8, %g1 2008d1c: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008d20: 80 a4 00 11 cmp %l0, %l1 2008d24: 02 80 00 10 be 2008d64 <_User_extensions_Thread_create+0x58> 2008d28: 03 00 80 60 sethi %hi(0x2018000), %g1 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)( 2008d2c: a4 10 62 94 or %g1, 0x294, %l2 ! 2018294 <_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 ) { 2008d30: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2008d34: 80 a0 60 00 cmp %g1, 0 2008d38: 02 80 00 07 be 2008d54 <_User_extensions_Thread_create+0x48> 2008d3c: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2008d40: 9f c0 40 00 call %g1 2008d44: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 2008d48: 80 8a 20 ff btst 0xff, %o0 2008d4c: 02 80 00 08 be 2008d6c <_User_extensions_Thread_create+0x60> 2008d50: 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 ) { 2008d54: e0 04 00 00 ld [ %l0 ], %l0 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008d58: 80 a4 00 11 cmp %l0, %l1 2008d5c: 32 bf ff f6 bne,a 2008d34 <_User_extensions_Thread_create+0x28> 2008d60: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 2008d64: 81 c7 e0 08 ret 2008d68: 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 ) 2008d6c: 81 c7 e0 08 ret <== NOT EXECUTED 2008d70: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0200ace8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200ace8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200acec: 7f ff df 4b call 2002a18 200acf0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200acf4: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200acf8: a0 06 20 04 add %i0, 4, %l0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200acfc: 80 a0 80 10 cmp %g2, %l0 200ad00: 02 80 00 1f be 200ad7c <_Watchdog_Adjust+0x94> 200ad04: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200ad08: 12 80 00 1f bne 200ad84 <_Watchdog_Adjust+0x9c> 200ad0c: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200ad10: 80 a6 a0 00 cmp %i2, 0 200ad14: 02 80 00 1a be 200ad7c <_Watchdog_Adjust+0x94> 200ad18: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200ad1c: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200ad20: 80 a6 80 19 cmp %i2, %i1 200ad24: 1a 80 00 0b bcc 200ad50 <_Watchdog_Adjust+0x68> 200ad28: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 200ad2c: 10 80 00 1d b 200ada0 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200ad30: 82 26 40 1a sub %i1, %i2, %g1 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200ad34: b4 a6 80 19 subcc %i2, %i1, %i2 200ad38: 02 80 00 11 be 200ad7c <_Watchdog_Adjust+0x94> 200ad3c: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200ad40: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200ad44: 80 a6 40 1a cmp %i1, %i2 200ad48: 18 80 00 16 bgu 200ada0 <_Watchdog_Adjust+0xb8> 200ad4c: 82 26 40 1a sub %i1, %i2, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 200ad50: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 200ad54: 7f ff df 35 call 2002a28 200ad58: 01 00 00 00 nop _Watchdog_Tickle( header ); 200ad5c: 40 00 00 b4 call 200b02c <_Watchdog_Tickle> 200ad60: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200ad64: 7f ff df 2d call 2002a18 200ad68: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200ad6c: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 200ad70: 80 a4 00 01 cmp %l0, %g1 200ad74: 12 bf ff f0 bne 200ad34 <_Watchdog_Adjust+0x4c> 200ad78: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 200ad7c: 7f ff df 2b call 2002a28 200ad80: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200ad84: 12 bf ff fe bne 200ad7c <_Watchdog_Adjust+0x94> 200ad88: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200ad8c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200ad90: 82 00 40 1a add %g1, %i2, %g1 200ad94: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 200ad98: 7f ff df 24 call 2002a28 200ad9c: 91 e8 00 08 restore %g0, %o0, %o0 _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 200ada0: 10 bf ff f7 b 200ad7c <_Watchdog_Adjust+0x94> 200ada4: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 0201642c <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 201642c: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 2016430: a2 96 60 00 orcc %i1, 0, %l1 2016434: 12 80 00 04 bne 2016444 <_Watchdog_Adjust_to_chain+0x18> 2016438: 01 00 00 00 nop 201643c: 81 c7 e0 08 ret 2016440: 81 e8 00 00 restore return; } _ISR_Disable( level ); 2016444: 7f ff d3 7c call 200b234 2016448: 01 00 00 00 nop 201644c: a6 10 00 08 mov %o0, %l3 2016450: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2016454: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 2016458: 80 a0 80 10 cmp %g2, %l0 201645c: 02 80 00 25 be 20164f0 <_Watchdog_Adjust_to_chain+0xc4> 2016460: a4 06 a0 04 add %i2, 4, %l2 2016464: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 2016468: 80 a6 40 11 cmp %i1, %l1 201646c: 18 80 00 20 bgu 20164ec <_Watchdog_Adjust_to_chain+0xc0> 2016470: 82 26 40 11 sub %i1, %l1, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 2016474: 10 80 00 15 b 20164c8 <_Watchdog_Adjust_to_chain+0x9c> 2016478: c0 20 a0 10 clr [ %g2 + 0x10 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 201647c: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 2016480: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2016484: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 2016488: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 201648c: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2016490: c2 20 a0 04 st %g1, [ %g2 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 2016494: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 2016498: 7f ff d3 6b call 200b244 201649c: 90 10 00 13 mov %l3, %o0 20164a0: 7f ff d3 65 call 200b234 20164a4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20164a8: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 20164ac: 80 a4 00 02 cmp %l0, %g2 20164b0: 02 80 00 10 be 20164f0 <_Watchdog_Adjust_to_chain+0xc4> 20164b4: 01 00 00 00 nop 20164b8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20164bc: 80 a0 60 00 cmp %g1, 0 20164c0: 32 80 00 07 bne,a 20164dc <_Watchdog_Adjust_to_chain+0xb0> 20164c4: a2 a4 40 19 subcc %l1, %i1, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 20164c8: 80 a4 00 02 cmp %l0, %g2 20164cc: 32 bf ff ec bne,a 201647c <_Watchdog_Adjust_to_chain+0x50> 20164d0: c2 00 80 00 ld [ %g2 ], %g1 20164d4: 10 bf ff ec b 2016484 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 20164d8: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 20164dc: 02 80 00 05 be 20164f0 <_Watchdog_Adjust_to_chain+0xc4> 20164e0: 01 00 00 00 nop 20164e4: 10 bf ff e1 b 2016468 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 20164e8: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 20164ec: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 20164f0: 7f ff d3 55 call 200b244 20164f4: 91 e8 00 13 restore %g0, %l3, %o0 20164f8: 01 00 00 00 nop 02008e64 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008e64: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 2008e68: 03 00 80 60 sethi %hi(0x2018000), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008e6c: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 2008e70: e6 00 62 70 ld [ %g1 + 0x270 ], %l3 _ISR_Disable( level ); 2008e74: 7f ff e3 cc call 2001da4 2008e78: 01 00 00 00 nop 2008e7c: b0 10 00 08 mov %o0, %i0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 2008e80: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008e84: 80 a0 60 00 cmp %g1, 0 2008e88: 12 80 00 4a bne 2008fb0 <_Watchdog_Insert+0x14c> 2008e8c: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 2008e90: 2b 00 80 60 sethi %hi(0x2018000), %l5 2008e94: c2 05 63 20 ld [ %l5 + 0x320 ], %g1 ! 2018320 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008e98: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 2008e9c: 82 00 60 01 inc %g1 2008ea0: 2f 00 80 60 sethi %hi(0x2018000), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008ea4: c4 26 60 08 st %g2, [ %i1 + 8 ] 2008ea8: a8 15 e2 90 or %l7, 0x290, %l4 _Watchdog_Sync_count++; 2008eac: c2 25 63 20 st %g1, [ %l5 + 0x320 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 2008eb0: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008eb4: e4 06 60 0c ld [ %i1 + 0xc ], %l2 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 2008eb8: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 2008ebc: 80 a4 a0 00 cmp %l2, 0 2008ec0: 02 80 00 2b be 2008f6c <_Watchdog_Insert+0x108> 2008ec4: 03 00 80 60 sethi %hi(0x2018000), %g1 2008ec8: c2 04 40 00 ld [ %l1 ], %g1 2008ecc: 80 a0 60 00 cmp %g1, 0 2008ed0: 02 80 00 27 be 2008f6c <_Watchdog_Insert+0x108> 2008ed4: 03 00 80 60 sethi %hi(0x2018000), %g1 break; if ( delta_interval < after->delta_interval ) { 2008ed8: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008edc: 80 a4 80 10 cmp %l2, %l0 2008ee0: 1a 80 00 13 bcc 2008f2c <_Watchdog_Insert+0xc8> 2008ee4: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 2008ee8: 10 80 00 20 b 2008f68 <_Watchdog_Insert+0x104> 2008eec: c2 24 60 10 st %g1, [ %l1 + 0x10 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 2008ef0: c2 05 00 00 ld [ %l4 ], %g1 2008ef4: 80 a4 c0 01 cmp %l3, %g1 2008ef8: 0a 80 00 30 bcs 2008fb8 <_Watchdog_Insert+0x154> 2008efc: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 2008f00: a4 a4 80 10 subcc %l2, %l0, %l2 2008f04: 02 80 00 19 be 2008f68 <_Watchdog_Insert+0x104> 2008f08: e2 04 40 00 ld [ %l1 ], %l1 2008f0c: c2 04 40 00 ld [ %l1 ], %g1 2008f10: 80 a0 60 00 cmp %g1, 0 2008f14: 02 80 00 16 be 2008f6c <_Watchdog_Insert+0x108> 2008f18: 03 00 80 60 sethi %hi(0x2018000), %g1 break; if ( delta_interval < after->delta_interval ) { 2008f1c: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008f20: 80 a4 00 12 cmp %l0, %l2 2008f24: 18 80 00 10 bgu 2008f64 <_Watchdog_Insert+0x100> 2008f28: 82 24 00 12 sub %l0, %l2, %g1 * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 2008f2c: 7f ff e3 a2 call 2001db4 2008f30: 90 10 00 18 mov %i0, %o0 2008f34: 7f ff e3 9c call 2001da4 2008f38: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 2008f3c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008f40: 80 a0 60 01 cmp %g1, 1 2008f44: 02 bf ff eb be 2008ef0 <_Watchdog_Insert+0x8c> 2008f48: 01 00 00 00 nop _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 2008f4c: e6 25 e2 90 st %l3, [ %l7 + 0x290 ] <== NOT EXECUTED _Watchdog_Sync_count--; 2008f50: c2 05 63 20 ld [ %l5 + 0x320 ], %g1 <== NOT EXECUTED 2008f54: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2008f58: c2 25 63 20 st %g1, [ %l5 + 0x320 ] <== NOT EXECUTED _ISR_Enable( level ); 2008f5c: 7f ff e3 96 call 2001db4 <== NOT EXECUTED 2008f60: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 2008f64: c2 24 60 10 st %g1, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 2008f68: 03 00 80 60 sethi %hi(0x2018000), %g1 2008f6c: c6 00 63 24 ld [ %g1 + 0x324 ], %g3 ! 2018324 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 2008f70: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 2008f74: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 2008f78: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 2008f7c: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2008f80: c8 00 80 00 ld [ %g2 ], %g4 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 2008f84: e6 25 e2 90 st %l3, [ %l7 + 0x290 ] 2008f88: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 2008f8c: c2 05 63 20 ld [ %l5 + 0x320 ], %g1 after_node->next = the_node; 2008f90: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2008f94: c4 26 60 04 st %g2, [ %i1 + 4 ] 2008f98: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 2008f9c: f2 21 20 04 st %i1, [ %g4 + 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; 2008fa0: c8 26 40 00 st %g4, [ %i1 ] 2008fa4: c2 25 63 20 st %g1, [ %l5 + 0x320 ] _ISR_Enable( level ); 2008fa8: 7f ff e3 83 call 2001db4 2008fac: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 2008fb0: 7f ff e3 81 call 2001db4 <== NOT EXECUTED 2008fb4: 81 e8 00 00 restore <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 2008fb8: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008fbc: 10 bf ff bf b 2008eb8 <_Watchdog_Insert+0x54> 2008fc0: e4 06 60 0c ld [ %i1 + 0xc ], %l2 02009010 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2009010: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009014: 7f ff e3 64 call 2001da4 2009018: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 200901c: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2009020: 80 a6 20 01 cmp %i0, 1 2009024: 02 80 00 2a be 20090cc <_Watchdog_Remove+0xbc> 2009028: 03 00 80 60 sethi %hi(0x2018000), %g1 200902c: 1a 80 00 09 bcc 2009050 <_Watchdog_Remove+0x40> 2009030: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009034: 03 00 80 60 sethi %hi(0x2018000), %g1 2009038: c4 00 63 24 ld [ %g1 + 0x324 ], %g2 ! 2018324 <_Watchdog_Ticks_since_boot> 200903c: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 2009040: 7f ff e3 5d call 2001db4 2009044: 01 00 00 00 nop return( previous_state ); } 2009048: 81 c7 e0 08 ret 200904c: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 2009050: 18 bf ff fa bgu 2009038 <_Watchdog_Remove+0x28> 2009054: 03 00 80 60 sethi %hi(0x2018000), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 2009058: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200905c: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2009060: c2 01 00 00 ld [ %g4 ], %g1 2009064: 80 a0 60 00 cmp %g1, 0 2009068: 02 80 00 07 be 2009084 <_Watchdog_Remove+0x74> 200906c: 03 00 80 60 sethi %hi(0x2018000), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2009070: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 2009074: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 2009078: 82 00 40 02 add %g1, %g2, %g1 200907c: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 2009080: 03 00 80 60 sethi %hi(0x2018000), %g1 2009084: c4 00 63 20 ld [ %g1 + 0x320 ], %g2 ! 2018320 <_Watchdog_Sync_count> 2009088: 80 a0 a0 00 cmp %g2, 0 200908c: 22 80 00 07 be,a 20090a8 <_Watchdog_Remove+0x98> 2009090: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 2009094: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 2009098: c6 00 62 70 ld [ %g1 + 0x270 ], %g3 ! 2018270 <_ISR_Nest_level> <== NOT EXECUTED 200909c: 05 00 80 60 sethi %hi(0x2018000), %g2 <== NOT EXECUTED 20090a0: c6 20 a2 90 st %g3, [ %g2 + 0x290 ] ! 2018290 <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 20090a4: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 20090a8: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 20090ac: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 20090b0: 03 00 80 60 sethi %hi(0x2018000), %g1 20090b4: c4 00 63 24 ld [ %g1 + 0x324 ], %g2 ! 2018324 <_Watchdog_Ticks_since_boot> 20090b8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 20090bc: 7f ff e3 3e call 2001db4 20090c0: 01 00 00 00 nop return( previous_state ); } 20090c4: 81 c7 e0 08 ret 20090c8: 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; 20090cc: c4 00 63 24 ld [ %g1 + 0x324 ], %g2 <== NOT EXECUTED /* * 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; 20090d0: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 20090d4: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 20090d8: 7f ff e3 37 call 2001db4 <== NOT EXECUTED 20090dc: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 20090e0: 81 c7 e0 08 ret <== NOT EXECUTED 20090e4: 81 e8 00 00 restore <== NOT EXECUTED 02009200 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 2009200: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 2009204: 80 a6 20 00 cmp %i0, 0 2009208: 02 80 00 15 be 200925c <_Workspace_Handler_initialization+0x5c> 200920c: 80 8e 20 07 btst 7, %i0 2009210: 12 80 00 14 bne 2009260 <_Workspace_Handler_initialization+0x60> 2009214: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 2009218: 03 00 80 60 sethi %hi(0x2018000), %g1 200921c: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 201826c <_Configuration_Table> 2009220: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 2009224: 80 a0 e0 00 cmp %g3, 0 2009228: 32 80 00 11 bne,a 200926c <_Workspace_Handler_initialization+0x6c> 200922c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 2009230: 92 10 00 18 mov %i0, %o1 2009234: 94 10 00 19 mov %i1, %o2 2009238: 11 00 80 60 sethi %hi(0x2018000), %o0 200923c: 96 10 20 08 mov 8, %o3 2009240: 7f ff f5 ab call 20068ec <_Heap_Initialize> 2009244: 90 12 21 f4 or %o0, 0x1f4, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 2009248: 80 a2 20 00 cmp %o0, 0 200924c: 02 80 00 0d be 2009280 <_Workspace_Handler_initialization+0x80> 2009250: 92 10 20 01 mov 1, %o1 2009254: 81 c7 e0 08 ret 2009258: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 200925c: 90 10 20 00 clr %o0 2009260: 92 10 20 01 mov 1, %o1 2009264: 7f ff f6 2f call 2006b20 <_Internal_error_Occurred> 2009268: 94 10 20 02 mov 2, %o2 TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 200926c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2009270: 40 00 14 1c call 200e2e0 <== NOT EXECUTED 2009274: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 2009278: 10 bf ff ef b 2009234 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 200927c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 2009280: 7f ff f6 28 call 2006b20 <_Internal_error_Occurred> <== NOT EXECUTED 2009284: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 2009288: 01 00 00 00 nop 02007248 : } unsigned int alarm( unsigned int seconds ) { 2007248: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 200724c: 03 00 80 65 sethi %hi(0x2019400), %g1 2007250: a2 10 61 4c or %g1, 0x14c, %l1 ! 201954c <_POSIX_signals_Alarm_timer> 2007254: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 2007258: 80 a0 a0 00 cmp %g2, 0 200725c: 02 80 00 23 be 20072e8 2007260: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 2007264: 40 00 14 e0 call 200c5e4 <_Watchdog_Remove> 2007268: 90 10 00 11 mov %l1, %o0 200726c: 90 02 3f fe add %o0, -2, %o0 2007270: 80 a2 20 01 cmp %o0, 1 2007274: 08 80 00 09 bleu 2007298 2007278: b0 10 20 00 clr %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200727c: e4 24 60 0c st %l2, [ %l1 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2007280: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2007284: 11 00 80 65 sethi %hi(0x2019400), %o0 <== NOT EXECUTED 2007288: 40 00 14 6c call 200c438 <_Watchdog_Insert> <== NOT EXECUTED 200728c: 90 12 23 88 or %o0, 0x388, %o0 ! 2019788 <_Watchdog_Seconds_chain> <== NOT EXECUTED } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 2007290: 81 c7 e0 08 ret <== NOT EXECUTED 2007294: 81 e8 00 00 restore <== NOT EXECUTED * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 2007298: c4 04 60 14 ld [ %l1 + 0x14 ], %g2 200729c: 03 00 80 66 sethi %hi(0x2019800), %g1 20072a0: e0 04 60 18 ld [ %l1 + 0x18 ], %l0 20072a4: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 20072a8: a0 24 00 02 sub %l0, %g2, %l0 20072ac: 11 00 03 d0 sethi %hi(0xf4000), %o0 20072b0: 40 00 37 16 call 2014f08 <.udiv> 20072b4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 20072b8: 92 10 00 08 mov %o0, %o1 20072bc: 40 00 37 13 call 2014f08 <.udiv> 20072c0: 90 10 00 10 mov %l0, %o0 20072c4: c2 04 60 0c ld [ %l1 + 0xc ], %g1 20072c8: 92 10 00 11 mov %l1, %o1 20072cc: b0 20 40 08 sub %g1, %o0, %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20072d0: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 20072d4: 11 00 80 65 sethi %hi(0x2019400), %o0 20072d8: 40 00 14 58 call 200c438 <_Watchdog_Insert> 20072dc: 90 12 23 88 or %o0, 0x388, %o0 ! 2019788 <_Watchdog_Seconds_chain> } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 20072e0: 81 c7 e0 08 ret 20072e4: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20072e8: 03 00 80 1c sethi %hi(0x2007000), %g1 20072ec: 82 10 63 20 or %g1, 0x320, %g1 ! 2007320 <_POSIX_signals_Alarm_TSR> the_watchdog->id = id; the_watchdog->user_data = user_data; 20072f0: b0 10 20 00 clr %i0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20072f4: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 20072f8: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 20072fc: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2007300: c2 24 60 1c st %g1, [ %l1 + 0x1c ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007304: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2007308: 92 10 00 11 mov %l1, %o1 200730c: 11 00 80 65 sethi %hi(0x2019400), %o0 2007310: 40 00 14 4a call 200c438 <_Watchdog_Insert> 2007314: 90 12 23 88 or %o0, 0x388, %o0 ! 2019788 <_Watchdog_Seconds_chain> 2007318: 81 c7 e0 08 ret 200731c: 81 e8 00 00 restore 02022948 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 2022948: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 202294c: 7f ff ff 0c call 202257c 2022950: 01 00 00 00 nop 2022954: 80 a2 00 18 cmp %o0, %i0 2022958: 12 80 00 c6 bne 2022c70 202295c: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 2022960: 02 80 00 ca be 2022c88 2022964: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 2022968: 80 a0 e0 1f cmp %g3, 0x1f 202296c: 18 80 00 c7 bgu 2022c88 2022970: 03 00 80 a6 sethi %hi(0x2029800), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 2022974: a1 2e 60 02 sll %i1, 2, %l0 2022978: a4 10 61 9c or %g1, 0x19c, %l2 202297c: a3 2e 60 04 sll %i1, 4, %l1 2022980: 82 24 40 10 sub %l1, %l0, %g1 2022984: 82 04 80 01 add %l2, %g1, %g1 2022988: c4 00 60 08 ld [ %g1 + 8 ], %g2 202298c: 80 a0 a0 01 cmp %g2, 1 2022990: 02 80 00 95 be 2022be4 2022994: 90 10 20 00 clr %o0 * 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 ) ) 2022998: 80 a6 60 08 cmp %i1, 8 202299c: 02 80 00 94 be 2022bec 20229a0: 80 a6 60 04 cmp %i1, 4 20229a4: 02 80 00 92 be 2022bec 20229a8: 80 a6 60 0b cmp %i1, 0xb 20229ac: 02 80 00 90 be 2022bec 20229b0: 82 10 20 01 mov 1, %g1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 20229b4: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 20229b8: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 20229bc: 80 a6 a0 00 cmp %i2, 0 20229c0: 02 80 00 a3 be 2022c4c 20229c4: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 20229c8: c2 06 80 00 ld [ %i2 ], %g1 20229cc: c2 27 bf f4 st %g1, [ %fp + -12 ] 20229d0: 05 00 80 a4 sethi %hi(0x2029000), %g2 20229d4: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 2029360 <_Thread_Dispatch_disable_level> 20229d8: 82 00 60 01 inc %g1 20229dc: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] /* * 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; 20229e0: 03 00 80 a5 sethi %hi(0x2029400), %g1 20229e4: c8 00 60 24 ld [ %g1 + 0x24 ], %g4 ! 2029424 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 20229e8: c4 01 21 6c ld [ %g4 + 0x16c ], %g2 20229ec: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 20229f0: 80 ae 00 01 andncc %i0, %g1, %g0 20229f4: 12 80 00 69 bne 2022b98 20229f8: 03 00 80 a6 sethi %hi(0x2029800), %g1 goto process_it; 20229fc: 98 10 63 28 or %g1, 0x328, %o4 ! 2029b28 <_POSIX_signals_Wait_queue> */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 2022a00: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 2022a04: c4 03 00 00 ld [ %o4 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2022a08: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 2022a0c: 80 a0 80 0d cmp %g2, %o5 2022a10: 22 80 00 1a be,a 2022a78 2022a14: 98 03 20 0c add %o4, 0xc, %o4 the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 2022a18: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 2022a1c: 88 10 00 02 mov %g2, %g4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 2022a20: 80 8e 00 01 btst %i0, %g1 2022a24: 12 80 00 5d bne 2022b98 2022a28: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 2022a2c: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 2022a30: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 2022a34: 22 80 00 0d be,a 2022a68 <== NOT EXECUTED 2022a38: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2022a3c: 10 80 00 58 b 2022b9c <== NOT EXECUTED 2022a40: 82 10 20 01 mov 1, %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 ]; 2022a44: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 2022a48: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 2022a4c: 12 80 00 53 bne 2022b98 <== NOT EXECUTED 2022a50: 88 10 00 02 mov %g2, %g4 <== NOT EXECUTED 2022a54: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 <== NOT EXECUTED 2022a58: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 2022a5c: 12 80 00 50 bne 2022b9c <== NOT EXECUTED 2022a60: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 2022a64: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 2022a68: 80 a0 80 0d cmp %g2, %o5 <== NOT EXECUTED 2022a6c: 32 bf ff f6 bne,a 2022a44 <== NOT EXECUTED 2022a70: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 2022a74: 98 03 20 0c add %o4, 0xc, %o4 <== NOT EXECUTED */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 2022a78: 80 a3 00 0b cmp %o4, %o3 2022a7c: 12 bf ff e2 bne 2022a04 2022a80: 03 00 80 9c sethi %hi(0x2027000), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 2022a84: c4 08 63 e4 ldub [ %g1 + 0x3e4 ], %g2 ! 20273e4 2022a88: 90 10 20 00 clr %o0 2022a8c: 03 00 80 a4 sethi %hi(0x2029000), %g1 2022a90: 84 00 a0 01 inc %g2 2022a94: 94 10 62 c8 or %g1, 0x2c8, %o2 * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 2022a98: 35 04 00 00 sethi %hi(0x10000000), %i2 2022a9c: 9e 02 a0 0c add %o2, 0xc, %o7 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 2022aa0: c2 02 80 00 ld [ %o2 ], %g1 2022aa4: 80 a0 60 00 cmp %g1, 0 2022aa8: 22 80 00 35 be,a 2022b7c 2022aac: 9a 10 00 02 mov %g2, %o5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 2022ab0: c2 00 60 04 ld [ %g1 + 4 ], %g1 /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 2022ab4: 80 a0 60 00 cmp %g1, 0 2022ab8: 22 80 00 31 be,a 2022b7c 2022abc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED continue; maximum = the_info->maximum; 2022ac0: d8 10 60 10 lduh [ %g1 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2022ac4: 80 a3 20 00 cmp %o4, 0 2022ac8: 02 80 00 5f be 2022c44 2022acc: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 2022ad0: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 2022ad4: 83 29 20 02 sll %g4, 2, %g1 2022ad8: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 2022adc: 80 a0 e0 00 cmp %g3, 0 2022ae0: 02 80 00 23 be 2022b6c 2022ae4: 9a 10 00 02 mov %g2, %o5 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 2022ae8: da 00 e0 14 ld [ %g3 + 0x14 ], %o5 2022aec: 80 a3 40 02 cmp %o5, %g2 2022af0: 38 80 00 1f bgu,a 2022b6c 2022af4: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2022af8: c2 00 e1 6c ld [ %g3 + 0x16c ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 2022afc: 80 a0 60 00 cmp %g1, 0 2022b00: 22 80 00 1b be,a 2022b6c 2022b04: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED 2022b08: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 2022b0c: 80 ae 00 01 andncc %i0, %g1, %g0 2022b10: 22 80 00 17 be,a 2022b6c 2022b14: 9a 10 00 02 mov %g2, %o5 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 2022b18: 80 a3 40 02 cmp %o5, %g2 2022b1c: 2a 80 00 0b bcs,a 2022b48 2022b20: 88 01 20 01 inc %g4 * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 2022b24: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 <== NOT EXECUTED 2022b28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022b2c: 22 80 00 10 be,a 2022b6c <== NOT EXECUTED 2022b30: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 2022b34: d2 00 e0 10 ld [ %g3 + 0x10 ], %o1 <== NOT EXECUTED 2022b38: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2022b3c: 12 80 00 46 bne 2022c54 <== NOT EXECUTED 2022b40: 80 88 40 1a btst %g1, %i2 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2022b44: 88 01 20 01 inc %g4 <== NOT EXECUTED 2022b48: 80 a3 00 04 cmp %o4, %g4 2022b4c: 0a 80 00 0c bcs 2022b7c 2022b50: 90 10 00 03 mov %g3, %o0 the_thread = (Thread_Control *) object_table[ index ]; 2022b54: 83 29 20 02 sll %g4, 2, %g1 2022b58: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 2022b5c: 80 a0 e0 00 cmp %g3, 0 2022b60: 12 bf ff e2 bne 2022ae8 2022b64: 84 10 00 0d mov %o5, %g2 * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 2022b68: 9a 10 00 02 mov %g2, %o5 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2022b6c: 88 01 20 01 inc %g4 2022b70: 80 a3 00 04 cmp %o4, %g4 2022b74: 1a bf ff f9 bcc 2022b58 2022b78: 83 29 20 02 sll %g4, 2, %g1 2022b7c: 94 02 a0 04 add %o2, 4, %o2 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 2022b80: 80 a2 80 0f cmp %o2, %o7 2022b84: 12 bf ff c7 bne 2022aa0 2022b88: 84 10 00 0d mov %o5, %g2 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 2022b8c: 80 a2 20 00 cmp %o0, 0 2022b90: 02 80 00 0b be 2022bbc 2022b94: 88 10 00 08 mov %o0, %g4 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2022b98: 82 10 20 01 mov 1, %g1 /* * 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 ) ) { 2022b9c: 90 10 00 04 mov %g4, %o0 2022ba0: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2022ba4: c2 29 20 75 stb %g1, [ %g4 + 0x75 ] /* * 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 ) ) { 2022ba8: 40 00 00 54 call 2022cf8 <_POSIX_signals_Unblock_thread> 2022bac: 94 07 bf ec add %fp, -20, %o2 2022bb0: 80 8a 20 ff btst 0xff, %o0 2022bb4: 12 80 00 09 bne 2022bd8 2022bb8: 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 ); 2022bbc: 40 00 00 3f call 2022cb8 <_POSIX_signals_Set_process_signals> 2022bc0: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 2022bc4: b4 24 40 10 sub %l1, %l0, %i2 2022bc8: c2 04 80 1a ld [ %l2 + %i2 ], %g1 2022bcc: 80 a0 60 02 cmp %g1, 2 2022bd0: 02 80 00 0d be 2022c04 2022bd4: 11 00 80 a6 sethi %hi(0x2029800), %o0 psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 2022bd8: 7f ff ad 89 call 200e1fc <_Thread_Enable_dispatch> 2022bdc: 01 00 00 00 nop 2022be0: 90 10 20 00 clr %o0 ! 0 return 0; } 2022be4: 81 c7 e0 08 ret 2022be8: 91 e8 00 08 restore %g0, %o0, %o0 * 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 ); 2022bec: 40 00 00 d1 call 2022f30 2022bf0: 01 00 00 00 nop 2022bf4: 40 00 00 92 call 2022e3c 2022bf8: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 2022bfc: 81 c7 e0 08 ret 2022c00: 91 e8 00 08 restore %g0, %o0, %o0 _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 2022c04: 7f ff a7 4a call 200c92c <_Chain_Get> 2022c08: 90 12 23 1c or %o0, 0x31c, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 2022c0c: 80 a2 20 00 cmp %o0, 0 2022c10: 02 80 00 24 be 2022ca0 2022c14: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 2022c18: 92 10 00 08 mov %o0, %o1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 2022c1c: c2 22 20 08 st %g1, [ %o0 + 8 ] 2022c20: c4 07 bf f0 ld [ %fp + -16 ], %g2 2022c24: c4 22 20 0c st %g2, [ %o0 + 0xc ] 2022c28: c2 07 bf f4 ld [ %fp + -12 ], %g1 2022c2c: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 2022c30: 11 00 80 a6 sethi %hi(0x2029800), %o0 2022c34: 90 12 23 6c or %o0, 0x36c, %o0 ! 2029b6c <_POSIX_signals_Siginfo> 2022c38: 7f ff a7 31 call 200c8fc <_Chain_Append> 2022c3c: 90 02 00 1a add %o0, %i2, %o0 2022c40: 30 bf ff e6 b,a 2022bd8 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2022c44: 10 bf ff ce b 2022b7c 2022c48: 9a 10 00 02 mov %g2, %o5 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 2022c4c: 10 bf ff 61 b 20229d0 2022c50: c0 27 bf f4 clr [ %fp + -12 ] * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 2022c54: 32 bf ff c6 bne,a 2022b6c <== NOT EXECUTED 2022c58: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 2022c5c: 80 8a 40 1a btst %o1, %i2 <== NOT EXECUTED 2022c60: 32 bf ff ba bne,a 2022b48 <== NOT EXECUTED 2022c64: 88 01 20 01 inc %g4 <== NOT EXECUTED 2022c68: 10 bf ff c1 b 2022b6c <== NOT EXECUTED 2022c6c: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 2022c70: 7f ff d6 7d call 2018664 <__errno> 2022c74: 01 00 00 00 nop 2022c78: 82 10 20 03 mov 3, %g1 ! 3 2022c7c: c2 22 00 00 st %g1, [ %o0 ] 2022c80: 10 bf ff d9 b 2022be4 2022c84: 90 10 3f ff mov -1, %o0 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 2022c88: 7f ff d6 77 call 2018664 <__errno> 2022c8c: 01 00 00 00 nop 2022c90: 82 10 20 16 mov 0x16, %g1 ! 16 2022c94: c2 22 00 00 st %g1, [ %o0 ] 2022c98: 10 bf ff d3 b 2022be4 2022c9c: 90 10 3f ff mov -1, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 2022ca0: 7f ff d6 71 call 2018664 <__errno> <== NOT EXECUTED 2022ca4: 01 00 00 00 nop <== NOT EXECUTED 2022ca8: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 2022cac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2022cb0: 10 bf ff cd b 2022be4 <== NOT EXECUTED 2022cb4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02009e1c : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 2009e1c: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 2009e20: 90 10 00 1c mov %i4, %o0 2009e24: 40 00 00 4c call 2009f54 <_POSIX_Absolute_timeout_to_ticks> 2009e28: 92 07 bf f4 add %fp, -12, %o1 2009e2c: 80 a2 20 02 cmp %o0, 2 2009e30: 18 80 00 03 bgu 2009e3c 2009e34: 98 10 20 01 mov 1, %o4 2009e38: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 2009e3c: da 07 bf f4 ld [ %fp + -12 ], %o5 2009e40: 90 10 00 18 mov %i0, %o0 2009e44: 92 10 00 19 mov %i1, %o1 2009e48: 94 10 00 1a mov %i2, %o2 2009e4c: 7f ff ff 21 call 2009ad0 <_POSIX_Message_queue_Receive_support> 2009e50: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 2009e54: 81 c7 e0 08 ret 2009e58: 91 e8 00 08 restore %g0, %o0, %o0 02009e5c : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 2009e5c: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 2009e60: 90 10 00 1c mov %i4, %o0 2009e64: 40 00 00 3c call 2009f54 <_POSIX_Absolute_timeout_to_ticks> 2009e68: 92 07 bf f4 add %fp, -12, %o1 2009e6c: 80 a2 20 02 cmp %o0, 2 2009e70: 18 80 00 03 bgu 2009e7c 2009e74: 98 10 20 01 mov 1, %o4 2009e78: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 2009e7c: da 07 bf f4 ld [ %fp + -12 ], %o5 2009e80: 90 10 00 18 mov %i0, %o0 2009e84: 92 10 00 19 mov %i1, %o1 2009e88: 94 10 00 1a mov %i2, %o2 2009e8c: 7f ff ff 65 call 2009c20 <_POSIX_Message_queue_Send_support> 2009e90: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 2009e94: 81 c7 e0 08 ret 2009e98: 91 e8 00 08 restore %g0, %o0, %o0 02005488 : */ void pthread_cleanup_pop( int execute ) { 2005488: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200548c: 09 00 80 5c sethi %hi(0x2017000), %g4 POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005490: 05 00 80 5c sethi %hi(0x2017000), %g2 2005494: c2 01 21 b0 ld [ %g4 + 0x1b0 ], %g1 2005498: c6 00 a2 74 ld [ %g2 + 0x274 ], %g3 200549c: 82 00 60 01 inc %g1 20054a0: e0 00 e1 6c ld [ %g3 + 0x16c ], %l0 20054a4: c2 21 21 b0 st %g1, [ %g4 + 0x1b0 ] */ void pthread_cleanup_pop( int execute ) { 20054a8: a4 10 00 18 mov %i0, %l2 * ensure that we do not get prempted and deleted while we are holding * memory that needs to be freed. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 20054ac: 7f ff f3 cc call 20023dc 20054b0: 01 00 00 00 nop 20054b4: b0 10 00 08 mov %o0, %i0 if ( _Chain_Is_empty( handler_stack ) ) { 20054b8: c2 04 20 d8 ld [ %l0 + 0xd8 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20054bc: a0 04 20 dc add %l0, 0xdc, %l0 20054c0: 80 a0 40 10 cmp %g1, %l0 20054c4: 02 80 00 18 be 2005524 20054c8: 01 00 00 00 nop _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 20054cc: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 20054d0: c4 04 00 00 ld [ %l0 ], %g2 previous = the_node->previous; 20054d4: c2 04 20 04 ld [ %l0 + 4 ], %g1 next->previous = previous; previous->next = next; 20054d8: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 20054dc: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 20054e0: 7f ff f3 c3 call 20023ec 20054e4: 01 00 00 00 nop tmp_handler = *handler; _Workspace_Free( handler ); 20054e8: 90 10 00 10 mov %l0, %o0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); tmp_handler = *handler; 20054ec: e2 04 20 0c ld [ %l0 + 0xc ], %l1 _Workspace_Free( handler ); 20054f0: 40 00 14 0e call 200a528 <_Workspace_Free> 20054f4: e0 04 20 08 ld [ %l0 + 8 ], %l0 _Thread_Enable_dispatch(); 20054f8: 40 00 0e 5e call 2008e70 <_Thread_Enable_dispatch> 20054fc: 01 00 00 00 nop if ( execute ) 2005500: 80 a4 a0 00 cmp %l2, 0 2005504: 12 80 00 04 bne 2005514 2005508: 01 00 00 00 nop 200550c: 81 c7 e0 08 ret <== NOT EXECUTED 2005510: 81 e8 00 00 restore <== NOT EXECUTED (*tmp_handler.routine)( tmp_handler.arg ); 2005514: 9f c4 00 00 call %l0 2005518: 90 10 00 11 mov %l1, %o0 200551c: 81 c7 e0 08 ret 2005520: 81 e8 00 00 restore _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 2005524: 40 00 0e 53 call 2008e70 <_Thread_Enable_dispatch> 2005528: 01 00 00 00 nop _ISR_Enable( level ); 200552c: 7f ff f3 b0 call 20023ec 2005530: 81 e8 00 00 restore 2005534: 01 00 00 00 nop 02006580 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 2006580: 9d e3 bf 60 save %sp, -160, %sp 2006584: aa 10 00 18 mov %i0, %l5 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 2006588: 80 a6 a0 00 cmp %i2, 0 200658c: 02 80 00 6f be 2006748 2006590: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 2006594: 03 00 80 69 sethi %hi(0x201a400), %g1 2006598: 80 a6 60 00 cmp %i1, 0 200659c: 02 80 00 03 be 20065a8 20065a0: a2 10 63 38 or %g1, 0x338, %l1 20065a4: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 20065a8: c2 04 40 00 ld [ %l1 ], %g1 20065ac: 80 a0 60 00 cmp %g1, 0 20065b0: 22 80 00 66 be,a 2006748 20065b4: 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) ) 20065b8: c2 04 60 04 ld [ %l1 + 4 ], %g1 20065bc: 80 a0 60 00 cmp %g1, 0 20065c0: 02 80 00 07 be 20065dc 20065c4: 03 00 80 6d sethi %hi(0x201b400), %g1 20065c8: c4 04 60 08 ld [ %l1 + 8 ], %g2 20065cc: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 20065d0: 80 a0 80 03 cmp %g2, %g3 20065d4: 2a 80 00 5d bcs,a 2006748 20065d8: b0 10 20 16 mov 0x16, %i0 * 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 ) { 20065dc: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20065e0: 80 a0 60 01 cmp %g1, 1 20065e4: 02 80 00 5b be 2006750 20065e8: 80 a0 60 02 cmp %g1, 2 20065ec: 22 80 00 04 be,a 20065fc 20065f0: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 20065f4: 81 c7 e0 08 ret 20065f8: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 20065fc: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 2006600: c4 27 bf e0 st %g2, [ %fp + -32 ] 2006604: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 2006608: c2 27 bf e4 st %g1, [ %fp + -28 ] 200660c: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 2006610: c4 27 bf e8 st %g2, [ %fp + -24 ] 2006614: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 2006618: c2 27 bf ec st %g1, [ %fp + -20 ] 200661c: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 2006620: c4 27 bf f0 st %g2, [ %fp + -16 ] 2006624: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 2006628: 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 ) 200662c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2006630: 80 a0 60 00 cmp %g1, 0 2006634: 12 80 00 45 bne 2006748 2006638: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 200663c: e8 07 bf e0 ld [ %fp + -32 ], %l4 2006640: 82 05 3f ff add %l4, -1, %g1 2006644: 80 a0 60 fd cmp %g1, 0xfd 2006648: 18 bf ff eb bgu 20065f4 200664c: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006650: 02 80 00 54 be 20067a0 2006654: a6 10 20 00 clr %l3 2006658: 04 80 00 7c ble 2006848 200665c: 80 a6 60 02 cmp %i1, 2 2006660: 02 80 00 4d be 2006794 2006664: 80 a6 60 03 cmp %i1, 3 2006668: 32 80 00 38 bne,a 2006748 200666c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 2006670: 40 00 11 eb call 200ae1c <_Timespec_To_ticks> 2006674: 90 07 bf e8 add %fp, -24, %o0 2006678: a0 10 00 08 mov %o0, %l0 200667c: 40 00 11 e8 call 200ae1c <_Timespec_To_ticks> 2006680: 90 07 bf f0 add %fp, -16, %o0 2006684: 80 a4 00 08 cmp %l0, %o0 2006688: 0a 80 00 30 bcs 2006748 200668c: b0 10 20 16 mov 0x16, %i0 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 2006690: c2 07 bf e4 ld [ %fp + -28 ], %g1 2006694: 82 00 7f ff add %g1, -1, %g1 2006698: 80 a0 60 fd cmp %g1, 0xfd 200669c: 18 80 00 2b bgu 2006748 20066a0: a6 10 20 03 mov 3, %l3 20066a4: 03 00 80 1b sethi %hi(0x2006c00), %g1 20066a8: a0 10 60 08 or %g1, 8, %l0 ! 2006c08 <_POSIX_Threads_Sporadic_budget_callout> #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 20066ac: 2d 00 80 71 sethi %hi(0x201c400), %l6 20066b0: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 ! 201c5ec <_RTEMS_Allocator_Mutex> 20066b4: 40 00 07 56 call 200840c <_API_Mutex_Lock> 20066b8: 31 00 80 71 sethi %hi(0x201c400), %i0 * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 20066bc: 40 00 09 e1 call 2008e40 <_Objects_Allocate> 20066c0: 90 16 23 c0 or %i0, 0x3c0, %o0 ! 201c7c0 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 20066c4: a4 92 20 00 orcc %o0, 0, %l2 20066c8: 02 80 00 1d be 200673c 20066cc: 03 00 80 6d sethi %hi(0x201b400), %g1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 20066d0: c6 04 60 08 ld [ %l1 + 8 ], %g3 20066d4: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 20066d8: c0 27 bf dc clr [ %fp + -36 ] 20066dc: 97 28 a0 01 sll %g2, 1, %o3 20066e0: 80 a2 c0 03 cmp %o3, %g3 20066e4: 1a 80 00 03 bcc 20066f0 20066e8: d4 04 60 04 ld [ %l1 + 4 ], %o2 20066ec: 96 10 00 03 mov %g3, %o3 20066f0: 82 07 bf dc add %fp, -36, %g1 20066f4: e6 23 a0 60 st %l3, [ %sp + 0x60 ] 20066f8: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 20066fc: c0 23 a0 68 clr [ %sp + 0x68 ] 2006700: 9a 10 20 ff mov 0xff, %o5 2006704: a6 10 20 01 mov 1, %l3 2006708: 9a 23 40 14 sub %o5, %l4, %o5 200670c: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2006710: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2006714: 90 16 23 c0 or %i0, 0x3c0, %o0 2006718: 92 10 00 12 mov %l2, %o1 200671c: 40 00 0d d6 call 2009e74 <_Thread_Initialize> 2006720: 98 10 20 01 mov 1, %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 2006724: 80 8a 20 ff btst 0xff, %o0 2006728: 12 80 00 20 bne 20067a8 200672c: 11 00 80 71 sethi %hi(0x201c400), %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 2006730: 92 10 00 12 mov %l2, %o1 2006734: 40 00 0a be call 200922c <_Objects_Free> 2006738: 90 12 23 c0 or %o0, 0x3c0, %o0 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 200673c: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 2006740: 40 00 07 49 call 2008464 <_API_Mutex_Unlock> 2006744: b0 10 20 0b mov 0xb, %i0 2006748: 81 c7 e0 08 ret 200674c: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2006750: 03 00 80 71 sethi %hi(0x201c400), %g1 2006754: c4 00 61 f4 ld [ %g1 + 0x1f4 ], %g2 ! 201c5f4 <_Thread_Executing> 2006758: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 200675c: c8 00 e0 80 ld [ %g3 + 0x80 ], %g4 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 2006760: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 2006764: c8 27 bf e0 st %g4, [ %fp + -32 ] 2006768: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 200676c: c2 27 bf e4 st %g1, [ %fp + -28 ] 2006770: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 2006774: c4 27 bf e8 st %g2, [ %fp + -24 ] 2006778: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 200677c: c2 27 bf ec st %g1, [ %fp + -20 ] 2006780: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 2006784: c4 27 bf f0 st %g2, [ %fp + -16 ] 2006788: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 200678c: 10 bf ff a8 b 200662c 2006790: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006794: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 2006798: 10 bf ff c5 b 20066ac <== NOT EXECUTED 200679c: a0 10 20 00 clr %l0 <== NOT EXECUTED 20067a0: 10 bf ff c3 b 20066ac 20067a4: a0 10 20 00 clr %l0 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 20067a8: e0 04 a1 6c ld [ %l2 + 0x16c ], %l0 api->Attributes = *the_attr; 20067ac: 92 10 00 11 mov %l1, %o1 20067b0: 94 10 20 38 mov 0x38, %o2 20067b4: 40 00 26 6d call 2010168 20067b8: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 20067bc: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 20067c0: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 20067c4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 20067c8: c2 07 bf e0 ld [ %fp + -32 ], %g1 * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 20067cc: e6 2c a0 75 stb %l3, [ %l2 + 0x75 ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 20067d0: c2 24 20 80 st %g1, [ %l0 + 0x80 ] 20067d4: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067d8: 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; 20067dc: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 20067e0: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067e4: 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; 20067e8: c2 24 20 88 st %g1, [ %l0 + 0x88 ] 20067ec: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067f0: 90 10 00 12 mov %l2, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 20067f4: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 20067f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067fc: 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; 2006800: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 2006804: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 2006808: 98 10 20 00 clr %o4 200680c: 40 00 10 c6 call 200ab24 <_Thread_Start> 2006810: c2 24 20 94 st %g1, [ %l0 + 0x94 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 2006814: 80 a6 60 03 cmp %i1, 3 2006818: 02 80 00 19 be 200687c 200681c: a2 10 00 08 mov %o0, %l1 * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 2006820: 80 8c 60 ff btst 0xff, %l1 2006824: 12 80 00 0f bne 2006860 2006828: 90 16 23 c0 or %i0, 0x3c0, %o0 200682c: 40 00 0a 80 call 200922c <_Objects_Free> <== NOT EXECUTED 2006830: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 2006834: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 <== NOT EXECUTED 2006838: 40 00 07 0b call 2008464 <_API_Mutex_Unlock> <== NOT EXECUTED 200683c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 2006840: 81 c7 e0 08 ret <== NOT EXECUTED 2006844: 81 e8 00 00 restore <== NOT EXECUTED */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006848: 80 a6 60 00 cmp %i1, 0 200684c: a6 10 20 01 mov 1, %l3 2006850: 02 bf ff 97 be 20066ac 2006854: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 2006858: 81 c7 e0 08 ret 200685c: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2006860: c2 04 a0 08 ld [ %l2 + 8 ], %g1 _RTEMS_Unlock_allocator(); 2006864: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2006868: c2 25 40 00 st %g1, [ %l5 ] _RTEMS_Unlock_allocator(); 200686c: 40 00 06 fe call 2008464 <_API_Mutex_Unlock> 2006870: b0 10 20 00 clr %i0 2006874: 81 c7 e0 08 ret 2006878: 81 e8 00 00 restore arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 200687c: 40 00 11 68 call 200ae1c <_Timespec_To_ticks> 2006880: 90 04 20 88 add %l0, 0x88, %o0 2006884: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006888: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200688c: 11 00 80 71 sethi %hi(0x201c400), %o0 2006890: 40 00 12 78 call 200b270 <_Watchdog_Insert> 2006894: 90 12 22 14 or %o0, 0x214, %o0 ! 201c614 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 2006898: 10 bf ff e3 b 2006824 200689c: 80 8c 60 ff btst 0xff, %l1 020054d4 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 20054d4: 9d e3 bf 98 save %sp, -104, %sp 20054d8: 05 00 80 58 sethi %hi(0x2016000), %g2 20054dc: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 ! 20163b0 <_Thread_Dispatch_disable_level> 20054e0: 82 00 60 01 inc %g1 20054e4: c2 20 a3 b0 st %g1, [ %g2 + 0x3b0 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 20054e8: 29 00 80 5a sethi %hi(0x2016800), %l4 20054ec: 40 00 09 d4 call 2007c3c <_Objects_Allocate> 20054f0: 90 15 20 04 or %l4, 4, %o0 ! 2016804 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 20054f4: a4 92 20 00 orcc %o0, 0, %l2 20054f8: 02 80 00 2b be 20055a4 20054fc: 03 00 80 58 sethi %hi(0x2016000), %g1 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 2005500: f2 24 a0 14 st %i1, [ %l2 + 0x14 ] 2005504: a2 10 00 12 mov %l2, %l1 2005508: a6 10 63 10 or %g1, 0x310, %l3 200550c: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 2005510: 83 2e 60 02 sll %i1, 2, %g1 2005514: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 2005518: 80 a0 60 00 cmp %g1, 0 200551c: 22 80 00 0e be,a 2005554 2005520: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 2005524: c4 00 60 04 ld [ %g1 + 4 ], %g2 2005528: c2 10 a0 10 lduh [ %g2 + 0x10 ], %g1 200552c: 82 00 60 01 inc %g1 2005530: a1 28 60 02 sll %g1, 2, %l0 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 2005534: 40 00 13 64 call 200a2c4 <_Workspace_Allocate> 2005538: 90 10 00 10 mov %l0, %o0 if ( !table ) { 200553c: 82 92 20 00 orcc %o0, 0, %g1 2005540: 02 80 00 1d be 20055b4 2005544: 94 10 00 10 mov %l0, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 2005548: c2 24 60 1c st %g1, [ %l1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 200554c: 40 00 27 5e call 200f2c4 2005550: 92 10 20 00 clr %o1 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 2005554: b2 06 60 01 inc %i1 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 2005558: 80 a6 60 05 cmp %i1, 5 200555c: 12 bf ff ed bne 2005510 2005560: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005564: c4 04 a0 08 ld [ %l2 + 8 ], %g2 2005568: 82 15 20 04 or %l4, 4, %g1 200556c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2005570: 03 00 00 3f sethi %hi(0xfc00), %g1 2005574: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005578: 82 08 80 01 and %g2, %g1, %g1 200557c: 83 28 60 02 sll %g1, 2, %g1 2005580: e4 20 c0 01 st %l2, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 2005584: c0 24 a0 0c clr [ %l2 + 0xc ] } } the_key->is_active = TRUE; 2005588: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 200558c: c4 26 00 00 st %g2, [ %i0 ] } } the_key->is_active = TRUE; 2005590: c2 2c a0 10 stb %g1, [ %l2 + 0x10 ] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); 2005594: 40 00 0d 67 call 2008b30 <_Thread_Enable_dispatch> 2005598: b0 10 20 00 clr %i0 return 0; } 200559c: 81 c7 e0 08 ret 20055a0: 81 e8 00 00 restore _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 20055a4: 40 00 0d 63 call 2008b30 <_Thread_Enable_dispatch> 20055a8: b0 10 20 0b mov 0xb, %i0 20055ac: 81 c7 e0 08 ret 20055b0: 81 e8 00 00 restore bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 20055b4: a0 86 7f ff addcc %i1, -1, %l0 20055b8: 02 80 00 0a be 20055e0 20055bc: 82 06 60 05 add %i1, 5, %g1 20055c0: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 20055c4: b2 04 80 01 add %l2, %g1, %i1 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 20055c8: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 20055cc: 40 00 13 37 call 200a2a8 <_Workspace_Free> <== NOT EXECUTED 20055d0: b2 06 7f fc add %i1, -4, %i1 <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 20055d4: a0 84 3f ff addcc %l0, -1, %l0 <== NOT EXECUTED 20055d8: 32 bf ff fd bne,a 20055cc <== NOT EXECUTED 20055dc: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 20055e0: 90 15 20 04 or %l4, 4, %o0 20055e4: 92 10 00 12 mov %l2, %o1 20055e8: 40 00 0a 90 call 2008028 <_Objects_Free> 20055ec: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 20055f0: 40 00 0d 50 call 2008b30 <_Thread_Enable_dispatch> 20055f4: 01 00 00 00 nop 20055f8: 81 c7 e0 08 ret 20055fc: 81 e8 00 00 restore 02005600 : */ int pthread_key_delete( pthread_key_t key ) { 2005600: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 2005604: 23 00 80 5a sethi %hi(0x2016800), %l1 2005608: 92 10 00 18 mov %i0, %o1 200560c: 94 07 bf f4 add %fp, -12, %o2 2005610: 40 00 0a f3 call 20081dc <_Objects_Get> 2005614: 90 14 60 04 or %l1, 4, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 2005618: c2 07 bf f4 ld [ %fp + -12 ], %g1 200561c: a0 10 00 08 mov %o0, %l0 2005620: 80 a0 60 00 cmp %g1, 0 2005624: 12 80 00 23 bne 20056b0 2005628: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 200562c: 90 14 60 04 or %l1, 4, %o0 2005630: 40 00 09 af call 2007cec <_Objects_Close> 2005634: 92 10 00 10 mov %l0, %o1 the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 2005638: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 200563c: 80 a2 20 00 cmp %o0, 0 2005640: 02 80 00 04 be 2005650 2005644: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 2005648: 40 00 13 18 call 200a2a8 <_Workspace_Free> 200564c: 01 00 00 00 nop the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 2005650: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 2005654: 80 a2 20 00 cmp %o0, 0 2005658: 22 80 00 05 be,a 200566c 200565c: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005660: 40 00 13 12 call 200a2a8 <_Workspace_Free> 2005664: 01 00 00 00 nop the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 2005668: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 200566c: 80 a2 20 00 cmp %o0, 0 2005670: 22 80 00 05 be,a 2005684 2005674: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005678: 40 00 13 0c call 200a2a8 <_Workspace_Free> 200567c: 01 00 00 00 nop the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 2005680: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 2005684: 80 a2 20 00 cmp %o0, 0 2005688: 22 80 00 05 be,a 200569c 200568c: 90 14 60 04 or %l1, 4, %o0 _Workspace_Free( the_key->Values[ the_api ] ); 2005690: 40 00 13 06 call 200a2a8 <_Workspace_Free> <== NOT EXECUTED 2005694: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 2005698: 90 14 60 04 or %l1, 4, %o0 <== NOT EXECUTED 200569c: 92 10 00 10 mov %l0, %o1 20056a0: 40 00 0a 62 call 2008028 <_Objects_Free> 20056a4: b0 10 20 00 clr %i0 * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 20056a8: 40 00 0d 22 call 2008b30 <_Thread_Enable_dispatch> 20056ac: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 20056b0: 81 c7 e0 08 ret 20056b4: 81 e8 00 00 restore 02022e3c : int pthread_kill( pthread_t thread, int sig ) { 2022e3c: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 2022e40: 80 a6 60 00 cmp %i1, 0 2022e44: 02 80 00 2f be 2022f00 2022e48: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 2022e4c: a0 06 7f ff add %i1, -1, %l0 2022e50: 80 a4 20 1f cmp %l0, 0x1f 2022e54: 18 80 00 2b bgu 2022f00 2022e58: 11 00 80 a5 sethi %hi(0x2029400), %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 2022e5c: 94 07 bf f4 add %fp, -12, %o2 2022e60: 7f ff aa 4c call 200d790 <_Objects_Get> 2022e64: 90 12 22 30 or %o0, 0x230, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2022e68: c2 07 bf f4 ld [ %fp + -12 ], %g1 2022e6c: 80 a0 60 00 cmp %g1, 0 2022e70: 12 80 00 2a bne 2022f18 2022e74: b0 10 00 08 mov %o0, %i0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 2022e78: 87 2e 60 02 sll %i1, 2, %g3 2022e7c: 85 2e 60 04 sll %i1, 4, %g2 2022e80: 03 00 80 a6 sethi %hi(0x2029800), %g1 2022e84: 84 20 80 03 sub %g2, %g3, %g2 2022e88: 82 10 61 9c or %g1, 0x19c, %g1 2022e8c: 82 00 40 02 add %g1, %g2, %g1 2022e90: c6 00 60 08 ld [ %g1 + 8 ], %g3 2022e94: 80 a0 e0 01 cmp %g3, 1 2022e98: 02 80 00 14 be 2022ee8 2022e9c: c8 02 21 6c ld [ %o0 + 0x16c ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2022ea0: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 2022ea4: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2022ea8: b2 10 20 01 mov 1, %i1 2022eac: 83 2e 40 10 sll %i1, %l0, %g1 2022eb0: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 2022eb4: 94 10 20 00 clr %o2 2022eb8: 7f ff ff 90 call 2022cf8 <_POSIX_signals_Unblock_thread> 2022ebc: c4 21 20 c8 st %g2, [ %g4 + 0xc8 ] the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2022ec0: 03 00 80 a5 sethi %hi(0x2029400), %g1 2022ec4: c4 00 60 00 ld [ %g1 ], %g2 2022ec8: 80 a0 a0 00 cmp %g2, 0 2022ecc: 02 80 00 07 be 2022ee8 2022ed0: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 2022ed4: 03 00 80 a5 sethi %hi(0x2029400), %g1 2022ed8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 ! 2029424 <_Thread_Executing> 2022edc: 80 a6 00 02 cmp %i0, %g2 2022ee0: 02 80 00 06 be 2022ef8 2022ee4: 03 00 80 a5 sethi %hi(0x2029400), %g1 _ISR_Signals_to_thread_executing = TRUE; } _Thread_Enable_dispatch(); 2022ee8: 7f ff ac c5 call 200e1fc <_Thread_Enable_dispatch> 2022eec: b0 10 20 00 clr %i0 2022ef0: 81 c7 e0 08 ret 2022ef4: 81 e8 00 00 restore (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; 2022ef8: 10 bf ff fc b 2022ee8 <== NOT EXECUTED 2022efc: f2 28 60 b8 stb %i1, [ %g1 + 0xb8 ] <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 2022f00: 7f ff d5 d9 call 2018664 <__errno> 2022f04: b0 10 3f ff mov -1, %i0 2022f08: 82 10 20 16 mov 0x16, %g1 2022f0c: c2 22 00 00 st %g1, [ %o0 ] 2022f10: 81 c7 e0 08 ret 2022f14: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 2022f18: 7f ff d5 d3 call 2018664 <__errno> 2022f1c: b0 10 3f ff mov -1, %i0 2022f20: 82 10 20 03 mov 3, %g1 2022f24: c2 22 00 00 st %g1, [ %o0 ] } 2022f28: 81 c7 e0 08 ret 2022f2c: 81 e8 00 00 restore 02007348 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 2007348: 9d e3 bf 98 save %sp, -104, %sp #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 200734c: 03 00 80 5e sethi %hi(0x2017800), %g1 2007350: 80 a6 60 00 cmp %i1, 0 2007354: 02 80 00 03 be 2007360 2007358: a0 10 60 8c or %g1, 0x8c, %l0 200735c: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 2007360: 80 a6 20 00 cmp %i0, 0 2007364: 02 80 00 17 be 20073c0 2007368: 01 00 00 00 nop break; } } #endif if ( !the_attr->is_initialized ) 200736c: c2 04 00 00 ld [ %l0 ], %g1 2007370: 80 a0 60 00 cmp %g1, 0 2007374: 02 80 00 13 be 20073c0 2007378: 01 00 00 00 nop /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 200737c: c2 04 20 04 ld [ %l0 + 4 ], %g1 2007380: 80 a0 60 00 cmp %g1, 0 2007384: 12 80 00 4d bne 20074b8 2007388: 11 00 80 5e sethi %hi(0x2017800), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 200738c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2007390: 80 a0 60 01 cmp %g1, 1 2007394: 02 80 00 37 be 2007470 2007398: 80 a0 60 02 cmp %g1, 2 200739c: 02 80 00 3c be 200748c 20073a0: 80 a0 60 00 cmp %g1, 0 20073a4: 12 80 00 07 bne 20073c0 20073a8: a2 10 20 00 clr %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 20073ac: c2 04 20 08 ld [ %l0 + 8 ], %g1 20073b0: 82 00 7f ff add %g1, -1, %g1 20073b4: 80 a0 60 fd cmp %g1, 0xfd 20073b8: 08 80 00 04 bleu 20073c8 20073bc: 05 00 80 65 sethi %hi(0x2019400), %g2 *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 20073c0: 81 c7 e0 08 ret 20073c4: 91 e8 20 16 restore %g0, 0x16, %o0 20073c8: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 20073cc: 82 00 60 01 inc %g1 20073d0: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 20073d4: 25 00 80 66 sethi %hi(0x2019800), %l2 20073d8: 40 00 0a 8e call 2009e10 <_Objects_Allocate> 20073dc: 90 14 a0 80 or %l2, 0x80, %o0 ! 2019880 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 20073e0: b2 92 20 00 orcc %o0, 0, %i1 20073e4: 02 80 00 31 be 20074a8 20073e8: 01 00 00 00 nop _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 20073ec: c2 04 20 04 ld [ %l0 + 4 ], %g1 20073f0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 20073f4: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 20073f8: 80 a0 a0 00 cmp %g2, 0 20073fc: 32 80 00 04 bne,a 200740c 2007400: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 2007404: 82 10 20 01 mov 1, %g1 2007408: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 200740c: c6 04 20 08 ld [ %l0 + 8 ], %g3 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 2007410: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 2007414: 82 10 20 ff mov 0xff, %g1 2007418: 82 20 40 03 sub %g1, %g3, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 200741c: 92 06 60 54 add %i1, 0x54, %o1 2007420: 94 10 20 01 mov 1, %o2 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 2007424: c4 2e 60 58 stb %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 2007428: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 200742c: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 2007430: 40 00 08 36 call 2009508 <_CORE_mutex_Initialize> 2007434: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007438: c4 06 60 08 ld [ %i1 + 8 ], %g2 200743c: 82 14 a0 80 or %l2, 0x80, %g1 2007440: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2007444: 03 00 00 3f sethi %hi(0xfc00), %g1 2007448: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200744c: 82 08 80 01 and %g2, %g1, %g1 2007450: 83 28 60 02 sll %g1, 2, %g1 2007454: f2 20 c0 01 st %i1, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 2007458: c0 26 60 0c clr [ %i1 + 0xc ] CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 200745c: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 2007460: 40 00 0e 29 call 200ad04 <_Thread_Enable_dispatch> 2007464: b0 10 20 00 clr %i0 2007468: 81 c7 e0 08 ret 200746c: 81 e8 00 00 restore break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 2007470: c2 04 20 08 ld [ %l0 + 8 ], %g1 2007474: 82 00 7f ff add %g1, -1, %g1 2007478: 80 a0 60 fd cmp %g1, 0xfd 200747c: 18 bf ff d1 bgu 20073c0 2007480: a2 10 20 02 mov 2, %l1 2007484: 10 bf ff d1 b 20073c8 2007488: 05 00 80 65 sethi %hi(0x2019400), %g2 200748c: c2 04 20 08 ld [ %l0 + 8 ], %g1 2007490: 82 00 7f ff add %g1, -1, %g1 2007494: 80 a0 60 fd cmp %g1, 0xfd 2007498: 18 bf ff ca bgu 20073c0 200749c: a2 10 20 03 mov 3, %l1 20074a0: 10 bf ff ca b 20073c8 20074a4: 05 00 80 65 sethi %hi(0x2019400), %g2 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 20074a8: 40 00 0e 17 call 200ad04 <_Thread_Enable_dispatch> 20074ac: b0 10 20 0b mov 0xb, %i0 20074b0: 81 c7 e0 08 ret 20074b4: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 20074b8: 15 00 80 5e sethi %hi(0x2017800), %o2 <== NOT EXECUTED 20074bc: 17 00 80 5e sethi %hi(0x2017800), %o3 <== NOT EXECUTED 20074c0: 90 12 20 a0 or %o0, 0xa0, %o0 <== NOT EXECUTED 20074c4: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 20074c8: 96 12 e0 e8 or %o3, 0xe8, %o3 <== NOT EXECUTED 20074cc: 7f ff f2 a4 call 2003f5c <__assert_func> <== NOT EXECUTED 20074d0: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED 20074d4: 01 00 00 00 nop 02007548 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 2007548: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 200754c: 80 a6 a0 00 cmp %i2, 0 2007550: 02 80 00 06 be 2007568 2007554: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 2007558: 82 06 7f ff add %i1, -1, %g1 200755c: 80 a0 60 fd cmp %g1, 0xfd 2007560: 08 80 00 04 bleu 2007570 2007564: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 2007568: 81 c7 e0 08 ret 200756c: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 2007570: 7f ff ff da call 20074d8 2007574: 90 10 00 18 mov %i0, %o0 if ( status ) 2007578: b0 92 20 00 orcc %o0, 0, %i0 200757c: 12 80 00 14 bne 20075cc 2007580: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 2007584: 7f ff ff 46 call 200729c <_POSIX_Mutex_Get> 2007588: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 200758c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007590: 80 a0 60 00 cmp %g1, 0 2007594: 32 80 00 0e bne,a 20075cc 2007598: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 200759c: c2 02 20 60 ld [ %o0 + 0x60 ], %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 20075a0: d2 02 20 08 ld [ %o0 + 8 ], %o1 the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 20075a4: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 20075a8: 86 20 80 19 sub %g2, %i1, %g3 the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 20075ac: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 20075b0: c6 22 20 60 st %g3, [ %o0 + 0x60 ] the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 20075b4: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 20075b8: 94 10 20 00 clr %o2 20075bc: 40 00 08 5e call 2009734 <_CORE_mutex_Surrender> 20075c0: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 20075c4: 40 00 0d d0 call 200ad04 <_Thread_Enable_dispatch> 20075c8: 01 00 00 00 nop 20075cc: 81 c7 e0 08 ret 20075d0: 81 e8 00 00 restore 020075d4 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 20075d4: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 20075d8: 90 10 00 19 mov %i1, %o0 20075dc: 40 00 00 2f call 2007698 <_POSIX_Absolute_timeout_to_ticks> 20075e0: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 20075e4: 80 a2 20 02 cmp %o0, 2 20075e8: 08 80 00 05 bleu 20075fc 20075ec: d4 07 bf f4 ld [ %fp + -12 ], %o2 20075f0: 80 a2 20 03 cmp %o0, 3 20075f4: 02 80 00 07 be 2007610 20075f8: 90 10 00 18 mov %i0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 20075fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2007600: 7f ff ff bc call 20074f0 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 2007604: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 2007608: 81 c7 e0 08 ret <== NOT EXECUTED 200760c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 2007610: 7f ff ff b8 call 20074f0 <_POSIX_Mutex_Lock_support> 2007614: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 2007618: 81 c7 e0 08 ret 200761c: 91 e8 00 08 restore %g0, %o0, %o0 02006cdc : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 2006cdc: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 2006ce0: a0 96 20 00 orcc %i0, 0, %l0 2006ce4: 02 80 00 0a be 2006d0c 2006ce8: 80 a6 60 00 cmp %i1, 0 2006cec: 02 80 00 08 be 2006d0c 2006cf0: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 2006cf4: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006cf8: 80 a0 60 00 cmp %g1, 0 2006cfc: 02 80 00 06 be 2006d14 2006d00: b0 10 20 00 clr %i0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 2006d04: 81 c7 e0 08 ret 2006d08: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 2006d0c: 81 c7 e0 08 ret 2006d10: 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); 2006d14: b0 07 bf f4 add %fp, -12, %i0 2006d18: 90 10 21 00 mov 0x100, %o0 2006d1c: 92 10 21 00 mov 0x100, %o1 2006d20: 40 00 03 ba call 2007c08 2006d24: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 2006d28: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006d2c: 80 a0 60 00 cmp %g1, 0 2006d30: 02 80 00 09 be 2006d54 2006d34: 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); 2006d38: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 2006d3c: 94 10 00 18 mov %i0, %o2 2006d40: 92 10 21 00 mov 0x100, %o1 2006d44: 40 00 03 b1 call 2007c08 2006d48: b0 10 20 00 clr %i0 } return 0; } 2006d4c: 81 c7 e0 08 ret 2006d50: 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; 2006d54: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 2006d58: 9f c6 40 00 call %i1 2006d5c: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 2006d60: 10 bf ff f7 b 2006d3c 2006d64: d0 07 bf f4 ld [ %fp + -12 ], %o0 02005fe4 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 2005fe4: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 2005fe8: 80 a6 20 00 cmp %i0, 0 2005fec: 02 80 00 26 be 2006084 2005ff0: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 2005ff4: 80 a6 60 00 cmp %i1, 0 2005ff8: 22 80 00 29 be,a 200609c 2005ffc: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 2006000: c2 04 00 00 ld [ %l0 ], %g1 2006004: 80 a0 60 00 cmp %g1, 0 2006008: 02 80 00 1f be 2006084 200600c: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 2006010: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006014: 80 a0 60 00 cmp %g1, 0 2006018: 12 80 00 1b bne 2006084 200601c: 05 00 80 6b sethi %hi(0x201ac00), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006020: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 201acb0 <_Thread_Dispatch_disable_level> 2006024: 82 00 60 01 inc %g1 2006028: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] * 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 *) 200602c: 33 00 80 6b sethi %hi(0x201ac00), %i1 2006030: 40 00 0b 03 call 2008c3c <_Objects_Allocate> 2006034: 90 16 63 00 or %i1, 0x300, %o0 ! 201af00 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 2006038: a0 92 20 00 orcc %o0, 0, %l0 200603c: 02 80 00 14 be 200608c 2006040: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 2006044: 40 00 09 03 call 2008450 <_CORE_RWLock_Initialize> 2006048: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200604c: c4 04 20 08 ld [ %l0 + 8 ], %g2 2006050: 82 16 63 00 or %i1, 0x300, %g1 2006054: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2006058: 03 00 00 3f sethi %hi(0xfc00), %g1 200605c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006060: 82 08 80 01 and %g2, %g1, %g1 2006064: 83 28 60 02 sll %g1, 2, %g1 2006068: e0 20 c0 01 st %l0, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 200606c: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 2006070: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 2006074: 40 00 0e af call 2009b30 <_Thread_Enable_dispatch> 2006078: b0 10 20 00 clr %i0 200607c: 81 c7 e0 08 ret 2006080: 81 e8 00 00 restore return 0; } 2006084: 81 c7 e0 08 ret 2006088: 91 e8 20 16 restore %g0, 0x16, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 200608c: 40 00 0e a9 call 2009b30 <_Thread_Enable_dispatch> 2006090: b0 10 20 0b mov 0xb, %i0 2006094: 81 c7 e0 08 ret 2006098: 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 ); 200609c: 40 00 02 b5 call 2006b70 <== NOT EXECUTED 20060a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 20060a4: 10 bf ff d8 b 2006004 <== NOT EXECUTED 20060a8: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 0200611c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 200611c: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 2006120: 80 a6 20 00 cmp %i0, 0 2006124: 02 80 00 11 be 2006168 2006128: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 200612c: 92 07 bf f0 add %fp, -16, %o1 2006130: 40 00 1d f2 call 200d8f8 <_POSIX_Absolute_timeout_to_ticks> 2006134: a0 10 20 00 clr %l0 switch (status) { 2006138: 80 a2 20 02 cmp %o0, 2 200613c: 18 80 00 0e bgu 2006174 2006140: b2 10 00 08 mov %o0, %i1 2006144: d2 06 00 00 ld [ %i0 ], %o1 2006148: 11 00 80 6b sethi %hi(0x201ac00), %o0 200614c: 94 07 bf f4 add %fp, -12, %o2 2006150: 40 00 0c 23 call 20091dc <_Objects_Get> 2006154: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006158: c2 07 bf f4 ld [ %fp + -12 ], %g1 200615c: 80 a0 60 00 cmp %g1, 0 2006160: 22 80 00 11 be,a 20061a4 2006164: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2006168: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 200616c: 81 c7 e0 08 ret 2006170: 91 e8 00 08 restore %g0, %o0, %o0 * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 2006174: 80 a2 20 03 cmp %o0, 3 2006178: 12 bf ff f4 bne 2006148 200617c: d2 06 00 00 ld [ %i0 ], %o1 2006180: 11 00 80 6b sethi %hi(0x201ac00), %o0 2006184: 94 07 bf f4 add %fp, -12, %o2 2006188: 40 00 0c 15 call 20091dc <_Objects_Get> 200618c: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006190: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006194: 80 a0 60 00 cmp %g1, 0 2006198: 12 bf ff f4 bne 2006168 200619c: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 20061a0: d2 06 00 00 ld [ %i0 ], %o1 20061a4: d6 07 bf f0 ld [ %fp + -16 ], %o3 20061a8: a0 0c 20 ff and %l0, 0xff, %l0 20061ac: 90 02 20 10 add %o0, 0x10, %o0 20061b0: 94 10 00 10 mov %l0, %o2 20061b4: 40 00 08 b2 call 200847c <_CORE_RWLock_Obtain_for_reading> 20061b8: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 20061bc: 40 00 0e 5d call 2009b30 <_Thread_Enable_dispatch> 20061c0: 01 00 00 00 nop 20061c4: 03 00 80 6b sethi %hi(0x201ac00), %g1 if ( !do_wait && 20061c8: 80 a4 20 00 cmp %l0, 0 20061cc: 12 80 00 0f bne 2006208 20061d0: 86 10 61 74 or %g1, 0x174, %g3 20061d4: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED 20061d8: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 201ad74 <_Thread_Executing> <== NOT EXECUTED 20061dc: 86 10 61 74 or %g1, 0x174, %g3 <== NOT EXECUTED 20061e0: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 20061e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 20061e8: 32 80 00 09 bne,a 200620c <== NOT EXECUTED 20061ec: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 20061f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20061f4: 02 bf ff de be 200616c <== NOT EXECUTED 20061f8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 20061fc: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2006200: 08 bf ff db bleu 200616c <== NOT EXECUTED 2006204: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2006208: c2 00 c0 00 ld [ %g3 ], %g1 200620c: 40 00 00 44 call 200631c <_POSIX_RWLock_Translate_core_RWLock_return_code> 2006210: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2006214: 81 c7 e0 08 ret 2006218: 91 e8 00 08 restore %g0, %o0, %o0 0200621c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 200621c: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 2006220: 80 a6 20 00 cmp %i0, 0 2006224: 02 80 00 11 be 2006268 2006228: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 200622c: 92 07 bf f0 add %fp, -16, %o1 2006230: 40 00 1d b2 call 200d8f8 <_POSIX_Absolute_timeout_to_ticks> 2006234: a0 10 20 00 clr %l0 switch (status) { 2006238: 80 a2 20 02 cmp %o0, 2 200623c: 18 80 00 0e bgu 2006274 2006240: b2 10 00 08 mov %o0, %i1 2006244: d2 06 00 00 ld [ %i0 ], %o1 2006248: 11 00 80 6b sethi %hi(0x201ac00), %o0 200624c: 94 07 bf f4 add %fp, -12, %o2 2006250: 40 00 0b e3 call 20091dc <_Objects_Get> 2006254: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006258: c2 07 bf f4 ld [ %fp + -12 ], %g1 200625c: 80 a0 60 00 cmp %g1, 0 2006260: 22 80 00 11 be,a 20062a4 2006264: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2006268: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 200626c: 81 c7 e0 08 ret 2006270: 91 e8 00 08 restore %g0, %o0, %o0 * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 2006274: 80 a2 20 03 cmp %o0, 3 2006278: 12 bf ff f4 bne 2006248 200627c: d2 06 00 00 ld [ %i0 ], %o1 2006280: 11 00 80 6b sethi %hi(0x201ac00), %o0 2006284: 94 07 bf f4 add %fp, -12, %o2 2006288: 40 00 0b d5 call 20091dc <_Objects_Get> 200628c: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006290: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006294: 80 a0 60 00 cmp %g1, 0 2006298: 12 bf ff f4 bne 2006268 200629c: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 20062a0: d2 06 00 00 ld [ %i0 ], %o1 20062a4: d6 07 bf f0 ld [ %fp + -16 ], %o3 20062a8: a0 0c 20 ff and %l0, 0xff, %l0 20062ac: 90 02 20 10 add %o0, 0x10, %o0 20062b0: 94 10 00 10 mov %l0, %o2 20062b4: 40 00 08 a7 call 2008550 <_CORE_RWLock_Obtain_for_writing> 20062b8: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 20062bc: 40 00 0e 1d call 2009b30 <_Thread_Enable_dispatch> 20062c0: 01 00 00 00 nop 20062c4: 03 00 80 6b sethi %hi(0x201ac00), %g1 if ( !do_wait && 20062c8: 80 a4 20 00 cmp %l0, 0 20062cc: 12 80 00 0f bne 2006308 20062d0: 86 10 61 74 or %g1, 0x174, %g3 20062d4: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED 20062d8: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 201ad74 <_Thread_Executing> <== NOT EXECUTED 20062dc: 86 10 61 74 or %g1, 0x174, %g3 <== NOT EXECUTED 20062e0: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 20062e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 20062e8: 32 80 00 09 bne,a 200630c <== NOT EXECUTED 20062ec: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 20062f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20062f4: 02 bf ff de be 200626c <== NOT EXECUTED 20062f8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 20062fc: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2006300: 08 bf ff db bleu 200626c <== NOT EXECUTED 2006304: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2006308: c2 00 c0 00 ld [ %g3 ], %g1 200630c: 40 00 00 04 call 200631c <_POSIX_RWLock_Translate_core_RWLock_return_code> 2006310: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2006314: 81 c7 e0 08 ret 2006318: 91 e8 00 08 restore %g0, %o0, %o0 0200573c : int pthread_setcancelstate( int state, int *oldstate ) { 200573c: 9d e3 bf 98 save %sp, -104, %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() ) 2005740: 03 00 80 59 sethi %hi(0x2016400), %g1 2005744: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 20164b0 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 2005748: 88 10 00 18 mov %i0, %g4 * 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() ) 200574c: 80 a0 a0 00 cmp %g2, 0 2005750: 12 80 00 1a bne 20057b8 2005754: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 2005758: 80 a6 60 00 cmp %i1, 0 200575c: 02 80 00 04 be 200576c 2005760: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 2005764: 08 80 00 04 bleu 2005774 2005768: 07 00 80 59 sethi %hi(0x2016400), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 200576c: 81 c7 e0 08 ret <== NOT EXECUTED 2005770: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005774: 31 00 80 59 sethi %hi(0x2016400), %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005778: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 200577c: c4 06 20 d4 ld [ %i0 + 0xd4 ], %g2 2005780: 82 00 60 01 inc %g1 2005784: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 2005788: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 200578c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005790: 80 a1 20 00 cmp %g4, 0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 2005794: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005798: 12 80 00 06 bne 20057b0 200579c: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 20057a0: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 20057a4: 80 a0 60 01 cmp %g1, 1 20057a8: 22 80 00 06 be,a 20057c0 20057ac: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20057b0: 40 00 0b 6b call 200855c <_Thread_Enable_dispatch> 20057b4: b0 10 20 00 clr %i0 20057b8: 81 c7 e0 08 ret 20057bc: 81 e8 00 00 restore _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 20057c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20057c4: 02 bf ff fb be 20057b0 <== NOT EXECUTED 20057c8: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20057cc: 40 00 0b 64 call 200855c <_Thread_Enable_dispatch> <== NOT EXECUTED 20057d0: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 20057d4: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 20057d8: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 20057dc: 7f ff fe ca call 2005304 <_POSIX_Thread_Exit> <== NOT EXECUTED 20057e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 20057e4: 81 c7 e0 08 ret <== NOT EXECUTED 20057e8: 81 e8 00 00 restore <== NOT EXECUTED 020057ec : int pthread_setcanceltype( int type, int *oldtype ) { 20057ec: 9d e3 bf 98 save %sp, -104, %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() ) 20057f0: 03 00 80 59 sethi %hi(0x2016400), %g1 20057f4: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 20164b0 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 20057f8: 88 10 00 18 mov %i0, %g4 * 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() ) 20057fc: 80 a0 a0 00 cmp %g2, 0 2005800: 12 80 00 1a bne 2005868 2005804: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 2005808: 80 a6 60 00 cmp %i1, 0 200580c: 02 80 00 04 be 200581c 2005810: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 2005814: 08 80 00 04 bleu 2005824 2005818: 07 00 80 59 sethi %hi(0x2016400), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 200581c: 81 c7 e0 08 ret <== NOT EXECUTED 2005820: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005824: 31 00 80 59 sethi %hi(0x2016400), %i0 2005828: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 200582c: c4 06 20 d4 ld [ %i0 + 0xd4 ], %g2 2005830: 82 00 60 01 inc %g1 2005834: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] 2005838: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 200583c: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 2005840: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005844: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 2005848: 80 a0 a0 00 cmp %g2, 0 200584c: 12 80 00 05 bne 2005860 2005850: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 2005854: 80 a1 20 01 cmp %g4, 1 2005858: 22 80 00 06 be,a 2005870 200585c: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 2005860: 40 00 0b 3f call 200855c <_Thread_Enable_dispatch> 2005864: b0 10 20 00 clr %i0 2005868: 81 c7 e0 08 ret 200586c: 81 e8 00 00 restore _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005870: 80 a0 60 00 cmp %g1, 0 2005874: 02 bf ff fb be 2005860 2005878: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 200587c: 40 00 0b 38 call 200855c <_Thread_Enable_dispatch> <== NOT EXECUTED 2005880: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 2005884: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 2005888: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 200588c: 7f ff fe 9e call 2005304 <_POSIX_Thread_Exit> <== NOT EXECUTED 2005890: b0 10 20 00 clr %i0 <== NOT EXECUTED 2005894: 81 c7 e0 08 ret <== NOT EXECUTED 2005898: 81 e8 00 00 restore <== NOT EXECUTED 02007f10 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 2007f10: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 2007f14: 80 a6 a0 00 cmp %i2, 0 2007f18: 22 80 00 41 be,a 200801c 2007f1c: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 2007f20: c2 06 80 00 ld [ %i2 ], %g1 2007f24: 82 00 7f ff add %g1, -1, %g1 2007f28: 80 a0 60 fd cmp %g1, 0xfd 2007f2c: 18 80 00 0a bgu 2007f54 2007f30: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007f34: 02 80 00 0a be 2007f5c 2007f38: a4 10 20 00 clr %l2 2007f3c: 04 80 00 4d ble 2008070 2007f40: 80 a6 60 02 cmp %i1, 2 2007f44: 02 80 00 48 be 2008064 2007f48: 80 a6 60 03 cmp %i1, 3 2007f4c: 02 80 00 36 be 2008024 2007f50: 01 00 00 00 nop case OBJECTS_ERROR: break; } return ESRCH; } 2007f54: 81 c7 e0 08 ret 2007f58: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007f5c: a6 10 20 00 clr %l3 2007f60: 92 10 00 18 mov %i0, %o1 2007f64: 11 00 80 65 sethi %hi(0x2019400), %o0 2007f68: 94 07 bf f4 add %fp, -12, %o2 2007f6c: 40 00 09 11 call 200a3b0 <_Objects_Get> 2007f70: 90 12 23 40 or %o0, 0x340, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2007f74: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007f78: a2 10 00 08 mov %o0, %l1 2007f7c: 80 a0 60 00 cmp %g1, 0 2007f80: 12 80 00 27 bne 200801c 2007f84: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2007f88: e0 02 21 6c ld [ %o0 + 0x16c ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 2007f8c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 2007f90: 80 a0 60 03 cmp %g1, 3 2007f94: 02 80 00 46 be 20080ac 2007f98: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 2007f9c: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 2007fa0: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 2007fa4: e4 24 60 7c st %l2, [ %l1 + 0x7c ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2007fa8: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 2007fac: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 2007fb0: e6 24 60 80 st %l3, [ %l1 + 0x80 ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2007fb4: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 2007fb8: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007fbc: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2007fc0: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 2007fc4: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 2007fc8: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 2007fcc: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 2007fd0: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 2007fd4: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007fd8: 06 80 00 0f bl 2008014 2007fdc: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 2007fe0: 80 a6 60 02 cmp %i1, 2 2007fe4: 14 80 00 29 bg 2008088 2007fe8: 80 a6 60 03 cmp %i1, 3 2007fec: c6 04 20 80 ld [ %l0 + 0x80 ], %g3 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007ff0: 03 00 80 65 sethi %hi(0x2019400), %g1 2007ff4: c4 00 60 08 ld [ %g1 + 8 ], %g2 ! 2019408 <_Thread_Ticks_per_timeslice> 2007ff8: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2007ffc: 90 10 00 11 mov %l1, %o0 2008000: 92 22 40 03 sub %o1, %g3, %o1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008004: c4 24 60 78 st %g2, [ %l1 + 0x78 ] the_thread->real_priority = 2008008: d2 24 60 18 st %o1, [ %l1 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 200800c: 40 00 09 a8 call 200a6ac <_Thread_Change_priority> 2008010: 94 10 20 01 mov 1, %o2 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 2008014: 40 00 0b 3c call 200ad04 <_Thread_Enable_dispatch> 2008018: b0 10 20 00 clr %i0 200801c: 81 c7 e0 08 ret 2008020: 81 e8 00 00 restore case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 2008024: 40 00 0f 59 call 200bd88 <_Timespec_To_ticks> 2008028: 90 06 a0 08 add %i2, 8, %o0 200802c: a0 10 00 08 mov %o0, %l0 2008030: 40 00 0f 56 call 200bd88 <_Timespec_To_ticks> 2008034: 90 06 a0 10 add %i2, 0x10, %o0 2008038: 80 a4 00 08 cmp %l0, %o0 200803c: 2a bf ff f8 bcs,a 200801c 2008040: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 2008044: c2 06 a0 04 ld [ %i2 + 4 ], %g1 2008048: 82 00 7f ff add %g1, -1, %g1 200804c: 80 a0 60 fd cmp %g1, 0xfd 2008050: 18 bf ff c1 bgu 2007f54 2008054: 03 00 80 1f sethi %hi(0x2007c00), %g1 2008058: a4 10 20 03 mov 3, %l2 200805c: 10 bf ff c1 b 2007f60 2008060: a6 10 62 2c or %g1, 0x22c, %l3 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2008064: a4 10 20 02 mov 2, %l2 2008068: 10 bf ff be b 2007f60 200806c: a6 10 20 00 clr %l3 2008070: 80 a6 60 00 cmp %i1, 0 2008074: a4 10 20 01 mov 1, %l2 2008078: 02 bf ff ba be 2007f60 200807c: a6 10 20 00 clr %l3 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 2008080: 81 c7 e0 08 ret 2008084: 91 e8 20 16 restore %g0, 0x16, %o0 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2008088: 12 bf ff e3 bne 2008014 200808c: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 2008090: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 2008094: 40 00 10 bd call 200c388 <_Watchdog_Remove> 2008098: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 200809c: 92 10 00 11 mov %l1, %o1 20080a0: 7f ff ff 77 call 2007e7c <_POSIX_Threads_Sporadic_budget_TSR> 20080a4: 90 10 20 00 clr %o0 20080a8: 30 bf ff db b,a 2008014 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 20080ac: 40 00 10 b7 call 200c388 <_Watchdog_Remove> 20080b0: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 20080b4: 10 bf ff bb b 2007fa0 20080b8: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 020058c0 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 20058c0: 9d e3 bf 98 save %sp, -104, %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() ) 20058c4: 03 00 80 59 sethi %hi(0x2016400), %g1 20058c8: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 20164b0 <_ISR_Nest_level> 20058cc: 80 a0 a0 00 cmp %g2, 0 20058d0: 12 80 00 15 bne 2005924 20058d4: 07 00 80 59 sethi %hi(0x2016400), %g3 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 20058d8: 33 00 80 59 sethi %hi(0x2016400), %i1 20058dc: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 20058e0: c4 06 60 d4 ld [ %i1 + 0xd4 ], %g2 20058e4: 82 00 60 01 inc %g1 20058e8: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 20058ec: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 20058f0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 20058f4: 80 a0 60 00 cmp %g1, 0 20058f8: 12 80 00 0d bne 200592c 20058fc: 01 00 00 00 nop 2005900: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 2005904: 80 a0 60 00 cmp %g1, 0 2005908: 02 80 00 09 be 200592c 200590c: 01 00 00 00 nop thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 2005910: 40 00 0b 13 call 200855c <_Thread_Enable_dispatch> 2005914: 01 00 00 00 nop if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 2005918: f0 06 60 d4 ld [ %i1 + 0xd4 ], %i0 200591c: 7f ff fe 7a call 2005304 <_POSIX_Thread_Exit> 2005920: 93 e8 3f ff restore %g0, -1, %o1 2005924: 81 c7 e0 08 ret <== NOT EXECUTED 2005928: 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(); 200592c: 40 00 0b 0c call 200855c <_Thread_Enable_dispatch> 2005930: 81 e8 00 00 restore 2005934: 01 00 00 00 nop <== NOT EXECUTED 02006f00 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 2006f00: 9a 92 60 00 orcc %o1, 0, %o5 2006f04: 02 80 00 4d be 2007038 2006f08: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 2006f0c: 02 80 00 4c be 200703c 2006f10: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 2006f14: c2 03 40 00 ld [ %o5 ], %g1 2006f18: 80 a0 60 00 cmp %g1, 0 2006f1c: 22 80 00 44 be,a 200702c 2006f20: c2 03 60 04 ld [ %o5 + 4 ], %g1 *registered_major = 0; /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006f24: 03 00 80 71 sethi %hi(0x201c400), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 2006f28: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006f2c: c8 00 61 e0 ld [ %g1 + 0x1e0 ], %g4 2006f30: 80 a1 00 08 cmp %g4, %o0 2006f34: 08 80 00 39 bleu 2007018 2006f38: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 2006f3c: 80 a2 20 00 cmp %o0, 0 2006f40: 12 80 00 29 bne 2006fe4 2006f44: 03 00 80 71 sethi %hi(0x201c400), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006f48: 90 81 3f ff addcc %g4, -1, %o0 2006f4c: 02 80 00 35 be 2007020 2006f50: 05 00 80 71 sethi %hi(0x201c400), %g2 2006f54: c6 00 a1 e4 ld [ %g2 + 0x1e4 ], %g3 ! 201c5e4 <_IO_Driver_address_table> 2006f58: 85 29 20 03 sll %g4, 3, %g2 2006f5c: 83 29 20 05 sll %g4, 5, %g1 2006f60: 82 20 40 02 sub %g1, %g2, %g1 2006f64: 82 00 7f e8 add %g1, -24, %g1 2006f68: 10 80 00 05 b 2006f7c 2006f6c: 84 00 c0 01 add %g3, %g1, %g2 2006f70: 90 82 3f ff addcc %o0, -1, %o0 2006f74: 02 80 00 2b be 2007020 2006f78: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 2006f7c: c2 00 80 00 ld [ %g2 ], %g1 2006f80: 80 a0 60 00 cmp %g1, 0 2006f84: 12 bf ff fb bne 2006f70 2006f88: 88 10 00 02 mov %g2, %g4 2006f8c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2006f90: 80 a0 60 00 cmp %g1, 0 2006f94: 32 bf ff f8 bne,a 2006f74 2006f98: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 2006f9c: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 2006fa0: d0 22 80 00 st %o0, [ %o2 ] if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 2006fa4: c2 21 00 00 st %g1, [ %g4 ] 2006fa8: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fac: 92 10 20 00 clr %o1 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 2006fb0: c4 21 20 04 st %g2, [ %g4 + 4 ] 2006fb4: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fb8: 94 10 20 00 clr %o2 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 2006fbc: c2 21 20 08 st %g1, [ %g4 + 8 ] 2006fc0: c4 03 60 0c ld [ %o5 + 0xc ], %g2 2006fc4: c4 21 20 0c st %g2, [ %g4 + 0xc ] 2006fc8: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 2006fcc: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 2006fd0: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 2006fd4: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fd8: 82 13 c0 00 mov %o7, %g1 2006fdc: 7f ff ff 48 call 2006cfc 2006fe0: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 2006fe4: c8 00 61 e4 ld [ %g1 + 0x1e4 ], %g4 2006fe8: 85 2a 20 03 sll %o0, 3, %g2 2006fec: 83 2a 20 05 sll %o0, 5, %g1 2006ff0: 82 20 40 02 sub %g1, %g2, %g1 2006ff4: c6 01 00 01 ld [ %g4 + %g1 ], %g3 2006ff8: 80 a0 e0 00 cmp %g3, 0 2006ffc: 12 80 00 06 bne 2007014 2007000: 88 01 00 01 add %g4, %g1, %g4 2007004: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 2007008: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200700c: 22 bf ff e5 be,a 2006fa0 <== NOT EXECUTED 2007010: c2 03 40 00 ld [ %o5 ], %g1 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007014: 82 10 20 0c mov 0xc, %g1 } 2007018: 81 c3 e0 08 retl 200701c: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007020: 82 10 20 05 mov 5, %g1 } 2007024: 81 c3 e0 08 retl 2007028: 90 10 00 01 mov %g1, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 200702c: 80 a0 60 00 cmp %g1, 0 2007030: 12 bf ff be bne 2006f28 2007034: 03 00 80 71 sethi %hi(0x201c400), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007038: 82 10 20 09 mov 9, %g1 } 200703c: 81 c3 e0 08 retl 2007040: 90 10 00 01 mov %g1, %o0 020083bc : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 20083bc: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 20083c0: 80 a6 20 00 cmp %i0, 0 20083c4: 02 80 00 23 be 2008450 20083c8: 03 00 80 92 sethi %hi(0x2024800), %g1 return; 20083cc: a4 10 63 74 or %g1, 0x374, %l2 ! 2024b74 <_Objects_Information_table+0x4> 20083d0: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 20083d4: c2 04 80 00 ld [ %l2 ], %g1 20083d8: 80 a0 60 00 cmp %g1, 0 20083dc: 22 80 00 1a be,a 2008444 20083e0: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 20083e4: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 20083e8: 80 a4 60 00 cmp %l1, 0 20083ec: 22 80 00 16 be,a 2008444 20083f0: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 20083f4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 20083f8: 86 90 60 00 orcc %g1, 0, %g3 20083fc: 22 80 00 12 be,a 2008444 2008400: a4 04 a0 04 add %l2, 4, %l2 2008404: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 2008408: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 200840c: 83 2c 20 02 sll %l0, 2, %g1 2008410: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 2008414: 80 a2 20 00 cmp %o0, 0 2008418: 02 80 00 05 be 200842c 200841c: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 2008420: 9f c6 00 00 call %i0 2008424: 01 00 00 00 nop 2008428: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 200842c: 83 28 e0 10 sll %g3, 0x10, %g1 2008430: 83 30 60 10 srl %g1, 0x10, %g1 2008434: 80 a0 40 10 cmp %g1, %l0 2008438: 3a bf ff f5 bcc,a 200840c 200843c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 2008440: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2008444: 80 a4 80 13 cmp %l2, %l3 2008448: 32 bf ff e4 bne,a 20083d8 200844c: c2 04 80 00 ld [ %l2 ], %g1 2008450: 81 c7 e0 08 ret 2008454: 81 e8 00 00 restore 02006968 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 2006968: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 200696c: 11 00 80 74 sethi %hi(0x201d000), %o0 2006970: 92 10 00 18 mov %i0, %o1 2006974: 90 12 21 0c or %o0, 0x10c, %o0 2006978: 40 00 09 4e call 2008eb0 <_Objects_Get> 200697c: 94 07 bf f4 add %fp, -12, %o2 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2006980: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006984: 80 a0 60 00 cmp %g1, 0 2006988: 02 80 00 04 be 2006998 200698c: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006990: 81 c7 e0 08 ret 2006994: 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 ) ) { 2006998: 25 00 80 74 sethi %hi(0x201d000), %l2 200699c: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 20069a0: c2 04 a3 44 ld [ %l2 + 0x344 ], %g1 20069a4: 80 a0 80 01 cmp %g2, %g1 20069a8: 02 80 00 06 be 20069c0 20069ac: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 20069b0: 40 00 0b c3 call 20098bc <_Thread_Enable_dispatch> 20069b4: b0 10 20 17 mov 0x17, %i0 20069b8: 81 c7 e0 08 ret 20069bc: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 20069c0: 12 80 00 0f bne 20069fc 20069c4: 01 00 00 00 nop switch ( the_period->state ) { 20069c8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20069cc: 80 a0 60 00 cmp %g1, 0 20069d0: 02 80 00 07 be 20069ec 20069d4: b0 10 20 0b mov 0xb, %i0 20069d8: 82 00 7f fd add %g1, -3, %g1 20069dc: 80 a0 60 01 cmp %g1, 1 20069e0: 18 80 00 03 bgu 20069ec 20069e4: b0 10 20 00 clr %i0 20069e8: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20069ec: 40 00 0b b4 call 20098bc <_Thread_Enable_dispatch> 20069f0: 01 00 00 00 nop 20069f4: 81 c7 e0 08 ret 20069f8: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20069fc: 7f ff f0 77 call 2002bd8 2006a00: 01 00 00 00 nop 2006a04: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 2006a08: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 2006a0c: 80 a4 e0 02 cmp %l3, 2 2006a10: 02 80 00 1a be 2006a78 2006a14: 80 a4 e0 04 cmp %l3, 4 2006a18: 02 80 00 32 be 2006ae0 2006a1c: 80 a4 e0 00 cmp %l3, 0 2006a20: 12 bf ff dc bne 2006990 2006a24: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2006a28: 7f ff f0 70 call 2002be8 2006a2c: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 2006a30: 7f ff ff 58 call 2006790 <_Rate_monotonic_Initiate_statistics> 2006a34: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006a38: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a3c: 03 00 80 1b sethi %hi(0x2006c00), %g1 2006a40: 82 10 62 3c or %g1, 0x23c, %g1 ! 2006e3c <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006a44: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a48: 92 04 60 10 add %l1, 0x10, %o1 2006a4c: 11 00 80 74 sethi %hi(0x201d000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006a50: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a54: 90 12 23 64 or %o0, 0x364, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006a58: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006a5c: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2006a60: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 2006a64: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a68: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a6c: 40 00 11 2f call 200af28 <_Watchdog_Insert> 2006a70: b0 10 20 00 clr %i0 2006a74: 30 bf ff de b,a 20069ec case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006a78: 7f ff ff 62 call 2006800 <_Rate_monotonic_Update_statistics> 2006a7c: 90 10 00 11 mov %l1, %o0 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 2006a80: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2006a84: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 2006a88: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006a8c: 7f ff f0 57 call 2002be8 2006a90: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2006a94: c2 04 a3 44 ld [ %l2 + 0x344 ], %g1 2006a98: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006a9c: 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; 2006aa0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006aa4: 40 00 0e 3a call 200a38c <_Thread_Set_state> 2006aa8: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006aac: 7f ff f0 4b call 2002bd8 2006ab0: 01 00 00 00 nop local_state = the_period->state; 2006ab4: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006ab8: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 2006abc: 7f ff f0 4b call 2002be8 2006ac0: 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 ) 2006ac4: 80 a4 20 03 cmp %l0, 3 2006ac8: 02 80 00 17 be 2006b24 2006acc: d0 04 a3 44 ld [ %l2 + 0x344 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 2006ad0: 40 00 0b 7b call 20098bc <_Thread_Enable_dispatch> 2006ad4: b0 10 20 00 clr %i0 2006ad8: 81 c7 e0 08 ret 2006adc: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 2006ae0: 7f ff ff 48 call 2006800 <_Rate_monotonic_Update_statistics> 2006ae4: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 2006ae8: 7f ff f0 40 call 2002be8 2006aec: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006af0: 82 10 20 02 mov 2, %g1 2006af4: 92 04 60 10 add %l1, 0x10, %o1 2006af8: 11 00 80 74 sethi %hi(0x201d000), %o0 2006afc: 90 12 23 64 or %o0, 0x364, %o0 ! 201d364 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b00: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 2006b04: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 2006b08: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b0c: 40 00 11 07 call 200af28 <_Watchdog_Insert> 2006b10: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 2006b14: 40 00 0b 6a call 20098bc <_Thread_Enable_dispatch> 2006b18: 01 00 00 00 nop 2006b1c: 81 c7 e0 08 ret 2006b20: 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 ); 2006b24: 40 00 0a 4d call 2009458 <_Thread_Clear_state> <== NOT EXECUTED 2006b28: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 2006b2c: 30 bf ff e9 b,a 2006ad0 <== NOT EXECUTED 02023a6c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 2023a6c: 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 ) 2023a70: 80 a6 60 00 cmp %i1, 0 2023a74: 02 80 00 4a be 2023b9c 2023a78: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 2023a7c: 13 00 81 1a sethi %hi(0x2046800), %o1 2023a80: 9f c6 40 00 call %i1 2023a84: 92 12 63 28 or %o1, 0x328, %o1 ! 2046b28 <_POSIX_Threads_Default_attributes+0x38> #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 2023a88: 90 10 00 18 mov %i0, %o0 2023a8c: 13 00 81 1a sethi %hi(0x2046800), %o1 2023a90: 9f c6 40 00 call %i1 2023a94: 92 12 63 48 or %o1, 0x348, %o1 ! 2046b48 <_POSIX_Threads_Default_attributes+0x58> #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 2023a98: 90 10 00 18 mov %i0, %o0 2023a9c: 13 00 81 1a sethi %hi(0x2046800), %o1 2023aa0: 9f c6 40 00 call %i1 2023aa4: 92 12 63 70 or %o1, 0x370, %o1 ! 2046b70 <_POSIX_Threads_Default_attributes+0x80> Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2023aa8: 90 10 00 18 mov %i0, %o0 2023aac: 13 00 81 1a sethi %hi(0x2046800), %o1 2023ab0: 9f c6 40 00 call %i1 2023ab4: 92 12 63 98 or %o1, 0x398, %o1 ! 2046b98 <_POSIX_Threads_Default_attributes+0xa8> #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 2023ab8: 90 10 00 18 mov %i0, %o0 2023abc: 13 00 81 1a sethi %hi(0x2046800), %o1 2023ac0: 9f c6 40 00 call %i1 2023ac4: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 2046be8 <_POSIX_Threads_Default_attributes+0xf8> /* * 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 ; 2023ac8: 03 00 81 7d sethi %hi(0x205f400), %g1 2023acc: a6 10 62 5c or %g1, 0x25c, %l3 ! 205f65c <_Rate_monotonic_Information> 2023ad0: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 2023ad4: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 2023ad8: 80 a4 80 01 cmp %l2, %g1 2023adc: 18 80 00 30 bgu 2023b9c 2023ae0: 03 00 81 1b sethi %hi(0x2046c00), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2023ae4: 05 00 81 1c sethi %hi(0x2047000), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023ae8: b6 10 60 38 or %g1, 0x38, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2023aec: b8 10 a0 40 or %g2, 0x40, %i4 2023af0: a8 07 bf 98 add %fp, -104, %l4 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 ); 2023af4: ae 07 bf d0 add %fp, -48, %l7 2023af8: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2023afc: ba 07 bf b0 add %fp, -80, %i5 2023b00: aa 07 bf e8 add %fp, -24, %l5 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 2023b04: 10 80 00 06 b 2023b1c 2023b08: b4 07 bf c8 add %fp, -56, %i2 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 2023b0c: a4 04 a0 01 inc %l2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2023b10: 80 a0 40 12 cmp %g1, %l2 2023b14: 0a 80 00 22 bcs 2023b9c 2023b18: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 2023b1c: 90 10 00 12 mov %l2, %o0 2023b20: 40 00 2e eb call 202f6cc 2023b24: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 2023b28: 80 a2 20 00 cmp %o0, 0 2023b2c: 32 bf ff f8 bne,a 2023b0c 2023b30: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 2023b34: 92 10 00 17 mov %l7, %o1 2023b38: 40 00 2e fa call 202f720 2023b3c: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 2023b40: d0 07 bf d0 ld [ %fp + -48 ], %o0 2023b44: 80 a2 20 00 cmp %o0, 0 2023b48: 12 80 00 4b bne 2023c74 2023b4c: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023b50: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 2023b54: 94 10 00 12 mov %l2, %o2 2023b58: 92 10 00 1b mov %i3, %o1 2023b5c: 96 10 00 16 mov %l6, %o3 2023b60: 9f c6 40 00 call %i1 2023b64: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2023b68: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2023b6c: 94 10 00 15 mov %l5, %o2 2023b70: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2023b74: 80 a0 60 00 cmp %g1, 0 2023b78: 12 80 00 0b bne 2023ba4 2023b7c: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 2023b80: 9f c6 40 00 call %i1 2023b84: 90 10 00 18 mov %i0, %o0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2023b88: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 2023b8c: a4 04 a0 01 inc %l2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2023b90: 80 a0 40 12 cmp %g1, %l2 2023b94: 1a bf ff e3 bcc 2023b20 2023b98: 90 10 00 12 mov %l2, %o0 2023b9c: 81 c7 e0 08 ret 2023ba0: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2023ba4: 40 00 06 05 call 20253b8 <_Timespec_Divide_by_integer> 2023ba8: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 2023bac: d0 07 bf a4 ld [ %fp + -92 ], %o0 2023bb0: 40 00 77 bb call 2041a9c <.div> 2023bb4: 92 10 23 e8 mov 0x3e8, %o1 2023bb8: a2 10 00 08 mov %o0, %l1 2023bbc: d0 07 bf ac ld [ %fp + -84 ], %o0 2023bc0: 40 00 77 b7 call 2041a9c <.div> 2023bc4: 92 10 23 e8 mov 0x3e8, %o1 2023bc8: c2 07 bf e8 ld [ %fp + -24 ], %g1 2023bcc: a0 10 00 08 mov %o0, %l0 2023bd0: d0 07 bf ec ld [ %fp + -20 ], %o0 2023bd4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2023bd8: 40 00 77 b1 call 2041a9c <.div> 2023bdc: 92 10 23 e8 mov 0x3e8, %o1 2023be0: d8 07 bf a8 ld [ %fp + -88 ], %o4 2023be4: d4 07 bf a0 ld [ %fp + -96 ], %o2 2023be8: 96 10 00 11 mov %l1, %o3 2023bec: 9a 10 00 10 mov %l0, %o5 2023bf0: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2023bf4: 13 00 81 1b sethi %hi(0x2046c00), %o1 2023bf8: 90 10 00 18 mov %i0, %o0 2023bfc: 9f c6 40 00 call %i1 2023c00: 92 12 60 50 or %o1, 0x50, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 2023c04: d2 07 bf 98 ld [ %fp + -104 ], %o1 2023c08: 94 10 00 15 mov %l5, %o2 2023c0c: 40 00 05 eb call 20253b8 <_Timespec_Divide_by_integer> 2023c10: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 2023c14: d0 07 bf bc ld [ %fp + -68 ], %o0 2023c18: 40 00 77 a1 call 2041a9c <.div> 2023c1c: 92 10 23 e8 mov 0x3e8, %o1 2023c20: a2 10 00 08 mov %o0, %l1 2023c24: d0 07 bf c4 ld [ %fp + -60 ], %o0 2023c28: 40 00 77 9d call 2041a9c <.div> 2023c2c: 92 10 23 e8 mov 0x3e8, %o1 2023c30: c2 07 bf e8 ld [ %fp + -24 ], %g1 2023c34: a0 10 00 08 mov %o0, %l0 2023c38: d0 07 bf ec ld [ %fp + -20 ], %o0 2023c3c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2023c40: 40 00 77 97 call 2041a9c <.div> 2023c44: 92 10 23 e8 mov 0x3e8, %o1 2023c48: d4 07 bf b8 ld [ %fp + -72 ], %o2 2023c4c: d8 07 bf c0 ld [ %fp + -64 ], %o4 2023c50: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2023c54: 96 10 00 11 mov %l1, %o3 2023c58: 9a 10 00 10 mov %l0, %o5 2023c5c: 90 10 00 18 mov %i0, %o0 2023c60: 13 00 81 1b sethi %hi(0x2046c00), %o1 2023c64: 9f c6 40 00 call %i1 2023c68: 92 12 60 70 or %o1, 0x70, %o1 ! 2046c70 <_POSIX_Threads_Default_attributes+0x180> /* * 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 ; 2023c6c: 10 bf ff a8 b 2023b0c 2023c70: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 2023c74: 94 10 00 16 mov %l6, %o2 2023c78: 7f ff 92 fa call 2008860 2023c7c: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023c80: 10 bf ff b5 b 2023b54 2023c84: d8 1f bf 98 ldd [ %fp + -104 ], %o4 020100c4 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 20100c4: 9d e3 bf 90 save %sp, -112, %sp 20100c8: a0 10 00 18 mov %i0, %l0 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 20100cc: 80 a6 60 00 cmp %i1, 0 20100d0: 02 80 00 28 be 2010170 20100d4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 20100d8: 23 00 80 c8 sethi %hi(0x2032000), %l1 20100dc: 40 00 09 38 call 20125bc <_API_Mutex_Lock> 20100e0: d0 04 61 fc ld [ %l1 + 0x1fc ], %o0 ! 20321fc <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 20100e4: 92 10 00 10 mov %l0, %o1 20100e8: 11 00 80 c7 sethi %hi(0x2031c00), %o0 20100ec: 94 07 bf f0 add %fp, -16, %o2 20100f0: 40 00 10 4f call 201422c <_Objects_Get_no_protection> 20100f4: 90 12 23 74 or %o0, 0x374, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20100f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 20100fc: 80 a0 60 00 cmp %g1, 0 2010100: 12 80 00 16 bne 2010158 2010104: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 2010108: 92 10 00 19 mov %i1, %o1 201010c: 94 10 00 1a mov %i2, %o2 2010110: 90 02 20 68 add %o0, 0x68, %o0 2010114: 96 07 bf f4 add %fp, -12, %o3 2010118: 40 00 0c 6e call 20132d0 <_Heap_Extend> 201011c: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010120: 80 a2 20 01 cmp %o0, 1 2010124: 02 80 00 11 be 2010168 2010128: 01 00 00 00 nop 201012c: 1a 80 00 13 bcc 2010178 2010130: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010134: c6 07 bf f4 ld [ %fp + -12 ], %g3 2010138: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 201013c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010140: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 2010144: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010148: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 201014c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 2010150: 10 80 00 06 b 2010168 2010154: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 2010158: 80 a0 60 01 cmp %g1, 1 201015c: 02 80 00 03 be 2010168 2010160: b0 10 20 04 mov 4, %i0 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 2010164: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010168: 40 00 09 2b call 2012614 <_API_Mutex_Unlock> 201016c: d0 04 61 fc ld [ %l1 + 0x1fc ], %o0 return return_status; } 2010170: 81 c7 e0 08 ret 2010174: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 2010178: 12 bf ff fb bne 2010164 201017c: b0 10 20 18 mov 0x18, %i0 2010180: 30 bf ff fa b,a 2010168 02010480 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 2010480: 9d e3 bf 88 save %sp, -120, %sp uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 2010484: 80 a6 e0 00 cmp %i3, 0 2010488: 02 80 00 2e be 2010540 201048c: 21 00 80 c8 sethi %hi(0x2032000), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 2010490: 40 00 08 4b call 20125bc <_API_Mutex_Lock> 2010494: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 ! 20321fc <_RTEMS_Allocator_Mutex> 2010498: 92 10 00 18 mov %i0, %o1 201049c: 11 00 80 c7 sethi %hi(0x2031c00), %o0 20104a0: 94 07 bf f0 add %fp, -16, %o2 20104a4: 40 00 0f 62 call 201422c <_Objects_Get_no_protection> 20104a8: 90 12 23 74 or %o0, 0x374, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20104ac: c2 07 bf f0 ld [ %fp + -16 ], %g1 20104b0: 80 a0 60 00 cmp %g1, 0 20104b4: 12 80 00 14 bne 2010504 20104b8: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 20104bc: 94 10 00 1a mov %i2, %o2 20104c0: 92 10 00 19 mov %i1, %o1 20104c4: 90 02 20 68 add %o0, 0x68, %o0 20104c8: 96 07 bf ec add %fp, -20, %o3 20104cc: 40 00 0d 0b call 20138f8 <_Heap_Resize_block> 20104d0: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 20104d4: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 20104d8: b4 92 20 00 orcc %o0, 0, %i2 20104dc: 12 80 00 13 bne 2010528 20104e0: c2 26 c0 00 st %g1, [ %i3 ] 20104e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 20104e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20104ec: 12 80 00 17 bne 2010548 <== NOT EXECUTED 20104f0: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 20104f4: 40 00 08 48 call 2012614 <_API_Mutex_Unlock> <== NOT EXECUTED 20104f8: b0 10 20 00 clr %i0 <== NOT EXECUTED 20104fc: 81 c7 e0 08 ret <== NOT EXECUTED 2010500: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010504: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 2010508: 82 18 60 01 xor %g1, 1, %g1 201050c: 80 a0 00 01 cmp %g0, %g1 2010510: 84 40 3f ff addx %g0, -1, %g2 2010514: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010518: 40 00 08 3f call 2012614 <_API_Mutex_Unlock> 201051c: b0 06 20 19 add %i0, 0x19, %i0 2010520: 81 c7 e0 08 ret 2010524: 81 e8 00 00 restore _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 2010528: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 201052c: 40 00 08 3a call 2012614 <_API_Mutex_Unlock> 2010530: b0 10 20 0d mov 0xd, %i0 return 2010534: 80 a6 a0 01 cmp %i2, 1 2010538: 02 80 00 07 be 2010554 201053c: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 2010540: 81 c7 e0 08 ret 2010544: 91 e8 20 09 restore %g0, 9, %o0 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 2010548: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201054c: 40 00 23 5c call 20192bc <_Region_Process_queue> <== NOT EXECUTED 2010550: b0 10 20 00 clr %i0 <== NOT EXECUTED 2010554: 81 c7 e0 08 ret <== NOT EXECUTED 2010558: 81 e8 00 00 restore <== NOT EXECUTED 02005540 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 2005540: 9d e3 bf 80 save %sp, -128, %sp register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 2005544: a4 96 20 00 orcc %i0, 0, %l2 2005548: 02 80 00 33 be 2005614 200554c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 2005550: 80 a7 20 00 cmp %i4, 0 2005554: 02 80 00 30 be 2005614 2005558: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 200555c: 82 8e a0 c0 andcc %i2, 0xc0, %g1 2005560: 12 80 00 2f bne 200561c 2005564: a0 0e a0 30 and %i2, 0x30, %l0 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 2005568: 80 a4 20 00 cmp %l0, 0 200556c: 02 80 00 04 be 200557c 2005570: 80 a6 60 01 cmp %i1, 1 2005574: 18 80 00 28 bgu 2005614 2005578: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200557c: 05 00 80 60 sethi %hi(0x2018000), %g2 2005580: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> 2005584: 82 00 60 01 inc %g1 2005588: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 200558c: 31 00 80 60 sethi %hi(0x2018000), %i0 2005590: 40 00 05 94 call 2006be0 <_Objects_Allocate> 2005594: 90 16 20 94 or %i0, 0x94, %o0 ! 2018094 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 2005598: a2 92 20 00 orcc %o0, 0, %l1 200559c: 02 80 00 4e be 20056d4 20055a0: 80 a4 20 00 cmp %l0, 0 * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 20055a4: 02 80 00 2c be 2005654 20055a8: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 20055ac: 80 8e a0 40 btst 0x40, %i2 20055b0: 02 80 00 44 be 20056c0 20055b4: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 20055b8: 82 10 20 02 mov 2, %g1 20055bc: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 20055c0: 80 a4 20 10 cmp %l0, 0x10 20055c4: 02 80 00 48 be 20056e4 20055c8: 82 10 20 02 mov 2, %g1 the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 20055cc: c0 2f bf e4 clrb [ %fp + -28 ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 20055d0: c2 27 bf e0 st %g1, [ %fp + -32 ] the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 20055d4: 82 1e 60 01 xor %i1, 1, %g1 20055d8: 80 a0 00 01 cmp %g0, %g1 } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 20055dc: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 20055e0: 94 60 3f ff subx %g0, -1, %o2 20055e4: 90 04 60 14 add %l1, 0x14, %o0 20055e8: 40 00 03 64 call 2006378 <_CORE_mutex_Initialize> 20055ec: 92 07 bf e0 add %fp, -32, %o1 &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 20055f0: 80 a2 20 06 cmp %o0, 6 20055f4: 32 80 00 26 bne,a 200568c 20055f8: c4 04 60 08 ld [ %l1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 20055fc: 90 16 20 94 or %i0, 0x94, %o0 <== NOT EXECUTED 2005600: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2005604: 40 00 06 72 call 2006fcc <_Objects_Free> <== NOT EXECUTED 2005608: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200560c: 40 00 09 60 call 2007b8c <_Thread_Enable_dispatch> <== NOT EXECUTED 2005610: 01 00 00 00 nop <== NOT EXECUTED 2005614: 81 c7 e0 08 ret 2005618: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 200561c: 80 a4 20 10 cmp %l0, 0x10 2005620: 02 80 00 06 be 2005638 2005624: 80 a4 20 20 cmp %l0, 0x20 2005628: 02 80 00 05 be 200563c 200562c: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 2005630: 81 c7 e0 08 ret 2005634: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 2005638: 80 8e a0 04 btst 4, %i2 200563c: 02 bf ff fd be 2005630 2005640: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 2005644: 12 bf ff ca bne 200556c 2005648: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 200564c: 81 c7 e0 08 ret 2005650: 91 e8 20 0b restore %g0, 0xb, %o0 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 2005654: 80 8e a0 04 btst 4, %i2 2005658: 22 80 00 04 be,a 2005668 200565c: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 2005660: 82 10 20 01 mov 1, %g1 2005664: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005668: 82 10 3f ff mov -1, %g1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 200566c: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 2005670: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 2005674: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005678: c2 27 bf f0 st %g1, [ %fp + -16 ] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 200567c: 90 04 60 14 add %l1, 0x14, %o0 2005680: 40 00 04 29 call 2006724 <_CORE_semaphore_Initialize> 2005684: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005688: c4 04 60 08 ld [ %l1 + 8 ], %g2 200568c: 82 16 20 94 or %i0, 0x94, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005690: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005694: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 2005698: c4 27 00 00 st %g2, [ %i4 ] 200569c: 03 00 00 3f sethi %hi(0xfc00), %g1 20056a0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20056a4: 84 08 80 01 and %g2, %g1, %g2 20056a8: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 20056ac: b0 10 20 00 clr %i0 20056b0: 40 00 09 37 call 2007b8c <_Thread_Enable_dispatch> 20056b4: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 20056b8: 81 c7 e0 08 ret 20056bc: 81 e8 00 00 restore if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 20056c0: 02 80 00 0f be 20056fc 20056c4: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 20056c8: 82 10 20 03 mov 3, %g1 20056cc: 10 bf ff bd b 20055c0 20056d0: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 20056d4: 40 00 09 2e call 2007b8c <_Thread_Enable_dispatch> 20056d8: b0 10 20 05 mov 5, %i0 20056dc: 81 c7 e0 08 ret 20056e0: 81 e8 00 00 restore if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 20056e4: c2 07 bf e8 ld [ %fp + -24 ], %g1 20056e8: 80 a0 60 01 cmp %g1, 1 20056ec: 18 80 00 09 bgu 2005710 20056f0: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 20056f4: 10 bf ff b8 b 20055d4 20056f8: c0 2f bf e4 clrb [ %fp + -28 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 20056fc: 22 bf ff b1 be,a 20055c0 2005700: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 2005704: 82 10 20 01 mov 1, %g1 2005708: 10 bf ff ae b 20055c0 200570c: c2 27 bf e8 st %g1, [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 2005710: 80 a0 60 03 cmp %g1, 3 2005714: 18 bf ff b1 bgu 20055d8 2005718: 82 1e 60 01 xor %i1, 1, %g1 case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 200571c: 82 10 20 01 mov 1, %g1 2005720: 10 bf ff ad b 20055d4 2005724: c2 2f bf e4 stb %g1, [ %fp + -28 ] 02023df0 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 2023df0: 9d e3 bf 90 save %sp, -112, %sp 2023df4: 11 00 81 7a sethi %hi(0x205e800), %o0 2023df8: 92 10 00 18 mov %i0, %o1 2023dfc: 90 12 21 58 or %o0, 0x158, %o0 2023e00: 7f ff 9a 1a call 200a668 <_Objects_Get> 2023e04: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 2023e08: c2 07 bf f4 ld [ %fp + -12 ], %g1 2023e0c: 80 a0 60 00 cmp %g1, 0 2023e10: 12 80 00 0b bne 2023e3c 2023e14: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 2023e18: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2023e1c: 80 88 60 30 btst 0x30, %g1 2023e20: 12 80 00 09 bne 2023e44 2023e24: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 2023e28: 92 10 20 00 clr %o1 <== NOT EXECUTED 2023e2c: 7f ff 97 01 call 2009a30 <_CORE_semaphore_Flush> <== NOT EXECUTED 2023e30: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 2023e34: 7f ff 9c 93 call 200b080 <_Thread_Enable_dispatch> 2023e38: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2023e3c: 81 c7 e0 08 ret 2023e40: 81 e8 00 00 restore the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 2023e44: 92 10 20 00 clr %o1 2023e48: 7f ff 96 0f call 2009684 <_CORE_mutex_Flush> 2023e4c: 94 10 20 01 mov 1, %o2 2023e50: 30 bf ff f9 b,a 2023e34 020156f0 : */ void rtems_shutdown_executive( uint32_t result ) { 20156f0: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 20156f4: 05 00 80 60 sethi %hi(0x2018000), %g2 20156f8: c2 00 a3 74 ld [ %g2 + 0x374 ], %g1 ! 2018374 <_System_state_Current> 20156fc: 80 a0 60 04 cmp %g1, 4 2015700: 02 80 00 07 be 201571c 2015704: 82 10 20 04 mov 4, %g1 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 2015708: 13 00 80 60 sethi %hi(0x2018000), %o1 201570c: c2 20 a3 74 st %g1, [ %g2 + 0x374 ] 2015710: 92 12 61 48 or %o1, 0x148, %o1 2015714: 7f ff cf 18 call 2009374 <_CPU_Context_switch> 2015718: 90 07 bf 70 add %fp, -144, %o0 201571c: 81 c7 e0 08 ret <== NOT EXECUTED 2015720: 81 e8 00 00 restore <== NOT EXECUTED 02007840 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 2007840: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 2007844: 03 00 80 78 sethi %hi(0x201e000), %g1 2007848: c4 00 60 6c ld [ %g1 + 0x6c ], %g2 ! 201e06c <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 200784c: 90 10 00 18 mov %i0, %o0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 2007850: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 2007854: c4 08 60 04 ldub [ %g1 + 4 ], %g2 2007858: 80 a0 a0 00 cmp %g2, 0 200785c: 02 80 00 1c be 20078cc 2007860: b0 10 20 16 mov 0x16, %i0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 2007864: 80 a6 60 0f cmp %i1, 0xf 2007868: 18 80 00 19 bgu 20078cc 200786c: b0 10 20 0a mov 0xa, %i0 2007870: 03 00 80 78 sethi %hi(0x201e000), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 2007874: 80 a2 20 00 cmp %o0, 0 2007878: 02 80 00 17 be 20078d4 200787c: 86 10 60 94 or %g1, 0x94, %g3 2007880: 03 00 80 78 sethi %hi(0x201e000), %g1 2007884: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 ! 201e094 <_Thread_Executing> 2007888: 86 10 60 94 or %g1, 0x94, %g3 200788c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007890: 80 a2 00 01 cmp %o0, %g1 2007894: 22 80 00 11 be,a 20078d8 2007898: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 200789c: 40 00 08 86 call 2009ab4 <_Thread_Get> 20078a0: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20078a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 20078a8: 80 a0 60 00 cmp %g1, 0 20078ac: 12 80 00 08 bne 20078cc 20078b0: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 20078b4: c4 02 21 68 ld [ %o0 + 0x168 ], %g2 20078b8: 82 06 60 08 add %i1, 8, %g1 20078bc: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 20078c0: b0 10 20 00 clr %i0 20078c4: 40 00 08 6e call 2009a7c <_Thread_Enable_dispatch> 20078c8: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20078cc: 81 c7 e0 08 ret 20078d0: 81 e8 00 00 restore */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 20078d4: c2 00 c0 00 ld [ %g3 ], %g1 20078d8: 84 06 60 08 add %i1, 8, %g2 20078dc: c6 00 61 68 ld [ %g1 + 0x168 ], %g3 20078e0: 85 28 a0 02 sll %g2, 2, %g2 20078e4: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 20078e8: 81 c7 e0 08 ret 20078ec: 91 e8 20 00 restore %g0, 0, %o0 020069d0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20069d0: 9d e3 bf 90 save %sp, -112, %sp 20069d4: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 20069d8: 80 a6 60 00 cmp %i1, 0 20069dc: 02 80 00 26 be 2006a74 20069e0: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 20069e4: 80 a6 a0 00 cmp %i2, 0 20069e8: 02 80 00 23 be 2006a74 20069ec: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 20069f0: 11 00 80 5d sethi %hi(0x2017400), %o0 20069f4: 92 10 00 12 mov %l2, %o1 20069f8: 90 12 21 84 or %o0, 0x184, %o0 20069fc: 40 00 05 74 call 2007fcc <_Objects_Get> 2006a00: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2006a04: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006a08: a0 10 00 08 mov %o0, %l0 2006a0c: 80 a0 60 00 cmp %g1, 0 2006a10: 12 80 00 19 bne 2006a74 2006a14: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2006a18: a2 02 20 10 add %o0, 0x10, %l1 2006a1c: 40 00 0d 12 call 2009e64 <_Watchdog_Remove> 2006a20: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 2006a24: 7f ff ee 9a call 200248c 2006a28: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 2006a2c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2006a30: 80 a0 60 00 cmp %g1, 0 2006a34: 12 80 00 12 bne 2006a7c 2006a38: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a3c: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2006a40: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2006a44: f6 24 20 34 st %i3, [ %l0 + 0x34 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 2006a48: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006a4c: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 2006a50: 7f ff ee 93 call 200249c 2006a54: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a58: 92 10 00 11 mov %l1, %o1 2006a5c: 11 00 80 5c sethi %hi(0x2017000), %o0 2006a60: 90 12 20 94 or %o0, 0x94, %o0 ! 2017094 <_Watchdog_Ticks_chain> 2006a64: 40 00 0c 95 call 2009cb8 <_Watchdog_Insert> 2006a68: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 2006a6c: 40 00 07 ad call 2008920 <_Thread_Enable_dispatch> 2006a70: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006a74: 81 c7 e0 08 ret 2006a78: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 2006a7c: 7f ff ee 88 call 200249c <== NOT EXECUTED 2006a80: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 2006a84: 40 00 07 a7 call 2008920 <_Thread_Enable_dispatch> <== NOT EXECUTED 2006a88: 01 00 00 00 nop <== NOT EXECUTED 2006a8c: 81 c7 e0 08 ret <== NOT EXECUTED 2006a90: 81 e8 00 00 restore <== NOT EXECUTED 02011968 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 2011968: 9d e3 bf 90 save %sp, -112, %sp 201196c: 92 96 20 00 orcc %i0, 0, %o1 2011970: 12 80 00 05 bne 2011984 2011974: 03 00 80 b3 sethi %hi(0x202cc00), %g1 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 2011978: 90 10 20 13 mov 0x13, %o0 } return status; } 201197c: 81 c7 e0 08 ret 2011980: 91 e8 00 08 restore %g0, %o0, %o0 2011984: c4 08 63 74 ldub [ %g1 + 0x374 ], %g2 2011988: 80 a2 40 02 cmp %o1, %g2 201198c: 18 80 00 56 bgu 2011ae4 2011990: 80 a2 7f ff cmp %o1, -1 2011994: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 2011998: 05 00 80 c8 sethi %hi(0x2032000), %g2 201199c: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2032140 <_Thread_Dispatch_disable_level> 20119a0: 82 00 60 01 inc %g1 20119a4: c2 20 a1 40 st %g1, [ %g2 + 0x140 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20119a8: 23 00 80 b6 sethi %hi(0x202d800), %l1 initialized = true; 20119ac: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20119b0: e0 0c 62 bc ldub [ %l1 + 0x2bc ], %l0 initialized = true; _Thread_Enable_dispatch(); 20119b4: 40 00 0c b3 call 2014c80 <_Thread_Enable_dispatch> 20119b8: c2 2c 62 bc stb %g1, [ %l1 + 0x2bc ] if ( tmpInitialized ) 20119bc: 80 a4 20 00 cmp %l0, 0 20119c0: 12 bf ff ef bne 201197c 20119c4: 90 10 20 0e mov 0xe, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20119c8: 05 00 80 c8 sethi %hi(0x2032000), %g2 20119cc: 82 10 a0 54 or %g2, 0x54, %g1 ! 2032054 <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20119d0: 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; 20119d4: 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); 20119d8: 82 00 60 04 add %g1, 4, %g1 * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 20119dc: 92 10 00 18 mov %i0, %o1 20119e0: 94 10 00 19 mov %i1, %o2 20119e4: 19 00 00 20 sethi %hi(0x8000), %o4 20119e8: c2 20 a0 54 st %g1, [ %g2 + 0x54 ] 20119ec: 98 16 80 0c or %i2, %o4, %o4 20119f0: 11 15 12 53 sethi %hi(0x54494c00), %o0 20119f4: 96 10 21 00 mov 0x100, %o3 20119f8: 90 12 21 45 or %o0, 0x145, %o0 20119fc: 7f ff fc 78 call 2010bdc 2011a00: 9a 07 bf f4 add %fp, -12, %o5 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 2011a04: 80 a2 20 00 cmp %o0, 0 2011a08: 12 80 00 34 bne 2011ad8 2011a0c: 03 00 80 c7 sethi %hi(0x2031c00), %g1 * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 2011a10: d6 07 bf f4 ld [ %fp + -12 ], %o3 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 2011a14: 86 10 63 f4 or %g1, 0x3f4, %g3 2011a18: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 2011a1c: 03 00 00 3f sethi %hi(0xfc00), %g1 2011a20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2011a24: 82 0a c0 01 and %o3, %g1, %g1 2011a28: 80 a0 40 02 cmp %g1, %g2 2011a2c: 18 80 00 05 bgu 2011a40 2011a30: 98 10 20 00 clr %o4 2011a34: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 2011a38: 83 28 60 02 sll %g1, 2, %g1 2011a3c: d8 00 80 01 ld [ %g2 + %g1 ], %o4 2011a40: 09 00 80 c8 sethi %hi(0x2032000), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011a44: 1b 00 80 c8 sethi %hi(0x2032000), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2011a48: 84 11 20 34 or %g4, 0x34, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011a4c: 82 13 60 48 or %o5, 0x48, %g1 2011a50: 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; 2011a54: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2011a58: 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; 2011a5c: 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); 2011a60: 84 00 a0 04 add %g2, 4, %g2 2011a64: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2011a68: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a6c: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011a70: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 2011a74: c4 21 20 34 st %g2, [ %g4 + 0x34 ] 2011a78: c2 23 60 48 st %g1, [ %o5 + 0x48 ] 2011a7c: 05 00 80 ca sethi %hi(0x2032800), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2011a80: 07 00 80 52 sethi %hi(0x2014800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a84: 03 00 80 c8 sethi %hi(0x2032000), %g1 the_watchdog->routine = routine; 2011a88: 86 10 e2 a4 or %g3, 0x2a4, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a8c: 82 10 60 60 or %g1, 0x60, %g1 the_watchdog->routine = routine; 2011a90: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 2011a94: d8 20 a2 f0 st %o4, [ %g2 + 0x2f0 ] 2011a98: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2011a9c: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011aa0: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011aa4: d6 20 60 20 st %o3, [ %g1 + 0x20 ] /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 2011aa8: 05 00 80 46 sethi %hi(0x2011800), %g2 2011aac: 03 00 80 ca sethi %hi(0x2032800), %g1 2011ab0: 84 10 a2 f4 or %g2, 0x2f4, %g2 /* * Start the timer server */ status = rtems_task_start( 2011ab4: 90 10 00 0b mov %o3, %o0 /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 2011ab8: c4 20 62 ec st %g2, [ %g1 + 0x2ec ] /* * Start the timer server */ status = rtems_task_start( 2011abc: 13 00 80 46 sethi %hi(0x2011800), %o1 2011ac0: 94 10 20 00 clr %o2 2011ac4: 7f ff fd 9e call 201113c 2011ac8: 92 12 63 c8 or %o1, 0x3c8, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 2011acc: 80 a2 20 00 cmp %o0, 0 2011ad0: 02 bf ff ab be 201197c 2011ad4: 01 00 00 00 nop * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 2011ad8: c0 2c 62 bc clrb [ %l1 + 0x2bc ] } return status; } 2011adc: 81 c7 e0 08 ret 2011ae0: 91 e8 00 08 restore %g0, %o0, %o0 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 2011ae4: 02 bf ff ad be 2011998 2011ae8: b0 10 20 00 clr %i0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 2011aec: 10 bf ff a4 b 201197c 2011af0: 90 10 20 13 mov 0x13, %o0 020116e8 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 20116e8: 9d e3 bf 90 save %sp, -112, %sp 20116ec: 11 00 80 ca sethi %hi(0x2032800), %o0 20116f0: 92 10 00 18 mov %i0, %o1 20116f4: 90 12 22 ac or %o0, 0x2ac, %o0 20116f8: 40 00 0a df call 2014274 <_Objects_Get> 20116fc: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011700: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011704: a0 10 00 08 mov %o0, %l0 2011708: 80 a0 60 00 cmp %g1, 0 201170c: 12 80 00 11 bne 2011750 2011710: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 2011714: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011718: 80 a0 60 01 cmp %g1, 1 201171c: 22 80 00 15 be,a 2011770 2011720: 31 00 80 ca sethi %hi(0x2032800), %i0 2011724: 1a 80 00 0d bcc 2011758 2011728: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 201172c: a0 02 20 10 add %o0, 0x10, %l0 2011730: 40 00 13 de call 20166a8 <_Watchdog_Remove> 2011734: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 2011738: 11 00 80 c8 sethi %hi(0x2032000), %o0 201173c: 92 10 00 10 mov %l0, %o1 2011740: 40 00 13 6f call 20164fc <_Watchdog_Insert> 2011744: 90 12 22 24 or %o0, 0x224, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 2011748: 40 00 0d 4e call 2014c80 <_Thread_Enable_dispatch> 201174c: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011750: 81 c7 e0 08 ret 2011754: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 2011758: 18 bf ff fc bgu 2011748 201175c: 01 00 00 00 nop (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 2011760: 40 00 0d 48 call 2014c80 <_Thread_Enable_dispatch> 2011764: b0 10 20 0b mov 0xb, %i0 ! b 2011768: 81 c7 e0 08 ret 201176c: 81 e8 00 00 restore case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 2011770: c2 06 22 ec ld [ %i0 + 0x2ec ], %g1 2011774: 80 a0 60 00 cmp %g1, 0 2011778: 02 80 00 08 be 2011798 201177c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 2011780: 40 00 13 ca call 20166a8 <_Watchdog_Remove> 2011784: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 2011788: c2 06 22 ec ld [ %i0 + 0x2ec ], %g1 201178c: 9f c0 40 00 call %g1 2011790: 90 10 00 10 mov %l0, %o0 2011794: 30 bf ff ed b,a 2011748 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 2011798: 40 00 0d 3a call 2014c80 <_Thread_Enable_dispatch> <== NOT EXECUTED 201179c: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 20117a0: 81 c7 e0 08 ret <== NOT EXECUTED 20117a4: 81 e8 00 00 restore <== NOT EXECUTED 020117a8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20117a8: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20117ac: 03 00 80 ca sethi %hi(0x2032800), %g1 20117b0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 2032af0 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20117b4: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20117b8: 80 a0 a0 00 cmp %g2, 0 20117bc: 02 80 00 28 be 201185c 20117c0: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 20117c4: 80 a6 a0 00 cmp %i2, 0 20117c8: 02 80 00 25 be 201185c 20117cc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 20117d0: 80 a6 60 00 cmp %i1, 0 20117d4: 02 80 00 22 be 201185c 20117d8: b0 10 20 0a mov 0xa, %i0 20117dc: 11 00 80 ca sethi %hi(0x2032800), %o0 20117e0: 92 10 00 11 mov %l1, %o1 20117e4: 90 12 22 ac or %o0, 0x2ac, %o0 20117e8: 40 00 0a a3 call 2014274 <_Objects_Get> 20117ec: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20117f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20117f4: a0 10 00 08 mov %o0, %l0 20117f8: 80 a0 60 00 cmp %g1, 0 20117fc: 12 80 00 18 bne 201185c 2011800: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011804: 40 00 13 a9 call 20166a8 <_Watchdog_Remove> 2011808: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 201180c: 7f ff e6 8a call 200b234 2011810: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 2011814: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011818: 80 a0 60 00 cmp %g1, 0 201181c: 12 80 00 12 bne 2011864 2011820: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2011824: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2011828: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 201182c: f6 24 20 34 st %i3, [ %l0 + 0x34 ] * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 2011830: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011834: c0 24 20 18 clr [ %l0 + 0x18 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 2011838: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 201183c: 7f ff e6 82 call 200b244 2011840: b0 10 20 00 clr %i0 /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 2011844: 03 00 80 ca sethi %hi(0x2032800), %g1 2011848: c4 00 62 ec ld [ %g1 + 0x2ec ], %g2 ! 2032aec <_Timer_Server_schedule_operation> 201184c: 9f c0 80 00 call %g2 2011850: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 2011854: 40 00 0d 0b call 2014c80 <_Thread_Enable_dispatch> 2011858: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 201185c: 81 c7 e0 08 ret 2011860: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 2011864: 7f ff e6 78 call 200b244 <== NOT EXECUTED 2011868: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 201186c: 40 00 0d 05 call 2014c80 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011870: 01 00 00 00 nop <== NOT EXECUTED 2011874: 81 c7 e0 08 ret <== NOT EXECUTED 2011878: 81 e8 00 00 restore <== NOT EXECUTED 02006664 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 2006664: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 2006668: 80 a6 60 00 cmp %i1, 0 200666c: 02 80 00 05 be 2006680 2006670: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 2006674: 80 a6 20 00 cmp %i0, 0 2006678: 12 80 00 04 bne 2006688 200667c: 11 00 80 73 sethi %hi(0x201cc00), %o0 if (!ptr) return false; *pointer = ptr; return true; } 2006680: 81 c7 e0 08 ret <== NOT EXECUTED 2006684: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 2006688: 40 00 05 fd call 2007e7c <_Protected_heap_Allocate> 200668c: 90 12 21 94 or %o0, 0x194, %o0 if (!ptr) 2006690: 80 a2 20 00 cmp %o0, 0 2006694: 02 bf ff fb be 2006680 2006698: 01 00 00 00 nop return false; *pointer = ptr; 200669c: d0 26 40 00 st %o0, [ %i1 ] 20066a0: 81 c7 e0 08 ret 20066a4: 91 e8 20 01 restore %g0, 1, %o0 02006648 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 2006648: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 200664c: 11 00 80 73 sethi %hi(0x201cc00), %o0 <== NOT EXECUTED 2006650: 90 12 21 94 or %o0, 0x194, %o0 ! 201cd94 <_Workspace_Area> <== NOT EXECUTED 2006654: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2006658: 40 00 06 15 call 2007eac <_Protected_heap_Free> <== NOT EXECUTED 200665c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2006660: 01 00 00 00 nop 020066a8 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 20066a8: 80 a2 20 00 cmp %o0, 0 20066ac: 02 80 00 07 be 20066c8 20066b0: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 20066b4: 11 00 80 73 sethi %hi(0x201cc00), %o0 20066b8: 90 12 21 94 or %o0, 0x194, %o0 ! 201cd94 <_Workspace_Area> 20066bc: 82 13 c0 00 mov %o7, %g1 20066c0: 40 00 06 07 call 2007edc <_Protected_heap_Get_information> 20066c4: 9e 10 40 00 mov %g1, %o7 } 20066c8: 81 c3 e0 08 retl <== NOT EXECUTED 20066cc: 01 00 00 00 nop 02007e58 : */ int sem_destroy( sem_t *sem ) { 2007e58: 9d e3 bf 90 save %sp, -112, %sp 2007e5c: d2 06 00 00 ld [ %i0 ], %o1 2007e60: 11 00 80 7b sethi %hi(0x201ec00), %o0 2007e64: 94 07 bf f4 add %fp, -12, %o2 2007e68: 40 00 09 78 call 200a448 <_Objects_Get> 2007e6c: 90 12 20 60 or %o0, 0x60, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 2007e70: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007e74: 80 a0 60 00 cmp %g1, 0 2007e78: 22 80 00 08 be,a 2007e98 2007e7c: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2007e80: 40 00 25 89 call 20114a4 <__errno> 2007e84: b0 10 3f ff mov -1, %i0 2007e88: 82 10 20 16 mov 0x16, %g1 2007e8c: c2 22 00 00 st %g1, [ %o0 ] } 2007e90: 81 c7 e0 08 ret 2007e94: 81 e8 00 00 restore case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 2007e98: 80 a0 60 00 cmp %g1, 0 2007e9c: 12 80 00 08 bne 2007ebc 2007ea0: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 2007ea4: 40 00 1c a0 call 200f124 <_POSIX_Semaphore_Delete> 2007ea8: b0 10 20 00 clr %i0 ! 0 _Thread_Enable_dispatch(); 2007eac: 40 00 0b bc call 200ad9c <_Thread_Enable_dispatch> 2007eb0: 01 00 00 00 nop 2007eb4: 81 c7 e0 08 ret 2007eb8: 81 e8 00 00 restore /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 2007ebc: 40 00 0b b8 call 200ad9c <_Thread_Enable_dispatch> <== NOT EXECUTED 2007ec0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2007ec4: 40 00 25 78 call 20114a4 <__errno> <== NOT EXECUTED 2007ec8: 01 00 00 00 nop <== NOT EXECUTED 2007ecc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007ed0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007ed4: 81 c7 e0 08 ret <== NOT EXECUTED 2007ed8: 81 e8 00 00 restore <== NOT EXECUTED 02007f30 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 2007f30: 9d e3 bf 90 save %sp, -112, %sp 2007f34: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 2007f38: 80 a6 20 00 cmp %i0, 0 2007f3c: 02 80 00 0c be 2007f6c 2007f40: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 2007f44: 90 10 20 00 clr %o0 2007f48: 40 00 1c 2b call 200eff4 <_POSIX_Semaphore_Create_support> 2007f4c: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 2007f50: 80 a2 3f ff cmp %o0, -1 2007f54: 02 80 00 04 be 2007f64 2007f58: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 2007f5c: c4 00 60 08 ld [ %g1 + 8 ], %g2 2007f60: c4 26 00 00 st %g2, [ %i0 ] return status; } 2007f64: 81 c7 e0 08 ret 2007f68: 91 e8 00 08 restore %g0, %o0, %o0 { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 2007f6c: 40 00 25 4e call 20114a4 <__errno> <== NOT EXECUTED 2007f70: 01 00 00 00 nop <== NOT EXECUTED 2007f74: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007f78: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007f7c: 10 bf ff fa b 2007f64 <== NOT EXECUTED 2007f80: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02008100 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 2008100: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 2008104: 90 10 00 19 mov %i1, %o0 2008108: 40 00 19 46 call 200e620 <_POSIX_Absolute_timeout_to_ticks> 200810c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 2008110: 80 a2 20 02 cmp %o0, 2 2008114: 08 80 00 07 bleu 2008130 2008118: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 200811c: 90 10 00 18 mov %i0, %o0 2008120: 40 00 1c 35 call 200f1f4 <_POSIX_Semaphore_Wait_support> 2008124: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 2008128: 81 c7 e0 08 ret 200812c: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 2008130: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2008134: 40 00 1c 30 call 200f1f4 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 2008138: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 200813c: 81 c7 e0 08 ret <== NOT EXECUTED 2008140: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02008200 : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 2008200: 92 10 20 01 mov 1, %o1 2008204: 94 10 20 00 clr %o2 2008208: 82 13 c0 00 mov %o7, %g1 200820c: 40 00 1b fa call 200f1f4 <_POSIX_Semaphore_Wait_support> 2008210: 9e 10 40 00 mov %g1, %o7 2008214: 01 00 00 00 nop <== NOT EXECUTED 02008064 : #include int sigsuspend( const sigset_t *sigmask ) { 2008064: 9d e3 bf 90 save %sp, -112, %sp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 2008068: 90 10 20 01 mov 1, %o0 200806c: 92 10 00 18 mov %i0, %o1 2008070: a0 07 bf f4 add %fp, -12, %l0 2008074: 7f ff ff f1 call 2008038 2008078: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 200807c: a2 07 bf f0 add %fp, -16, %l1 2008080: 7f ff ff b7 call 2007f5c 2008084: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 2008088: 90 10 00 11 mov %l1, %o0 200808c: 92 10 20 00 clr %o1 2008090: 40 00 00 2e call 2008148 2008094: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 2008098: 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 ); 200809c: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 20080a0: 94 10 20 00 clr %o2 20080a4: 7f ff ff e5 call 2008038 20080a8: 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 ) 20080ac: 80 a4 7f ff cmp %l1, -1 20080b0: 12 80 00 05 bne 20080c4 20080b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 20080b8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20080bc: 81 c7 e0 08 ret <== NOT EXECUTED 20080c0: 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 ); 20080c4: 40 00 24 89 call 20112e8 <__errno> 20080c8: b0 10 3f ff mov -1, %i0 20080cc: 82 10 20 04 mov 4, %g1 20080d0: c2 22 00 00 st %g1, [ %o0 ] 20080d4: 81 c7 e0 08 ret 20080d8: 81 e8 00 00 restore 02008318 : int sigwait( const sigset_t *set, int *sig ) { 2008318: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 200831c: 92 10 20 00 clr %o1 2008320: 90 10 00 18 mov %i0, %o0 2008324: 7f ff ff 89 call 2008148 2008328: 94 10 20 00 clr %o2 if ( status != -1 ) { 200832c: 80 a2 3f ff cmp %o0, -1 2008330: 02 80 00 07 be 200834c 2008334: 80 a6 60 00 cmp %i1, 0 if ( sig ) 2008338: 02 80 00 03 be 2008344 200833c: b0 10 20 00 clr %i0 *sig = status; 2008340: d0 26 40 00 st %o0, [ %i1 ] 2008344: 81 c7 e0 08 ret 2008348: 81 e8 00 00 restore return 0; } return errno; 200834c: 40 00 23 e7 call 20112e8 <__errno> <== NOT EXECUTED 2008350: 01 00 00 00 nop <== NOT EXECUTED 2008354: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 2008358: 81 c7 e0 08 ret <== NOT EXECUTED 200835c: 81 e8 00 00 restore <== NOT EXECUTED 02006ebc : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 2006ebc: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 2006ec0: 80 a6 a0 00 cmp %i2, 0 2006ec4: 02 80 00 54 be 2007014 2006ec8: 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 ) || 2006ecc: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 2006ed0: 82 10 61 ff or %g1, 0x1ff, %g1 2006ed4: 80 a0 80 01 cmp %g2, %g1 2006ed8: 18 80 00 4f bgu 2007014 2006edc: 01 00 00 00 nop 2006ee0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2006ee4: 80 a0 80 01 cmp %g2, %g1 2006ee8: 18 80 00 4b bgu 2007014 2006eec: 80 a0 a0 00 cmp %g2, 0 2006ef0: 06 80 00 49 bl 2007014 2006ef4: 80 a6 60 04 cmp %i1, 4 ( 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 ) { 2006ef8: 02 80 00 04 be 2006f08 2006efc: 80 a6 60 00 cmp %i1, 0 2006f00: 12 80 00 45 bne 2007014 2006f04: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 2006f08: c2 06 80 00 ld [ %i2 ], %g1 2006f0c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2006f10: c6 06 a0 08 ld [ %i2 + 8 ], %g3 2006f14: c8 06 a0 0c ld [ %i2 + 0xc ], %g4 2006f18: c2 27 bf e4 st %g1, [ %fp + -28 ] 2006f1c: c4 27 bf e8 st %g2, [ %fp + -24 ] 2006f20: c6 27 bf ec st %g3, [ %fp + -20 ] /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 2006f24: 80 a6 60 04 cmp %i1, 4 2006f28: 02 80 00 5c be 2007098 2006f2c: c8 27 bf f0 st %g4, [ %fp + -16 ] 2006f30: 92 10 00 18 mov %i0, %o1 2006f34: 11 00 80 74 sethi %hi(0x201d000), %o0 2006f38: 94 07 bf f4 add %fp, -12, %o2 2006f3c: 40 00 09 1f call 20093b8 <_Objects_Get> 2006f40: 90 12 22 f0 or %o0, 0x2f0, %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 ) { 2006f44: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006f48: 80 a0 60 00 cmp %g1, 0 2006f4c: 12 80 00 67 bne 20070e8 2006f50: b2 10 00 08 mov %o0, %i1 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 2006f54: c2 07 bf ec ld [ %fp + -20 ], %g1 2006f58: 80 a0 60 00 cmp %g1, 0 2006f5c: 12 80 00 05 bne 2006f70 2006f60: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006f64: 80 a0 60 00 cmp %g1, 0 2006f68: 02 80 00 31 be 200702c 2006f6c: 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 ); 2006f70: 40 00 0f 8b call 200ad9c <_Timespec_To_ticks> 2006f74: 90 10 00 1a mov %i2, %o0 2006f78: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 2006f7c: 40 00 0f 88 call 200ad9c <_Timespec_To_ticks> 2006f80: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 2006f84: d4 06 60 08 ld [ %i1 + 8 ], %o2 return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); initial_period = _Timespec_To_ticks( &normalize.it_value ); 2006f88: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 2006f8c: 17 00 80 1c sethi %hi(0x2007000), %o3 2006f90: 90 06 60 10 add %i1, 0x10, %o0 2006f94: 96 12 e1 00 or %o3, 0x100, %o3 2006f98: 40 00 1c 16 call 200dff0 <_POSIX_Timer_Insert_helper> 2006f9c: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 2006fa0: 80 8a 20 ff btst 0xff, %o0 2006fa4: 02 80 00 18 be 2007004 2006fa8: 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 ) 2006fac: 02 80 00 0b be 2006fd8 2006fb0: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 2006fb4: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 2006fb8: c2 26 c0 00 st %g1, [ %i3 ] 2006fbc: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 2006fc0: c4 26 e0 04 st %g2, [ %i3 + 4 ] 2006fc4: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 2006fc8: c2 26 e0 08 st %g1, [ %i3 + 8 ] 2006fcc: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 2006fd0: c4 26 e0 0c st %g2, [ %i3 + 0xc ] ptimer->timer_data = normalize; 2006fd4: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 2006fd8: 90 06 60 6c add %i1, 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; 2006fdc: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 2006fe0: c4 07 bf e8 ld [ %fp + -24 ], %g2 2006fe4: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 2006fe8: c2 07 bf ec ld [ %fp + -20 ], %g1 2006fec: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 2006ff0: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2006ff4: 82 10 20 03 mov 3, %g1 * 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; 2006ff8: c4 26 60 60 st %g2, [ %i1 + 0x60 ] /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 2006ffc: 40 00 06 80 call 20089fc <_TOD_Get> 2007000: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 2007004: 40 00 0b 42 call 2009d0c <_Thread_Enable_dispatch> 2007008: b0 10 20 00 clr %i0 200700c: 81 c7 e0 08 ret 2007010: 81 e8 00 00 restore /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 2007014: 40 00 23 e8 call 200ffb4 <__errno> 2007018: b0 10 3f ff mov -1, %i0 200701c: 82 10 20 16 mov 0x16, %g1 2007020: c2 22 00 00 st %g1, [ %o0 ] 2007024: 81 c7 e0 08 ret 2007028: 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 ); 200702c: 40 00 10 ac call 200b2dc <_Watchdog_Remove> 2007030: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 2007034: 80 a6 e0 00 cmp %i3, 0 2007038: 02 80 00 0b be 2007064 200703c: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 2007040: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 <== NOT EXECUTED 2007044: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 2007048: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 <== NOT EXECUTED 200704c: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 2007050: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 <== NOT EXECUTED 2007054: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 2007058: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 <== NOT EXECUTED 200705c: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 2007060: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 2007064: 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; 2007068: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 200706c: c4 07 bf e8 ld [ %fp + -24 ], %g2 2007070: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 2007074: c2 07 bf ec ld [ %fp + -20 ], %g1 2007078: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 200707c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2007080: 82 10 20 04 mov 4, %g1 (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; 2007084: c4 26 60 60 st %g2, [ %i1 + 0x60 ] /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 2007088: 40 00 0b 21 call 2009d0c <_Thread_Enable_dispatch> 200708c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 2007090: 81 c7 e0 08 ret 2007094: 81 e8 00 00 restore normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 2007098: b2 07 bf ec add %fp, -20, %i1 200709c: 21 00 80 74 sethi %hi(0x201d000), %l0 20070a0: 92 10 00 19 mov %i1, %o1 20070a4: 40 00 0f 16 call 200acfc <_Timespec_Greater_than> 20070a8: 90 14 20 34 or %l0, 0x34, %o0 20070ac: 80 8a 20 ff btst 0xff, %o0 20070b0: 12 bf ff d9 bne 2007014 20070b4: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 20070b8: 94 10 00 19 mov %i1, %o2 20070bc: 40 00 0f 22 call 200ad44 <_Timespec_Subtract> 20070c0: 90 14 20 34 or %l0, 0x34, %o0 20070c4: 92 10 00 18 mov %i0, %o1 20070c8: 11 00 80 74 sethi %hi(0x201d000), %o0 20070cc: 94 07 bf f4 add %fp, -12, %o2 20070d0: 40 00 08 ba call 20093b8 <_Objects_Get> 20070d4: 90 12 22 f0 or %o0, 0x2f0, %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 ) { 20070d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20070dc: 80 a0 60 00 cmp %g1, 0 20070e0: 02 bf ff 9d be 2006f54 20070e4: b2 10 00 08 mov %o0, %i1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 20070e8: 40 00 23 b3 call 200ffb4 <__errno> <== NOT EXECUTED 20070ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20070f0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20070f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 20070f8: 81 c7 e0 08 ret <== NOT EXECUTED 20070fc: 81 e8 00 00 restore <== NOT EXECUTED 020053e4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 20053e4: 9d e3 bf 90 save %sp, -112, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 20053e8: 03 00 80 58 sethi %hi(0x2016000), %g1 20053ec: a2 10 63 14 or %g1, 0x314, %l1 ! 2016314 <_POSIX_signals_Ualarm_timer> 20053f0: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 20053f4: 80 a0 a0 00 cmp %g2, 0 20053f8: 02 80 00 3c be 20054e8 20053fc: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 2005400: 40 00 10 dd call 2009774 <_Watchdog_Remove> 2005404: 90 10 00 11 mov %l1, %o0 2005408: 90 02 3f fe add %o0, -2, %o0 200540c: 80 a2 20 01 cmp %o0, 1 2005410: 08 80 00 07 bleu 200542c 2005414: 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 ) { 2005418: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 200541c: 12 80 00 1a bne 2005484 <== NOT EXECUTED 2005420: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 2005424: 81 c7 e0 08 ret 2005428: 81 e8 00 00 restore * 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); 200542c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005430: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 * 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); 2005434: d0 04 60 14 ld [ %l1 + 0x14 ], %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005438: 92 07 bf f0 add %fp, -16, %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); 200543c: 90 02 00 01 add %o0, %g1, %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005440: 40 00 0f 31 call 2009104 <_Timespec_From_ticks> 2005444: 90 22 00 02 sub %o0, %g2, %o0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 2005448: c4 07 bf f0 ld [ %fp + -16 ], %g2 remaining += tp.tv_nsec / 1000; 200544c: d0 07 bf f4 ld [ %fp + -12 ], %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; 2005450: 87 28 a0 03 sll %g2, 3, %g3 2005454: 83 28 a0 08 sll %g2, 8, %g1 2005458: 82 20 40 03 sub %g1, %g3, %g1 remaining += tp.tv_nsec / 1000; 200545c: 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; 2005460: a1 28 60 06 sll %g1, 6, %l0 2005464: a0 24 00 01 sub %l0, %g1, %l0 remaining += tp.tv_nsec / 1000; 2005468: 40 00 35 3b call 2012954 <.div> 200546c: a0 04 00 02 add %l0, %g2, %l0 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; 2005470: a1 2c 20 06 sll %l0, 6, %l0 /* * 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 ) { 2005474: 80 a4 a0 00 cmp %l2, 0 2005478: 02 bf ff eb be 2005424 200547c: b0 02 00 10 add %o0, %l0, %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 2005480: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 2005484: 90 10 00 12 mov %l2, %o0 2005488: 40 00 35 31 call 201294c <.udiv> 200548c: 92 14 22 40 or %l0, 0x240, %o1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005490: 92 14 22 40 or %l0, 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; 2005494: d0 27 bf f0 st %o0, [ %fp + -16 ] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005498: 40 00 35 d9 call 2012bfc <.urem> 200549c: 90 10 00 12 mov %l2, %o0 20054a0: 85 2a 20 02 sll %o0, 2, %g2 20054a4: 83 2a 20 07 sll %o0, 7, %g1 20054a8: 82 20 40 02 sub %g1, %g2, %g1 20054ac: 82 00 40 08 add %g1, %o0, %g1 20054b0: 83 28 60 03 sll %g1, 3, %g1 ticks = _Timespec_To_ticks( &tp ); 20054b4: a0 07 bf f0 add %fp, -16, %l0 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 20054b8: c2 27 bf f4 st %g1, [ %fp + -12 ] ticks = _Timespec_To_ticks( &tp ); 20054bc: 40 00 0f 3d call 20091b0 <_Timespec_To_ticks> 20054c0: 90 10 00 10 mov %l0, %o0 if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 20054c4: 40 00 0f 3b call 20091b0 <_Timespec_To_ticks> 20054c8: 90 10 00 10 mov %l0, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20054cc: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20054d0: d0 24 60 0c st %o0, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20054d4: 11 00 80 59 sethi %hi(0x2016400), %o0 20054d8: 40 00 10 3c call 20095c8 <_Watchdog_Insert> 20054dc: 90 12 21 54 or %o0, 0x154, %o0 ! 2016554 <_Watchdog_Ticks_chain> } return remaining; } 20054e0: 81 c7 e0 08 ret 20054e4: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20054e8: 03 00 80 15 sethi %hi(0x2005400), %g1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20054ec: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; 20054f0: 82 10 61 14 or %g1, 0x114, %g1 the_watchdog->id = id; 20054f4: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 20054f8: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20054fc: c2 24 60 1c st %g1, [ %l1 + 0x1c ] /* * 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 ) { 2005500: 80 a4 a0 00 cmp %l2, 0 2005504: 02 bf ff c8 be 2005424 2005508: b0 10 20 00 clr %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 200550c: 10 bf ff de b 2005484 2005510: 21 00 03 d0 sethi %hi(0xf4000), %l0