02005da8 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2005da8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005dac: 03 00 80 5e sethi %hi(0x2017800), %g1 2005db0: e0 00 61 34 ld [ %g1 + 0x134 ], %l0 ! 2017934 <_API_extensions_List> 2005db4: 82 10 61 34 or %g1, 0x134, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005db8: 10 80 00 08 b 2005dd8 <_API_extensions_Run_postdriver+0x30> 2005dbc: a2 00 60 04 add %g1, 4, %l1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 2005dc0: 80 a0 60 00 cmp %g1, 0 2005dc4: 22 80 00 05 be,a 2005dd8 <_API_extensions_Run_postdriver+0x30> 2005dc8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 2005dcc: 9f c0 40 00 call %g1 2005dd0: 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 ) { 2005dd4: 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 ) ; 2005dd8: 80 a4 00 11 cmp %l0, %l1 2005ddc: 32 bf ff f9 bne,a 2005dc0 <_API_extensions_Run_postdriver+0x18> 2005de0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 2005de4: 81 c7 e0 08 ret 2005de8: 81 e8 00 00 restore 02005dec <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 2005dec: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005df0: 03 00 80 5e sethi %hi(0x2017800), %g1 2005df4: e0 00 61 34 ld [ %g1 + 0x134 ], %l0 ! 2017934 <_API_extensions_List> 2005df8: 82 10 61 34 or %g1, 0x134, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005dfc: a4 00 60 04 add %g1, 4, %l2 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 2005e00: 03 00 80 5d sethi %hi(0x2017400), %g1 2005e04: 10 80 00 08 b 2005e24 <_API_extensions_Run_postswitch+0x38> 2005e08: a2 10 63 b4 or %g1, 0x3b4, %l1 ! 20177b4 <_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 ) 2005e0c: 80 a0 60 00 cmp %g1, 0 2005e10: 22 80 00 05 be,a 2005e24 <_API_extensions_Run_postswitch+0x38> 2005e14: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 2005e18: 9f c0 40 00 call %g1 2005e1c: d0 04 40 00 ld [ %l1 ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 2005e20: 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 ) ; 2005e24: 80 a4 00 12 cmp %l0, %l2 2005e28: 32 bf ff f9 bne,a 2005e0c <_API_extensions_Run_postswitch+0x20> 2005e2c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); } } 2005e30: 81 c7 e0 08 ret 2005e34: 81 e8 00 00 restore 02005d64 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 2005d64: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2005d68: 03 00 80 5e sethi %hi(0x2017800), %g1 2005d6c: e0 00 61 34 ld [ %g1 + 0x134 ], %l0 ! 2017934 <_API_extensions_List> 2005d70: 82 10 61 34 or %g1, 0x134, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2005d74: 10 80 00 08 b 2005d94 <_API_extensions_Run_predriver+0x30> 2005d78: a2 00 60 04 add %g1, 4, %l1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 2005d7c: 80 a0 60 00 cmp %g1, 0 2005d80: 22 80 00 05 be,a 2005d94 <_API_extensions_Run_predriver+0x30> 2005d84: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 2005d88: 9f c0 40 00 call %g1 <== NOT EXECUTED 2005d8c: 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 ) { 2005d90: 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 ) ; 2005d94: 80 a4 00 11 cmp %l0, %l1 2005d98: 32 bf ff f9 bne,a 2005d7c <_API_extensions_Run_predriver+0x18> 2005d9c: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 2005da0: 81 c7 e0 08 ret 2005da4: 81 e8 00 00 restore 0200811c <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 200811c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 2008120: 03 00 80 68 sethi %hi(0x201a000), %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 ); 2008124: 7f ff eb 32 call 2002dec 2008128: e0 00 62 44 ld [ %g1 + 0x244 ], %l0 ! 201a244 <_Thread_Executing> 200812c: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 2008130: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2008134: 80 a0 60 00 cmp %g1, 0 2008138: 12 80 00 08 bne 2008158 <_CORE_RWLock_Release+0x3c> 200813c: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 2008140: 7f ff eb 2f call 2002dfc <== NOT EXECUTED 2008144: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 2008148: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 200814c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED 2008150: 81 c7 e0 08 ret <== NOT EXECUTED 2008154: 81 e8 00 00 restore <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 2008158: 32 80 00 0b bne,a 2008184 <_CORE_RWLock_Release+0x68> 200815c: c0 24 20 34 clr [ %l0 + 0x34 ] the_rwlock->number_of_readers -= 1; 2008160: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2008164: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 2008168: 80 a0 60 00 cmp %g1, 0 200816c: 02 80 00 05 be 2008180 <_CORE_RWLock_Release+0x64> 2008170: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 2008174: 7f ff eb 22 call 2002dfc 2008178: b0 10 20 00 clr %i0 200817c: 30 80 00 25 b,a 2008210 <_CORE_RWLock_Release+0xf4> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2008180: 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; 2008184: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 2008188: 7f ff eb 1d call 2002dfc 200818c: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 2008190: 40 00 06 04 call 20099a0 <_Thread_queue_Dequeue> 2008194: 90 10 00 18 mov %i0, %o0 if ( next ) { 2008198: 80 a2 20 00 cmp %o0, 0 200819c: 22 80 00 1d be,a 2008210 <_CORE_RWLock_Release+0xf4> 20081a0: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 20081a4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 20081a8: 80 a0 60 01 cmp %g1, 1 20081ac: 32 80 00 05 bne,a 20081c0 <_CORE_RWLock_Release+0xa4> 20081b0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 20081b4: 82 10 20 02 mov 2, %g1 20081b8: 10 80 00 15 b 200820c <_CORE_RWLock_Release+0xf0> 20081bc: c2 26 20 44 st %g1, [ %i0 + 0x44 ] /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 20081c0: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 20081c4: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 20081c8: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 20081cc: 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 ); 20081d0: 40 00 07 4b call 2009efc <_Thread_queue_First> 20081d4: 90 10 00 18 mov %i0, %o0 if ( !next || 20081d8: 80 a2 20 00 cmp %o0, 0 20081dc: 22 80 00 0d be,a 2008210 <_CORE_RWLock_Release+0xf4> 20081e0: b0 10 20 00 clr %i0 20081e4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 20081e8: 80 a0 60 01 cmp %g1, 1 20081ec: 02 80 00 08 be 200820c <_CORE_RWLock_Release+0xf0> 20081f0: 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; 20081f4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 20081f8: 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; 20081fc: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2008200: 40 00 06 f0 call 2009dc0 <_Thread_queue_Extract> 2008204: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 2008208: 30 bf ff f2 b,a 20081d0 <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200820c: b0 10 20 00 clr %i0 2008210: 81 c7 e0 08 ret 2008214: 81 e8 00 00 restore 02012590 <_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 ) { 2012590: 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 ) { 2012594: 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 ) { 2012598: 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 ) { 201259c: 80 a6 80 01 cmp %i2, %g1 20125a0: 18 80 00 17 bgu 20125fc <_CORE_message_queue_Broadcast+0x6c> 20125a4: 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 ) { 20125a8: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 20125ac: 80 a0 60 00 cmp %g1, 0 20125b0: 02 80 00 0a be 20125d8 <_CORE_message_queue_Broadcast+0x48> 20125b4: a2 10 20 00 clr %l1 *count = 0; 20125b8: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 20125bc: 81 c7 e0 08 ret <== NOT EXECUTED 20125c0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20125c4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 20125c8: 40 00 22 20 call 201ae48 20125cc: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 20125d0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 20125d4: 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))) { 20125d8: 40 00 09 d2 call 2014d20 <_Thread_queue_Dequeue> 20125dc: 90 10 00 12 mov %l2, %o0 20125e0: 92 10 00 19 mov %i1, %o1 20125e4: a0 10 00 08 mov %o0, %l0 20125e8: 80 a2 20 00 cmp %o0, 0 20125ec: 12 bf ff f6 bne 20125c4 <_CORE_message_queue_Broadcast+0x34> 20125f0: 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; 20125f4: e2 27 40 00 st %l1, [ %i5 ] 20125f8: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 20125fc: 81 c7 e0 08 ret 2012600: 81 e8 00 00 restore 02012550 <_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 ) { 2012550: 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 ) { 2012554: 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 ) { 2012558: 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 ) { 201255c: 80 a6 80 01 cmp %i2, %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 2012560: 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 ) { 2012564: 18 80 00 3f bgu 2012660 <_CORE_message_queue_Submit+0x110> 2012568: 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 ) { 201256c: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 2012570: 80 a0 60 00 cmp %g1, 0 2012574: 32 80 00 0f bne,a 20125b0 <_CORE_message_queue_Submit+0x60> 2012578: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 201257c: 7f ff e8 7d call 200c770 <_Thread_queue_Dequeue> 2012580: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 2012584: a0 92 20 00 orcc %o0, 0, %l0 2012588: 02 80 00 09 be 20125ac <_CORE_message_queue_Submit+0x5c> 201258c: 92 10 00 19 mov %i1, %o1 2012590: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2012594: 40 00 14 09 call 20175b8 2012598: 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; 201259c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 20125a0: 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; 20125a4: 10 80 00 15 b 20125f8 <_CORE_message_queue_Submit+0xa8> 20125a8: f4 20 40 00 st %i2, [ %g1 ] /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 20125ac: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 20125b0: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 20125b4: 80 a0 80 01 cmp %g2, %g1 20125b8: 1a 80 00 12 bcc 2012600 <_CORE_message_queue_Submit+0xb0> 20125bc: 80 a4 a0 00 cmp %l2, 0 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 20125c0: 7f ff e1 71 call 200ab84 <_Chain_Get> 20125c4: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 20125c8: a0 92 20 00 orcc %o0, 0, %l0 20125cc: 02 80 00 27 be 2012668 <_CORE_message_queue_Submit+0x118> 20125d0: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20125d4: 94 10 00 1a mov %i2, %o2 20125d8: 40 00 13 f8 call 20175b8 20125dc: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 20125e0: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 20125e4: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 20125e8: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 20125ec: 92 10 00 10 mov %l0, %o1 20125f0: 40 00 0c 1c call 2015660 <_CORE_message_queue_Insert_message> 20125f4: 94 10 00 1d mov %i5, %o2 20125f8: 81 c7 e0 08 ret 20125fc: 91 e8 20 00 restore %g0, 0, %o0 * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 2012600: 02 80 00 18 be 2012660 <_CORE_message_queue_Submit+0x110> 2012604: 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() ) { 2012608: 03 00 80 9a sethi %hi(0x2026800), %g1 201260c: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 20268e0 <_ISR_Nest_level> 2012610: 80 a0 60 00 cmp %g1, 0 2012614: 32 80 00 13 bne,a 2012660 <_CORE_message_queue_Submit+0x110> 2012618: 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; 201261c: 03 00 80 9a sethi %hi(0x2026800), %g1 _ISR_Disable( level ); 2012620: 7f ff bf bb call 200250c 2012624: e0 00 61 04 ld [ %g1 + 0x104 ], %l0 ! 2026904 <_Thread_Executing> 2012628: 82 10 20 01 mov 1, %g1 201262c: 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; 2012630: 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; 2012634: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 2012638: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 201263c: 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; 2012640: 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 ); 2012644: 7f ff bf b6 call 200251c 2012648: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 201264c: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 2012650: 90 10 00 11 mov %l1, %o0 2012654: 15 00 80 33 sethi %hi(0x200cc00), %o2 2012658: 7f ff e8 ab call 200c904 <_Thread_queue_Enqueue_with_handler> 201265c: 94 12 a0 d0 or %o2, 0xd0, %o2 ! 200ccd0 <_Thread_queue_Timeout> 2012660: 81 c7 e0 08 ret 2012664: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 2012668: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 201266c: 81 c7 e0 08 ret <== NOT EXECUTED 2012670: 81 e8 00 00 restore <== NOT EXECUTED 0200b72c <_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 ) { 200b72c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 200b730: 03 00 80 5d sethi %hi(0x2017400), %g1 200b734: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 20177b4 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 200b738: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200b73c: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200b740: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200b744: 80 a0 60 00 cmp %g1, 0 200b748: 22 80 00 32 be,a 200b810 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 200b74c: c6 06 20 5c ld [ %i0 + 0x5c ], %g3 the_mutex->lock = CORE_MUTEX_LOCKED; 200b750: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200b754: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 200b758: c6 06 20 48 ld [ %i0 + 0x48 ], %g3 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200b75c: 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; 200b760: c4 26 20 5c st %g2, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200b764: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200b768: 80 a0 e0 02 cmp %g3, 2 200b76c: 02 80 00 05 be 200b780 <_CORE_mutex_Seize_interrupt_trylock+0x54> 200b770: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 200b774: 80 a0 e0 03 cmp %g3, 3 200b778: 32 80 00 06 bne,a 200b790 <_CORE_mutex_Seize_interrupt_trylock+0x64> 200b77c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 200b780: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200b784: 82 00 60 01 inc %g1 200b788: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200b78c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200b790: 80 a0 60 03 cmp %g1, 3 200b794: 22 80 00 03 be,a 200b7a0 <_CORE_mutex_Seize_interrupt_trylock+0x74> 200b798: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 _ISR_Enable( level ); 200b79c: 30 80 00 2c b,a 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 200b7a0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 200b7a4: 80 a0 40 03 cmp %g1, %g3 200b7a8: 12 80 00 03 bne 200b7b4 <_CORE_mutex_Seize_interrupt_trylock+0x88> 200b7ac: 01 00 00 00 nop _ISR_Enable( level ); 200b7b0: 30 80 00 27 b,a 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 200b7b4: 08 80 00 0f bleu 200b7f0 <_CORE_mutex_Seize_interrupt_trylock+0xc4> 200b7b8: 82 10 20 06 mov 6, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200b7bc: 05 00 80 5d sethi %hi(0x2017400), %g2 200b7c0: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_Thread_Dispatch_disable_level> 200b7c4: 82 00 60 01 inc %g1 200b7c8: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 200b7cc: 7f ff d9 61 call 2001d50 200b7d0: 01 00 00 00 nop _Thread_Change_priority( 200b7d4: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200b7d8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200b7dc: 7f ff ee 25 call 2007070 <_Thread_Change_priority> 200b7e0: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 200b7e4: 7f ff ef b1 call 20076a8 <_Thread_Enable_dispatch> 200b7e8: b0 10 20 00 clr %i0 200b7ec: 30 80 00 1a b,a 200b854 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200b7f0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 200b7f4: 82 10 20 01 mov 1, %g1 the_mutex->nest_count = 0; /* undo locking above */ 200b7f8: 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; 200b7fc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200b800: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200b804: 82 00 7f ff add %g1, -1, %g1 200b808: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 200b80c: 30 80 00 10 b,a 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> /* * 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 ) ) { 200b810: 80 a0 c0 02 cmp %g3, %g2 200b814: 12 80 00 12 bne 200b85c <_CORE_mutex_Seize_interrupt_trylock+0x130> 200b818: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 200b81c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200b820: 80 a0 60 00 cmp %g1, 0 200b824: 22 80 00 07 be,a 200b840 <_CORE_mutex_Seize_interrupt_trylock+0x114> 200b828: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200b82c: 80 a0 60 01 cmp %g1, 1 200b830: 12 80 00 0b bne 200b85c <_CORE_mutex_Seize_interrupt_trylock+0x130> 200b834: 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; 200b838: 10 80 00 05 b 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> 200b83c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 200b840: 82 00 60 01 inc %g1 200b844: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 200b848: 30 80 00 01 b,a 200b84c <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( level ); 200b84c: 7f ff d9 41 call 2001d50 200b850: b0 10 20 00 clr %i0 200b854: 81 c7 e0 08 ret 200b858: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200b85c: 81 c7 e0 08 ret 200b860: 91 e8 20 01 restore %g0, 1, %o0 02006164 <_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 ) { 2006164: 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 ) { 2006168: 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 ) { 200616c: 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 ) { 2006170: 80 a0 60 00 cmp %g1, 0 2006174: 02 80 00 07 be 2006190 <_CORE_mutex_Surrender+0x2c> 2006178: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 200617c: 03 00 80 5d sethi %hi(0x2017400), %g1 2006180: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 2006184: 80 a2 00 01 cmp %o0, %g1 2006188: 12 80 00 52 bne 20062d0 <_CORE_mutex_Surrender+0x16c> 200618c: 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 ) 2006190: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 2006194: 80 a0 60 00 cmp %g1, 0 2006198: 02 80 00 4d be 20062cc <_CORE_mutex_Surrender+0x168> 200619c: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 20061a0: 80 a0 60 00 cmp %g1, 0 20061a4: 02 80 00 09 be 20061c8 <_CORE_mutex_Surrender+0x64> 20061a8: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 20061ac: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 20061b0: 80 a0 60 00 cmp %g1, 0 20061b4: 02 80 00 47 be 20062d0 <_CORE_mutex_Surrender+0x16c> 20061b8: b0 10 20 00 clr %i0 20061bc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 20061c0: 02 80 00 44 be 20062d0 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 20061c4: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 20061c8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 20061cc: 80 a0 60 02 cmp %g1, 2 20061d0: 02 80 00 04 be 20061e0 <_CORE_mutex_Surrender+0x7c> 20061d4: 80 a0 60 03 cmp %g1, 3 20061d8: 32 80 00 07 bne,a 20061f4 <_CORE_mutex_Surrender+0x90> 20061dc: c0 24 20 5c clr [ %l0 + 0x5c ] the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 20061e0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20061e4: 82 00 7f ff add %g1, -1, %g1 20061e8: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 20061ec: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 20061f0: 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 ) || 20061f4: 80 a0 60 02 cmp %g1, 2 20061f8: 02 80 00 05 be 200620c <_CORE_mutex_Surrender+0xa8> 20061fc: c0 24 20 60 clr [ %l0 + 0x60 ] 2006200: 80 a0 60 03 cmp %g1, 3 2006204: 12 80 00 0d bne 2006238 <_CORE_mutex_Surrender+0xd4> 2006208: 01 00 00 00 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 200620c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2006210: 80 a0 60 00 cmp %g1, 0 2006214: 12 80 00 09 bne 2006238 <_CORE_mutex_Surrender+0xd4> 2006218: 01 00 00 00 nop 200621c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 2006220: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2006224: 80 a2 40 01 cmp %o1, %g1 2006228: 02 80 00 04 be 2006238 <_CORE_mutex_Surrender+0xd4> 200622c: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 2006230: 40 00 03 90 call 2007070 <_Thread_Change_priority> 2006234: 94 10 20 01 mov 1, %o2 ! 1 /* * 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 ) ) ) { 2006238: 40 00 06 0e call 2007a70 <_Thread_queue_Dequeue> 200623c: 90 10 00 10 mov %l0, %o0 2006240: 86 92 20 00 orcc %o0, 0, %g3 2006244: 02 80 00 1f be 20062c0 <_CORE_mutex_Surrender+0x15c> 2006248: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 200624c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 2006250: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 2006254: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 2006258: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 200625c: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 2006260: 80 a0 a0 02 cmp %g2, 2 2006264: 02 80 00 07 be 2006280 <_CORE_mutex_Surrender+0x11c> 2006268: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 200626c: 80 a0 a0 03 cmp %g2, 3 2006270: 12 80 00 18 bne 20062d0 <_CORE_mutex_Surrender+0x16c> 2006274: b0 10 20 00 clr %i0 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 2006278: 10 80 00 07 b 2006294 <_CORE_mutex_Surrender+0x130> 200627c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 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++; 2006280: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2006284: 82 00 60 01 inc %g1 2006288: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 200628c: 81 c7 e0 08 ret 2006290: 91 e8 20 00 restore %g0, 0, %o0 #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < 2006294: 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++; 2006298: 82 00 60 01 inc %g1 200629c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 20062a0: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 20062a4: 80 a2 40 02 cmp %o1, %g2 20062a8: 3a 80 00 0a bcc,a 20062d0 <_CORE_mutex_Surrender+0x16c> 20062ac: b0 10 20 00 clr %i0 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 20062b0: 40 00 03 70 call 2007070 <_Thread_Change_priority> 20062b4: 94 10 20 00 clr %o2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 20062b8: 81 c7 e0 08 ret 20062bc: 91 e8 20 00 restore %g0, 0, %o0 20062c0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 20062c4: 81 c7 e0 08 ret 20062c8: 91 e8 20 00 restore %g0, 0, %o0 20062cc: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 20062d0: 81 c7 e0 08 ret 20062d4: 81 e8 00 00 restore 02006d14 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 2006d14: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 2006d18: 7f ff ed e2 call 20024a0 2006d1c: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 2006d20: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006d24: 80 a0 60 00 cmp %g1, 0 2006d28: 12 80 00 06 bne 2006d40 <_CORE_spinlock_Release+0x2c> 2006d2c: 03 00 80 4d sethi %hi(0x2013400), %g1 _ISR_Enable( level ); 2006d30: 7f ff ed e0 call 20024b0 2006d34: b0 10 20 06 mov 6, %i0 2006d38: 81 c7 e0 08 ret 2006d3c: 81 e8 00 00 restore } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 2006d40: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 2006d44: c4 06 20 0c ld [ %i0 + 0xc ], %g2 2006d48: c2 00 60 08 ld [ %g1 + 8 ], %g1 2006d4c: 80 a0 80 01 cmp %g2, %g1 2006d50: 02 80 00 06 be 2006d68 <_CORE_spinlock_Release+0x54> 2006d54: 01 00 00 00 nop _ISR_Enable( level ); 2006d58: 7f ff ed d6 call 20024b0 <== NOT EXECUTED 2006d5c: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 2006d60: 81 c7 e0 08 ret <== NOT EXECUTED 2006d64: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 2006d68: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006d6c: 82 00 7f ff add %g1, -1, %g1 2006d70: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 2006d74: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 2006d78: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 2006d7c: 7f ff ed cd call 20024b0 2006d80: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 2006d84: 81 c7 e0 08 ret 2006d88: 81 e8 00 00 restore 02006d8c <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 2006d8c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 2006d90: 03 00 80 4d sethi %hi(0x2013400), %g1 2006d94: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1 ! 20136f4 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 2006d98: 7f ff ed c2 call 20024a0 2006d9c: a2 06 80 01 add %i2, %g1, %l1 2006da0: 86 10 00 08 mov %o0, %g3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 2006da4: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006da8: 80 a0 60 01 cmp %g1, 1 2006dac: 12 80 00 0c bne 2006ddc <_CORE_spinlock_Wait+0x50> 2006db0: 03 00 80 4d sethi %hi(0x2013400), %g1 2006db4: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2013664 <_Thread_Executing> 2006db8: c4 06 20 0c ld [ %i0 + 0xc ], %g2 2006dbc: c2 00 60 08 ld [ %g1 + 8 ], %g1 2006dc0: 80 a0 80 01 cmp %g2, %g1 2006dc4: 12 80 00 06 bne 2006ddc <_CORE_spinlock_Wait+0x50> 2006dc8: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 2006dcc: 7f ff ed b9 call 20024b0 2006dd0: b0 10 20 01 mov 1, %i0 ! 1 2006dd4: 81 c7 e0 08 ret 2006dd8: 81 e8 00 00 restore return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 2006ddc: c2 06 20 08 ld [ %i0 + 8 ], %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 2006de0: b2 0e 60 ff and %i1, 0xff, %i1 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 2006de4: 82 00 60 01 inc %g1 2006de8: c2 26 20 08 st %g1, [ %i0 + 8 ] } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 2006dec: 03 00 80 4d sethi %hi(0x2013400), %g1 2006df0: a4 10 62 f4 or %g1, 0x2f4, %l2 ! 20136f4 <_Watchdog_Ticks_since_boot> 2006df4: 03 00 80 4d sethi %hi(0x2013400), %g1 2006df8: a0 10 61 a0 or %g1, 0x1a0, %l0 ! 20135a0 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 2006dfc: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006e00: 80 a0 60 00 cmp %g1, 0 2006e04: 12 80 00 0d bne 2006e38 <_CORE_spinlock_Wait+0xac> 2006e08: 80 a6 60 00 cmp %i1, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 2006e0c: 03 00 80 4d sethi %hi(0x2013400), %g1 2006e10: c4 00 62 64 ld [ %g1 + 0x264 ], %g2 ! 2013664 <_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; 2006e14: 82 10 20 01 mov 1, %g1 2006e18: c2 26 20 04 st %g1, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 2006e1c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2006e20: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 2006e24: b0 10 20 00 clr %i0 2006e28: 7f ff ed a2 call 20024b0 2006e2c: 90 10 00 03 mov %g3, %o0 2006e30: 81 c7 e0 08 ret 2006e34: 81 e8 00 00 restore } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 2006e38: 12 80 00 0a bne 2006e60 <_CORE_spinlock_Wait+0xd4> 2006e3c: 80 a6 a0 00 cmp %i2, 0 the_spinlock->users -= 1; 2006e40: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 2006e44: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2006e48: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 2006e4c: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 2006e50: 7f ff ed 98 call 20024b0 <== NOT EXECUTED 2006e54: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 2006e58: 81 c7 e0 08 ret <== NOT EXECUTED 2006e5c: 81 e8 00 00 restore <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 2006e60: 02 80 00 0e be 2006e98 <_CORE_spinlock_Wait+0x10c> 2006e64: 01 00 00 00 nop 2006e68: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 2006e6c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 2006e70: 18 80 00 0a bgu 2006e98 <_CORE_spinlock_Wait+0x10c> <== NOT EXECUTED 2006e74: 01 00 00 00 nop <== NOT EXECUTED the_spinlock->users -= 1; 2006e78: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 2006e7c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2006e80: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 2006e84: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 2006e88: 7f ff ed 8a call 20024b0 <== NOT EXECUTED 2006e8c: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 2006e90: 81 c7 e0 08 ret <== NOT EXECUTED 2006e94: 81 e8 00 00 restore <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 2006e98: 7f ff ed 86 call 20024b0 2006e9c: 90 10 00 03 mov %g3, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 2006ea0: 40 00 04 a7 call 200813c <_Thread_Enable_dispatch> 2006ea4: 01 00 00 00 nop 2006ea8: c2 04 00 00 ld [ %l0 ], %g1 2006eac: 82 00 60 01 inc %g1 2006eb0: c2 24 00 00 st %g1, [ %l0 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 2006eb4: 7f ff ed 7b call 20024a0 2006eb8: 01 00 00 00 nop 2006ebc: 86 10 00 08 mov %o0, %g3 2006ec0: 30 bf ff cf b,a 2006dfc <_CORE_spinlock_Wait+0x70> 02021c10 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 2021c10: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 2021c14: 7f ff 84 1a call 2002c7c <== NOT EXECUTED 2021c18: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2021c1c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2021c20: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2021c24: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 2021c28: 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; 2021c2c: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 2021c30: 7f ff 84 17 call 2002c8c <== NOT EXECUTED 2021c34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 2021c38: 01 00 00 00 nop 0200b620 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 200b620: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 200b624: c2 00 63 b8 ld [ %g1 + 0x3b8 ], %g1 ! 20177b8 <_Debug_Level> <== NOT EXECUTED 200b628: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED 200b62c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 200b630: 81 c3 e0 08 retl <== NOT EXECUTED 200b634: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 02004f6c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2004f6c: 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 ]; 2004f70: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2004f74: 7f ff f3 73 call 2001d40 2004f78: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 2004f7c: b2 10 00 08 mov %o0, %i1 pending_events = api->pending_events; 2004f80: c8 04 00 00 ld [ %l0 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 2004f84: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 2004f88: 86 88 80 04 andcc %g2, %g4, %g3 2004f8c: 12 80 00 03 bne 2004f98 <_Event_Surrender+0x2c> 2004f90: 03 00 80 5d sethi %hi(0x2017400), %g1 _ISR_Enable( level ); 2004f94: 30 80 00 42 b,a 200509c <_Event_Surrender+0x130> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 2004f98: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 ! 2017790 <_ISR_Nest_level> 2004f9c: 80 a0 60 00 cmp %g1, 0 2004fa0: 22 80 00 1e be,a 2005018 <_Event_Surrender+0xac> 2004fa4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2004fa8: 03 00 80 5d sethi %hi(0x2017400), %g1 2004fac: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 2004fb0: 80 a6 00 01 cmp %i0, %g1 2004fb4: 32 80 00 19 bne,a 2005018 <_Event_Surrender+0xac> 2004fb8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2004fbc: 1b 00 80 60 sethi %hi(0x2018000), %o5 2004fc0: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 ! 2018010 <_Event_Sync_state> 2004fc4: 80 a0 60 01 cmp %g1, 1 2004fc8: 02 80 00 07 be 2004fe4 <_Event_Surrender+0x78> 2004fcc: 80 a0 c0 02 cmp %g3, %g2 2004fd0: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 2004fd4: 80 a0 60 02 cmp %g1, 2 2004fd8: 32 80 00 10 bne,a 2005018 <_Event_Surrender+0xac> 2004fdc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 2004fe0: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 2004fe4: 02 80 00 04 be 2004ff4 <_Event_Surrender+0x88> 2004fe8: 80 8c 60 02 btst 2, %l1 2004fec: 02 80 00 0a be 2005014 <_Event_Surrender+0xa8> <== NOT EXECUTED 2004ff0: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2004ff4: 82 29 00 03 andn %g4, %g3, %g1 2004ff8: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2004ffc: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 2005000: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005004: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005008: 84 10 20 03 mov 3, %g2 200500c: 03 00 80 60 sethi %hi(0x2018000), %g1 2005010: c4 20 60 10 st %g2, [ %g1 + 0x10 ] ! 2018010 <_Event_Sync_state> } _ISR_Enable( level ); 2005014: 30 80 00 22 b,a 200509c <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005018: 80 88 61 00 btst 0x100, %g1 200501c: 02 80 00 20 be 200509c <_Event_Surrender+0x130> 2005020: 80 a0 c0 02 cmp %g3, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005024: 02 80 00 04 be 2005034 <_Event_Surrender+0xc8> 2005028: 80 8c 60 02 btst 2, %l1 200502c: 02 80 00 1c be 200509c <_Event_Surrender+0x130> 2005030: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005034: 82 29 00 03 andn %g4, %g3, %g1 2005038: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 200503c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 2005040: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005044: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 2005048: 7f ff f3 42 call 2001d50 200504c: 90 10 00 19 mov %i1, %o0 2005050: 7f ff f3 3c call 2001d40 2005054: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005058: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200505c: 80 a0 60 02 cmp %g1, 2 2005060: 02 80 00 06 be 2005078 <_Event_Surrender+0x10c> 2005064: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005068: 7f ff f3 3a call 2001d50 200506c: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2005070: 10 80 00 08 b 2005090 <_Event_Surrender+0x124> 2005074: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2005078: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200507c: 7f ff f3 35 call 2001d50 2005080: 90 10 00 19 mov %i1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 2005084: 40 00 0e 59 call 20089e8 <_Watchdog_Remove> 2005088: 90 06 20 48 add %i0, 0x48, %o0 200508c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 2005090: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005094: 40 00 08 6f call 2007250 <_Thread_Clear_state> 2005098: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200509c: 7f ff f3 2d call 2001d50 20050a0: 91 e8 00 19 restore %g0, %i1, %o0 20050a4: 01 00 00 00 nop 020050a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 20050a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 20050ac: 90 10 00 18 mov %i0, %o0 20050b0: 40 00 09 8b call 20076dc <_Thread_Get> 20050b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20050b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20050bc: 80 a0 60 00 cmp %g1, 0 20050c0: 12 80 00 0f bne 20050fc <_Event_Timeout+0x54> 20050c4: 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 ); 20050c8: 7f ff f3 1e call 2001d40 20050cc: 01 00 00 00 nop 20050d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 20050d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20050d8: 80 a0 60 00 cmp %g1, 0 20050dc: 12 80 00 0a bne 2005104 <_Event_Timeout+0x5c> 20050e0: 03 00 80 5d sethi %hi(0x2017400), %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20050e4: 05 00 80 5d sethi %hi(0x2017400), %g2 <== NOT EXECUTED 20050e8: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 20050ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20050f0: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 20050f4: 7f ff f3 17 call 2001d50 <== NOT EXECUTED 20050f8: 01 00 00 00 nop <== NOT EXECUTED 20050fc: 81 c7 e0 08 ret <== NOT EXECUTED 2005100: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005104: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 2005108: 80 a6 00 01 cmp %i0, %g1 200510c: 12 80 00 09 bne 2005130 <_Event_Timeout+0x88> 2005110: c0 26 20 24 clr [ %i0 + 0x24 ] Thread_blocking_operation_States sync = _Event_Sync_state; 2005114: 05 00 80 60 sethi %hi(0x2018000), %g2 2005118: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 ! 2018010 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 200511c: 80 a0 60 01 cmp %g1, 1 2005120: 18 80 00 05 bgu 2005134 <_Event_Timeout+0x8c> 2005124: 82 10 20 06 mov 6, %g1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005128: 82 10 20 02 mov 2, %g1 200512c: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005130: 82 10 20 06 mov 6, %g1 2005134: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 2005138: 7f ff f3 06 call 2001d50 200513c: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2005140: 90 10 00 18 mov %i0, %o0 2005144: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005148: 40 00 08 42 call 2007250 <_Thread_Clear_state> 200514c: 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; 2005150: 05 00 80 5d sethi %hi(0x2017400), %g2 2005154: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_Thread_Dispatch_disable_level> 2005158: 82 00 7f ff add %g1, -1, %g1 200515c: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 2005160: 81 c7 e0 08 ret 2005164: 81 e8 00 00 restore 02008660 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 2008660: 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; 2008664: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 2008668: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 200866c: 90 10 00 19 mov %i1, %o0 2008670: 40 00 01 5d call 2008be4 <_Heap_Calc_block_size> 2008674: 92 10 00 14 mov %l4, %o1 void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 2008678: b2 06 7f fc add %i1, -4, %i1 uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); if(the_size == 0) 200867c: ba 92 20 00 orcc %o0, 0, %i5 2008680: 02 80 00 67 be 200881c <_Heap_Allocate_aligned+0x1bc> 2008684: 90 10 20 00 clr %o0 return NULL; if(alignment == 0) 2008688: 80 a6 a0 00 cmp %i2, 0 200868c: 22 80 00 02 be,a 2008694 <_Heap_Allocate_aligned+0x34> 2008690: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 2008694: e2 06 20 08 ld [ %i0 + 8 ], %l1 2008698: 10 80 00 59 b 20087fc <_Heap_Allocate_aligned+0x19c> 200869c: aa 10 20 00 clr %l5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 20086a0: a6 08 7f fe and %g1, -2, %l3 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 20086a4: 80 a4 c0 1d cmp %l3, %i5 20086a8: 2a 80 00 54 bcs,a 20087f8 <_Heap_Allocate_aligned+0x198> 20086ac: e2 04 60 08 ld [ %l1 + 8 ], %l1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 20086b0: 92 10 00 1a mov %i2, %o1 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 20086b4: ae 04 40 13 add %l1, %l3, %l7 aligned_user_addr = block_end - end_to_user_offs; 20086b8: a0 25 c0 19 sub %l7, %i1, %l0 20086bc: 40 00 3e e8 call 201825c <.urem> 20086c0: 90 10 00 10 mov %l0, %o0 if(block_size >= the_size) { /* the_block is large enough. */ _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 20086c4: 92 10 00 14 mov %l4, %o1 20086c8: a4 24 00 08 sub %l0, %o0, %l2 20086cc: 40 00 3e e4 call 201825c <.urem> 20086d0: 90 10 00 12 mov %l2, %o0 20086d4: a0 04 60 08 add %l1, 8, %l0 20086d8: 84 24 80 08 sub %l2, %o0, %g2 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 20086dc: 80 a0 80 10 cmp %g2, %l0 20086e0: 2a 80 00 46 bcs,a 20087f8 <_Heap_Allocate_aligned+0x198> 20086e4: 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) { 20086e8: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 20086ec: 82 20 80 10 sub %g2, %l0, %g1 20086f0: 80 a0 40 16 cmp %g1, %l6 20086f4: 1a 80 00 15 bcc 2008748 <_Heap_Allocate_aligned+0xe8> 20086f8: 80 a4 a0 00 cmp %l2, 0 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 20086fc: 82 24 80 10 sub %l2, %l0, %g1 2008700: 80 a0 40 14 cmp %g1, %l4 2008704: 0a 80 00 10 bcs 2008744 <_Heap_Allocate_aligned+0xe4> 2008708: 84 10 00 10 mov %l0, %g2 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 200870c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2008710: 40 00 3e d3 call 201825c <.urem> <== NOT EXECUTED 2008714: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED *value = r ? v - r + a : v; 2008718: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 200871c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2008720: 12 80 00 03 bne 200872c <_Heap_Allocate_aligned+0xcc> <== NOT EXECUTED 2008724: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 2008728: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 200872c: 82 22 00 10 sub %o0, %l0, %g1 <== NOT EXECUTED 2008730: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED 2008734: 3a 80 00 31 bcc,a 20087f8 <_Heap_Allocate_aligned+0x198> <== NOT EXECUTED 2008738: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 200873c: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 2008740: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 2008744: 80 a4 a0 00 cmp %l2, 0 2008748: 22 80 00 2c be,a 20087f8 <_Heap_Allocate_aligned+0x198> 200874c: 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; 2008750: 82 05 e0 08 add %l7, 8, %g1 2008754: a0 20 40 02 sub %g1, %g2, %l0 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 2008758: 84 24 c0 10 sub %l3, %l0, %g2 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 200875c: 80 a0 80 16 cmp %g2, %l6 2008760: 2a 80 00 08 bcs,a 2008780 <_Heap_Allocate_aligned+0x120> 2008764: 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; 2008768: 82 10 a0 01 or %g2, 1, %g1 200876c: 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); 2008770: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 2008774: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 2008778: 10 80 00 09 b 200879c <_Heap_Allocate_aligned+0x13c> 200877c: e0 24 60 04 st %l0, [ %l1 + 4 ] ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 2008780: 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; 2008784: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 prev->next = next; next->prev = prev; 2008788: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 200878c: 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; 2008790: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008794: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 2008798: a0 10 00 13 mov %l3, %l0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 200879c: 84 04 40 10 add %l1, %l0, %g2 } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 20087a0: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20087a4: 82 10 60 01 or %g1, 1, %g1 20087a8: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 20087ac: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if(stats->min_free_size > stats->free_size) 20087b0: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 20087b4: 82 20 40 10 sub %g1, %l0, %g1 if(stats->min_free_size > stats->free_size) 20087b8: 80 a0 80 01 cmp %g2, %g1 20087bc: 08 80 00 03 bleu 20087c8 <_Heap_Allocate_aligned+0x168> 20087c0: c2 26 20 30 st %g1, [ %i0 + 0x30 ] stats->min_free_size = stats->free_size; 20087c4: c2 26 20 34 st %g1, [ %i0 + 0x34 ] stats->used_blocks += 1; 20087c8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 20087cc: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 stats->allocs += 1; 20087d0: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 20087d4: 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; 20087d8: 86 00 e0 01 inc %g3 stats->allocs += 1; 20087dc: 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; 20087e0: 86 00 c0 15 add %g3, %l5, %g3 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 20087e4: c2 26 20 40 st %g1, [ %i0 + 0x40 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 20087e8: c4 26 20 48 st %g2, [ %i0 + 0x48 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 20087ec: c6 26 20 4c st %g3, [ %i0 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 20087f0: 10 80 00 07 b 200880c <_Heap_Allocate_aligned+0x1ac> 20087f4: 90 10 00 12 mov %l2, %o0 /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 20087f8: aa 05 60 01 inc %l5 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 20087fc: 80 a4 40 18 cmp %l1, %i0 2008800: 32 bf ff a8 bne,a 20086a0 <_Heap_Allocate_aligned+0x40> 2008804: c2 04 60 04 ld [ %l1 + 4 ], %g1 2008808: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 200880c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2008810: 80 a0 40 15 cmp %g1, %l5 2008814: 2a 80 00 02 bcs,a 200881c <_Heap_Allocate_aligned+0x1bc> 2008818: ea 26 20 44 st %l5, [ %i0 + 0x44 ] stats->max_search = search_count; return user_ptr; } 200881c: 81 c7 e0 08 ret 2008820: 91 e8 00 08 restore %g0, %o0, %o0 0202c564 <_Heap_Get_information>: Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 202c564: c0 22 40 00 clr [ %o1 ] Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 202c568: d8 02 20 24 ld [ %o0 + 0x24 ], %o4 _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; the_info->Free.total = 0; 202c56c: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 202c570: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 202c574: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 202c578: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; 202c57c: c0 22 60 10 clr [ %o1 + 0x10 ] Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 202c580: 10 80 00 23 b 202c60c <_Heap_Get_information+0xa8> 202c584: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 202c588: 88 08 7f fe and %g1, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 202c58c: 9a 00 80 04 add %g2, %g4, %o5 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 202c590: c2 03 60 04 ld [ %o5 + 4 ], %g1 202c594: 80 88 60 01 btst 1, %g1 202c598: 22 80 00 0d be,a 202c5cc <_Heap_Get_information+0x68> 202c59c: c2 02 40 00 ld [ %o1 ], %g1 the_info->Used.number++; 202c5a0: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.total += the_size; 202c5a4: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 202c5a8: 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++; 202c5ac: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 202c5b0: 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++; 202c5b4: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 202c5b8: 80 a0 c0 04 cmp %g3, %g4 202c5bc: 1a 80 00 13 bcc 202c608 <_Heap_Get_information+0xa4> 202c5c0: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 202c5c4: 10 80 00 11 b 202c608 <_Heap_Get_information+0xa4> 202c5c8: c8 22 60 10 st %g4, [ %o1 + 0x10 ] } else { the_info->Free.number++; the_info->Free.total += the_size; 202c5cc: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 202c5d0: 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++; 202c5d4: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 202c5d8: 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++; 202c5dc: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 202c5e0: 80 a0 c0 04 cmp %g3, %g4 202c5e4: 1a 80 00 03 bcc 202c5f0 <_Heap_Get_information+0x8c> 202c5e8: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 202c5ec: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 202c5f0: c2 03 40 00 ld [ %o5 ], %g1 202c5f4: 80 a1 00 01 cmp %g4, %g1 202c5f8: 02 80 00 05 be 202c60c <_Heap_Get_information+0xa8> 202c5fc: 84 10 00 0d mov %o5, %g2 202c600: 81 c3 e0 08 retl <== NOT EXECUTED 202c604: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 202c608: 84 10 00 0d mov %o5, %g2 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 202c60c: 80 a0 80 0c cmp %g2, %o4 202c610: 32 bf ff de bne,a 202c588 <_Heap_Get_information+0x24> 202c614: c2 00 a0 04 ld [ %g2 + 4 ], %g1 } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 202c618: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 202c61c: 90 10 20 00 clr %o0 202c620: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 202c624: 81 c3 e0 08 retl 202c628: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 02014edc <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 2014edc: 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; 2014ee0: e8 06 20 14 ld [ %i0 + 0x14 ], %l4 uint32_t const page_size = the_heap->page_size; 2014ee4: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 *old_mem_size = 0; 2014ee8: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 2014eec: 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); 2014ef0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2014ef4: 7f ff fb ad call 2013da8 <.urem> 2014ef8: 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 ); 2014efc: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 2014f00: 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); 2014f04: 82 06 7f f8 add %i1, -8, %g1 2014f08: a4 20 40 08 sub %g1, %o0, %l2 _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 2014f0c: 80 a4 80 04 cmp %l2, %g4 2014f10: 84 60 3f ff subx %g0, -1, %g2 2014f14: 80 a0 c0 12 cmp %g3, %l2 2014f18: 82 60 3f ff subx %g0, -1, %g1 2014f1c: 80 88 80 01 btst %g2, %g1 2014f20: 02 80 00 75 be 20150f4 <_Heap_Resize_block+0x218> 2014f24: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 2014f28: da 04 a0 04 ld [ %l2 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2014f2c: aa 0b 7f fe and %o5, -2, %l5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2014f30: a2 04 80 15 add %l2, %l5, %l1 old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 2014f34: 80 a4 40 04 cmp %l1, %g4 2014f38: 84 60 3f ff subx %g0, -1, %g2 2014f3c: 80 a0 c0 11 cmp %g3, %l1 2014f40: 82 60 3f ff subx %g0, -1, %g1 2014f44: 80 88 80 01 btst %g2, %g1 2014f48: 02 80 00 6b be 20150f4 <_Heap_Resize_block+0x218> 2014f4c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2014f50: c2 04 60 04 ld [ %l1 + 4 ], %g1 2014f54: 80 88 60 01 btst 1, %g1 2014f58: 02 80 00 67 be 20150f4 <_Heap_Resize_block+0x218> 2014f5c: 80 a4 40 03 cmp %l1, %g3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2014f60: b0 08 7f fe and %g1, -2, %i0 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 2014f64: 84 10 20 01 mov 1, %g2 2014f68: 02 80 00 04 be 2014f78 <_Heap_Resize_block+0x9c> 2014f6c: 82 04 40 18 add %l1, %i0, %g1 2014f70: c2 00 60 04 ld [ %g1 + 4 ], %g1 2014f74: 84 08 60 01 and %g1, 1, %g2 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 2014f78: 82 24 40 19 sub %l1, %i1, %g1 2014f7c: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 2014f80: c2 26 c0 00 st %g1, [ %i3 ] !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 2014f84: b2 10 00 02 mov %g2, %i1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 2014f88: 80 a6 80 01 cmp %i2, %g1 2014f8c: 08 80 00 1e bleu 2015004 <_Heap_Resize_block+0x128> 2014f90: 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 */ 2014f94: 80 a6 60 00 cmp %i1, 0 2014f98: 12 80 00 59 bne 20150fc <_Heap_Resize_block+0x220> 2014f9c: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 2014fa0: 92 10 00 16 mov %l6, %o1 2014fa4: 7f ff fb 81 call 2013da8 <.urem> 2014fa8: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 2014fac: 80 a2 20 00 cmp %o0, 0 2014fb0: 02 80 00 05 be 2014fc4 <_Heap_Resize_block+0xe8> 2014fb4: 80 a4 00 14 cmp %l0, %l4 2014fb8: 82 04 00 16 add %l0, %l6, %g1 2014fbc: a0 20 40 08 sub %g1, %o0, %l0 2014fc0: 80 a4 00 14 cmp %l0, %l4 2014fc4: 1a 80 00 03 bcc 2014fd0 <_Heap_Resize_block+0xf4> 2014fc8: 90 10 00 10 mov %l0, %o0 2014fcc: 90 10 00 14 mov %l4, %o0 else { uint32_t add_block_size = size - old_user_size; _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 2014fd0: 80 a2 00 18 cmp %o0, %i0 2014fd4: 18 80 00 4a bgu 20150fc <_Heap_Resize_block+0x220> 2014fd8: 94 10 00 08 mov %o0, %o2 return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 2014fdc: 92 10 00 11 mov %l1, %o1 2014fe0: 7f ff c5 91 call 2006624 <_Heap_Block_allocate> 2014fe4: 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; 2014fe8: 90 02 00 15 add %o0, %l5, %o0 2014fec: 90 12 00 1b or %o0, %i3, %o0 2014ff0: d0 24 a0 04 st %o0, [ %l2 + 4 ] --stats->used_blocks; 2014ff4: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 2014ff8: 82 00 7f ff add %g1, -1, %g1 2014ffc: 10 80 00 39 b 20150e0 <_Heap_Resize_block+0x204> 2015000: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 2015004: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 2015008: 92 10 00 16 mov %l6, %o1 201500c: 7f ff fb 67 call 2013da8 <.urem> 2015010: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 2015014: a0 a4 00 08 subcc %l0, %o0, %l0 2015018: 22 80 00 33 be,a 20150e4 <_Heap_Resize_block+0x208> 201501c: 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; 2015020: 84 25 40 10 sub %l5, %l0, %g2 if (new_block_size < min_block_size) { 2015024: 80 a0 80 14 cmp %g2, %l4 2015028: 1a 80 00 07 bcc 2015044 <_Heap_Resize_block+0x168> 201502c: 80 a6 60 00 cmp %i1, 0 uint32_t delta = min_block_size - new_block_size; 2015030: 82 25 00 02 sub %l4, %g2, %g1 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 2015034: a0 a4 00 01 subcc %l0, %g1, %l0 2015038: 02 80 00 2a be 20150e0 <_Heap_Resize_block+0x204> 201503c: 84 00 80 01 add %g2, %g1, %g2 _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 2015040: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2015044: 12 80 00 15 bne 2015098 <_Heap_Resize_block+0x1bc> 2015048: 80 a4 00 14 cmp %l0, %l4 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 201504c: 82 10 80 1b or %g2, %i3, %g1 if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 2015050: 86 04 00 18 add %l0, %i0, %g3 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 2015054: c2 24 a0 04 st %g1, [ %l2 + 4 ] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 2015058: 82 10 e0 01 or %g3, 1, %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 201505c: 84 04 80 02 add %l2, %g2, %g2 next_next_block->prev_size = new_next_block_size; 2015060: c6 24 40 18 st %g3, [ %l1 + %i0 ] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 2015064: da 04 60 0c ld [ %l1 + 0xc ], %o5 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 2015068: c8 04 60 08 ld [ %l1 + 8 ], %g4 _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 201506c: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 2015070: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 2015074: c8 20 a0 08 st %g4, [ %g2 + 8 ] 2015078: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 201507c: da 20 a0 0c st %o5, [ %g2 + 0xc ] 2015080: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 2015084: 86 00 ff fc add %g3, -4, %g3 next->prev = prev->next = block; 2015088: c4 21 20 0c st %g2, [ %g4 + 0xc ] 201508c: c4 23 60 08 st %g2, [ %o5 + 8 ] 2015090: 10 80 00 14 b 20150e0 <_Heap_Resize_block+0x204> 2015094: c6 27 00 00 st %g3, [ %i4 ] } else if (free_block_size >= min_block_size) { 2015098: 2a 80 00 13 bcs,a 20150e4 <_Heap_Resize_block+0x208> <== NOT EXECUTED 201509c: 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; 20150a0: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 20150a4: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 20150a8: 82 14 20 01 or %l0, 1, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 20150ac: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 20150b0: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 20150b4: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20150b8: 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 */ 20150bc: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20150c0: 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 */ 20150c4: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 20150c8: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 20150cc: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 20150d0: 7f ff da 25 call 200b964 <_Heap_Free> <== NOT EXECUTED 20150d4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 20150d8: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 20150dc: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 20150e0: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 20150e4: 82 00 60 01 inc %g1 20150e8: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 20150ec: 81 c7 e0 08 ret 20150f0: 91 e8 20 00 restore %g0, 0, %o0 return HEAP_RESIZE_SUCCESSFUL; 20150f4: 81 c7 e0 08 ret 20150f8: 91 e8 20 02 restore %g0, 2, %o0 } 20150fc: 81 c7 e0 08 ret 2015100: 91 e8 20 01 restore %g0, 1, %o0 0200e45c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 200e45c: 9d e3 bf 98 save %sp, -104, %sp 200e460: a6 10 00 18 mov %i0, %l3 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e464: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 200e468: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200e46c: 16 80 00 03 bge 200e478 <_Heap_Walk+0x1c> 200e470: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 source = the_heap->stats.instance; 200e474: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 200e478: c2 04 20 04 ld [ %l0 + 4 ], %g1 200e47c: 80 88 60 01 btst 1, %g1 200e480: 12 80 00 07 bne 200e49c <_Heap_Walk+0x40> 200e484: b0 10 20 00 clr %i0 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 200e488: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e48c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e490: 90 12 20 90 or %o0, 0x90, %o0 <== NOT EXECUTED 200e494: 7f ff d9 3f call 2004990 <== NOT EXECUTED 200e498: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 200e49c: c4 04 00 00 ld [ %l0 ], %g2 200e4a0: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1 200e4a4: 80 a0 80 01 cmp %g2, %g1 200e4a8: 22 80 00 5e be,a 200e620 <_Heap_Walk+0x1c4> 200e4ac: 03 00 80 68 sethi %hi(0x201a000), %g1 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 200e4b0: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e4b4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e4b8: 90 12 20 c8 or %o0, 0xc8, %o0 <== NOT EXECUTED 200e4bc: 7f ff d9 35 call 2004990 <== NOT EXECUTED 200e4c0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200e4c4: 10 80 00 57 b 200e620 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200e4c8: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200e4cc: e8 04 20 04 ld [ %l0 + 4 ], %l4 printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 200e4d0: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3 200e4d4: a4 0d 3f fe and %l4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 200e4d8: a2 04 00 12 add %l0, %l2, %l1 200e4dc: 80 a4 40 01 cmp %l1, %g1 200e4e0: 84 60 3f ff subx %g0, -1, %g2 200e4e4: 80 a0 c0 11 cmp %g3, %l1 200e4e8: 82 60 3f ff subx %g0, -1, %g1 200e4ec: 80 88 80 01 btst %g2, %g1 200e4f0: 32 80 00 09 bne,a 200e514 <_Heap_Walk+0xb8> 200e4f4: c2 04 60 04 ld [ %l1 + 4 ], %g1 if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 200e4f8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200e4fc: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e500: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e504: 7f ff d9 23 call 2004990 <== NOT EXECUTED 200e508: 90 12 21 00 or %o0, 0x100, %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", 200e50c: 10 80 00 51 b 200e650 <_Heap_Walk+0x1f4> <== NOT EXECUTED 200e510: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 200e514: 80 88 60 01 btst 1, %g1 200e518: 12 80 00 27 bne 200e5b4 <_Heap_Walk+0x158> 200e51c: 80 a6 20 00 cmp %i0, 0 if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 200e520: c2 04 40 00 ld [ %l1 ], %g1 200e524: 80 a4 80 01 cmp %l2, %g1 200e528: 02 80 00 07 be 200e544 <_Heap_Walk+0xe8> 200e52c: 80 8d 20 01 btst 1, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200e530: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200e534: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e538: 7f ff d9 16 call 2004990 <== NOT EXECUTED 200e53c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (!prev_used) { 200e540: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED 200e544: 32 80 00 0c bne,a 200e574 <_Heap_Walk+0x118> 200e548: c2 04 e0 08 ld [ %l3 + 8 ], %g1 if (do_dump || error) printk("\n"); 200e54c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200e550: 02 80 00 05 be 200e564 <_Heap_Walk+0x108> <== NOT EXECUTED 200e554: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200e558: 7f ff d9 0e call 2004990 <== NOT EXECUTED 200e55c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200e560: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200e564: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e568: 7f ff d9 0a call 2004990 <== NOT EXECUTED 200e56c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e570: c2 04 e0 08 ld [ %l3 + 8 ], %g1 <== NOT EXECUTED error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 200e574: 80 a0 40 10 cmp %g1, %l0 200e578: 02 80 00 0e be 200e5b0 <_Heap_Walk+0x154> 200e57c: 80 a0 40 13 cmp %g1, %l3 200e580: 32 bf ff fd bne,a 200e574 <_Heap_Walk+0x118> 200e584: c2 00 60 08 ld [ %g1 + 8 ], %g1 block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 200e588: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200e58c: 22 80 00 05 be,a 200e5a0 <_Heap_Walk+0x144> <== NOT EXECUTED 200e590: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200e594: 7f ff d8 ff call 2004990 <== NOT EXECUTED 200e598: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200e59c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200e5a0: 7f ff d8 fc call 2004990 <== NOT EXECUTED 200e5a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200e5a8: 10 80 00 06 b 200e5c0 <_Heap_Walk+0x164> <== NOT EXECUTED 200e5ac: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 200e5b0: 80 a6 20 00 cmp %i0, 0 200e5b4: 22 80 00 06 be,a 200e5cc <_Heap_Walk+0x170> 200e5b8: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 200e5bc: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 200e5c0: 7f ff d8 f4 call 2004990 <== NOT EXECUTED 200e5c4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200e5c8: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED 200e5cc: 80 a4 80 01 cmp %l2, %g1 200e5d0: 3a 80 00 05 bcc,a 200e5e4 <_Heap_Walk+0x188> 200e5d4: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1 printk("PASS: %d !block size is too small\n", source); 200e5d8: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e5dc: 10 80 00 09 b 200e600 <_Heap_Walk+0x1a4> <== NOT EXECUTED 200e5e0: 90 12 21 b8 or %o0, 0x1b8, %o0 ! 201b1b8 <_POSIX_Threads_Default_attributes+0x160> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 200e5e4: 40 00 27 1e call 201825c <.urem> 200e5e8: 90 10 00 12 mov %l2, %o0 200e5ec: 80 a2 20 00 cmp %o0, 0 200e5f0: 02 80 00 08 be 200e610 <_Heap_Walk+0x1b4> 200e5f4: 80 a6 20 00 cmp %i0, 0 printk("PASS: %d !block size is misaligned\n", source); 200e5f8: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e5fc: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 201b1e0 <_POSIX_Threads_Default_attributes+0x188> <== NOT EXECUTED 200e600: 7f ff d8 e4 call 2004990 <== NOT EXECUTED 200e604: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200e608: 10 80 00 12 b 200e650 <_Heap_Walk+0x1f4> <== NOT EXECUTED 200e60c: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 200e610: 12 80 00 10 bne 200e650 <_Heap_Walk+0x1f4> 200e614: 96 10 00 16 mov %l6, %o3 break; 200e618: 10 80 00 09 b 200e63c <_Heap_Walk+0x1e0> 200e61c: a0 10 00 11 mov %l1, %l0 error = 1; } } } if (do_dump || error) printk("\n"); 200e620: aa 10 62 f8 or %g1, 0x2f8, %l5 Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); printk("PASS: %d !the_block not in the free list", source); 200e624: 03 00 80 6c sethi %hi(0x201b000), %g1 200e628: b8 10 61 88 or %g1, 0x188, %i4 ! 201b188 <_POSIX_Threads_Default_attributes+0x130> 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); 200e62c: 03 00 80 6c sethi %hi(0x201b000), %g1 200e630: ba 10 61 58 or %g1, 0x158, %i5 ! 201b158 <_POSIX_Threads_Default_attributes+0x100> 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); 200e634: 03 00 80 6c sethi %hi(0x201b000), %g1 200e638: ae 10 61 28 or %g1, 0x128, %l7 ! 201b128 <_POSIX_Threads_Default_attributes+0xd0> 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 ) { 200e63c: 80 a4 00 16 cmp %l0, %l6 200e640: 32 bf ff a3 bne,a 200e4cc <_Heap_Walk+0x70> 200e644: c2 04 e0 20 ld [ %l3 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 200e648: 10 80 00 09 b 200e66c <_Heap_Walk+0x210> 200e64c: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 200e650: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e654: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e658: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 200e65c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 200e660: 7f ff d8 cc call 2004990 <== NOT EXECUTED 200e664: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e668: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 200e66c: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3 200e670: 94 08 7f fe and %g1, -2, %o2 200e674: 80 a2 80 0b cmp %o2, %o3 200e678: 02 80 00 06 be 200e690 <_Heap_Walk+0x234> 200e67c: 92 10 00 19 mov %i1, %o1 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 200e680: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200e684: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200e688: 7f ff d8 c2 call 2004990 <== NOT EXECUTED 200e68c: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 200e690: 81 c7 e0 08 ret 200e694: 81 e8 00 00 restore 0200685c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 200685c: 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; 2006860: 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 ) 2006864: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 2006868: 03 00 00 3f sethi %hi(0xfc00), %g1 200686c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006870: a2 08 80 01 and %g2, %g1, %l1 2006874: 80 a4 00 11 cmp %l0, %l1 2006878: 3a 80 00 06 bcc,a 2006890 <_Objects_Extend_information+0x34> 200687c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 2006880: aa 10 00 11 mov %l1, %l5 2006884: ae 10 20 00 clr %l7 2006888: 10 80 00 13 b 20068d4 <_Objects_Extend_information+0x78> 200688c: ac 10 20 00 clr %l6 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006890: 90 10 00 10 mov %l0, %o0 2006894: 92 10 00 12 mov %l2, %o1 2006898: 40 00 34 98 call 2013af8 <.udiv> 200689c: aa 10 00 11 mov %l1, %l5 20068a0: ac 10 20 00 clr %l6 20068a4: 10 80 00 09 b 20068c8 <_Objects_Extend_information+0x6c> 20068a8: ae 10 00 08 mov %o0, %l7 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 20068ac: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20068b0: c2 00 40 02 ld [ %g1 + %g2 ], %g1 20068b4: 80 a0 60 00 cmp %g1, 0 20068b8: 02 80 00 08 be 20068d8 <_Objects_Extend_information+0x7c> 20068bc: 80 a5 40 10 cmp %l5, %l0 break; else index_base += information->allocation_size; 20068c0: aa 05 40 12 add %l5, %l2, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 20068c4: ac 05 a0 01 inc %l6 20068c8: 80 a5 80 17 cmp %l6, %l7 20068cc: 0a bf ff f8 bcs 20068ac <_Objects_Extend_information+0x50> 20068d0: 85 2d a0 02 sll %l6, 2, %g2 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 20068d4: 80 a5 40 10 cmp %l5, %l0 20068d8: 2a 80 00 5d bcs,a 2006a4c <_Objects_Extend_information+0x1f0> 20068dc: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 20068e0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 20068e4: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 20068e8: ba 04 00 01 add %l0, %g1, %i5 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 20068ec: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 20068f0: a0 05 e0 01 add %l7, 1, %l0 20068f4: 82 07 40 11 add %i5, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 20068f8: 02 80 00 0b be 2006924 <_Objects_Extend_information+0xc8> 20068fc: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 2006900: 90 02 00 10 add %o0, %l0, %o0 2006904: 90 00 40 08 add %g1, %o0, %o0 2006908: 40 00 08 93 call 2008b54 <_Workspace_Allocate> 200690c: 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 ) 2006910: a4 92 20 00 orcc %o0, 0, %l2 2006914: 32 80 00 0a bne,a 200693c <_Objects_Extend_information+0xe0> 2006918: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200691c: 81 c7 e0 08 ret <== NOT EXECUTED 2006920: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 2006924: 90 02 00 10 add %o0, %l0, %o0 2006928: 90 00 40 08 add %g1, %o0, %o0 200692c: 40 00 08 91 call 2008b70 <_Workspace_Allocate_or_fatal_error> 2006930: 91 2a 20 02 sll %o0, 2, %o0 2006934: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006938: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 200693c: 85 2c 20 02 sll %l0, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006940: 80 a0 40 11 cmp %g1, %l1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006944: a8 04 80 02 add %l2, %g2, %l4 2006948: a6 05 00 02 add %l4, %g2, %l3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 200694c: 08 80 00 15 bleu 20069a0 <_Objects_Extend_information+0x144> 2006950: 84 10 20 00 clr %g2 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2006954: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 2006958: a1 2d e0 02 sll %l7, 2, %l0 200695c: 90 10 00 12 mov %l2, %o0 2006960: 40 00 1b 8d call 200d794 2006964: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006968: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 200696c: 94 10 00 10 mov %l0, %o2 2006970: 40 00 1b 89 call 200d794 2006974: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006978: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 200697c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006980: 94 04 40 0a add %l1, %o2, %o2 2006984: 90 10 00 13 mov %l3, %o0 2006988: 40 00 1b 83 call 200d794 200698c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2006990: 10 80 00 08 b 20069b0 <_Objects_Extend_information+0x154> 2006994: 83 2d e0 02 sll %l7, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006998: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 200699c: c0 24 c0 01 clr [ %l3 + %g1 ] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 20069a0: 80 a0 80 11 cmp %g2, %l1 20069a4: 2a bf ff fd bcs,a 2006998 <_Objects_Extend_information+0x13c> 20069a8: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 20069ac: 83 2d e0 02 sll %l7, 2, %g1 inactive_per_block[block_count] = 0; 20069b0: c0 25 00 01 clr [ %l4 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 20069b4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 20069b8: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 20069bc: 83 2d 60 02 sll %l5, 2, %g1 20069c0: 86 05 40 02 add %l5, %g2, %g3 20069c4: 84 04 c0 01 add %l3, %g1, %g2 20069c8: 10 80 00 04 b 20069d8 <_Objects_Extend_information+0x17c> 20069cc: 82 10 00 15 mov %l5, %g1 index++ ) { 20069d0: 82 00 60 01 inc %g1 20069d4: 84 00 a0 04 add %g2, 4, %g2 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 20069d8: 80 a0 40 03 cmp %g1, %g3 20069dc: 2a bf ff fd bcs,a 20069d0 <_Objects_Extend_information+0x174> 20069e0: c0 20 80 00 clr [ %g2 ] index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 20069e4: 7f ff ec d7 call 2001d40 20069e8: 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( 20069ec: c2 06 00 00 ld [ %i0 ], %g1 20069f0: c8 16 20 04 lduh [ %i0 + 4 ], %g4 20069f4: 87 2f 60 10 sll %i5, 0x10, %g3 20069f8: 89 29 20 1b sll %g4, 0x1b, %g4 20069fc: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006a00: 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( 2006a04: 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; 2006a08: e8 26 20 30 st %l4, [ %i0 + 0x30 ] information->local_table = local_table; 2006a0c: e6 26 20 1c st %l3, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006a10: 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; 2006a14: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2006a18: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006a1c: e4 26 20 34 st %l2, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006a20: 82 10 40 04 or %g1, %g4, %g1 2006a24: 82 10 40 03 or %g1, %g3, %g1 2006a28: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006a2c: 7f ff ec c9 call 2001d50 2006a30: 01 00 00 00 nop if ( old_tables ) 2006a34: 80 a4 20 00 cmp %l0, 0 2006a38: 22 80 00 05 be,a 2006a4c <_Objects_Extend_information+0x1f0> 2006a3c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 _Workspace_Free( old_tables ); 2006a40: 40 00 08 3e call 2008b38 <_Workspace_Free> 2006a44: 90 10 00 10 mov %l0, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 2006a48: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006a4c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 2006a50: 80 a0 60 00 cmp %g1, 0 2006a54: 02 80 00 0f be 2006a90 <_Objects_Extend_information+0x234> 2006a58: a1 2d a0 02 sll %l6, 2, %l0 information->object_blocks[ block ] = 2006a5c: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 2006a60: 40 00 33 ec call 2013a10 <.umul> 2006a64: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 2006a68: 40 00 08 3b call 2008b54 <_Workspace_Allocate> 2006a6c: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006a70: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 2006a74: d0 24 40 10 st %o0, [ %l1 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006a78: c2 00 40 10 ld [ %g1 + %l0 ], %g1 2006a7c: 80 a0 60 00 cmp %g1, 0 2006a80: 32 80 00 0b bne,a 2006aac <_Objects_Extend_information+0x250> 2006a84: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006a88: 81 c7 e0 08 ret <== NOT EXECUTED 2006a8c: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 2006a90: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 2006a94: 40 00 33 df call 2013a10 <.umul> 2006a98: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 2006a9c: 40 00 08 35 call 2008b70 <_Workspace_Allocate_or_fatal_error> 2006aa0: 01 00 00 00 nop 2006aa4: d0 24 40 10 st %o0, [ %l1 + %l0 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006aa8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006aac: a5 2d a0 02 sll %l6, 2, %l2 2006ab0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2006ab4: d2 00 40 12 ld [ %g1 + %l2 ], %o1 2006ab8: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2006abc: 90 07 bf ec add %fp, -20, %o0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006ac0: a0 10 00 15 mov %l5, %l0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 2006ac4: a8 10 00 08 mov %o0, %l4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006ac8: 40 00 13 0b call 200b6f4 <_Chain_Initialize> 2006acc: a2 06 20 20 add %i0, 0x20, %l1 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006ad0: 10 80 00 0d b 2006b04 <_Objects_Extend_information+0x2a8> 2006ad4: 27 00 00 40 sethi %hi(0x10000), %l3 2006ad8: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2006adc: 83 28 60 18 sll %g1, 0x18, %g1 2006ae0: 85 28 a0 1b sll %g2, 0x1b, %g2 2006ae4: 82 10 40 13 or %g1, %l3, %g1 2006ae8: 82 10 40 02 or %g1, %g2, %g1 2006aec: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006af0: 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( 2006af4: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2006af8: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006afc: 7f ff fd 14 call 2005f4c <_Chain_Append> 2006b00: 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 ) { 2006b04: 40 00 12 ec call 200b6b4 <_Chain_Get> 2006b08: 90 10 00 14 mov %l4, %o0 2006b0c: 80 a2 20 00 cmp %o0, 0 2006b10: 32 bf ff f2 bne,a 2006ad8 <_Objects_Extend_information+0x27c> 2006b14: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006b18: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006b1c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive += information->allocation_size; 2006b20: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006b24: c2 20 80 12 st %g1, [ %g2 + %l2 ] information->inactive += information->allocation_size; 2006b28: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006b2c: 82 00 40 03 add %g1, %g3, %g1 2006b30: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006b34: 81 c7 e0 08 ret 2006b38: 81 e8 00 00 restore 02006be8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 2006be8: 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 ) 2006bec: 82 06 3f ff add %i0, -1, %g1 2006bf0: 80 a0 60 03 cmp %g1, 3 2006bf4: 38 80 00 1c bgu,a 2006c64 <_Objects_Get_information+0x7c> 2006bf8: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2006bfc: 10 80 00 1c b 2006c6c <_Objects_Get_information+0x84> 2006c00: 80 a6 60 00 cmp %i1, 0 return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 2006c04: 40 00 13 d5 call 200bb58 <_Objects_API_maximum_class> 2006c08: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 2006c0c: 80 a2 20 00 cmp %o0, 0 2006c10: 06 80 00 14 bl 2006c60 <_Objects_Get_information+0x78> 2006c14: 80 a6 40 08 cmp %i1, %o0 2006c18: 38 80 00 13 bgu,a 2006c64 <_Objects_Get_information+0x7c> 2006c1c: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 2006c20: 85 2e 20 02 sll %i0, 2, %g2 2006c24: 03 00 80 5d sethi %hi(0x2017400), %g1 2006c28: 82 10 62 50 or %g1, 0x250, %g1 ! 2017650 <_Objects_Information_table> 2006c2c: c4 00 40 02 ld [ %g1 + %g2 ], %g2 2006c30: 80 a0 a0 00 cmp %g2, 0 2006c34: 02 80 00 0c be 2006c64 <_Objects_Get_information+0x7c> 2006c38: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2006c3c: 83 2e 60 02 sll %i1, 2, %g1 2006c40: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 2006c44: 80 a6 20 00 cmp %i0, 0 2006c48: 02 80 00 07 be 2006c64 <_Objects_Get_information+0x7c> 2006c4c: 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 ) 2006c50: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006c54: 80 a0 60 00 cmp %g1, 0 2006c58: 12 80 00 03 bne 2006c64 <_Objects_Get_information+0x7c> 2006c5c: 01 00 00 00 nop 2006c60: b0 10 20 00 clr %i0 ! 0 return NULL; #endif return info; } 2006c64: 81 c7 e0 08 ret 2006c68: 81 e8 00 00 restore int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2006c6c: 22 bf ff fe be,a 2006c64 <_Objects_Get_information+0x7c> 2006c70: b0 10 20 00 clr %i0 2006c74: 30 bf ff e4 b,a 2006c04 <_Objects_Get_information+0x1c> 02015a5c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 2015a5c: 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) 2015a60: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2015a64: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 2015a68: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 2015a6c: 22 80 00 02 be,a 2015a74 <_Objects_Get_next+0x18> <== NOT EXECUTED 2015a70: 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) 2015a74: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2015a78: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 2015a7c: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 2015a80: 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); 2015a84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2015a88: 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) 2015a8c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2015a90: 08 80 00 08 bleu 2015ab0 <_Objects_Get_next+0x54> <== NOT EXECUTED 2015a94: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 2015a98: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2015a9c: 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; 2015aa0: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2015aa4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 2015aa8: 10 80 00 09 b 2015acc <_Objects_Get_next+0x70> <== NOT EXECUTED 2015aac: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2015ab0: 7f ff d7 a2 call 200b938 <_Objects_Get> <== NOT EXECUTED 2015ab4: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 2015ab8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2015abc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2015ac0: 32 bf ff f0 bne,a 2015a80 <_Objects_Get_next+0x24> <== NOT EXECUTED 2015ac4: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 2015ac8: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2015acc: 81 c7 e0 08 ret <== NOT EXECUTED 2015ad0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02008148 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008148: 9d e3 bf 90 save %sp, -112, %sp 200814c: 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 ) 2008150: 80 a6 60 00 cmp %i1, 0 2008154: 02 80 00 22 be 20081dc <_Objects_Id_to_name+0x94> 2008158: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 200815c: 80 a2 60 00 cmp %o1, 0 2008160: 12 80 00 06 bne 2008178 <_Objects_Id_to_name+0x30> 2008164: 83 32 60 18 srl %o1, 0x18, %g1 2008168: 03 00 80 6f sethi %hi(0x201bc00), %g1 200816c: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201be94 <_Thread_Executing> 2008170: d2 00 60 08 ld [ %g1 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 2008174: 83 32 60 18 srl %o1, 0x18, %g1 2008178: 84 08 60 07 and %g1, 7, %g2 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 200817c: 82 00 bf ff add %g2, -1, %g1 2008180: 80 a0 60 03 cmp %g1, 3 2008184: 38 80 00 16 bgu,a 20081dc <_Objects_Id_to_name+0x94> 2008188: 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 ] ) 200818c: 10 80 00 18 b 20081ec <_Objects_Id_to_name+0xa4> 2008190: 85 28 a0 02 sll %g2, 2, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 2008194: 83 28 60 02 sll %g1, 2, %g1 2008198: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 200819c: 80 a2 20 00 cmp %o0, 0 20081a0: 02 80 00 0f be 20081dc <_Objects_Id_to_name+0x94> 20081a4: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 20081a8: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 20081ac: 80 a0 60 00 cmp %g1, 0 20081b0: 12 80 00 0d bne 20081e4 <_Objects_Id_to_name+0x9c> 20081b4: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 20081b8: 7f ff ff c7 call 20080d4 <_Objects_Get> 20081bc: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 20081c0: 80 a2 20 00 cmp %o0, 0 20081c4: 22 80 00 06 be,a 20081dc <_Objects_Id_to_name+0x94> 20081c8: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 20081cc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 20081d0: b0 10 20 00 clr %i0 20081d4: 40 00 02 5f call 2008b50 <_Thread_Enable_dispatch> 20081d8: c2 26 40 00 st %g1, [ %i1 ] 20081dc: 81 c7 e0 08 ret 20081e0: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 20081e4: 81 c7 e0 08 ret <== NOT EXECUTED 20081e8: 81 e8 00 00 restore <== NOT EXECUTED the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 20081ec: 03 00 80 6f sethi %hi(0x201bc00), %g1 20081f0: 82 10 61 30 or %g1, 0x130, %g1 ! 201bd30 <_Objects_Information_table> 20081f4: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20081f8: 80 a0 a0 00 cmp %g2, 0 20081fc: 12 bf ff e6 bne 2008194 <_Objects_Id_to_name+0x4c> 2008200: 83 32 60 1b srl %o1, 0x1b, %g1 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008204: 81 c7 e0 08 ret <== NOT EXECUTED 2008208: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 0201282c <_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 ) { 201282c: 9d e3 bf 98 save %sp, -104, %sp 2012830: a6 10 00 18 mov %i0, %l3 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 2012834: 80 a6 a0 00 cmp %i2, 0 2012838: 02 80 00 22 be 20128c0 <_Objects_Name_to_id_string+0x94> 201283c: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 2012840: 80 a6 60 00 cmp %i1, 0 2012844: 22 80 00 1f be,a 20128c0 <_Objects_Name_to_id_string+0x94> 2012848: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 201284c: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1 2012850: a4 90 60 00 orcc %g1, 0, %l2 2012854: 12 80 00 17 bne 20128b0 <_Objects_Name_to_id_string+0x84> 2012858: a2 10 20 01 mov 1, %l1 name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 201285c: 81 c7 e0 08 ret <== NOT EXECUTED 2012860: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED the_object = information->local_table[ index ]; 2012864: c2 04 e0 1c ld [ %l3 + 0x1c ], %g1 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2012868: a2 04 60 01 inc %l1 the_object = information->local_table[ index ]; 201286c: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_object ) 2012870: 80 a4 20 00 cmp %l0, 0 2012874: 02 80 00 0f be 20128b0 <_Objects_Name_to_id_string+0x84> 2012878: 90 10 00 19 mov %i1, %o0 continue; if ( !the_object->name.name_p ) 201287c: d2 04 20 0c ld [ %l0 + 0xc ], %o1 2012880: 80 a2 60 00 cmp %o1, 0 2012884: 02 80 00 0c be 20128b4 <_Objects_Name_to_id_string+0x88> 2012888: 80 a4 40 12 cmp %l1, %l2 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 201288c: 40 00 0c 8f call 2015ac8 2012890: d4 14 e0 3a lduh [ %l3 + 0x3a ], %o2 2012894: 80 a2 20 00 cmp %o0, 0 2012898: 32 80 00 07 bne,a 20128b4 <_Objects_Name_to_id_string+0x88> 201289c: 80 a4 40 12 cmp %l1, %l2 *id = the_object->id; 20128a0: c2 04 20 08 ld [ %l0 + 8 ], %g1 20128a4: c2 26 80 00 st %g1, [ %i2 ] 20128a8: 81 c7 e0 08 ret 20128ac: 91 e8 20 00 restore %g0, 0, %o0 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 20128b0: 80 a4 40 12 cmp %l1, %l2 20128b4: 08 bf ff ec bleu 2012864 <_Objects_Name_to_id_string+0x38> 20128b8: 85 2c 60 02 sll %l1, 2, %g2 20128bc: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 20128c0: 81 c7 e0 08 ret 20128c4: 81 e8 00 00 restore 02006e6c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 2006e6c: 9a 10 00 08 mov %o0, %o5 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 2006e70: 80 a2 e0 00 cmp %o3, 0 2006e74: 02 80 00 29 be 2006f18 <_Objects_Name_to_id_u32+0xac> 2006e78: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 2006e7c: 80 a2 60 00 cmp %o1, 0 2006e80: 22 80 00 26 be,a 2006f18 <_Objects_Name_to_id_u32+0xac> 2006e84: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2006e88: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1 2006e8c: 84 90 60 00 orcc %g1, 0, %g2 2006e90: 22 80 00 22 be,a 2006f18 <_Objects_Name_to_id_u32+0xac> 2006e94: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2006e98: 80 a2 a0 00 cmp %o2, 0 2006e9c: 02 80 00 19 be 2006f00 <_Objects_Name_to_id_u32+0x94> 2006ea0: 83 28 a0 10 sll %g2, 0x10, %g1 2006ea4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 2006ea8: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 2006eac: 80 a2 80 01 cmp %o2, %g1 2006eb0: 02 80 00 13 be 2006efc <_Objects_Name_to_id_u32+0x90> 2006eb4: 80 a2 a0 01 cmp %o2, 1 2006eb8: 32 80 00 18 bne,a 2006f18 <_Objects_Name_to_id_u32+0xac> 2006ebc: 90 10 20 01 mov 1, %o0 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2006ec0: 10 80 00 10 b 2006f00 <_Objects_Name_to_id_u32+0x94> 2006ec4: 83 28 a0 10 sll %g2, 0x10, %g1 the_object = information->local_table[ index ]; 2006ec8: c2 03 60 1c ld [ %o5 + 0x1c ], %g1 2006ecc: c4 00 40 02 ld [ %g1 + %g2 ], %g2 if ( !the_object ) 2006ed0: 80 a0 a0 00 cmp %g2, 0 2006ed4: 02 80 00 0d be 2006f08 <_Objects_Name_to_id_u32+0x9c> 2006ed8: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 2006edc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2006ee0: 80 a2 40 01 cmp %o1, %g1 2006ee4: 32 80 00 0a bne,a 2006f0c <_Objects_Name_to_id_u32+0xa0> 2006ee8: 80 a0 c0 04 cmp %g3, %g4 *id = the_object->id; 2006eec: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2006ef0: 90 10 20 00 clr %o0 2006ef4: 81 c3 e0 08 retl 2006ef8: c2 22 c0 00 st %g1, [ %o3 ] search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2006efc: 83 28 a0 10 sll %g2, 0x10, %g1 2006f00: 86 10 20 01 mov 1, %g3 2006f04: 89 30 60 10 srl %g1, 0x10, %g4 2006f08: 80 a0 c0 04 cmp %g3, %g4 2006f0c: 08 bf ff ef bleu 2006ec8 <_Objects_Name_to_id_u32+0x5c> 2006f10: 85 28 e0 02 sll %g3, 2, %g2 2006f14: 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 } 2006f18: 81 c3 e0 08 retl 2006f1c: 01 00 00 00 nop 02006f28 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2006f28: 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; 2006f2c: 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; 2006f30: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2006f34: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2006f38: 03 00 00 3f sethi %hi(0xfc00), %g1 2006f3c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006f40: 92 10 00 10 mov %l0, %o1 2006f44: a2 08 80 01 and %g2, %g1, %l1 2006f48: 40 00 32 ec call 2013af8 <.udiv> 2006f4c: 90 22 00 11 sub %o0, %l1, %o0 2006f50: 10 80 00 2e b 2007008 <_Objects_Shrink_information+0xe0> 2006f54: 84 10 20 00 clr %g2 for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 2006f58: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2006f5c: c2 00 40 12 ld [ %g1 + %l2 ], %g1 2006f60: 80 a0 40 10 cmp %g1, %l0 2006f64: 12 80 00 28 bne 2007004 <_Objects_Shrink_information+0xdc> 2006f68: 84 00 a0 01 inc %g2 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 2006f6c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2006f70: 03 00 00 3f sethi %hi(0xfc00), %g1 2006f74: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 2006f78: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006f7c: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 2006f80: 80 a0 80 11 cmp %g2, %l1 2006f84: 2a 80 00 0c bcs,a 2006fb4 <_Objects_Shrink_information+0x8c> 2006f88: e0 04 00 00 ld [ %l0 ], %l0 2006f8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006f90: 82 04 40 01 add %l1, %g1, %g1 2006f94: 80 a0 80 01 cmp %g2, %g1 2006f98: 1a 80 00 06 bcc 2006fb0 <_Objects_Shrink_information+0x88> 2006f9c: 90 10 00 10 mov %l0, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 2006fa0: 40 00 11 bb call 200b68c <_Chain_Extract> 2006fa4: e0 04 00 00 ld [ %l0 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2006fa8: 10 80 00 04 b 2006fb8 <_Objects_Shrink_information+0x90> 2006fac: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 2006fb0: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2006fb4: 80 a4 20 00 cmp %l0, 0 2006fb8: 22 80 00 07 be,a 2006fd4 <_Objects_Shrink_information+0xac> 2006fbc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2006fc0: c2 04 00 00 ld [ %l0 ], %g1 2006fc4: 80 a0 60 00 cmp %g1, 0 2006fc8: 32 bf ff ed bne,a 2006f7c <_Objects_Shrink_information+0x54> 2006fcc: c2 04 20 08 ld [ %l0 + 8 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2006fd0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006fd4: 40 00 06 d9 call 2008b38 <_Workspace_Free> 2006fd8: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2006fdc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 2006fe0: 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; 2006fe4: c0 20 80 12 clr [ %g2 + %l2 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2006fe8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2006fec: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2006ff0: c0 20 80 12 clr [ %g2 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2006ff4: 82 20 40 03 sub %g1, %g3, %g1 2006ff8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006ffc: 81 c7 e0 08 ret 2007000: 81 e8 00 00 restore return; } index_base += information->allocation_size; 2007004: a2 04 40 10 add %l1, %l0, %l1 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2007008: 80 a0 80 08 cmp %g2, %o0 200700c: 0a bf ff d3 bcs 2006f58 <_Objects_Shrink_information+0x30> 2007010: a5 28 a0 02 sll %g2, 2, %l2 2007014: 81 c7 e0 08 ret 2007018: 81 e8 00 00 restore 02005c38 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 2005c38: 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; 2005c3c: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 2005c40: 80 a6 20 00 cmp %i0, 0 2005c44: 32 80 00 05 bne,a 2005c58 <_POSIX_API_Initialize+0x20> 2005c48: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 2005c4c: 03 00 80 56 sethi %hi(0x2015800), %g1 <== NOT EXECUTED 2005c50: b0 10 63 30 or %g1, 0x330, %i0 ! 2015b30 <_POSIX_Default_configuration> <== NOT EXECUTED api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 2005c54: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 <== NOT EXECUTED api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 2005c58: 05 00 80 5d sethi %hi(0x2017400), %g2 2005c5c: 03 00 80 5e sethi %hi(0x2017800), %g1 2005c60: 82 10 63 c4 or %g1, 0x3c4, %g1 ! 2017bc4 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 2005c64: 40 00 13 fa call 200ac4c <_POSIX_signals_Manager_Initialization> 2005c68: c2 20 a2 5c st %g1, [ %g2 + 0x25c ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 2005c6c: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 2005c70: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 2005c74: 40 00 14 77 call 200ae50 <_POSIX_Threads_Manager_initialization> 2005c78: 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( 2005c7c: 40 00 13 9d call 200aaf0 <_POSIX_Condition_variables_Manager_initialization> 2005c80: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 2005c84: 40 00 13 a8 call 200ab24 <_POSIX_Key_Manager_initialization> 2005c88: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 2005c8c: 40 00 13 c9 call 200abb0 <_POSIX_Mutex_Manager_initialization> 2005c90: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 2005c94: 40 00 13 b1 call 200ab58 <_POSIX_Message_queue_Manager_initialization> 2005c98: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 2005c9c: 40 00 15 28 call 200b13c <_POSIX_Semaphore_Manager_initialization> 2005ca0: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 2005ca4: 40 00 15 19 call 200b108 <_POSIX_Timer_Manager_initialization> 2005ca8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 2005cac: 40 00 13 ce call 200abe4 <_POSIX_Barrier_Manager_initialization> 2005cb0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 2005cb4: 40 00 13 d9 call 200ac18 <_POSIX_RWLock_Manager_initialization> 2005cb8: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 2005cbc: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 2005cc0: 40 00 14 4d call 200adf4 <_POSIX_Spinlock_Manager_initialization> 2005cc4: 81 e8 00 00 restore 2005cc8: 01 00 00 00 nop 02005e48 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 2005e48: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 2005e4c: 80 a6 20 00 cmp %i0, 0 2005e50: 02 80 00 0c be 2005e80 <_POSIX_Condition_variables_Get+0x38> 2005e54: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 2005e58: c2 06 00 00 ld [ %i0 ], %g1 2005e5c: 80 a0 7f ff cmp %g1, -1 2005e60: 32 80 00 0c bne,a 2005e90 <_POSIX_Condition_variables_Get+0x48> 2005e64: f2 06 00 00 ld [ %i0 ], %i1 /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 2005e68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2005e6c: 40 00 00 0d call 2005ea0 <== NOT EXECUTED 2005e70: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 2005e74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2005e78: 22 80 00 06 be,a 2005e90 <_POSIX_Condition_variables_Get+0x48> <== NOT EXECUTED 2005e7c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED *location = OBJECTS_ERROR; 2005e80: 82 10 20 01 mov 1, %g1 2005e84: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 2005e88: 81 c7 e0 08 ret 2005e8c: 91 e8 20 00 restore %g0, 0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 2005e90: 31 00 80 5b sethi %hi(0x2016c00), %i0 2005e94: 40 00 0b c2 call 2008d9c <_Objects_Get> 2005e98: 91 ee 21 84 restore %i0, 0x184, %o0 2005e9c: 01 00 00 00 nop 02006044 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 2006044: 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 ) ) { 2006048: a0 07 bf f4 add %fp, -12, %l0 200604c: 90 10 00 19 mov %i1, %o0 2006050: 40 00 00 7d call 2006244 <_POSIX_Mutex_Get> 2006054: 92 10 00 10 mov %l0, %o1 2006058: 80 a2 20 00 cmp %o0, 0 200605c: 22 80 00 18 be,a 20060bc <_POSIX_Condition_variables_Wait_support+0x78> 2006060: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2006064: 03 00 80 5a sethi %hi(0x2016800), %g1 2006068: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 20168f0 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 200606c: 92 10 00 10 mov %l0, %o1 2006070: 84 00 bf ff add %g2, -1, %g2 2006074: 90 10 00 18 mov %i0, %o0 2006078: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] 200607c: 7f ff ff 73 call 2005e48 <_POSIX_Condition_variables_Get> 2006080: 01 00 00 00 nop switch ( location ) { 2006084: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006088: 80 a0 60 00 cmp %g1, 0 200608c: 12 80 00 33 bne 2006158 <_POSIX_Condition_variables_Wait_support+0x114> 2006090: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 2006094: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 2006098: 80 a0 a0 00 cmp %g2, 0 200609c: 02 80 00 0a be 20060c4 <_POSIX_Condition_variables_Wait_support+0x80> 20060a0: 01 00 00 00 nop 20060a4: c2 06 40 00 ld [ %i1 ], %g1 20060a8: 80 a0 80 01 cmp %g2, %g1 20060ac: 02 80 00 06 be 20060c4 <_POSIX_Condition_variables_Wait_support+0x80> 20060b0: 01 00 00 00 nop _Thread_Enable_dispatch(); 20060b4: 40 00 0d 7b call 20096a0 <_Thread_Enable_dispatch> <== NOT EXECUTED 20060b8: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 20060bc: 81 c7 e0 08 ret 20060c0: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 20060c4: 40 00 00 f0 call 2006484 20060c8: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 20060cc: 80 8e e0 ff btst 0xff, %i3 20060d0: 12 80 00 1b bne 200613c <_POSIX_Condition_variables_Wait_support+0xf8> 20060d4: 21 00 80 5a sethi %hi(0x2016800), %l0 the_cond->Mutex = *mutex; 20060d8: c2 06 40 00 ld [ %i1 ], %g1 20060dc: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 20060e0: c2 04 21 b4 ld [ %l0 + 0x1b4 ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 20060e4: c6 06 00 00 ld [ %i0 ], %g3 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 20060e8: 84 04 60 18 add %l1, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 20060ec: c6 20 60 20 st %g3, [ %g1 + 0x20 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 20060f0: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 20060f4: 92 10 00 1a mov %i2, %o1 20060f8: 90 10 00 02 mov %g2, %o0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 20060fc: c0 20 60 34 clr [ %g1 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 2006100: 15 00 80 28 sethi %hi(0x200a000), %o2 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2006104: 82 10 20 01 mov 1, %g1 2006108: 94 12 a0 48 or %o2, 0x48, %o2 200610c: 40 00 0e bc call 2009bfc <_Thread_queue_Enqueue_with_handler> 2006110: c2 24 60 48 st %g1, [ %l1 + 0x48 ] _Thread_Enable_dispatch(); 2006114: 40 00 0d 63 call 20096a0 <_Thread_Enable_dispatch> 2006118: 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; 200611c: c2 04 21 b4 ld [ %l0 + 0x1b4 ], %g1 2006120: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 2006124: 80 a6 20 00 cmp %i0, 0 2006128: 02 80 00 07 be 2006144 <_POSIX_Condition_variables_Wait_support+0x100> 200612c: 80 a6 20 74 cmp %i0, 0x74 2006130: 12 80 00 0b bne 200615c <_POSIX_Condition_variables_Wait_support+0x118> 2006134: 01 00 00 00 nop 2006138: 30 80 00 03 b,a 2006144 <_POSIX_Condition_variables_Wait_support+0x100> return status; } else { _Thread_Enable_dispatch(); 200613c: 40 00 0d 59 call 20096a0 <_Thread_Enable_dispatch> 2006140: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 2006144: 40 00 00 af call 2006400 2006148: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 200614c: 80 a2 20 00 cmp %o0, 0 2006150: 02 80 00 03 be 200615c <_POSIX_Condition_variables_Wait_support+0x118> 2006154: 01 00 00 00 nop 2006158: b0 10 20 16 mov 0x16, %i0 ! 16 case OBJECTS_ERROR: break; } return EINVAL; } 200615c: 81 c7 e0 08 ret 2006160: 81 e8 00 00 restore 0200c6c8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200c6c8: 9d e3 bf 98 save %sp, -104, %sp uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 200c6cc: c2 06 20 08 ld [ %i0 + 8 ], %g1 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 ]; 200c6d0: 05 00 00 3f sethi %hi(0xfc00), %g2 200c6d4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 200c6d8: 84 08 40 02 and %g1, %g2, %g2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 200c6dc: 83 30 60 18 srl %g1, 0x18, %g1 200c6e0: 82 08 60 07 and %g1, 7, %g1 200c6e4: 82 00 60 06 add %g1, 6, %g1 200c6e8: a9 28 a0 02 sll %g2, 2, %l4 200c6ec: a7 28 60 02 sll %g1, 2, %l3 200c6f0: a4 10 20 00 clr %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200c6f4: 03 00 80 5e sethi %hi(0x2017800), %g1 200c6f8: aa 10 63 44 or %g1, 0x344, %l5 ! 2017b44 <_POSIX_Keys_Information> 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 ]; 200c6fc: a0 10 20 01 mov 1, %l0 200c700: 10 80 00 1b b 200c76c <_POSIX_Keys_Run_destructors+0xa4> 200c704: a2 10 20 01 mov 1, %l1 are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { the_key = (POSIX_Keys_Control *) 200c708: c2 05 60 1c ld [ %l5 + 0x1c ], %g1 200c70c: f0 00 40 02 ld [ %g1 + %g2 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 200c710: 80 a6 20 00 cmp %i0, 0 200c714: 02 80 00 16 be 200c76c <_POSIX_Keys_Run_destructors+0xa4> 200c718: a0 04 20 01 inc %l0 200c71c: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 200c720: 80 a0 60 00 cmp %g1, 0 200c724: 22 80 00 13 be,a 200c770 <_POSIX_Keys_Run_destructors+0xa8> 200c728: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED 200c72c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 200c730: 80 a0 a0 00 cmp %g2, 0 200c734: 22 80 00 0f be,a 200c770 <_POSIX_Keys_Run_destructors+0xa8> 200c738: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 200c73c: c2 06 00 13 ld [ %i0 + %l3 ], %g1 200c740: c2 00 40 14 ld [ %g1 + %l4 ], %g1 if ( value ) { 200c744: 90 90 60 00 orcc %g1, 0, %o0 200c748: 22 80 00 0a be,a 200c770 <_POSIX_Keys_Run_destructors+0xa8> 200c74c: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 200c750: 9f c0 80 00 call %g2 200c754: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 200c758: c2 06 00 13 ld [ %i0 + %l3 ], %g1 200c75c: c2 00 40 14 ld [ %g1 + %l4 ], %g1 200c760: 80 a0 00 01 cmp %g0, %g1 200c764: 82 40 3f ff addx %g0, -1, %g1 200c768: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200c76c: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 200c770: 80 a4 00 01 cmp %l0, %g1 200c774: 08 bf ff e5 bleu 200c708 <_POSIX_Keys_Run_destructors+0x40> 200c778: 85 2c 20 02 sll %l0, 2, %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 200c77c: 80 8c 60 ff btst 0xff, %l1 200c780: 12 80 00 05 bne 200c794 <_POSIX_Keys_Run_destructors+0xcc> 200c784: a4 04 a0 01 inc %l2 * 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 ) 200c788: 80 a4 a0 04 cmp %l2, 4 200c78c: 12 bf ff dd bne 200c700 <_POSIX_Keys_Run_destructors+0x38> 200c790: a0 10 20 01 mov 1, %l0 200c794: 81 c7 e0 08 ret 200c798: 81 e8 00 00 restore 020114c0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20114c0: 9d e3 bf 88 save %sp, -120, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 20114c4: 92 10 20 ff mov 0xff, %o1 20114c8: 40 00 12 10 call 2015d08 20114cc: 90 10 00 18 mov %i0, %o0 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20114d0: a8 10 00 18 mov %i0, %l4 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 20114d4: a6 10 00 08 mov %o0, %l3 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20114d8: 92 10 00 1a mov %i2, %o1 struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); if ( n > NAME_MAX ) 20114dc: 80 a2 20 ff cmp %o0, 0xff 20114e0: 18 80 00 5d bgu 2011654 <_POSIX_Message_queue_Create_support+0x194> 20114e4: b0 10 20 5b mov 0x5b, %i0 20114e8: 05 00 80 89 sethi %hi(0x2022400), %g2 20114ec: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 2022580 <_Thread_Dispatch_disable_level> 20114f0: 82 00 60 01 inc %g1 20114f4: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * 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 ) { 20114f8: a4 10 20 10 mov 0x10, %l2 20114fc: 80 a6 a0 00 cmp %i2, 0 2011500: 02 80 00 14 be 2011550 <_POSIX_Message_queue_Create_support+0x90> 2011504: a2 10 20 0a mov 0xa, %l1 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 2011508: c2 06 a0 04 ld [ %i2 + 4 ], %g1 201150c: 80 a0 60 00 cmp %g1, 0 2011510: 04 80 00 06 ble 2011528 <_POSIX_Message_queue_Create_support+0x68> 2011514: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 2011518: c2 06 a0 08 ld [ %i2 + 8 ], %g1 201151c: 80 a0 60 00 cmp %g1, 0 2011520: 34 80 00 08 bg,a 2011540 <_POSIX_Message_queue_Create_support+0x80> 2011524: 90 07 bf e8 add %fp, -24, %o0 _Thread_Enable_dispatch(); 2011528: 7f ff f2 37 call 200de04 <_Thread_Enable_dispatch> 201152c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 2011530: 40 00 0a 57 call 2013e8c <__errno> 2011534: 01 00 00 00 nop 2011538: 10 80 00 39 b 201161c <_POSIX_Message_queue_Create_support+0x15c> 201153c: 82 10 20 16 mov 0x16, %g1 ! 16 } attr = *attr_ptr; 2011540: 40 00 0c 64 call 20146d0 2011544: 94 10 20 10 mov 0x10, %o2 2011548: e4 07 bf f0 ld [ %fp + -16 ], %l2 201154c: e2 07 bf ec ld [ %fp + -20 ], %l1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 2011550: 21 00 80 8a sethi %hi(0x2022800), %l0 2011554: 7f ff ee 65 call 200cee8 <_Objects_Allocate> 2011558: 90 14 21 10 or %l0, 0x110, %o0 ! 2022910 <_POSIX_Message_queue_Information> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 201155c: b4 92 20 00 orcc %o0, 0, %i2 2011560: 32 80 00 08 bne,a 2011580 <_POSIX_Message_queue_Create_support+0xc0> 2011564: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); 2011568: 7f ff f2 27 call 200de04 <_Thread_Enable_dispatch> <== NOT EXECUTED 201156c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 2011570: 40 00 0a 47 call 2013e8c <__errno> <== NOT EXECUTED 2011574: 01 00 00 00 nop <== NOT EXECUTED 2011578: 10 80 00 29 b 201161c <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 201157c: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED } the_mq->process_shared = pshared; 2011580: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 2011584: 90 10 00 13 mov %l3, %o0 } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 2011588: c2 2e a0 15 stb %g1, [ %i2 + 0x15 ] rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; 201158c: c2 26 a0 18 st %g1, [ %i2 + 0x18 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 2011590: 7f ff f7 96 call 200f3e8 <_Workspace_Allocate> 2011594: c2 2e a0 14 stb %g1, [ %i2 + 0x14 ] if (!name) { 2011598: b2 92 20 00 orcc %o0, 0, %i1 201159c: 12 80 00 0b bne 20115c8 <_POSIX_Message_queue_Create_support+0x108> 20115a0: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 20115a4: 90 14 21 10 or %l0, 0x110, %o0 <== NOT EXECUTED 20115a8: 7f ff ef 3d call 200d29c <_Objects_Free> <== NOT EXECUTED 20115ac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 20115b0: 7f ff f2 15 call 200de04 <_Thread_Enable_dispatch> <== NOT EXECUTED 20115b4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20115b8: 40 00 0a 35 call 2013e8c <__errno> <== NOT EXECUTED 20115bc: 01 00 00 00 nop <== NOT EXECUTED 20115c0: 10 80 00 17 b 201161c <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 20115c4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED } strcpy( name, name_arg ); 20115c8: 40 00 0f 65 call 201535c 20115cc: 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( 20115d0: 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; 20115d4: c0 26 a0 5c clr [ %i2 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 20115d8: 96 10 00 12 mov %l2, %o3 20115dc: 90 06 a0 1c add %i2, 0x1c, %o0 20115e0: 40 00 03 2a call 2012288 <_CORE_message_queue_Initialize> 20115e4: 92 06 a0 5c add %i2, 0x5c, %o1 20115e8: 80 8a 20 ff btst 0xff, %o0 20115ec: 12 80 00 0f bne 2011628 <_POSIX_Message_queue_Create_support+0x168> 20115f0: 82 14 21 10 or %l0, 0x110, %g1 20115f4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20115f8: 7f ff ef 29 call 200d29c <_Objects_Free> <== NOT EXECUTED 20115fc: 90 14 21 10 or %l0, 0x110, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 2011600: 7f ff f7 73 call 200f3cc <_Workspace_Free> <== NOT EXECUTED 2011604: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 2011608: 7f ff f1 ff call 200de04 <_Thread_Enable_dispatch> <== NOT EXECUTED 201160c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 2011610: 40 00 0a 1f call 2013e8c <__errno> <== NOT EXECUTED 2011614: 01 00 00 00 nop <== NOT EXECUTED 2011618: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 201161c: c2 22 00 00 st %g1, [ %o0 ] 2011620: 81 c7 e0 08 ret 2011624: 91 e8 3f ff restore %g0, -1, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2011628: c4 06 a0 08 ld [ %i2 + 8 ], %g2 201162c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2011630: 03 00 00 3f sethi %hi(0xfc00), %g1 2011634: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2011638: 84 08 80 01 and %g2, %g1, %g2 201163c: 85 28 a0 02 sll %g2, 2, %g2 2011640: f4 20 c0 02 st %i2, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 2011644: f2 26 a0 0c st %i1, [ %i2 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 2011648: f4 26 c0 00 st %i2, [ %i3 ] _Thread_Enable_dispatch(); 201164c: 7f ff f1 ee call 200de04 <_Thread_Enable_dispatch> 2011650: b0 10 20 00 clr %i0 return 0; } 2011654: 81 c7 e0 08 ret 2011658: 81 e8 00 00 restore 02009bac <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 2009bac: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 2009bb0: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 2009bb4: 80 a0 60 00 cmp %g1, 0 2009bb8: 12 80 00 16 bne 2009c10 <_POSIX_Message_queue_Delete+0x64> 2009bbc: b2 10 00 18 mov %i0, %i1 2009bc0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2009bc4: 80 a0 60 00 cmp %g1, 0 2009bc8: 12 80 00 12 bne 2009c10 <_POSIX_Message_queue_Delete+0x64> 2009bcc: 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 ) 2009bd0: d0 06 20 0c ld [ %i0 + 0xc ], %o0 2009bd4: 80 a2 20 00 cmp %o0, 0 2009bd8: 02 80 00 04 be 2009be8 <_POSIX_Message_queue_Delete+0x3c> 2009bdc: 31 00 80 8a sethi %hi(0x2022800), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 2009be0: 40 00 15 fb call 200f3cc <_Workspace_Free> <== NOT EXECUTED 2009be4: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 2009be8: 92 10 00 19 mov %i1, %o1 2009bec: 40 00 0c e9 call 200cf90 <_Objects_Close> 2009bf0: 90 16 21 10 or %i0, 0x110, %o0 _CORE_message_queue_Close( 2009bf4: 90 06 60 1c add %i1, 0x1c, %o0 2009bf8: 92 10 20 00 clr %o1 2009bfc: 94 10 20 05 mov 5, %o2 2009c00: 40 00 09 eb call 200c3ac <_CORE_message_queue_Close> 2009c04: b0 16 21 10 or %i0, 0x110, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 2009c08: 40 00 0d a5 call 200d29c <_Objects_Free> 2009c0c: 81 e8 00 00 restore 2009c10: 81 c7 e0 08 ret 2009c14: 81 e8 00 00 restore 02006f98 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 2006f98: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 2006f9c: 80 a6 20 00 cmp %i0, 0 2006fa0: 02 80 00 0c be 2006fd0 <_POSIX_Mutex_Get+0x38> 2006fa4: b4 10 00 19 mov %i1, %i2 2006fa8: c2 06 00 00 ld [ %i0 ], %g1 2006fac: 80 a0 7f ff cmp %g1, -1 2006fb0: 32 80 00 0c bne,a 2006fe0 <_POSIX_Mutex_Get+0x48> 2006fb4: f2 06 00 00 ld [ %i0 ], %i1 2006fb8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006fbc: 40 00 00 20 call 200703c <== NOT EXECUTED 2006fc0: 92 10 20 00 clr %o1 <== NOT EXECUTED 2006fc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2006fc8: 22 80 00 06 be,a 2006fe0 <_POSIX_Mutex_Get+0x48> <== NOT EXECUTED 2006fcc: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 2006fd0: 82 10 20 01 mov 1, %g1 2006fd4: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 2006fd8: 81 c7 e0 08 ret 2006fdc: 91 e8 20 00 restore %g0, 0, %o0 { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 2006fe0: 31 00 80 63 sethi %hi(0x2018c00), %i0 2006fe4: 40 00 0b 9b call 2009e50 <_Objects_Get> 2006fe8: 91 ee 20 d0 restore %i0, 0xd0, %o0 2006fec: 01 00 00 00 nop 02006f38 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 2006f38: 9d e3 bf 98 save %sp, -104, %sp 2006f3c: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 2006f40: 80 a6 20 00 cmp %i0, 0 2006f44: 02 80 00 0c be 2006f74 <_POSIX_Mutex_Get_interrupt_disable+0x3c> 2006f48: b6 10 00 1a mov %i2, %i3 2006f4c: c2 06 00 00 ld [ %i0 ], %g1 2006f50: 80 a0 7f ff cmp %g1, -1 2006f54: 32 80 00 0c bne,a 2006f84 <_POSIX_Mutex_Get_interrupt_disable+0x4c> 2006f58: f2 06 00 00 ld [ %i0 ], %i1 2006f5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006f60: 40 00 00 37 call 200703c <== NOT EXECUTED 2006f64: 92 10 20 00 clr %o1 <== NOT EXECUTED 2006f68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2006f6c: 22 80 00 06 be,a 2006f84 <_POSIX_Mutex_Get_interrupt_disable+0x4c> <== NOT EXECUTED 2006f70: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 2006f74: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2006f78: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 2006f7c: 81 c7 e0 08 ret <== NOT EXECUTED 2006f80: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 2006f84: b4 10 00 10 mov %l0, %i2 2006f88: 31 00 80 63 sethi %hi(0x2018c00), %i0 2006f8c: 40 00 0b 93 call 2009dd8 <_Objects_Get_isr_disable> 2006f90: 91 ee 20 d0 restore %i0, 0xd0, %o0 2006f94: 01 00 00 00 nop 0200e83c <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 200e83c: 9d e3 bf 98 save %sp, -104, %sp 200e840: 03 00 80 77 sethi %hi(0x201dc00), %g1 200e844: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201df00 <_Thread_Dispatch_disable_level> 200e848: 84 00 a0 01 inc %g2 200e84c: c4 20 63 00 st %g2, [ %g1 + 0x300 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 200e850: 80 a6 60 00 cmp %i1, 0 200e854: 02 80 00 08 be 200e874 <_POSIX_Semaphore_Create_support+0x38> 200e858: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 200e85c: 7f ff f0 56 call 200a9b4 <_Thread_Enable_dispatch> 200e860: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 200e864: 40 00 08 98 call 2010ac4 <__errno> 200e868: 01 00 00 00 nop 200e86c: 10 80 00 19 b 200e8d0 <_POSIX_Semaphore_Create_support+0x94> 200e870: 82 10 20 58 mov 0x58, %g1 ! 58 } if ( name ) { 200e874: 02 80 00 0d be 200e8a8 <_POSIX_Semaphore_Create_support+0x6c> 200e878: 11 00 80 78 sethi %hi(0x201e000), %o0 if( strlen(name) > PATH_MAX ) { 200e87c: 40 00 0f 5c call 20125ec 200e880: 90 10 00 18 mov %i0, %o0 200e884: 80 a2 20 ff cmp %o0, 0xff 200e888: 28 80 00 08 bleu,a 200e8a8 <_POSIX_Semaphore_Create_support+0x6c> 200e88c: 11 00 80 78 sethi %hi(0x201e000), %o0 _Thread_Enable_dispatch(); 200e890: 7f ff f0 49 call 200a9b4 <_Thread_Enable_dispatch> <== NOT EXECUTED 200e894: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200e898: 40 00 08 8b call 2010ac4 <__errno> <== NOT EXECUTED 200e89c: 01 00 00 00 nop <== NOT EXECUTED 200e8a0: 10 80 00 0c b 200e8d0 <_POSIX_Semaphore_Create_support+0x94> <== NOT EXECUTED 200e8a4: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 200e8a8: 7f ff ec a8 call 2009b48 <_Objects_Allocate> 200e8ac: 90 12 22 10 or %o0, 0x210, %o0 } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 200e8b0: b2 92 20 00 orcc %o0, 0, %i1 200e8b4: 12 80 00 0a bne 200e8dc <_POSIX_Semaphore_Create_support+0xa0> 200e8b8: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 200e8bc: 7f ff f0 3e call 200a9b4 <_Thread_Enable_dispatch> 200e8c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); 200e8c4: 40 00 08 80 call 2010ac4 <__errno> 200e8c8: 01 00 00 00 nop 200e8cc: 82 10 20 1c mov 0x1c, %g1 ! 1c 200e8d0: c2 22 00 00 st %g1, [ %o0 ] 200e8d4: 81 c7 e0 08 ret 200e8d8: 91 e8 3f ff restore %g0, -1, %o0 } the_semaphore->process_shared = pshared; if ( name ) { 200e8dc: 02 80 00 07 be 200e8f8 <_POSIX_Semaphore_Create_support+0xbc> 200e8e0: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200e8e4: 82 10 20 01 mov 1, %g1 the_semaphore->linked = TRUE; 200e8e8: c2 2e 60 15 stb %g1, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200e8ec: c2 26 60 18 st %g1, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 200e8f0: 10 80 00 05 b 200e904 <_POSIX_Semaphore_Create_support+0xc8> 200e8f4: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 200e8f8: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 200e8fc: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 200e900: c0 2e 60 15 clrb [ %i1 + 0x15 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200e904: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200e908: 94 10 00 1a mov %i2, %o2 200e90c: 90 06 60 1c add %i1, 0x1c, %o0 200e910: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200e914: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200e918: 7f ff eb 64 call 20096a8 <_CORE_semaphore_Initialize> 200e91c: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200e920: c4 06 60 08 ld [ %i1 + 8 ], %g2 200e924: 03 00 80 78 sethi %hi(0x201e000), %g1 200e928: c6 00 62 2c ld [ %g1 + 0x22c ], %g3 ! 201e22c <_POSIX_Semaphore_Information+0x1c> 200e92c: 03 00 00 3f sethi %hi(0xfc00), %g1 200e930: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200e934: 84 08 80 01 and %g2, %g1, %g2 200e938: 85 28 a0 02 sll %g2, 2, %g2 200e93c: 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; 200e940: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 200e944: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 200e948: 7f ff f0 1b call 200a9b4 <_Thread_Enable_dispatch> 200e94c: b0 10 20 00 clr %i0 return 0; } 200e950: 81 c7 e0 08 ret 200e954: 81 e8 00 00 restore 0200af38 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) { 200af38: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 200af3c: 90 10 20 e4 mov 0xe4, %o0 200af40: 7f ff f7 05 call 2008b54 <_Workspace_Allocate> 200af44: b0 10 20 00 clr %i0 if ( !api ) 200af48: a2 92 20 00 orcc %o0, 0, %l1 200af4c: 02 80 00 38 be 200b02c <_POSIX_Threads_Create_extension+0xf4> 200af50: 94 10 20 38 mov 0x38, %o2 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 200af54: e2 26 61 6c st %l1, [ %i1 + 0x16c ] /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 200af58: 21 00 80 57 sethi %hi(0x2015c00), %l0 200af5c: a0 14 23 48 or %l0, 0x348, %l0 ! 2015f48 <_POSIX_Threads_Default_attributes> 200af60: 40 00 0a 0d call 200d794 200af64: 92 10 00 10 mov %l0, %o1 api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 200af68: 82 10 20 01 mov 1, %g1 api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 200af6c: 92 04 20 18 add %l0, 0x18, %o1 created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 200af70: c2 24 60 7c st %g1, [ %l1 + 0x7c ] created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 200af74: c2 24 60 38 st %g1, [ %l1 + 0x38 ] api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 200af78: 90 04 60 80 add %l1, 0x80, %o0 200af7c: 40 00 0a 06 call 200d794 200af80: 94 10 20 18 mov 0x18, %o2 api->schedparam.sched_priority = 200af84: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 200af88: 82 10 20 ff mov 0xff, %g1 200af8c: 82 20 40 02 sub %g1, %g2, %g1 * If the thread is not a posix thread, then all posix signals are blocked * by default. */ /* XXX use signal constants */ api->signals_pending = 0; 200af90: c0 24 60 c8 clr [ %l1 + 0xc8 ] /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; api->schedparam.sched_priority = 200af94: c2 24 60 80 st %g1, [ %l1 + 0x80 ] * by default. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && 200af98: c6 06 60 08 ld [ %i1 + 8 ], %g3 200af9c: 82 04 60 dc add %l1, 0xdc, %g1 _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 200afa0: c0 24 60 d4 clr [ %l1 + 0xd4 ] 200afa4: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] api->cancelability_state = PTHREAD_CANCEL_ENABLE; 200afa8: c0 24 60 cc clr [ %l1 + 0xcc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200afac: 82 04 60 d8 add %l1, 0xd8, %g1 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 200afb0: c0 24 60 d0 clr [ %l1 + 0xd0 ] 200afb4: c2 24 60 e0 st %g1, [ %l1 + 0xe0 ] * by default. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && 200afb8: 83 30 e0 18 srl %g3, 0x18, %g1 200afbc: 82 08 60 07 and %g1, 7, %g1 200afc0: 80 a0 60 03 cmp %g1, 3 200afc4: 12 80 00 0b bne 200aff0 <_POSIX_Threads_Create_extension+0xb8> 200afc8: c0 24 60 dc clr [ %l1 + 0xdc ] 200afcc: 83 30 e0 1b srl %g3, 0x1b, %g1 200afd0: 80 a0 60 01 cmp %g1, 1 200afd4: 32 80 00 08 bne,a 200aff4 <_POSIX_Threads_Create_extension+0xbc> 200afd8: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED _Objects_Get_class( created->Object.id ) == 1 ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 200afdc: 03 00 80 5d sethi %hi(0x2017400), %g1 200afe0: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 200afe4: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 200afe8: 10 80 00 03 b 200aff4 <_POSIX_Threads_Create_extension+0xbc> 200afec: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 } else { api->signals_blocked = 0xffffffff; 200aff0: 82 10 3f ff mov -1, %g1 200aff4: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ] } _Thread_queue_Initialize( 200aff8: 90 04 60 3c add %l1, 0x3c, %o0 200affc: 92 10 20 00 clr %o1 200b000: 15 00 00 04 sethi %hi(0x1000), %o2 200b004: 7f ff f3 b8 call 2007ee4 <_Thread_queue_Initialize> 200b008: 96 10 20 00 clr %o3 THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 200b00c: c2 06 60 08 ld [ %i1 + 8 ], %g1 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 200b010: f2 24 60 c0 st %i1, [ %l1 + 0xc0 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 200b014: c2 24 60 bc st %g1, [ %l1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200b018: c0 24 60 a4 clr [ %l1 + 0xa4 ] the_watchdog->routine = routine; 200b01c: 03 00 80 2c sethi %hi(0x200b000), %g1 the_watchdog->id = id; the_watchdog->user_data = user_data; 200b020: b0 10 20 01 mov 1, %i0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 200b024: 82 10 60 84 or %g1, 0x84, %g1 200b028: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] created->Object.id, created ); return true; } 200b02c: 81 c7 e0 08 ret 200b030: 81 e8 00 00 restore 0200b084 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 200b084: 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 ]; 200b088: f0 06 61 6c ld [ %i1 + 0x16c ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 200b08c: 40 00 04 04 call 200c09c <_Timespec_To_ticks> 200b090: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 200b094: 80 a2 20 00 cmp %o0, 0 200b098: 22 80 00 02 be,a 200b0a0 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 200b09c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 200b0a0: 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 || 200b0a4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 200b0a8: 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; 200b0ac: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 200b0b0: 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 || 200b0b4: 80 a0 e0 00 cmp %g3, 0 200b0b8: 02 80 00 06 be 200b0d0 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 200b0bc: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 200b0c0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200b0c4: 80 a0 40 09 cmp %g1, %o1 200b0c8: 08 80 00 05 bleu 200b0dc <_POSIX_Threads_Sporadic_budget_TSR+0x58> 200b0cc: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 200b0d0: 90 10 00 19 mov %i1, %o0 200b0d4: 7f ff ef e7 call 2007070 <_Thread_Change_priority> 200b0d8: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 200b0dc: 40 00 03 f0 call 200c09c <_Timespec_To_ticks> 200b0e0: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 200b0e4: 80 a2 20 00 cmp %o0, 0 200b0e8: 22 80 00 02 be,a 200b0f0 <_POSIX_Threads_Sporadic_budget_TSR+0x6c> 200b0ec: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200b0f0: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200b0f4: b2 06 20 9c add %i0, 0x9c, %i1 200b0f8: 31 00 80 5d sethi %hi(0x2017400), %i0 200b0fc: 7f ff f5 e1 call 2008880 <_Watchdog_Insert> 200b100: 91 ee 23 d4 restore %i0, 0x3d4, %o0 200b104: 01 00 00 00 nop 0200b034 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b034: c2 02 21 6c ld [ %o0 + 0x16c ], %g1 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 || 200b038: c6 02 20 1c ld [ %o0 + 0x1c ], %g3 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 200b03c: c4 00 60 84 ld [ %g1 + 0x84 ], %g2 * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 200b040: 82 10 3f ff mov -1, %g1 200b044: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 200b048: 82 10 20 ff mov 0xff, %g1 200b04c: 92 20 40 02 sub %g1, %g2, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b050: 80 a0 e0 00 cmp %g3, 0 200b054: 02 80 00 06 be 200b06c <_POSIX_Threads_Sporadic_budget_callout+0x38> 200b058: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 200b05c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 200b060: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 200b064: 08 80 00 06 bleu 200b07c <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 200b068: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 200b06c: 94 10 20 01 mov 1, %o2 ! 1 200b070: 82 13 c0 00 mov %o7, %g1 200b074: 7f ff ef ff call 2007070 <_Thread_Change_priority> 200b078: 9e 10 40 00 mov %g1, %o7 200b07c: 81 c3 e0 08 retl <== NOT EXECUTED 200b080: 01 00 00 00 nop 0200c660 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 200c660: 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 ]; 200c664: f0 06 21 6c ld [ %i0 + 0x16c ], %i0 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 200c668: 82 10 20 01 mov 1, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200c66c: a2 06 20 dc add %i0, 0xdc, %l1 200c670: 10 80 00 10 b 200c6b0 <_POSIX_Threads_cancel_run+0x50> 200c674: c2 26 20 cc st %g1, [ %i0 + 0xcc ] while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 200c678: 7f ff d5 b2 call 2001d40 <== NOT EXECUTED 200c67c: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 200c680: e0 04 60 04 ld [ %l1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200c684: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 200c688: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 200c68c: 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; 200c690: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 200c694: 7f ff d5 af call 2001d50 <== NOT EXECUTED 200c698: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 200c69c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 200c6a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 200c6a4: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 200c6a8: 7f ff f1 24 call 2008b38 <_Workspace_Free> <== NOT EXECUTED 200c6ac: 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 ) ) { 200c6b0: c2 06 20 d8 ld [ %i0 + 0xd8 ], %g1 200c6b4: 80 a0 40 11 cmp %g1, %l1 200c6b8: 12 bf ff f0 bne 200c678 <_POSIX_Threads_cancel_run+0x18> 200c6bc: 01 00 00 00 nop (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 200c6c0: 81 c7 e0 08 ret 200c6c4: 81 e8 00 00 restore 0200d430 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 200d430: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 200d434: 7f ff f5 4d call 200a968 <_Watchdog_Remove> 200d438: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200d43c: 7f ff d5 39 call 2002920 200d440: 01 00 00 00 nop 200d444: 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 ) { 200d448: c2 06 20 08 ld [ %i0 + 8 ], %g1 200d44c: 80 a0 60 00 cmp %g1, 0 200d450: 22 80 00 06 be,a 200d468 <_POSIX_Timer_Insert_helper+0x38> 200d454: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 200d458: 7f ff d5 36 call 2002930 <== NOT EXECUTED 200d45c: b0 10 20 00 clr %i0 <== NOT EXECUTED 200d460: 81 c7 e0 08 ret <== NOT EXECUTED 200d464: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 200d468: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 200d46c: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200d470: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200d474: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200d478: 92 10 00 18 mov %i0, %o1 200d47c: 11 00 80 70 sethi %hi(0x201c000), %o0 200d480: 7f ff f4 e0 call 200a800 <_Watchdog_Insert> 200d484: 90 12 22 54 or %o0, 0x254, %o0 ! 201c254 <_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 ); 200d488: b0 10 20 01 mov 1, %i0 200d48c: 7f ff d5 29 call 2002930 200d490: 90 10 00 10 mov %l0, %o0 return true; } 200d494: 81 c7 e0 08 ret 200d498: 81 e8 00 00 restore 02006a74 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 2006a74: 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; 2006a78: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006a7c: 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; 2006a80: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006a84: 80 a0 a0 00 cmp %g2, 0 2006a88: 12 80 00 06 bne 2006aa0 <_POSIX_Timer_TSR+0x2c> 2006a8c: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 2006a90: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 2006a94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006a98: 02 80 00 0f be 2006ad4 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED 2006a9c: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 2006aa0: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2006aa4: d4 06 60 08 ld [ %i1 + 8 ], %o2 2006aa8: 90 06 60 10 add %i1, 0x10, %o0 2006aac: 17 00 80 1a sethi %hi(0x2006800), %o3 2006ab0: 98 10 00 19 mov %i1, %o4 2006ab4: 40 00 1a 5f call 200d430 <_POSIX_Timer_Insert_helper> 2006ab8: 96 12 e2 74 or %o3, 0x274, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2006abc: 80 8a 20 ff btst 0xff, %o0 2006ac0: 02 80 00 0a be 2006ae8 <_POSIX_Timer_TSR+0x74> 2006ac4: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 2006ac8: 40 00 05 e9 call 200826c <_TOD_Get> 2006acc: 90 06 60 6c add %i1, 0x6c, %o0 2006ad0: 82 10 20 03 mov 3, %g1 /* * 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 ) ) { 2006ad4: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2006ad8: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 2006adc: 40 00 19 7a call 200d0c4 2006ae0: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 2006ae4: c0 26 60 68 clr [ %i1 + 0x68 ] 2006ae8: 81 c7 e0 08 ret 2006aec: 81 e8 00 00 restore 0200c840 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 200c840: 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 ); 200c844: 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 ) 200c848: 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 ); 200c84c: 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 ) 200c850: b8 10 3f ff mov -1, %i4 200c854: 02 80 00 04 be 200c864 <_POSIX_signals_Clear_signals+0x24> 200c858: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 200c85c: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 200c860: 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 ); 200c864: 7f ff d5 37 call 2001d40 200c868: 01 00 00 00 nop 200c86c: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 200c870: 80 8e e0 ff btst 0xff, %i3 200c874: 22 80 00 35 be,a 200c948 <_POSIX_signals_Clear_signals+0x108> 200c878: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 200c87c: 03 00 80 5f sethi %hi(0x2017c00), %g1 200c880: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 2017e8c <_POSIX_signals_Pending> 200c884: 82 0c 00 01 and %l0, %g1, %g1 200c888: 80 88 40 1c btst %g1, %i4 200c88c: 02 80 00 35 be 200c960 <_POSIX_signals_Clear_signals+0x120> 200c890: 83 2e 60 02 sll %i1, 2, %g1 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200c894: 85 2e 60 04 sll %i1, 4, %g2 200c898: 84 20 80 01 sub %g2, %g1, %g2 200c89c: 03 00 80 5f sethi %hi(0x2017c00), %g1 200c8a0: 82 10 60 c0 or %g1, 0xc0, %g1 ! 2017cc0 <_POSIX_signals_Vectors> 200c8a4: c2 00 40 02 ld [ %g1 + %g2 ], %g1 200c8a8: 80 a0 60 02 cmp %g1, 2 200c8ac: 12 80 00 23 bne 200c938 <_POSIX_signals_Clear_signals+0xf8> 200c8b0: 03 00 80 5f sethi %hi(0x2017c00), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 200c8b4: 88 10 62 90 or %g1, 0x290, %g4 ! 2017e90 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200c8b8: f8 00 80 04 ld [ %g2 + %g4 ], %i4 200c8bc: 86 00 80 04 add %g2, %g4, %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200c8c0: 9a 00 e0 04 add %g3, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 200c8c4: 80 a7 00 0d cmp %i4, %o5 200c8c8: 32 80 00 04 bne,a 200c8d8 <_POSIX_signals_Clear_signals+0x98> 200c8cc: c2 07 00 00 ld [ %i4 ], %g1 200c8d0: 10 80 00 04 b 200c8e0 <_POSIX_signals_Clear_signals+0xa0> <== NOT EXECUTED 200c8d4: b8 10 20 00 clr %i4 <== NOT EXECUTED Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 200c8d8: c2 20 80 04 st %g1, [ %g2 + %g4 ] new_first->previous = _Chain_Head(the_chain); 200c8dc: c6 20 60 04 st %g3, [ %g1 + 4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200c8e0: c2 00 80 04 ld [ %g2 + %g4 ], %g1 200c8e4: 80 a0 40 0d cmp %g1, %o5 200c8e8: 12 80 00 05 bne 200c8fc <_POSIX_signals_Clear_signals+0xbc> 200c8ec: 80 a7 20 00 cmp %i4, 0 _POSIX_signals_Clear_process_signals( mask ); 200c8f0: 40 00 01 9f call 200cf6c <_POSIX_signals_Clear_process_signals> 200c8f4: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 200c8f8: 80 a7 20 00 cmp %i4, 0 200c8fc: 02 80 00 1a be 200c964 <_POSIX_signals_Clear_signals+0x124> 200c900: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 200c904: 90 10 00 1a mov %i2, %o0 200c908: 92 07 20 08 add %i4, 8, %o1 200c90c: 40 00 03 a2 call 200d794 200c910: 94 10 20 0c mov 0xc, %o2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c914: 03 00 80 5f sethi %hi(0x2017c00), %g1 200c918: 82 10 62 44 or %g1, 0x244, %g1 ! 2017e44 <_POSIX_signals_Inactive_siginfo+0x4> 200c91c: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 200c920: 82 00 7f fc add %g1, -4, %g1 200c924: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 200c928: f8 20 60 08 st %i4, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c92c: 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; 200c930: 10 80 00 04 b 200c940 <_POSIX_signals_Clear_signals+0x100> 200c934: f8 20 80 00 st %i4, [ %g2 ] &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 200c938: 40 00 01 8d call 200cf6c <_POSIX_signals_Clear_process_signals> 200c93c: 90 10 00 10 mov %l0, %o0 200c940: 10 80 00 09 b 200c964 <_POSIX_signals_Clear_signals+0x124> 200c944: b0 10 20 01 mov 1, %i0 do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 200c948: 82 0c 00 02 and %l0, %g2, %g1 200c94c: 80 88 40 1c btst %g1, %i4 200c950: 02 80 00 04 be 200c960 <_POSIX_signals_Clear_signals+0x120> 200c954: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 200c958: 10 bf ff fa b 200c940 <_POSIX_signals_Clear_signals+0x100> 200c95c: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 200c960: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 200c964: 7f ff d4 fb call 2001d50 200c968: 90 10 00 11 mov %l1, %o0 return do_callout; } 200c96c: 81 c7 e0 08 ret 200c970: 81 e8 00 00 restore 02005f24 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 2005f24: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2005f28: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 2005f2c: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2005f30: 82 02 3f ff add %o0, -1, %g1 2005f34: 83 28 80 01 sll %g2, %g1, %g1 2005f38: 80 88 40 03 btst %g1, %g3 2005f3c: 12 80 00 12 bne 2005f84 <_POSIX_signals_Get_highest+0x60> 2005f40: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2005f44: 90 02 20 01 inc %o0 2005f48: 80 a2 20 20 cmp %o0, 0x20 2005f4c: 12 bf ff fa bne 2005f34 <_POSIX_signals_Get_highest+0x10> 2005f50: 82 02 3f ff add %o0, -1, %g1 2005f54: 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 ) ) 2005f58: 84 10 20 01 mov 1, %g2 2005f5c: 82 02 3f ff add %o0, -1, %g1 2005f60: 83 28 80 01 sll %g2, %g1, %g1 2005f64: 80 88 40 03 btst %g1, %g3 2005f68: 12 80 00 07 bne 2005f84 <_POSIX_signals_Get_highest+0x60> 2005f6c: 01 00 00 00 nop return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2005f70: 90 02 20 01 inc %o0 2005f74: 80 a2 20 1b cmp %o0, 0x1b 2005f78: 12 bf ff fa bne 2005f60 <_POSIX_signals_Get_highest+0x3c> 2005f7c: 82 02 3f ff add %o0, -1, %g1 2005f80: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 2005f84: 81 c3 e0 08 retl 2005f88: 01 00 00 00 nop 0200ad04 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200ad04: 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 ]; 200ad08: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 if ( !api ) 200ad0c: 80 a4 20 00 cmp %l0, 0 200ad10: 02 80 00 33 be 200addc <_POSIX_signals_Post_switch_extension+0xd8> 200ad14: 03 00 80 5f sethi %hi(0x2017c00), %g1 * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 200ad18: a2 10 62 8c or %g1, 0x28c, %l1 ! 2017e8c <_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 ); 200ad1c: 7f ff dc 09 call 2001d40 200ad20: 01 00 00 00 nop 200ad24: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 200ad28: c2 04 40 00 ld [ %l1 ], %g1 200ad2c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 200ad30: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 200ad34: 82 10 40 02 or %g1, %g2, %g1 200ad38: 80 a8 40 03 andncc %g1, %g3, %g0 200ad3c: 12 80 00 04 bne 200ad4c <_POSIX_signals_Post_switch_extension+0x48> 200ad40: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200ad44: 7f ff dc 03 call 2001d50 200ad48: 81 e8 00 00 restore break; } _ISR_Enable( level ); 200ad4c: 7f ff dc 01 call 2001d50 200ad50: b0 10 20 1b mov 0x1b, %i0 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 200ad54: 92 10 00 18 mov %i0, %o1 200ad58: 94 10 20 00 clr %o2 200ad5c: 40 00 06 90 call 200c79c <_POSIX_signals_Check_signal> 200ad60: 90 10 00 10 mov %l0, %o0 200ad64: 80 8a 20 ff btst 0xff, %o0 200ad68: 12 bf ff ed bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200ad6c: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200ad70: 90 10 00 10 mov %l0, %o0 200ad74: 94 10 20 01 mov 1, %o2 200ad78: 40 00 06 89 call 200c79c <_POSIX_signals_Check_signal> 200ad7c: b0 06 20 01 inc %i0 200ad80: 80 8a 20 ff btst 0xff, %o0 200ad84: 12 bf ff e6 bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200ad88: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200ad8c: 12 bf ff f3 bne 200ad58 <_POSIX_signals_Post_switch_extension+0x54> 200ad90: 92 10 00 18 mov %i0, %o1 200ad94: 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 ) ) 200ad98: 92 10 00 18 mov %i0, %o1 200ad9c: 94 10 20 00 clr %o2 200ada0: 40 00 06 7f call 200c79c <_POSIX_signals_Check_signal> 200ada4: 90 10 00 10 mov %l0, %o0 200ada8: 80 8a 20 ff btst 0xff, %o0 200adac: 12 bf ff dc bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200adb0: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200adb4: 90 10 00 10 mov %l0, %o0 200adb8: 94 10 20 01 mov 1, %o2 200adbc: 40 00 06 78 call 200c79c <_POSIX_signals_Check_signal> 200adc0: b0 06 20 01 inc %i0 200adc4: 80 8a 20 ff btst 0xff, %o0 200adc8: 12 bf ff d5 bne 200ad1c <_POSIX_signals_Post_switch_extension+0x18> 200adcc: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 200add0: 12 bf ff f3 bne 200ad9c <_POSIX_signals_Post_switch_extension+0x98> 200add4: 92 10 00 18 mov %i0, %o1 200add8: 30 bf ff d1 b,a 200ad1c <_POSIX_signals_Post_switch_extension+0x18> <== NOT EXECUTED 200addc: 81 c7 e0 08 ret <== NOT EXECUTED 200ade0: 81 e8 00 00 restore <== NOT EXECUTED 02005178 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 2005178: 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 ); 200517c: 7f ff f4 6b call 2002328 2005180: 33 00 80 55 sethi %hi(0x2015400), %i1 2005184: 7f ff ff 1a call 2004dec 2005188: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 200518c: 40 00 0f cc call 20090bc <_Watchdog_Remove> 2005190: 90 16 62 c4 or %i1, 0x2c4, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005194: 31 00 80 56 sethi %hi(0x2015800), %i0 2005198: b2 16 62 c4 or %i1, 0x2c4, %i1 200519c: 40 00 0f 6e call 2008f54 <_Watchdog_Insert> 20051a0: 91 ee 21 04 restore %i0, 0x104, %o0 20051a4: 01 00 00 00 nop <== NOT EXECUTED 02022324 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2022324: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 2022328: 80 a6 20 00 cmp %i0, 0 202232c: 02 80 00 10 be 202236c <_Protected_heap_Get_information+0x48> 2022330: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 2022334: 02 80 00 0e be 202236c <_Protected_heap_Get_information+0x48> 2022338: 23 00 81 6c sethi %hi(0x205b000), %l1 return false; _RTEMS_Lock_allocator(); 202233c: 7f ff 9a d1 call 2008e80 <_API_Mutex_Lock> 2022340: d0 04 62 1c ld [ %l1 + 0x21c ], %o0 ! 205b21c <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 2022344: 90 10 00 18 mov %i0, %o0 2022348: 40 00 28 87 call 202c564 <_Heap_Get_information> 202234c: 92 10 00 19 mov %i1, %o1 2022350: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 2022354: 7f ff 9a e1 call 2008ed8 <_API_Mutex_Unlock> 2022358: d0 04 62 1c ld [ %l1 + 0x21c ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 202235c: 80 a0 00 10 cmp %g0, %l0 2022360: 82 60 3f ff subx %g0, -1, %g1 2022364: 81 c7 e0 08 ret 2022368: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 202236c: 81 c7 e0 08 ret <== NOT EXECUTED 2022370: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006ac8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2006ac8: 9d e3 bf 90 save %sp, -112, %sp 2006acc: 11 00 80 71 sethi %hi(0x201c400), %o0 2006ad0: 92 10 00 18 mov %i0, %o1 2006ad4: 90 12 21 ac or %o0, 0x1ac, %o0 2006ad8: 40 00 07 c3 call 20089e4 <_Objects_Get> 2006adc: 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 ) { 2006ae0: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006ae4: 80 a0 60 00 cmp %g1, 0 2006ae8: 12 80 00 26 bne 2006b80 <_Rate_monotonic_Timeout+0xb8> 2006aec: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2006af0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006af4: 03 00 00 10 sethi %hi(0x4000), %g1 2006af8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2006afc: 80 88 80 01 btst %g2, %g1 2006b00: 22 80 00 0c be,a 2006b30 <_Rate_monotonic_Timeout+0x68> 2006b04: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2006b08: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2006b0c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006b10: 80 a0 80 01 cmp %g2, %g1 2006b14: 32 80 00 07 bne,a 2006b30 <_Rate_monotonic_Timeout+0x68> 2006b18: 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 ); 2006b1c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006b20: 40 00 09 09 call 2008f44 <_Thread_Clear_state> 2006b24: 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 ); 2006b28: 10 80 00 08 b 2006b48 <_Rate_monotonic_Timeout+0x80> 2006b2c: 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 ) { 2006b30: 80 a0 60 01 cmp %g1, 1 2006b34: 12 80 00 0e bne 2006b6c <_Rate_monotonic_Timeout+0xa4> 2006b38: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2006b3c: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006b40: 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; 2006b44: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006b48: 7f ff fe 4a call 2006470 <_Rate_monotonic_Initiate_statistics> 2006b4c: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b50: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b54: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b58: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b5c: 11 00 80 72 sethi %hi(0x201c800), %o0 2006b60: 40 00 0f 68 call 200a900 <_Watchdog_Insert> 2006b64: 90 12 20 04 or %o0, 4, %o0 ! 201c804 <_Watchdog_Ticks_chain> 2006b68: 30 80 00 02 b,a 2006b70 <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2006b6c: 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; 2006b70: 05 00 80 71 sethi %hi(0x201c400), %g2 2006b74: c2 00 a3 20 ld [ %g2 + 0x320 ], %g1 ! 201c720 <_Thread_Dispatch_disable_level> 2006b78: 82 00 7f ff add %g1, -1, %g1 2006b7c: c2 20 a3 20 st %g1, [ %g2 + 0x320 ] 2006b80: 81 c7 e0 08 ret 2006b84: 81 e8 00 00 restore 02007408 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 2007408: 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 ); 200740c: 11 00 80 5e sethi %hi(0x2017800), %o0 2007410: 7f ff fc de call 2006788 <_Objects_Allocate> 2007414: 90 12 20 50 or %o0, 0x50, %o0 ! 2017850 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007418: 05 00 80 5d sethi %hi(0x2017400), %g2 200741c: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20176f0 <_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(); 2007420: 07 00 80 5e sethi %hi(0x2017800), %g3 2007424: 82 00 60 01 inc %g1 2007428: d0 20 e0 9c st %o0, [ %g3 + 0x9c ] 200742c: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 2007430: 03 00 80 5d sethi %hi(0x2017400), %g1 2007434: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> 2007438: d2 00 e0 9c ld [ %g3 + 0x9c ], %o1 200743c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 2007440: 03 00 80 5a sethi %hi(0x2016800), %g1 2007444: d6 00 60 c0 ld [ %g1 + 0xc0 ], %o3 ! 20168c0 2007448: 03 00 80 56 sethi %hi(0x2015800), %g1 200744c: 82 10 63 88 or %g1, 0x388, %g1 ! 2015b88 2007450: 80 a2 c0 02 cmp %o3, %g2 2007454: 1a 80 00 03 bcc 2007460 <_Thread_Create_idle+0x58> 2007458: c2 27 bf f4 st %g1, [ %fp + -12 ] 200745c: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 2007460: 03 00 80 5a sethi %hi(0x2016800), %g1 2007464: da 08 60 c4 ldub [ %g1 + 0xc4 ], %o5 ! 20168c4 2007468: 82 10 20 01 mov 1, %g1 200746c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2007470: 82 07 bf f4 add %fp, -12, %g1 2007474: c0 23 a0 60 clr [ %sp + 0x60 ] 2007478: c0 23 a0 64 clr [ %sp + 0x64 ] 200747c: c0 23 a0 68 clr [ %sp + 0x68 ] 2007480: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2007484: 94 10 20 00 clr %o2 2007488: 98 10 20 00 clr %o4 200748c: 11 00 80 5e sethi %hi(0x2017800), %o0 2007490: 40 00 00 bf call 200778c <_Thread_Initialize> 2007494: 90 12 20 50 or %o0, 0x50, %o0 ! 2017850 <_Thread_Internal_information> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 2007498: 03 00 80 5d sethi %hi(0x2017400), %g1 200749c: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20074a0: 07 00 80 5d sethi %hi(0x2017400), %g3 20074a4: f4 00 60 14 ld [ %g1 + 0x14 ], %i2 20074a8: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 20074ac: 05 00 80 5e sethi %hi(0x2017800), %g2 20074b0: 82 00 7f ff add %g1, -1, %g1 20074b4: c4 00 a0 9c ld [ %g2 + 0x9c ], %g2 20074b8: c2 20 e2 f0 st %g1, [ %g3 + 0x2f0 ] 20074bc: 03 00 80 5d sethi %hi(0x2017400), %g1 20074c0: c4 20 63 b4 st %g2, [ %g1 + 0x3b4 ] ! 20177b4 <_Thread_Executing> 20074c4: 03 00 80 5d sethi %hi(0x2017400), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 20074c8: b0 10 00 02 mov %g2, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 20074cc: c4 20 63 80 st %g2, [ %g1 + 0x380 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 20074d0: b2 10 20 00 clr %i1 20074d4: b6 10 20 00 clr %i3 20074d8: 40 00 03 ae call 2008390 <_Thread_Start> 20074dc: 99 e8 20 00 restore %g0, 0, %o4 20074e0: 01 00 00 00 nop 0200cd10 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200cd10: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd14: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 20177b4 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200cd18: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200cd1c: 80 a0 60 00 cmp %g1, 0 200cd20: 32 80 00 0b bne,a 200cd4c <_Thread_Evaluate_mode+0x3c> 200cd24: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 200cd28: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd2c: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 2017780 <_Thread_Heir> 200cd30: 80 a0 80 01 cmp %g2, %g1 200cd34: 02 80 00 0b be 200cd60 <_Thread_Evaluate_mode+0x50> 200cd38: 01 00 00 00 nop 200cd3c: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 200cd40: 80 a0 60 00 cmp %g1, 0 200cd44: 02 80 00 07 be 200cd60 <_Thread_Evaluate_mode+0x50> 200cd48: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 200cd4c: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd50: 90 10 20 01 mov 1, %o0 200cd54: c4 28 63 c4 stb %g2, [ %g1 + 0x3c4 ] 200cd58: 81 c3 e0 08 retl 200cd5c: 01 00 00 00 nop return TRUE; } return FALSE; } 200cd60: 81 c3 e0 08 retl 200cd64: 90 10 20 00 clr %o0 ! 0 020076dc <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 20076dc: 88 10 00 08 mov %o0, %g4 uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 20076e0: 80 a2 20 00 cmp %o0, 0 20076e4: 12 80 00 0a bne 200770c <_Thread_Get+0x30> 20076e8: 94 10 00 09 mov %o1, %o2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20076ec: 03 00 80 5d sethi %hi(0x2017400), %g1 20076f0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 20176f0 <_Thread_Dispatch_disable_level> 20076f4: 84 00 a0 01 inc %g2 20076f8: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 20076fc: 03 00 80 5d sethi %hi(0x2017400), %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; 2007700: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 2007704: 81 c3 e0 08 retl 2007708: d0 00 63 b4 ld [ %g1 + 0x3b4 ], %o0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 200770c: 83 32 20 18 srl %o0, 0x18, %g1 2007710: 84 08 60 07 and %g1, 7, %g2 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 2007714: 82 00 bf ff add %g2, -1, %g1 2007718: 80 a0 60 03 cmp %g1, 3 200771c: 08 80 00 16 bleu 2007774 <_Thread_Get+0x98> 2007720: 87 32 20 1b srl %o0, 0x1b, %g3 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 2007724: 82 10 20 01 mov 1, %g1 2007728: 10 80 00 09 b 200774c <_Thread_Get+0x70> 200772c: c2 22 80 00 st %g1, [ %o2 ] goto done; } api_information = _Objects_Information_table[ the_api ]; 2007730: 03 00 80 5d sethi %hi(0x2017400), %g1 2007734: 82 10 62 50 or %g1, 0x250, %g1 ! 2017650 <_Objects_Information_table> 2007738: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 200773c: 80 a0 60 00 cmp %g1, 0 2007740: 32 80 00 05 bne,a 2007754 <_Thread_Get+0x78> 2007744: d0 00 60 04 ld [ %g1 + 4 ], %o0 *location = OBJECTS_ERROR; 2007748: c6 22 80 00 st %g3, [ %o2 ] 200774c: 81 c3 e0 08 retl 2007750: 90 10 20 00 clr %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { 2007754: 80 a2 20 00 cmp %o0, 0 2007758: 12 80 00 04 bne 2007768 <_Thread_Get+0x8c> 200775c: 92 10 00 04 mov %g4, %o1 *location = OBJECTS_ERROR; 2007760: 81 c3 e0 08 retl <== NOT EXECUTED 2007764: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 2007768: 82 13 c0 00 mov %o7, %g1 200776c: 7f ff fd 61 call 2006cf0 <_Objects_Get> 2007770: 9e 10 40 00 mov %g1, %o7 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 2007774: 80 a0 e0 01 cmp %g3, 1 2007778: 22 bf ff ee be,a 2007730 <_Thread_Get+0x54> 200777c: 85 28 a0 02 sll %g2, 2, %g2 *location = OBJECTS_ERROR; 2007780: 10 bf ff ea b 2007728 <_Thread_Get+0x4c> 2007784: 82 10 20 01 mov 1, %g1 0200cd68 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200cd68: 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; 200cd6c: 03 00 80 5d sethi %hi(0x2017400), %g1 200cd70: e0 00 63 b4 ld [ %g1 + 0x3b4 ], %l0 ! 20177b4 <_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(); 200cd74: 3f 00 80 33 sethi %hi(0x200cc00), %i7 200cd78: be 17 e1 68 or %i7, 0x168, %i7 ! 200cd68 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200cd7c: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200cd80: 7f ff d3 f4 call 2001d50 200cd84: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; doneConstructors = 1; 200cd88: 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; 200cd8c: 05 00 80 5d sethi %hi(0x2017400), %g2 200cd90: e2 08 a0 00 ldub [ %g2 ], %l1 doneConstructors = 1; 200cd94: c2 28 a0 00 stb %g1, [ %g2 ] #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 ) ) { 200cd98: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 200cd9c: 80 a0 60 00 cmp %g1, 0 200cda0: 02 80 00 0c be 200cdd0 <_Thread_Handler+0x68> 200cda4: 03 00 80 5d sethi %hi(0x2017400), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200cda8: d0 00 63 78 ld [ %g1 + 0x378 ], %o0 ! 2017778 <_Thread_Allocated_fp> 200cdac: 80 a4 00 08 cmp %l0, %o0 200cdb0: 02 80 00 08 be 200cdd0 <_Thread_Handler+0x68> 200cdb4: 80 a2 20 00 cmp %o0, 0 if ( _Thread_Allocated_fp != NULL ) 200cdb8: 22 80 00 06 be,a 200cdd0 <_Thread_Handler+0x68> 200cdbc: e0 20 63 78 st %l0, [ %g1 + 0x378 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200cdc0: 7f ff ef 99 call 2008c24 <_CPU_Context_save_fp> 200cdc4: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200cdc8: 03 00 80 5d sethi %hi(0x2017400), %g1 200cdcc: e0 20 63 78 st %l0, [ %g1 + 0x378 ] ! 2017778 <_Thread_Allocated_fp> * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 200cdd0: 7f ff ee 29 call 2008674 <_User_extensions_Thread_begin> 200cdd4: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200cdd8: 7f ff ea 34 call 20076a8 <_Thread_Enable_dispatch> 200cddc: 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) */ 200cde0: 83 2c 60 18 sll %l1, 0x18, %g1 200cde4: 80 a0 60 00 cmp %g1, 0 200cde8: 32 80 00 05 bne,a 200cdfc <_Thread_Handler+0x94> 200cdec: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 { _init (); 200cdf0: 40 00 26 7a call 20167d8 <_init> 200cdf4: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200cdf8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200cdfc: 80 a0 60 01 cmp %g1, 1 200ce00: 22 80 00 0d be,a 200ce34 <_Thread_Handler+0xcc> 200ce04: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200ce08: 2a 80 00 09 bcs,a 200ce2c <_Thread_Handler+0xc4> 200ce0c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200ce10: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200ce14: 02 80 00 0d be 200ce48 <_Thread_Handler+0xe0> <== NOT EXECUTED 200ce18: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 200ce1c: 12 80 00 14 bne 200ce6c <_Thread_Handler+0x104> <== NOT EXECUTED 200ce20: 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 = 200ce24: 10 80 00 0d b 200ce58 <_Thread_Handler+0xf0> <== NOT EXECUTED 200ce28: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 200ce2c: 10 80 00 03 b 200ce38 <_Thread_Handler+0xd0> 200ce30: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 200ce34: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 200ce38: 9f c0 40 00 call %g1 200ce3c: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200ce40: 10 80 00 0b b 200ce6c <_Thread_Handler+0x104> 200ce44: 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 = 200ce48: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200ce4c: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200ce50: 10 80 00 04 b 200ce60 <_Thread_Handler+0xf8> <== NOT EXECUTED 200ce54: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 200ce58: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED 200ce5c: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED 200ce60: 9f c0 40 00 call %g1 <== NOT EXECUTED 200ce64: 01 00 00 00 nop <== NOT EXECUTED 200ce68: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 200ce6c: 7f ff ee 13 call 20086b8 <_User_extensions_Thread_exitted> 200ce70: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200ce74: 90 10 20 00 clr %o0 200ce78: 92 10 20 01 mov 1, %o1 200ce7c: 7f ff e6 14 call 20066cc <_Internal_error_Occurred> 200ce80: 94 10 20 06 mov 6, %o2 200ce84: 01 00 00 00 nop 0200778c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200778c: 9d e3 bf 98 save %sp, -104, %sp 2007790: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007794: 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 ) { 2007798: e2 00 40 00 ld [ %g1 ], %l1 200779c: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 20077a0: 12 80 00 0e bne 20077d8 <_Thread_Initialize+0x4c> 20077a4: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 20077a8: 90 10 00 19 mov %i1, %o0 20077ac: 40 00 02 ba call 2008294 <_Thread_Stack_Allocate> 20077b0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 20077b4: 80 a2 20 00 cmp %o0, 0 20077b8: 02 80 00 2d be 200786c <_Thread_Initialize+0xe0> 20077bc: 80 a2 00 1b cmp %o0, %i3 20077c0: 0a 80 00 2b bcs 200786c <_Thread_Initialize+0xe0> 20077c4: 01 00 00 00 nop return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 20077c8: 82 10 20 01 mov 1, %g1 ! 1 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 20077cc: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 20077d0: 10 80 00 04 b 20077e0 <_Thread_Initialize+0x54> 20077d4: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 20077d8: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 20077dc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 20077e0: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 20077e4: 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 ) { 20077e8: 80 8f 20 ff btst 0xff, %i4 20077ec: 02 80 00 07 be 2007808 <_Thread_Initialize+0x7c> 20077f0: b8 10 20 00 clr %i4 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 20077f4: 40 00 04 d8 call 2008b54 <_Workspace_Allocate> 20077f8: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) { 20077fc: b8 92 20 00 orcc %o0, 0, %i4 2007800: 02 80 00 19 be 2007864 <_Thread_Initialize+0xd8> 2007804: 01 00 00 00 nop /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007808: 03 00 80 5d sethi %hi(0x2017400), %g1 200780c: d0 00 63 94 ld [ %g1 + 0x394 ], %o0 ! 2017794 <_Thread_Maximum_extensions> fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 2007810: f8 26 61 60 st %i4, [ %i1 + 0x160 ] the_thread->Start.fp_context = fp_area; 2007814: f8 26 60 cc st %i4, [ %i1 + 0xcc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007818: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200781c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007820: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007824: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 2007828: c0 26 61 64 clr [ %i1 + 0x164 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200782c: 80 a2 20 00 cmp %o0, 0 2007830: 02 80 00 11 be 2007874 <_Thread_Initialize+0xe8> 2007834: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 2007838: 90 02 20 01 inc %o0 200783c: 40 00 04 c6 call 2008b54 <_Workspace_Allocate> 2007840: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 2007844: b6 92 20 00 orcc %o0, 0, %i3 2007848: 12 80 00 0c bne 2007878 <_Thread_Initialize+0xec> 200784c: 80 a6 e0 00 cmp %i3, 0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007850: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2007854: 02 80 00 04 be 2007864 <_Thread_Initialize+0xd8> <== NOT EXECUTED 2007858: 01 00 00 00 nop <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 200785c: 40 00 04 b7 call 2008b38 <_Workspace_Free> <== NOT EXECUTED 2007860: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007864: 40 00 02 a4 call 20082f4 <_Thread_Stack_Free> <== NOT EXECUTED 2007868: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200786c: 81 c7 e0 08 ret 2007870: 91 e8 20 00 restore %g0, 0, %o0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 2007874: 80 a6 e0 00 cmp %i3, 0 2007878: 02 80 00 0e be 20078b0 <_Thread_Initialize+0x124> 200787c: f6 26 61 74 st %i3, [ %i1 + 0x174 ] uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007880: 03 00 80 5d sethi %hi(0x2017400), %g1 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 2007884: 84 10 20 00 clr %g2 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007888: 10 80 00 05 b 200789c <_Thread_Initialize+0x110> 200788c: 88 10 63 94 or %g1, 0x394, %g4 the_thread->extensions[i] = NULL; 2007890: c2 06 61 74 ld [ %i1 + 0x174 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007894: 84 00 a0 01 inc %g2 the_thread->extensions[i] = NULL; 2007898: c0 20 40 03 clr [ %g1 + %g3 ] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 200789c: c2 01 00 00 ld [ %g4 ], %g1 20078a0: 82 00 60 01 inc %g1 20078a4: 80 a0 80 01 cmp %g2, %g1 20078a8: 0a bf ff fa bcs 2007890 <_Thread_Initialize+0x104> 20078ac: 87 28 a0 02 sll %g2, 2, %g3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 20078b0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 20078b4: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 20078b8: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 20078bc: 80 a4 a0 02 cmp %l2, 2 20078c0: 12 80 00 05 bne 20078d4 <_Thread_Initialize+0x148> 20078c4: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 20078c8: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 20078cc: c2 00 62 48 ld [ %g1 + 0x248 ], %g1 ! 2017648 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 20078d0: c2 26 60 78 st %g1, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 20078d4: 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 ); 20078d8: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 20078dc: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 20078e0: 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 ); 20078e4: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 20078e8: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 20078ec: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 20078f0: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 20078f4: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 20078f8: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 20078fc: 40 00 01 c5 call 2008010 <_Thread_Set_priority> 2007900: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007904: c4 06 60 08 ld [ %i1 + 8 ], %g2 2007908: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 200790c: 03 00 00 3f sethi %hi(0xfc00), %g1 2007910: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007914: 84 08 80 01 and %g2, %g1, %g2 2007918: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200791c: e2 26 60 0c st %l1, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 2007920: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 2007924: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007928: 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 ); 200792c: 90 10 00 19 mov %i1, %o0 2007930: 40 00 03 86 call 2008748 <_User_extensions_Thread_create> 2007934: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 2007938: 80 8a 20 ff btst 0xff, %o0 200793c: 12 80 00 0e bne 2007974 <_Thread_Initialize+0x1e8> 2007940: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 2007944: 02 80 00 05 be 2007958 <_Thread_Initialize+0x1cc> <== NOT EXECUTED 2007948: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 200794c: 40 00 04 7b call 2008b38 <_Workspace_Free> <== NOT EXECUTED 2007950: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007954: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2007958: 02 80 00 05 be 200796c <_Thread_Initialize+0x1e0> <== NOT EXECUTED 200795c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007960: 40 00 04 76 call 2008b38 <_Workspace_Free> <== NOT EXECUTED 2007964: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007968: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200796c: 40 00 02 62 call 20082f4 <_Thread_Stack_Free> <== NOT EXECUTED 2007970: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 2007974: 81 c7 e0 08 ret 2007978: 81 e8 00 00 restore 0200cd44 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 200cd44: 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; 200cd48: 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; 200cd4c: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200cd50: 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; 200cd54: 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; 200cd58: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 200cd5c: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 200cd60: 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; 200cd64: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 200cd68: 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 ) ) { 200cd6c: 7f ff ef 3d call 2008a60 <_Thread_queue_Extract_with_proxy> 200cd70: 90 10 00 18 mov %i0, %o0 200cd74: 80 8a 20 ff btst 0xff, %o0 200cd78: 32 80 00 09 bne,a 200cd9c <_Thread_Reset+0x58> 200cd7c: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200cd80: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200cd84: 80 a0 60 02 cmp %g1, 2 200cd88: 32 80 00 05 bne,a 200cd9c <_Thread_Reset+0x58> 200cd8c: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200cd90: 7f ff f2 41 call 2009694 <_Watchdog_Remove> <== NOT EXECUTED 200cd94: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200cd98: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 200cd9c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200cda0: 80 a0 40 19 cmp %g1, %i1 200cda4: 02 80 00 05 be 200cdb8 <_Thread_Reset+0x74> 200cda8: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 200cdac: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 200cdb0: 7f ff ef b0 call 2008c70 <_Thread_Set_priority> 200cdb4: 81 e8 00 00 restore 200cdb8: 81 c7 e0 08 ret 200cdbc: 81 e8 00 00 restore 0200c004 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200c004: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200c008: 03 00 80 5d sethi %hi(0x2017400), %g1 200c00c: e0 00 63 b4 ld [ %g1 + 0x3b4 ], %l0 ! 20177b4 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200c010: 7f ff d7 4c call 2001d40 200c014: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200c018: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200c01c: c4 04 40 00 ld [ %l1 ], %g2 200c020: c2 04 60 08 ld [ %l1 + 8 ], %g1 200c024: 80 a0 80 01 cmp %g2, %g1 200c028: 32 80 00 03 bne,a 200c034 <_Thread_Reset_timeslice+0x30> 200c02c: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 200c030: 30 80 00 18 b,a 200c090 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200c034: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c038: 82 04 60 04 add %l1, 4, %g1 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 200c03c: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c040: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c044: 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; 200c048: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200c04c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c050: 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; 200c054: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200c058: 7f ff d7 3e call 2001d50 200c05c: 01 00 00 00 nop 200c060: 7f ff d7 38 call 2001d40 200c064: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200c068: 05 00 80 5d sethi %hi(0x2017400), %g2 200c06c: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 2017780 <_Thread_Heir> 200c070: 80 a4 00 01 cmp %l0, %g1 200c074: 32 80 00 05 bne,a 200c088 <_Thread_Reset_timeslice+0x84> 200c078: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 200c07c: c2 04 40 00 ld [ %l1 ], %g1 200c080: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] _Context_Switch_necessary = TRUE; 200c084: 84 10 20 01 mov 1, %g2 200c088: 03 00 80 5d sethi %hi(0x2017400), %g1 200c08c: c4 28 63 c4 stb %g2, [ %g1 + 0x3c4 ] ! 20177c4 <_Context_Switch_necessary> _ISR_Enable( level ); 200c090: 7f ff d7 30 call 2001d50 200c094: 81 e8 00 00 restore 200c098: 01 00 00 00 nop 020099c0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 20099c0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 20099c4: 7f ff e4 52 call 2002b0c 20099c8: 01 00 00 00 nop 20099cc: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 20099d0: 80 8e 60 ff btst 0xff, %i1 20099d4: 22 80 00 04 be,a 20099e4 <_Thread_Resume+0x24> 20099d8: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 20099dc: 10 80 00 04 b 20099ec <_Thread_Resume+0x2c> 20099e0: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 20099e4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20099e8: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 20099ec: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 20099f0: 80 a0 60 00 cmp %g1, 0 20099f4: 22 80 00 03 be,a 2009a00 <_Thread_Resume+0x40> 20099f8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 20099fc: 30 80 00 2e b,a 2009ab4 <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 2009a00: 80 88 60 02 btst 2, %g1 2009a04: 02 80 00 2c be 2009ab4 <_Thread_Resume+0xf4> 2009a08: 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 ) ) { 2009a0c: 80 a0 60 00 cmp %g1, 0 2009a10: 12 80 00 29 bne 2009ab4 <_Thread_Resume+0xf4> 2009a14: c2 26 20 10 st %g1, [ %i0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2009a18: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 2009a1c: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2009a20: c2 11 00 00 lduh [ %g4 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 2009a24: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 2009a28: 82 10 40 02 or %g1, %g2, %g1 2009a2c: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009a30: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009a34: 1b 00 80 90 sethi %hi(0x2024000), %o5 2009a38: c2 26 00 00 st %g1, [ %i0 ] 2009a3c: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2 old_last_node = the_chain->last; 2009a40: c2 00 e0 08 ld [ %g3 + 8 ], %g1 2009a44: c8 13 61 e8 lduh [ %o5 + 0x1e8 ], %g4 the_chain->last = the_node; 2009a48: f0 20 e0 08 st %i0, [ %g3 + 8 ] 2009a4c: 84 10 80 04 or %g2, %g4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2009a50: c2 26 20 04 st %g1, [ %i0 + 4 ] 2009a54: c4 33 61 e8 sth %g2, [ %o5 + 0x1e8 ] 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; 2009a58: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 2009a5c: 7f ff e4 30 call 2002b1c 2009a60: 90 10 00 10 mov %l0, %o0 2009a64: 7f ff e4 2a call 2002b0c 2009a68: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 2009a6c: 07 00 80 90 sethi %hi(0x2024000), %g3 2009a70: c2 00 e1 c0 ld [ %g3 + 0x1c0 ], %g1 ! 20241c0 <_Thread_Heir> 2009a74: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 2009a78: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2009a7c: 80 a0 80 01 cmp %g2, %g1 2009a80: 1a 80 00 0d bcc 2009ab4 <_Thread_Resume+0xf4> 2009a84: 03 00 80 90 sethi %hi(0x2024000), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009a88: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 20241f4 <_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; 2009a8c: f0 20 e1 c0 st %i0, [ %g3 + 0x1c0 ] if ( _Thread_Executing->is_preemptible || 2009a90: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 2009a94: 80 a0 60 00 cmp %g1, 0 2009a98: 32 80 00 05 bne,a 2009aac <_Thread_Resume+0xec> 2009a9c: 84 10 20 01 mov 1, %g2 2009aa0: 80 a0 a0 00 cmp %g2, 0 2009aa4: 12 80 00 04 bne 2009ab4 <_Thread_Resume+0xf4> 2009aa8: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009aac: 03 00 80 90 sethi %hi(0x2024000), %g1 2009ab0: c4 28 62 04 stb %g2, [ %g1 + 0x204 ] ! 2024204 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 2009ab4: 7f ff e4 1a call 2002b1c 2009ab8: 91 e8 00 10 restore %g0, %l0, %o0 2009abc: 01 00 00 00 nop 02008294 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 2008294: 9d e3 bf 98 save %sp, -104, %sp 2008298: 03 00 80 5a sethi %hi(0x2016800), %g1 200829c: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 20168c0 20082a0: 80 a6 40 01 cmp %i1, %g1 20082a4: 2a 80 00 02 bcs,a 20082ac <_Thread_Stack_Allocate+0x18> 20082a8: 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 ) { 20082ac: 03 00 80 5d sethi %hi(0x2017400), %g1 20082b0: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> 20082b4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 20082b8: 80 a0 60 00 cmp %g1, 0 20082bc: 22 80 00 06 be,a 20082d4 <_Thread_Stack_Allocate+0x40> 20082c0: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 20082c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20082c8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 20082cc: 10 80 00 05 b 20082e0 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED 20082d0: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 20082d4: 40 00 02 20 call 2008b54 <_Workspace_Allocate> 20082d8: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 20082dc: 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 ) 20082e0: 80 a0 00 08 cmp %g0, %o0 20082e4: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 20082e8: b0 0e 40 18 and %i1, %i0, %i0 20082ec: 81 c7 e0 08 ret 20082f0: 81 e8 00 00 restore 020082f4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 20082f4: 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 ) 20082f8: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 20082fc: 80 a0 60 00 cmp %g1, 0 2008300: 02 80 00 09 be 2008324 <_Thread_Stack_Free+0x30> 2008304: 03 00 80 5d sethi %hi(0x2017400), %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 ) 2008308: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 201778c <_Configuration_Table> 200830c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008310: 80 a0 60 00 cmp %g1, 0 2008314: 02 80 00 06 be 200832c <_Thread_Stack_Free+0x38> 2008318: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 (*_Configuration_Table->stack_free_hook)( 200831c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008320: 01 00 00 00 nop <== NOT EXECUTED 2008324: 81 c7 e0 08 ret <== NOT EXECUTED 2008328: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 200832c: 40 00 02 03 call 2008b38 <_Workspace_Free> 2008330: 91 e8 00 08 restore %g0, %o0, %o0 2008334: 01 00 00 00 nop 02007c98 <_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 ) { 2007c98: 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; 2007c9c: 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); 2007ca0: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2007ca4: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2007ca8: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2007cac: 82 06 60 38 add %i1, 0x38, %g1 2007cb0: c2 26 60 40 st %g1, [ %i1 + 0x40 ] header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2007cb4: 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); 2007cb8: 83 34 a0 06 srl %l2, 6, %g1 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 2007cbc: ec 06 20 38 ld [ %i0 + 0x38 ], %l6 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 2007cc0: 85 28 60 04 sll %g1, 4, %g2 2007cc4: 83 28 60 02 sll %g1, 2, %g1 2007cc8: 84 20 80 01 sub %g2, %g1, %g2 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2007ccc: 12 80 00 31 bne 2007d90 <_Thread_queue_Enqueue_priority+0xf8> 2007cd0: a6 06 00 02 add %i0, %g2, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2007cd4: a8 04 e0 04 add %l3, 4, %l4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 2007cd8: aa 10 00 02 mov %g2, %l5 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 2007cdc: 7f ff e8 19 call 2001d40 2007ce0: 01 00 00 00 nop 2007ce4: a6 10 00 08 mov %o0, %l3 search_thread = (Thread_Control *) header->first; 2007ce8: a2 10 3f ff mov -1, %l1 2007cec: 10 80 00 18 b 2007d4c <_Thread_queue_Enqueue_priority+0xb4> 2007cf0: e0 06 00 15 ld [ %i0 + %l5 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority <= search_priority ) 2007cf4: 80 a4 80 11 cmp %l2, %l1 2007cf8: 28 80 00 19 bleu,a 2007d5c <_Thread_queue_Enqueue_priority+0xc4> 2007cfc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 2007d00: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 2007d04: 80 a4 00 14 cmp %l0, %l4 2007d08: 22 80 00 15 be,a 2007d5c <_Thread_queue_Enqueue_priority+0xc4> 2007d0c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 2007d10: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2007d14: 80 a4 80 11 cmp %l2, %l1 2007d18: 28 80 00 11 bleu,a 2007d5c <_Thread_queue_Enqueue_priority+0xc4> 2007d1c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 2007d20: 7f ff e8 0c call 2001d50 2007d24: 90 10 00 13 mov %l3, %o0 2007d28: 7f ff e8 06 call 2001d40 2007d2c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007d30: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007d34: 80 8d 80 01 btst %l6, %g1 2007d38: 32 80 00 05 bne,a 2007d4c <_Thread_queue_Enqueue_priority+0xb4> 2007d3c: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 2007d40: 7f ff e8 04 call 2001d50 <== NOT EXECUTED 2007d44: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2007d48: 30 bf ff e5 b,a 2007cdc <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2007d4c: 80 a4 00 14 cmp %l0, %l4 2007d50: 32 bf ff e9 bne,a 2007cf4 <_Thread_queue_Enqueue_priority+0x5c> 2007d54: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2007d58: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007d5c: 80 a0 60 01 cmp %g1, 1 2007d60: 12 80 00 48 bne 2007e80 <_Thread_queue_Enqueue_priority+0x1e8> 2007d64: 90 10 00 13 mov %l3, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 2007d68: 80 a4 80 11 cmp %l2, %l1 2007d6c: 02 80 00 3a be 2007e54 <_Thread_queue_Enqueue_priority+0x1bc> 2007d70: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2007d74: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007d78: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 2007d7c: 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; 2007d80: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 2007d84: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2007d88: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007d8c: 30 80 00 39 b,a 2007e70 <_Thread_queue_Enqueue_priority+0x1d8> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2007d90: 03 00 80 5a sethi %hi(0x2016800), %g1 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 2007d94: aa 10 00 13 mov %l3, %l5 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2007d98: ae 10 60 c4 or %g1, 0xc4, %l7 2007d9c: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 2007da0: 7f ff e7 e8 call 2001d40 2007da4: a2 00 60 01 add %g1, 1, %l1 2007da8: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 2007dac: 10 80 00 19 b 2007e10 <_Thread_queue_Enqueue_priority+0x178> 2007db0: e0 05 60 08 ld [ %l5 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority >= search_priority ) 2007db4: 80 a4 80 11 cmp %l2, %l1 2007db8: 3a 80 00 1a bcc,a 2007e20 <_Thread_queue_Enqueue_priority+0x188> 2007dbc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2007dc0: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 2007dc4: 80 a4 00 13 cmp %l0, %l3 2007dc8: 22 80 00 16 be,a 2007e20 <_Thread_queue_Enqueue_priority+0x188> 2007dcc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 2007dd0: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 2007dd4: 80 a4 80 11 cmp %l2, %l1 2007dd8: 3a 80 00 12 bcc,a 2007e20 <_Thread_queue_Enqueue_priority+0x188> 2007ddc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 2007de0: 7f ff e7 dc call 2001d50 2007de4: 90 10 00 14 mov %l4, %o0 2007de8: 7f ff e7 d6 call 2001d40 2007dec: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2007df0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007df4: 80 8d 80 01 btst %l6, %g1 2007df8: 32 80 00 06 bne,a 2007e10 <_Thread_queue_Enqueue_priority+0x178> 2007dfc: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 2007e00: 7f ff e7 d4 call 2001d50 <== NOT EXECUTED 2007e04: 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; 2007e08: 10 bf ff e6 b 2007da0 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 2007e0c: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2007e10: 80 a4 00 13 cmp %l0, %l3 2007e14: 32 bf ff e8 bne,a 2007db4 <_Thread_queue_Enqueue_priority+0x11c> 2007e18: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2007e1c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2007e20: 80 a0 60 01 cmp %g1, 1 2007e24: 12 80 00 17 bne 2007e80 <_Thread_queue_Enqueue_priority+0x1e8> 2007e28: 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 ) 2007e2c: 80 a4 80 11 cmp %l2, %l1 2007e30: 02 80 00 09 be 2007e54 <_Thread_queue_Enqueue_priority+0x1bc> 2007e34: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2007e38: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2007e3c: 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; 2007e40: 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; 2007e44: f0 26 60 44 st %i0, [ %i1 + 0x44 ] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 2007e48: 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; 2007e4c: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007e50: 30 80 00 08 b,a 2007e70 <_Thread_queue_Enqueue_priority+0x1d8> 2007e54: 82 04 20 3c add %l0, 0x3c, %g1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 2007e58: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2007e5c: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2007e60: 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; 2007e64: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 2007e68: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 2007e6c: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2007e70: 7f ff e7 b8 call 2001d50 2007e74: b0 10 20 01 mov 1, %i0 2007e78: 81 c7 e0 08 ret 2007e7c: 81 e8 00 00 restore * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 2007e80: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 <== NOT EXECUTED * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 2007e84: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 2007e88: 81 c7 e0 08 ret <== NOT EXECUTED 2007e8c: 81 e8 00 00 restore <== NOT EXECUTED 0200ce88 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200ce88: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200ce8c: 7f ff d3 ad call 2001d40 200ce90: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200ce94: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200ce98: 03 00 00 ef sethi %hi(0x3bc00), %g1 200ce9c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200cea0: 80 88 80 01 btst %g2, %g1 200cea4: 32 80 00 04 bne,a 200ceb4 <_Thread_queue_Extract_fifo+0x2c> 200cea8: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 200ceac: 7f ff d3 a9 call 2001d50 <== NOT EXECUTED 200ceb0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200ceb4: 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 ) ) { 200ceb8: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 200cebc: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cec0: c4 20 60 04 st %g2, [ %g1 + 4 ] 200cec4: 80 a0 e0 02 cmp %g3, 2 200cec8: 02 80 00 06 be 200cee0 <_Thread_queue_Extract_fifo+0x58> 200cecc: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 200ced0: 7f ff d3 a0 call 2001d50 200ced4: 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 ); 200ced8: 10 80 00 0a b 200cf00 <_Thread_queue_Extract_fifo+0x78> 200cedc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200cee0: 82 10 20 03 mov 3, %g1 200cee4: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200cee8: 7f ff d3 9a call 2001d50 200ceec: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 200cef0: 7f ff ee be call 20089e8 <_Watchdog_Remove> 200cef4: 90 06 60 48 add %i1, 0x48, %o0 200cef8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200cefc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200cf00: 7f ff e8 d4 call 2007250 <_Thread_Clear_state> 200cf04: 81 e8 00 00 restore 200cf08: 01 00 00 00 nop 0200bd80 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 200bd80: 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 ); 200bd84: 7f ff d7 ef call 2001d40 200bd88: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200bd8c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200bd90: 03 00 00 ef sethi %hi(0x3bc00), %g1 200bd94: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200bd98: 80 88 80 01 btst %g2, %g1 200bd9c: 32 80 00 03 bne,a 200bda8 <_Thread_queue_Extract_priority_helper+0x28> 200bda0: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 200bda4: 30 80 00 1c b,a 200be14 <_Thread_queue_Extract_priority_helper+0x94> <== NOT EXECUTED */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200bda8: 82 06 60 3c add %i1, 0x3c, %g1 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 200bdac: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200bdb0: 80 a0 c0 01 cmp %g3, %g1 200bdb4: 02 80 00 13 be 200be00 <_Thread_queue_Extract_priority_helper+0x80> 200bdb8: 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; 200bdbc: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 200bdc0: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 200bdc4: 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; 200bdc8: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 200bdcc: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 200bdd0: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 200bdd4: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 200bdd8: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 200bddc: 80 a0 80 01 cmp %g2, %g1 200bde0: 02 80 00 0a be 200be08 <_Thread_queue_Extract_priority_helper+0x88> 200bde4: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 200bde8: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 200bdec: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 200bdf0: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 200bdf4: 82 00 e0 3c add %g3, 0x3c, %g1 200bdf8: 10 80 00 04 b 200be08 <_Thread_queue_Extract_priority_helper+0x88> 200bdfc: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 200be00: 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; 200be04: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 200be08: 80 8e a0 ff btst 0xff, %i2 200be0c: 22 80 00 04 be,a 200be1c <_Thread_queue_Extract_priority_helper+0x9c> 200be10: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 200be14: 7f ff d7 cf call 2001d50 200be18: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200be1c: 80 a0 60 02 cmp %g1, 2 200be20: 02 80 00 06 be 200be38 <_Thread_queue_Extract_priority_helper+0xb8> 200be24: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200be28: 7f ff d7 ca call 2001d50 200be2c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200be30: 10 80 00 08 b 200be50 <_Thread_queue_Extract_priority_helper+0xd0> 200be34: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200be38: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200be3c: 7f ff d7 c5 call 2001d50 200be40: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200be44: 7f ff f2 e9 call 20089e8 <_Watchdog_Remove> 200be48: 90 06 20 48 add %i0, 0x48, %o0 200be4c: b2 16 63 f8 or %i1, 0x3f8, %i1 200be50: 7f ff ed 00 call 2007250 <_Thread_Clear_state> 200be54: 81 e8 00 00 restore 200be58: 01 00 00 00 nop 0200be5c <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 200be5c: c4 02 20 44 ld [ %o0 + 0x44 ], %g2 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 200be60: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 200be64: 80 a0 e0 00 cmp %g3, 0 200be68: 02 80 00 0f be 200bea4 <_Thread_queue_Process_timeout+0x48> 200be6c: 92 10 00 08 mov %o0, %o1 200be70: 03 00 80 5d sethi %hi(0x2017400), %g1 200be74: c2 00 63 b4 ld [ %g1 + 0x3b4 ], %g1 ! 20177b4 <_Thread_Executing> 200be78: 80 a2 00 01 cmp %o0, %g1 200be7c: 32 80 00 0b bne,a 200bea8 <_Thread_queue_Process_timeout+0x4c> 200be80: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 200be84: 80 a0 e0 03 cmp %g3, 3 200be88: 02 80 00 0d be 200bebc <_Thread_queue_Process_timeout+0x60> 200be8c: 01 00 00 00 nop the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200be90: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 200be94: c2 22 20 34 st %g1, [ %o0 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200be98: 82 10 20 02 mov 2, %g1 200be9c: 81 c3 e0 08 retl 200bea0: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200bea4: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200bea8: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200beac: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200beb0: 82 13 c0 00 mov %o7, %g1 200beb4: 7f ff ff a8 call 200bd54 <_Thread_queue_Extract> 200beb8: 9e 10 40 00 mov %g1, %o7 200bebc: 81 c3 e0 08 retl <== NOT EXECUTED 200bec0: 01 00 00 00 nop 0200a1d0 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a1d0: 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; 200a1d4: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 200a1d8: 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; 200a1dc: 91 38 60 1f sra %g1, 0x1f, %o0 200a1e0: 92 10 00 01 mov %g1, %o1 200a1e4: 83 30 60 1d srl %g1, 0x1d, %g1 200a1e8: 87 2a 60 03 sll %o1, 3, %g3 200a1ec: 85 2a 20 03 sll %o0, 3, %g2 200a1f0: 84 10 40 02 or %g1, %g2, %g2 200a1f4: 83 30 e0 1b srl %g3, 0x1b, %g1 200a1f8: 99 28 a0 05 sll %g2, 5, %o4 200a1fc: 9b 28 e0 05 sll %g3, 5, %o5 200a200: 98 10 40 0c or %g1, %o4, %o4 200a204: 9a a3 40 03 subcc %o5, %g3, %o5 200a208: 83 33 60 1a srl %o5, 0x1a, %g1 200a20c: 98 63 00 02 subx %o4, %g2, %o4 200a210: 97 2b 60 06 sll %o5, 6, %o3 200a214: 95 2b 20 06 sll %o4, 6, %o2 200a218: 96 a2 c0 0d subcc %o3, %o5, %o3 200a21c: 94 10 40 0a or %g1, %o2, %o2 200a220: 94 62 80 0c subx %o2, %o4, %o2 200a224: 96 82 c0 09 addcc %o3, %o1, %o3 200a228: 94 42 80 08 addx %o2, %o0, %o2 200a22c: 83 32 e0 1e srl %o3, 0x1e, %g1 200a230: 85 2a a0 02 sll %o2, 2, %g2 200a234: 84 10 40 02 or %g1, %g2, %g2 200a238: 87 2a e0 02 sll %o3, 2, %g3 200a23c: 96 82 c0 03 addcc %o3, %g3, %o3 200a240: 94 42 80 02 addx %o2, %g2, %o2 200a244: 83 32 e0 1e srl %o3, 0x1e, %g1 200a248: 85 2a a0 02 sll %o2, 2, %g2 200a24c: 84 10 40 02 or %g1, %g2, %g2 200a250: 87 2a e0 02 sll %o3, 2, %g3 200a254: 96 82 c0 03 addcc %o3, %g3, %o3 200a258: 94 42 80 02 addx %o2, %g2, %o2 200a25c: 83 32 e0 1e srl %o3, 0x1e, %g1 200a260: 85 2a a0 02 sll %o2, 2, %g2 200a264: 84 10 40 02 or %g1, %g2, %g2 200a268: 87 2a e0 02 sll %o3, 2, %g3 200a26c: 96 82 c0 03 addcc %o3, %g3, %o3 200a270: 94 42 80 02 addx %o2, %g2, %o2 200a274: 85 32 e0 17 srl %o3, 0x17, %g2 200a278: 83 2a a0 09 sll %o2, 9, %g1 200a27c: 9b 2a e0 09 sll %o3, 9, %o5 200a280: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 200a284: 96 83 40 0f addcc %o5, %o7, %o3 200a288: 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; 200a28c: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a290: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 200a294: 80 92 80 0b orcc %o2, %o3, %g0 200a298: 12 80 00 06 bne 200a2b0 <_Timespec_Divide+0xe0> 200a29c: d0 06 00 00 ld [ %i0 ], %o0 *ival_percentage = 0; 200a2a0: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 200a2a4: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 200a2a8: 81 c7 e0 08 ret <== NOT EXECUTED 200a2ac: 81 e8 00 00 restore <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a2b0: 92 10 00 08 mov %o0, %o1 200a2b4: 83 32 60 1d srl %o1, 0x1d, %g1 200a2b8: 9b 2a 60 03 sll %o1, 3, %o5 200a2bc: 91 3a 20 1f sra %o0, 0x1f, %o0 200a2c0: 99 2a 20 03 sll %o0, 3, %o4 200a2c4: 98 10 40 0c or %g1, %o4, %o4 200a2c8: 83 33 60 1b srl %o5, 0x1b, %g1 200a2cc: 85 2b 20 05 sll %o4, 5, %g2 200a2d0: 87 2b 60 05 sll %o5, 5, %g3 200a2d4: 84 10 40 02 or %g1, %g2, %g2 200a2d8: 86 a0 c0 0d subcc %g3, %o5, %g3 200a2dc: 83 30 e0 1a srl %g3, 0x1a, %g1 200a2e0: 84 60 80 0c subx %g2, %o4, %g2 200a2e4: 9b 28 e0 06 sll %g3, 6, %o5 200a2e8: 99 28 a0 06 sll %g2, 6, %o4 200a2ec: 9a a3 40 03 subcc %o5, %g3, %o5 200a2f0: 98 10 40 0c or %g1, %o4, %o4 200a2f4: 98 63 00 02 subx %o4, %g2, %o4 200a2f8: 9a 83 40 09 addcc %o5, %o1, %o5 200a2fc: 83 33 60 1e srl %o5, 0x1e, %g1 200a300: 98 43 00 08 addx %o4, %o0, %o4 200a304: 87 2b 60 02 sll %o5, 2, %g3 200a308: 85 2b 20 02 sll %o4, 2, %g2 200a30c: 9a 83 40 03 addcc %o5, %g3, %o5 200a310: 84 10 40 02 or %g1, %g2, %g2 200a314: 83 33 60 1e srl %o5, 0x1e, %g1 200a318: 98 43 00 02 addx %o4, %g2, %o4 200a31c: 87 2b 60 02 sll %o5, 2, %g3 200a320: 85 2b 20 02 sll %o4, 2, %g2 200a324: 9a 83 40 03 addcc %o5, %g3, %o5 200a328: 84 10 40 02 or %g1, %g2, %g2 200a32c: 83 33 60 1e srl %o5, 0x1e, %g1 200a330: 98 43 00 02 addx %o4, %g2, %o4 200a334: 87 2b 60 02 sll %o5, 2, %g3 200a338: 85 2b 20 02 sll %o4, 2, %g2 200a33c: 9a 83 40 03 addcc %o5, %g3, %o5 200a340: 84 10 40 02 or %g1, %g2, %g2 200a344: 98 43 00 02 addx %o4, %g2, %o4 200a348: 83 2b 20 09 sll %o4, 9, %g1 200a34c: 85 33 60 17 srl %o5, 0x17, %g2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a350: 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; 200a354: a0 10 80 01 or %g2, %g1, %l0 200a358: 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; 200a35c: a2 84 40 13 addcc %l1, %l3, %l1 200a360: 83 34 60 1e srl %l1, 0x1e, %g1 200a364: 87 2c 60 02 sll %l1, 2, %g3 200a368: a5 3c a0 1f sra %l2, 0x1f, %l2 200a36c: a0 44 00 12 addx %l0, %l2, %l0 200a370: 85 2c 20 02 sll %l0, 2, %g2 200a374: 84 10 40 02 or %g1, %g2, %g2 200a378: 83 30 e0 1b srl %g3, 0x1b, %g1 200a37c: 99 28 a0 05 sll %g2, 5, %o4 200a380: 9b 28 e0 05 sll %g3, 5, %o5 200a384: 98 10 40 0c or %g1, %o4, %o4 200a388: 9a a3 40 03 subcc %o5, %g3, %o5 200a38c: 98 63 00 02 subx %o4, %g2, %o4 200a390: 9a 83 40 11 addcc %o5, %l1, %o5 200a394: 83 33 60 1e srl %o5, 0x1e, %g1 200a398: 98 43 00 10 addx %o4, %l0, %o4 200a39c: 87 2b 60 02 sll %o5, 2, %g3 200a3a0: 85 2b 20 02 sll %o4, 2, %g2 200a3a4: 9a 83 40 03 addcc %o5, %g3, %o5 200a3a8: 84 10 40 02 or %g1, %g2, %g2 200a3ac: 83 33 60 1e srl %o5, 0x1e, %g1 200a3b0: 87 2b 60 02 sll %o5, 2, %g3 200a3b4: 98 43 00 02 addx %o4, %g2, %o4 200a3b8: 9a 83 40 03 addcc %o5, %g3, %o5 200a3bc: 85 2b 20 02 sll %o4, 2, %g2 200a3c0: 84 10 40 02 or %g1, %g2, %g2 200a3c4: 83 33 60 1b srl %o5, 0x1b, %g1 200a3c8: 98 43 00 02 addx %o4, %g2, %o4 200a3cc: 99 2b 20 05 sll %o4, 5, %o4 200a3d0: 98 10 40 0c or %g1, %o4, %o4 200a3d4: 93 2b 60 05 sll %o5, 5, %o1 200a3d8: 40 00 35 22 call 2017860 <__udivdi3> 200a3dc: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 200a3e0: 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; 200a3e4: a0 10 00 08 mov %o0, %l0 200a3e8: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 200a3ec: 96 10 23 e8 mov 0x3e8, %o3 200a3f0: 40 00 35 1c call 2017860 <__udivdi3> 200a3f4: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 200a3f8: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a3fc: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 200a400: 94 10 20 00 clr %o2 200a404: 92 10 00 11 mov %l1, %o1 200a408: 40 00 35 f2 call 2017bd0 <__umoddi3> 200a40c: 96 10 23 e8 mov 0x3e8, %o3 200a410: d2 26 c0 00 st %o1, [ %i3 ] 200a414: 81 c7 e0 08 ret 200a418: 81 e8 00 00 restore 0200d3c0 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 200d3c0: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 200d3c4: 40 00 13 e1 call 2012348 <_Chain_Extract> 200d3c8: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 200d3cc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d3d0: 80 a0 60 00 cmp %g1, 0 200d3d4: 02 80 00 04 be 200d3e4 <_User_extensions_Remove_set+0x24> 200d3d8: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 200d3dc: 40 00 13 db call 2012348 <_Chain_Extract> <== NOT EXECUTED 200d3e0: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 200d3e4: 81 c7 e0 08 ret 200d3e8: 81 e8 00 00 restore 02008748 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2008748: 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 ; 200874c: 03 00 80 5e sethi %hi(0x2017800), %g1 2008750: e0 00 61 28 ld [ %g1 + 0x128 ], %l0 ! 2017928 <_User_extensions_List> 2008754: 82 10 61 28 or %g1, 0x128, %g1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008758: a4 00 60 04 add %g1, 4, %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 200875c: 03 00 80 5d sethi %hi(0x2017400), %g1 2008760: 10 80 00 0d b 2008794 <_User_extensions_Thread_create+0x4c> 2008764: a2 10 63 b4 or %g1, 0x3b4, %l1 ! 20177b4 <_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 ) { 2008768: 80 a0 60 00 cmp %g1, 0 200876c: 02 80 00 09 be 2008790 <_User_extensions_Thread_create+0x48> 2008770: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2008774: 9f c0 40 00 call %g1 2008778: d0 04 40 00 ld [ %l1 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 200877c: 80 8a 20 ff btst 0xff, %o0 2008780: 32 80 00 05 bne,a 2008794 <_User_extensions_Thread_create+0x4c> 2008784: e0 04 00 00 ld [ %l0 ], %l0 2008788: 81 c7 e0 08 ret <== NOT EXECUTED 200878c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 2008790: 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 ) ; 2008794: 80 a4 00 12 cmp %l0, %l2 2008798: 32 bf ff f4 bne,a 2008768 <_User_extensions_Thread_create+0x20> 200879c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 20087a0: 81 c7 e0 08 ret 20087a4: 91 e8 20 01 restore %g0, 1, %o0 02015fc8 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 2015fc8: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 2015fcc: 80 a6 60 00 cmp %i1, 0 2015fd0: 02 80 00 31 be 2016094 <_Watchdog_Adjust_to_chain+0xcc> 2015fd4: 01 00 00 00 nop return; } _ISR_Disable( level ); 2015fd8: 7f ff d5 48 call 200b4f8 2015fdc: 01 00 00 00 nop 2015fe0: a4 10 00 08 mov %o0, %l2 if ( !_Chain_Is_empty( header ) ) { 2015fe4: c2 06 00 00 ld [ %i0 ], %g1 2015fe8: a2 06 20 04 add %i0, 4, %l1 2015fec: 80 a0 40 11 cmp %g1, %l1 2015ff0: 02 80 00 27 be 201608c <_Watchdog_Adjust_to_chain+0xc4> 2015ff4: 01 00 00 00 nop 2015ff8: a6 06 a0 04 add %i2, 4, %l3 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 2015ffc: c4 06 00 00 ld [ %i0 ], %g2 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 2016000: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0 2016004: 80 a6 40 10 cmp %i1, %l0 2016008: 3a 80 00 05 bcc,a 201601c <_Watchdog_Adjust_to_chain+0x54> 201600c: c0 20 a0 10 clr [ %g2 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 2016010: 82 24 00 19 sub %l0, %i1, %g1 2016014: 10 80 00 1e b 201608c <_Watchdog_Adjust_to_chain+0xc4> 2016018: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 201601c: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2016020: 80 a0 80 11 cmp %g2, %l1 2016024: 32 80 00 04 bne,a 2016034 <_Watchdog_Adjust_to_chain+0x6c> 2016028: c2 00 80 00 ld [ %g2 ], %g1 201602c: 10 80 00 04 b 201603c <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED 2016030: 84 10 20 00 clr %g2 <== NOT EXECUTED Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 2016034: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 2016038: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 201603c: e6 20 80 00 st %l3, [ %g2 ] old_last_node = the_chain->last; 2016040: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 2016044: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2016048: 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; 201604c: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 2016050: 7f ff d5 2e call 200b508 2016054: 90 10 00 12 mov %l2, %o0 2016058: 7f ff d5 28 call 200b4f8 201605c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2016060: c2 06 00 00 ld [ %i0 ], %g1 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 2016064: 80 a0 40 11 cmp %g1, %l1 2016068: 02 80 00 09 be 201608c <_Watchdog_Adjust_to_chain+0xc4> 201606c: 01 00 00 00 nop 2016070: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2016074: 80 a0 60 00 cmp %g1, 0 2016078: 22 bf ff ea be,a 2016020 <_Watchdog_Adjust_to_chain+0x58> 201607c: c4 06 00 00 ld [ %i0 ], %g2 return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 2016080: b2 a6 40 10 subcc %i1, %l0, %i1 2016084: 32 bf ff df bne,a 2016000 <_Watchdog_Adjust_to_chain+0x38> 2016088: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED break; } } } _ISR_Enable( level ); 201608c: 7f ff d5 1f call 200b508 2016090: 91 e8 00 12 restore %g0, %l2, %o0 2016094: 81 c7 e0 08 ret 2016098: 81 e8 00 00 restore 02008880 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008880: 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; 2008884: 03 00 80 5d sethi %hi(0x2017400), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008888: aa 10 00 18 mov %i0, %l5 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 200888c: e6 00 63 90 ld [ %g1 + 0x390 ], %l3 _ISR_Disable( level ); 2008890: 7f ff e5 2c call 2001d40 2008894: 01 00 00 00 nop 2008898: 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 ) { 200889c: c2 06 60 08 ld [ %i1 + 8 ], %g1 20088a0: 80 a0 60 00 cmp %g1, 0 20088a4: 02 80 00 03 be 20088b0 <_Watchdog_Insert+0x30> 20088a8: 07 00 80 5e sethi %hi(0x2017800), %g3 _ISR_Enable( level ); 20088ac: 30 80 00 39 b,a 2008990 <_Watchdog_Insert+0x110> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 20088b0: c2 00 e0 40 ld [ %g3 + 0x40 ], %g1 ! 2017840 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 20088b4: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 20088b8: 82 00 60 01 inc %g1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 20088bc: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 20088c0: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 20088c4: 03 00 80 5d sethi %hi(0x2017400), %g1 20088c8: a8 10 63 b0 or %g1, 0x3b0, %l4 ! 20177b0 <_Watchdog_Sync_level> 20088cc: ac 10 00 14 mov %l4, %l6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 20088d0: 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 ; 20088d4: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 20088d8: 80 a4 a0 00 cmp %l2, 0 20088dc: 22 80 00 1c be,a 200894c <_Watchdog_Insert+0xcc> 20088e0: c4 04 60 04 ld [ %l1 + 4 ], %g2 20088e4: c2 04 40 00 ld [ %l1 ], %g1 20088e8: 80 a0 60 00 cmp %g1, 0 20088ec: 22 80 00 18 be,a 200894c <_Watchdog_Insert+0xcc> 20088f0: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 20088f4: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 20088f8: 80 a4 80 10 cmp %l2, %l0 20088fc: 1a 80 00 04 bcc 200890c <_Watchdog_Insert+0x8c> 2008900: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 2008904: 10 80 00 11 b 2008948 <_Watchdog_Insert+0xc8> 2008908: c2 24 60 10 st %g1, [ %l1 + 0x10 ] * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 200890c: 7f ff e5 11 call 2001d50 2008910: 90 10 00 18 mov %i0, %o0 2008914: 7f ff e5 0b call 2001d40 2008918: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 200891c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008920: 80 a0 60 01 cmp %g1, 1 2008924: 12 80 00 15 bne 2008978 <_Watchdog_Insert+0xf8> 2008928: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 200892c: c2 05 00 00 ld [ %l4 ], %g1 2008930: 80 a0 40 13 cmp %g1, %l3 2008934: 28 bf ff e9 bleu,a 20088d8 <_Watchdog_Insert+0x58> 2008938: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 200893c: e6 25 80 00 st %l3, [ %l6 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008940: 10 bf ff e5 b 20088d4 <_Watchdog_Insert+0x54> 2008944: e4 06 60 0c ld [ %i1 + 0xc ], %l2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 2008948: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 200894c: 03 00 80 5e sethi %hi(0x2017800), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2008950: c6 00 80 00 ld [ %g2 ], %g3 2008954: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 after_node->next = the_node; 2008958: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 200895c: c4 26 60 04 st %g2, [ %i1 + 4 ] 2008960: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 2008964: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 2008968: 82 10 20 02 mov 2, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 200896c: f2 20 e0 04 st %i1, [ %g3 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 2008970: c6 26 40 00 st %g3, [ %i1 ] 2008974: c2 26 60 08 st %g1, [ %i1 + 8 ] _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 2008978: 03 00 80 5d sethi %hi(0x2017400), %g1 _Watchdog_Sync_count--; 200897c: 05 00 80 5e sethi %hi(0x2017800), %g2 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 2008980: e6 20 63 b0 st %l3, [ %g1 + 0x3b0 ] _Watchdog_Sync_count--; 2008984: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 2008988: 82 00 7f ff add %g1, -1, %g1 200898c: c2 20 a0 40 st %g1, [ %g2 + 0x40 ] _ISR_Enable( level ); 2008990: 7f ff e4 f0 call 2001d50 2008994: 81 e8 00 00 restore 2008998: 01 00 00 00 nop 020089e8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 20089e8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 20089ec: 7f ff e4 d5 call 2001d40 20089f0: 01 00 00 00 nop previous_state = the_watchdog->state; 20089f4: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 20089f8: 80 a4 20 01 cmp %l0, 1 20089fc: 22 80 00 1e be,a 2008a74 <_Watchdog_Remove+0x8c> 2008a00: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 2008a04: 0a 80 00 1d bcs 2008a78 <_Watchdog_Remove+0x90> 2008a08: 03 00 80 5e sethi %hi(0x2017800), %g1 2008a0c: 80 a4 20 03 cmp %l0, 3 2008a10: 18 80 00 1a bgu 2008a78 <_Watchdog_Remove+0x90> 2008a14: 01 00 00 00 nop 2008a18: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2008a1c: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2008a20: c2 00 c0 00 ld [ %g3 ], %g1 2008a24: 80 a0 60 00 cmp %g1, 0 2008a28: 02 80 00 07 be 2008a44 <_Watchdog_Remove+0x5c> 2008a2c: 03 00 80 5e sethi %hi(0x2017800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2008a30: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 2008a34: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 2008a38: 82 00 40 02 add %g1, %g2, %g1 2008a3c: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 2008a40: 03 00 80 5e sethi %hi(0x2017800), %g1 2008a44: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 ! 2017840 <_Watchdog_Sync_count> 2008a48: 80 a0 60 00 cmp %g1, 0 2008a4c: 22 80 00 07 be,a 2008a68 <_Watchdog_Remove+0x80> 2008a50: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2008a54: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 2008a58: c4 00 63 90 ld [ %g1 + 0x390 ], %g2 ! 2017790 <_ISR_Nest_level> <== NOT EXECUTED 2008a5c: 03 00 80 5d sethi %hi(0x2017400), %g1 <== NOT EXECUTED 2008a60: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] ! 20177b0 <_Watchdog_Sync_level> <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2008a64: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 2008a68: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 2008a6c: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2008a70: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2008a74: 03 00 80 5e sethi %hi(0x2017800), %g1 2008a78: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 2017844 <_Watchdog_Ticks_since_boot> 2008a7c: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 2008a80: 7f ff e4 b4 call 2001d50 2008a84: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 2008a88: 81 c7 e0 08 ret 2008a8c: 81 e8 00 00 restore 02008ba0 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 2008ba0: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 2008ba4: 80 a6 20 00 cmp %i0, 0 2008ba8: 02 80 00 04 be 2008bb8 <_Workspace_Handler_initialization+0x18> 2008bac: 80 8e 20 07 btst 7, %i0 2008bb0: 02 80 00 06 be 2008bc8 <_Workspace_Handler_initialization+0x28> 2008bb4: 03 00 80 5d sethi %hi(0x2017400), %g1 _Internal_error_Occurred( 2008bb8: 90 10 20 00 clr %o0 2008bbc: 92 10 20 01 mov 1, %o1 2008bc0: 10 80 00 15 b 2008c14 <_Workspace_Handler_initialization+0x74> 2008bc4: 94 10 20 02 mov 2, %o2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 2008bc8: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 2008bcc: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 2008bd0: 80 a0 60 00 cmp %g1, 0 2008bd4: 02 80 00 07 be 2008bf0 <_Workspace_Handler_initialization+0x50> 2008bd8: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, size ); 2008bdc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2008be0: 92 10 20 00 clr %o1 <== NOT EXECUTED 2008be4: 40 00 13 25 call 200d878 <== NOT EXECUTED 2008be8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 2008bec: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2008bf0: 94 10 00 19 mov %i1, %o2 2008bf4: 11 00 80 5d sethi %hi(0x2017400), %o0 2008bf8: 96 10 20 08 mov 8, %o3 2008bfc: 7f ff f6 2a call 20064a4 <_Heap_Initialize> 2008c00: 90 12 23 14 or %o0, 0x314, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 2008c04: 80 a2 20 00 cmp %o0, 0 2008c08: 12 80 00 05 bne 2008c1c <_Workspace_Handler_initialization+0x7c> 2008c0c: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 2008c10: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 2008c14: 7f ff f6 ae call 20066cc <_Internal_error_Occurred> 2008c18: 01 00 00 00 nop 2008c1c: 81 c7 e0 08 ret 2008c20: 81 e8 00 00 restore 0201fe94 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 201fe94: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 201fe98: 7f ff ff 19 call 201fafc 201fe9c: 01 00 00 00 nop 201fea0: 80 a6 00 08 cmp %i0, %o0 201fea4: 02 80 00 06 be 201febc 201fea8: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 201feac: 7f ff d7 91 call 2015cf0 <__errno> 201feb0: 01 00 00 00 nop 201feb4: 10 80 00 07 b 201fed0 201feb8: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 201febc: 12 80 00 08 bne 201fedc 201fec0: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); 201fec4: 7f ff d7 8b call 2015cf0 <__errno> 201fec8: 01 00 00 00 nop 201fecc: 82 10 20 16 mov 0x16, %g1 ! 16 201fed0: c2 22 00 00 st %g1, [ %o0 ] 201fed4: 10 80 00 ae b 202018c 201fed8: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 201fedc: 80 a0 e0 1f cmp %g3, 0x1f 201fee0: 18 bf ff f9 bgu 201fec4 201fee4: 01 00 00 00 nop /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 201fee8: 83 2e 60 02 sll %i1, 2, %g1 201feec: 85 2e 60 04 sll %i1, 4, %g2 201fef0: 84 20 80 01 sub %g2, %g1, %g2 201fef4: 03 00 80 9b sethi %hi(0x2026c00), %g1 201fef8: 82 10 62 7c or %g1, 0x27c, %g1 ! 2026e7c <_POSIX_signals_Vectors> 201fefc: 82 00 40 02 add %g1, %g2, %g1 201ff00: c2 00 60 08 ld [ %g1 + 8 ], %g1 201ff04: 80 a0 60 01 cmp %g1, 1 201ff08: 02 80 00 a1 be 202018c 201ff0c: 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 ) ) 201ff10: 80 a6 60 08 cmp %i1, 8 201ff14: 02 80 00 06 be 201ff2c 201ff18: 80 a6 60 04 cmp %i1, 4 201ff1c: 02 80 00 04 be 201ff2c 201ff20: 80 a6 60 0b cmp %i1, 0xb 201ff24: 12 80 00 08 bne 201ff44 201ff28: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 201ff2c: 40 00 01 34 call 20203fc 201ff30: 01 00 00 00 nop 201ff34: 40 00 00 f6 call 202030c 201ff38: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 201ff3c: 81 c7 e0 08 ret 201ff40: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 201ff44: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 201ff48: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 201ff4c: 80 a6 a0 00 cmp %i2, 0 201ff50: 12 80 00 04 bne 201ff60 201ff54: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; 201ff58: 10 80 00 04 b 201ff68 201ff5c: c0 27 bf f4 clr [ %fp + -12 ] } else { siginfo->si_value = *value; 201ff60: c2 06 80 00 ld [ %i2 ], %g1 201ff64: c2 27 bf f4 st %g1, [ %fp + -12 ] 201ff68: 05 00 80 9a sethi %hi(0x2026800), %g2 201ff6c: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 ! 2026840 <_Thread_Dispatch_disable_level> 201ff70: 82 00 60 01 inc %g1 201ff74: c2 20 a0 40 st %g1, [ %g2 + 0x40 ] /* * 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; 201ff78: 03 00 80 9a sethi %hi(0x2026800), %g1 201ff7c: c6 00 61 04 ld [ %g1 + 0x104 ], %g3 ! 2026904 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 201ff80: c2 00 e1 6c ld [ %g3 + 0x16c ], %g1 201ff84: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 201ff88: 80 ae 00 01 andncc %i0, %g1, %g0 201ff8c: 12 80 00 58 bne 20200ec 201ff90: 03 00 80 9c sethi %hi(0x2027000), %g1 goto process_it; 201ff94: 88 10 60 08 or %g1, 8, %g4 ! 2027008 <_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 ; 201ff98: 96 01 20 30 add %g4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 201ff9c: c4 01 00 00 ld [ %g4 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 201ffa0: 10 80 00 0b b 201ffcc 201ffa4: 98 01 20 04 add %g4, 4, %o4 !_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 ]; 201ffa8: da 00 a1 6c ld [ %g2 + 0x16c ], %o5 if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 201ffac: 80 8e 00 01 btst %i0, %g1 201ffb0: 12 80 00 4f bne 20200ec 201ffb4: 86 10 00 02 mov %g2, %g3 201ffb8: c2 03 60 c4 ld [ %o5 + 0xc4 ], %g1 <== NOT EXECUTED 201ffbc: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 201ffc0: 12 80 00 4c bne 20200f0 <== NOT EXECUTED 201ffc4: 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 ) { 201ffc8: 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 ) ; 201ffcc: 80 a0 80 0c cmp %g2, %o4 201ffd0: 32 bf ff f6 bne,a 201ffa8 201ffd4: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 201ffd8: 88 01 20 0c add %g4, 0xc, %g4 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 201ffdc: 80 a1 00 0b cmp %g4, %o3 201ffe0: 12 bf ff ef bne 201ff9c 201ffe4: 03 00 80 92 sethi %hi(0x2024800), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201ffe8: c2 08 60 c4 ldub [ %g1 + 0xc4 ], %g1 ! 20248c4 201ffec: 90 10 20 00 clr %o0 201fff0: 96 00 60 01 add %g1, 1, %o3 * 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 ) 201fff4: 1f 04 00 00 sethi %hi(0x10000000), %o7 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201fff8: 03 00 80 99 sethi %hi(0x2026400), %g1 201fffc: 98 10 63 a8 or %g1, 0x3a8, %o4 ! 20267a8 <_Objects_Information_table+0x8> for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 2020000: b4 03 20 0c add %o4, 0xc, %i2 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 2020004: c2 03 00 00 ld [ %o4 ], %g1 2020008: 80 a0 60 00 cmp %g1, 0 202000c: 22 80 00 32 be,a 20200d4 2020010: 98 03 20 04 add %o4, 4, %o4 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 2020014: 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 ) 2020018: 80 a0 60 00 cmp %g1, 0 202001c: 22 80 00 2e be,a 20200d4 2020020: 98 03 20 04 add %o4, 4, %o4 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 2020024: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 * structure for a particular manager may not be installed. */ if ( !the_info ) continue; maximum = the_info->maximum; 2020028: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2 object_table = the_info->local_table; 202002c: 10 80 00 26 b 20200c4 2020030: 9a 10 20 01 mov 1, %o5 for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 2020034: c4 02 40 01 ld [ %o1 + %g1 ], %g2 if ( !the_thread ) 2020038: 80 a0 a0 00 cmp %g2, 0 202003c: 02 80 00 20 be 20200bc 2020040: 88 10 00 0b mov %o3, %g4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 2020044: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4 2020048: 80 a1 00 0b cmp %g4, %o3 202004c: 38 80 00 1c bgu,a 20200bc 2020050: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2020054: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 2020058: 80 a0 60 00 cmp %g1, 0 202005c: 22 80 00 18 be,a 20200bc 2020060: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED 2020064: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 2020068: 80 ae 00 01 andncc %i0, %g1, %g0 202006c: 22 80 00 14 be,a 20200bc 2020070: 88 10 00 0b mov %o3, %g4 * 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 ) { 2020074: 80 a1 00 0b cmp %g4, %o3 2020078: 2a 80 00 11 bcs,a 20200bc 202007c: 90 10 00 02 mov %g2, %o0 * 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 ) ) 2020080: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 2020084: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2020088: 22 80 00 0d be,a 20200bc <== NOT EXECUTED 202008c: 88 10 00 0b mov %o3, %g4 <== 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 ) ) { 2020090: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 2020094: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020098: 22 80 00 09 be,a 20200bc <== NOT EXECUTED 202009c: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED * 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 ) 20200a0: 80 88 c0 0f btst %g3, %o7 <== NOT EXECUTED 20200a4: 32 80 00 06 bne,a 20200bc <== NOT EXECUTED 20200a8: 88 10 00 0b mov %o3, %g4 <== 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 ) { 20200ac: 80 88 40 0f btst %g1, %o7 <== NOT EXECUTED 20200b0: 32 80 00 03 bne,a 20200bc <== NOT EXECUTED 20200b4: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED 20200b8: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 20200bc: 9a 03 60 01 inc %o5 20200c0: 96 10 00 04 mov %g4, %o3 20200c4: 80 a3 40 0a cmp %o5, %o2 20200c8: 08 bf ff db bleu 2020034 20200cc: 83 2b 60 02 sll %o5, 2, %g1 20200d0: 98 03 20 04 add %o4, 4, %o4 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 20200d4: 80 a3 00 1a cmp %o4, %i2 20200d8: 32 bf ff cc bne,a 2020008 20200dc: c2 03 00 00 ld [ %o4 ], %g1 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 20200e0: 80 a2 20 00 cmp %o0, 0 20200e4: 02 80 00 0b be 2020110 20200e8: 86 10 00 08 mov %o0, %g3 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 20200ec: 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 ) ) { 20200f0: 90 10 00 03 mov %g3, %o0 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 20200f4: c2 28 e0 75 stb %g1, [ %g3 + 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 ) ) { 20200f8: 92 10 00 19 mov %i1, %o1 20200fc: 40 00 00 38 call 20201dc <_POSIX_signals_Unblock_thread> 2020100: 94 07 bf ec add %fp, -20, %o2 2020104: 80 8a 20 ff btst 0xff, %o0 2020108: 12 80 00 1e bne 2020180 202010c: 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 ); 2020110: 40 00 00 22 call 2020198 <_POSIX_signals_Set_process_signals> 2020114: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 2020118: 83 2e 60 02 sll %i1, 2, %g1 202011c: 85 2e 60 04 sll %i1, 4, %g2 2020120: b2 20 80 01 sub %g2, %g1, %i1 2020124: 03 00 80 9b sethi %hi(0x2026c00), %g1 2020128: 82 10 62 7c or %g1, 0x27c, %g1 ! 2026e7c <_POSIX_signals_Vectors> 202012c: c2 00 40 19 ld [ %g1 + %i1 ], %g1 2020130: 80 a0 60 02 cmp %g1, 2 2020134: 12 80 00 13 bne 2020180 2020138: 11 00 80 9b sethi %hi(0x2026c00), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 202013c: 7f ff aa 92 call 200ab84 <_Chain_Get> 2020140: 90 12 23 fc or %o0, 0x3fc, %o0 ! 2026ffc <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 2020144: b4 92 20 00 orcc %o0, 0, %i2 2020148: 12 80 00 06 bne 2020160 202014c: 92 07 bf ec add %fp, -20, %o1 rtems_set_errno_and_return_minus_one( EAGAIN ); 2020150: 7f ff d6 e8 call 2015cf0 <__errno> <== NOT EXECUTED 2020154: 01 00 00 00 nop <== NOT EXECUTED 2020158: 10 bf ff 5e b 201fed0 <== NOT EXECUTED 202015c: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED } psiginfo->Info = *siginfo; 2020160: 90 06 a0 08 add %i2, 8, %o0 2020164: 7f ff dd 15 call 20175b8 2020168: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 202016c: 11 00 80 9c sethi %hi(0x2027000), %o0 2020170: 92 10 00 1a mov %i2, %o1 2020174: 90 12 20 4c or %o0, 0x4c, %o0 2020178: 7f ff aa 77 call 200ab54 <_Chain_Append> 202017c: 90 02 00 19 add %o0, %i1, %o0 } _Thread_Enable_dispatch(); 2020180: 7f ff b0 74 call 200c350 <_Thread_Enable_dispatch> 2020184: 01 00 00 00 nop 2020188: 90 10 20 00 clr %o0 ! 0 return 0; } 202018c: b0 10 00 08 mov %o0, %i0 2020190: 81 c7 e0 08 ret 2020194: 81 e8 00 00 restore 0200a25c : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 200a25c: 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 ) ) { 200a260: 90 10 00 1c mov %i4, %o0 200a264: 40 00 00 4f call 200a3a0 <_POSIX_Absolute_timeout_to_ticks> 200a268: 92 07 bf f4 add %fp, -12, %o1 200a26c: 80 a2 20 02 cmp %o0, 2 200a270: 18 80 00 03 bgu 200a27c 200a274: 98 10 20 01 mov 1, %o4 200a278: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 200a27c: da 07 bf f4 ld [ %fp + -12 ], %o5 200a280: 90 10 00 18 mov %i0, %o0 200a284: 92 10 00 19 mov %i1, %o1 200a288: 94 10 00 1a mov %i2, %o2 200a28c: 96 10 00 1b mov %i3, %o3 200a290: 7f ff ff 37 call 2009f6c <_POSIX_Message_queue_Receive_support> 200a294: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 200a298: 81 c7 e0 08 ret 200a29c: 91 e8 00 08 restore %g0, %o0, %o0 0200a2a0 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 200a2a0: 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 ) ) { 200a2a4: 90 10 00 1c mov %i4, %o0 200a2a8: 40 00 00 3e call 200a3a0 <_POSIX_Absolute_timeout_to_ticks> 200a2ac: 92 07 bf f4 add %fp, -12, %o1 200a2b0: 80 a2 20 02 cmp %o0, 2 200a2b4: 18 80 00 03 bgu 200a2c0 200a2b8: 98 10 20 01 mov 1, %o4 200a2bc: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 200a2c0: da 07 bf f4 ld [ %fp + -12 ], %o5 200a2c4: 90 10 00 18 mov %i0, %o0 200a2c8: 92 10 00 19 mov %i1, %o1 200a2cc: 94 10 00 1a mov %i2, %o2 200a2d0: 96 10 00 1b mov %i3, %o3 200a2d4: 7f ff ff 76 call 200a0ac <_POSIX_Message_queue_Send_support> 200a2d8: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 200a2dc: 81 c7 e0 08 ret 200a2e0: 91 e8 00 08 restore %g0, %o0, %o0 02006178 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 2006178: 9d e3 bf 60 save %sp, -160, %sp 200617c: ac 10 00 18 mov %i0, %l6 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 2006180: 80 a6 a0 00 cmp %i2, 0 2006184: 02 80 00 7b be 2006370 2006188: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 200618c: 03 00 80 66 sethi %hi(0x2019800), %g1 2006190: 80 a6 60 00 cmp %i1, 0 2006194: 02 80 00 03 be 20061a0 2006198: a4 10 62 e0 or %g1, 0x2e0, %l2 200619c: a4 10 00 19 mov %i1, %l2 if ( !the_attr->is_initialized ) 20061a0: c2 04 80 00 ld [ %l2 ], %g1 20061a4: 80 a0 60 00 cmp %g1, 0 20061a8: 22 80 00 72 be,a 2006370 20061ac: 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) ) 20061b0: c2 04 a0 04 ld [ %l2 + 4 ], %g1 20061b4: 80 a0 60 00 cmp %g1, 0 20061b8: 02 80 00 07 be 20061d4 20061bc: 03 00 80 6a sethi %hi(0x201a800), %g1 20061c0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201aaf0 20061c4: c2 04 a0 08 ld [ %l2 + 8 ], %g1 20061c8: 80 a0 40 02 cmp %g1, %g2 20061cc: 2a 80 00 69 bcs,a 2006370 20061d0: 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 ) { 20061d4: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 20061d8: 80 a0 60 01 cmp %g1, 1 20061dc: 02 80 00 06 be 20061f4 20061e0: 80 a0 60 02 cmp %g1, 2 20061e4: 12 80 00 63 bne 2006370 20061e8: b0 10 20 16 mov 0x16, %i0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 20061ec: 10 80 00 0a b 2006214 20061f0: e6 04 a0 14 ld [ %l2 + 0x14 ], %l3 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 20061f4: 03 00 80 6e sethi %hi(0x201b800), %g1 20061f8: c2 00 61 b4 ld [ %g1 + 0x1b4 ], %g1 ! 201b9b4 <_Thread_Executing> schedpolicy = api->schedpolicy; schedparam = api->schedparam; 20061fc: 90 07 bf e0 add %fp, -32, %o0 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2006200: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 2006204: 94 10 20 18 mov 0x18, %o2 2006208: 92 00 60 80 add %g1, 0x80, %o1 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 200620c: 10 80 00 05 b 2006220 2006210: e6 00 60 7c ld [ %g1 + 0x7c ], %l3 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 2006214: 90 07 bf e0 add %fp, -32, %o0 2006218: 92 04 a0 18 add %l2, 0x18, %o1 200621c: 94 10 20 18 mov 0x18, %o2 2006220: 40 00 24 dc call 200f590 2006224: b0 10 20 86 mov 0x86, %i0 /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 2006228: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 200622c: 80 a0 60 00 cmp %g1, 0 2006230: 12 80 00 50 bne 2006370 2006234: ea 07 bf e0 ld [ %fp + -32 ], %l5 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 2006238: 82 05 7f ff add %l5, -1, %g1 200623c: 80 a0 60 fd cmp %g1, 0xfd 2006240: 18 80 00 7e bgu 2006438 2006244: 80 a4 e0 01 cmp %l3, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006248: 02 80 00 10 be 2006288 200624c: a2 10 20 00 clr %l1 2006250: 14 80 00 08 bg 2006270 2006254: 80 a4 e0 02 cmp %l3, 2 2006258: 80 a4 e0 00 cmp %l3, 0 200625c: a2 10 20 01 mov 1, %l1 2006260: 02 80 00 1a be 20062c8 2006264: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 2006268: 81 c7 e0 08 ret 200626c: 91 e8 20 16 restore %g0, 0x16, %o0 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006270: 02 80 00 05 be 2006284 2006274: 80 a4 e0 03 cmp %l3, 3 2006278: 12 80 00 3e bne 2006370 200627c: b0 10 20 16 mov 0x16, %i0 2006280: 30 80 00 04 b,a 2006290 2006284: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED 2006288: 10 80 00 10 b 20062c8 200628c: a0 10 20 00 clr %l0 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 ) < 2006290: 40 00 11 0e call 200a6c8 <_Timespec_To_ticks> 2006294: 90 07 bf e8 add %fp, -24, %o0 2006298: a0 10 00 08 mov %o0, %l0 200629c: 40 00 11 0b call 200a6c8 <_Timespec_To_ticks> 20062a0: 90 07 bf f0 add %fp, -16, %o0 20062a4: 80 a4 00 08 cmp %l0, %o0 20062a8: 0a 80 00 64 bcs 2006438 20062ac: c2 07 bf e4 ld [ %fp + -28 ], %g1 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 20062b0: 82 00 7f ff add %g1, -1, %g1 20062b4: 80 a0 60 fd cmp %g1, 0xfd 20062b8: 18 80 00 60 bgu 2006438 20062bc: 03 00 80 19 sethi %hi(0x2006400), %g1 20062c0: a2 10 20 03 mov 3, %l1 20062c4: a0 10 63 80 or %g1, 0x380, %l0 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 20062c8: 29 00 80 6e sethi %hi(0x201b800), %l4 20062cc: 40 00 06 f1 call 2007e90 <_API_Mutex_Lock> 20062d0: d0 05 21 ac ld [ %l4 + 0x1ac ], %o0 ! 201b9ac <_RTEMS_Allocator_Mutex> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 20062d4: 11 00 80 6e sethi %hi(0x201b800), %o0 20062d8: 40 00 09 58 call 2008838 <_Objects_Allocate> 20062dc: 90 12 23 80 or %o0, 0x380, %o0 ! 201bb80 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 20062e0: b2 92 20 00 orcc %o0, 0, %i1 20062e4: 32 80 00 04 bne,a 20062f4 20062e8: c4 04 a0 08 ld [ %l2 + 8 ], %g2 _RTEMS_Unlock_allocator(); 20062ec: 10 80 00 1f b 2006368 20062f0: d0 05 21 ac ld [ %l4 + 0x1ac ], %o0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 20062f4: 03 00 80 6a sethi %hi(0x201a800), %g1 20062f8: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 201aaf0 20062fc: c0 27 bf dc clr [ %fp + -36 ] 2006300: 97 28 60 01 sll %g1, 1, %o3 2006304: 80 a2 c0 02 cmp %o3, %g2 2006308: 1a 80 00 03 bcc 2006314 200630c: d4 04 a0 04 ld [ %l2 + 4 ], %o2 2006310: 96 10 00 02 mov %g2, %o3 2006314: 82 07 bf dc add %fp, -36, %g1 2006318: e2 23 a0 60 st %l1, [ %sp + 0x60 ] 200631c: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 2006320: c0 23 a0 68 clr [ %sp + 0x68 ] 2006324: 9a 10 20 ff mov 0xff, %o5 2006328: a2 10 20 01 mov 1, %l1 200632c: 9a 23 40 15 sub %o5, %l5, %o5 2006330: e2 23 a0 5c st %l1, [ %sp + 0x5c ] 2006334: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2006338: 21 00 80 6e sethi %hi(0x201b800), %l0 200633c: 92 10 00 19 mov %i1, %o1 2006340: 90 14 23 80 or %l0, 0x380, %o0 2006344: 40 00 0d 27 call 20097e0 <_Thread_Initialize> 2006348: 98 10 20 01 mov 1, %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 200634c: 80 8a 20 ff btst 0xff, %o0 2006350: 12 80 00 0a bne 2006378 2006354: 90 14 23 80 or %l0, 0x380, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 2006358: 40 00 0a 25 call 2008bec <_Objects_Free> 200635c: 92 10 00 19 mov %i1, %o1 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 2006360: 03 00 80 6e sethi %hi(0x201b800), %g1 2006364: d0 00 61 ac ld [ %g1 + 0x1ac ], %o0 ! 201b9ac <_RTEMS_Allocator_Mutex> 2006368: 40 00 06 e0 call 2007ee8 <_API_Mutex_Unlock> 200636c: b0 10 20 0b mov 0xb, %i0 2006370: 81 c7 e0 08 ret 2006374: 81 e8 00 00 restore /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2006378: e0 06 61 6c ld [ %i1 + 0x16c ], %l0 api->Attributes = *the_attr; 200637c: 92 10 00 12 mov %l2, %o1 2006380: 94 10 20 38 mov 0x38, %o2 2006384: 40 00 24 83 call 200f590 2006388: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 200638c: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006390: 92 07 bf e0 add %fp, -32, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 2006394: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2006398: 94 10 20 18 mov 0x18, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 200639c: e6 24 20 7c st %l3, [ %l0 + 0x7c ] api->schedparam = schedparam; 20063a0: 40 00 24 7c call 200f590 20063a4: 90 04 20 80 add %l0, 0x80, %o0 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20063a8: 94 10 00 1a mov %i2, %o2 * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 20063ac: e2 2e 60 75 stb %l1, [ %i1 + 0x75 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20063b0: 96 10 00 1b mov %i3, %o3 20063b4: 90 10 00 19 mov %i1, %o0 20063b8: 92 10 20 01 mov 1, %o1 20063bc: 40 00 10 0a call 200a3e4 <_Thread_Start> 20063c0: 98 10 20 00 clr %o4 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 20063c4: 80 a4 e0 03 cmp %l3, 3 20063c8: 12 80 00 09 bne 20063ec 20063cc: a2 10 00 08 mov %o0, %l1 _Watchdog_Insert_ticks( 20063d0: 40 00 10 be call 200a6c8 <_Timespec_To_ticks> 20063d4: 90 04 20 88 add %l0, 0x88, %o0 20063d8: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20063dc: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20063e0: 11 00 80 6e sethi %hi(0x201b800), %o0 20063e4: 40 00 11 b5 call 200aab8 <_Watchdog_Insert> 20063e8: 90 12 21 d4 or %o0, 0x1d4, %o0 ! 201b9d4 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 20063ec: 80 8c 60 ff btst 0xff, %l1 20063f0: 12 80 00 0b bne 200641c 20063f4: 21 00 80 6e sethi %hi(0x201b800), %l0 20063f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20063fc: 11 00 80 6e sethi %hi(0x201b800), %o0 <== NOT EXECUTED 2006400: 40 00 09 fb call 2008bec <_Objects_Free> <== NOT EXECUTED 2006404: 90 12 23 80 or %o0, 0x380, %o0 ! 201bb80 <_POSIX_Threads_Information> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 2006408: d0 04 21 ac ld [ %l0 + 0x1ac ], %o0 <== NOT EXECUTED 200640c: 40 00 06 b7 call 2007ee8 <_API_Mutex_Unlock> <== NOT EXECUTED 2006410: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 2006414: 81 c7 e0 08 ret <== NOT EXECUTED 2006418: 81 e8 00 00 restore <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 200641c: c2 06 60 08 ld [ %i1 + 8 ], %g1 _RTEMS_Unlock_allocator(); 2006420: d0 04 21 ac ld [ %l0 + 0x1ac ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2006424: c2 25 80 00 st %g1, [ %l6 ] _RTEMS_Unlock_allocator(); 2006428: 40 00 06 b0 call 2007ee8 <_API_Mutex_Unlock> 200642c: b0 10 20 00 clr %i0 2006430: 81 c7 e0 08 ret 2006434: 81 e8 00 00 restore return 0; 2006438: b0 10 20 16 mov 0x16, %i0 } 200643c: 81 c7 e0 08 ret 2006440: 81 e8 00 00 restore 02005188 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 2005188: 9d e3 bf 98 save %sp, -104, %sp 200518c: 03 00 80 56 sethi %hi(0x2015800), %g1 2005190: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 2015850 <_Thread_Dispatch_disable_level> 2005194: 84 00 a0 01 inc %g2 2005198: c4 20 60 50 st %g2, [ %g1 + 0x50 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 200519c: 11 00 80 57 sethi %hi(0x2015c00), %o0 20051a0: 40 00 09 6e call 2007758 <_Objects_Allocate> 20051a4: 90 12 20 a4 or %o0, 0xa4, %o0 ! 2015ca4 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 20051a8: a0 92 20 00 orcc %o0, 0, %l0 20051ac: 32 80 00 06 bne,a 20051c4 20051b0: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _Thread_Enable_dispatch(); 20051b4: 40 00 0d 04 call 20085c4 <_Thread_Enable_dispatch> 20051b8: b0 10 20 0b mov 0xb, %i0 20051bc: 81 c7 e0 08 ret 20051c0: 81 e8 00 00 restore for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 20051c4: 03 00 80 55 sethi %hi(0x2015400), %g1 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 20051c8: a2 10 00 10 mov %l0, %l1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 20051cc: a6 10 63 b0 or %g1, 0x3b0, %l3 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 20051d0: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 20051d4: 83 2e 60 02 sll %i1, 2, %g1 20051d8: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 20051dc: 80 a0 60 00 cmp %g1, 0 20051e0: 22 80 00 24 be,a 2005270 20051e4: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 20051e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 20051ec: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 20051f0: 82 00 60 01 inc %g1 20051f4: a5 28 60 02 sll %g1, 2, %l2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 20051f8: 40 00 12 70 call 2009bb8 <_Workspace_Allocate> 20051fc: 90 10 00 12 mov %l2, %o0 if ( !table ) { 2005200: 82 92 20 00 orcc %o0, 0, %g1 2005204: 32 80 00 16 bne,a 200525c 2005208: c2 24 60 1c st %g1, [ %l1 + 0x1c ] for ( --the_api; 200520c: 82 06 60 05 add %i1, 5, %g1 2005210: b2 06 7f ff add %i1, -1, %i1 2005214: 83 28 60 02 sll %g1, 2, %g1 2005218: 10 80 00 05 b 200522c 200521c: b0 04 00 01 add %l0, %g1, %i0 the_api >= 1; the_api-- ) 2005220: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005224: 40 00 12 5e call 2009b9c <_Workspace_Free> <== NOT EXECUTED 2005228: b0 06 3f fc add %i0, -4, %i0 <== 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; 200522c: 80 a6 60 00 cmp %i1, 0 2005230: 32 bf ff fc bne,a 2005220 2005234: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 2005238: 92 10 00 10 mov %l0, %o1 200523c: 11 00 80 57 sethi %hi(0x2015c00), %o0 2005240: 90 12 20 a4 or %o0, 0xa4, %o0 ! 2015ca4 <_POSIX_Keys_Information> 2005244: 40 00 0a 32 call 2007b0c <_Objects_Free> 2005248: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 200524c: 40 00 0c de call 20085c4 <_Thread_Enable_dispatch> 2005250: 01 00 00 00 nop 2005254: 81 c7 e0 08 ret 2005258: 81 e8 00 00 restore return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 200525c: 94 10 00 12 mov %l2, %o2 2005260: 40 00 25 5b call 200e7cc 2005264: 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++ ) { 2005268: 10 80 00 03 b 2005274 200526c: b2 06 60 01 inc %i1 2005270: 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; 2005274: 80 a6 60 05 cmp %i1, 5 2005278: 12 bf ff d7 bne 20051d4 200527c: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005280: c6 04 20 08 ld [ %l0 + 8 ], %g3 2005284: 03 00 80 57 sethi %hi(0x2015c00), %g1 2005288: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 2015cc0 <_POSIX_Keys_Information+0x1c> 200528c: 03 00 00 3f sethi %hi(0xfc00), %g1 2005290: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005294: 82 08 c0 01 and %g3, %g1, %g1 2005298: 83 28 60 02 sll %g1, 2, %g1 200529c: e0 20 80 01 st %l0, [ %g2 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 20052a0: c0 24 20 0c clr [ %l0 + 0xc ] } } the_key->is_active = TRUE; 20052a4: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 20052a8: c6 26 00 00 st %g3, [ %i0 ] } } the_key->is_active = TRUE; 20052ac: c2 2c 20 10 stb %g1, [ %l0 + 0x10 ] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); 20052b0: 40 00 0c c5 call 20085c4 <_Thread_Enable_dispatch> 20052b4: b0 10 20 00 clr %i0 return 0; } 20052b8: 81 c7 e0 08 ret 20052bc: 81 e8 00 00 restore 020052c0 : */ int pthread_key_delete( pthread_key_t key ) { 20052c0: 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 *) 20052c4: 23 00 80 57 sethi %hi(0x2015c00), %l1 20052c8: 92 10 00 18 mov %i0, %o1 20052cc: 94 07 bf f4 add %fp, -12, %o2 20052d0: 40 00 0a 7c call 2007cc0 <_Objects_Get> 20052d4: 90 14 60 a4 or %l1, 0xa4, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 20052d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20052dc: a0 10 00 08 mov %o0, %l0 20052e0: 80 a0 60 00 cmp %g1, 0 20052e4: 12 80 00 24 bne 2005374 20052e8: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 20052ec: 90 14 60 a4 or %l1, 0xa4, %o0 20052f0: 40 00 09 44 call 2007800 <_Objects_Close> 20052f4: 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 ] ) 20052f8: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 20052fc: 80 a2 20 00 cmp %o0, 0 2005300: 02 80 00 04 be 2005310 2005304: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 2005308: 40 00 12 25 call 2009b9c <_Workspace_Free> 200530c: 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 ] ) 2005310: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 2005314: 80 a2 20 00 cmp %o0, 0 2005318: 22 80 00 05 be,a 200532c 200531c: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005320: 40 00 12 1f call 2009b9c <_Workspace_Free> 2005324: 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 ] ) 2005328: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 200532c: 80 a2 20 00 cmp %o0, 0 2005330: 22 80 00 05 be,a 2005344 2005334: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005338: 40 00 12 19 call 2009b9c <_Workspace_Free> 200533c: 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 ] ) 2005340: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 2005344: 80 a2 20 00 cmp %o0, 0 2005348: 02 80 00 05 be 200535c 200534c: 92 10 00 10 mov %l0, %o1 _Workspace_Free( the_key->Values[ the_api ] ); 2005350: 40 00 12 13 call 2009b9c <_Workspace_Free> <== NOT EXECUTED 2005354: 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 ); 2005358: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200535c: 11 00 80 57 sethi %hi(0x2015c00), %o0 2005360: 90 12 20 a4 or %o0, 0xa4, %o0 ! 2015ca4 <_POSIX_Keys_Information> 2005364: 40 00 09 ea call 2007b0c <_Objects_Free> 2005368: 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(); 200536c: 40 00 0c 96 call 20085c4 <_Thread_Enable_dispatch> 2005370: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 2005374: 81 c7 e0 08 ret 2005378: 81 e8 00 00 restore 0202030c : int pthread_kill( pthread_t thread, int sig ) { 202030c: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 2020310: 80 a6 60 00 cmp %i1, 0 2020314: 02 80 00 06 be 202032c 2020318: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 202031c: a0 06 7f ff add %i1, -1, %l0 2020320: 80 a4 20 1f cmp %l0, 0x1f 2020324: 08 80 00 08 bleu 2020344 2020328: 11 00 80 9a sethi %hi(0x2026800), %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 202032c: 7f ff d6 71 call 2015cf0 <__errno> 2020330: b0 10 3f ff mov -1, %i0 2020334: 82 10 20 16 mov 0x16, %g1 2020338: c2 22 00 00 st %g1, [ %o0 ] 202033c: 81 c7 e0 08 ret 2020340: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 2020344: 94 07 bf f4 add %fp, -12, %o2 2020348: 7f ff ad 7c call 200b938 <_Objects_Get> 202034c: 90 12 23 10 or %o0, 0x310, %o0 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2020350: c2 07 bf f4 ld [ %fp + -12 ], %g1 2020354: 80 a0 60 00 cmp %g1, 0 2020358: 12 80 00 23 bne 20203e4 202035c: 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 ) { 2020360: 83 2e 60 02 sll %i1, 2, %g1 2020364: 85 2e 60 04 sll %i1, 4, %g2 2020368: 84 20 80 01 sub %g2, %g1, %g2 202036c: 03 00 80 9b sethi %hi(0x2026c00), %g1 2020370: 82 10 62 7c or %g1, 0x27c, %g1 ! 2026e7c <_POSIX_signals_Vectors> 2020374: 82 00 40 02 add %g1, %g2, %g1 2020378: c2 00 60 08 ld [ %g1 + 8 ], %g1 202037c: 80 a0 60 01 cmp %g1, 1 2020380: 02 80 00 15 be 20203d4 2020384: c6 02 21 6c ld [ %o0 + 0x16c ], %g3 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2020388: c4 00 e0 c8 ld [ %g3 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 202038c: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2020390: b2 10 20 01 mov 1, %i1 2020394: 83 2e 40 10 sll %i1, %l0, %g1 2020398: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 202039c: 94 10 20 00 clr %o2 20203a0: 7f ff ff 8f call 20201dc <_POSIX_signals_Unblock_thread> 20203a4: c4 20 e0 c8 st %g2, [ %g3 + 0xc8 ] the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 20203a8: 03 00 80 9a sethi %hi(0x2026800), %g1 20203ac: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 20268e0 <_ISR_Nest_level> 20203b0: 80 a0 60 00 cmp %g1, 0 20203b4: 02 80 00 08 be 20203d4 20203b8: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 20203bc: 03 00 80 9a sethi %hi(0x2026800), %g1 20203c0: c2 00 61 04 ld [ %g1 + 0x104 ], %g1 ! 2026904 <_Thread_Executing> 20203c4: 80 a6 00 01 cmp %i0, %g1 20203c8: 12 80 00 03 bne 20203d4 20203cc: 03 00 80 9a sethi %hi(0x2026800), %g1 _ISR_Signals_to_thread_executing = TRUE; 20203d0: f2 28 61 98 stb %i1, [ %g1 + 0x198 ] ! 2026998 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED } _Thread_Enable_dispatch(); 20203d4: 7f ff af df call 200c350 <_Thread_Enable_dispatch> 20203d8: b0 10 20 00 clr %i0 20203dc: 81 c7 e0 08 ret 20203e0: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 20203e4: 7f ff d6 43 call 2015cf0 <__errno> 20203e8: b0 10 3f ff mov -1, %i0 20203ec: 82 10 20 03 mov 3, %g1 20203f0: c2 22 00 00 st %g1, [ %o0 ] } 20203f4: 81 c7 e0 08 ret 20203f8: 81 e8 00 00 restore 0200703c : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 200703c: 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; 2007040: 03 00 80 5b sethi %hi(0x2016c00), %g1 2007044: 80 a6 60 00 cmp %i1, 0 2007048: 02 80 00 03 be 2007054 200704c: a0 10 60 cc or %g1, 0xcc, %l0 2007050: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 2007054: 80 a6 20 00 cmp %i0, 0 2007058: 22 80 00 2f be,a 2007114 200705c: b0 10 20 16 mov 0x16, %i0 break; } } #endif if ( !the_attr->is_initialized ) 2007060: c2 04 00 00 ld [ %l0 ], %g1 2007064: 80 a0 60 00 cmp %g1, 0 2007068: 22 80 00 2b be,a 2007114 200706c: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 2007070: c2 04 20 04 ld [ %l0 + 4 ], %g1 2007074: 80 a0 60 00 cmp %g1, 0 2007078: 22 80 00 0a be,a 20070a0 200707c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2007080: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED 2007084: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED 2007088: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED 200708c: 90 12 20 e0 or %o0, 0xe0, %o0 <== NOT EXECUTED 2007090: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 2007094: 96 12 e1 28 or %o3, 0x128, %o3 <== NOT EXECUTED 2007098: 7f ff f3 b2 call 2003f60 <__assert_func> <== NOT EXECUTED 200709c: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 20070a0: 80 a0 60 01 cmp %g1, 1 20070a4: 02 80 00 08 be 20070c4 20070a8: 80 a0 60 02 cmp %g1, 2 20070ac: 02 80 00 08 be 20070cc 20070b0: 80 a0 60 00 cmp %g1, 0 20070b4: 02 80 00 07 be 20070d0 20070b8: a2 10 20 00 clr %l1 _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; 20070bc: 81 c7 e0 08 ret 20070c0: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 20070c4: 10 80 00 03 b 20070d0 20070c8: a2 10 20 02 mov 2, %l1 20070cc: a2 10 20 03 mov 3, %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 20070d0: c2 04 20 08 ld [ %l0 + 8 ], %g1 20070d4: 82 00 7f ff add %g1, -1, %g1 20070d8: 80 a0 60 fd cmp %g1, 0xfd 20070dc: 38 80 00 0e bgu,a 2007114 20070e0: b0 10 20 16 mov 0x16, %i0 20070e4: 03 00 80 62 sethi %hi(0x2018800), %g1 20070e8: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 2018900 <_Thread_Dispatch_disable_level> 20070ec: 84 00 a0 01 inc %g2 20070f0: c4 20 61 00 st %g2, [ %g1 + 0x100 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 20070f4: 11 00 80 63 sethi %hi(0x2018c00), %o0 20070f8: 40 00 09 fc call 20098e8 <_Objects_Allocate> 20070fc: 90 12 20 d0 or %o0, 0xd0, %o0 ! 2018cd0 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 2007100: b2 92 20 00 orcc %o0, 0, %i1 2007104: 32 80 00 06 bne,a 200711c 2007108: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Enable_dispatch(); 200710c: 40 00 0d 92 call 200a754 <_Thread_Enable_dispatch> 2007110: b0 10 20 0b mov 0xb, %i0 2007114: 81 c7 e0 08 ret 2007118: 81 e8 00 00 restore return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 200711c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 2007120: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2007124: 80 a0 60 00 cmp %g1, 0 2007128: 02 80 00 04 be 2007138 200712c: 82 10 20 01 mov 1, %g1 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 2007130: 10 80 00 03 b 200713c <== NOT EXECUTED 2007134: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 2007138: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 200713c: c4 04 20 08 ld [ %l0 + 8 ], %g2 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; 2007140: 82 10 20 01 mov 1, %g1 2007144: c2 2e 60 58 stb %g1, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 2007148: 82 10 20 ff mov 0xff, %g1 200714c: 82 20 40 02 sub %g1, %g2, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 2007150: 92 06 60 54 add %i1, 0x54, %o1 2007154: 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; the_mutex_attr->priority_ceiling = 2007158: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 200715c: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 2007160: 40 00 07 c3 call 200906c <_CORE_mutex_Initialize> 2007164: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007168: c6 06 60 08 ld [ %i1 + 8 ], %g3 200716c: 03 00 80 63 sethi %hi(0x2018c00), %g1 2007170: c4 00 60 ec ld [ %g1 + 0xec ], %g2 ! 2018cec <_POSIX_Mutex_Information+0x1c> 2007174: 03 00 00 3f sethi %hi(0xfc00), %g1 2007178: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200717c: 82 08 c0 01 and %g3, %g1, %g1 2007180: 83 28 60 02 sll %g1, 2, %g1 2007184: f2 20 80 01 st %i1, [ %g2 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 2007188: 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; 200718c: c6 26 00 00 st %g3, [ %i0 ] _Thread_Enable_dispatch(); 2007190: 40 00 0d 71 call 200a754 <_Thread_Enable_dispatch> 2007194: b0 10 20 00 clr %i0 2007198: 81 c7 e0 08 ret 200719c: 81 e8 00 00 restore 02007210 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 2007210: 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 ) 2007214: 80 a6 a0 00 cmp %i2, 0 2007218: 02 80 00 1f be 2007294 200721c: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 2007220: 82 06 7f ff add %i1, -1, %g1 2007224: 80 a0 60 fd cmp %g1, 0xfd 2007228: 38 80 00 19 bgu,a 200728c 200722c: b0 10 20 16 mov 0x16, %i0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 2007230: 7f ff ff dc call 20071a0 2007234: 90 10 00 18 mov %i0, %o0 if ( status ) 2007238: b0 92 20 00 orcc %o0, 0, %i0 200723c: 12 80 00 14 bne 200728c 2007240: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 2007244: 7f ff ff 55 call 2006f98 <_POSIX_Mutex_Get> 2007248: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 200724c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007250: 80 a0 60 00 cmp %g1, 0 2007254: 32 80 00 0e bne,a 200728c 2007258: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 200725c: 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( 2007260: 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( 2007264: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 2007268: 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( 200726c: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 2007270: 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( 2007274: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 2007278: 94 10 20 00 clr %o2 200727c: 40 00 07 f2 call 2009244 <_CORE_mutex_Surrender> 2007280: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 2007284: 40 00 0d 34 call 200a754 <_Thread_Enable_dispatch> 2007288: 01 00 00 00 nop 200728c: 81 c7 e0 08 ret 2007290: 81 e8 00 00 restore return 0; 2007294: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return EINVAL; } 2007298: 81 c7 e0 08 ret 200729c: 81 e8 00 00 restore 02005cc0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 2005cc0: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 2005cc4: 80 a6 20 00 cmp %i0, 0 2005cc8: 02 80 00 2d be 2005d7c 2005ccc: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 2005cd0: 80 a6 60 00 cmp %i1, 0 2005cd4: 32 80 00 06 bne,a 2005cec 2005cd8: c2 04 00 00 ld [ %l0 ], %g1 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 2005cdc: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 2005ce0: 40 00 02 b0 call 20067a0 <== NOT EXECUTED 2005ce4: 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 ) 2005ce8: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 2005cec: 80 a0 60 00 cmp %g1, 0 2005cf0: 02 80 00 23 be 2005d7c 2005cf4: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 2005cf8: c2 04 20 04 ld [ %l0 + 4 ], %g1 2005cfc: 80 a0 60 00 cmp %g1, 0 2005d00: 12 80 00 1f bne 2005d7c 2005d04: 05 00 80 68 sethi %hi(0x201a000), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005d08: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 201a180 <_Thread_Dispatch_disable_level> 2005d0c: 82 00 60 01 inc %g1 2005d10: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] * 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 *) 2005d14: 33 00 80 68 sethi %hi(0x201a000), %i1 2005d18: 40 00 0a 95 call 200876c <_Objects_Allocate> 2005d1c: 90 16 63 d0 or %i1, 0x3d0, %o0 ! 201a3d0 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 2005d20: a0 92 20 00 orcc %o0, 0, %l0 2005d24: 12 80 00 06 bne 2005d3c 2005d28: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 2005d2c: 40 00 0e 2b call 20095d8 <_Thread_Enable_dispatch> 2005d30: b0 10 20 0b mov 0xb, %i0 2005d34: 81 c7 e0 08 ret 2005d38: 81 e8 00 00 restore return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 2005d3c: 40 00 08 97 call 2007f98 <_CORE_RWLock_Initialize> 2005d40: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005d44: c4 04 20 08 ld [ %l0 + 8 ], %g2 2005d48: 82 16 63 d0 or %i1, 0x3d0, %g1 2005d4c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2005d50: 03 00 00 3f sethi %hi(0xfc00), %g1 2005d54: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005d58: 82 08 80 01 and %g2, %g1, %g1 2005d5c: 83 28 60 02 sll %g1, 2, %g1 2005d60: 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; 2005d64: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 2005d68: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 2005d6c: 40 00 0e 1b call 20095d8 <_Thread_Enable_dispatch> 2005d70: b0 10 20 00 clr %i0 2005d74: 81 c7 e0 08 ret 2005d78: 81 e8 00 00 restore return 0; } 2005d7c: 81 c7 e0 08 ret 2005d80: 91 e8 20 16 restore %g0, 0x16, %o0 02005dfc : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 2005dfc: 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 ) 2005e00: 80 a6 20 00 cmp %i0, 0 2005e04: 02 80 00 31 be 2005ec8 2005e08: 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 ); 2005e0c: 92 07 bf f0 add %fp, -16, %o1 2005e10: 40 00 1c 95 call 200d064 <_POSIX_Absolute_timeout_to_ticks> 2005e14: a0 10 20 00 clr %l0 switch (status) { 2005e18: 80 a2 20 02 cmp %o0, 2 2005e1c: 08 80 00 05 bleu 2005e30 2005e20: b2 10 00 08 mov %o0, %i1 2005e24: 80 a2 20 03 cmp %o0, 3 2005e28: 22 80 00 02 be,a 2005e30 2005e2c: a0 10 20 01 mov 1, %l0 2005e30: d2 06 00 00 ld [ %i0 ], %o1 2005e34: 11 00 80 68 sethi %hi(0x201a000), %o0 2005e38: 94 07 bf f4 add %fp, -12, %o2 2005e3c: 40 00 0b a6 call 2008cd4 <_Objects_Get> 2005e40: 90 12 23 d0 or %o0, 0x3d0, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2005e44: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005e48: 80 a0 60 00 cmp %g1, 0 2005e4c: 32 80 00 20 bne,a 2005ecc 2005e50: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 2005e54: d2 06 00 00 ld [ %i0 ], %o1 2005e58: d6 07 bf f0 ld [ %fp + -16 ], %o3 2005e5c: a0 0c 20 ff and %l0, 0xff, %l0 2005e60: 90 02 20 10 add %o0, 0x10, %o0 2005e64: 94 10 00 10 mov %l0, %o2 2005e68: 40 00 08 57 call 2007fc4 <_CORE_RWLock_Obtain_for_reading> 2005e6c: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 2005e70: 40 00 0d da call 20095d8 <_Thread_Enable_dispatch> 2005e74: 01 00 00 00 nop if ( !do_wait && 2005e78: 80 a4 20 00 cmp %l0, 0 2005e7c: 12 80 00 0d bne 2005eb0 2005e80: 03 00 80 68 sethi %hi(0x201a000), %g1 2005e84: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> <== NOT EXECUTED 2005e88: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 2005e8c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2005e90: 32 80 00 09 bne,a 2005eb4 <== NOT EXECUTED 2005e94: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 2005e98: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2005e9c: 02 80 00 0c be 2005ecc <== NOT EXECUTED 2005ea0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 2005ea4: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2005ea8: 08 80 00 09 bleu 2005ecc <== NOT EXECUTED 2005eac: 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( 2005eb0: 03 00 80 68 sethi %hi(0x201a000), %g1 2005eb4: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> 2005eb8: 40 00 00 3f call 2005fb4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 2005ebc: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005ec0: 81 c7 e0 08 ret 2005ec4: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2005ec8: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005ecc: b0 10 00 08 mov %o0, %i0 2005ed0: 81 c7 e0 08 ret 2005ed4: 81 e8 00 00 restore 02005ed8 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 2005ed8: 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 ) 2005edc: 80 a6 20 00 cmp %i0, 0 2005ee0: 02 80 00 31 be 2005fa4 2005ee4: 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 ); 2005ee8: 92 07 bf f0 add %fp, -16, %o1 2005eec: 40 00 1c 5e call 200d064 <_POSIX_Absolute_timeout_to_ticks> 2005ef0: a0 10 20 00 clr %l0 switch (status) { 2005ef4: 80 a2 20 02 cmp %o0, 2 2005ef8: 08 80 00 05 bleu 2005f0c 2005efc: b2 10 00 08 mov %o0, %i1 2005f00: 80 a2 20 03 cmp %o0, 3 2005f04: 22 80 00 02 be,a 2005f0c 2005f08: a0 10 20 01 mov 1, %l0 2005f0c: d2 06 00 00 ld [ %i0 ], %o1 2005f10: 11 00 80 68 sethi %hi(0x201a000), %o0 2005f14: 94 07 bf f4 add %fp, -12, %o2 2005f18: 40 00 0b 6f call 2008cd4 <_Objects_Get> 2005f1c: 90 12 23 d0 or %o0, 0x3d0, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2005f20: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005f24: 80 a0 60 00 cmp %g1, 0 2005f28: 32 80 00 20 bne,a 2005fa8 2005f2c: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 2005f30: d2 06 00 00 ld [ %i0 ], %o1 2005f34: d6 07 bf f0 ld [ %fp + -16 ], %o3 2005f38: a0 0c 20 ff and %l0, 0xff, %l0 2005f3c: 90 02 20 10 add %o0, 0x10, %o0 2005f40: 94 10 00 10 mov %l0, %o2 2005f44: 40 00 08 54 call 2008094 <_CORE_RWLock_Obtain_for_writing> 2005f48: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 2005f4c: 40 00 0d a3 call 20095d8 <_Thread_Enable_dispatch> 2005f50: 01 00 00 00 nop if ( !do_wait && 2005f54: 80 a4 20 00 cmp %l0, 0 2005f58: 12 80 00 0d bne 2005f8c 2005f5c: 03 00 80 68 sethi %hi(0x201a000), %g1 2005f60: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> <== NOT EXECUTED 2005f64: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 2005f68: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2005f6c: 32 80 00 09 bne,a 2005f90 <== NOT EXECUTED 2005f70: 03 00 80 68 sethi %hi(0x201a000), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 2005f74: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2005f78: 02 80 00 0c be 2005fa8 <== NOT EXECUTED 2005f7c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 2005f80: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2005f84: 08 80 00 09 bleu 2005fa8 <== NOT EXECUTED 2005f88: 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( 2005f8c: 03 00 80 68 sethi %hi(0x201a000), %g1 2005f90: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201a244 <_Thread_Executing> 2005f94: 40 00 00 08 call 2005fb4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 2005f98: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005f9c: 81 c7 e0 08 ret 2005fa0: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2005fa4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2005fa8: b0 10 00 08 mov %o0, %i0 2005fac: 81 c7 e0 08 ret 2005fb0: 81 e8 00 00 restore 02005370 : int pthread_setcancelstate( int state, int *oldstate ) { 2005370: 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() ) 2005374: 03 00 80 56 sethi %hi(0x2015800), %g1 2005378: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 20159a0 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 200537c: 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() ) 2005380: 80 a0 60 00 cmp %g1, 0 2005384: 12 80 00 26 bne 200541c 2005388: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 200538c: 80 a6 60 00 cmp %i1, 0 2005390: 02 80 00 25 be 2005424 2005394: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 2005398: 38 80 00 21 bgu,a 200541c 200539c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 20053a0: 03 00 80 56 sethi %hi(0x2015800), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20053a4: 07 00 80 56 sethi %hi(0x2015800), %g3 20053a8: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 20053ac: c2 00 e1 00 ld [ %g3 + 0x100 ], %g1 20053b0: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 20053b4: 82 00 60 01 inc %g1 20053b8: c2 20 e1 00 st %g1, [ %g3 + 0x100 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 20053bc: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 20053c0: 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; 20053c4: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 20053c8: 12 80 00 0b bne 20053f4 20053cc: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 20053d0: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 20053d4: 80 a0 60 01 cmp %g1, 1 20053d8: 32 80 00 08 bne,a 20053f8 20053dc: b2 10 20 00 clr %i1 20053e0: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED 20053e4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 20053e8: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED 20053ec: 10 80 00 03 b 20053f8 <== NOT EXECUTED 20053f0: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED 20053f4: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20053f8: 40 00 0b 0a call 2008020 <_Thread_Enable_dispatch> 20053fc: b0 10 20 00 clr %i0 if ( cancel ) 2005400: 80 8e 60 ff btst 0xff, %i1 2005404: 02 80 00 06 be 200541c 2005408: 03 00 80 56 sethi %hi(0x2015800), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 200540c: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 20159c4 <_Thread_Executing> <== NOT EXECUTED 2005410: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 2005414: 7f ff fe d4 call 2004f64 <_POSIX_Thread_Exit> <== NOT EXECUTED 2005418: b0 10 20 00 clr %i0 <== NOT EXECUTED 200541c: 81 c7 e0 08 ret 2005420: 81 e8 00 00 restore 2005424: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 2005428: 81 c7 e0 08 ret <== NOT EXECUTED 200542c: 81 e8 00 00 restore <== NOT EXECUTED 02005430 : int pthread_setcanceltype( int type, int *oldtype ) { 2005430: 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() ) 2005434: 03 00 80 56 sethi %hi(0x2015800), %g1 2005438: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 20159a0 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 200543c: 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() ) 2005440: 80 a0 60 00 cmp %g1, 0 2005444: 12 80 00 26 bne 20054dc 2005448: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 200544c: 80 a6 60 00 cmp %i1, 0 2005450: 02 80 00 25 be 20054e4 2005454: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 2005458: 38 80 00 21 bgu,a 20054dc 200545c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005460: 03 00 80 56 sethi %hi(0x2015800), %g1 2005464: 07 00 80 56 sethi %hi(0x2015800), %g3 2005468: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 200546c: c2 00 e1 00 ld [ %g3 + 0x100 ], %g1 2005470: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 2005474: 82 00 60 01 inc %g1 2005478: c2 20 e1 00 st %g1, [ %g3 + 0x100 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 200547c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 2005480: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005484: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 2005488: 80 a0 60 00 cmp %g1, 0 200548c: 12 80 00 0a bne 20054b4 2005490: c8 20 a0 d0 st %g4, [ %g2 + 0xd0 ] 2005494: 80 a1 20 01 cmp %g4, 1 2005498: 32 80 00 08 bne,a 20054b8 200549c: b2 10 20 00 clr %i1 20054a0: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 20054a4: 80 a0 00 01 cmp %g0, %g1 20054a8: 82 40 20 00 addx %g0, 0, %g1 20054ac: 10 80 00 03 b 20054b8 20054b0: b2 10 00 01 mov %g1, %i1 20054b4: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20054b8: 40 00 0a da call 2008020 <_Thread_Enable_dispatch> 20054bc: b0 10 20 00 clr %i0 if ( cancel ) 20054c0: 80 8e 60 ff btst 0xff, %i1 20054c4: 02 80 00 06 be 20054dc 20054c8: 03 00 80 56 sethi %hi(0x2015800), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 20054cc: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 20159c4 <_Thread_Executing> <== NOT EXECUTED 20054d0: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 20054d4: 7f ff fe a4 call 2004f64 <_POSIX_Thread_Exit> <== NOT EXECUTED 20054d8: b0 10 20 00 clr %i0 <== NOT EXECUTED 20054dc: 81 c7 e0 08 ret 20054e0: 81 e8 00 00 restore 20054e4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 20054e8: 81 c7 e0 08 ret <== NOT EXECUTED 20054ec: 81 e8 00 00 restore <== NOT EXECUTED 02007b2c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 2007b2c: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 2007b30: 80 a6 a0 00 cmp %i2, 0 2007b34: 22 80 00 5d be,a 2007ca8 2007b38: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 2007b3c: c2 06 80 00 ld [ %i2 ], %g1 2007b40: 82 00 7f ff add %g1, -1, %g1 2007b44: 80 a0 60 fd cmp %g1, 0xfd 2007b48: 18 80 00 5a bgu 2007cb0 2007b4c: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007b50: 02 80 00 10 be 2007b90 2007b54: a6 10 20 00 clr %l3 2007b58: 14 80 00 08 bg 2007b78 2007b5c: 80 a6 60 02 cmp %i1, 2 2007b60: 80 a6 60 00 cmp %i1, 0 2007b64: a6 10 20 01 mov 1, %l3 2007b68: 02 80 00 1b be 2007bd4 2007b6c: a4 10 20 00 clr %l2 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 2007b70: 81 c7 e0 08 ret 2007b74: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007b78: 02 80 00 05 be 2007b8c 2007b7c: 80 a6 60 03 cmp %i1, 3 2007b80: 32 80 00 4a bne,a 2007ca8 2007b84: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 2007b88: 30 80 00 04 b,a 2007b98 2007b8c: a6 10 20 02 mov 2, %l3 2007b90: 10 80 00 11 b 2007bd4 2007b94: a4 10 20 00 clr %l2 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 ) < 2007b98: 40 00 0e de call 200b710 <_Timespec_To_ticks> 2007b9c: 90 06 a0 08 add %i2, 8, %o0 2007ba0: a0 10 00 08 mov %o0, %l0 2007ba4: 40 00 0e db call 200b710 <_Timespec_To_ticks> 2007ba8: 90 06 a0 10 add %i2, 0x10, %o0 2007bac: 80 a4 00 08 cmp %l0, %o0 2007bb0: 2a 80 00 3e bcs,a 2007ca8 2007bb4: 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 ) ) 2007bb8: c2 06 a0 04 ld [ %i2 + 4 ], %g1 2007bbc: 82 00 7f ff add %g1, -1, %g1 2007bc0: 80 a0 60 fd cmp %g1, 0xfd 2007bc4: 18 80 00 3b bgu 2007cb0 2007bc8: 03 00 80 1e sethi %hi(0x2007800), %g1 2007bcc: a6 10 20 03 mov 3, %l3 2007bd0: a4 10 62 48 or %g1, 0x248, %l2 2007bd4: 92 10 00 18 mov %i0, %o1 2007bd8: 11 00 80 62 sethi %hi(0x2018800), %o0 2007bdc: 94 07 bf f4 add %fp, -12, %o2 2007be0: 40 00 08 9c call 2009e50 <_Objects_Get> 2007be4: 90 12 23 90 or %o0, 0x390, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2007be8: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007bec: a2 10 00 08 mov %o0, %l1 2007bf0: 80 a0 60 00 cmp %g1, 0 2007bf4: 12 80 00 2d bne 2007ca8 2007bf8: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2007bfc: e0 02 21 6c ld [ %o0 + 0x16c ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 2007c00: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 2007c04: 80 a0 60 03 cmp %g1, 3 2007c08: 32 80 00 05 bne,a 2007c1c 2007c0c: f2 24 20 7c st %i1, [ %l0 + 0x7c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 2007c10: 40 00 10 16 call 200bc68 <_Watchdog_Remove> 2007c14: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 2007c18: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 2007c1c: 92 10 00 1a mov %i2, %o1 2007c20: 90 04 20 80 add %l0, 0x80, %o0 2007c24: 40 00 23 03 call 2010830 2007c28: 94 10 20 18 mov 0x18, %o2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007c2c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 2007c30: e6 24 60 7c st %l3, [ %l1 + 0x7c ] the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007c34: 80 a0 60 00 cmp %g1, 0 2007c38: 06 80 00 1a bl 2007ca0 2007c3c: e4 24 60 80 st %l2, [ %l1 + 0x80 ] 2007c40: 80 a0 60 02 cmp %g1, 2 2007c44: 24 80 00 07 ble,a 2007c60 2007c48: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 2007c4c: 80 a0 60 03 cmp %g1, 3 2007c50: 12 80 00 14 bne 2007ca0 2007c54: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 2007c58: 10 80 00 0c b 2007c88 2007c5c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007c60: 03 00 80 62 sethi %hi(0x2018800), %g1 2007c64: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 2018858 <_Thread_Ticks_per_timeslice> the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2007c68: 90 10 00 11 mov %l1, %o0 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007c6c: c2 24 60 78 st %g1, [ %l1 + 0x78 ] 2007c70: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2007c74: 94 10 20 01 mov 1, %o2 2007c78: 92 22 40 02 sub %o1, %g2, %o1 2007c7c: 40 00 09 28 call 200a11c <_Thread_Change_priority> 2007c80: d2 24 60 18 st %o1, [ %l1 + 0x18 ] 2007c84: 30 80 00 07 b,a 2007ca0 ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; _Watchdog_Remove( &api->Sporadic_timer ); 2007c88: 90 04 20 9c add %l0, 0x9c, %o0 2007c8c: 40 00 0f f7 call 200bc68 <_Watchdog_Remove> 2007c90: c2 24 20 98 st %g1, [ %l0 + 0x98 ] _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 2007c94: 92 10 00 11 mov %l1, %o1 2007c98: 7f ff ff 80 call 2007a98 <_POSIX_Threads_Sporadic_budget_TSR> 2007c9c: 90 10 20 00 clr %o0 break; } _Thread_Enable_dispatch(); 2007ca0: 40 00 0a ad call 200a754 <_Thread_Enable_dispatch> 2007ca4: b0 10 20 00 clr %i0 2007ca8: 81 c7 e0 08 ret 2007cac: 81 e8 00 00 restore return 0; 2007cb0: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return ESRCH; } 2007cb4: 81 c7 e0 08 ret 2007cb8: 81 e8 00 00 restore 02006bb4 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 2006bb4: 9d e3 bf 98 save %sp, -104, %sp 2006bb8: 92 10 00 19 mov %i1, %o1 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 2006bbc: 80 a6 60 00 cmp %i1, 0 2006bc0: 02 80 00 3f be 2006cbc 2006bc4: a0 10 00 18 mov %i0, %l0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 2006bc8: 80 a6 a0 00 cmp %i2, 0 2006bcc: 02 80 00 3c be 2006cbc 2006bd0: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 2006bd4: c2 06 40 00 ld [ %i1 ], %g1 2006bd8: 80 a0 60 00 cmp %g1, 0 2006bdc: 32 80 00 07 bne,a 2006bf8 2006be0: c0 26 80 00 clr [ %i2 ] 2006be4: c2 06 60 04 ld [ %i1 + 4 ], %g1 2006be8: 80 a0 60 00 cmp %g1, 0 2006bec: 02 80 00 34 be 2006cbc 2006bf0: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; *registered_major = 0; 2006bf4: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006bf8: 03 00 80 6e sethi %hi(0x201b800), %g1 2006bfc: c8 00 62 f0 ld [ %g1 + 0x2f0 ], %g4 ! 201baf0 <_IO_Number_of_drivers> 2006c00: 80 a4 00 04 cmp %l0, %g4 2006c04: 1a 80 00 31 bcc 2006cc8 2006c08: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 2006c0c: 80 a4 20 00 cmp %l0, 0 2006c10: 12 80 00 18 bne 2006c70 2006c14: 03 00 80 6e sethi %hi(0x201b800), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006c18: c6 00 62 f4 ld [ %g1 + 0x2f4 ], %g3 ! 201baf4 <_IO_Driver_address_table> 2006c1c: 85 29 20 03 sll %g4, 3, %g2 2006c20: 83 29 20 05 sll %g4, 5, %g1 2006c24: a0 01 3f ff add %g4, -1, %l0 2006c28: 82 20 40 02 sub %g1, %g2, %g1 2006c2c: 82 00 7f e8 add %g1, -24, %g1 2006c30: 10 80 00 0b b 2006c5c 2006c34: 86 00 c0 01 add %g3, %g1, %g3 if ( !_IO_Driver_address_table[major].initialization_entry && 2006c38: 80 a0 60 00 cmp %g1, 0 2006c3c: 32 80 00 07 bne,a 2006c58 2006c40: a0 04 3f ff add %l0, -1, %l0 2006c44: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2006c48: 80 a0 60 00 cmp %g1, 0 2006c4c: 02 80 00 09 be 2006c70 2006c50: 03 00 80 6e sethi %hi(0x201b800), %g1 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006c54: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED 2006c58: 86 00 ff e8 add %g3, -24, %g3 2006c5c: 80 a4 20 00 cmp %l0, 0 2006c60: 32 bf ff f6 bne,a 2006c38 2006c64: c2 00 c0 00 ld [ %g3 ], %g1 2006c68: 81 c7 e0 08 ret 2006c6c: 91 e8 20 05 restore %g0, 5, %o0 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 2006c70: c6 00 62 f4 ld [ %g1 + 0x2f4 ], %g3 2006c74: 85 2c 20 03 sll %l0, 3, %g2 2006c78: 83 2c 20 05 sll %l0, 5, %g1 2006c7c: 82 20 40 02 sub %g1, %g2, %g1 2006c80: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 2006c84: 80 a0 a0 00 cmp %g2, 0 2006c88: 12 80 00 0f bne 2006cc4 2006c8c: 90 00 c0 01 add %g3, %g1, %o0 2006c90: c2 02 20 04 ld [ %o0 + 4 ], %g1 2006c94: 80 a0 60 00 cmp %g1, 0 2006c98: 32 80 00 0c bne,a 2006cc8 2006c9c: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 2006ca0: 40 00 1e a6 call 200e738 2006ca4: 94 10 20 18 mov 0x18, %o2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006ca8: b0 10 00 10 mov %l0, %i0 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 2006cac: e0 26 80 00 st %l0, [ %i2 ] return rtems_io_initialize( major, 0, NULL ); 2006cb0: b2 10 20 00 clr %i1 2006cb4: 7f ff ff 4f call 20069f0 2006cb8: 95 e8 20 00 restore %g0, 0, %o2 2006cbc: 81 c7 e0 08 ret 2006cc0: 91 e8 20 09 restore %g0, 9, %o0 2006cc4: b0 10 20 0c mov 0xc, %i0 } 2006cc8: 81 c7 e0 08 ret 2006ccc: 81 e8 00 00 restore 02007ff8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2007ff8: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2007ffc: 80 a6 20 00 cmp %i0, 0 2008000: 02 80 00 1d be 2008074 2008004: 03 00 80 90 sethi %hi(0x2024000), %g1 return; 2008008: a4 10 60 94 or %g1, 0x94, %l2 ! 2024094 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 200800c: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2008010: c2 04 80 00 ld [ %l2 ], %g1 2008014: 80 a0 60 00 cmp %g1, 0 2008018: 22 80 00 14 be,a 2008068 200801c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2008020: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 2008024: 80 a4 60 00 cmp %l1, 0 2008028: 12 80 00 0b bne 2008054 200802c: a0 10 20 01 mov 1, %l0 for ( i=1 ; i <= information->maximum ; i++ ) { 2008030: 10 80 00 0e b 2008068 <== NOT EXECUTED 2008034: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 2008038: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 200803c: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 2008040: 80 a2 20 00 cmp %o0, 0 2008044: 02 80 00 04 be 2008054 2008048: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 200804c: 9f c6 00 00 call %i0 2008050: 01 00 00 00 nop api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 2008054: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 2008058: 80 a4 00 01 cmp %l0, %g1 200805c: 08 bf ff f7 bleu 2008038 2008060: 91 2c 20 02 sll %l0, 2, %o0 2008064: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2008068: 80 a4 80 13 cmp %l2, %l3 200806c: 32 bf ff ea bne,a 2008014 2008070: c2 04 80 00 ld [ %l2 ], %g1 2008074: 81 c7 e0 08 ret 2008078: 81 e8 00 00 restore 0200ea34 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 200ea34: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 200ea38: a2 96 20 00 orcc %i0, 0, %l1 200ea3c: 02 80 00 14 be 200ea8c 200ea40: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 200ea44: 80 a7 20 00 cmp %i4, 0 200ea48: 02 80 00 24 be 200ead8 200ea4c: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 200ea50: 80 88 60 07 btst 7, %g1 200ea54: 12 80 00 0e bne 200ea8c 200ea58: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200ea5c: 05 00 80 c5 sethi %hi(0x2031400), %g2 200ea60: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20317e0 <_Thread_Dispatch_disable_level> 200ea64: 82 00 60 01 inc %g1 200ea68: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 200ea6c: 21 00 80 c5 sethi %hi(0x2031400), %l0 200ea70: 40 00 13 e0 call 20139f0 <_Objects_Allocate> 200ea74: 90 14 21 54 or %l0, 0x154, %o0 ! 2031554 <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 200ea78: 80 a2 20 00 cmp %o0, 0 200ea7c: 32 80 00 06 bne,a 200ea94 200ea80: c4 02 20 08 ld [ %o0 + 8 ], %g2 _Thread_Enable_dispatch(); 200ea84: 40 00 17 b5 call 2014958 <_Thread_Enable_dispatch> 200ea88: b0 10 20 05 mov 5, %i0 200ea8c: 81 c7 e0 08 ret 200ea90: 81 e8 00 00 restore #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ea94: 82 14 21 54 or %l0, 0x154, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200ea98: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ea9c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 200eaa0: 82 06 ff ff add %i3, -1, %g1 200eaa4: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 200eaa8: c4 27 00 00 st %g2, [ %i4 ] 200eaac: 03 00 00 3f sethi %hi(0xfc00), %g1 200eab0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200eab4: 84 08 80 01 and %g2, %g1, %g2 200eab8: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 200eabc: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 200eac0: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 200eac4: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 200eac8: 40 00 17 a4 call 2014958 <_Thread_Enable_dispatch> 200eacc: b0 10 20 00 clr %i0 200ead0: 81 c7 e0 08 ret 200ead4: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 200ead8: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 200eadc: 81 c7 e0 08 ret <== NOT EXECUTED 200eae0: 81 e8 00 00 restore <== NOT EXECUTED 02006644 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 2006644: 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 *) 2006648: 11 00 80 71 sethi %hi(0x201c400), %o0 200664c: 92 10 00 18 mov %i0, %o1 2006650: 90 12 21 ac or %o0, 0x1ac, %o0 2006654: 40 00 08 e4 call 20089e4 <_Objects_Get> 2006658: 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 ) { 200665c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006660: 80 a0 60 00 cmp %g1, 0 2006664: 12 80 00 64 bne 20067f4 2006668: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 200666c: 27 00 80 71 sethi %hi(0x201c400), %l3 2006670: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 2006674: c2 04 e3 e4 ld [ %l3 + 0x3e4 ], %g1 2006678: 80 a0 80 01 cmp %g2, %g1 200667c: 02 80 00 06 be 2006694 2006680: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2006684: 40 00 0b 46 call 200939c <_Thread_Enable_dispatch> 2006688: b0 10 20 17 mov 0x17, %i0 200668c: 81 c7 e0 08 ret 2006690: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 2006694: 12 80 00 0c bne 20066c4 2006698: 01 00 00 00 nop switch ( the_period->state ) { 200669c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20066a0: 80 a0 60 00 cmp %g1, 0 20066a4: 02 80 00 50 be 20067e4 20066a8: b0 10 20 0b mov 0xb, %i0 20066ac: 82 00 7f fd add %g1, -3, %g1 20066b0: 80 a0 60 01 cmp %g1, 1 20066b4: 18 80 00 4c bgu 20067e4 20066b8: b0 10 20 00 clr %i0 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20066bc: 10 80 00 4a b 20067e4 20066c0: b0 10 20 06 mov 6, %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20066c4: 7f ff f1 59 call 2002c28 20066c8: 01 00 00 00 nop 20066cc: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 20066d0: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 20066d4: 80 a4 a0 02 cmp %l2, 2 20066d8: 02 80 00 1a be 2006740 20066dc: 80 a4 a0 04 cmp %l2, 4 20066e0: 02 80 00 34 be 20067b0 20066e4: 80 a4 a0 00 cmp %l2, 0 20066e8: 12 80 00 43 bne 20067f4 20066ec: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 20066f0: 7f ff f1 52 call 2002c38 20066f4: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 20066f8: 7f ff ff 5e call 2006470 <_Rate_monotonic_Initiate_statistics> 20066fc: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006700: 82 10 20 02 mov 2, %g1 2006704: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006708: 03 00 80 1a sethi %hi(0x2006800), %g1 200670c: 82 10 62 c8 or %g1, 0x2c8, %g1 ! 2006ac8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006710: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006714: 92 04 60 10 add %l1, 0x10, %o1 2006718: 11 00 80 72 sethi %hi(0x201c800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200671c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006720: 90 12 20 04 or %o0, 4, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006724: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006728: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 200672c: f2 24 60 4c st %i1, [ %l1 + 0x4c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006730: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006734: 40 00 10 73 call 200a900 <_Watchdog_Insert> 2006738: b0 10 20 00 clr %i0 200673c: 30 80 00 2a b,a 20067e4 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006740: 7f ff ff 68 call 20064e0 <_Rate_monotonic_Update_statistics> 2006744: 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; 2006748: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 200674c: 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; 2006750: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006754: 7f ff f1 39 call 2002c38 2006758: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 200675c: c2 04 e3 e4 ld [ %l3 + 0x3e4 ], %g1 2006760: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006764: 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; 2006768: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 200676c: 40 00 0d 96 call 2009dc4 <_Thread_Set_state> 2006770: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006774: 7f ff f1 2d call 2002c28 2006778: 01 00 00 00 nop local_state = the_period->state; 200677c: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006780: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 2006784: 7f ff f1 2d call 2002c38 2006788: 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 ) 200678c: 80 a4 20 03 cmp %l0, 3 2006790: 12 80 00 04 bne 20067a0 2006794: d0 04 e3 e4 ld [ %l3 + 0x3e4 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006798: 40 00 09 eb call 2008f44 <_Thread_Clear_state> <== NOT EXECUTED 200679c: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 20067a0: 40 00 0a ff call 200939c <_Thread_Enable_dispatch> 20067a4: b0 10 20 00 clr %i0 20067a8: 81 c7 e0 08 ret 20067ac: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 20067b0: 7f ff ff 4c call 20064e0 <_Rate_monotonic_Update_statistics> 20067b4: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 20067b8: 7f ff f1 20 call 2002c38 20067bc: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 20067c0: 82 10 20 02 mov 2, %g1 20067c4: 11 00 80 72 sethi %hi(0x201c800), %o0 20067c8: 92 04 60 10 add %l1, 0x10, %o1 20067cc: 90 12 20 04 or %o0, 4, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20067d0: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 20067d4: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20067d8: 40 00 10 4a call 200a900 <_Watchdog_Insert> 20067dc: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20067e0: b0 10 20 06 mov 6, %i0 20067e4: 40 00 0a ee call 200939c <_Thread_Enable_dispatch> 20067e8: 01 00 00 00 nop 20067ec: 81 c7 e0 08 ret 20067f0: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20067f4: 81 c7 e0 08 ret 20067f8: 91 e8 20 04 restore %g0, 4, %o0 0200ffdc : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 200ffdc: 9d e3 bf 90 save %sp, -112, %sp 200ffe0: 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 ) 200ffe4: 80 a6 60 00 cmp %i1, 0 200ffe8: 02 80 00 2c be 2010098 200ffec: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 200fff0: 03 00 80 c6 sethi %hi(0x2031800), %g1 200fff4: 40 00 09 1b call 2012460 <_API_Mutex_Lock> 200fff8: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 200fffc: 92 10 00 10 mov %l0, %o1 2010000: 11 00 80 c5 sethi %hi(0x2031400), %o0 2010004: 94 07 bf f0 add %fp, -16, %o2 2010008: 40 00 0f d4 call 2013f58 <_Objects_Get_no_protection> 201000c: 90 12 22 14 or %o0, 0x214, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 2010010: c2 07 bf f0 ld [ %fp + -16 ], %g1 2010014: 80 a0 60 00 cmp %g1, 0 2010018: 02 80 00 05 be 201002c 201001c: a0 10 00 08 mov %o0, %l0 2010020: 80 a0 60 01 cmp %g1, 1 2010024: 10 80 00 0f b 2010060 2010028: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 201002c: 92 10 00 19 mov %i1, %o1 2010030: 94 10 00 1a mov %i2, %o2 2010034: 90 02 20 68 add %o0, 0x68, %o0 2010038: 96 07 bf f4 add %fp, -12, %o3 201003c: 40 00 0c 0a call 2013064 <_Heap_Extend> 2010040: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010044: 80 a2 20 01 cmp %o0, 1 2010048: 02 80 00 12 be 2010090 201004c: 03 00 80 c6 sethi %hi(0x2031800), %g1 2010050: 0a 80 00 08 bcs 2010070 2010054: c6 07 bf f4 ld [ %fp + -12 ], %g3 2010058: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 201005c: b0 10 20 18 mov 0x18, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010060: 32 80 00 0b bne,a 201008c 2010064: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010068: 10 80 00 0a b 2010090 201006c: 03 00 80 c6 sethi %hi(0x2031800), %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010070: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 2010074: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010078: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 201007c: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010080: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 2010084: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 2010088: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 201008c: 03 00 80 c6 sethi %hi(0x2031800), %g1 2010090: 40 00 09 0a call 20124b8 <_API_Mutex_Unlock> 2010094: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> return return_status; } 2010098: 81 c7 e0 08 ret 201009c: 81 e8 00 00 restore 020103a4 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 20103a4: 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 ) 20103a8: 80 a6 e0 00 cmp %i3, 0 20103ac: 02 80 00 32 be 2010474 20103b0: 21 00 80 c6 sethi %hi(0x2031800), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 20103b4: 40 00 08 2b call 2012460 <_API_Mutex_Lock> 20103b8: d0 04 20 9c ld [ %l0 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> 20103bc: 92 10 00 18 mov %i0, %o1 20103c0: 11 00 80 c5 sethi %hi(0x2031400), %o0 20103c4: 94 07 bf f0 add %fp, -16, %o2 20103c8: 40 00 0e e4 call 2013f58 <_Objects_Get_no_protection> 20103cc: 90 12 22 14 or %o0, 0x214, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20103d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 20103d4: 80 a0 60 00 cmp %g1, 0 20103d8: 02 80 00 0b be 2010404 20103dc: b0 10 00 08 mov %o0, %i0 20103e0: 82 18 60 01 xor %g1, 1, %g1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 20103e4: d0 04 20 9c ld [ %l0 + 0x9c ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 20103e8: 80 a0 00 01 cmp %g0, %g1 20103ec: 82 40 3f ff addx %g0, -1, %g1 20103f0: b0 08 7f eb and %g1, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 20103f4: 40 00 08 31 call 20124b8 <_API_Mutex_Unlock> 20103f8: b0 06 20 19 add %i0, 0x19, %i0 20103fc: 81 c7 e0 08 ret 2010400: 81 e8 00 00 restore case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 2010404: 94 10 00 1a mov %i2, %o2 2010408: 92 10 00 19 mov %i1, %o1 201040c: 90 02 20 68 add %o0, 0x68, %o0 2010410: 96 07 bf ec add %fp, -20, %o3 2010414: 40 00 0c 94 call 2013664 <_Heap_Resize_block> 2010418: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 201041c: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 2010420: b4 92 20 00 orcc %o0, 0, %i2 2010424: 12 80 00 0b bne 2010450 2010428: c2 26 c0 00 st %g1, [ %i3 ] 201042c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2010430: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2010434: 02 80 00 08 be 2010454 <== NOT EXECUTED 2010438: 03 00 80 c6 sethi %hi(0x2031800), %g1 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 201043c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2010440: 40 00 21 de call 2018bb8 <_Region_Process_queue> <== NOT EXECUTED 2010444: b0 10 20 00 clr %i0 <== NOT EXECUTED 2010448: 81 c7 e0 08 ret <== NOT EXECUTED 201044c: 81 e8 00 00 restore <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 2010450: 03 00 80 c6 sethi %hi(0x2031800), %g1 2010454: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 203189c <_RTEMS_Allocator_Mutex> 2010458: 40 00 08 18 call 20124b8 <_API_Mutex_Unlock> 201045c: b0 10 20 00 clr %i0 return 2010460: 80 a6 a0 00 cmp %i2, 0 2010464: 02 bf ff e6 be 20103fc 2010468: 80 a6 a0 01 cmp %i2, 1 201046c: 02 bf ff e4 be 20103fc 2010470: b0 10 20 0d mov 0xd, %i0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 2010474: b0 10 20 09 mov 9, %i0 } 2010478: 81 c7 e0 08 ret 201047c: 81 e8 00 00 restore 020051b4 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 20051b4: 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 ) ) 20051b8: a4 96 20 00 orcc %i0, 0, %l2 20051bc: 02 80 00 23 be 2005248 20051c0: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 20051c4: 80 a7 20 00 cmp %i4, 0 20051c8: 02 80 00 20 be 2005248 20051cc: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 20051d0: 84 8e a0 c0 andcc %i2, 0xc0, %g2 20051d4: 02 80 00 0d be 2005208 20051d8: a2 8e a0 30 andcc %i2, 0x30, %l1 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 20051dc: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 20051e0: 80 a0 60 10 cmp %g1, 0x10 20051e4: 02 80 00 04 be 20051f4 20051e8: 80 a0 60 20 cmp %g1, 0x20 20051ec: 32 80 00 17 bne,a 2005248 20051f0: b0 10 20 0b mov 0xb, %i0 20051f4: 80 8e a0 04 btst 4, %i2 20051f8: 02 80 00 64 be 2005388 20051fc: 80 a0 a0 c0 cmp %g2, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 2005200: 02 80 00 62 be 2005388 2005204: a2 8e a0 30 andcc %i2, 0x30, %l1 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 2005208: 02 80 00 04 be 2005218 200520c: 80 a6 60 01 cmp %i1, 1 2005210: 18 80 00 0e bgu 2005248 2005214: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005218: 03 00 80 5d sethi %hi(0x2017400), %g1 200521c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 20176f0 <_Thread_Dispatch_disable_level> 2005220: 84 00 a0 01 inc %g2 2005224: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] * 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 ); 2005228: 11 00 80 5d sethi %hi(0x2017400), %o0 200522c: 40 00 05 57 call 2006788 <_Objects_Allocate> 2005230: 90 12 21 b4 or %o0, 0x1b4, %o0 ! 20175b4 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 2005234: a0 92 20 00 orcc %o0, 0, %l0 2005238: 12 80 00 06 bne 2005250 200523c: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 2005240: 40 00 09 1a call 20076a8 <_Thread_Enable_dispatch> 2005244: b0 10 20 05 mov 5, %i0 2005248: 81 c7 e0 08 ret 200524c: 81 e8 00 00 restore * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 2005250: 02 80 00 33 be 200531c 2005254: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 2005258: 80 8e a0 40 btst 0x40, %i2 200525c: 12 80 00 06 bne 2005274 2005260: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 2005264: 80 8e a0 80 btst 0x80, %i2 2005268: 02 80 00 05 be 200527c 200526c: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 2005270: 82 10 20 03 mov 3, %g1 2005274: 10 80 00 05 b 2005288 2005278: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 200527c: 12 bf ff fe bne 2005274 2005280: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 2005284: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 2005288: 80 a4 60 10 cmp %l1, 0x10 200528c: 12 80 00 0f bne 20052c8 2005290: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 2005294: c2 07 bf e8 ld [ %fp + -24 ], %g1 2005298: 80 a0 60 01 cmp %g1, 1 200529c: 08 80 00 07 bleu 20052b8 20052a0: c0 27 bf e0 clr [ %fp + -32 ] 20052a4: 80 a0 60 03 cmp %g1, 3 20052a8: 38 80 00 0b bgu,a 20052d4 20052ac: 82 1e 60 01 xor %i1, 1, %g1 <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 20052b0: 10 80 00 04 b 20052c0 20052b4: 82 10 20 01 mov 1, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 20052b8: 10 80 00 06 b 20052d0 20052bc: c0 2f bf e4 clrb [ %fp + -28 ] break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 20052c0: 10 80 00 04 b 20052d0 20052c4: c2 2f bf e4 stb %g1, [ %fp + -28 ] break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 20052c8: 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; 20052cc: 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( 20052d0: 82 1e 60 01 xor %i1, 1, %g1 20052d4: 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; 20052d8: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 20052dc: 94 60 3f ff subx %g0, -1, %o2 20052e0: 90 04 20 14 add %l0, 0x14, %o0 20052e4: 40 00 03 2a call 2005f8c <_CORE_mutex_Initialize> 20052e8: 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 ) { 20052ec: 80 a2 20 06 cmp %o0, 6 20052f0: 32 80 00 19 bne,a 2005354 20052f4: c4 04 20 08 ld [ %l0 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 20052f8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20052fc: 11 00 80 5d sethi %hi(0x2017400), %o0 <== NOT EXECUTED 2005300: 90 12 21 b4 or %o0, 0x1b4, %o0 ! 20175b4 <_Semaphore_Information> <== NOT EXECUTED 2005304: 40 00 06 0e call 2006b3c <_Objects_Free> <== NOT EXECUTED 2005308: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200530c: 40 00 08 e7 call 20076a8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2005310: 01 00 00 00 nop <== NOT EXECUTED 2005314: 81 c7 e0 08 ret <== NOT EXECUTED 2005318: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 200531c: 80 8e a0 04 btst 4, %i2 2005320: 22 80 00 04 be,a 2005330 2005324: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 2005328: 82 10 20 01 mov 1, %g1 200532c: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005330: 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; 2005334: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 2005338: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 200533c: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005340: 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( 2005344: 90 04 20 14 add %l0, 0x14, %o0 2005348: 40 00 03 e8 call 20062e8 <_CORE_semaphore_Initialize> 200534c: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005350: c4 04 20 08 ld [ %l0 + 8 ], %g2 2005354: 03 00 80 5d sethi %hi(0x2017400), %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005358: e4 24 20 0c st %l2, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200535c: c6 00 61 d0 ld [ %g1 + 0x1d0 ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 2005360: c4 27 00 00 st %g2, [ %i4 ] 2005364: 03 00 00 3f sethi %hi(0xfc00), %g1 2005368: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200536c: 84 08 80 01 and %g2, %g1, %g2 2005370: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2005374: b0 10 20 00 clr %i0 2005378: 40 00 08 cc call 20076a8 <_Thread_Enable_dispatch> 200537c: e0 20 c0 02 st %l0, [ %g3 + %g2 ] 2005380: 81 c7 e0 08 ret 2005384: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 2005388: b0 10 20 0b mov 0xb, %i0 } 200538c: 81 c7 e0 08 ret 2005390: 81 e8 00 00 restore 02021454 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 2021454: 9d e3 bf 90 save %sp, -112, %sp 2021458: 11 00 81 6c sethi %hi(0x205b000), %o0 202145c: 92 10 00 18 mov %i0, %o1 2021460: 90 12 20 28 or %o0, 0x28, %o0 2021464: 7f ff a2 89 call 2009e88 <_Objects_Get> 2021468: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 202146c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2021470: 80 a0 60 00 cmp %g1, 0 2021474: 12 80 00 0f bne 20214b0 2021478: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 202147c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2021480: 80 88 60 30 btst 0x30, %g1 2021484: 02 80 00 06 be 202149c 2021488: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 202148c: 92 10 20 00 clr %o1 2021490: 7f ff 9e ba call 2008f78 <_CORE_mutex_Flush> 2021494: 94 10 20 01 mov 1, %o2 2021498: 30 80 00 04 b,a 20214a8 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 202149c: 92 10 20 00 clr %o1 <== NOT EXECUTED 20214a0: 7f ff 9f 8d call 20092d4 <_CORE_semaphore_Flush> <== NOT EXECUTED 20214a4: 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(); 20214a8: 7f ff a4 ea call 200a850 <_Thread_Enable_dispatch> 20214ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20214b0: 81 c7 e0 08 ret 20214b4: 81 e8 00 00 restore 02014c14 : */ void rtems_shutdown_executive( uint32_t result ) { 2014c14: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 2014c18: 05 00 80 5e sethi %hi(0x2017800), %g2 2014c1c: c2 00 a0 94 ld [ %g2 + 0x94 ], %g1 ! 2017894 <_System_state_Current> 2014c20: 80 a0 60 04 cmp %g1, 4 2014c24: 02 80 00 07 be 2014c40 2014c28: 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 ); 2014c2c: 13 00 80 5d sethi %hi(0x2017400), %o1 2014c30: c2 20 a0 94 st %g1, [ %g2 + 0x94 ] 2014c34: 92 12 62 68 or %o1, 0x268, %o1 2014c38: 7f ff d0 35 call 2008d0c <_CPU_Context_switch> 2014c3c: 90 07 bf 70 add %fp, -144, %o0 2014c40: 81 c7 e0 08 ret <== NOT EXECUTED 2014c44: 81 e8 00 00 restore <== NOT EXECUTED 020065f0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20065f0: 9d e3 bf 90 save %sp, -112, %sp 20065f4: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 20065f8: 80 a6 60 00 cmp %i1, 0 20065fc: 02 80 00 1c be 200666c 2006600: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 2006604: 80 a6 a0 00 cmp %i2, 0 2006608: 02 80 00 19 be 200666c 200660c: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 2006610: 11 00 80 5a sethi %hi(0x2016800), %o0 2006614: 92 10 00 12 mov %l2, %o1 2006618: 90 12 21 64 or %o0, 0x164, %o0 200661c: 40 00 05 23 call 2007aa8 <_Objects_Get> 2006620: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2006624: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006628: a0 10 00 08 mov %o0, %l0 200662c: 80 a0 60 00 cmp %g1, 0 2006630: 12 80 00 0f bne 200666c 2006634: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2006638: a2 02 20 10 add %o0, 0x10, %l1 200663c: 40 00 0c 53 call 2009788 <_Watchdog_Remove> 2006640: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 2006644: 7f ff ef 7e call 200243c 2006648: 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 ) { 200664c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2006650: 80 a0 60 00 cmp %g1, 0 2006654: 22 80 00 08 be,a 2006674 2006658: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 200665c: 7f ff ef 7c call 200244c <== NOT EXECUTED 2006660: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 2006664: 40 00 07 52 call 20083ac <_Thread_Enable_dispatch> <== NOT EXECUTED 2006668: 01 00 00 00 nop <== NOT EXECUTED 200666c: 81 c7 e0 08 ret 2006670: 81 e8 00 00 restore void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2006674: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2006678: 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; 200667c: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006680: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 2006684: 7f ff ef 72 call 200244c 2006688: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200668c: 92 10 00 11 mov %l1, %o1 2006690: 11 00 80 59 sethi %hi(0x2016400), %o0 2006694: 90 12 20 74 or %o0, 0x74, %o0 ! 2016474 <_Watchdog_Ticks_chain> 2006698: 40 00 0b e2 call 2009620 <_Watchdog_Insert> 200669c: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 20066a0: 40 00 07 43 call 20083ac <_Thread_Enable_dispatch> 20066a4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20066a8: 81 c7 e0 08 ret 20066ac: 81 e8 00 00 restore 0201187c : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 201187c: 9d e3 bf 90 save %sp, -112, %sp */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 2011880: 80 a6 20 00 cmp %i0, 0 2011884: 02 80 00 06 be 201189c 2011888: 82 10 20 00 clr %g1 201188c: 03 00 80 b1 sethi %hi(0x202c400), %g1 2011890: c2 08 62 14 ldub [ %g1 + 0x214 ], %g1 ! 202c614 2011894: 80 a0 40 18 cmp %g1, %i0 2011898: 82 60 3f ff subx %g0, -1, %g1 * Make sure the requested priority is valid. The if is * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { 201189c: 80 a0 60 00 cmp %g1, 0 20118a0: 12 80 00 06 bne 20118b8 20118a4: a2 10 00 18 mov %i0, %l1 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 20118a8: 80 a6 3f ff cmp %i0, -1 20118ac: 12 80 00 56 bne 2011a04 20118b0: 90 10 20 13 mov 0x13, %o0 20118b4: a2 10 20 00 clr %l1 20118b8: 05 00 80 c5 sethi %hi(0x2031400), %g2 20118bc: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 20317e0 <_Thread_Dispatch_disable_level> 20118c0: 82 00 60 01 inc %g1 20118c4: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20118c8: 31 00 80 b4 sethi %hi(0x202d000), %i0 initialized = true; 20118cc: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20118d0: e0 0e 21 5c ldub [ %i0 + 0x15c ], %l0 initialized = true; _Thread_Enable_dispatch(); 20118d4: 40 00 0c 21 call 2014958 <_Thread_Enable_dispatch> 20118d8: c2 2e 21 5c stb %g1, [ %i0 + 0x15c ] if ( tmpInitialized ) 20118dc: 80 a4 20 00 cmp %l0, 0 20118e0: 12 80 00 49 bne 2011a04 20118e4: 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); 20118e8: 05 00 80 c5 sethi %hi(0x2031400), %g2 20118ec: 82 10 a2 f4 or %g2, 0x2f4, %g1 ! 20316f4 <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20118f0: 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; 20118f4: 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); 20118f8: 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( 20118fc: 92 10 00 11 mov %l1, %o1 2011900: 94 10 00 19 mov %i1, %o2 2011904: 19 00 00 20 sethi %hi(0x8000), %o4 2011908: c2 20 a2 f4 st %g1, [ %g2 + 0x2f4 ] 201190c: 98 16 80 0c or %i2, %o4, %o4 2011910: 11 15 12 53 sethi %hi(0x54494c00), %o0 2011914: 96 10 21 00 mov 0x100, %o3 2011918: 90 12 21 45 or %o0, 0x145, %o0 201191c: 7f ff fc 77 call 2010af8 2011920: 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) { 2011924: 80 a2 20 00 cmp %o0, 0 2011928: 02 80 00 04 be 2011938 201192c: 03 00 80 c5 sethi %hi(0x2031400), %g1 initialized = false; 2011930: 10 80 00 35 b 2011a04 2011934: c0 2e 21 5c clrb [ %i0 + 0x15c ] * 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( 2011938: 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 ) 201193c: 86 10 62 94 or %g1, 0x294, %g3 2011940: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 2011944: 03 00 00 3f sethi %hi(0xfc00), %g1 2011948: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 201194c: 82 0a c0 01 and %o3, %g1, %g1 2011950: 80 a0 40 02 cmp %g1, %g2 2011954: 18 80 00 05 bgu 2011968 2011958: 98 10 20 00 clr %o4 return NULL; return information->local_table[ index ]; 201195c: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 2011960: 83 28 60 02 sll %g1, 2, %g1 2011964: d8 00 80 01 ld [ %g2 + %g1 ], %o4 2011968: 1b 00 80 c5 sethi %hi(0x2031400), %o5 201196c: 82 13 62 e8 or %o5, 0x2e8, %g1 ! 20316e8 <_Timer_Seconds_chain> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011970: 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; 2011974: 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); 2011978: 82 00 60 04 add %g1, 4, %g1 201197c: c2 23 62 e8 st %g1, [ %o5 + 0x2e8 ] 2011980: 03 00 80 c8 sethi %hi(0x2032000), %g1 2011984: 09 00 80 c5 sethi %hi(0x2031400), %g4 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2011988: c0 23 20 6c clr [ %o4 + 0x6c ] 201198c: 84 11 22 d4 or %g4, 0x2d4, %g2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011990: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011994: d6 23 20 68 st %o3, [ %o4 + 0x68 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011998: 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; 201199c: c0 20 a0 04 clr [ %g2 + 4 ] 20119a0: d8 20 61 90 st %o4, [ %g1 + 0x190 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 20119a4: 84 00 a0 04 add %g2, 4, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20119a8: 07 00 80 51 sethi %hi(0x2014400), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119ac: 03 00 80 c5 sethi %hi(0x2031400), %g1 the_watchdog->routine = routine; 20119b0: 86 10 e3 94 or %g3, 0x394, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119b4: 82 10 63 00 or %g1, 0x300, %g1 the_watchdog->routine = routine; 20119b8: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 20119bc: c4 21 22 d4 st %g2, [ %g4 + 0x2d4 ] 20119c0: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 20119c4: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20119c8: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 20119cc: 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; 20119d0: 05 00 80 c8 sethi %hi(0x2032000), %g2 20119d4: 03 00 80 46 sethi %hi(0x2011800), %g1 20119d8: 82 10 62 0c or %g1, 0x20c, %g1 ! 2011a0c <_Timer_Server_schedule_operation_method> /* * Start the timer server */ status = rtems_task_start( 20119dc: 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; 20119e0: c2 20 a1 8c st %g1, [ %g2 + 0x18c ] /* * Start the timer server */ status = rtems_task_start( 20119e4: 13 00 80 46 sethi %hi(0x2011800), %o1 20119e8: 94 10 20 00 clr %o2 20119ec: 7f ff fd 99 call 2011050 20119f0: 92 12 62 bc or %o1, 0x2bc, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 20119f4: 80 a2 20 00 cmp %o0, 0 20119f8: 02 80 00 03 be 2011a04 20119fc: 03 00 80 b4 sethi %hi(0x202d000), %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; 2011a00: c0 28 61 5c clrb [ %g1 + 0x15c ] ! 202d15c <== NOT EXECUTED } return status; } 2011a04: 81 c7 e0 08 ret 2011a08: 91 e8 00 08 restore %g0, %o0, %o0 020115f0 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 20115f0: 9d e3 bf 90 save %sp, -112, %sp 20115f4: 11 00 80 c8 sethi %hi(0x2032000), %o0 20115f8: 92 10 00 18 mov %i0, %o1 20115fc: 90 12 21 4c or %o0, 0x14c, %o0 2011600: 40 00 0a 68 call 2013fa0 <_Objects_Get> 2011604: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011608: c2 07 bf f4 ld [ %fp + -12 ], %g1 201160c: a0 10 00 08 mov %o0, %l0 2011610: 80 a0 60 00 cmp %g1, 0 2011614: 12 80 00 19 bne 2011678 2011618: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 201161c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011620: 80 a0 60 01 cmp %g1, 1 2011624: 22 80 00 0f be,a 2011660 2011628: 31 00 80 c8 sethi %hi(0x2032000), %i0 201162c: 2a 80 00 06 bcs,a 2011644 2011630: a0 02 20 10 add %o0, 0x10, %l0 2011634: 80 a0 60 04 cmp %g1, 4 2011638: 18 80 00 1c bgu 20116a8 201163c: 01 00 00 00 nop 2011640: 30 80 00 16 b,a 2011698 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 2011644: 40 00 12 f0 call 2016204 <_Watchdog_Remove> 2011648: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 201164c: 92 10 00 10 mov %l0, %o1 2011650: 11 00 80 c6 sethi %hi(0x2031800), %o0 2011654: 40 00 12 92 call 201609c <_Watchdog_Insert> 2011658: 90 12 20 c4 or %o0, 0xc4, %o0 ! 20318c4 <_Watchdog_Ticks_chain> 201165c: 30 80 00 13 b,a 20116a8 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 2011660: c2 06 21 8c ld [ %i0 + 0x18c ], %g1 2011664: 80 a0 60 00 cmp %g1, 0 2011668: 12 80 00 06 bne 2011680 201166c: 01 00 00 00 nop _Thread_Enable_dispatch(); 2011670: 40 00 0c ba call 2014958 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011674: b0 10 20 0e mov 0xe, %i0 ! e <== NOT EXECUTED 2011678: 81 c7 e0 08 ret 201167c: 81 e8 00 00 restore return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 2011680: 40 00 12 e1 call 2016204 <_Watchdog_Remove> 2011684: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 2011688: c2 06 21 8c ld [ %i0 + 0x18c ], %g1 201168c: 9f c0 40 00 call %g1 2011690: 90 10 00 10 mov %l0, %o0 2011694: 30 80 00 05 b,a 20116a8 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 2011698: 40 00 0c b0 call 2014958 <_Thread_Enable_dispatch> 201169c: b0 10 20 0b mov 0xb, %i0 20116a0: 81 c7 e0 08 ret 20116a4: 81 e8 00 00 restore return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 20116a8: 40 00 0c ac call 2014958 <_Thread_Enable_dispatch> 20116ac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20116b0: 81 c7 e0 08 ret 20116b4: 81 e8 00 00 restore 020116b8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20116b8: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20116bc: 03 00 80 c8 sethi %hi(0x2032000), %g1 20116c0: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 2032190 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20116c4: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20116c8: 80 a0 60 00 cmp %g1, 0 20116cc: 02 80 00 1e be 2011744 20116d0: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 20116d4: 80 a6 a0 00 cmp %i2, 0 20116d8: 02 80 00 1b be 2011744 20116dc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 20116e0: 80 a6 60 00 cmp %i1, 0 20116e4: 02 80 00 18 be 2011744 20116e8: b0 10 20 0a mov 0xa, %i0 20116ec: 11 00 80 c8 sethi %hi(0x2032000), %o0 20116f0: 92 10 00 11 mov %l1, %o1 20116f4: 90 12 21 4c or %o0, 0x14c, %o0 20116f8: 40 00 0a 2a call 2013fa0 <_Objects_Get> 20116fc: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; 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 0e bne 2011744 2011710: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011714: 40 00 12 bc call 2016204 <_Watchdog_Remove> 2011718: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 201171c: 7f ff e7 77 call 200b4f8 2011720: 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 ) { 2011724: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011728: 80 a0 60 00 cmp %g1, 0 201172c: 02 80 00 08 be 201174c 2011730: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 2011734: 7f ff e7 75 call 200b508 <== NOT EXECUTED 2011738: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 201173c: 40 00 0c 87 call 2014958 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011740: 01 00 00 00 nop <== NOT EXECUTED 2011744: 81 c7 e0 08 ret 2011748: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 201174c: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2011750: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2011754: 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; 2011758: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 201175c: 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; 2011760: 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 ); 2011764: 7f ff e7 69 call 200b508 2011768: 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 ); 201176c: 03 00 80 c8 sethi %hi(0x2032000), %g1 2011770: c2 00 61 8c ld [ %g1 + 0x18c ], %g1 ! 203218c <_Timer_Server_schedule_operation> 2011774: 9f c0 40 00 call %g1 2011778: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 201177c: 40 00 0c 77 call 2014958 <_Thread_Enable_dispatch> 2011780: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011784: 81 c7 e0 08 ret 2011788: 81 e8 00 00 restore 0200628c : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 200628c: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 2006290: 80 a6 60 00 cmp %i1, 0 2006294: 02 80 00 0d be 20062c8 2006298: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 200629c: 80 a6 20 00 cmp %i0, 0 20062a0: 02 80 00 0a be 20062c8 20062a4: 11 00 80 70 sethi %hi(0x201c000), %o0 return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 20062a8: 40 00 05 b0 call 2007968 <_Protected_heap_Allocate> 20062ac: 90 12 21 54 or %o0, 0x154, %o0 ! 201c154 <_Workspace_Area> if (!ptr) 20062b0: 80 a2 20 00 cmp %o0, 0 20062b4: 02 80 00 05 be 20062c8 20062b8: 01 00 00 00 nop return false; *pointer = ptr; 20062bc: d0 26 40 00 st %o0, [ %i1 ] 20062c0: 81 c7 e0 08 ret 20062c4: 91 e8 20 01 restore %g0, 1, %o0 return true; } 20062c8: 81 c7 e0 08 ret <== NOT EXECUTED 20062cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006270 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 2006270: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 2006274: 11 00 80 70 sethi %hi(0x201c000), %o0 <== NOT EXECUTED 2006278: 90 12 21 54 or %o0, 0x154, %o0 ! 201c154 <_Workspace_Area> <== NOT EXECUTED 200627c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2006280: 40 00 05 c6 call 2007998 <_Protected_heap_Free> <== NOT EXECUTED 2006284: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2006288: 01 00 00 00 nop 020062d0 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 20062d0: 80 a2 20 00 cmp %o0, 0 20062d4: 12 80 00 04 bne 20062e4 20062d8: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); } 20062dc: 81 c3 e0 08 retl <== NOT EXECUTED 20062e0: 01 00 00 00 nop <== NOT EXECUTED ) { if ( !the_info ) return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 20062e4: 11 00 80 70 sethi %hi(0x201c000), %o0 20062e8: 90 12 21 54 or %o0, 0x154, %o0 ! 201c154 <_Workspace_Area> 20062ec: 82 13 c0 00 mov %o7, %g1 20062f0: 40 00 05 b6 call 20079c8 <_Protected_heap_Get_information> 20062f4: 9e 10 40 00 mov %g1, %o7 20062f8: 01 00 00 00 nop 02007c04 : */ int sem_destroy( sem_t *sem ) { 2007c04: 9d e3 bf 90 save %sp, -112, %sp 2007c08: d2 06 00 00 ld [ %i0 ], %o1 2007c0c: 11 00 80 78 sethi %hi(0x201e000), %o0 2007c10: 94 07 bf f4 add %fp, -12, %o2 2007c14: 40 00 09 27 call 200a0b0 <_Objects_Get> 2007c18: 90 12 22 10 or %o0, 0x210, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 2007c1c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007c20: 80 a0 60 00 cmp %g1, 0 2007c24: 12 80 00 14 bne 2007c74 2007c28: 01 00 00 00 nop case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 2007c2c: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 2007c30: 80 a0 60 00 cmp %g1, 0 2007c34: 02 80 00 0a be 2007c5c 2007c38: 01 00 00 00 nop _Thread_Enable_dispatch(); 2007c3c: 40 00 0b 5e call 200a9b4 <_Thread_Enable_dispatch> <== NOT EXECUTED 2007c40: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2007c44: 40 00 23 a0 call 2010ac4 <__errno> <== NOT EXECUTED 2007c48: 01 00 00 00 nop <== NOT EXECUTED 2007c4c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007c50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007c54: 81 c7 e0 08 ret <== NOT EXECUTED 2007c58: 81 e8 00 00 restore <== NOT EXECUTED } _POSIX_Semaphore_Delete( the_semaphore ); 2007c5c: 40 00 1b 3f call 200e958 <_POSIX_Semaphore_Delete> 2007c60: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2007c64: 40 00 0b 54 call 200a9b4 <_Thread_Enable_dispatch> 2007c68: 01 00 00 00 nop 2007c6c: 81 c7 e0 08 ret 2007c70: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2007c74: 40 00 23 94 call 2010ac4 <__errno> 2007c78: b0 10 3f ff mov -1, %i0 2007c7c: 82 10 20 16 mov 0x16, %g1 2007c80: c2 22 00 00 st %g1, [ %o0 ] } 2007c84: 81 c7 e0 08 ret 2007c88: 81 e8 00 00 restore 02007ce4 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 2007ce4: 9d e3 bf 90 save %sp, -112, %sp 2007ce8: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 2007cec: 80 a6 20 00 cmp %i0, 0 2007cf0: 12 80 00 08 bne 2007d10 2007cf4: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); 2007cf8: 40 00 23 73 call 2010ac4 <__errno> <== NOT EXECUTED 2007cfc: 01 00 00 00 nop <== NOT EXECUTED 2007d00: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007d04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007d08: 10 80 00 0a b 2007d30 <== NOT EXECUTED 2007d0c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 2007d10: 90 10 20 00 clr %o0 2007d14: 40 00 1a ca call 200e83c <_POSIX_Semaphore_Create_support> 2007d18: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 2007d1c: 80 a2 3f ff cmp %o0, -1 2007d20: 02 80 00 04 be 2007d30 2007d24: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 2007d28: c2 00 60 08 ld [ %g1 + 8 ], %g1 2007d2c: c2 26 00 00 st %g1, [ %i0 ] return status; } 2007d30: 81 c7 e0 08 ret 2007d34: 91 e8 00 08 restore %g0, %o0, %o0 02007eb0 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 2007eb0: 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 ); 2007eb4: 92 07 bf f4 add %fp, -12, %o1 2007eb8: 40 00 18 1b call 200df24 <_POSIX_Absolute_timeout_to_ticks> 2007ebc: 90 10 00 19 mov %i1, %o0 switch ( status ) { 2007ec0: 80 a2 20 02 cmp %o0, 2 2007ec4: 18 80 00 03 bgu 2007ed0 2007ec8: 92 10 20 01 mov 1, %o1 2007ecc: 92 10 20 00 clr %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 2007ed0: d4 07 bf f4 ld [ %fp + -12 ], %o2 2007ed4: 90 10 00 18 mov %i0, %o0 2007ed8: 40 00 1a d3 call 200ea24 <_POSIX_Semaphore_Wait_support> 2007edc: 92 0a 60 01 and %o1, 1, %o1 break; } } return lock_status; } 2007ee0: 81 c7 e0 08 ret 2007ee4: 91 e8 00 08 restore %g0, %o0, %o0 02007fa8 : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 2007fa8: 92 10 20 01 mov 1, %o1 2007fac: 94 10 20 00 clr %o2 2007fb0: 82 13 c0 00 mov %o7, %g1 2007fb4: 40 00 1a 9c call 200ea24 <_POSIX_Semaphore_Wait_support> 2007fb8: 9e 10 40 00 mov %g1, %o7 2007fbc: 01 00 00 00 nop <== NOT EXECUTED 02007fd0 : int sigwait( const sigset_t *set, int *sig ) { 2007fd0: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 2007fd4: 92 10 20 00 clr %o1 2007fd8: 90 10 00 18 mov %i0, %o0 2007fdc: 7f ff ff 8d call 2007e10 2007fe0: 94 10 20 00 clr %o2 if ( status != -1 ) { 2007fe4: 80 a2 3f ff cmp %o0, -1 2007fe8: 02 80 00 07 be 2008004 2007fec: 80 a6 60 00 cmp %i1, 0 if ( sig ) 2007ff0: 02 80 00 03 be 2007ffc 2007ff4: b0 10 20 00 clr %i0 *sig = status; 2007ff8: d0 26 40 00 st %o0, [ %i1 ] 2007ffc: 81 c7 e0 08 ret 2008000: 81 e8 00 00 restore return 0; } return errno; 2008004: 40 00 21 fa call 20107ec <__errno> <== NOT EXECUTED 2008008: 01 00 00 00 nop <== NOT EXECUTED 200800c: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 2008010: 81 c7 e0 08 ret <== NOT EXECUTED 2008014: 81 e8 00 00 restore <== NOT EXECUTED 02004d80 : */ long sysconf( int name ) { 2004d80: 9d e3 bf 98 save %sp, -104, %sp switch (name) { 2004d84: 80 a6 20 08 cmp %i0, 8 2004d88: 02 80 00 1f be 2004e04 2004d8c: 11 00 00 04 sethi %hi(0x1000), %o0 2004d90: 80 a6 20 08 cmp %i0, 8 2004d94: 14 80 00 09 bg 2004db8 2004d98: 80 a6 20 33 cmp %i0, 0x33 2004d9c: 80 a6 20 02 cmp %i0, 2 2004da0: 02 80 00 0d be 2004dd4 2004da4: 80 a6 20 04 cmp %i0, 4 2004da8: 12 80 00 12 bne 2004df0 2004dac: 03 00 80 50 sethi %hi(0x2014000), %g1 2004db0: 10 80 00 15 b 2004e04 2004db4: d0 00 63 f8 ld [ %g1 + 0x3f8 ], %o0 ! 20143f8 2004db8: 02 80 00 13 be 2004e04 2004dbc: 90 10 24 00 mov 0x400, %o0 2004dc0: 80 a6 22 03 cmp %i0, 0x203 2004dc4: 12 80 00 0b bne 2004df0 2004dc8: 90 10 20 00 clr %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 2004dcc: 81 c7 e0 08 ret <== NOT EXECUTED 2004dd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ) { switch (name) { case _SC_CLK_TCK: return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick); 2004dd4: 03 00 80 55 sethi %hi(0x2015400), %g1 2004dd8: d2 00 60 40 ld [ %g1 + 0x40 ], %o1 ! 2015440 <_TOD_Microseconds_per_tick> 2004ddc: 11 00 03 d0 sethi %hi(0xf4000), %o0 2004de0: 40 00 30 77 call 2010fbc <.udiv> 2004de4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 2004de8: 81 c7 e0 08 ret 2004dec: 91 e8 00 08 restore %g0, %o0, %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2004df0: 40 00 21 ad call 200d4a4 <__errno> 2004df4: 01 00 00 00 nop 2004df8: 82 10 20 16 mov 0x16, %g1 ! 16 2004dfc: c2 22 00 00 st %g1, [ %o0 ] 2004e00: 90 10 3f ff mov -1, %o0 } 2004e04: b0 10 00 08 mov %o0, %i0 2004e08: 81 c7 e0 08 ret 2004e0c: 81 e8 00 00 restore 020068a8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 20068a8: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 20068ac: 80 a6 a0 00 cmp %i2, 0 20068b0: 02 80 00 22 be 2006938 20068b4: 01 00 00 00 nop 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 ) || 20068b8: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 20068bc: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 20068c0: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff 20068c4: 80 a0 80 01 cmp %g2, %g1 20068c8: 18 80 00 1c bgu 2006938 20068cc: 01 00 00 00 nop 20068d0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 20068d4: 80 a0 80 01 cmp %g2, %g1 20068d8: 18 80 00 18 bgu 2006938 20068dc: 80 a0 a0 00 cmp %g2, 0 20068e0: 06 80 00 16 bl 2006938 20068e4: 01 00 00 00 nop ( 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 ) { 20068e8: 80 a6 60 04 cmp %i1, 4 20068ec: 02 80 00 04 be 20068fc 20068f0: 80 a6 60 00 cmp %i1, 0 20068f4: 12 80 00 11 bne 2006938 20068f8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 20068fc: 90 07 bf e4 add %fp, -28, %o0 2006900: 92 10 00 1a mov %i2, %o1 2006904: 40 00 24 54 call 200fa54 2006908: 94 10 20 10 mov 0x10, %o2 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 200690c: 80 a6 60 04 cmp %i1, 4 2006910: 12 80 00 14 bne 2006960 2006914: 92 10 00 18 mov %i0, %o1 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 2006918: b2 07 bf ec add %fp, -20, %i1 200691c: 21 00 80 70 sethi %hi(0x201c000), %l0 2006920: 92 10 00 19 mov %i1, %o1 2006924: 40 00 0e bd call 200a418 <_Timespec_Greater_than> 2006928: 90 14 22 04 or %l0, 0x204, %o0 200692c: 80 8a 20 ff btst 0xff, %o0 2006930: 02 80 00 08 be 2006950 2006934: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 2006938: 40 00 22 2f call 200f1f4 <__errno> 200693c: b0 10 3f ff mov -1, %i0 2006940: 82 10 20 16 mov 0x16, %g1 2006944: c2 22 00 00 st %g1, [ %o0 ] 2006948: 81 c7 e0 08 ret 200694c: 81 e8 00 00 restore _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 2006950: 90 14 22 04 or %l0, 0x204, %o0 2006954: 40 00 0e c2 call 200a45c <_Timespec_Subtract> 2006958: 94 10 00 19 mov %i1, %o2 200695c: 92 10 00 18 mov %i0, %o1 2006960: 11 00 80 71 sethi %hi(0x201c400), %o0 2006964: 94 07 bf f4 add %fp, -12, %o2 2006968: 40 00 08 9e call 2008be0 <_Objects_Get> 200696c: 90 12 20 c0 or %o0, 0xc0, %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 ) { 2006970: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006974: 80 a0 60 00 cmp %g1, 0 2006978: 12 80 00 39 bne 2006a5c 200697c: 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 ) { 2006980: c2 07 bf ec ld [ %fp + -20 ], %g1 2006984: 80 a0 60 00 cmp %g1, 0 2006988: 12 80 00 14 bne 20069d8 200698c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006990: 80 a0 60 00 cmp %g1, 0 2006994: 12 80 00 11 bne 20069d8 2006998: 01 00 00 00 nop /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 200699c: 40 00 0f f3 call 200a968 <_Watchdog_Remove> 20069a0: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 20069a4: 80 a6 e0 00 cmp %i3, 0 20069a8: 02 80 00 05 be 20069bc 20069ac: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 20069b0: 92 06 60 54 add %i1, 0x54, %o1 <== NOT EXECUTED 20069b4: 40 00 24 28 call 200fa54 <== NOT EXECUTED 20069b8: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 20069bc: 92 07 bf e4 add %fp, -28, %o1 20069c0: 94 10 20 10 mov 0x10, %o2 20069c4: 40 00 24 24 call 200fa54 20069c8: 90 06 60 54 add %i1, 0x54, %o0 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 20069cc: 82 10 20 04 mov 4, %g1 20069d0: 10 80 00 1f b 2006a4c 20069d4: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 20069d8: 40 00 0e b5 call 200a4ac <_Timespec_To_ticks> 20069dc: 90 10 00 1a mov %i2, %o0 20069e0: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 20069e4: 40 00 0e b2 call 200a4ac <_Timespec_To_ticks> 20069e8: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 20069ec: 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 ); 20069f0: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 20069f4: 17 00 80 1a sethi %hi(0x2006800), %o3 20069f8: 90 06 60 10 add %i1, 0x10, %o0 20069fc: 96 12 e2 74 or %o3, 0x274, %o3 2006a00: 40 00 1a 8c call 200d430 <_POSIX_Timer_Insert_helper> 2006a04: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 2006a08: 80 8a 20 ff btst 0xff, %o0 2006a0c: 02 80 00 10 be 2006a4c 2006a10: 01 00 00 00 nop /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 2006a14: 80 a6 e0 00 cmp %i3, 0 2006a18: 02 80 00 05 be 2006a2c 2006a1c: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 2006a20: 92 06 60 54 add %i1, 0x54, %o1 2006a24: 40 00 24 0c call 200fa54 2006a28: 94 10 20 10 mov 0x10, %o2 ptimer->timer_data = normalize; 2006a2c: 92 07 bf e4 add %fp, -28, %o1 2006a30: 94 10 20 10 mov 0x10, %o2 2006a34: 40 00 24 08 call 200fa54 2006a38: 90 06 60 54 add %i1, 0x54, %o0 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2006a3c: 82 10 20 03 mov 3, %g1 _TOD_Get( &ptimer->time ); 2006a40: 90 06 60 6c add %i1, 0x6c, %o0 2006a44: 40 00 06 0a call 200826c <_TOD_Get> 2006a48: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 2006a4c: 40 00 0a a6 call 20094e4 <_Thread_Enable_dispatch> 2006a50: b0 10 20 00 clr %i0 2006a54: 81 c7 e0 08 ret 2006a58: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2006a5c: 40 00 21 e6 call 200f1f4 <__errno> <== NOT EXECUTED 2006a60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2006a64: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2006a68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 2006a6c: 81 c7 e0 08 ret <== NOT EXECUTED 2006a70: 81 e8 00 00 restore <== NOT EXECUTED