40006100 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40006100: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006104: 03 10 00 66 sethi %hi(0x40019800), %g1 40006108: e0 00 61 84 ld [ %g1 + 0x184 ], %l0 ! 40019984 <_API_extensions_List> 4000610c: 82 10 61 84 or %g1, 0x184, %g1 40006110: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006114: 80 a4 00 11 cmp %l0, %l1 40006118: 02 80 00 0c be 40006148 <_API_extensions_Run_postdriver+0x48> 4000611c: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40006120: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40006124: 80 a0 60 00 cmp %g1, 0 40006128: 22 80 00 05 be,a 4000613c <_API_extensions_Run_postdriver+0x3c> 4000612c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40006130: 9f c0 40 00 call %g1 40006134: 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 ) { 40006138: 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 ) ; 4000613c: 80 a4 00 11 cmp %l0, %l1 40006140: 32 bf ff f9 bne,a 40006124 <_API_extensions_Run_postdriver+0x24> 40006144: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40006148: 81 c7 e0 08 ret 4000614c: 81 e8 00 00 restore 40006150 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40006150: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006154: 03 10 00 66 sethi %hi(0x40019800), %g1 40006158: e0 00 61 84 ld [ %g1 + 0x184 ], %l0 ! 40019984 <_API_extensions_List> 4000615c: 82 10 61 84 or %g1, 0x184, %g1 40006160: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40006164: 80 a4 00 11 cmp %l0, %l1 40006168: 02 80 00 0d be 4000619c <_API_extensions_Run_postswitch+0x4c> 4000616c: 03 10 00 66 sethi %hi(0x40019800), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 40006170: a4 10 60 00 mov %g1, %l2 ! 40019800 <_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 ) 40006174: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40006178: 80 a0 60 00 cmp %g1, 0 4000617c: 22 80 00 05 be,a 40006190 <_API_extensions_Run_postswitch+0x40> 40006180: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40006184: 9f c0 40 00 call %g1 40006188: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 4000618c: 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 ) ; 40006190: 80 a4 00 11 cmp %l0, %l1 40006194: 32 bf ff f9 bne,a 40006178 <_API_extensions_Run_postswitch+0x28> 40006198: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000619c: 81 c7 e0 08 ret 400061a0: 81 e8 00 00 restore 400060b0 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 400060b0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400060b4: 03 10 00 66 sethi %hi(0x40019800), %g1 400060b8: e0 00 61 84 ld [ %g1 + 0x184 ], %l0 ! 40019984 <_API_extensions_List> 400060bc: 82 10 61 84 or %g1, 0x184, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400060c0: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400060c4: 80 a4 00 11 cmp %l0, %l1 400060c8: 02 80 00 0c be 400060f8 <_API_extensions_Run_predriver+0x48> 400060cc: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 400060d0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400060d4: 80 a0 60 00 cmp %g1, 0 400060d8: 22 80 00 05 be,a 400060ec <_API_extensions_Run_predriver+0x3c> 400060dc: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 400060e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400060e4: 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 ) { 400060e8: 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 ) ; 400060ec: 80 a4 00 11 cmp %l0, %l1 400060f0: 32 bf ff f9 bne,a 400060d4 <_API_extensions_Run_predriver+0x24> 400060f4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400060f8: 81 c7 e0 08 ret 400060fc: 81 e8 00 00 restore 40008550 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 40008550: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 40008554: 03 10 00 70 sethi %hi(0x4001c000), %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 ); 40008558: 7f ff ea 10 call 40002d98 4000855c: e0 00 62 f0 ld [ %g1 + 0x2f0 ], %l0 ! 4001c2f0 <_Thread_Executing> 40008560: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 40008564: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 40008568: 80 a0 60 00 cmp %g1, 0 4000856c: 02 80 00 2d be 40008620 <_CORE_RWLock_Release+0xd0> 40008570: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 40008574: 22 80 00 23 be,a 40008600 <_CORE_RWLock_Release+0xb0> 40008578: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4000857c: 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; 40008580: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 40008584: 7f ff ea 09 call 40002da8 40008588: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 4000858c: 40 00 06 07 call 40009da8 <_Thread_queue_Dequeue> 40008590: 90 10 00 18 mov %i0, %o0 if ( next ) { 40008594: 80 a2 20 00 cmp %o0, 0 40008598: 02 80 00 18 be 400085f8 <_CORE_RWLock_Release+0xa8> 4000859c: 01 00 00 00 nop if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 400085a0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 400085a4: 80 a0 60 01 cmp %g1, 1 400085a8: 02 80 00 24 be 40008638 <_CORE_RWLock_Release+0xe8> 400085ac: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 400085b0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400085b4: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 400085b8: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 400085bc: 10 80 00 0a b 400085e4 <_CORE_RWLock_Release+0x94> 400085c0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 400085c4: 80 a0 60 01 cmp %g1, 1 400085c8: 02 80 00 0c be 400085f8 <_CORE_RWLock_Release+0xa8> 400085cc: 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; 400085d0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 400085d4: 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; 400085d8: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 400085dc: 40 00 07 19 call 4000a240 <_Thread_queue_Extract> 400085e0: 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 ); 400085e4: 40 00 07 68 call 4000a384 <_Thread_queue_First> 400085e8: 90 10 00 18 mov %i0, %o0 if ( !next || 400085ec: 80 a2 20 00 cmp %o0, 0 400085f0: 32 bf ff f5 bne,a 400085c4 <_CORE_RWLock_Release+0x74> 400085f4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 400085f8: 81 c7 e0 08 ret 400085fc: 91 e8 20 00 restore %g0, 0, %o0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 40008600: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 40008604: 80 a0 60 00 cmp %g1, 0 40008608: 02 bf ff dd be 4000857c <_CORE_RWLock_Release+0x2c> 4000860c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 40008610: 7f ff e9 e6 call 40002da8 40008614: b0 10 20 00 clr %i0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40008618: 81 c7 e0 08 ret 4000861c: 81 e8 00 00 restore * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 40008620: 7f ff e9 e2 call 40002da8 <== NOT EXECUTED 40008624: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 40008628: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000862c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40008630: 81 c7 e0 08 ret <== NOT EXECUTED 40008634: 81 e8 00 00 restore <== NOT EXECUTED next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 40008638: 82 10 20 02 mov 2, %g1 4000863c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40008640: 81 c7 e0 08 ret 40008644: 91 e8 20 00 restore %g0, 0, %o0 4001269c <_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 ) { 4001269c: 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 ) { 400126a0: 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 ) { 400126a4: 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 ) { 400126a8: 80 a0 40 1a cmp %g1, %i2 400126ac: 0a 80 00 17 bcs 40012708 <_CORE_message_queue_Broadcast+0x6c> 400126b0: 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 ) { 400126b4: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 400126b8: 80 a0 60 00 cmp %g1, 0 400126bc: 02 80 00 0a be 400126e4 <_CORE_message_queue_Broadcast+0x48> 400126c0: a2 10 20 00 clr %l1 *count = 0; 400126c4: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 400126c8: 81 c7 e0 08 ret <== NOT EXECUTED 400126cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 400126d0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 400126d4: 40 00 23 3a call 4001b3bc 400126d8: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 400126dc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 400126e0: 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))) { 400126e4: 40 00 0a 05 call 40014ef8 <_Thread_queue_Dequeue> 400126e8: 90 10 00 12 mov %l2, %o0 400126ec: 92 10 00 19 mov %i1, %o1 400126f0: a0 10 00 08 mov %o0, %l0 400126f4: 80 a2 20 00 cmp %o0, 0 400126f8: 12 bf ff f6 bne 400126d0 <_CORE_message_queue_Broadcast+0x34> 400126fc: 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; 40012700: e2 27 40 00 st %l1, [ %i5 ] 40012704: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40012708: 81 c7 e0 08 ret 4001270c: 81 e8 00 00 restore 40014750 <_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 ) { 40014750: 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 ) { 40014754: 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 ) { 40014758: 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 ) { 4001475c: 80 a0 40 1a cmp %g1, %i2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 40014760: 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 ) { 40014764: 0a 80 00 22 bcs 400147ec <_CORE_message_queue_Submit+0x9c> 40014768: 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 ) { 4001476c: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40014770: 80 a0 a0 00 cmp %g2, 0 40014774: 02 80 00 22 be 400147fc <_CORE_message_queue_Submit+0xac> 40014778: 01 00 00 00 nop /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 4001477c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40014780: 80 a0 40 02 cmp %g1, %g2 40014784: 18 80 00 2b bgu 40014830 <_CORE_message_queue_Submit+0xe0> 40014788: 80 a4 a0 00 cmp %l2, 0 * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 4001478c: 02 80 00 18 be 400147ec <_CORE_message_queue_Submit+0x9c> 40014790: 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() ) { 40014794: 03 10 00 aa sethi %hi(0x4002a800), %g1 40014798: c4 00 60 9c ld [ %g1 + 0x9c ], %g2 ! 4002a89c <_ISR_Nest_level> 4001479c: 80 a0 a0 00 cmp %g2, 0 400147a0: 32 80 00 13 bne,a 400147ec <_CORE_message_queue_Submit+0x9c> 400147a4: 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; 400147a8: 03 10 00 aa sethi %hi(0x4002a800), %g1 _ISR_Disable( level ); 400147ac: 7f ff b7 69 call 40002550 400147b0: e0 00 60 c0 ld [ %g1 + 0xc0 ], %l0 ! 4002a8c0 <_Thread_Executing> 400147b4: 82 10 20 01 mov 1, %g1 400147b8: 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; 400147bc: 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; 400147c0: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 400147c4: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 400147c8: 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; 400147cc: 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 ); 400147d0: 7f ff b7 64 call 40002560 400147d4: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 400147d8: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 400147dc: 90 10 00 11 mov %l1, %o0 400147e0: 15 10 00 3a sethi %hi(0x4000e800), %o2 400147e4: 7f ff e7 9e call 4000e65c <_Thread_queue_Enqueue_with_handler> 400147e8: 94 12 a2 b4 or %o2, 0x2b4, %o2 ! 4000eab4 <_Thread_queue_Timeout> 400147ec: 81 c7 e0 08 ret 400147f0: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 400147f4: 81 c7 e0 08 ret <== NOT EXECUTED 400147f8: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 400147fc: 7f ff e7 34 call 4000e4cc <_Thread_queue_Dequeue> 40014800: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40014804: a0 92 20 00 orcc %o0, 0, %l0 40014808: 02 80 00 1b be 40014874 <_CORE_message_queue_Submit+0x124> 4001480c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40014810: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40014814: 40 00 15 3b call 40019d00 40014818: 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; 4001481c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40014820: 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; 40014824: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40014828: 81 c7 e0 08 ret 4001482c: 91 e8 20 00 restore %g0, 0, %o0 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 40014830: 7f ff e0 1e call 4000c8a8 <_Chain_Get> 40014834: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40014838: a0 92 20 00 orcc %o0, 0, %l0 4001483c: 02 bf ff ee be 400147f4 <_CORE_message_queue_Submit+0xa4> 40014840: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40014844: 94 10 00 1a mov %i2, %o2 40014848: 40 00 15 2e call 40019d00 4001484c: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40014850: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40014854: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40014858: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 4001485c: 92 10 00 10 mov %l0, %o1 40014860: 94 10 00 1d mov %i5, %o2 40014864: 40 00 0d 1c call 40017cd4 <_CORE_message_queue_Insert_message> 40014868: b0 10 20 00 clr %i0 4001486c: 81 c7 e0 08 ret 40014870: 81 e8 00 00 restore * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 40014874: 10 bf ff c2 b 4001477c <_CORE_message_queue_Submit+0x2c> 40014878: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4000bd40 <_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 ) { 4000bd40: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000bd44: 03 10 00 66 sethi %hi(0x40019800), %g1 4000bd48: c6 00 60 00 ld [ %g1 ], %g3 CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000bd4c: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000bd50: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000bd54: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000bd58: 80 a0 60 00 cmp %g1, 0 4000bd5c: 22 80 00 12 be,a 4000bda4 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000bd60: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 4000bd64: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000bd68: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000bd6c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000bd70: 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; 4000bd74: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000bd78: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000bd7c: 80 a0 a0 02 cmp %g2, 2 4000bd80: 02 80 00 0e be 4000bdb8 <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000bd84: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000bd88: 80 a0 a0 03 cmp %g2, 3 4000bd8c: 22 80 00 0d be,a 4000bdc0 <_CORE_mutex_Seize_interrupt_trylock+0x80> 4000bd90: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 4000bd94: 7f ff d7 e7 call 40001d30 4000bd98: b0 10 20 00 clr %i0 4000bd9c: 81 c7 e0 08 ret 4000bda0: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000bda4: 80 a0 c0 01 cmp %g3, %g1 4000bda8: 22 80 00 2a be,a 4000be50 <_CORE_mutex_Seize_interrupt_trylock+0x110> 4000bdac: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000bdb0: 81 c7 e0 08 ret 4000bdb4: 91 e8 20 01 restore %g0, 1, %o0 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000bdb8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000bdbc: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000bdc0: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000bdc4: 12 bf ff f4 bne 4000bd94 <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000bdc8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000bdcc: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 4000bdd0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 if ( current == ceiling ) { 4000bdd4: 80 a0 80 01 cmp %g2, %g1 4000bdd8: 02 80 00 2f be 4000be94 <_CORE_mutex_Seize_interrupt_trylock+0x154> 4000bddc: 01 00 00 00 nop _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000bde0: 1a 80 00 11 bcc 4000be24 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 4000bde4: 82 10 20 06 mov 6, %g1 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000bde8: 05 10 00 65 sethi %hi(0x40019400), %g2 4000bdec: c2 00 a3 40 ld [ %g2 + 0x340 ], %g1 ! 40019740 <_Thread_Dispatch_disable_level> 4000bdf0: 82 00 60 01 inc %g1 4000bdf4: c2 20 a3 40 st %g1, [ %g2 + 0x340 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000bdf8: 7f ff d7 ce call 40001d30 4000bdfc: 01 00 00 00 nop _Thread_Change_priority( 4000be00: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000be04: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000be08: 94 10 20 00 clr %o2 4000be0c: 7f ff ed a9 call 400074b0 <_Thread_Change_priority> 4000be10: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000be14: 7f ff ef 21 call 40007a98 <_Thread_Enable_dispatch> 4000be18: 01 00 00 00 nop 4000be1c: 81 c7 e0 08 ret 4000be20: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000be24: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4000be28: 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; 4000be2c: 84 10 20 01 mov 1, %g2 4000be30: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000be34: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000be38: 82 00 7f ff add %g1, -1, %g1 4000be3c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] _ISR_Enable( level ); 4000be40: 7f ff d7 bc call 40001d30 4000be44: b0 10 20 00 clr %i0 4000be48: 81 c7 e0 08 ret 4000be4c: 81 e8 00 00 restore * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000be50: 80 a0 60 00 cmp %g1, 0 4000be54: 22 80 00 0a be,a 4000be7c <_CORE_mutex_Seize_interrupt_trylock+0x13c> 4000be58: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000be5c: 80 a0 60 01 cmp %g1, 1 4000be60: 12 bf ff d4 bne 4000bdb0 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000be64: 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; 4000be68: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 4000be6c: 7f ff d7 b1 call 40001d30 4000be70: b0 10 20 00 clr %i0 4000be74: 81 c7 e0 08 ret 4000be78: 81 e8 00 00 restore * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000be7c: 82 00 60 01 inc %g1 4000be80: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000be84: 7f ff d7 ab call 40001d30 4000be88: b0 10 20 00 clr %i0 4000be8c: 81 c7 e0 08 ret 4000be90: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000be94: 7f ff d7 a7 call 40001d30 <== NOT EXECUTED 4000be98: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000be9c: 81 c7 e0 08 ret <== NOT EXECUTED 4000bea0: 81 e8 00 00 restore <== NOT EXECUTED 40006520 <_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 ) { 40006520: 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 ) { 40006524: 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 ) { 40006528: 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 ) { 4000652c: 80 a0 60 00 cmp %g1, 0 40006530: 02 80 00 07 be 4000654c <_CORE_mutex_Surrender+0x2c> 40006534: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 40006538: 03 10 00 66 sethi %hi(0x40019800), %g1 4000653c: c4 00 60 00 ld [ %g1 ], %g2 40006540: 80 a2 00 02 cmp %o0, %g2 40006544: 12 80 00 2e bne 400065fc <_CORE_mutex_Surrender+0xdc> 40006548: 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 ) 4000654c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40006550: 80 a0 60 00 cmp %g1, 0 40006554: 02 80 00 22 be 400065dc <_CORE_mutex_Surrender+0xbc> 40006558: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 4000655c: 80 a0 60 00 cmp %g1, 0 40006560: 12 80 00 21 bne 400065e4 <_CORE_mutex_Surrender+0xc4> 40006564: c2 24 20 54 st %g1, [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40006568: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000656c: 80 a0 a0 02 cmp %g2, 2 40006570: 02 80 00 31 be 40006634 <_CORE_mutex_Surrender+0x114> 40006574: 80 a0 a0 03 cmp %g2, 3 40006578: 22 80 00 30 be,a 40006638 <_CORE_mutex_Surrender+0x118> 4000657c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 40006580: 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 ) || 40006584: 80 a0 a0 02 cmp %g2, 2 40006588: 02 80 00 1f be 40006604 <_CORE_mutex_Surrender+0xe4> 4000658c: c0 24 20 60 clr [ %l0 + 0x60 ] 40006590: 80 a0 a0 03 cmp %g2, 3 40006594: 22 80 00 1d be,a 40006608 <_CORE_mutex_Surrender+0xe8> 40006598: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 4000659c: 40 00 06 1a call 40007e04 <_Thread_queue_Dequeue> 400065a0: 90 10 00 10 mov %l0, %o0 400065a4: 86 92 20 00 orcc %o0, 0, %g3 400065a8: 02 80 00 37 be 40006684 <_CORE_mutex_Surrender+0x164> 400065ac: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400065b0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 400065b4: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400065b8: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400065bc: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400065c0: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 400065c4: 80 a0 a0 02 cmp %g2, 2 400065c8: 02 80 00 2a be 40006670 <_CORE_mutex_Surrender+0x150> 400065cc: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 400065d0: 80 a0 a0 03 cmp %g2, 3 400065d4: 22 80 00 1c be,a 40006644 <_CORE_mutex_Surrender+0x124> 400065d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400065dc: 81 c7 e0 08 ret 400065e0: 91 e8 20 00 restore %g0, 0, %o0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400065e4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 400065e8: 80 a0 60 00 cmp %g1, 0 400065ec: 02 bf ff fc be 400065dc <_CORE_mutex_Surrender+0xbc> 400065f0: 80 a0 60 01 cmp %g1, 1 400065f4: 12 bf ff dd bne 40006568 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 400065f8: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400065fc: 81 c7 e0 08 ret 40006600: 81 e8 00 00 restore _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 40006604: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006608: 80 a0 60 00 cmp %g1, 0 4000660c: 12 bf ff e4 bne 4000659c <_CORE_mutex_Surrender+0x7c> 40006610: 01 00 00 00 nop 40006614: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40006618: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000661c: 80 a2 40 01 cmp %o1, %g1 40006620: 02 bf ff df be 4000659c <_CORE_mutex_Surrender+0x7c> 40006624: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40006628: 40 00 03 a2 call 400074b0 <_Thread_Change_priority> 4000662c: 94 10 20 01 mov 1, %o2 ! 1 40006630: 30 bf ff db b,a 4000659c <_CORE_mutex_Surrender+0x7c> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 40006634: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006638: 82 00 7f ff add %g1, -1, %g1 4000663c: 10 bf ff d1 b 40006580 <_CORE_mutex_Surrender+0x60> 40006640: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < 40006644: 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++; 40006648: 82 00 60 01 inc %g1 4000664c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 40006650: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 40006654: 80 a2 40 02 cmp %o1, %g2 40006658: 1a bf ff e1 bcc 400065dc <_CORE_mutex_Surrender+0xbc> 4000665c: 94 10 20 00 clr %o2 the_thread->current_priority){ _Thread_Change_priority( 40006660: 40 00 03 94 call 400074b0 <_Thread_Change_priority> 40006664: b0 10 20 00 clr %i0 40006668: 81 c7 e0 08 ret 4000666c: 81 e8 00 00 restore case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 40006670: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40006674: 82 00 60 01 inc %g1 40006678: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 4000667c: 81 c7 e0 08 ret 40006680: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40006684: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40006688: 81 c7 e0 08 ret 4000668c: 91 e8 20 00 restore %g0, 0, %o0 400070c0 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 400070c0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 400070c4: 7f ff ec ee call 4000247c 400070c8: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 400070cc: c2 06 20 04 ld [ %i0 + 4 ], %g1 400070d0: 80 a0 60 00 cmp %g1, 0 400070d4: 02 80 00 0c be 40007104 <_CORE_spinlock_Release+0x44> 400070d8: 03 10 00 4f sethi %hi(0x40013c00), %g1 } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 400070dc: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 40013d50 <_Thread_Executing> 400070e0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 400070e4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 400070e8: 80 a0 c0 01 cmp %g3, %g1 400070ec: 02 80 00 0a be 40007114 <_CORE_spinlock_Release+0x54> 400070f0: 01 00 00 00 nop _ISR_Enable( level ); 400070f4: 7f ff ec e6 call 4000248c <== NOT EXECUTED 400070f8: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 400070fc: 81 c7 e0 08 ret <== NOT EXECUTED 40007100: 81 e8 00 00 restore <== NOT EXECUTED /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { _ISR_Enable( level ); 40007104: 7f ff ec e2 call 4000248c 40007108: b0 10 20 06 mov 6, %i0 4000710c: 81 c7 e0 08 ret 40007110: 81 e8 00 00 restore } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40007114: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007118: 82 00 7f ff add %g1, -1, %g1 4000711c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40007120: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40007124: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40007128: 7f ff ec d9 call 4000248c 4000712c: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40007130: 81 c7 e0 08 ret 40007134: 81 e8 00 00 restore 40007138 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 40007138: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 4000713c: 05 10 00 4f sethi %hi(0x40013c00), %g2 40007140: c2 00 a1 e4 ld [ %g2 + 0x1e4 ], %g1 ! 40013de4 <_Watchdog_Ticks_since_boot> 40007144: a2 10 a1 e4 or %g2, 0x1e4, %l1 _ISR_Disable( level ); 40007148: 7f ff ec cd call 4000247c 4000714c: a0 06 80 01 add %i2, %g1, %l0 40007150: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40007154: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007158: 80 a0 60 01 cmp %g1, 1 4000715c: 02 80 00 34 be 4000722c <_CORE_spinlock_Wait+0xf4> 40007160: 03 10 00 4f sethi %hi(0x40013c00), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40007164: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007168: 82 00 60 01 inc %g1 4000716c: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40007170: c4 06 20 04 ld [ %i0 + 4 ], %g2 40007174: 80 a0 a0 00 cmp %g2, 0 40007178: 02 80 00 1a be 400071e0 <_CORE_spinlock_Wait+0xa8> 4000717c: 80 8e 60 ff btst 0xff, %i1 40007180: 03 10 00 4f sethi %hi(0x40013c00), %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40007184: 02 80 00 22 be 4000720c <_CORE_spinlock_Wait+0xd4> 40007188: b2 10 60 90 or %g1, 0x90, %i1 ! 40013c90 <_Thread_Dispatch_disable_level> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 4000718c: 80 a6 a0 00 cmp %i2, 0 40007190: 02 80 00 06 be 400071a8 <_CORE_spinlock_Wait+0x70> 40007194: 01 00 00 00 nop 40007198: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4000719c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400071a0: 08 80 00 2d bleu 40007254 <_CORE_spinlock_Wait+0x11c> <== NOT EXECUTED 400071a4: 01 00 00 00 nop <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 400071a8: 7f ff ec b9 call 4000248c 400071ac: 90 10 00 04 mov %g4, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 400071b0: 40 00 04 d9 call 40008514 <_Thread_Enable_dispatch> 400071b4: 01 00 00 00 nop 400071b8: c2 06 40 00 ld [ %i1 ], %g1 400071bc: 82 00 60 01 inc %g1 400071c0: c2 26 40 00 st %g1, [ %i1 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 400071c4: 7f ff ec ae call 4000247c 400071c8: 01 00 00 00 nop 400071cc: 88 10 00 08 mov %o0, %g4 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 400071d0: c2 06 20 04 ld [ %i0 + 4 ], %g1 400071d4: 80 a0 60 00 cmp %g1, 0 400071d8: 12 bf ff ee bne 40007190 <_CORE_spinlock_Wait+0x58> 400071dc: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 400071e0: 03 10 00 4f sethi %hi(0x40013c00), %g1 400071e4: c6 00 61 50 ld [ %g1 + 0x150 ], %g3 ! 40013d50 <_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; 400071e8: 84 10 20 01 mov 1, %g2 400071ec: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 400071f0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 400071f4: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 400071f8: b0 10 20 00 clr %i0 400071fc: 7f ff ec a4 call 4000248c 40007200: 90 10 00 04 mov %g4, %o0 40007204: 81 c7 e0 08 ret 40007208: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 4000720c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40007210: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007214: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40007218: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 4000721c: 7f ff ec 9c call 4000248c <== NOT EXECUTED 40007220: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40007224: 81 c7 e0 08 ret <== NOT EXECUTED 40007228: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 4000722c: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 40007230: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40007234: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007238: 80 a0 c0 01 cmp %g3, %g1 4000723c: 12 bf ff ca bne 40007164 <_CORE_spinlock_Wait+0x2c> 40007240: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40007244: 7f ff ec 92 call 4000248c 40007248: b0 10 20 01 mov 1, %i0 ! 1 4000724c: 81 c7 e0 08 ret 40007250: 81 e8 00 00 restore /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 40007254: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40007258: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000725c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40007260: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40007264: 7f ff ec 8a call 4000248c <== NOT EXECUTED 40007268: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 4000726c: 81 c7 e0 08 ret <== NOT EXECUTED 40007270: 81 e8 00 00 restore <== NOT EXECUTED 400253cc <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 400253cc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 400253d0: 7f ff 7a 61 call 40003d54 <== NOT EXECUTED 400253d4: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400253d8: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400253dc: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 400253e0: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 400253e4: 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; 400253e8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 400253ec: 7f ff 7a 5e call 40003d64 <== NOT EXECUTED 400253f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400253f4: 01 00 00 00 nop 4000bc00 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000bc00: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000bc04: c4 00 60 04 ld [ %g1 + 4 ], %g2 ! 40019804 <_Debug_Level> <== NOT EXECUTED 4000bc08: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 4000bc0c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000bc10: 81 c3 e0 08 retl <== NOT EXECUTED 4000bc14: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40005260 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40005260: 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 ]; 40005264: f2 06 21 5c ld [ %i0 + 0x15c ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40005268: 7f ff f2 ae call 40001d20 4000526c: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40005270: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 40005274: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40005278: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4000527c: 9a 88 c0 04 andcc %g3, %g4, %o5 40005280: 02 80 00 28 be 40005320 <_Event_Surrender+0xc0> 40005284: 03 10 00 65 sethi %hi(0x40019400), %g1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 40005288: c4 00 63 dc ld [ %g1 + 0x3dc ], %g2 ! 400197dc <_ISR_Nest_level> 4000528c: 80 a0 a0 00 cmp %g2, 0 40005290: 22 80 00 08 be,a 400052b0 <_Event_Surrender+0x50> 40005294: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40005298: 03 10 00 66 sethi %hi(0x40019800), %g1 4000529c: c4 00 60 00 ld [ %g1 ], %g2 400052a0: 80 a6 00 02 cmp %i0, %g2 400052a4: 02 80 00 2a be 4000534c <_Event_Surrender+0xec> 400052a8: 19 10 00 68 sethi %hi(0x4001a000), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400052ac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400052b0: 80 88 61 00 btst 0x100, %g1 400052b4: 02 80 00 19 be 40005318 <_Event_Surrender+0xb8> 400052b8: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400052bc: 02 80 00 04 be 400052cc <_Event_Surrender+0x6c> 400052c0: 80 8c 60 02 btst 2, %l1 400052c4: 02 80 00 15 be 40005318 <_Event_Surrender+0xb8> 400052c8: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400052cc: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400052d0: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400052d4: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 400052d8: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400052dc: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400052e0: 7f ff f2 94 call 40001d30 400052e4: 90 10 00 10 mov %l0, %o0 400052e8: 7f ff f2 8e call 40001d20 400052ec: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400052f0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400052f4: 80 a0 60 02 cmp %g1, 2 400052f8: 02 80 00 0c be 40005328 <_Event_Surrender+0xc8> 400052fc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005300: 90 10 00 10 mov %l0, %o0 40005304: 7f ff f2 8b call 40001d30 40005308: 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 ); 4000530c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005310: 40 00 08 e5 call 400076a4 <_Thread_Clear_state> 40005314: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40005318: 7f ff f2 86 call 40001d30 <== NOT EXECUTED 4000531c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 40005320: 7f ff f2 84 call 40001d30 40005324: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40005328: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000532c: 7f ff f2 81 call 40001d30 40005330: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005334: 40 00 0e d6 call 40008e8c <_Watchdog_Remove> 40005338: 90 06 20 48 add %i0, 0x48, %o0 4000533c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40005340: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005344: 40 00 08 d8 call 400076a4 <_Thread_Clear_state> 40005348: 81 e8 00 00 restore /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4000534c: c2 03 20 60 ld [ %o4 + 0x60 ], %g1 40005350: 80 a0 60 01 cmp %g1, 1 40005354: 02 80 00 07 be 40005370 <_Event_Surrender+0x110> 40005358: 80 a0 c0 0d cmp %g3, %o5 4000535c: c2 03 20 60 ld [ %o4 + 0x60 ], %g1 40005360: 80 a0 60 02 cmp %g1, 2 40005364: 32 bf ff d3 bne,a 400052b0 <_Event_Surrender+0x50> 40005368: 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) ) { 4000536c: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 40005370: 02 80 00 04 be 40005380 <_Event_Surrender+0x120> 40005374: 80 8c 60 02 btst 2, %l1 40005378: 02 80 00 09 be 4000539c <_Event_Surrender+0x13c> <== NOT EXECUTED 4000537c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40005380: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005384: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40005388: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 4000538c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005390: 82 10 20 03 mov 3, %g1 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005394: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005398: c2 23 20 60 st %g1, [ %o4 + 0x60 ] } _ISR_Enable( level ); 4000539c: 7f ff f2 65 call 40001d30 400053a0: 91 e8 00 10 restore %g0, %l0, %o0 400053a4: 01 00 00 00 nop 400053a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400053a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400053ac: 90 10 00 18 mov %i0, %o0 400053b0: 40 00 09 c8 call 40007ad0 <_Thread_Get> 400053b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 400053b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400053bc: 80 a0 60 00 cmp %g1, 0 400053c0: 12 80 00 19 bne 40005424 <_Event_Timeout+0x7c> 400053c4: 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 ); 400053c8: 7f ff f2 56 call 40001d20 400053cc: 01 00 00 00 nop 400053d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 400053d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400053d8: 80 a0 60 00 cmp %g1, 0 400053dc: 02 80 00 14 be 4000542c <_Event_Timeout+0x84> 400053e0: 03 10 00 66 sethi %hi(0x40019800), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400053e4: c4 00 60 00 ld [ %g1 ], %g2 400053e8: 80 a6 00 02 cmp %i0, %g2 400053ec: 02 80 00 18 be 4000544c <_Event_Timeout+0xa4> 400053f0: c0 26 20 24 clr [ %i0 + 0x24 ] (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 400053f4: 82 10 20 06 mov 6, %g1 400053f8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400053fc: 7f ff f2 4d call 40001d30 40005400: 90 10 00 03 mov %g3, %o0 40005404: 90 10 00 18 mov %i0, %o0 40005408: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000540c: 40 00 08 a6 call 400076a4 <_Thread_Clear_state> 40005410: 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; 40005414: 05 10 00 65 sethi %hi(0x40019400), %g2 40005418: c2 00 a3 40 ld [ %g2 + 0x340 ], %g1 ! 40019740 <_Thread_Dispatch_disable_level> 4000541c: 82 00 7f ff add %g1, -1, %g1 40005420: c2 20 a3 40 st %g1, [ %g2 + 0x340 ] 40005424: 81 c7 e0 08 ret 40005428: 81 e8 00 00 restore 4000542c: 05 10 00 65 sethi %hi(0x40019400), %g2 <== NOT EXECUTED 40005430: c2 00 a3 40 ld [ %g2 + 0x340 ], %g1 ! 40019740 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40005434: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40005438: c2 20 a3 40 st %g1, [ %g2 + 0x340 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4000543c: 7f ff f2 3d call 40001d30 <== NOT EXECUTED 40005440: 01 00 00 00 nop <== NOT EXECUTED 40005444: 81 c7 e0 08 ret <== NOT EXECUTED 40005448: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4000544c: 05 10 00 68 sethi %hi(0x4001a000), %g2 40005450: c2 00 a0 60 ld [ %g2 + 0x60 ], %g1 ! 4001a060 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40005454: 80 a0 60 01 cmp %g1, 1 40005458: 38 bf ff e8 bgu,a 400053f8 <_Event_Timeout+0x50> 4000545c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40005460: 82 10 20 02 mov 2, %g1 40005464: c2 20 a0 60 st %g1, [ %g2 + 0x60 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 40005468: 10 bf ff e4 b 400053f8 <_Event_Timeout+0x50> 4000546c: 82 10 20 06 mov 6, %g1 400097a4 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 400097a4: 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; 400097a8: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 400097ac: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 400097b0: 90 10 00 19 mov %i1, %o0 400097b4: 92 10 00 16 mov %l6, %o1 400097b8: 40 00 01 82 call 40009dc0 <_Heap_Calc_block_size> 400097bc: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 400097c0: ae 92 20 00 orcc %o0, 0, %l7 400097c4: 02 80 00 69 be 40009968 <_Heap_Allocate_aligned+0x1c4> 400097c8: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 400097cc: 80 a6 a0 00 cmp %i2, 0 400097d0: 22 80 00 02 be,a 400097d8 <_Heap_Allocate_aligned+0x34> 400097d4: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 400097d8: e2 05 60 08 ld [ %l5 + 8 ], %l1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 400097dc: 80 a5 40 11 cmp %l5, %l1 400097e0: 02 80 00 62 be 40009968 <_Heap_Allocate_aligned+0x1c4> 400097e4: a8 10 20 00 clr %l4 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400097e8: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 400097ec: 92 10 00 1a mov %i2, %o1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400097f0: a4 08 7f fe and %g1, -2, %l2 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 400097f4: a6 04 40 12 add %l1, %l2, %l3 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 400097f8: 80 a5 c0 12 cmp %l7, %l2 return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; aligned_user_addr = block_end - end_to_user_offs; 400097fc: a0 24 c0 19 sub %l3, %i1, %l0 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 40009800: 18 80 00 22 bgu 40009888 <_Heap_Allocate_aligned+0xe4> 40009804: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 40009808: 40 00 41 11 call 40019c4c <.urem> 4000980c: 01 00 00 00 nop _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 40009810: 92 10 00 16 mov %l6, %o1 40009814: b0 24 00 08 sub %l0, %o0, %i0 40009818: 40 00 41 0d call 40019c4c <.urem> 4000981c: 90 10 00 18 mov %i0, %o0 40009820: a0 04 60 08 add %l1, 8, %l0 40009824: 84 26 00 08 sub %i0, %o0, %g2 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 40009828: 80 a4 00 02 cmp %l0, %g2 4000982c: 38 80 00 18 bgu,a 4000988c <_Heap_Allocate_aligned+0xe8> 40009830: 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) { 40009834: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 40009838: 82 20 80 10 sub %g2, %l0, %g1 4000983c: 80 a0 40 1d cmp %g1, %i5 40009840: 1a 80 00 1e bcc 400098b8 <_Heap_Allocate_aligned+0x114> 40009844: 80 a6 20 00 cmp %i0, 0 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 40009848: 82 26 00 10 sub %i0, %l0, %g1 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 4000984c: 90 10 00 10 mov %l0, %o0 40009850: 92 10 00 1a mov %i2, %o1 40009854: 80 a5 80 01 cmp %l6, %g1 40009858: 18 80 00 17 bgu 400098b4 <_Heap_Allocate_aligned+0x110> 4000985c: 84 10 00 10 mov %l0, %g2 40009860: 40 00 40 fb call 40019c4c <.urem> 40009864: 01 00 00 00 nop /* 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) { 40009868: 84 10 00 10 mov %l0, %g2 *value = r ? v - r + a : v; 4000986c: 88 92 20 00 orcc %o0, 0, %g4 40009870: 86 10 20 00 clr %g3 40009874: 12 80 00 35 bne 40009948 <_Heap_Allocate_aligned+0x1a4> 40009878: 90 10 00 10 mov %l0, %o0 4000987c: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 40009880: 38 80 00 0d bgu,a 400098b4 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 40009884: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 40009888: e2 04 60 08 ld [ %l1 + 8 ], %l1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 4000988c: 80 a5 40 11 cmp %l5, %l1 40009890: 12 bf ff d6 bne 400097e8 <_Heap_Allocate_aligned+0x44> 40009894: a8 05 20 01 inc %l4 40009898: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 4000989c: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 400098a0: 80 a0 40 14 cmp %g1, %l4 400098a4: 2a 80 00 02 bcs,a 400098ac <_Heap_Allocate_aligned+0x108> 400098a8: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 400098ac: 81 c7 e0 08 ret 400098b0: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 400098b4: 80 a6 20 00 cmp %i0, 0 400098b8: 22 bf ff f5 be,a 4000988c <_Heap_Allocate_aligned+0xe8> 400098bc: 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; 400098c0: 82 04 e0 08 add %l3, 8, %g1 400098c4: 88 20 40 02 sub %g1, %g2, %g4 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 400098c8: 84 24 80 04 sub %l2, %g4, %g2 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 400098cc: 80 a0 80 1d cmp %g2, %i5 400098d0: 2a 80 00 29 bcs,a 40009974 <_Heap_Allocate_aligned+0x1d0> 400098d4: 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; 400098d8: 82 10 a0 01 or %g2, 1, %g1 400098dc: 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); 400098e0: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 400098e4: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 400098e8: c8 24 60 04 st %g4, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400098ec: 84 04 40 04 add %l1, %g4, %g2 _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 400098f0: c2 00 a0 04 ld [ %g2 + 4 ], %g1 400098f4: 82 10 60 01 or %g1, 1, %g1 400098f8: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 400098fc: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 40009900: c2 05 60 34 ld [ %l5 + 0x34 ], %g1 stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 40009904: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 40009908: 80 a0 c0 01 cmp %g3, %g1 4000990c: 1a 80 00 03 bcc 40009918 <_Heap_Allocate_aligned+0x174> 40009910: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 40009914: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 40009918: c2 05 60 40 ld [ %l5 + 0x40 ], %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 4000991c: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 40009920: c4 05 60 48 ld [ %l5 + 0x48 ], %g2 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 40009924: 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; 40009928: 86 00 e0 01 inc %g3 stats->allocs += 1; 4000992c: 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; 40009930: 86 00 c0 14 add %g3, %l4, %g3 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 40009934: c2 25 60 40 st %g1, [ %l5 + 0x40 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 40009938: c4 25 60 48 st %g2, [ %l5 + 0x48 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 4000993c: c6 25 60 4c st %g3, [ %l5 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 40009940: 10 bf ff d7 b 4000989c <_Heap_Allocate_aligned+0xf8> 40009944: 90 10 00 18 mov %i0, %o0 ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; *value = r ? v - r + a : v; 40009948: 82 04 00 1a add %l0, %i2, %g1 4000994c: 90 20 40 04 sub %g1, %g4, %o0 40009950: 86 22 00 10 sub %o0, %l0, %g3 /* 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) { 40009954: 80 a5 80 03 cmp %l6, %g3 40009958: 28 bf ff cd bleu,a 4000988c <_Heap_Allocate_aligned+0xe8> 4000995c: e2 04 60 08 ld [ %l1 + 8 ], %l1 40009960: 10 bf ff d5 b 400098b4 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 40009964: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 40009968: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 4000996c: 81 c7 e0 08 ret <== NOT EXECUTED 40009970: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 40009974: 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; 40009978: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 4000997c: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 40009980: 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; 40009984: c6 20 a0 08 st %g3, [ %g2 + 8 ] 40009988: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 4000998c: 10 bf ff d8 b 400098ec <_Heap_Allocate_aligned+0x148> 40009990: 88 10 00 12 mov %l2, %g4 400309c4 <_Heap_Get_information>: Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 400309c4: d6 02 20 24 ld [ %o0 + 0x24 ], %o3 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 400309c8: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 400309cc: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 400309d0: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 400309d4: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 400309d8: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 400309dc: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 400309e0: 80 a0 40 0b cmp %g1, %o3 400309e4: 02 80 00 26 be 40030a7c <_Heap_Get_information+0xb8> 400309e8: c0 22 60 10 clr [ %o1 + 0x10 ] 400309ec: 10 80 00 0e b 40030a24 <_Heap_Get_information+0x60> 400309f0: d8 00 60 04 ld [ %g1 + 4 ], %o4 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 400309f4: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 400309f8: 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++; 400309fc: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 40030a00: 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++; 40030a04: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 40030a08: 80 a0 c0 04 cmp %g3, %g4 40030a0c: 1a 80 00 03 bcc 40030a18 <_Heap_Get_information+0x54> 40030a10: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 40030a14: c8 22 60 10 st %g4, [ %o1 + 0x10 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 40030a18: 80 a2 c0 0d cmp %o3, %o5 40030a1c: 02 80 00 18 be 40030a7c <_Heap_Get_information+0xb8> 40030a20: 82 10 00 0d mov %o5, %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40030a24: 88 0b 3f fe and %o4, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40030a28: 9a 00 40 04 add %g1, %g4, %o5 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40030a2c: d8 03 60 04 ld [ %o5 + 4 ], %o4 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 40030a30: 80 8b 20 01 btst 1, %o4 40030a34: 32 bf ff f0 bne,a 400309f4 <_Heap_Get_information+0x30> 40030a38: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 40030a3c: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 40030a40: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 40030a44: 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++; 40030a48: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 40030a4c: 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++; 40030a50: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 40030a54: 80 a0 c0 04 cmp %g3, %g4 40030a58: 1a 80 00 03 bcc 40030a64 <_Heap_Get_information+0xa0> 40030a5c: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 40030a60: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 40030a64: c2 03 40 00 ld [ %o5 ], %g1 40030a68: 80 a0 40 04 cmp %g1, %g4 40030a6c: 02 bf ff ec be 40030a1c <_Heap_Get_information+0x58> 40030a70: 80 a2 c0 0d cmp %o3, %o5 40030a74: 81 c3 e0 08 retl <== NOT EXECUTED 40030a78: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 40030a7c: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 40030a80: 90 10 20 00 clr %o0 40030a84: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 40030a88: 81 c3 e0 08 retl 40030a8c: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40017054 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40017054: 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; 40017058: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 4001705c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 40017060: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 40017064: 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); 40017068: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4001706c: 7f ff f6 34 call 4001493c <.urem> 40017070: 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 ); 40017074: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 40017078: 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); 4001707c: 82 06 7f f8 add %i1, -8, %g1 40017080: a2 20 40 08 sub %g1, %o0, %l1 _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 40017084: 80 a4 40 04 cmp %l1, %g4 40017088: 84 60 3f ff subx %g0, -1, %g2 4001708c: 80 a0 c0 11 cmp %g3, %l1 40017090: 82 60 3f ff subx %g0, -1, %g1 40017094: 80 88 80 01 btst %g2, %g1 40017098: 02 80 00 2f be 40017154 <_Heap_Resize_block+0x100> 4001709c: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400170a0: da 04 60 04 ld [ %l1 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400170a4: b0 0b 7f fe and %o5, -2, %i0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400170a8: a4 04 40 18 add %l1, %i0, %l2 old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 400170ac: 80 a4 80 04 cmp %l2, %g4 400170b0: 84 60 3f ff subx %g0, -1, %g2 400170b4: 80 a0 c0 12 cmp %g3, %l2 400170b8: 82 60 3f ff subx %g0, -1, %g1 400170bc: 80 88 80 01 btst %g2, %g1 400170c0: 02 80 00 25 be 40017154 <_Heap_Resize_block+0x100> 400170c4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 400170c8: c2 04 a0 04 ld [ %l2 + 4 ], %g1 400170cc: 80 88 60 01 btst 1, %g1 400170d0: 02 80 00 21 be 40017154 <_Heap_Resize_block+0x100> 400170d4: ae 08 7f fe and %g1, -2, %l7 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 400170d8: 80 a0 c0 12 cmp %g3, %l2 400170dc: a8 10 20 01 mov 1, %l4 400170e0: 02 80 00 04 be 400170f0 <_Heap_Resize_block+0x9c> 400170e4: 82 04 80 17 add %l2, %l7, %g1 400170e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 400170ec: a8 08 60 01 and %g1, 1, %l4 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 400170f0: 82 24 80 19 sub %l2, %i1, %g1 400170f4: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 400170f8: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 400170fc: 80 a0 40 1a cmp %g1, %i2 40017100: 1a 80 00 17 bcc 4001715c <_Heap_Resize_block+0x108> 40017104: 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 */ 40017108: 80 8d 20 ff btst 0xff, %l4 4001710c: 12 80 00 10 bne 4001714c <_Heap_Resize_block+0xf8> 40017110: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40017114: 92 10 00 15 mov %l5, %o1 40017118: 7f ff f6 09 call 4001493c <.urem> 4001711c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40017120: 80 a2 20 00 cmp %o0, 0 40017124: 02 80 00 05 be 40017138 <_Heap_Resize_block+0xe4> 40017128: 80 a4 00 16 cmp %l0, %l6 4001712c: 82 04 00 15 add %l0, %l5, %g1 40017130: a0 20 40 08 sub %g1, %o0, %l0 40017134: 80 a4 00 16 cmp %l0, %l6 40017138: 0a 80 00 2e bcs 400171f0 <_Heap_Resize_block+0x19c> 4001713c: 90 10 00 10 mov %l0, %o0 else { uint32_t add_block_size = size - old_user_size; _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 40017140: 80 a5 c0 08 cmp %l7, %o0 40017144: 1a 80 00 32 bcc 4001720c <_Heap_Resize_block+0x1b8> 40017148: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 4001714c: 81 c7 e0 08 ret 40017150: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 40017154: 81 c7 e0 08 ret 40017158: 91 e8 20 02 restore %g0, 2, %o0 --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4001715c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40017160: 92 10 00 15 mov %l5, %o1 40017164: 7f ff f5 f6 call 4001493c <.urem> 40017168: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4001716c: a0 a4 00 08 subcc %l0, %o0, %l0 40017170: 22 80 00 1c be,a 400171e0 <_Heap_Resize_block+0x18c> 40017174: 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; 40017178: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 4001717c: 80 a5 80 02 cmp %l6, %g2 40017180: 18 80 00 1e bgu 400171f8 <_Heap_Resize_block+0x1a4> 40017184: 82 25 80 02 sub %l6, %g2, %g1 _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 40017188: 80 8d 20 ff btst 0xff, %l4 4001718c: 12 80 00 2a bne 40017234 <_Heap_Resize_block+0x1e0> 40017190: 80 a5 80 10 cmp %l6, %l0 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 40017194: 82 10 80 1b or %g2, %i3, %g1 40017198: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4001719c: 86 04 40 02 add %l1, %g2, %g3 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 400171a0: d8 04 a0 0c ld [ %l2 + 0xc ], %o4 if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 400171a4: 88 04 00 17 add %l0, %l7, %g4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 400171a8: da 04 a0 08 ld [ %l2 + 8 ], %o5 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 400171ac: c8 24 80 17 st %g4, [ %l2 + %l7 ] _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 400171b0: 84 11 20 01 or %g4, 1, %g2 400171b4: c4 20 e0 04 st %g2, [ %g3 + 4 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 400171b8: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 400171bc: da 20 e0 08 st %o5, [ %g3 + 8 ] 400171c0: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 400171c4: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 400171c8: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 400171cc: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 400171d0: c6 23 60 0c st %g3, [ %o5 + 0xc ] 400171d4: c6 23 20 08 st %g3, [ %o4 + 8 ] 400171d8: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 400171dc: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 400171e0: 82 00 60 01 inc %g1 400171e4: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 400171e8: 81 c7 e0 08 ret 400171ec: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 400171f0: 10 bf ff d4 b 40017140 <_Heap_Resize_block+0xec> 400171f4: 90 10 00 16 mov %l6, %o0 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 400171f8: a0 a4 00 01 subcc %l0, %g1, %l0 400171fc: 12 bf ff e3 bne 40017188 <_Heap_Resize_block+0x134> 40017200: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 40017204: 10 bf ff f7 b 400171e0 <_Heap_Resize_block+0x18c> 40017208: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 4001720c: 92 10 00 12 mov %l2, %o1 40017210: 7f ff bd f7 call 400069ec <_Heap_Block_allocate> 40017214: 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; 40017218: 90 02 00 18 add %o0, %i0, %o0 4001721c: 90 12 00 1b or %o0, %i3, %o0 40017220: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 40017224: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40017228: 82 00 7f ff add %g1, -1, %g1 4001722c: 10 bf ff ec b 400171dc <_Heap_Resize_block+0x188> 40017230: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 40017234: 38 bf ff eb bgu,a 400171e0 <_Heap_Resize_block+0x18c> <== NOT EXECUTED 40017238: 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; 4001723c: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40017240: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 40017244: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 40017248: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 4001724c: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40017250: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40017254: 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 */ 40017258: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4001725c: 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 */ 40017260: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40017264: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 40017268: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4001726c: 7f ff d3 69 call 4000c010 <_Heap_Free> <== NOT EXECUTED 40017270: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 40017274: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 40017278: 10 bf ff d9 b 400171dc <_Heap_Resize_block+0x188> <== NOT EXECUTED 4001727c: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 4000f914 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4000f914: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f918: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 4000f91c: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000f920: 06 80 00 8c bl 4000fb50 <_Heap_Walk+0x23c> 4000f924: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4000f928: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000f92c: 80 88 60 01 btst 1, %g1 4000f930: 02 80 00 81 be 4000fb34 <_Heap_Walk+0x220> 4000f934: a6 10 20 00 clr %l3 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000f938: c4 04 40 00 ld [ %l1 ], %g2 4000f93c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000f940: 80 a0 80 01 cmp %g2, %g1 4000f944: 02 80 00 08 be 4000f964 <_Heap_Walk+0x50> 4000f948: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 4000f94c: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 4000f950: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f954: 90 12 23 68 or %o0, 0x368, %o0 <== NOT EXECUTED 4000f958: 7f ff d7 d6 call 400058b0 <== NOT EXECUTED 4000f95c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 4000f960: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 4000f964: 22 80 00 63 be,a 4000faf0 <_Heap_Walk+0x1dc> 4000f968: a2 10 00 16 mov %l6, %l1 <== NOT EXECUTED printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 4000f96c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f970: c8 04 60 04 ld [ %l1 + 4 ], %g4 4000f974: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000f978: a4 09 3f fe and %g4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000f97c: a0 04 40 12 add %l1, %l2, %l0 4000f980: 80 a4 00 01 cmp %l0, %g1 4000f984: 84 60 3f ff subx %g0, -1, %g2 4000f988: 80 a0 c0 10 cmp %g3, %l0 4000f98c: 82 60 3f ff subx %g0, -1, %g1 4000f990: 80 88 80 01 btst %g2, %g1 4000f994: 02 80 00 77 be 4000fb70 <_Heap_Walk+0x25c> 4000f998: 03 10 00 75 sethi %hi(0x4001d400), %g1 Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); printk("PASS: %d !the_block not in the free list", source); 4000f99c: 05 10 00 76 sethi %hi(0x4001d800), %g2 { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 4000f9a0: ba 10 63 98 or %g1, 0x398, %i5 printk("PASS: %d !the_block not in the free list", source); 4000f9a4: ae 10 a0 28 or %g2, 0x28, %l7 printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 4000f9a8: 03 10 00 75 sethi %hi(0x4001d400), %g1 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f9ac: 05 10 00 75 sethi %hi(0x4001d400), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000f9b0: a8 09 20 01 and %g4, 1, %l4 error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 4000f9b4: b8 10 63 f8 or %g1, 0x3f8, %i4 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f9b8: b6 10 a3 c8 or %g2, 0x3c8, %i3 4000f9bc: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 4000f9c0: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000f9c4: 80 88 60 01 btst 1, %g1 4000f9c8: 12 80 00 20 bne 4000fa48 <_Heap_Walk+0x134> 4000f9cc: 80 a4 e0 00 cmp %l3, 0 if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 4000f9d0: c2 04 00 00 ld [ %l0 ], %g1 4000f9d4: 80 a0 40 12 cmp %g1, %l2 4000f9d8: 02 80 00 07 be 4000f9f4 <_Heap_Walk+0xe0> 4000f9dc: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000f9e0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000f9e4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f9e8: 7f ff d7 b2 call 400058b0 <== NOT EXECUTED 4000f9ec: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 4000f9f0: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 4000f9f4: 32 80 00 0a bne,a 4000fa1c <_Heap_Walk+0x108> 4000f9f8: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 4000f9fc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 4000fa00: 12 80 00 49 bne 4000fb24 <_Heap_Walk+0x210> <== NOT EXECUTED 4000fa04: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000fa08: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000fa0c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fa10: 7f ff d7 a8 call 400058b0 <== NOT EXECUTED 4000fa14: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000fa18: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 4000fa1c: 80 a0 40 11 cmp %g1, %l1 4000fa20: 02 80 00 0a be 4000fa48 <_Heap_Walk+0x134> 4000fa24: 80 a4 e0 00 cmp %l3, 0 4000fa28: 80 a6 00 01 cmp %i0, %g1 4000fa2c: 02 80 00 58 be 4000fb8c <_Heap_Walk+0x278> 4000fa30: 80 a0 40 11 cmp %g1, %l1 block = block->next; 4000fa34: c2 00 60 08 ld [ %g1 + 8 ], %g1 error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 4000fa38: 80 a0 40 11 cmp %g1, %l1 4000fa3c: 12 bf ff fc bne 4000fa2c <_Heap_Walk+0x118> 4000fa40: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 4000fa44: 80 a4 e0 00 cmp %l3, 0 4000fa48: 32 80 00 58 bne,a 4000fba8 <_Heap_Walk+0x294> 4000fa4c: 27 10 00 75 sethi %hi(0x4001d400), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000fa50: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000fa54: 80 a0 40 12 cmp %g1, %l2 4000fa58: 18 80 00 40 bgu 4000fb58 <_Heap_Walk+0x244> 4000fa5c: 11 10 00 76 sethi %hi(0x4001d800), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 4000fa60: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4000fa64: 40 00 28 7a call 40019c4c <.urem> 4000fa68: 90 10 00 12 mov %l2, %o0 4000fa6c: 80 a2 20 00 cmp %o0, 0 4000fa70: 12 80 00 15 bne 4000fac4 <_Heap_Walk+0x1b0> 4000fa74: 80 a4 e0 00 cmp %l3, 0 printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 4000fa78: 12 80 00 17 bne 4000fad4 <_Heap_Walk+0x1c0> 4000fa7c: 80 a5 80 10 cmp %l6, %l0 if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 4000fa80: 02 80 00 1c be 4000faf0 <_Heap_Walk+0x1dc> 4000fa84: a2 10 00 16 mov %l6, %l1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000fa88: c8 04 20 04 ld [ %l0 + 4 ], %g4 printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 4000fa8c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 4000fa90: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 4000fa94: a4 09 3f fe and %g4, -2, %l2 4000fa98: a0 04 00 12 add %l0, %l2, %l0 4000fa9c: 80 a4 00 01 cmp %l0, %g1 4000faa0: 84 60 3f ff subx %g0, -1, %g2 4000faa4: 80 a0 c0 10 cmp %g3, %l0 4000faa8: 82 60 3f ff subx %g0, -1, %g1 4000faac: 80 88 80 01 btst %g2, %g1 4000fab0: 02 80 00 2f be 4000fb6c <_Heap_Walk+0x258> 4000fab4: a8 09 20 01 and %g4, 1, %l4 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000fab8: a2 10 00 15 mov %l5, %l1 4000fabc: 10 bf ff c1 b 4000f9c0 <_Heap_Walk+0xac> 4000fac0: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); 4000fac4: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000fac8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000facc: 7f ff d7 79 call 400058b0 <== NOT EXECUTED 4000fad0: 90 12 20 80 or %o0, 0x80, %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", 4000fad4: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 4000fad8: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000fadc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fae0: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 4000fae4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000fae8: 7f ff d7 72 call 400058b0 <== NOT EXECUTED 4000faec: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 4000faf0: d6 06 20 10 ld [ %i0 + 0x10 ], %o3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000faf4: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000faf8: 94 08 7f fe and %g1, -2, %o2 4000fafc: 80 a2 c0 0a cmp %o3, %o2 4000fb00: 02 80 00 07 be 4000fb1c <_Heap_Walk+0x208> 4000fb04: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 4000fb08: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fb0c: 11 10 00 76 sethi %hi(0x4001d800), %o0 <== NOT EXECUTED 4000fb10: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000fb14: 7f ff d7 67 call 400058b0 <== NOT EXECUTED 4000fb18: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 4000fb1c: 81 c7 e0 08 ret 4000fb20: 81 e8 00 00 restore if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); 4000fb24: 7f ff d7 63 call 400058b0 <== NOT EXECUTED 4000fb28: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000fb2c: 10 bf ff b8 b 4000fa0c <_Heap_Walk+0xf8> <== NOT EXECUTED 4000fb30: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 4000fb34: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 4000fb38: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fb3c: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED 4000fb40: 7f ff d7 5c call 400058b0 <== NOT EXECUTED 4000fb44: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000fb48: 10 bf ff 7d b 4000f93c <_Heap_Walk+0x28> <== NOT EXECUTED 4000fb4c: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 4000fb50: 10 bf ff 76 b 4000f928 <_Heap_Walk+0x14> <== NOT EXECUTED 4000fb54: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED } if (do_dump || error) printk("\n"); if (the_size < the_heap->min_block_size) { printk("PASS: %d !block size is too small\n", source); 4000fb58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fb5c: 7f ff d7 55 call 400058b0 <== NOT EXECUTED 4000fb60: 90 12 20 58 or %o0, 0x58, %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", 4000fb64: 10 bf ff dd b 4000fad8 <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000fb68: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000fb6c: a2 10 00 15 mov %l5, %l1 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 4000fb70: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4000fb74: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 4000fb78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000fb7c: 7f ff d7 4d call 400058b0 <== NOT EXECUTED 4000fb80: 90 12 23 a0 or %o0, 0x3a0, %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", 4000fb84: 10 bf ff d5 b 4000fad8 <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000fb88: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { 4000fb8c: 02 bf ff ae be 4000fa44 <_Heap_Walk+0x130> <== NOT EXECUTED 4000fb90: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 4000fb94: 12 80 00 0a bne 4000fbbc <_Heap_Walk+0x2a8> <== NOT EXECUTED 4000fb98: 27 10 00 75 sethi %hi(0x4001d400), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000fb9c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4000fba0: 7f ff d7 44 call 400058b0 <== NOT EXECUTED 4000fba4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000fba8: 90 14 e3 98 or %l3, 0x398, %o0 <== NOT EXECUTED 4000fbac: 7f ff d7 41 call 400058b0 <== NOT EXECUTED 4000fbb0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000fbb4: 10 bf ff a8 b 4000fa54 <_Heap_Walk+0x140> <== NOT EXECUTED 4000fbb8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 4000fbbc: 7f ff d7 3d call 400058b0 <== NOT EXECUTED 4000fbc0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000fbc4: 10 bf ff f7 b 4000fba0 <_Heap_Walk+0x28c> <== NOT EXECUTED 4000fbc8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40006b5c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006b5c: 9d e3 bf 98 save %sp, -104, %sp * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 40006b60: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006b64: a0 10 00 18 mov %i0, %l0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 40006b68: 80 a0 60 00 cmp %g1, 0 40006b6c: 02 80 00 1d be 40006be0 <_Objects_Allocate+0x84> 40006b70: b0 10 20 00 clr %i0 /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006b74: a2 04 20 20 add %l0, 0x20, %l1 40006b78: 40 00 14 47 call 4000bc94 <_Chain_Get> 40006b7c: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40006b80: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40006b84: 80 a0 60 00 cmp %g1, 0 40006b88: 02 80 00 16 be 40006be0 <_Objects_Allocate+0x84> 40006b8c: b0 10 00 08 mov %o0, %i0 /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 40006b90: 80 a2 20 00 cmp %o0, 0 40006b94: 02 80 00 15 be 40006be8 <_Objects_Allocate+0x8c> 40006b98: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40006b9c: c4 06 20 08 ld [ %i0 + 8 ], %g2 40006ba0: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006ba4: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40006ba8: 03 00 00 3f sethi %hi(0xfc00), %g1 40006bac: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006bb0: 84 08 80 01 and %g2, %g1, %g2 40006bb4: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006bb8: 40 00 36 b5 call 4001468c <.udiv> 40006bbc: 90 20 80 08 sub %g2, %o0, %o0 40006bc0: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 40006bc4: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40006bc8: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006bcc: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 40006bd0: 82 00 7f ff add %g1, -1, %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006bd4: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 40006bd8: c2 34 20 2c sth %g1, [ %l0 + 0x2c ] block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006bdc: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 40006be0: 81 c7 e0 08 ret 40006be4: 81 e8 00 00 restore * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 40006be8: 40 00 00 14 call 40006c38 <_Objects_Extend_information> 40006bec: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006bf0: 40 00 14 29 call 4000bc94 <_Chain_Get> 40006bf4: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40006bf8: b0 92 20 00 orcc %o0, 0, %i0 40006bfc: 32 bf ff e9 bne,a 40006ba0 <_Objects_Allocate+0x44> 40006c00: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 40006c04: 81 c7 e0 08 ret <== NOT EXECUTED 40006c08: 81 e8 00 00 restore <== NOT EXECUTED 40006c38 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40006c38: 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; 40006c3c: 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 ) 40006c40: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40006c44: 03 00 00 3f sethi %hi(0xfc00), %g1 40006c48: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006c4c: a8 08 80 01 and %g2, %g1, %l4 40006c50: 80 a5 40 14 cmp %l5, %l4 40006c54: 1a 80 00 79 bcc 40006e38 <_Objects_Extend_information+0x200> 40006c58: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40006c5c: a6 10 00 14 mov %l4, %l3 40006c60: a4 10 20 00 clr %l2 40006c64: a2 10 20 00 clr %l1 40006c68: ac 10 20 01 mov 1, %l6 40006c6c: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40006c70: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006c74: 80 a0 60 00 cmp %g1, 0 40006c78: 12 80 00 8d bne 40006eac <_Objects_Extend_information+0x274> 40006c7c: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40006c80: 90 02 00 14 add %o0, %l4, %o0 40006c84: 90 02 00 1d add %o0, %i5, %o0 40006c88: 40 00 08 f0 call 40009048 <_Workspace_Allocate_or_fatal_error> 40006c8c: 91 2a 20 02 sll %o0, 2, %o0 40006c90: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006c94: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40006c98: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006c9c: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40006ca0: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006ca4: 18 80 00 94 bgu 40006ef4 <_Objects_Extend_information+0x2bc> 40006ca8: a0 05 80 02 add %l6, %g2, %l0 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006cac: 80 a5 20 00 cmp %l4, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006cb0: 84 10 20 00 clr %g2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006cb4: 02 80 00 08 be 40006cd4 <_Objects_Extend_information+0x9c> 40006cb8: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 40006cbc: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006cc0: 84 00 a0 01 inc %g2 40006cc4: 80 a0 80 14 cmp %g2, %l4 40006cc8: 0a bf ff fd bcs 40006cbc <_Objects_Extend_information+0x84> 40006ccc: c0 24 00 01 clr [ %l0 + %g1 ] 40006cd0: ab 2c a0 02 sll %l2, 2, %l5 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006cd4: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006cd8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006cdc: 86 04 c0 01 add %l3, %g1, %g3 40006ce0: 80 a4 c0 03 cmp %l3, %g3 40006ce4: 1a 80 00 0a bcc 40006d0c <_Objects_Extend_information+0xd4> 40006ce8: c0 25 c0 15 clr [ %l7 + %l5 ] 40006cec: 83 2c e0 02 sll %l3, 2, %g1 40006cf0: 84 04 00 01 add %l0, %g1, %g2 40006cf4: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 40006cf8: c0 20 80 00 clr [ %g2 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 40006cfc: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006d00: 80 a0 40 03 cmp %g1, %g3 40006d04: 0a bf ff fd bcs 40006cf8 <_Objects_Extend_information+0xc0> 40006d08: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40006d0c: 7f ff ec 05 call 40001d20 40006d10: 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( 40006d14: c2 06 00 00 ld [ %i0 ], %g1 40006d18: c8 16 20 04 lduh [ %i0 + 4 ], %g4 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 40006d1c: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006d20: 89 29 20 1b sll %g4, 0x1b, %g4 40006d24: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40006d28: 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( 40006d2c: 87 30 e0 10 srl %g3, 0x10, %g3 40006d30: 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; 40006d34: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006d38: 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; 40006d3c: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40006d40: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40006d44: ee 26 20 34 st %l7, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40006d48: 82 10 40 04 or %g1, %g4, %g1 40006d4c: 82 10 40 03 or %g1, %g3, %g1 40006d50: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40006d54: 7f ff eb f7 call 40001d30 40006d58: 01 00 00 00 nop if ( old_tables ) 40006d5c: 80 a4 20 00 cmp %l0, 0 40006d60: 22 80 00 05 be,a 40006d74 <_Objects_Extend_information+0x13c> 40006d64: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 40006d68: 40 00 08 aa call 40009010 <_Workspace_Free> 40006d6c: 90 10 00 10 mov %l0, %o0 40006d70: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40006d74: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006d78: 80 a0 60 00 cmp %g1, 0 40006d7c: 02 80 00 55 be 40006ed0 <_Objects_Extend_information+0x298> 40006d80: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 40006d84: 90 10 00 10 mov %l0, %o0 40006d88: 40 00 36 07 call 400145a4 <.umul> 40006d8c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40006d90: 40 00 08 a7 call 4000902c <_Workspace_Allocate> 40006d94: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006d98: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40006d9c: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006da0: d2 00 40 14 ld [ %g1 + %l4 ], %o1 40006da4: 80 a2 60 00 cmp %o1, 0 40006da8: 02 80 00 64 be 40006f38 <_Objects_Extend_information+0x300> 40006dac: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006db0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40006db4: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006db8: a0 10 00 13 mov %l3, %l0 40006dbc: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006dc0: a6 07 bf ec add %fp, -20, %l3 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006dc4: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006dc8: 40 00 13 c6 call 4000bce0 <_Chain_Initialize> 40006dcc: 90 10 00 13 mov %l3, %o0 40006dd0: 30 80 00 0c b,a 40006e00 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006dd4: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40006dd8: 83 28 60 18 sll %g1, 0x18, %g1 40006ddc: 85 28 a0 1b sll %g2, 0x1b, %g2 40006de0: 82 10 40 12 or %g1, %l2, %g1 40006de4: 82 10 40 02 or %g1, %g2, %g1 40006de8: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006dec: 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( 40006df0: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40006df4: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006df8: 7f ff fd 2f call 400062b4 <_Chain_Append> 40006dfc: 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 ) { 40006e00: 40 00 13 a5 call 4000bc94 <_Chain_Get> 40006e04: 90 10 00 13 mov %l3, %o0 40006e08: 80 a2 20 00 cmp %o0, 0 40006e0c: 32 bf ff f2 bne,a 40006dd4 <_Objects_Extend_information+0x19c> 40006e10: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006e14: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40006e18: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 40006e1c: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006e20: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 40006e24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006e28: 82 00 40 04 add %g1, %g4, %g1 40006e2c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006e30: 81 c7 e0 08 ret 40006e34: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006e38: 90 10 00 15 mov %l5, %o0 40006e3c: 40 00 36 14 call 4001468c <.udiv> 40006e40: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40006e44: a4 92 20 00 orcc %o0, 0, %l2 40006e48: 02 80 00 3e be 40006f40 <_Objects_Extend_information+0x308> 40006e4c: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 40006e50: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 40006e54: c2 00 80 00 ld [ %g2 ], %g1 40006e58: 80 a0 60 00 cmp %g1, 0 40006e5c: 12 80 00 08 bne 40006e7c <_Objects_Extend_information+0x244> 40006e60: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006e64: 10 80 00 0c b 40006e94 <_Objects_Extend_information+0x25c> <== NOT EXECUTED 40006e68: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40006e6c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40006e70: 80 a0 60 00 cmp %g1, 0 40006e74: 02 80 00 08 be 40006e94 <_Objects_Extend_information+0x25c> 40006e78: 80 a4 c0 15 cmp %l3, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006e7c: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40006e80: a6 04 c0 10 add %l3, %l0, %l3 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006e84: 80 a4 80 11 cmp %l2, %l1 40006e88: 18 bf ff f9 bgu 40006e6c <_Objects_Extend_information+0x234> 40006e8c: 83 2c 60 02 sll %l1, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006e90: 80 a4 c0 15 cmp %l3, %l5 40006e94: 2a bf ff b9 bcs,a 40006d78 <_Objects_Extend_information+0x140> 40006e98: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006e9c: ac 04 a0 01 add %l2, 1, %l6 40006ea0: 83 2d a0 01 sll %l6, 1, %g1 40006ea4: 10 bf ff 73 b 40006c70 <_Objects_Extend_information+0x38> 40006ea8: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 40006eac: 90 02 00 14 add %o0, %l4, %o0 40006eb0: 90 02 00 1d add %o0, %i5, %o0 40006eb4: 40 00 08 5e call 4000902c <_Workspace_Allocate> 40006eb8: 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 ) 40006ebc: ae 92 20 00 orcc %o0, 0, %l7 40006ec0: 32 bf ff 76 bne,a 40006c98 <_Objects_Extend_information+0x60> 40006ec4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006ec8: 81 c7 e0 08 ret <== NOT EXECUTED 40006ecc: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 40006ed0: 90 10 00 10 mov %l0, %o0 40006ed4: 40 00 35 b4 call 400145a4 <.umul> 40006ed8: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40006edc: 40 00 08 5b call 40009048 <_Workspace_Allocate_or_fatal_error> 40006ee0: a9 2c 60 02 sll %l1, 2, %l4 40006ee4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006ee8: d0 24 00 14 st %o0, [ %l0 + %l4 ] 40006eec: 10 bf ff b1 b 40006db0 <_Objects_Extend_information+0x178> 40006ef0: d2 00 40 14 ld [ %g1 + %l4 ], %o1 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 40006ef4: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 40006ef8: ab 2c a0 02 sll %l2, 2, %l5 40006efc: 90 10 00 17 mov %l7, %o0 40006f00: 40 00 1c 05 call 4000df14 40006f04: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40006f08: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40006f0c: 94 10 00 15 mov %l5, %o2 40006f10: 40 00 1c 01 call 4000df14 40006f14: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006f18: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40006f1c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40006f20: 94 05 00 0a add %l4, %o2, %o2 40006f24: 90 10 00 10 mov %l0, %o0 40006f28: 40 00 1b fb call 4000df14 40006f2c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006f30: 10 bf ff 6a b 40006cd8 <_Objects_Extend_information+0xa0> 40006f34: c0 25 80 15 clr [ %l6 + %l5 ] 40006f38: 81 c7 e0 08 ret <== NOT EXECUTED 40006f3c: 81 e8 00 00 restore <== NOT EXECUTED if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006f40: 10 bf ff d4 b 40006e90 <_Objects_Extend_information+0x258> <== NOT EXECUTED 40006f44: a2 10 20 00 clr %l1 <== NOT EXECUTED 40006ff8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40006ff8: 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 ) 40006ffc: 82 06 3f ff add %i0, -1, %g1 40007000: 80 a0 60 03 cmp %g1, 3 40007004: 38 80 00 1e bgu,a 4000707c <_Objects_Get_information+0x84> 40007008: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 4000700c: 80 a6 60 00 cmp %i1, 0 40007010: 12 80 00 04 bne 40007020 <_Objects_Get_information+0x28> 40007014: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 40007018: 81 c7 e0 08 ret 4000701c: 91 e8 20 00 restore %g0, 0, %o0 return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40007020: 40 00 14 78 call 4000c200 <_Objects_API_maximum_class> 40007024: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40007028: 80 a2 20 00 cmp %o0, 0 4000702c: 06 bf ff fb bl 40007018 <_Objects_Get_information+0x20> 40007030: 80 a2 00 19 cmp %o0, %i1 40007034: 2a 80 00 12 bcs,a 4000707c <_Objects_Get_information+0x84> 40007038: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 4000703c: 85 2e 20 02 sll %i0, 2, %g2 40007040: 03 10 00 65 sethi %hi(0x40019400), %g1 40007044: 82 10 62 a0 or %g1, 0x2a0, %g1 ! 400196a0 <_Objects_Information_table> 40007048: c4 00 40 02 ld [ %g1 + %g2 ], %g2 4000704c: 80 a0 a0 00 cmp %g2, 0 40007050: 02 80 00 0b be 4000707c <_Objects_Get_information+0x84> 40007054: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40007058: 83 2e 60 02 sll %i1, 2, %g1 4000705c: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40007060: 80 a6 20 00 cmp %i0, 0 40007064: 02 80 00 06 be 4000707c <_Objects_Get_information+0x84> 40007068: 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 ) 4000706c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007070: 80 a0 60 00 cmp %g1, 0 40007074: 22 80 00 02 be,a 4000707c <_Objects_Get_information+0x84> 40007078: b0 10 20 00 clr %i0 return NULL; #endif return info; } 4000707c: 81 c7 e0 08 ret 40007080: 81 e8 00 00 restore 40018100 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 40018100: 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) 40018104: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40018108: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4001810c: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40018110: 22 80 00 02 be,a 40018118 <_Objects_Get_next+0x18> <== NOT EXECUTED 40018114: 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) 40018118: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001811c: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40018120: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40018124: 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); 40018128: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001812c: 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) 40018130: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40018134: 0a 80 00 0b bcs 40018160 <_Objects_Get_next+0x60> <== NOT EXECUTED 40018138: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 4001813c: 7f ff d5 74 call 4000d70c <_Objects_Get> <== NOT EXECUTED 40018140: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 40018144: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40018148: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001814c: 32 bf ff f6 bne,a 40018124 <_Objects_Get_next+0x24> <== NOT EXECUTED 40018150: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40018154: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40018158: 81 c7 e0 08 ret <== NOT EXECUTED 4001815c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 40018160: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40018164: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40018168: 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; 4001816c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40018170: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 40018174: 81 c7 e0 08 ret <== NOT EXECUTED 40018178: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400083fc <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 400083fc: 9d e3 bf 90 save %sp, -112, %sp 40008400: 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 ) 40008404: 80 a6 60 00 cmp %i1, 0 40008408: 02 80 00 24 be 40008498 <_Objects_Id_to_name+0x9c> 4000840c: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40008410: 80 a2 60 00 cmp %o1, 0 40008414: 02 80 00 26 be 400084ac <_Objects_Id_to_name+0xb0> 40008418: 03 10 00 77 sethi %hi(0x4001dc00), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000841c: 83 32 60 18 srl %o1, 0x18, %g1 40008420: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40008424: 84 00 7f ff add %g1, -1, %g2 40008428: 80 a0 a0 03 cmp %g2, 3 4000842c: 38 80 00 1b bgu,a 40008498 <_Objects_Id_to_name+0x9c> 40008430: 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 ] ) 40008434: 85 28 60 02 sll %g1, 2, %g2 40008438: 03 10 00 77 sethi %hi(0x4001dc00), %g1 4000843c: 82 10 60 b0 or %g1, 0xb0, %g1 ! 4001dcb0 <_Objects_Information_table> 40008440: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40008444: 80 a0 a0 00 cmp %g2, 0 40008448: 02 80 00 16 be 400084a0 <_Objects_Id_to_name+0xa4> 4000844c: 83 32 60 1b srl %o1, 0x1b, %g1 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 40008450: 83 28 60 02 sll %g1, 2, %g1 40008454: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 40008458: 80 a2 20 00 cmp %o0, 0 4000845c: 02 80 00 0f be 40008498 <_Objects_Id_to_name+0x9c> 40008460: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 40008464: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 40008468: 80 a0 60 00 cmp %g1, 0 4000846c: 12 80 00 0e bne 400084a4 <_Objects_Id_to_name+0xa8> 40008470: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 40008474: 7f ff ff c5 call 40008388 <_Objects_Get> 40008478: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 4000847c: 80 a2 20 00 cmp %o0, 0 40008480: 22 80 00 06 be,a 40008498 <_Objects_Id_to_name+0x9c> 40008484: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 40008488: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 4000848c: b0 10 20 00 clr %i0 40008490: 40 00 02 5b call 40008dfc <_Thread_Enable_dispatch> 40008494: c2 26 40 00 st %g1, [ %i1 ] 40008498: 81 c7 e0 08 ret 4000849c: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 400084a0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 400084a4: 81 c7 e0 08 ret <== NOT EXECUTED 400084a8: 81 e8 00 00 restore <== NOT EXECUTED Objects_Locations ignored_location; if ( !name ) return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 400084ac: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 400084b0: d2 00 a0 08 ld [ %g2 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400084b4: 83 32 60 18 srl %o1, 0x18, %g1 400084b8: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 400084bc: 84 00 7f ff add %g1, -1, %g2 400084c0: 80 a0 a0 03 cmp %g2, 3 400084c4: 38 bf ff f5 bgu,a 40008498 <_Objects_Id_to_name+0x9c> 400084c8: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 400084cc: 10 bf ff db b 40008438 <_Objects_Id_to_name+0x3c> 400084d0: 85 28 60 02 sll %g1, 2, %g2 40012820 <_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 ) { 40012820: 9d e3 bf 98 save %sp, -104, %sp 40012824: a8 10 00 18 mov %i0, %l4 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 40012828: 80 a6 a0 00 cmp %i2, 0 4001282c: 02 80 00 1d be 400128a0 <_Objects_Name_to_id_string+0x80> 40012830: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 40012834: 80 a6 60 00 cmp %i1, 0 40012838: 22 80 00 1a be,a 400128a0 <_Objects_Name_to_id_string+0x80> 4001283c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 40012840: e6 15 20 10 lduh [ %l4 + 0x10 ], %l3 40012844: 80 a4 e0 00 cmp %l3, 0 40012848: 22 80 00 16 be,a 400128a0 <_Objects_Name_to_id_string+0x80> 4001284c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40012850: e4 05 20 1c ld [ %l4 + 0x1c ], %l2 40012854: a0 10 20 01 mov 1, %l0 the_object = information->local_table[ index ]; 40012858: 83 2c 20 02 sll %l0, 2, %g1 4001285c: e2 04 80 01 ld [ %l2 + %g1 ], %l1 if ( !the_object ) 40012860: 80 a4 60 00 cmp %l1, 0 40012864: 02 80 00 0b be 40012890 <_Objects_Name_to_id_string+0x70> 40012868: a0 04 20 01 inc %l0 continue; if ( !the_object->name.name_p ) 4001286c: d2 04 60 0c ld [ %l1 + 0xc ], %o1 40012870: 80 a2 60 00 cmp %o1, 0 40012874: 02 80 00 07 be 40012890 <_Objects_Name_to_id_string+0x70> 40012878: 90 10 00 19 mov %i1, %o0 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 4001287c: 40 00 0c cf call 40015bb8 40012880: d4 15 20 3a lduh [ %l4 + 0x3a ], %o2 40012884: 80 a2 20 00 cmp %o0, 0 40012888: 22 80 00 08 be,a 400128a8 <_Objects_Name_to_id_string+0x88> 4001288c: c2 04 60 08 ld [ %l1 + 8 ], %g1 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40012890: 80 a4 00 13 cmp %l0, %l3 40012894: 08 bf ff f2 bleu 4001285c <_Objects_Name_to_id_string+0x3c> 40012898: 83 2c 20 02 sll %l0, 2, %g1 4001289c: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 400128a0: 81 c7 e0 08 ret 400128a4: 81 e8 00 00 restore if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 400128a8: c2 26 80 00 st %g1, [ %i2 ] 400128ac: 81 c7 e0 08 ret 400128b0: 91 e8 20 00 restore %g0, 0, %o0 4000727c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 4000727c: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 40007280: 80 a2 e0 00 cmp %o3, 0 40007284: 02 80 00 20 be 40007304 <_Objects_Name_to_id_u32+0x88> 40007288: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 4000728c: 80 a2 60 00 cmp %o1, 0 40007290: 22 80 00 1d be,a 40007304 <_Objects_Name_to_id_u32+0x88> 40007294: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40007298: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 4000729c: 85 28 60 10 sll %g1, 0x10, %g2 400072a0: 80 a0 a0 00 cmp %g2, 0 400072a4: 22 80 00 18 be,a 40007304 <_Objects_Name_to_id_u32+0x88> 400072a8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 400072ac: 80 a2 a0 00 cmp %o2, 0 400072b0: 12 80 00 17 bne 4000730c <_Objects_Name_to_id_u32+0x90> 400072b4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 400072b8: 89 30 a0 10 srl %g2, 0x10, %g4 400072bc: 80 a1 20 00 cmp %g4, 0 400072c0: 02 80 00 11 be 40007304 <_Objects_Name_to_id_u32+0x88> 400072c4: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400072c8: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 400072cc: 86 10 20 01 mov 1, %g3 if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 400072d0: 83 28 e0 02 sll %g3, 2, %g1 400072d4: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 400072d8: 80 a0 a0 00 cmp %g2, 0 400072dc: 02 80 00 06 be 400072f4 <_Objects_Name_to_id_u32+0x78> 400072e0: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 400072e4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 400072e8: 80 a0 40 09 cmp %g1, %o1 400072ec: 22 80 00 0f be,a 40007328 <_Objects_Name_to_id_u32+0xac> 400072f0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 400072f4: 80 a0 c0 04 cmp %g3, %g4 400072f8: 08 bf ff f7 bleu 400072d4 <_Objects_Name_to_id_u32+0x58> 400072fc: 83 28 e0 02 sll %g3, 2, %g1 40007300: 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 } 40007304: 81 c3 e0 08 retl 40007308: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 4000730c: 82 10 63 ff or %g1, 0x3ff, %g1 40007310: 80 a2 80 01 cmp %o2, %g1 40007314: 02 bf ff e9 be 400072b8 <_Objects_Name_to_id_u32+0x3c> 40007318: 80 a2 a0 01 cmp %o2, 1 4000731c: 02 bf ff e7 be 400072b8 <_Objects_Name_to_id_u32+0x3c> 40007320: 90 10 20 01 mov 1, %o0 40007324: 30 bf ff f8 b,a 40007304 <_Objects_Name_to_id_u32+0x88> the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 40007328: 90 10 20 00 clr %o0 4000732c: 81 c3 e0 08 retl 40007330: c2 22 c0 00 st %g1, [ %o3 ] 4000733c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 4000733c: 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; 40007340: 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; 40007344: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40007348: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 4000734c: 03 00 00 3f sethi %hi(0xfc00), %g1 40007350: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007354: 92 10 00 10 mov %l0, %o1 40007358: a4 08 80 01 and %g2, %g1, %l2 4000735c: 40 00 34 cc call 4001468c <.udiv> 40007360: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 40007364: 80 a2 20 00 cmp %o0, 0 40007368: 02 80 00 12 be 400073b0 <_Objects_Shrink_information+0x74> 4000736c: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40007370: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40007374: c2 00 c0 00 ld [ %g3 ], %g1 40007378: 80 a4 00 01 cmp %l0, %g1 4000737c: 12 80 00 09 bne 400073a0 <_Objects_Shrink_information+0x64> 40007380: a2 10 20 04 mov 4, %l1 40007384: 10 80 00 0d b 400073b8 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 40007388: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4000738c: a4 04 80 10 add %l2, %l0, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40007390: 80 a4 00 01 cmp %l0, %g1 40007394: 02 80 00 09 be 400073b8 <_Objects_Shrink_information+0x7c> 40007398: 82 04 60 04 add %l1, 4, %g1 4000739c: a2 10 00 01 mov %g1, %l1 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 400073a0: 84 00 a0 01 inc %g2 400073a4: 80 a2 00 02 cmp %o0, %g2 400073a8: 38 bf ff f9 bgu,a 4000738c <_Objects_Shrink_information+0x50> 400073ac: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 400073b0: 81 c7 e0 08 ret 400073b4: 81 e8 00 00 restore 400073b8: 03 00 00 3f sethi %hi(0xfc00), %g1 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 400073bc: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 400073c0: 10 80 00 0f b 400073fc <_Objects_Shrink_information+0xc0> 400073c4: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 400073c8: 82 04 80 01 add %l2, %g1, %g1 400073cc: 80 a0 40 03 cmp %g1, %g3 400073d0: 08 80 00 10 bleu 40007410 <_Objects_Shrink_information+0xd4> 400073d4: 90 10 00 02 mov %g2, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 400073d8: 40 00 12 25 call 4000bc6c <_Chain_Extract> 400073dc: e0 00 80 00 ld [ %g2 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 400073e0: 80 a4 20 00 cmp %l0, 0 400073e4: 22 80 00 10 be,a 40007424 <_Objects_Shrink_information+0xe8> 400073e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 400073ec: c2 04 00 00 ld [ %l0 ], %g1 400073f0: 80 a0 60 00 cmp %g1, 0 400073f4: 02 80 00 0b be 40007420 <_Objects_Shrink_information+0xe4> 400073f8: 84 10 00 10 mov %l0, %g2 400073fc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40007400: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40007404: 80 a0 c0 12 cmp %g3, %l2 40007408: 3a bf ff f0 bcc,a 400073c8 <_Objects_Shrink_information+0x8c> 4000740c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40007410: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40007414: 80 a4 20 00 cmp %l0, 0 40007418: 32 bf ff f6 bne,a 400073f0 <_Objects_Shrink_information+0xb4> 4000741c: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40007420: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40007424: 40 00 06 fb call 40009010 <_Workspace_Free> 40007428: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4000742c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40007430: 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; 40007434: c0 20 80 11 clr [ %g2 + %l1 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40007438: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4000743c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40007440: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007444: 82 20 40 02 sub %g1, %g2, %g1 40007448: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 4000744c: 81 c7 e0 08 ret 40007450: 81 e8 00 00 restore 40005f88 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40005f88: 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; 40005f8c: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 40005f90: 80 a6 20 00 cmp %i0, 0 40005f94: 02 80 00 1f be 40006010 <_POSIX_API_Initialize+0x88> 40005f98: 03 10 00 5f sethi %hi(0x40017c00), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 40005f9c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 40005fa0: 05 10 00 65 sethi %hi(0x40019400), %g2 40005fa4: 03 10 00 67 sethi %hi(0x40019c00), %g1 40005fa8: 82 10 60 14 or %g1, 0x14, %g1 ! 40019c14 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 40005fac: 40 00 14 82 call 4000b1b4 <_POSIX_signals_Manager_Initialization> 40005fb0: c2 20 a2 ac st %g1, [ %g2 + 0x2ac ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 40005fb4: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 40005fb8: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 40005fbc: 40 00 15 0a call 4000b3e4 <_POSIX_Threads_Manager_initialization> 40005fc0: 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( 40005fc4: 40 00 14 25 call 4000b058 <_POSIX_Condition_variables_Manager_initialization> 40005fc8: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 40005fcc: 40 00 14 30 call 4000b08c <_POSIX_Key_Manager_initialization> 40005fd0: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 40005fd4: 40 00 14 51 call 4000b118 <_POSIX_Mutex_Manager_initialization> 40005fd8: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 40005fdc: 40 00 14 39 call 4000b0c0 <_POSIX_Message_queue_Manager_initialization> 40005fe0: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 40005fe4: 40 00 15 c7 call 4000b700 <_POSIX_Semaphore_Manager_initialization> 40005fe8: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 40005fec: 40 00 15 b8 call 4000b6cc <_POSIX_Timer_Manager_initialization> 40005ff0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 40005ff4: 40 00 14 56 call 4000b14c <_POSIX_Barrier_Manager_initialization> 40005ff8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 40005ffc: 40 00 14 61 call 4000b180 <_POSIX_RWLock_Manager_initialization> 40006000: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40006004: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40006008: 40 00 14 e0 call 4000b388 <_POSIX_Spinlock_Manager_initialization> 4000600c: 81 e8 00 00 restore /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) 40006010: 10 bf ff e3 b 40005f9c <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 40006014: b0 10 60 58 or %g1, 0x58, %i0 <== NOT EXECUTED 400060fc <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 400060fc: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40006100: 80 a6 20 00 cmp %i0, 0 40006104: 02 80 00 12 be 4000614c <_POSIX_Condition_variables_Get+0x50> 40006108: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 4000610c: f2 06 00 00 ld [ %i0 ], %i1 40006110: 80 a6 7f ff cmp %i1, -1 40006114: 02 80 00 05 be 40006128 <_POSIX_Condition_variables_Get+0x2c> 40006118: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 4000611c: 31 10 00 5d sethi %hi(0x40017400), %i0 40006120: 40 00 0c 52 call 40009268 <_Objects_Get> 40006124: 91 ee 21 24 restore %i0, 0x124, %o0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40006128: 40 00 00 0d call 4000615c <== NOT EXECUTED 4000612c: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40006130: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006134: 12 80 00 07 bne 40006150 <_POSIX_Condition_variables_Get+0x54> <== NOT EXECUTED 40006138: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000613c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40006140: 31 10 00 5d sethi %hi(0x40017400), %i0 <== NOT EXECUTED 40006144: 40 00 0c 49 call 40009268 <_Objects_Get> <== NOT EXECUTED 40006148: 91 ee 21 24 restore %i0, 0x124, %o0 <== NOT EXECUTED * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); if ( status ) { *location = OBJECTS_ERROR; 4000614c: 82 10 20 01 mov 1, %g1 40006150: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 40006154: 81 c7 e0 08 ret 40006158: 91 e8 20 00 restore %g0, 0, %o0 40006314 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 40006314: 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 ) ) { 40006318: a0 07 bf f4 add %fp, -12, %l0 4000631c: 90 10 00 19 mov %i1, %o0 40006320: 40 00 00 7f call 4000651c <_POSIX_Mutex_Get> 40006324: 92 10 00 10 mov %l0, %o1 40006328: 80 a2 20 00 cmp %o0, 0 4000632c: 22 80 00 18 be,a 4000638c <_POSIX_Condition_variables_Wait_support+0x78> 40006330: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006334: 03 10 00 5c sethi %hi(0x40017000), %g1 40006338: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 40017090 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4000633c: 92 10 00 10 mov %l0, %o1 40006340: 84 00 bf ff add %g2, -1, %g2 40006344: 90 10 00 18 mov %i0, %o0 40006348: c4 20 60 90 st %g2, [ %g1 + 0x90 ] 4000634c: 7f ff ff 6c call 400060fc <_POSIX_Condition_variables_Get> 40006350: 01 00 00 00 nop switch ( location ) { 40006354: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006358: 80 a0 60 00 cmp %g1, 0 4000635c: 12 80 00 1a bne 400063c4 <_POSIX_Condition_variables_Wait_support+0xb0> 40006360: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40006364: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40006368: 80 a0 a0 00 cmp %g2, 0 4000636c: 02 80 00 0a be 40006394 <_POSIX_Condition_variables_Wait_support+0x80> 40006370: 01 00 00 00 nop 40006374: c2 06 40 00 ld [ %i1 ], %g1 40006378: 80 a0 80 01 cmp %g2, %g1 4000637c: 02 80 00 06 be 40006394 <_POSIX_Condition_variables_Wait_support+0x80> 40006380: 01 00 00 00 nop _Thread_Enable_dispatch(); 40006384: 40 00 0d f2 call 40009b4c <_Thread_Enable_dispatch> <== NOT EXECUTED 40006388: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 4000638c: 81 c7 e0 08 ret 40006390: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40006394: 40 00 00 ff call 40006790 40006398: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 4000639c: 80 8e e0 ff btst 0xff, %i3 400063a0: 22 80 00 0b be,a 400063cc <_POSIX_Condition_variables_Wait_support+0xb8> 400063a4: c2 06 40 00 ld [ %i1 ], %g1 status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 400063a8: 40 00 0d e9 call 40009b4c <_Thread_Enable_dispatch> 400063ac: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 400063b0: 40 00 00 d7 call 4000670c 400063b4: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 400063b8: 80 a2 20 00 cmp %o0, 0 400063bc: 02 80 00 1c be 4000642c <_POSIX_Condition_variables_Wait_support+0x118> 400063c0: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 400063c4: 81 c7 e0 08 ret 400063c8: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 400063cc: 21 10 00 5c sethi %hi(0x40017000), %l0 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 400063d0: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 400063d4: c4 04 21 50 ld [ %l0 + 0x150 ], %g2 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 400063d8: c8 06 00 00 ld [ %i0 ], %g4 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 400063dc: 86 04 60 18 add %l1, 0x18, %g3 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 400063e0: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 400063e4: 92 10 00 1a mov %i2, %o1 400063e8: 90 10 00 03 mov %g3, %o0 400063ec: 15 10 00 29 sethi %hi(0x4000a400), %o2 400063f0: 94 12 a1 20 or %o2, 0x120, %o2 ! 4000a520 <_Thread_queue_Timeout> 400063f4: c2 24 60 48 st %g1, [ %l1 + 0x48 ] the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 400063f8: c8 20 a0 20 st %g4, [ %g2 + 0x20 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 400063fc: c0 20 a0 34 clr [ %g2 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 40006400: 40 00 0f 12 call 4000a048 <_Thread_queue_Enqueue_with_handler> 40006404: c6 20 a0 44 st %g3, [ %g2 + 0x44 ] _Thread_Enable_dispatch(); 40006408: 40 00 0d d1 call 40009b4c <_Thread_Enable_dispatch> 4000640c: 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; 40006410: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 40006414: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 40006418: 80 a6 20 00 cmp %i0, 0 4000641c: 02 bf ff e5 be 400063b0 <_POSIX_Condition_variables_Wait_support+0x9c> 40006420: 80 a6 20 74 cmp %i0, 0x74 40006424: 02 bf ff e3 be 400063b0 <_POSIX_Condition_variables_Wait_support+0x9c> 40006428: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 4000642c: 81 c7 e0 08 ret 40006430: 81 e8 00 00 restore 4000cda8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000cda8: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000cdac: 03 10 00 66 sethi %hi(0x40019800), %g1 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4000cdb0: c6 06 20 08 ld [ %i0 + 8 ], %g3 4000cdb4: a4 10 63 94 or %g1, 0x394, %l2 4000cdb8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 4000cdbc: 85 30 e0 18 srl %g3, 0x18, %g2 4000cdc0: 89 28 60 10 sll %g1, 0x10, %g4 4000cdc4: 84 08 a0 07 and %g2, 7, %g2 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { value = the_key->Values[ thread_api ][ thread_index ]; 4000cdc8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000cdcc: 84 00 a0 06 add %g2, 6, %g2 4000cdd0: 82 10 63 ff or %g1, 0x3ff, %g1 4000cdd4: ab 28 a0 02 sll %g2, 2, %l5 4000cdd8: 86 08 c0 01 and %g3, %g1, %g3 4000cddc: a8 10 20 00 clr %l4 4000cde0: a7 28 e0 02 sll %g3, 2, %l3 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000cde4: 80 a1 20 00 cmp %g4, 0 4000cde8: 02 80 00 29 be 4000ce8c <_POSIX_Keys_Run_destructors+0xe4> 4000cdec: a0 10 20 01 mov 1, %l0 4000cdf0: a2 10 20 01 mov 1, %l1 the_key = (POSIX_Keys_Control *) 4000cdf4: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 4000cdf8: 83 2c 20 02 sll %l0, 2, %g1 4000cdfc: f0 00 80 01 ld [ %g2 + %g1 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000ce00: 80 a6 20 00 cmp %i0, 0 4000ce04: 02 80 00 16 be 4000ce5c <_POSIX_Keys_Run_destructors+0xb4> 4000ce08: a0 04 20 01 inc %l0 4000ce0c: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 4000ce10: 80 a0 60 00 cmp %g1, 0 4000ce14: 22 80 00 13 be,a 4000ce60 <_POSIX_Keys_Run_destructors+0xb8> 4000ce18: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED 4000ce1c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000ce20: 80 a0 e0 00 cmp %g3, 0 4000ce24: 22 80 00 0f be,a 4000ce60 <_POSIX_Keys_Run_destructors+0xb8> 4000ce28: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000ce2c: c2 06 00 15 ld [ %i0 + %l5 ], %g1 4000ce30: c4 00 40 13 ld [ %g1 + %l3 ], %g2 if ( value ) { 4000ce34: 90 90 a0 00 orcc %g2, 0, %o0 4000ce38: 22 80 00 0a be,a 4000ce60 <_POSIX_Keys_Run_destructors+0xb8> 4000ce3c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000ce40: 9f c0 c0 00 call %g3 4000ce44: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000ce48: c2 06 00 15 ld [ %i0 + %l5 ], %g1 4000ce4c: c4 00 40 13 ld [ %g1 + %l3 ], %g2 4000ce50: 80 a0 00 02 cmp %g0, %g2 4000ce54: 82 40 3f ff addx %g0, -1, %g1 4000ce58: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000ce5c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 4000ce60: 89 28 60 10 sll %g1, 0x10, %g4 4000ce64: 83 31 20 10 srl %g4, 0x10, %g1 4000ce68: 80 a0 40 10 cmp %g1, %l0 4000ce6c: 3a bf ff e3 bcc,a 4000cdf8 <_POSIX_Keys_Run_destructors+0x50> 4000ce70: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000ce74: 80 8c 60 ff btst 0xff, %l1 4000ce78: 12 80 00 05 bne 4000ce8c <_POSIX_Keys_Run_destructors+0xe4> 4000ce7c: a8 05 20 01 inc %l4 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4000ce80: 80 a5 20 04 cmp %l4, 4 4000ce84: 12 bf ff d9 bne 4000cde8 <_POSIX_Keys_Run_destructors+0x40> 4000ce88: 80 a1 20 00 cmp %g4, 0 4000ce8c: 81 c7 e0 08 ret 4000ce90: 81 e8 00 00 restore 40011330 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40011330: 9d e3 bf 98 save %sp, -104, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 40011334: 92 10 20 ff mov 0xff, %o1 40011338: 90 10 00 18 mov %i0, %o0 4001133c: 40 00 12 af call 40015df8 40011340: a8 10 00 18 mov %i0, %l4 if ( n > NAME_MAX ) 40011344: b0 10 20 5b mov 0x5b, %i0 40011348: 80 a2 20 ff cmp %o0, 0xff 4001134c: 18 80 00 37 bgu 40011428 <_POSIX_Message_queue_Create_support+0xf8> 40011350: a4 10 00 08 mov %o0, %l2 40011354: 05 10 00 8f sethi %hi(0x40023c00), %g2 40011358: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 40023f30 <_Thread_Dispatch_disable_level> 4001135c: 82 00 60 01 inc %g1 40011360: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] * 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 ) { 40011364: 80 a6 a0 00 cmp %i2, 0 40011368: 22 80 00 32 be,a 40011430 <_POSIX_Message_queue_Create_support+0x100> 4001136c: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40011370: e2 06 a0 04 ld [ %i2 + 4 ], %l1 40011374: 80 a4 60 00 cmp %l1, 0 40011378: 04 80 00 3d ble 4001146c <_POSIX_Message_queue_Create_support+0x13c> 4001137c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 40011380: f4 06 a0 08 ld [ %i2 + 8 ], %i2 40011384: 80 a6 a0 00 cmp %i2, 0 40011388: 04 80 00 39 ble 4001146c <_POSIX_Message_queue_Create_support+0x13c> 4001138c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 40011390: 27 10 00 90 sethi %hi(0x40024000), %l3 40011394: 7f ff ee 03 call 4000cba0 <_Objects_Allocate> 40011398: 90 14 e2 c0 or %l3, 0x2c0, %o0 ! 400242c0 <_POSIX_Message_queue_Information> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 4001139c: a0 92 20 00 orcc %o0, 0, %l0 400113a0: 02 80 00 3b be 4001148c <_POSIX_Message_queue_Create_support+0x15c> 400113a4: 84 10 20 01 mov 1, %g2 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 400113a8: 82 10 20 01 mov 1, %g1 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 400113ac: f2 24 20 10 st %i1, [ %l0 + 0x10 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 400113b0: 90 10 00 12 mov %l2, %o0 } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 400113b4: c4 2c 20 15 stb %g2, [ %l0 + 0x15 ] rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; 400113b8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 400113bc: 7f ff f7 7b call 4000f1a8 <_Workspace_Allocate> 400113c0: c2 2c 20 14 stb %g1, [ %l0 + 0x14 ] if (!name) { 400113c4: b2 92 20 00 orcc %o0, 0, %i1 400113c8: 22 80 00 39 be,a 400114ac <_POSIX_Message_queue_Create_support+0x17c> 400113cc: 90 14 e2 c0 or %l3, 0x2c0, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 400113d0: 40 00 10 1f call 4001544c 400113d4: 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( 400113d8: 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; 400113dc: c0 24 20 5c clr [ %l0 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 400113e0: 96 10 00 1a mov %i2, %o3 400113e4: 90 04 20 1c add %l0, 0x1c, %o0 400113e8: 40 00 03 80 call 400121e8 <_CORE_message_queue_Initialize> 400113ec: 92 04 20 5c add %l0, 0x5c, %o1 400113f0: 80 8a 20 ff btst 0xff, %o0 400113f4: 02 80 00 11 be 40011438 <_POSIX_Message_queue_Create_support+0x108> 400113f8: 82 14 e2 c0 or %l3, 0x2c0, %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400113fc: c4 04 20 08 ld [ %l0 + 8 ], %g2 40011400: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 40011404: 03 00 00 3f sethi %hi(0xfc00), %g1 40011408: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4001140c: 84 08 80 01 and %g2, %g1, %g2 40011410: 85 28 a0 02 sll %g2, 2, %g2 40011414: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 40011418: f2 24 20 0c st %i1, [ %l0 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 4001141c: e0 26 c0 00 st %l0, [ %i3 ] _Thread_Enable_dispatch(); 40011420: 7f ff f1 ad call 4000dad4 <_Thread_Enable_dispatch> 40011424: b0 10 20 00 clr %i0 return 0; } 40011428: 81 c7 e0 08 ret 4001142c: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40011430: 10 bf ff d8 b 40011390 <_POSIX_Message_queue_Create_support+0x60> 40011434: a2 10 20 0a mov 0xa, %l1 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 40011438: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001143c: 7f ff ee d4 call 4000cf8c <_Objects_Free> <== NOT EXECUTED 40011440: 90 14 e2 c0 or %l3, 0x2c0, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 40011444: 7f ff f7 52 call 4000f18c <_Workspace_Free> <== NOT EXECUTED 40011448: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 4001144c: 7f ff f1 a2 call 4000dad4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40011450: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 40011454: 40 00 0a ca call 40013f7c <__errno> <== NOT EXECUTED 40011458: 01 00 00 00 nop <== NOT EXECUTED 4001145c: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40011460: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40011464: 81 c7 e0 08 ret <== NOT EXECUTED 40011468: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 4001146c: 7f ff f1 9a call 4000dad4 <_Thread_Enable_dispatch> 40011470: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 40011474: 40 00 0a c2 call 40013f7c <__errno> 40011478: 01 00 00 00 nop 4001147c: 82 10 20 16 mov 0x16, %g1 ! 16 40011480: c2 22 00 00 st %g1, [ %o0 ] 40011484: 81 c7 e0 08 ret 40011488: 81 e8 00 00 restore attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 4001148c: 7f ff f1 92 call 4000dad4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40011490: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 40011494: 40 00 0a ba call 40013f7c <__errno> <== NOT EXECUTED 40011498: 01 00 00 00 nop <== NOT EXECUTED 4001149c: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED 400114a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400114a4: 81 c7 e0 08 ret <== NOT EXECUTED 400114a8: 81 e8 00 00 restore <== NOT EXECUTED 400114ac: 7f ff ee b8 call 4000cf8c <_Objects_Free> <== NOT EXECUTED 400114b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 400114b4: 7f ff f1 88 call 4000dad4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400114b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 400114bc: 40 00 0a b0 call 40013f7c <__errno> <== NOT EXECUTED 400114c0: 01 00 00 00 nop <== NOT EXECUTED 400114c4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400114c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400114cc: 81 c7 e0 08 ret <== NOT EXECUTED 400114d0: 81 e8 00 00 restore <== NOT EXECUTED 40009640 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 40009640: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 40009644: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 40009648: 80 a0 60 00 cmp %g1, 0 4000964c: 12 80 00 16 bne 400096a4 <_POSIX_Message_queue_Delete+0x64> 40009650: b2 10 00 18 mov %i0, %i1 40009654: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40009658: 80 a0 60 00 cmp %g1, 0 4000965c: 12 80 00 12 bne 400096a4 <_POSIX_Message_queue_Delete+0x64> 40009660: 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 ) 40009664: d0 06 20 0c ld [ %i0 + 0xc ], %o0 40009668: 80 a2 20 00 cmp %o0, 0 4000966c: 02 80 00 04 be 4000967c <_POSIX_Message_queue_Delete+0x3c> 40009670: 31 10 00 90 sethi %hi(0x40024000), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 40009674: 40 00 16 c6 call 4000f18c <_Workspace_Free> <== NOT EXECUTED 40009678: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 4000967c: 92 10 00 19 mov %i1, %o1 40009680: 40 00 0d 74 call 4000cc50 <_Objects_Close> 40009684: 90 16 22 c0 or %i0, 0x2c0, %o0 _CORE_message_queue_Close( 40009688: 90 06 60 1c add %i1, 0x1c, %o0 4000968c: 92 10 20 00 clr %o1 40009690: 94 10 20 05 mov 5, %o2 40009694: 40 00 0a 5c call 4000c004 <_CORE_message_queue_Close> 40009698: b0 16 22 c0 or %i0, 0x2c0, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4000969c: 40 00 0e 3c call 4000cf8c <_Objects_Free> 400096a0: 81 e8 00 00 restore 400096a4: 81 c7 e0 08 ret 400096a8: 81 e8 00 00 restore 40009b9c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 40009b9c: 9d e3 bf 88 save %sp, -120, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 40009ba0: 80 a6 e0 20 cmp %i3, 0x20 40009ba4: 18 80 00 47 bgu 40009cc0 <_POSIX_Message_queue_Send_support+0x124> 40009ba8: 11 10 00 91 sethi %hi(0x40024400), %o0 40009bac: 92 10 00 18 mov %i0, %o1 40009bb0: 90 12 20 3c or %o0, 0x3c, %o0 40009bb4: 40 00 0d 63 call 4000d140 <_Objects_Get> 40009bb8: 94 07 bf f4 add %fp, -12, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 40009bbc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009bc0: 80 a0 60 00 cmp %g1, 0 40009bc4: 12 80 00 31 bne 40009c88 <_POSIX_Message_queue_Send_support+0xec> 40009bc8: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 40009bcc: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40009bd0: 80 88 a0 03 btst 3, %g2 40009bd4: 02 80 00 41 be 40009cd8 <_POSIX_Message_queue_Send_support+0x13c> 40009bd8: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 40009bdc: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 40009be0: 12 80 00 15 bne 40009c34 <_POSIX_Message_queue_Send_support+0x98> 40009be4: 82 10 20 00 clr %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 40009be8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] <== NOT EXECUTED 40009bec: fa 23 a0 60 st %i5, [ %sp + 0x60 ] <== NOT EXECUTED 40009bf0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009bf4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40009bf8: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 40009bfc: 9a 20 00 1b neg %i3, %o5 <== NOT EXECUTED 40009c00: 98 10 20 00 clr %o4 <== NOT EXECUTED 40009c04: 40 00 09 65 call 4000c198 <_CORE_message_queue_Submit> <== NOT EXECUTED 40009c08: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 40009c0c: 40 00 0f b2 call 4000dad4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40009c10: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 40009c14: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 40009c18: 02 80 00 19 be 40009c7c <_POSIX_Message_queue_Send_support+0xe0> <== NOT EXECUTED 40009c1c: 03 10 00 8f sethi %hi(0x40023c00), %g1 <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 40009c20: 80 a7 60 00 cmp %i5, 0 40009c24: 12 80 00 1f bne 40009ca0 <_POSIX_Message_queue_Send_support+0x104> 40009c28: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 40009c2c: 81 c7 e0 08 ret 40009c30: 81 e8 00 00 restore the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 40009c34: 83 30 a0 0e srl %g2, 0xe, %g1 40009c38: 82 18 60 01 xor %g1, 1, %g1 40009c3c: 82 08 60 01 and %g1, 1, %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 40009c40: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 40009c44: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40009c48: 92 10 00 19 mov %i1, %o1 40009c4c: 94 10 00 1a mov %i2, %o2 40009c50: 96 10 00 18 mov %i0, %o3 40009c54: 9a 20 00 1b neg %i3, %o5 40009c58: 98 10 20 00 clr %o4 40009c5c: 40 00 09 4f call 4000c198 <_CORE_message_queue_Submit> 40009c60: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 40009c64: 40 00 0f 9c call 4000dad4 <_Thread_Enable_dispatch> 40009c68: ba 10 00 08 mov %o0, %i5 * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 40009c6c: 80 a7 60 07 cmp %i5, 7 40009c70: 12 bf ff ed bne 40009c24 <_POSIX_Message_queue_Send_support+0x88> 40009c74: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 40009c78: 03 10 00 8f sethi %hi(0x40023c00), %g1 40009c7c: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 40023ff0 <_Thread_Executing> 40009c80: 10 bf ff e8 b 40009c20 <_POSIX_Message_queue_Send_support+0x84> 40009c84: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 40009c88: 40 00 28 bd call 40013f7c <__errno> 40009c8c: b0 10 3f ff mov -1, %i0 40009c90: 82 10 20 09 mov 9, %g1 40009c94: c2 22 00 00 st %g1, [ %o0 ] } 40009c98: 81 c7 e0 08 ret 40009c9c: 81 e8 00 00 restore msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 40009ca0: 40 00 28 b7 call 40013f7c <__errno> 40009ca4: b0 10 3f ff mov -1, %i0 40009ca8: a0 10 00 08 mov %o0, %l0 40009cac: 40 00 00 5b call 40009e18 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 40009cb0: 90 10 00 1d mov %i5, %o0 40009cb4: d0 24 00 00 st %o0, [ %l0 ] 40009cb8: 81 c7 e0 08 ret 40009cbc: 81 e8 00 00 restore * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 40009cc0: 40 00 28 af call 40013f7c <__errno> 40009cc4: b0 10 3f ff mov -1, %i0 40009cc8: 82 10 20 16 mov 0x16, %g1 40009ccc: c2 22 00 00 st %g1, [ %o0 ] 40009cd0: 81 c7 e0 08 ret 40009cd4: 81 e8 00 00 restore the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 40009cd8: 40 00 0f 7f call 4000dad4 <_Thread_Enable_dispatch> 40009cdc: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 40009ce0: 40 00 28 a7 call 40013f7c <__errno> 40009ce4: 01 00 00 00 nop 40009ce8: 82 10 20 09 mov 9, %g1 ! 9 40009cec: c2 22 00 00 st %g1, [ %o0 ] 40009cf0: 81 c7 e0 08 ret 40009cf4: 81 e8 00 00 restore 40007218 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 40007218: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 4000721c: 80 a6 20 00 cmp %i0, 0 40007220: 02 80 00 12 be 40007268 <_POSIX_Mutex_Get+0x50> 40007224: b4 10 00 19 mov %i1, %i2 40007228: f2 06 00 00 ld [ %i0 ], %i1 4000722c: 80 a6 7f ff cmp %i1, -1 40007230: 02 80 00 05 be 40007244 <_POSIX_Mutex_Get+0x2c> 40007234: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 40007238: 31 10 00 65 sethi %hi(0x40019400), %i0 4000723c: 40 00 0c 3c call 4000a32c <_Objects_Get> 40007240: 91 ee 20 b0 restore %i0, 0xb0, %o0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007244: 40 00 00 20 call 400072c4 <== NOT EXECUTED 40007248: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000724c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007250: 12 80 00 07 bne 4000726c <_POSIX_Mutex_Get+0x54> <== NOT EXECUTED 40007254: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40007258: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 4000725c: 31 10 00 65 sethi %hi(0x40019400), %i0 <== NOT EXECUTED 40007260: 40 00 0c 33 call 4000a32c <_Objects_Get> <== NOT EXECUTED 40007264: 91 ee 20 b0 restore %i0, 0xb0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007268: 82 10 20 01 mov 1, %g1 4000726c: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 40007270: 81 c7 e0 08 ret 40007274: 91 e8 20 00 restore %g0, 0, %o0 400071b0 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 400071b0: 9d e3 bf 98 save %sp, -104, %sp 400071b4: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400071b8: 80 a6 20 00 cmp %i0, 0 400071bc: 02 80 00 13 be 40007208 <_POSIX_Mutex_Get_interrupt_disable+0x58> 400071c0: b6 10 00 1a mov %i2, %i3 400071c4: f2 06 00 00 ld [ %i0 ], %i1 400071c8: 80 a6 7f ff cmp %i1, -1 400071cc: 02 80 00 05 be 400071e0 <_POSIX_Mutex_Get_interrupt_disable+0x30> 400071d0: b4 10 00 10 mov %l0, %i2 return (POSIX_Mutex_Control *) 400071d4: 31 10 00 65 sethi %hi(0x40019400), %i0 400071d8: 40 00 0c 37 call 4000a2b4 <_Objects_Get_isr_disable> 400071dc: 91 ee 20 b0 restore %i0, 0xb0, %o0 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400071e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400071e4: 40 00 00 38 call 400072c4 <== NOT EXECUTED 400071e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400071ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400071f0: 12 80 00 06 bne 40007208 <_POSIX_Mutex_Get_interrupt_disable+0x58> <== NOT EXECUTED 400071f4: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED 400071f8: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 400071fc: 31 10 00 65 sethi %hi(0x40019400), %i0 <== NOT EXECUTED 40007200: 40 00 0c 2d call 4000a2b4 <_Objects_Get_isr_disable> <== NOT EXECUTED 40007204: 91 ee 20 b0 restore %i0, 0xb0, %o0 <== NOT EXECUTED ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007208: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000720c: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 40007210: 81 c7 e0 08 ret <== NOT EXECUTED 40007214: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ed64 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4000ed64: 9d e3 bf 98 save %sp, -104, %sp 4000ed68: 03 10 00 7f sethi %hi(0x4001fc00), %g1 4000ed6c: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 4001fed0 <_Thread_Dispatch_disable_level> 4000ed70: 84 00 a0 01 inc %g2 4000ed74: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 4000ed78: 80 a6 60 00 cmp %i1, 0 4000ed7c: 12 80 00 2e bne 4000ee34 <_POSIX_Semaphore_Create_support+0xd0> 4000ed80: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 4000ed84: 02 80 00 07 be 4000eda0 <_POSIX_Semaphore_Create_support+0x3c> 4000ed88: 21 10 00 80 sethi %hi(0x40020000), %l0 if( strlen(name) > PATH_MAX ) { 4000ed8c: 40 00 0f d6 call 40012ce4 4000ed90: 90 10 00 18 mov %i0, %o0 4000ed94: 80 a2 20 ff cmp %o0, 0xff 4000ed98: 18 80 00 2f bgu 4000ee54 <_POSIX_Semaphore_Create_support+0xf0> 4000ed9c: 21 10 00 80 sethi %hi(0x40020000), %l0 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4000eda0: 7f ff ec 21 call 40009e24 <_Objects_Allocate> 4000eda4: 90 14 21 e0 or %l0, 0x1e0, %o0 ! 400201e0 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4000eda8: b2 92 20 00 orcc %o0, 0, %i1 4000edac: 02 80 00 32 be 4000ee74 <_POSIX_Semaphore_Create_support+0x110> 4000edb0: 80 a6 20 00 cmp %i0, 0 rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { 4000edb4: 02 80 00 1c be 4000ee24 <_POSIX_Semaphore_Create_support+0xc0> 4000edb8: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000edbc: 84 10 20 01 mov 1, %g2 } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000edc0: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 4000edc4: c4 2e 60 15 stb %g2, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000edc8: c4 26 60 18 st %g2, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000edcc: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000edd0: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000edd4: 94 10 00 1a mov %i2, %o2 4000edd8: 90 06 60 1c add %i1, 0x1c, %o0 4000eddc: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000ede0: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000ede4: 7f ff ea e1 call 40009968 <_CORE_semaphore_Initialize> 4000ede8: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000edec: 82 14 21 e0 or %l0, 0x1e0, %g1 4000edf0: c4 06 60 08 ld [ %i1 + 8 ], %g2 4000edf4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 4000edf8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000edfc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000ee00: 84 08 80 01 and %g2, %g1, %g2 4000ee04: 85 28 a0 02 sll %g2, 2, %g2 4000ee08: 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; 4000ee0c: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4000ee10: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 4000ee14: 7f ff ef a5 call 4000aca8 <_Thread_Enable_dispatch> 4000ee18: b0 10 20 00 clr %i0 return 0; } 4000ee1c: 81 c7 e0 08 ret 4000ee20: 81 e8 00 00 restore if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 4000ee24: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 4000ee28: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 4000ee2c: 10 bf ff e9 b 4000edd0 <_POSIX_Semaphore_Create_support+0x6c> 4000ee30: c0 2e 60 15 clrb [ %i1 + 0x15 ] _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); 4000ee34: 7f ff ef 9d call 4000aca8 <_Thread_Enable_dispatch> 4000ee38: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSYS ); 4000ee3c: 40 00 08 e0 call 400111bc <__errno> 4000ee40: 01 00 00 00 nop 4000ee44: 82 10 20 58 mov 0x58, %g1 ! 58 4000ee48: c2 22 00 00 st %g1, [ %o0 ] 4000ee4c: 81 c7 e0 08 ret 4000ee50: 81 e8 00 00 restore } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); 4000ee54: 7f ff ef 95 call 4000aca8 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000ee58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000ee5c: 40 00 08 d8 call 400111bc <__errno> <== NOT EXECUTED 4000ee60: 01 00 00 00 nop <== NOT EXECUTED 4000ee64: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED 4000ee68: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ee6c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ee70: 81 e8 00 00 restore <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 4000ee74: 7f ff ef 8d call 4000aca8 <_Thread_Enable_dispatch> 4000ee78: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSPC ); 4000ee7c: 40 00 08 d0 call 400111bc <__errno> 4000ee80: 01 00 00 00 nop 4000ee84: 82 10 20 1c mov 0x1c, %g1 ! 1c 4000ee88: c2 22 00 00 st %g1, [ %o0 ] 4000ee8c: 81 c7 e0 08 ret 4000ee90: 81 e8 00 00 restore 4000b648 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000b648: 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 ]; 4000b64c: f0 06 61 60 ld [ %i1 + 0x160 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000b650: 40 00 04 37 call 4000c72c <_Timespec_To_ticks> 4000b654: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000b658: 80 a2 20 00 cmp %o0, 0 4000b65c: 22 80 00 02 be,a 4000b664 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000b660: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000b664: 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 || 4000b668: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000b66c: 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; 4000b670: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 4000b674: 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 || 4000b678: 80 a0 e0 00 cmp %g3, 0 4000b67c: 02 80 00 10 be 4000b6bc <_POSIX_Threads_Sporadic_budget_TSR+0x74> 4000b680: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000b684: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000b688: 80 a0 40 09 cmp %g1, %o1 4000b68c: 18 80 00 0d bgu 4000b6c0 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 4000b690: 90 10 00 19 mov %i1, %o0 the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000b694: 40 00 04 26 call 4000c72c <_Timespec_To_ticks> 4000b698: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000b69c: 80 a2 20 00 cmp %o0, 0 4000b6a0: 22 80 00 02 be,a 4000b6a8 <_POSIX_Threads_Sporadic_budget_TSR+0x60> 4000b6a4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000b6a8: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000b6ac: b2 06 20 9c add %i0, 0x9c, %i1 4000b6b0: 31 10 00 66 sethi %hi(0x40019800), %i0 4000b6b4: 7f ff f5 8b call 40008ce0 <_Watchdog_Insert> 4000b6b8: 91 ee 20 20 restore %i0, 0x20, %o0 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000b6bc: 90 10 00 19 mov %i1, %o0 4000b6c0: 7f ff ef 7c call 400074b0 <_Thread_Change_priority> 4000b6c4: 94 10 20 01 mov 1, %o2 4000b6c8: 30 bf ff f3 b,a 4000b694 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 4000b5f8 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000b5f8: c4 02 21 60 ld [ %o0 + 0x160 ], %g2 the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000b5fc: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000b600: c6 00 a0 84 ld [ %g2 + 0x84 ], %g3 * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4000b604: 82 10 3f ff mov -1, %g1 4000b608: 84 10 20 ff mov 0xff, %g2 4000b60c: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 4000b610: 92 20 80 03 sub %g2, %g3, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000b614: 80 a1 20 00 cmp %g4, 0 4000b618: 02 80 00 06 be 4000b630 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000b61c: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000b620: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000b624: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 4000b628: 08 80 00 06 bleu 4000b640 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000b62c: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000b630: 94 10 20 01 mov 1, %o2 ! 1 4000b634: 82 13 c0 00 mov %o7, %g1 4000b638: 7f ff ef 9e call 400074b0 <_Thread_Change_priority> 4000b63c: 9e 10 40 00 mov %g1, %o7 4000b640: 81 c3 e0 08 retl <== NOT EXECUTED 4000b644: 01 00 00 00 nop 4000cd38 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4000cd38: 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 ]; 4000cd3c: e2 06 21 60 ld [ %i0 + 0x160 ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4000cd40: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 4000cd44: c4 04 60 d8 ld [ %l1 + 0xd8 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000cd48: b0 04 60 dc add %l1, 0xdc, %i0 4000cd4c: 80 a0 80 18 cmp %g2, %i0 4000cd50: 02 80 00 14 be 4000cda0 <_POSIX_Threads_cancel_run+0x68> 4000cd54: c2 24 60 cc st %g1, [ %l1 + 0xcc ] _ISR_Disable( level ); 4000cd58: 7f ff d3 f2 call 40001d20 <== NOT EXECUTED 4000cd5c: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 4000cd60: e0 06 20 04 ld [ %i0 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000cd64: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 4000cd68: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000cd6c: 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; 4000cd70: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000cd74: 7f ff d3 ef call 40001d30 <== NOT EXECUTED 4000cd78: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 4000cd7c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000cd80: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000cd84: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 4000cd88: 7f ff f0 a2 call 40009010 <_Workspace_Free> <== NOT EXECUTED 4000cd8c: 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 ) ) { 4000cd90: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 4000cd94: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 4000cd98: 12 bf ff f0 bne 4000cd58 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED 4000cd9c: 01 00 00 00 nop <== NOT EXECUTED 4000cda0: 81 c7 e0 08 ret 4000cda4: 81 e8 00 00 restore 4000dd60 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000dd60: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000dd64: 7f ff f4 fd call 4000b158 <_Watchdog_Remove> 4000dd68: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000dd6c: 7f ff d3 54 call 40002abc 4000dd70: 01 00 00 00 nop 4000dd74: 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 ) { 4000dd78: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000dd7c: 80 a0 60 00 cmp %g1, 0 4000dd80: 12 80 00 0f bne 4000ddbc <_POSIX_Timer_Insert_helper+0x5c> 4000dd84: 92 10 00 18 mov %i0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000dd88: f6 26 20 1c st %i3, [ %i0 + 0x1c ] the_watchdog->id = id; 4000dd8c: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000dd90: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000dd94: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000dd98: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000dd9c: 11 10 00 79 sethi %hi(0x4001e400), %o0 4000dda0: 7f ff f4 83 call 4000afac <_Watchdog_Insert> 4000dda4: 90 12 22 00 or %o0, 0x200, %o0 ! 4001e600 <_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 ); 4000dda8: b0 10 20 01 mov 1, %i0 4000ddac: 7f ff d3 48 call 40002acc 4000ddb0: 90 10 00 10 mov %l0, %o0 return true; } 4000ddb4: 81 c7 e0 08 ret 4000ddb8: 81 e8 00 00 restore /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 4000ddbc: 7f ff d3 44 call 40002acc <== NOT EXECUTED 4000ddc0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ddc4: 81 c7 e0 08 ret <== NOT EXECUTED 4000ddc8: 81 e8 00 00 restore <== NOT EXECUTED 4000707c <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 4000707c: 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; 40007080: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40007084: 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; 40007088: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000708c: 80 a0 a0 00 cmp %g2, 0 40007090: 12 80 00 0e bne 400070c8 <_POSIX_Timer_TSR+0x4c> 40007094: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 40007098: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 4000709c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400070a0: 32 80 00 0b bne,a 400070cc <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 400070a4: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 400070a8: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 400070ac: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 400070b0: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 400070b4: 40 00 1a 4a call 4000d9dc 400070b8: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 400070bc: c0 26 60 68 clr [ %i1 + 0x68 ] 400070c0: 81 c7 e0 08 ret 400070c4: 81 e8 00 00 restore ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 400070c8: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 400070cc: d4 06 60 08 ld [ %i1 + 8 ], %o2 400070d0: 90 06 60 10 add %i1, 0x10, %o0 400070d4: 17 10 00 1c sethi %hi(0x40007000), %o3 400070d8: 98 10 00 19 mov %i1, %o4 400070dc: 40 00 1b 21 call 4000dd60 <_POSIX_Timer_Insert_helper> 400070e0: 96 12 e0 7c or %o3, 0x7c, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 400070e4: 80 8a 20 ff btst 0xff, %o0 400070e8: 02 bf ff f6 be 400070c0 <_POSIX_Timer_TSR+0x44> 400070ec: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 400070f0: 40 00 06 22 call 40008978 <_TOD_Get> 400070f4: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 400070f8: 82 10 20 03 mov 3, %g1 400070fc: 10 bf ff ed b 400070b0 <_POSIX_Timer_TSR+0x34> 40007100: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000cf3c <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4000cf3c: 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 ); 4000cf40: 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 ) 4000cf44: 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 ); 4000cf48: 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 ) 4000cf4c: b8 10 3f ff mov -1, %i4 4000cf50: 02 80 00 04 be 4000cf60 <_POSIX_signals_Clear_signals+0x24> 4000cf54: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000cf58: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000cf5c: 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 ); 4000cf60: 7f ff d3 70 call 40001d20 4000cf64: 01 00 00 00 nop 4000cf68: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000cf6c: 80 8e e0 ff btst 0xff, %i3 4000cf70: 22 80 00 33 be,a 4000d03c <_POSIX_signals_Clear_signals+0x100> 4000cf74: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000cf78: 05 10 00 67 sethi %hi(0x40019c00), %g2 4000cf7c: c2 00 a2 dc ld [ %g2 + 0x2dc ], %g1 ! 40019edc <_POSIX_signals_Pending> 4000cf80: 82 0c 00 01 and %l0, %g1, %g1 4000cf84: 80 88 40 1c btst %g1, %i4 4000cf88: 02 80 00 37 be 4000d064 <_POSIX_signals_Clear_signals+0x128> 4000cf8c: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000cf90: 87 2e 60 04 sll %i1, 4, %g3 4000cf94: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000cf98: 86 20 c0 02 sub %g3, %g2, %g3 4000cf9c: 82 10 61 10 or %g1, 0x110, %g1 4000cfa0: c4 00 40 03 ld [ %g1 + %g3 ], %g2 4000cfa4: 80 a0 a0 02 cmp %g2, 2 4000cfa8: 12 80 00 34 bne 4000d078 <_POSIX_signals_Clear_signals+0x13c> 4000cfac: 03 10 00 67 sethi %hi(0x40019c00), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 4000cfb0: 88 10 62 e0 or %g1, 0x2e0, %g4 ! 40019ee0 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000cfb4: c4 00 c0 04 ld [ %g3 + %g4 ], %g2 4000cfb8: 98 00 c0 04 add %g3, %g4, %o4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000cfbc: 9a 03 20 04 add %o4, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4000cfc0: 80 a0 80 0d cmp %g2, %o5 4000cfc4: 02 80 00 34 be 4000d094 <_POSIX_signals_Clear_signals+0x158> 4000cfc8: b8 10 20 00 clr %i4 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4000cfcc: c2 00 80 00 ld [ %g2 ], %g1 4000cfd0: b8 10 00 02 mov %g2, %i4 the_chain->first = new_first; 4000cfd4: c2 20 c0 04 st %g1, [ %g3 + %g4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000cfd8: 80 a3 40 01 cmp %o5, %g1 4000cfdc: 02 80 00 2e be 4000d094 <_POSIX_signals_Clear_signals+0x158> 4000cfe0: d8 20 60 04 st %o4, [ %g1 + 4 ] _POSIX_signals_Clear_process_signals( mask ); if ( psiginfo ) { 4000cfe4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4000cfe8: 02 80 00 1b be 4000d054 <_POSIX_signals_Clear_signals+0x118> 4000cfec: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000cff0: c2 07 20 08 ld [ %i4 + 8 ], %g1 the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node; 4000cff4: b0 10 20 01 mov 1, %i0 4000cff8: c2 26 80 00 st %g1, [ %i2 ] 4000cffc: c4 07 20 0c ld [ %i4 + 0xc ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d000: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000d004: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000d008: 82 10 62 94 or %g1, 0x294, %g1 4000d00c: c6 07 20 10 ld [ %i4 + 0x10 ], %g3 4000d010: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 4000d014: 82 00 7f fc add %g1, -4, %g1 4000d018: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000d01c: f8 20 60 08 st %i4, [ %g1 + 8 ] 4000d020: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d024: 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; 4000d028: f8 20 80 00 st %i4, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4000d02c: 7f ff d3 41 call 40001d30 4000d030: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000d034: 81 c7 e0 08 ret 4000d038: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000d03c: 82 0c 00 02 and %l0, %g2, %g1 4000d040: 80 88 40 1c btst %g1, %i4 4000d044: 02 80 00 08 be 4000d064 <_POSIX_signals_Clear_signals+0x128> 4000d048: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 4000d04c: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000d050: b0 10 20 01 mov 1, %i0 do_callout = true; } } _ISR_Enable( level ); 4000d054: 7f ff d3 37 call 40001d30 4000d058: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000d05c: 81 c7 e0 08 ret 4000d060: 81 e8 00 00 restore _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4000d064: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 4000d068: 7f ff d3 32 call 40001d30 4000d06c: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000d070: 81 c7 e0 08 ret 4000d074: 81 e8 00 00 restore &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 4000d078: 90 10 00 10 mov %l0, %o0 4000d07c: 40 00 01 9c call 4000d6ec <_POSIX_signals_Clear_process_signals> 4000d080: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4000d084: 7f ff d3 2b call 40001d30 4000d088: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000d08c: 81 c7 e0 08 ret 4000d090: 81 e8 00 00 restore if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) _POSIX_signals_Clear_process_signals( mask ); 4000d094: 40 00 01 96 call 4000d6ec <_POSIX_signals_Clear_process_signals> 4000d098: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000d09c: 10 bf ff d3 b 4000cfe8 <_POSIX_signals_Clear_signals+0xac> 4000d0a0: 80 a7 20 00 cmp %i4, 0 400062a0 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 400062a0: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400062a4: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 400062a8: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400062ac: 82 02 3f ff add %o0, -1, %g1 400062b0: 83 28 80 01 sll %g2, %g1, %g1 400062b4: 80 88 40 03 btst %g1, %g3 400062b8: 12 80 00 11 bne 400062fc <_POSIX_signals_Get_highest+0x5c> 400062bc: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 400062c0: 90 02 20 01 inc %o0 400062c4: 80 a2 20 20 cmp %o0, 0x20 400062c8: 12 bf ff fa bne 400062b0 <_POSIX_signals_Get_highest+0x10> 400062cc: 82 02 3f ff add %o0, -1, %g1 400062d0: 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 ) ) 400062d4: 10 80 00 05 b 400062e8 <_POSIX_signals_Get_highest+0x48> 400062d8: 84 10 20 01 mov 1, %g2 return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 400062dc: 80 a2 20 1b cmp %o0, 0x1b 400062e0: 02 80 00 09 be 40006304 <_POSIX_signals_Get_highest+0x64> 400062e4: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 400062e8: 82 02 3f ff add %o0, -1, %g1 400062ec: 83 28 80 01 sll %g2, %g1, %g1 400062f0: 80 88 40 03 btst %g1, %g3 400062f4: 22 bf ff fa be,a 400062dc <_POSIX_signals_Get_highest+0x3c> 400062f8: 90 02 20 01 inc %o0 return signo; } return 0; } 400062fc: 81 c3 e0 08 retl 40006300: 01 00 00 00 nop 40006304: 81 c3 e0 08 retl <== NOT EXECUTED 40006308: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4000b274 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000b274: 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 ]; 4000b278: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 4000b27c: 80 a4 20 00 cmp %l0, 0 4000b280: 02 80 00 3c be 4000b370 <_POSIX_signals_Post_switch_extension+0xfc> 4000b284: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000b288: a2 10 62 dc or %g1, 0x2dc, %l1 ! 40019edc <_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 ); 4000b28c: 7f ff da a5 call 40001d20 4000b290: 01 00 00 00 nop 4000b294: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000b298: c2 04 40 00 ld [ %l1 ], %g1 4000b29c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000b2a0: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000b2a4: 82 10 40 02 or %g1, %g2, %g1 4000b2a8: 80 a8 40 03 andncc %g1, %g3, %g0 4000b2ac: 02 80 00 2f be 4000b368 <_POSIX_signals_Post_switch_extension+0xf4> 4000b2b0: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 4000b2b4: 7f ff da 9f call 40001d30 4000b2b8: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 4000b2bc: 92 10 00 18 mov %i0, %o1 4000b2c0: 94 10 20 00 clr %o2 4000b2c4: 40 00 06 f4 call 4000ce94 <_POSIX_signals_Check_signal> 4000b2c8: 90 10 00 10 mov %l0, %o0 4000b2cc: 80 8a 20 ff btst 0xff, %o0 4000b2d0: 12 bf ff ef bne 4000b28c <_POSIX_signals_Post_switch_extension+0x18> 4000b2d4: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000b2d8: 90 10 00 10 mov %l0, %o0 4000b2dc: 94 10 20 01 mov 1, %o2 4000b2e0: 40 00 06 ed call 4000ce94 <_POSIX_signals_Check_signal> 4000b2e4: b0 06 20 01 inc %i0 4000b2e8: 80 8a 20 ff btst 0xff, %o0 4000b2ec: 12 bf ff e8 bne 4000b28c <_POSIX_signals_Post_switch_extension+0x18> 4000b2f0: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000b2f4: 12 bf ff f3 bne 4000b2c0 <_POSIX_signals_Post_switch_extension+0x4c> 4000b2f8: 92 10 00 18 mov %i0, %o1 4000b2fc: 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 ) ) 4000b300: 92 10 00 18 mov %i0, %o1 4000b304: 94 10 20 00 clr %o2 4000b308: 40 00 06 e3 call 4000ce94 <_POSIX_signals_Check_signal> 4000b30c: 90 10 00 10 mov %l0, %o0 4000b310: 80 8a 20 ff btst 0xff, %o0 4000b314: 12 bf ff de bne 4000b28c <_POSIX_signals_Post_switch_extension+0x18> 4000b318: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000b31c: 90 10 00 10 mov %l0, %o0 4000b320: 94 10 20 01 mov 1, %o2 4000b324: 40 00 06 dc call 4000ce94 <_POSIX_signals_Check_signal> 4000b328: b0 06 20 01 inc %i0 4000b32c: 80 8a 20 ff btst 0xff, %o0 4000b330: 12 bf ff d7 bne 4000b28c <_POSIX_signals_Post_switch_extension+0x18> 4000b334: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000b338: 12 bf ff f3 bne 4000b304 <_POSIX_signals_Post_switch_extension+0x90> 4000b33c: 92 10 00 18 mov %i0, %o1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); 4000b340: 7f ff da 78 call 40001d20 <== NOT EXECUTED 4000b344: 01 00 00 00 nop <== NOT EXECUTED 4000b348: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( !(~api->signals_blocked & 4000b34c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4000b350: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 <== NOT EXECUTED 4000b354: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 <== NOT EXECUTED 4000b358: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 4000b35c: 80 a8 40 03 andncc %g1, %g3, %g0 <== NOT EXECUTED 4000b360: 12 bf ff d5 bne 4000b2b4 <_POSIX_signals_Post_switch_extension+0x40> <== NOT EXECUTED 4000b364: 01 00 00 00 nop <== NOT EXECUTED (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000b368: 7f ff da 72 call 40001d30 4000b36c: 81 e8 00 00 restore 4000b370: 81 c7 e0 08 ret <== NOT EXECUTED 4000b374: 81 e8 00 00 restore <== NOT EXECUTED 40005490 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 40005490: 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 ); 40005494: 7f ff f3 ac call 40002344 40005498: 33 10 00 57 sethi %hi(0x40015c00), %i1 4000549c: 7f ff ff 07 call 400050b8 400054a0: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 400054a4: 40 00 10 53 call 400095f0 <_Watchdog_Remove> 400054a8: 90 16 63 3c or %i1, 0x33c, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400054ac: 31 10 00 58 sethi %hi(0x40016000), %i0 400054b0: b2 16 63 3c or %i1, 0x33c, %i1 400054b4: 40 00 0f e4 call 40009444 <_Watchdog_Insert> 400054b8: 91 ee 21 80 restore %i0, 0x180, %o0 400054bc: 01 00 00 00 nop <== NOT EXECUTED 400242c0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 400242c0: 9d e3 bf 98 save %sp, -104, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400242c4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 400242c8: 07 04 00 20 sethi %hi(0x10008000), %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 400242cc: 84 06 7f ff add %i1, -1, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400242d0: 82 09 00 03 and %g4, %g3, %g1 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 400242d4: 9a 10 20 01 mov 1, %o5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400242d8: 80 a0 40 03 cmp %g1, %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 400242dc: 85 2b 40 02 sll %o5, %g2, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400242e0: 02 80 00 25 be 40024374 <_POSIX_signals_Unblock_thread+0xb4> 400242e4: c6 06 21 60 ld [ %i0 + 0x160 ], %g3 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 400242e8: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 400242ec: 80 a8 80 01 andncc %g2, %g1, %g0 400242f0: 02 80 00 1f be 4002436c <_POSIX_signals_Unblock_thread+0xac> 400242f4: 03 04 00 00 sethi %hi(0x10000000), %g1 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 400242f8: 80 89 00 01 btst %g4, %g1 400242fc: 02 80 00 11 be 40024340 <_POSIX_signals_Unblock_thread+0x80> 40024300: da 2e 20 75 stb %o5, [ %i0 + 0x75 ] the_thread->Wait.return_code = EINTR; 40024304: 82 10 20 04 mov 4, %g1 #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 40024308: 80 89 20 08 btst 8, %g4 4002430c: 02 80 00 18 be 4002436c <_POSIX_signals_Unblock_thread+0xac> 40024310: c2 26 20 34 st %g1, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 40024314: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40024318: 80 a0 60 02 cmp %g1, 2 4002431c: 02 80 00 36 be 400243f4 <_POSIX_signals_Unblock_thread+0x134> 40024320: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40024324: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40024328: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4002432c: b0 10 20 00 clr %i0 40024330: 7f ff a6 79 call 4000dd14 <_Thread_Clear_state> 40024334: 92 12 63 f8 or %o1, 0x3f8, %o1 40024338: 81 c7 e0 08 ret 4002433c: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 40024340: 80 a1 20 00 cmp %g4, 0 40024344: 12 80 00 0a bne 4002436c <_POSIX_signals_Unblock_thread+0xac> 40024348: 03 10 00 aa sethi %hi(0x4002a800), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4002434c: c4 00 60 9c ld [ %g1 + 0x9c ], %g2 ! 4002a89c <_ISR_Nest_level> 40024350: 80 a0 a0 00 cmp %g2, 0 40024354: 02 80 00 06 be 4002436c <_POSIX_signals_Unblock_thread+0xac> 40024358: 03 10 00 aa sethi %hi(0x4002a800), %g1 4002435c: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 4002a8c0 <_Thread_Executing> 40024360: 80 a6 00 02 cmp %i0, %g2 40024364: 02 80 00 1c be 400243d4 <_POSIX_signals_Unblock_thread+0x114> 40024368: 03 10 00 aa sethi %hi(0x4002a800), %g1 _ISR_Signals_to_thread_executing = TRUE; } } return false; } 4002436c: 81 c7 e0 08 ret 40024370: 91 e8 20 00 restore %g0, 0, %o0 * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 40024374: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40024378: 80 88 80 01 btst %g2, %g1 4002437c: 22 80 00 12 be,a 400243c4 <_POSIX_signals_Unblock_thread+0x104> 40024380: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 the_thread->Wait.return_code = EINTR; 40024384: 82 10 20 04 mov 4, %g1 40024388: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4002438c: 80 a6 a0 00 cmp %i2, 0 40024390: 02 80 00 14 be 400243e0 <_POSIX_signals_Unblock_thread+0x120> 40024394: c6 06 20 28 ld [ %i0 + 0x28 ], %g3 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 40024398: c2 06 80 00 ld [ %i2 ], %g1 4002439c: c2 20 c0 00 st %g1, [ %g3 ] 400243a0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 400243a4: c4 20 e0 04 st %g2, [ %g3 + 4 ] 400243a8: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400243ac: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 400243b0: 90 10 00 18 mov %i0, %o0 400243b4: 7f ff a9 6c call 4000e964 <_Thread_queue_Extract_with_proxy> 400243b8: b0 10 20 01 mov 1, %i0 400243bc: 81 c7 e0 08 ret 400243c0: 81 e8 00 00 restore * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 400243c4: 80 a8 80 01 andncc %g2, %g1, %g0 400243c8: 12 bf ff f0 bne 40024388 <_POSIX_signals_Unblock_thread+0xc8> 400243cc: 82 10 20 04 mov 4, %g1 400243d0: 30 bf ff e7 b,a 4002436c <_POSIX_signals_Unblock_thread+0xac> (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; 400243d4: da 28 61 58 stb %o5, [ %g1 + 0x158 ] 400243d8: 81 c7 e0 08 ret 400243dc: 91 e8 20 00 restore %g0, 0, %o0 the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 400243e0: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 400243e4: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 400243e8: c0 20 e0 08 clr [ %g3 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 400243ec: 10 bf ff f1 b 400243b0 <_POSIX_signals_Unblock_thread+0xf0> 400243f0: c2 20 e0 04 st %g1, [ %g3 + 4 ] _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 400243f4: 7f ff ac 76 call 4000f5cc <_Watchdog_Remove> 400243f8: 90 06 20 48 add %i0, 0x48, %o0 400243fc: 10 bf ff cb b 40024328 <_POSIX_signals_Unblock_thread+0x68> 40024400: 90 10 00 18 mov %i0, %o0 40025bc4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 40025bc4: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 40025bc8: 80 a6 20 00 cmp %i0, 0 40025bcc: 02 80 00 10 be 40025c0c <_Protected_heap_Get_information+0x48> 40025bd0: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 40025bd4: 02 80 00 0e be 40025c0c <_Protected_heap_Get_information+0x48> 40025bd8: 23 10 01 80 sethi %hi(0x40060000), %l1 return false; _RTEMS_Lock_allocator(); 40025bdc: 7f ff 92 47 call 4000a4f8 <_API_Mutex_Lock> 40025be0: d0 04 61 a8 ld [ %l1 + 0x1a8 ], %o0 ! 400601a8 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 40025be4: 90 10 00 18 mov %i0, %o0 40025be8: 40 00 2b 77 call 400309c4 <_Heap_Get_information> 40025bec: 92 10 00 19 mov %i1, %o1 40025bf0: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 40025bf4: 7f ff 92 57 call 4000a550 <_API_Mutex_Unlock> 40025bf8: d0 04 61 a8 ld [ %l1 + 0x1a8 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 40025bfc: 80 a0 00 10 cmp %g0, %l0 40025c00: 82 60 3f ff subx %g0, -1, %g1 40025c04: 81 c7 e0 08 ret 40025c08: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 40025c0c: 81 c7 e0 08 ret <== NOT EXECUTED 40025c10: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40006db8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40006db8: 9d e3 bf 90 save %sp, -112, %sp 40006dbc: 11 10 00 79 sethi %hi(0x4001e400), %o0 40006dc0: 92 10 00 18 mov %i0, %o1 40006dc4: 90 12 22 7c or %o0, 0x27c, %o0 40006dc8: 40 00 08 19 call 40008e2c <_Objects_Get> 40006dcc: 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 ) { 40006dd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006dd4: 80 a0 60 00 cmp %g1, 0 40006dd8: 12 80 00 11 bne 40006e1c <_Rate_monotonic_Timeout+0x64> 40006ddc: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40006de0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006de4: 03 00 00 10 sethi %hi(0x4000), %g1 40006de8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40006dec: 80 88 80 01 btst %g2, %g1 40006df0: 32 80 00 0d bne,a 40006e24 <_Rate_monotonic_Timeout+0x6c> 40006df4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 40006df8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40006dfc: 80 a0 60 01 cmp %g1, 1 40006e00: 02 80 00 12 be 40006e48 <_Rate_monotonic_Timeout+0x90> 40006e04: 82 10 20 04 mov 4, %g1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40006e08: 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; 40006e0c: 05 10 00 79 sethi %hi(0x4001e400), %g2 40006e10: c2 00 a3 f0 ld [ %g2 + 0x3f0 ], %g1 ! 4001e7f0 <_Thread_Dispatch_disable_level> 40006e14: 82 00 7f ff add %g1, -1, %g1 40006e18: c2 20 a3 f0 st %g1, [ %g2 + 0x3f0 ] 40006e1c: 81 c7 e0 08 ret 40006e20: 81 e8 00 00 restore the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006e24: c2 06 20 08 ld [ %i0 + 8 ], %g1 40006e28: 80 a0 80 01 cmp %g2, %g1 40006e2c: 32 bf ff f4 bne,a 40006dfc <_Rate_monotonic_Timeout+0x44> 40006e30: 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 ); 40006e34: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006e38: 40 00 09 67 call 400093d4 <_Thread_Clear_state> 40006e3c: 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 ); 40006e40: 10 80 00 05 b 40006e54 <_Rate_monotonic_Timeout+0x9c> 40006e44: 90 10 00 18 mov %i0, %o0 _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006e48: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006e4c: 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; 40006e50: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006e54: 7f ff fe 2e call 4000670c <_Rate_monotonic_Initiate_statistics> 40006e58: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006e5c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006e60: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006e64: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006e68: 11 10 00 7a sethi %hi(0x4001e800), %o0 40006e6c: 40 00 0f ce call 4000ada4 <_Watchdog_Insert> 40006e70: 90 12 20 d0 or %o0, 0xd0, %o0 ! 4001e8d0 <_Watchdog_Ticks_chain> 40006e74: 30 bf ff e6 b,a 40006e0c <_Rate_monotonic_Timeout+0x54> 40007834 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 40007834: 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 ); 40007838: 35 10 00 66 sethi %hi(0x40019800), %i2 4000783c: 7f ff fc c8 call 40006b5c <_Objects_Allocate> 40007840: 90 16 a0 a0 or %i2, 0xa0, %o0 ! 400198a0 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007844: 37 10 00 65 sethi %hi(0x40019400), %i3 40007848: c2 06 e3 40 ld [ %i3 + 0x340 ], %g1 ! 40019740 <_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(); 4000784c: 39 10 00 66 sethi %hi(0x40019800), %i4 40007850: 82 00 60 01 inc %g1 40007854: d0 27 20 ec st %o0, [ %i4 + 0xec ] 40007858: c2 26 e3 40 st %g1, [ %i3 + 0x340 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 4000785c: 33 10 00 65 sethi %hi(0x40019400), %i1 40007860: c2 06 63 d8 ld [ %i1 + 0x3d8 ], %g1 ! 400197d8 <_Configuration_Table> 40007864: 05 10 00 62 sethi %hi(0x40018800), %g2 40007868: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 4000786c: d6 00 a1 f0 ld [ %g2 + 0x1f0 ], %o3 40007870: 03 10 00 5f sethi %hi(0x40017c00), %g1 40007874: 82 10 60 a0 or %g1, 0xa0, %g1 ! 40017ca0 <_Status_Object_name_errors_to_status+0x14> 40007878: c2 27 bf f4 st %g1, [ %fp + -12 ] 4000787c: 80 a2 c0 03 cmp %o3, %g3 40007880: 1a 80 00 03 bcc 4000788c <_Thread_Create_idle+0x58> 40007884: d2 07 20 ec ld [ %i4 + 0xec ], %o1 40007888: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 4000788c: 03 10 00 62 sethi %hi(0x40018800), %g1 40007890: da 08 61 f4 ldub [ %g1 + 0x1f4 ], %o5 ! 400189f4 40007894: 84 07 bf f4 add %fp, -12, %g2 40007898: 82 10 20 01 mov 1, %g1 4000789c: c0 23 a0 60 clr [ %sp + 0x60 ] 400078a0: c0 23 a0 64 clr [ %sp + 0x64 ] 400078a4: c0 23 a0 68 clr [ %sp + 0x68 ] 400078a8: 90 16 a0 a0 or %i2, 0xa0, %o0 400078ac: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400078b0: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 400078b4: 94 10 20 00 clr %o2 400078b8: 40 00 00 b2 call 40007b80 <_Thread_Initialize> 400078bc: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 400078c0: c4 06 63 d8 ld [ %i1 + 0x3d8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 400078c4: c2 06 e3 40 ld [ %i3 + 0x340 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 400078c8: c6 07 20 ec ld [ %i4 + 0xec ], %g3 400078cc: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 400078d0: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 400078d4: c2 26 e3 40 st %g1, [ %i3 + 0x340 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 400078d8: 05 10 00 66 sethi %hi(0x40019800), %g2 400078dc: 03 10 00 65 sethi %hi(0x40019400), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 400078e0: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 400078e4: c6 20 a0 00 st %g3, [ %g2 ] 400078e8: c6 20 63 cc st %g3, [ %g1 + 0x3cc ] _Thread_Executing = _Thread_Idle; _Thread_Start( 400078ec: b2 10 20 00 clr %i1 400078f0: b6 10 20 00 clr %i3 400078f4: 40 00 03 ab call 400087a0 <_Thread_Start> 400078f8: 99 e8 20 00 restore %g0, 0, %o4 400078fc: 01 00 00 00 nop 40007ad0 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40007ad0: 86 10 00 08 mov %o0, %g3 uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40007ad4: 80 a2 20 00 cmp %o0, 0 40007ad8: 02 80 00 1d be 40007b4c <_Thread_Get+0x7c> 40007adc: 94 10 00 09 mov %o1, %o2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007ae0: 83 32 20 18 srl %o0, 0x18, %g1 40007ae4: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40007ae8: 84 00 7f ff add %g1, -1, %g2 40007aec: 80 a0 a0 03 cmp %g2, 3 40007af0: 38 80 00 14 bgu,a 40007b40 <_Thread_Get+0x70> 40007af4: 82 10 20 01 mov 1, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007af8: 89 32 20 1b srl %o0, 0x1b, %g4 40007afc: 80 a1 20 01 cmp %g4, 1 40007b00: 12 80 00 0f bne 40007b3c <_Thread_Get+0x6c> 40007b04: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 40007b08: 03 10 00 65 sethi %hi(0x40019400), %g1 40007b0c: 82 10 62 a0 or %g1, 0x2a0, %g1 ! 400196a0 <_Objects_Information_table> 40007b10: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 40007b14: 80 a0 60 00 cmp %g1, 0 40007b18: 22 80 00 17 be,a 40007b74 <_Thread_Get+0xa4> 40007b1c: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 40007b20: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40007b24: 80 a2 20 00 cmp %o0, 0 40007b28: 02 80 00 11 be 40007b6c <_Thread_Get+0x9c> 40007b2c: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007b30: 82 13 c0 00 mov %o7, %g1 40007b34: 7f ff fd 72 call 400070fc <_Objects_Get> 40007b38: 9e 10 40 00 mov %g1, %o7 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 40007b3c: 82 10 20 01 mov 1, %g1 40007b40: 90 10 20 00 clr %o0 40007b44: 81 c3 e0 08 retl 40007b48: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007b4c: 03 10 00 65 sethi %hi(0x40019400), %g1 40007b50: c4 00 63 40 ld [ %g1 + 0x340 ], %g2 ! 40019740 <_Thread_Dispatch_disable_level> 40007b54: 84 00 a0 01 inc %g2 40007b58: c4 20 63 40 st %g2, [ %g1 + 0x340 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007b5c: 03 10 00 66 sethi %hi(0x40019800), %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; 40007b60: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40007b64: 81 c3 e0 08 retl 40007b68: d0 00 60 00 ld [ %g1 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 40007b6c: 81 c3 e0 08 retl <== NOT EXECUTED 40007b70: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 40007b74: 81 c3 e0 08 retl 40007b78: 90 10 20 00 clr %o0 4000d4d4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000d4d4: 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; 4000d4d8: 03 10 00 66 sethi %hi(0x40019800), %g1 4000d4dc: e2 00 60 00 ld [ %g1 ], %l1 /* * 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(); 4000d4e0: 3f 10 00 35 sethi %hi(0x4000d400), %i7 4000d4e4: be 17 e0 d4 or %i7, 0xd4, %i7 ! 4000d4d4 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000d4e8: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000d4ec: 7f ff d2 11 call 40001d30 4000d4f0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000d4f4: 05 10 00 65 sethi %hi(0x40019400), %g2 doneConstructors = 1; 4000d4f8: 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; 4000d4fc: e0 08 a1 3c ldub [ %g2 + 0x13c ], %l0 * 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 ); 4000d500: 90 10 00 11 mov %l1, %o0 4000d504: 7f ff ed 65 call 40008a98 <_User_extensions_Thread_begin> 4000d508: c2 28 a1 3c stb %g1, [ %g2 + 0x13c ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000d50c: 7f ff e9 63 call 40007a98 <_Thread_Enable_dispatch> 4000d510: a1 2c 20 18 sll %l0, 0x18, %l0 /* * _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) */ 4000d514: 80 a4 20 00 cmp %l0, 0 4000d518: 02 80 00 1e be 4000d590 <_Thread_Handler+0xbc> 4000d51c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000d520: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000d524: 80 a0 60 01 cmp %g1, 1 4000d528: 22 80 00 21 be,a 4000d5ac <_Thread_Handler+0xd8> 4000d52c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000d530: 80 a0 60 01 cmp %g1, 1 4000d534: 1a 80 00 0c bcc 4000d564 <_Thread_Handler+0x90> 4000d538: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000d53c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000d540: 9f c0 40 00 call %g1 4000d544: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 4000d548: d0 24 60 28 st %o0, [ %l1 + 0x28 ] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4000d54c: 7f ff ed 67 call 40008ae8 <_User_extensions_Thread_exitted> 4000d550: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000d554: 90 10 20 00 clr %o0 4000d558: 92 10 20 01 mov 1, %o1 4000d55c: 7f ff e5 50 call 40006a9c <_Internal_error_Occurred> 4000d560: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000d564: 22 80 00 16 be,a 4000d5bc <_Thread_Handler+0xe8> <== NOT EXECUTED 4000d568: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000d56c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000d570: 12 bf ff f7 bne 4000d54c <_Thread_Handler+0x78> <== NOT EXECUTED 4000d574: 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 = 4000d578: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000d57c: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000d580: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d584: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000d588: 10 bf ff f1 b 4000d54c <_Thread_Handler+0x78> <== NOT EXECUTED 4000d58c: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { _init (); 4000d590: 40 00 2c e0 call 40018910 <_init> 4000d594: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000d598: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000d59c: 80 a0 60 01 cmp %g1, 1 4000d5a0: 12 bf ff e5 bne 4000d534 <_Thread_Handler+0x60> 4000d5a4: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000d5a8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000d5ac: 9f c0 40 00 call %g1 4000d5b0: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 4000d5b4: 10 bf ff e6 b 4000d54c <_Thread_Handler+0x78> 4000d5b8: d0 24 60 28 st %o0, [ %l1 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000d5bc: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000d5c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d5c4: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED 4000d5c8: 10 bf ff e1 b 4000d54c <_Thread_Handler+0x78> <== NOT EXECUTED 4000d5cc: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED 40007b80 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40007b80: 9d e3 bf 98 save %sp, -104, %sp 40007b84: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007b88: 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 ) { 40007b8c: e6 00 40 00 ld [ %g1 ], %l3 40007b90: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40007b94: 02 80 00 51 be 40007cd8 <_Thread_Initialize+0x158> 40007b98: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 40007b9c: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40007ba0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007ba4: 21 10 00 65 sethi %hi(0x40019400), %l0 40007ba8: c2 04 23 e0 ld [ %l0 + 0x3e0 ], %g1 ! 400197e0 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40007bac: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40007bb0: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007bb4: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40007bb8: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40007bbc: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40007bc0: c0 26 60 6c clr [ %i1 + 0x6c ] 40007bc4: 80 a0 60 00 cmp %g1, 0 40007bc8: 12 80 00 32 bne 40007c90 <_Thread_Initialize+0x110> 40007bcc: c0 26 61 58 clr [ %i1 + 0x158 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 40007bd0: c0 26 61 68 clr [ %i1 + 0x168 ] 40007bd4: b6 10 20 00 clr %i3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007bd8: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40007bdc: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007be0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 40007be4: 80 a4 a0 02 cmp %l2, 2 40007be8: 12 80 00 05 bne 40007bfc <_Thread_Initialize+0x7c> 40007bec: 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; 40007bf0: 03 10 00 65 sethi %hi(0x40019400), %g1 <== NOT EXECUTED 40007bf4: c4 00 62 98 ld [ %g1 + 0x298 ], %g2 ! 40019698 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40007bf8: c4 26 60 78 st %g2, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40007bfc: 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 ); 40007c00: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40007c04: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40007c08: 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 ); 40007c0c: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40007c10: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 40007c14: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40007c18: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40007c1c: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40007c20: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40007c24: 40 00 02 02 call 4000842c <_Thread_Set_priority> 40007c28: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007c2c: c4 06 60 08 ld [ %i1 + 8 ], %g2 40007c30: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40007c34: 03 00 00 3f sethi %hi(0xfc00), %g1 40007c38: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007c3c: 84 08 80 01 and %g2, %g1, %g2 40007c40: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40007c44: e6 26 60 0c st %l3, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 40007c48: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40007c4c: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007c50: 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 ); 40007c54: 90 10 00 19 mov %i1, %o0 40007c58: 40 00 03 cc call 40008b88 <_User_extensions_Thread_create> 40007c5c: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 40007c60: 80 8a 20 ff btst 0xff, %o0 40007c64: 12 80 00 09 bne 40007c88 <_Thread_Initialize+0x108> 40007c68: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40007c6c: 02 80 00 05 be 40007c80 <_Thread_Initialize+0x100> <== NOT EXECUTED 40007c70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 40007c74: 40 00 04 e7 call 40009010 <_Workspace_Free> <== NOT EXECUTED 40007c78: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40007c7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007c80: 40 00 02 a7 call 4000871c <_Thread_Stack_Free> <== NOT EXECUTED 40007c84: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40007c88: 81 c7 e0 08 ret 40007c8c: 81 e8 00 00 restore /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 40007c90: 90 00 60 01 add %g1, 1, %o0 40007c94: 40 00 04 e6 call 4000902c <_Workspace_Allocate> 40007c98: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40007c9c: b6 92 20 00 orcc %o0, 0, %i3 40007ca0: 02 80 00 19 be 40007d04 <_Thread_Initialize+0x184> 40007ca4: c2 04 23 e0 ld [ %l0 + 0x3e0 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007ca8: 88 80 60 01 addcc %g1, 1, %g4 40007cac: 02 bf ff cb be 40007bd8 <_Thread_Initialize+0x58> 40007cb0: f6 26 61 68 st %i3, [ %i1 + 0x168 ] 40007cb4: 84 10 20 00 clr %g2 40007cb8: 86 10 00 1b mov %i3, %g3 the_thread->extensions[i] = NULL; 40007cbc: 83 28 a0 02 sll %g2, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007cc0: 84 00 a0 01 inc %g2 40007cc4: 80 a0 80 04 cmp %g2, %g4 40007cc8: 0a bf ff fd bcs 40007cbc <_Thread_Initialize+0x13c> 40007ccc: c0 20 c0 01 clr [ %g3 + %g1 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40007cd0: 10 bf ff c3 b 40007bdc <_Thread_Initialize+0x5c> 40007cd4: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40007cd8: 90 10 00 19 mov %i1, %o0 40007cdc: 40 00 02 74 call 400086ac <_Thread_Stack_Allocate> 40007ce0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40007ce4: 80 a2 20 00 cmp %o0, 0 40007ce8: 02 80 00 09 be 40007d0c <_Thread_Initialize+0x18c> 40007cec: 80 a6 c0 08 cmp %i3, %o0 40007cf0: 18 80 00 07 bgu 40007d0c <_Thread_Initialize+0x18c> 40007cf4: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40007cf8: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40007cfc: 10 bf ff aa b 40007ba4 <_Thread_Initialize+0x24> 40007d00: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40007d04: 40 00 02 86 call 4000871c <_Thread_Stack_Free> <== NOT EXECUTED 40007d08: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007d0c: 81 c7 e0 08 ret 40007d10: 91 e8 20 00 restore %g0, 0, %o0 4000d3b0 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000d3b0: 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; 4000d3b4: 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; 4000d3b8: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000d3bc: 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; 4000d3c0: 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; 4000d3c4: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000d3c8: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000d3cc: 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; 4000d3d0: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000d3d4: 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 ) ) { 4000d3d8: 7f ff ee 9b call 40008e44 <_Thread_queue_Extract_with_proxy> 4000d3dc: 90 10 00 18 mov %i0, %o0 4000d3e0: 80 8a 20 ff btst 0xff, %o0 4000d3e4: 32 80 00 07 bne,a 4000d400 <_Thread_Reset+0x50> 4000d3e8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000d3ec: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000d3f0: 80 a0 60 02 cmp %g1, 2 4000d3f4: 02 80 00 0c be 4000d424 <_Thread_Reset+0x74> 4000d3f8: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000d3fc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 4000d400: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000d404: 80 a0 40 19 cmp %g1, %i1 4000d408: 02 80 00 05 be 4000d41c <_Thread_Reset+0x6c> 4000d40c: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000d410: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000d414: 7f ff ef 0b call 40009040 <_Thread_Set_priority> 4000d418: 81 e8 00 00 restore 4000d41c: 81 c7 e0 08 ret 4000d420: 81 e8 00 00 restore the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4000d424: 7f ff f1 b4 call 40009af4 <_Watchdog_Remove> <== NOT EXECUTED 4000d428: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000d42c: 10 bf ff f5 b 4000d400 <_Thread_Reset+0x50> <== NOT EXECUTED 4000d430: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000c684 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000c684: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000c688: 03 10 00 66 sethi %hi(0x40019800), %g1 4000c68c: e0 00 60 00 ld [ %g1 ], %l0 ready = executing->ready; _ISR_Disable( level ); 4000c690: 7f ff d5 a4 call 40001d20 4000c694: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000c698: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000c69c: c4 04 40 00 ld [ %l1 ], %g2 4000c6a0: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000c6a4: 80 a0 80 01 cmp %g2, %g1 4000c6a8: 02 80 00 18 be 4000c708 <_Thread_Reset_timeslice+0x84> 4000c6ac: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000c6b0: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000c6b4: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000c6b8: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000c6bc: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000c6c0: 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; 4000c6c4: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000c6c8: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000c6cc: 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; 4000c6d0: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000c6d4: 7f ff d5 97 call 40001d30 4000c6d8: 01 00 00 00 nop 4000c6dc: 7f ff d5 91 call 40001d20 4000c6e0: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000c6e4: 07 10 00 65 sethi %hi(0x40019400), %g3 4000c6e8: c2 00 e3 cc ld [ %g3 + 0x3cc ], %g1 ! 400197cc <_Thread_Heir> 4000c6ec: 80 a4 00 01 cmp %l0, %g1 4000c6f0: 02 80 00 08 be 4000c710 <_Thread_Reset_timeslice+0x8c> 4000c6f4: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 4000c6f8: 03 10 00 66 sethi %hi(0x40019800), %g1 <== NOT EXECUTED 4000c6fc: c4 28 60 10 stb %g2, [ %g1 + 0x10 ] ! 40019810 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000c700: 7f ff d5 8c call 40001d30 <== NOT EXECUTED 4000c704: 81 e8 00 00 restore <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000c708: 7f ff d5 8a call 40001d30 4000c70c: 81 e8 00 00 restore _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4000c710: c2 04 40 00 ld [ %l1 ], %g1 4000c714: c2 20 e3 cc st %g1, [ %g3 + 0x3cc ] _Context_Switch_necessary = TRUE; 4000c718: 03 10 00 66 sethi %hi(0x40019800), %g1 4000c71c: c4 28 60 10 stb %g2, [ %g1 + 0x10 ] ! 40019810 <_Context_Switch_necessary> _ISR_Enable( level ); 4000c720: 7f ff d5 84 call 40001d30 4000c724: 81 e8 00 00 restore 4000c728: 01 00 00 00 nop 40009d74 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 40009d74: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 40009d78: 7f ff e3 07 call 40002994 40009d7c: 01 00 00 00 nop 40009d80: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 40009d84: 80 8e 60 ff btst 0xff, %i1 40009d88: 22 80 00 0d be,a 40009dbc <_Thread_Resume+0x48> 40009d8c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 40009d90: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 40009d94: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 40009d98: 80 88 60 02 btst 2, %g1 40009d9c: 02 80 00 06 be 40009db4 <_Thread_Resume+0x40> 40009da0: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 40009da4: 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 ) ) { 40009da8: 80 a0 60 00 cmp %g1, 0 40009dac: 02 80 00 0a be 40009dd4 <_Thread_Resume+0x60> 40009db0: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 40009db4: 7f ff e2 fc call 400029a4 40009db8: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 40009dbc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 40009dc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009dc4: 02 bf ff f4 be 40009d94 <_Thread_Resume+0x20> <== NOT EXECUTED 40009dc8: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 40009dcc: 7f ff e2 f6 call 400029a4 <== NOT EXECUTED 40009dd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40009dd4: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 40009dd8: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 40009ddc: c2 11 00 00 lduh [ %g4 ], %g1 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 40009de0: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 40009de4: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 40009de8: 1b 10 00 98 sethi %hi(0x40026000), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40009dec: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009df0: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 40009df4: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 40009df8: c2 26 00 00 st %g1, [ %i0 ] 40009dfc: c4 13 62 44 lduh [ %o5 + 0x244 ], %g2 old_last_node = the_chain->last; 40009e00: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 40009e04: f0 20 e0 08 st %i0, [ %g3 + 8 ] 40009e08: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 40009e0c: c8 26 20 04 st %g4, [ %i0 + 4 ] 40009e10: c4 33 62 44 sth %g2, [ %o5 + 0x244 ] 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; 40009e14: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 40009e18: 7f ff e2 e3 call 400029a4 40009e1c: 90 10 00 10 mov %l0, %o0 40009e20: 7f ff e2 dd call 40002994 40009e24: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 40009e28: 09 10 00 98 sethi %hi(0x40026000), %g4 40009e2c: c4 01 22 1c ld [ %g4 + 0x21c ], %g2 ! 4002621c <_Thread_Heir> 40009e30: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 40009e34: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40009e38: 80 a0 c0 01 cmp %g3, %g1 40009e3c: 1a bf ff de bcc 40009db4 <_Thread_Resume+0x40> 40009e40: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 40009e44: 03 10 00 98 sethi %hi(0x40026000), %g1 40009e48: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 40026250 <_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; 40009e4c: f0 21 22 1c st %i0, [ %g4 + 0x21c ] if ( _Thread_Executing->is_preemptible || 40009e50: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 40009e54: 80 a0 60 00 cmp %g1, 0 40009e58: 02 80 00 06 be 40009e70 <_Thread_Resume+0xfc> 40009e5c: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 40009e60: 84 10 20 01 mov 1, %g2 40009e64: 03 10 00 98 sethi %hi(0x40026000), %g1 40009e68: c4 28 62 60 stb %g2, [ %g1 + 0x260 ] ! 40026260 <_Context_Switch_necessary> 40009e6c: 30 bf ff d2 b,a 40009db4 <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 40009e70: 12 bf ff d1 bne 40009db4 <_Thread_Resume+0x40> 40009e74: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 40009e78: 10 bf ff fc b 40009e68 <_Thread_Resume+0xf4> <== NOT EXECUTED 40009e7c: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 400086ac <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 400086ac: 9d e3 bf 98 save %sp, -104, %sp 400086b0: 03 10 00 62 sethi %hi(0x40018800), %g1 400086b4: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1 ! 400189f0 400086b8: 80 a6 40 01 cmp %i1, %g1 400086bc: 2a 80 00 02 bcs,a 400086c4 <_Thread_Stack_Allocate+0x18> 400086c0: 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 ) { 400086c4: 03 10 00 65 sethi %hi(0x40019400), %g1 400086c8: c4 00 63 d8 ld [ %g1 + 0x3d8 ], %g2 ! 400197d8 <_Configuration_Table> 400086cc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 400086d0: 80 a0 60 00 cmp %g1, 0 400086d4: 22 80 00 0a be,a 400086fc <_Thread_Stack_Allocate+0x50> 400086d8: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 400086dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400086e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 400086e4: d0 26 20 cc st %o0, [ %i0 + 0xcc ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 400086e8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 400086ec: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 400086f0: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 400086f4: 81 c7 e0 08 ret <== NOT EXECUTED 400086f8: 81 e8 00 00 restore <== NOT EXECUTED * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 400086fc: 40 00 02 4c call 4000902c <_Workspace_Allocate> 40008700: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 40008704: d0 26 20 cc st %o0, [ %i0 + 0xcc ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 40008708: 80 a0 00 08 cmp %g0, %o0 4000870c: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40008710: b0 0e 40 18 and %i1, %i0, %i0 40008714: 81 c7 e0 08 ret 40008718: 81 e8 00 00 restore 4000871c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000871c: 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 ) 40008720: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 40008724: 80 a0 60 00 cmp %g1, 0 40008728: 02 80 00 09 be 4000874c <_Thread_Stack_Free+0x30> 4000872c: 03 10 00 65 sethi %hi(0x40019400), %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 ) 40008730: c4 00 63 d8 ld [ %g1 + 0x3d8 ], %g2 ! 400197d8 <_Configuration_Table> 40008734: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 40008738: 80 a0 60 00 cmp %g1, 0 4000873c: 22 80 00 06 be,a 40008754 <_Thread_Stack_Free+0x38> 40008740: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 40008744: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008748: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 4000874c: 81 c7 e0 08 ret <== NOT EXECUTED 40008750: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 40008754: 40 00 02 2f call 40009010 <_Workspace_Free> 40008758: 81 e8 00 00 restore 4000875c: 01 00 00 00 nop 4000802c <_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 ) { 4000802c: 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; 40008030: 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); 40008034: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008038: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000803c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 40008040: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 40008044: c4 26 60 40 st %g2, [ %i1 + 0x40 ] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 40008048: ac 10 00 18 mov %i0, %l6 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 4000804c: 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); 40008050: 83 34 a0 06 srl %l2, 6, %g1 40008054: 12 80 00 30 bne 40008114 <_Thread_queue_Enqueue_priority+0xe8> 40008058: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000805c: 85 28 60 04 sll %g1, 4, %g2 40008060: 83 28 60 02 sll %g1, 2, %g1 40008064: 82 20 80 01 sub %g2, %g1, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 40008068: b0 10 00 01 mov %g1, %i0 4000806c: 82 05 80 01 add %l6, %g1, %g1 40008070: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40008074: 7f ff e7 2b call 40001d20 40008078: 01 00 00 00 nop 4000807c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 40008080: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40008084: 80 a4 00 13 cmp %l0, %l3 40008088: 32 80 00 18 bne,a 400080e8 <_Thread_queue_Enqueue_priority+0xbc> 4000808c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 40008090: 10 80 00 81 b 40008294 <_Thread_queue_Enqueue_priority+0x268> 40008094: a2 10 3f ff mov -1, %l1 if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40008098: 80 a4 00 13 cmp %l0, %l3 4000809c: 02 80 00 17 be 400080f8 <_Thread_queue_Enqueue_priority+0xcc> 400080a0: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 400080a4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 400080a8: 80 a4 80 11 cmp %l2, %l1 400080ac: 28 80 00 14 bleu,a 400080fc <_Thread_queue_Enqueue_priority+0xd0> 400080b0: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 400080b4: 7f ff e7 1f call 40001d30 400080b8: 90 10 00 14 mov %l4, %o0 400080bc: 7f ff e7 19 call 40001d20 400080c0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400080c4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400080c8: 80 8d 40 01 btst %l5, %g1 400080cc: 02 80 00 6b be 40008278 <_Thread_queue_Enqueue_priority+0x24c> 400080d0: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 400080d4: e0 04 00 00 ld [ %l0 ], %l0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400080d8: 80 a4 00 13 cmp %l0, %l3 400080dc: 02 80 00 07 be 400080f8 <_Thread_queue_Enqueue_priority+0xcc> 400080e0: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 400080e4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 400080e8: 80 a4 80 11 cmp %l2, %l1 400080ec: 38 bf ff eb bgu,a 40008098 <_Thread_queue_Enqueue_priority+0x6c> 400080f0: e0 04 00 00 ld [ %l0 ], %l0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400080f4: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400080f8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 400080fc: 80 a6 20 01 cmp %i0, 1 40008100: 02 80 00 47 be 4000821c <_Thread_queue_Enqueue_priority+0x1f0> 40008104: 80 a4 80 11 cmp %l2, %l1 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 40008108: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 4000810c: 81 c7 e0 08 ret <== NOT EXECUTED 40008110: 81 e8 00 00 restore <== NOT EXECUTED the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008114: 85 28 60 04 sll %g1, 4, %g2 40008118: 83 28 60 02 sll %g1, 2, %g1 4000811c: 82 20 80 01 sub %g2, %g1, %g1 40008120: 05 10 00 62 sethi %hi(0x40018800), %g2 40008124: a6 06 00 01 add %i0, %g1, %l3 40008128: ae 10 a1 f4 or %g2, 0x1f4, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 4000812c: b0 10 00 13 mov %l3, %i0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008130: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 40008134: 7f ff e6 fb call 40001d20 40008138: a2 00 60 01 add %g1, 1, %l1 4000813c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 40008140: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40008144: 80 a4 c0 10 cmp %l3, %l0 40008148: 22 80 00 25 be,a 400081dc <_Thread_queue_Enqueue_priority+0x1b0> 4000814c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 40008150: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40008154: 80 a4 80 11 cmp %l2, %l1 40008158: 3a 80 00 21 bcc,a 400081dc <_Thread_queue_Enqueue_priority+0x1b0> 4000815c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40008160: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40008164: 80 a4 c0 10 cmp %l3, %l0 40008168: 32 80 00 19 bne,a 400081cc <_Thread_queue_Enqueue_priority+0x1a0> 4000816c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40008170: 10 80 00 1b b 400081dc <_Thread_queue_Enqueue_priority+0x1b0> 40008174: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40008178: 7f ff e6 ee call 40001d30 4000817c: 90 10 00 14 mov %l4, %o0 40008180: 7f ff e6 e8 call 40001d20 40008184: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008188: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000818c: 80 8d 40 01 btst %l5, %g1 40008190: 02 80 00 3d be 40008284 <_Thread_queue_Enqueue_priority+0x258> 40008194: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 40008198: e0 04 20 04 ld [ %l0 + 4 ], %l0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4000819c: 80 a4 00 13 cmp %l0, %l3 400081a0: 22 80 00 0f be,a 400081dc <_Thread_queue_Enqueue_priority+0x1b0> 400081a4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 400081a8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 400081ac: 80 a4 80 11 cmp %l2, %l1 400081b0: 3a 80 00 0b bcc,a 400081dc <_Thread_queue_Enqueue_priority+0x1b0> 400081b4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 400081b8: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400081bc: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 400081c0: 22 80 00 07 be,a 400081dc <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 400081c4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 400081c8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 400081cc: 80 a4 80 11 cmp %l2, %l1 400081d0: 0a bf ff ea bcs 40008178 <_Thread_queue_Enqueue_priority+0x14c> 400081d4: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400081d8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 400081dc: 80 a6 20 01 cmp %i0, 1 400081e0: 12 bf ff ca bne 40008108 <_Thread_queue_Enqueue_priority+0xdc> 400081e4: 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 ) 400081e8: 80 a4 80 11 cmp %l2, %l1 400081ec: 02 80 00 18 be 4000824c <_Thread_queue_Enqueue_priority+0x220> 400081f0: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400081f4: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400081f8: 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; 400081fc: 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; 40008200: ec 26 60 44 st %l6, [ %i1 + 0x44 ] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 40008204: 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; 40008208: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000820c: 7f ff e6 c9 call 40001d30 40008210: 01 00 00 00 nop 40008214: 81 c7 e0 08 ret 40008218: 81 e8 00 00 restore THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 4000821c: 02 80 00 0c be 4000824c <_Thread_queue_Enqueue_priority+0x220> 40008220: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40008224: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008228: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 4000822c: 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; 40008230: ec 26 60 44 st %l6, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40008234: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008238: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000823c: 7f ff e6 bd call 40001d30 40008240: 90 10 00 14 mov %l4, %o0 40008244: 81 c7 e0 08 ret 40008248: 81 e8 00 00 restore 4000824c: 82 04 20 3c add %l0, 0x3c, %g1 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 40008250: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008254: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40008258: 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; 4000825c: ec 26 60 44 st %l6, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40008260: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40008264: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008268: 7f ff e6 b2 call 40001d30 4000826c: b0 10 20 01 mov 1, %i0 40008270: 81 c7 e0 08 ret 40008274: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 40008278: 7f ff e6 ae call 40001d30 <== NOT EXECUTED 4000827c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40008280: 30 bf ff 7d b,a 40008074 <_Thread_queue_Enqueue_priority+0x48> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 40008284: 7f ff e6 ab call 40001d30 <== NOT EXECUTED 40008288: 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; 4000828c: 10 bf ff aa b 40008134 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 40008290: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40008294: 10 bf ff 9a b 400080fc <_Thread_queue_Enqueue_priority+0xd0> 40008298: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 4000d5d0 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000d5d0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000d5d4: 7f ff d1 d3 call 40001d20 4000d5d8: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000d5dc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000d5e0: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000d5e4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000d5e8: 80 88 80 01 btst %g2, %g1 4000d5ec: 02 80 00 19 be 4000d650 <_Thread_queue_Extract_fifo+0x80> 4000d5f0: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d5f4: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000d5f8: 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 ) ) { 4000d5fc: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000d600: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d604: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000d608: 80 a0 e0 02 cmp %g3, 2 4000d60c: 02 80 00 07 be 4000d628 <_Thread_queue_Extract_fifo+0x58> 4000d610: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000d614: 7f ff d1 c7 call 40001d30 4000d618: 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 ); 4000d61c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000d620: 7f ff e8 21 call 400076a4 <_Thread_Clear_state> 4000d624: 81 e8 00 00 restore 4000d628: 82 10 20 03 mov 3, %g1 4000d62c: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000d630: 7f ff d1 c0 call 40001d30 4000d634: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000d638: 7f ff ee 15 call 40008e8c <_Watchdog_Remove> 4000d63c: 90 06 60 48 add %i1, 0x48, %o0 4000d640: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000d644: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000d648: 7f ff e8 17 call 400076a4 <_Thread_Clear_state> 4000d64c: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000d650: 7f ff d1 b8 call 40001d30 <== NOT EXECUTED 4000d654: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000d658: 01 00 00 00 nop 4000c40c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000c40c: 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 ); 4000c410: 7f ff d6 44 call 40001d20 4000c414: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000c418: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000c41c: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000c420: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000c424: 80 88 80 01 btst %g2, %g1 4000c428: 02 80 00 23 be 4000c4b4 <_Thread_queue_Extract_priority_helper+0xa8> 4000c42c: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c430: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000c434: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000c438: 80 a0 c0 01 cmp %g3, %g1 4000c43c: 02 80 00 2a be 4000c4e4 <_Thread_queue_Extract_priority_helper+0xd8> 4000c440: 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; 4000c444: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000c448: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000c44c: 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; 4000c450: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000c454: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000c458: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000c45c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000c460: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000c464: 80 a0 80 01 cmp %g2, %g1 4000c468: 02 80 00 07 be 4000c484 <_Thread_queue_Extract_priority_helper+0x78> 4000c46c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000c470: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000c474: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000c478: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000c47c: 82 00 e0 3c add %g3, 0x3c, %g1 4000c480: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000c484: 80 8e a0 ff btst 0xff, %i2 4000c488: 12 80 00 0d bne 4000c4bc <_Thread_queue_Extract_priority_helper+0xb0> 4000c48c: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000c490: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000c494: 80 a0 60 02 cmp %g1, 2 4000c498: 02 80 00 0b be 4000c4c4 <_Thread_queue_Extract_priority_helper+0xb8> 4000c49c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000c4a0: 7f ff d6 24 call 40001d30 4000c4a4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000c4a8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000c4ac: 7f ff ec 7e call 400076a4 <_Thread_Clear_state> 4000c4b0: 81 e8 00 00 restore Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000c4b4: 7f ff d6 1f call 40001d30 <== NOT EXECUTED 4000c4b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4000c4bc: 7f ff d6 1d call 40001d30 4000c4c0: 91 e8 00 08 restore %g0, %o0, %o0 4000c4c4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000c4c8: 7f ff d6 1a call 40001d30 4000c4cc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000c4d0: 7f ff f2 6f call 40008e8c <_Watchdog_Remove> 4000c4d4: 90 06 20 48 add %i0, 0x48, %o0 4000c4d8: b2 16 63 f8 or %i1, 0x3f8, %i1 4000c4dc: 7f ff ec 72 call 400076a4 <_Thread_Clear_state> 4000c4e0: 81 e8 00 00 restore new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000c4e4: 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; 4000c4e8: 10 bf ff e7 b 4000c484 <_Thread_queue_Extract_priority_helper+0x78> 4000c4ec: c4 20 40 00 st %g2, [ %g1 ] 4000c4f0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4000c4f0: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000c4f4: d0 02 20 44 ld [ %o0 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4000c4f8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000c4fc: 80 a0 e0 00 cmp %g3, 0 4000c500: 02 80 00 06 be 4000c518 <_Thread_queue_Process_timeout+0x28> 4000c504: 03 10 00 66 sethi %hi(0x40019800), %g1 4000c508: c4 00 60 00 ld [ %g1 ], %g2 4000c50c: 80 a2 40 02 cmp %o1, %g2 4000c510: 02 80 00 07 be 4000c52c <_Thread_queue_Process_timeout+0x3c> 4000c514: 80 a0 e0 03 cmp %g3, 3 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000c518: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000c51c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000c520: 82 13 c0 00 mov %o7, %g1 4000c524: 7f ff ff af call 4000c3e0 <_Thread_queue_Extract> 4000c528: 9e 10 40 00 mov %g1, %o7 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4000c52c: 02 80 00 06 be 4000c544 <_Thread_queue_Process_timeout+0x54> 4000c530: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000c534: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000c538: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000c53c: 81 c3 e0 08 retl 4000c540: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 4000c544: 81 c3 e0 08 retl <== NOT EXECUTED 4000c548: 01 00 00 00 nop 4000836c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000836c: 9d e3 bf 90 save %sp, -112, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 40008370: 80 a6 20 00 cmp %i0, 0 40008374: 02 80 00 13 be 400083c0 <_Thread_queue_Requeue+0x54> 40008378: 01 00 00 00 nop /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4000837c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40008380: 80 a4 20 01 cmp %l0, 1 40008384: 02 80 00 04 be 40008394 <_Thread_queue_Requeue+0x28> 40008388: 01 00 00 00 nop 4000838c: 81 c7 e0 08 ret <== NOT EXECUTED 40008390: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40008394: 7f ff e6 63 call 40001d20 40008398: 01 00 00 00 nop 4000839c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 400083a0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 400083a4: 03 00 00 ef sethi %hi(0x3bc00), %g1 400083a8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 400083ac: 80 88 80 01 btst %g2, %g1 400083b0: 12 80 00 06 bne 400083c8 <_Thread_queue_Requeue+0x5c> 400083b4: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 400083b8: 7f ff e6 5e call 40001d30 400083bc: 90 10 00 11 mov %l1, %o0 400083c0: 81 c7 e0 08 ret 400083c4: 81 e8 00 00 restore ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 400083c8: 92 10 00 19 mov %i1, %o1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 400083cc: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 400083d0: 40 00 10 0f call 4000c40c <_Thread_queue_Extract_priority_helper> 400083d4: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 400083d8: 90 10 00 18 mov %i0, %o0 400083dc: 92 10 00 19 mov %i1, %o1 400083e0: 7f ff ff 13 call 4000802c <_Thread_queue_Enqueue_priority> 400083e4: 94 07 bf f4 add %fp, -12, %o2 400083e8: 30 bf ff f4 b,a 400083b8 <_Thread_queue_Requeue+0x4c> 40011aac <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 40011aac: 9d e3 bf 98 save %sp, -104, %sp 40011ab0: 03 10 00 cd sethi %hi(0x40033400), %g1 break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40011ab4: 05 10 00 cd sethi %hi(0x40033400), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011ab8: a0 10 61 ac or %g1, 0x1ac, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40011abc: 03 10 00 cd sethi %hi(0x40033400), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40011ac0: a4 10 a1 a0 or %g2, 0x1a0, %l2 the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40011ac4: a2 10 61 8c or %g1, 0x18c, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011ac8: 40 00 02 ca call 400125f0 <_Chain_Get> 40011acc: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40011ad0: 80 a2 20 00 cmp %o0, 0 40011ad4: 02 80 00 0f be 40011b10 <_Timer_Server_process_insertions+0x64> 40011ad8: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40011adc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40011ae0: 80 a0 60 01 cmp %g1, 1 40011ae4: 02 80 00 12 be 40011b2c <_Timer_Server_process_insertions+0x80> 40011ae8: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40011aec: 02 80 00 0b be 40011b18 <_Timer_Server_process_insertions+0x6c> 40011af0: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011af4: 7f ff ff ee call 40011aac <_Timer_Server_process_insertions> <== NOT EXECUTED 40011af8: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40011afc: 40 00 02 bd call 400125f0 <_Chain_Get> 40011b00: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40011b04: 80 a2 20 00 cmp %o0, 0 40011b08: 32 bf ff f6 bne,a 40011ae0 <_Timer_Server_process_insertions+0x34> 40011b0c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 40011b10: 81 c7 e0 08 ret 40011b14: 81 e8 00 00 restore break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40011b18: 40 00 12 10 call 40016358 <_Watchdog_Insert> 40011b1c: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011b20: 7f ff ff e3 call 40011aac <_Timer_Server_process_insertions> 40011b24: 01 00 00 00 nop 40011b28: 30 bf ff f5 b,a 40011afc <_Timer_Server_process_insertions+0x50> the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40011b2c: 92 02 20 10 add %o0, 0x10, %o1 40011b30: 40 00 12 0a call 40016358 <_Watchdog_Insert> 40011b34: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40011b38: 7f ff ff dd call 40011aac <_Timer_Server_process_insertions> 40011b3c: 01 00 00 00 nop 40011b40: 30 bf ff ef b,a 40011afc <_Timer_Server_process_insertions+0x50> 4000a590 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000a590: 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; 4000a594: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000a598: 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; 4000a59c: 91 38 60 1f sra %g1, 0x1f, %o0 4000a5a0: 92 10 00 01 mov %g1, %o1 4000a5a4: 83 30 60 1d srl %g1, 0x1d, %g1 4000a5a8: 87 2a 60 03 sll %o1, 3, %g3 4000a5ac: 85 2a 20 03 sll %o0, 3, %g2 4000a5b0: 84 10 40 02 or %g1, %g2, %g2 4000a5b4: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a5b8: 99 28 a0 05 sll %g2, 5, %o4 4000a5bc: 9b 28 e0 05 sll %g3, 5, %o5 4000a5c0: 98 10 40 0c or %g1, %o4, %o4 4000a5c4: 9a a3 40 03 subcc %o5, %g3, %o5 4000a5c8: 83 33 60 1a srl %o5, 0x1a, %g1 4000a5cc: 98 63 00 02 subx %o4, %g2, %o4 4000a5d0: 97 2b 60 06 sll %o5, 6, %o3 4000a5d4: 95 2b 20 06 sll %o4, 6, %o2 4000a5d8: 96 a2 c0 0d subcc %o3, %o5, %o3 4000a5dc: 94 10 40 0a or %g1, %o2, %o2 4000a5e0: 94 62 80 0c subx %o2, %o4, %o2 4000a5e4: 96 82 c0 09 addcc %o3, %o1, %o3 4000a5e8: 94 42 80 08 addx %o2, %o0, %o2 4000a5ec: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a5f0: 85 2a a0 02 sll %o2, 2, %g2 4000a5f4: 84 10 40 02 or %g1, %g2, %g2 4000a5f8: 87 2a e0 02 sll %o3, 2, %g3 4000a5fc: 96 82 c0 03 addcc %o3, %g3, %o3 4000a600: 94 42 80 02 addx %o2, %g2, %o2 4000a604: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a608: 85 2a a0 02 sll %o2, 2, %g2 4000a60c: 84 10 40 02 or %g1, %g2, %g2 4000a610: 87 2a e0 02 sll %o3, 2, %g3 4000a614: 96 82 c0 03 addcc %o3, %g3, %o3 4000a618: 94 42 80 02 addx %o2, %g2, %o2 4000a61c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a620: 85 2a a0 02 sll %o2, 2, %g2 4000a624: 84 10 40 02 or %g1, %g2, %g2 4000a628: 87 2a e0 02 sll %o3, 2, %g3 4000a62c: 96 82 c0 03 addcc %o3, %g3, %o3 4000a630: 94 42 80 02 addx %o2, %g2, %o2 4000a634: 85 32 e0 17 srl %o3, 0x17, %g2 4000a638: 83 2a a0 09 sll %o2, 9, %g1 4000a63c: 9b 2a e0 09 sll %o3, 9, %o5 4000a640: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000a644: 96 83 40 0f addcc %o5, %o7, %o3 4000a648: 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; 4000a64c: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000a650: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000a654: 80 92 80 0b orcc %o2, %o3, %g0 4000a658: 02 80 00 5d be 4000a7cc <_Timespec_Divide+0x23c> 4000a65c: d0 06 00 00 ld [ %i0 ], %o0 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000a660: 92 10 00 08 mov %o0, %o1 4000a664: 83 32 60 1d srl %o1, 0x1d, %g1 4000a668: 9b 2a 60 03 sll %o1, 3, %o5 4000a66c: 91 3a 20 1f sra %o0, 0x1f, %o0 4000a670: 99 2a 20 03 sll %o0, 3, %o4 4000a674: 98 10 40 0c or %g1, %o4, %o4 4000a678: 83 33 60 1b srl %o5, 0x1b, %g1 4000a67c: 85 2b 20 05 sll %o4, 5, %g2 4000a680: 87 2b 60 05 sll %o5, 5, %g3 4000a684: 84 10 40 02 or %g1, %g2, %g2 4000a688: 86 a0 c0 0d subcc %g3, %o5, %g3 4000a68c: 83 30 e0 1a srl %g3, 0x1a, %g1 4000a690: 84 60 80 0c subx %g2, %o4, %g2 4000a694: 9b 28 e0 06 sll %g3, 6, %o5 4000a698: 99 28 a0 06 sll %g2, 6, %o4 4000a69c: 9a a3 40 03 subcc %o5, %g3, %o5 4000a6a0: 98 10 40 0c or %g1, %o4, %o4 4000a6a4: 98 63 00 02 subx %o4, %g2, %o4 4000a6a8: 9a 83 40 09 addcc %o5, %o1, %o5 4000a6ac: 83 33 60 1e srl %o5, 0x1e, %g1 4000a6b0: 98 43 00 08 addx %o4, %o0, %o4 4000a6b4: 87 2b 60 02 sll %o5, 2, %g3 4000a6b8: 85 2b 20 02 sll %o4, 2, %g2 4000a6bc: 9a 83 40 03 addcc %o5, %g3, %o5 4000a6c0: 84 10 40 02 or %g1, %g2, %g2 4000a6c4: 83 33 60 1e srl %o5, 0x1e, %g1 4000a6c8: 98 43 00 02 addx %o4, %g2, %o4 4000a6cc: 87 2b 60 02 sll %o5, 2, %g3 4000a6d0: 85 2b 20 02 sll %o4, 2, %g2 4000a6d4: 9a 83 40 03 addcc %o5, %g3, %o5 4000a6d8: 84 10 40 02 or %g1, %g2, %g2 4000a6dc: 83 33 60 1e srl %o5, 0x1e, %g1 4000a6e0: 98 43 00 02 addx %o4, %g2, %o4 4000a6e4: 87 2b 60 02 sll %o5, 2, %g3 4000a6e8: 85 2b 20 02 sll %o4, 2, %g2 4000a6ec: 9a 83 40 03 addcc %o5, %g3, %o5 4000a6f0: 84 10 40 02 or %g1, %g2, %g2 4000a6f4: 98 43 00 02 addx %o4, %g2, %o4 4000a6f8: 83 2b 20 09 sll %o4, 9, %g1 4000a6fc: 89 33 60 17 srl %o5, 0x17, %g4 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000a700: 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; 4000a704: a0 11 00 01 or %g4, %g1, %l0 4000a708: 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; 4000a70c: a2 84 40 13 addcc %l1, %l3, %l1 4000a710: 83 34 60 1e srl %l1, 0x1e, %g1 4000a714: 87 2c 60 02 sll %l1, 2, %g3 4000a718: a5 3c a0 1f sra %l2, 0x1f, %l2 4000a71c: a0 44 00 12 addx %l0, %l2, %l0 4000a720: 85 2c 20 02 sll %l0, 2, %g2 4000a724: 84 10 40 02 or %g1, %g2, %g2 4000a728: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a72c: 99 28 a0 05 sll %g2, 5, %o4 4000a730: 9b 28 e0 05 sll %g3, 5, %o5 4000a734: 98 10 40 0c or %g1, %o4, %o4 4000a738: 9a a3 40 03 subcc %o5, %g3, %o5 4000a73c: 98 63 00 02 subx %o4, %g2, %o4 4000a740: 9a 83 40 11 addcc %o5, %l1, %o5 4000a744: 83 33 60 1e srl %o5, 0x1e, %g1 4000a748: 98 43 00 10 addx %o4, %l0, %o4 4000a74c: 87 2b 60 02 sll %o5, 2, %g3 4000a750: 85 2b 20 02 sll %o4, 2, %g2 4000a754: 9a 83 40 03 addcc %o5, %g3, %o5 4000a758: 84 10 40 02 or %g1, %g2, %g2 4000a75c: 83 33 60 1e srl %o5, 0x1e, %g1 4000a760: 87 2b 60 02 sll %o5, 2, %g3 4000a764: 98 43 00 02 addx %o4, %g2, %o4 4000a768: 9a 83 40 03 addcc %o5, %g3, %o5 4000a76c: 85 2b 20 02 sll %o4, 2, %g2 4000a770: 84 10 40 02 or %g1, %g2, %g2 4000a774: 83 33 60 1b srl %o5, 0x1b, %g1 4000a778: 98 43 00 02 addx %o4, %g2, %o4 4000a77c: 99 2b 20 05 sll %o4, 5, %o4 4000a780: 98 10 40 0c or %g1, %o4, %o4 4000a784: 93 2b 60 05 sll %o5, 5, %o1 4000a788: 40 00 36 fe call 40018380 <__udivdi3> 4000a78c: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000a790: 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; 4000a794: a0 10 00 08 mov %o0, %l0 4000a798: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000a79c: 96 10 23 e8 mov 0x3e8, %o3 4000a7a0: 40 00 36 f8 call 40018380 <__udivdi3> 4000a7a4: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000a7a8: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000a7ac: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000a7b0: 94 10 20 00 clr %o2 4000a7b4: 92 10 00 11 mov %l1, %o1 4000a7b8: 40 00 37 ce call 400186f0 <__umoddi3> 4000a7bc: 96 10 23 e8 mov 0x3e8, %o3 4000a7c0: d2 26 c0 00 st %o1, [ %i3 ] 4000a7c4: 81 c7 e0 08 ret 4000a7c8: 81 e8 00 00 restore left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 4000a7cc: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000a7d0: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000a7d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000a7d8: 81 e8 00 00 restore <== NOT EXECUTED 4000f1ac <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000f1ac: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 4000f1b0: 40 00 14 e1 call 40014534 <_Chain_Extract> 4000f1b4: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000f1b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000f1bc: 80 a0 60 00 cmp %g1, 0 4000f1c0: 02 80 00 04 be 4000f1d0 <_User_extensions_Remove_set+0x24> 4000f1c4: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 4000f1c8: 40 00 14 db call 40014534 <_Chain_Extract> <== NOT EXECUTED 4000f1cc: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000f1d0: 81 c7 e0 08 ret 4000f1d4: 81 e8 00 00 restore 40008b88 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40008b88: 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 ; 40008b8c: 03 10 00 66 sethi %hi(0x40019800), %g1 40008b90: e0 00 61 78 ld [ %g1 + 0x178 ], %l0 ! 40019978 <_User_extensions_List> 40008b94: 82 10 61 78 or %g1, 0x178, %g1 40008b98: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40008b9c: 80 a4 00 11 cmp %l0, %l1 40008ba0: 02 80 00 10 be 40008be0 <_User_extensions_Thread_create+0x58> 40008ba4: 03 10 00 66 sethi %hi(0x40019800), %g1 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 40008ba8: a4 10 60 00 mov %g1, %l2 ! 40019800 <_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 ) { 40008bac: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40008bb0: 80 a0 60 00 cmp %g1, 0 40008bb4: 02 80 00 07 be 40008bd0 <_User_extensions_Thread_create+0x48> 40008bb8: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40008bbc: 9f c0 40 00 call %g1 40008bc0: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40008bc4: 80 8a 20 ff btst 0xff, %o0 40008bc8: 02 80 00 08 be 40008be8 <_User_extensions_Thread_create+0x60> 40008bcc: 01 00 00 00 nop User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 40008bd0: 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 ) ; 40008bd4: 80 a4 00 11 cmp %l0, %l1 40008bd8: 32 bf ff f6 bne,a 40008bb0 <_User_extensions_Thread_create+0x28> 40008bdc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40008be0: 81 c7 e0 08 ret 40008be4: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 40008be8: 81 c7 e0 08 ret <== NOT EXECUTED 40008bec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ab64 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000ab64: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000ab68: 7f ff df 8b call 40002994 4000ab6c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000ab70: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000ab74: a0 06 20 04 add %i0, 4, %l0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000ab78: 80 a0 80 10 cmp %g2, %l0 4000ab7c: 02 80 00 1f be 4000abf8 <_Watchdog_Adjust+0x94> 4000ab80: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000ab84: 12 80 00 1f bne 4000ac00 <_Watchdog_Adjust+0x9c> 4000ab88: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000ab8c: 80 a6 a0 00 cmp %i2, 0 4000ab90: 02 80 00 1a be 4000abf8 <_Watchdog_Adjust+0x94> 4000ab94: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000ab98: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000ab9c: 80 a6 80 19 cmp %i2, %i1 4000aba0: 1a 80 00 0b bcc 4000abcc <_Watchdog_Adjust+0x68> 4000aba4: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 4000aba8: 10 80 00 1d b 4000ac1c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000abac: 82 26 40 1a sub %i1, %i2, %g1 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000abb0: b4 a6 80 19 subcc %i2, %i1, %i2 4000abb4: 02 80 00 11 be 4000abf8 <_Watchdog_Adjust+0x94> 4000abb8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000abbc: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000abc0: 80 a6 40 1a cmp %i1, %i2 4000abc4: 18 80 00 16 bgu 4000ac1c <_Watchdog_Adjust+0xb8> 4000abc8: 82 26 40 1a sub %i1, %i2, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4000abcc: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 4000abd0: 7f ff df 75 call 400029a4 4000abd4: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000abd8: 40 00 00 b4 call 4000aea8 <_Watchdog_Tickle> 4000abdc: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000abe0: 7f ff df 6d call 40002994 4000abe4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000abe8: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 4000abec: 80 a4 00 01 cmp %l0, %g1 4000abf0: 12 bf ff f0 bne 4000abb0 <_Watchdog_Adjust+0x4c> 4000abf4: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 4000abf8: 7f ff df 6b call 400029a4 4000abfc: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000ac00: 12 bf ff fe bne 4000abf8 <_Watchdog_Adjust+0x94> 4000ac04: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000ac08: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000ac0c: 82 00 40 1a add %g1, %i2, %g1 4000ac10: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 4000ac14: 7f ff df 64 call 400029a4 4000ac18: 91 e8 00 08 restore %g0, %o0, %o0 _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 4000ac1c: 10 bf ff f7 b 4000abf8 <_Watchdog_Adjust+0x94> 4000ac20: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 40016288 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 40016288: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 4001628c: a2 96 60 00 orcc %i1, 0, %l1 40016290: 12 80 00 04 bne 400162a0 <_Watchdog_Adjust_to_chain+0x18> 40016294: 01 00 00 00 nop 40016298: 81 c7 e0 08 ret 4001629c: 81 e8 00 00 restore return; } _ISR_Disable( level ); 400162a0: 7f ff d3 c4 call 4000b1b0 400162a4: 01 00 00 00 nop 400162a8: a6 10 00 08 mov %o0, %l3 400162ac: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400162b0: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 400162b4: 80 a0 80 10 cmp %g2, %l0 400162b8: 02 80 00 25 be 4001634c <_Watchdog_Adjust_to_chain+0xc4> 400162bc: a4 06 a0 04 add %i2, 4, %l2 400162c0: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 400162c4: 80 a6 40 11 cmp %i1, %l1 400162c8: 18 80 00 20 bgu 40016348 <_Watchdog_Adjust_to_chain+0xc0> 400162cc: 82 26 40 11 sub %i1, %l1, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 400162d0: 10 80 00 15 b 40016324 <_Watchdog_Adjust_to_chain+0x9c> 400162d4: c0 20 a0 10 clr [ %g2 + 0x10 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 400162d8: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 400162dc: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400162e0: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 400162e4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 400162e8: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 400162ec: 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; 400162f0: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 400162f4: 7f ff d3 b3 call 4000b1c0 400162f8: 90 10 00 13 mov %l3, %o0 400162fc: 7f ff d3 ad call 4000b1b0 40016300: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40016304: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40016308: 80 a4 00 02 cmp %l0, %g2 4001630c: 02 80 00 10 be 4001634c <_Watchdog_Adjust_to_chain+0xc4> 40016310: 01 00 00 00 nop 40016314: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40016318: 80 a0 60 00 cmp %g1, 0 4001631c: 32 80 00 07 bne,a 40016338 <_Watchdog_Adjust_to_chain+0xb0> 40016320: a2 a4 40 19 subcc %l1, %i1, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40016324: 80 a4 00 02 cmp %l0, %g2 40016328: 32 bf ff ec bne,a 400162d8 <_Watchdog_Adjust_to_chain+0x50> 4001632c: c2 00 80 00 ld [ %g2 ], %g1 40016330: 10 bf ff ec b 400162e0 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 40016334: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 40016338: 02 80 00 05 be 4001634c <_Watchdog_Adjust_to_chain+0xc4> 4001633c: 01 00 00 00 nop 40016340: 10 bf ff e1 b 400162c4 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 40016344: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 40016348: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 4001634c: 7f ff d3 9d call 4000b1c0 40016350: 91 e8 00 13 restore %g0, %l3, %o0 40016354: 01 00 00 00 nop 40008ce0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40008ce0: 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; 40008ce4: 03 10 00 65 sethi %hi(0x40019400), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40008ce8: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 40008cec: e6 00 63 dc ld [ %g1 + 0x3dc ], %l3 _ISR_Disable( level ); 40008cf0: 7f ff e4 0c call 40001d20 40008cf4: 01 00 00 00 nop 40008cf8: 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 ) { 40008cfc: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008d00: 80 a0 60 00 cmp %g1, 0 40008d04: 12 80 00 4a bne 40008e2c <_Watchdog_Insert+0x14c> 40008d08: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40008d0c: 2b 10 00 66 sethi %hi(0x40019800), %l5 40008d10: c2 05 60 90 ld [ %l5 + 0x90 ], %g1 ! 40019890 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008d14: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40008d18: 82 00 60 01 inc %g1 40008d1c: 2f 10 00 65 sethi %hi(0x40019400), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008d20: c4 26 60 08 st %g2, [ %i1 + 8 ] 40008d24: a8 15 e3 fc or %l7, 0x3fc, %l4 _Watchdog_Sync_count++; 40008d28: c2 25 60 90 st %g1, [ %l5 + 0x90 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40008d2c: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40008d30: 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 ; 40008d34: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40008d38: 80 a4 a0 00 cmp %l2, 0 40008d3c: 02 80 00 2b be 40008de8 <_Watchdog_Insert+0x108> 40008d40: 03 10 00 66 sethi %hi(0x40019800), %g1 40008d44: c2 04 40 00 ld [ %l1 ], %g1 40008d48: 80 a0 60 00 cmp %g1, 0 40008d4c: 02 80 00 27 be 40008de8 <_Watchdog_Insert+0x108> 40008d50: 03 10 00 66 sethi %hi(0x40019800), %g1 break; if ( delta_interval < after->delta_interval ) { 40008d54: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40008d58: 80 a4 80 10 cmp %l2, %l0 40008d5c: 1a 80 00 13 bcc 40008da8 <_Watchdog_Insert+0xc8> 40008d60: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40008d64: 10 80 00 20 b 40008de4 <_Watchdog_Insert+0x104> 40008d68: c2 24 60 10 st %g1, [ %l1 + 0x10 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40008d6c: c2 05 00 00 ld [ %l4 ], %g1 40008d70: 80 a4 c0 01 cmp %l3, %g1 40008d74: 0a 80 00 30 bcs 40008e34 <_Watchdog_Insert+0x154> 40008d78: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40008d7c: a4 a4 80 10 subcc %l2, %l0, %l2 40008d80: 02 80 00 19 be 40008de4 <_Watchdog_Insert+0x104> 40008d84: e2 04 40 00 ld [ %l1 ], %l1 40008d88: c2 04 40 00 ld [ %l1 ], %g1 40008d8c: 80 a0 60 00 cmp %g1, 0 40008d90: 02 80 00 16 be 40008de8 <_Watchdog_Insert+0x108> 40008d94: 03 10 00 66 sethi %hi(0x40019800), %g1 break; if ( delta_interval < after->delta_interval ) { 40008d98: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40008d9c: 80 a4 00 12 cmp %l0, %l2 40008da0: 18 80 00 10 bgu 40008de0 <_Watchdog_Insert+0x100> 40008da4: 82 24 00 12 sub %l0, %l2, %g1 * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 40008da8: 7f ff e3 e2 call 40001d30 40008dac: 90 10 00 18 mov %i0, %o0 40008db0: 7f ff e3 dc call 40001d20 40008db4: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40008db8: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008dbc: 80 a0 60 01 cmp %g1, 1 40008dc0: 02 bf ff eb be 40008d6c <_Watchdog_Insert+0x8c> 40008dc4: 01 00 00 00 nop _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 40008dc8: e6 25 e3 fc st %l3, [ %l7 + 0x3fc ] <== NOT EXECUTED _Watchdog_Sync_count--; 40008dcc: c2 05 60 90 ld [ %l5 + 0x90 ], %g1 <== NOT EXECUTED 40008dd0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008dd4: c2 25 60 90 st %g1, [ %l5 + 0x90 ] <== NOT EXECUTED _ISR_Enable( level ); 40008dd8: 7f ff e3 d6 call 40001d30 <== NOT EXECUTED 40008ddc: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 40008de0: c2 24 60 10 st %g1, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40008de4: 03 10 00 66 sethi %hi(0x40019800), %g1 40008de8: c6 00 60 94 ld [ %g1 + 0x94 ], %g3 ! 40019894 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 40008dec: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40008df0: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40008df4: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40008df8: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40008dfc: c8 00 80 00 ld [ %g2 ], %g4 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 40008e00: e6 25 e3 fc st %l3, [ %l7 + 0x3fc ] 40008e04: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 40008e08: c2 05 60 90 ld [ %l5 + 0x90 ], %g1 after_node->next = the_node; 40008e0c: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40008e10: c4 26 60 04 st %g2, [ %i1 + 4 ] 40008e14: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 40008e18: f2 21 20 04 st %i1, [ %g4 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 40008e1c: c8 26 40 00 st %g4, [ %i1 ] 40008e20: c2 25 60 90 st %g1, [ %l5 + 0x90 ] _ISR_Enable( level ); 40008e24: 7f ff e3 c3 call 40001d30 40008e28: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 40008e2c: 7f ff e3 c1 call 40001d30 <== NOT EXECUTED 40008e30: 81 e8 00 00 restore <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 40008e34: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40008e38: 10 bf ff bf b 40008d34 <_Watchdog_Insert+0x54> 40008e3c: e4 06 60 0c ld [ %i1 + 0xc ], %l2 40008e8c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 40008e8c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 40008e90: 7f ff e3 a4 call 40001d20 40008e94: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 40008e98: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 40008e9c: 80 a6 20 01 cmp %i0, 1 40008ea0: 02 80 00 2a be 40008f48 <_Watchdog_Remove+0xbc> 40008ea4: 03 10 00 66 sethi %hi(0x40019800), %g1 40008ea8: 1a 80 00 09 bcc 40008ecc <_Watchdog_Remove+0x40> 40008eac: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008eb0: 03 10 00 66 sethi %hi(0x40019800), %g1 40008eb4: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 ! 40019894 <_Watchdog_Ticks_since_boot> 40008eb8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 40008ebc: 7f ff e3 9d call 40001d30 40008ec0: 01 00 00 00 nop return( previous_state ); } 40008ec4: 81 c7 e0 08 ret 40008ec8: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 40008ecc: 18 bf ff fa bgu 40008eb4 <_Watchdog_Remove+0x28> 40008ed0: 03 10 00 66 sethi %hi(0x40019800), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 40008ed4: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 40008ed8: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 40008edc: c2 01 00 00 ld [ %g4 ], %g1 40008ee0: 80 a0 60 00 cmp %g1, 0 40008ee4: 02 80 00 07 be 40008f00 <_Watchdog_Remove+0x74> 40008ee8: 03 10 00 66 sethi %hi(0x40019800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 40008eec: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 40008ef0: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008ef4: 82 00 40 02 add %g1, %g2, %g1 40008ef8: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 40008efc: 03 10 00 66 sethi %hi(0x40019800), %g1 40008f00: c4 00 60 90 ld [ %g1 + 0x90 ], %g2 ! 40019890 <_Watchdog_Sync_count> 40008f04: 80 a0 a0 00 cmp %g2, 0 40008f08: 22 80 00 07 be,a 40008f24 <_Watchdog_Remove+0x98> 40008f0c: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 40008f10: 03 10 00 65 sethi %hi(0x40019400), %g1 <== NOT EXECUTED 40008f14: c6 00 63 dc ld [ %g1 + 0x3dc ], %g3 ! 400197dc <_ISR_Nest_level> <== NOT EXECUTED 40008f18: 05 10 00 65 sethi %hi(0x40019400), %g2 <== NOT EXECUTED 40008f1c: c6 20 a3 fc st %g3, [ %g2 + 0x3fc ] ! 400197fc <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 40008f20: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 40008f24: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008f28: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008f2c: 03 10 00 66 sethi %hi(0x40019800), %g1 40008f30: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 ! 40019894 <_Watchdog_Ticks_since_boot> 40008f34: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 40008f38: 7f ff e3 7e call 40001d30 40008f3c: 01 00 00 00 nop return( previous_state ); } 40008f40: 81 c7 e0 08 ret 40008f44: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008f48: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 40008f4c: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008f50: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 40008f54: 7f ff e3 77 call 40001d30 <== NOT EXECUTED 40008f58: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 40008f5c: 81 c7 e0 08 ret <== NOT EXECUTED 40008f60: 81 e8 00 00 restore <== NOT EXECUTED 4000907c <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000907c: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 40009080: 80 a6 20 00 cmp %i0, 0 40009084: 02 80 00 15 be 400090d8 <_Workspace_Handler_initialization+0x5c> 40009088: 80 8e 20 07 btst 7, %i0 4000908c: 12 80 00 14 bne 400090dc <_Workspace_Handler_initialization+0x60> 40009090: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 40009094: 03 10 00 65 sethi %hi(0x40019400), %g1 40009098: c4 00 63 d8 ld [ %g1 + 0x3d8 ], %g2 ! 400197d8 <_Configuration_Table> 4000909c: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 400090a0: 80 a0 e0 00 cmp %g3, 0 400090a4: 32 80 00 11 bne,a 400090e8 <_Workspace_Handler_initialization+0x6c> 400090a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 400090ac: 92 10 00 18 mov %i0, %o1 400090b0: 94 10 00 19 mov %i1, %o2 400090b4: 11 10 00 65 sethi %hi(0x40019400), %o0 400090b8: 96 10 20 08 mov 8, %o3 400090bc: 7f ff f5 eb call 40006868 <_Heap_Initialize> 400090c0: 90 12 23 64 or %o0, 0x364, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 400090c4: 80 a2 20 00 cmp %o0, 0 400090c8: 02 80 00 0d be 400090fc <_Workspace_Handler_initialization+0x80> 400090cc: 92 10 20 01 mov 1, %o1 400090d0: 81 c7 e0 08 ret 400090d4: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 400090d8: 90 10 20 00 clr %o0 400090dc: 92 10 20 01 mov 1, %o1 400090e0: 7f ff f6 6f call 40006a9c <_Internal_error_Occurred> 400090e4: 94 10 20 02 mov 2, %o2 TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 400090e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400090ec: 40 00 13 c3 call 4000dff8 <== NOT EXECUTED 400090f0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 400090f4: 10 bf ff ef b 400090b0 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 400090f8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 400090fc: 7f ff f6 68 call 40006a9c <_Internal_error_Occurred> <== NOT EXECUTED 40009100: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 40009104: 01 00 00 00 nop 400071c4 : } unsigned int alarm( unsigned int seconds ) { 400071c4: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 400071c8: 03 10 00 64 sethi %hi(0x40019000), %g1 400071cc: a2 10 61 84 or %g1, 0x184, %l1 ! 40019184 <_POSIX_signals_Alarm_timer> 400071d0: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400071d4: 80 a0 a0 00 cmp %g2, 0 400071d8: 02 80 00 23 be 40007264 400071dc: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 400071e0: 40 00 14 a0 call 4000c460 <_Watchdog_Remove> 400071e4: 90 10 00 11 mov %l1, %o0 400071e8: 90 02 3f fe add %o0, -2, %o0 400071ec: 80 a2 20 01 cmp %o0, 1 400071f0: 08 80 00 09 bleu 40007214 400071f4: b0 10 20 00 clr %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400071f8: e4 24 60 0c st %l2, [ %l1 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 400071fc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40007200: 11 10 00 64 sethi %hi(0x40019000), %o0 <== NOT EXECUTED 40007204: 40 00 14 2c call 4000c2b4 <_Watchdog_Insert> <== NOT EXECUTED 40007208: 90 12 23 b4 or %o0, 0x3b4, %o0 ! 400193b4 <_Watchdog_Seconds_chain> <== NOT EXECUTED } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4000720c: 81 c7 e0 08 ret <== NOT EXECUTED 40007210: 81 e8 00 00 restore <== NOT EXECUTED * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 40007214: c4 04 60 14 ld [ %l1 + 0x14 ], %g2 40007218: 03 10 00 65 sethi %hi(0x40019400), %g1 4000721c: e0 04 60 18 ld [ %l1 + 0x18 ], %l0 40007220: d2 00 60 80 ld [ %g1 + 0x80 ], %o1 40007224: a0 24 00 02 sub %l0, %g2, %l0 40007228: 11 00 03 d0 sethi %hi(0xf4000), %o0 4000722c: 40 00 36 7d call 40014c20 <.udiv> 40007230: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 40007234: 92 10 00 08 mov %o0, %o1 40007238: 40 00 36 7a call 40014c20 <.udiv> 4000723c: 90 10 00 10 mov %l0, %o0 40007240: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40007244: 92 10 00 11 mov %l1, %o1 40007248: b0 20 40 08 sub %g1, %o0, %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000724c: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40007250: 11 10 00 64 sethi %hi(0x40019000), %o0 40007254: 40 00 14 18 call 4000c2b4 <_Watchdog_Insert> 40007258: 90 12 23 b4 or %o0, 0x3b4, %o0 ! 400193b4 <_Watchdog_Seconds_chain> } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4000725c: 81 c7 e0 08 ret 40007260: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007264: 03 10 00 1c sethi %hi(0x40007000), %g1 40007268: 82 10 62 9c or %g1, 0x29c, %g1 ! 4000729c <_POSIX_signals_Alarm_TSR> the_watchdog->id = id; the_watchdog->user_data = user_data; 4000726c: b0 10 20 00 clr %i0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007270: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40007274: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 40007278: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000727c: c2 24 60 1c st %g1, [ %l1 + 0x1c ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007280: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40007284: 92 10 00 11 mov %l1, %o1 40007288: 11 10 00 64 sethi %hi(0x40019000), %o0 4000728c: 40 00 14 0a call 4000c2b4 <_Watchdog_Insert> 40007290: 90 12 23 b4 or %o0, 0x3b4, %o0 ! 400193b4 <_Watchdog_Seconds_chain> 40007294: 81 c7 e0 08 ret 40007298: 81 e8 00 00 restore 40023f10 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40023f10: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40023f14: 7f ff ff 0c call 40023b44 40023f18: 01 00 00 00 nop 40023f1c: 80 a2 00 18 cmp %o0, %i0 40023f20: 12 80 00 c6 bne 40024238 40023f24: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 40023f28: 02 80 00 ca be 40024250 40023f2c: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40023f30: 80 a0 e0 1f cmp %g3, 0x1f 40023f34: 18 80 00 c7 bgu 40024250 40023f38: 03 10 00 ab sethi %hi(0x4002ac00), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40023f3c: a1 2e 60 02 sll %i1, 2, %l0 40023f40: a4 10 62 3c or %g1, 0x23c, %l2 40023f44: a3 2e 60 04 sll %i1, 4, %l1 40023f48: 82 24 40 10 sub %l1, %l0, %g1 40023f4c: 82 04 80 01 add %l2, %g1, %g1 40023f50: c4 00 60 08 ld [ %g1 + 8 ], %g2 40023f54: 80 a0 a0 01 cmp %g2, 1 40023f58: 02 80 00 95 be 400241ac 40023f5c: 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 ) ) 40023f60: 80 a6 60 08 cmp %i1, 8 40023f64: 02 80 00 94 be 400241b4 40023f68: 80 a6 60 04 cmp %i1, 4 40023f6c: 02 80 00 92 be 400241b4 40023f70: 80 a6 60 0b cmp %i1, 0xb 40023f74: 02 80 00 90 be 400241b4 40023f78: 82 10 20 01 mov 1, %g1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 40023f7c: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 40023f80: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 40023f84: 80 a6 a0 00 cmp %i2, 0 40023f88: 02 80 00 a3 be 40024214 40023f8c: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 40023f90: c2 06 80 00 ld [ %i2 ], %g1 40023f94: c2 27 bf f4 st %g1, [ %fp + -12 ] 40023f98: 05 10 00 aa sethi %hi(0x4002a800), %g2 40023f9c: c2 00 a0 00 ld [ %g2 ], %g1 40023fa0: 82 00 60 01 inc %g1 40023fa4: c2 20 a0 00 st %g1, [ %g2 ] /* * 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; 40023fa8: 03 10 00 aa sethi %hi(0x4002a800), %g1 40023fac: c8 00 60 c0 ld [ %g1 + 0xc0 ], %g4 ! 4002a8c0 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 40023fb0: c4 01 21 60 ld [ %g4 + 0x160 ], %g2 40023fb4: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 40023fb8: 80 ae 00 01 andncc %i0, %g1, %g0 40023fbc: 12 80 00 69 bne 40024160 40023fc0: 03 10 00 ab sethi %hi(0x4002ac00), %g1 goto process_it; 40023fc4: 98 10 63 c8 or %g1, 0x3c8, %o4 ! 4002afc8 <_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 ; 40023fc8: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 40023fcc: c4 03 00 00 ld [ %o4 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40023fd0: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 40023fd4: 80 a0 80 0d cmp %g2, %o5 40023fd8: 22 80 00 1a be,a 40024040 40023fdc: 98 03 20 0c add %o4, 0xc, %o4 the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40023fe0: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 40023fe4: 88 10 00 02 mov %g2, %g4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40023fe8: 80 8e 00 01 btst %i0, %g1 40023fec: 12 80 00 5d bne 40024160 40023ff0: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 40023ff4: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 40023ff8: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 40023ffc: 22 80 00 0d be,a 40024030 <== NOT EXECUTED 40024000: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40024004: 10 80 00 58 b 40024164 <== NOT EXECUTED 40024008: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4002400c: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40024010: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40024014: 12 80 00 53 bne 40024160 <== NOT EXECUTED 40024018: 88 10 00 02 mov %g2, %g4 <== NOT EXECUTED 4002401c: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 <== NOT EXECUTED 40024020: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 40024024: 12 80 00 50 bne 40024164 <== NOT EXECUTED 40024028: 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 ) { 4002402c: 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 ) ; 40024030: 80 a0 80 0d cmp %g2, %o5 <== NOT EXECUTED 40024034: 32 bf ff f6 bne,a 4002400c <== NOT EXECUTED 40024038: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 4002403c: 98 03 20 0c add %o4, 0xc, %o4 <== NOT EXECUTED */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40024040: 80 a3 00 0b cmp %o4, %o3 40024044: 12 bf ff e2 bne 40023fcc 40024048: 03 10 00 a2 sethi %hi(0x40028800), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4002404c: c4 08 61 64 ldub [ %g1 + 0x164 ], %g2 ! 40028964 40024050: 90 10 20 00 clr %o0 40024054: 03 10 00 a9 sethi %hi(0x4002a400), %g1 40024058: 84 00 a0 01 inc %g2 4002405c: 94 10 63 68 or %g1, 0x368, %o2 * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 40024060: 35 04 00 00 sethi %hi(0x10000000), %i2 40024064: 9e 02 a0 0c add %o2, 0xc, %o7 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 40024068: c2 02 80 00 ld [ %o2 ], %g1 4002406c: 80 a0 60 00 cmp %g1, 0 40024070: 22 80 00 35 be,a 40024144 40024074: 9a 10 00 02 mov %g2, %o5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40024078: 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 ) 4002407c: 80 a0 60 00 cmp %g1, 0 40024080: 22 80 00 31 be,a 40024144 40024084: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED continue; maximum = the_info->maximum; 40024088: d8 10 60 10 lduh [ %g1 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002408c: 80 a3 20 00 cmp %o4, 0 40024090: 02 80 00 5f be 4002420c 40024094: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 40024098: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 4002409c: 83 29 20 02 sll %g4, 2, %g1 400240a0: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 400240a4: 80 a0 e0 00 cmp %g3, 0 400240a8: 02 80 00 23 be 40024134 400240ac: 9a 10 00 02 mov %g2, %o5 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 400240b0: da 00 e0 14 ld [ %g3 + 0x14 ], %o5 400240b4: 80 a3 40 02 cmp %o5, %g2 400240b8: 38 80 00 1f bgu,a 40024134 400240bc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400240c0: c2 00 e1 60 ld [ %g3 + 0x160 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 400240c4: 80 a0 60 00 cmp %g1, 0 400240c8: 22 80 00 1b be,a 40024134 400240cc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED 400240d0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 400240d4: 80 ae 00 01 andncc %i0, %g1, %g0 400240d8: 22 80 00 17 be,a 40024134 400240dc: 9a 10 00 02 mov %g2, %o5 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 400240e0: 80 a3 40 02 cmp %o5, %g2 400240e4: 2a 80 00 0b bcs,a 40024110 400240e8: 88 01 20 01 inc %g4 * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 400240ec: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 <== NOT EXECUTED 400240f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400240f4: 22 80 00 10 be,a 40024134 <== NOT EXECUTED 400240f8: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 400240fc: d2 00 e0 10 ld [ %g3 + 0x10 ], %o1 <== NOT EXECUTED 40024100: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 40024104: 12 80 00 46 bne 4002421c <== NOT EXECUTED 40024108: 80 88 40 1a btst %g1, %i2 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002410c: 88 01 20 01 inc %g4 <== NOT EXECUTED 40024110: 80 a3 00 04 cmp %o4, %g4 40024114: 0a 80 00 0c bcs 40024144 40024118: 90 10 00 03 mov %g3, %o0 the_thread = (Thread_Control *) object_table[ index ]; 4002411c: 83 29 20 02 sll %g4, 2, %g1 40024120: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 40024124: 80 a0 e0 00 cmp %g3, 0 40024128: 12 bf ff e2 bne 400240b0 4002412c: 84 10 00 0d mov %o5, %g2 * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40024130: 9a 10 00 02 mov %g2, %o5 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 40024134: 88 01 20 01 inc %g4 40024138: 80 a3 00 04 cmp %o4, %g4 4002413c: 1a bf ff f9 bcc 40024120 40024140: 83 29 20 02 sll %g4, 2, %g1 40024144: 94 02 a0 04 add %o2, 4, %o2 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 40024148: 80 a2 80 0f cmp %o2, %o7 4002414c: 12 bf ff c7 bne 40024068 40024150: 84 10 00 0d mov %o5, %g2 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 40024154: 80 a2 20 00 cmp %o0, 0 40024158: 02 80 00 0b be 40024184 4002415c: 88 10 00 08 mov %o0, %g4 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40024160: 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 ) ) { 40024164: 90 10 00 04 mov %g4, %o0 40024168: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4002416c: c2 29 20 75 stb %g1, [ %g4 + 0x75 ] /* * Returns TRUE if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 40024170: 40 00 00 54 call 400242c0 <_POSIX_signals_Unblock_thread> 40024174: 94 07 bf ec add %fp, -20, %o2 40024178: 80 8a 20 ff btst 0xff, %o0 4002417c: 12 80 00 09 bne 400241a0 40024180: 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 ); 40024184: 40 00 00 3f call 40024280 <_POSIX_signals_Set_process_signals> 40024188: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4002418c: b4 24 40 10 sub %l1, %l0, %i2 40024190: c2 04 80 1a ld [ %l2 + %i2 ], %g1 40024194: 80 a0 60 02 cmp %g1, 2 40024198: 02 80 00 0d be 400241cc 4002419c: 11 10 00 ab sethi %hi(0x4002ac00), %o0 psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 400241a0: 7f ff a7 da call 4000e108 <_Thread_Enable_dispatch> 400241a4: 01 00 00 00 nop 400241a8: 90 10 20 00 clr %o0 ! 0 return 0; } 400241ac: 81 c7 e0 08 ret 400241b0: 91 e8 00 08 restore %g0, %o0, %o0 * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 400241b4: 40 00 00 d1 call 400244f8 400241b8: 01 00 00 00 nop 400241bc: 40 00 00 92 call 40024404 400241c0: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400241c4: 81 c7 e0 08 ret 400241c8: 91 e8 00 08 restore %g0, %o0, %o0 _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 400241cc: 7f ff a1 b7 call 4000c8a8 <_Chain_Get> 400241d0: 90 12 23 bc or %o0, 0x3bc, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 400241d4: 80 a2 20 00 cmp %o0, 0 400241d8: 02 80 00 24 be 40024268 400241dc: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 400241e0: 92 10 00 08 mov %o0, %o1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 400241e4: c2 22 20 08 st %g1, [ %o0 + 8 ] 400241e8: c4 07 bf f0 ld [ %fp + -16 ], %g2 400241ec: c4 22 20 0c st %g2, [ %o0 + 0xc ] 400241f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400241f4: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 400241f8: 11 10 00 ac sethi %hi(0x4002b000), %o0 400241fc: 90 12 20 0c or %o0, 0xc, %o0 ! 4002b00c <_POSIX_signals_Siginfo> 40024200: 7f ff a1 9e call 4000c878 <_Chain_Append> 40024204: 90 02 00 1a add %o0, %i2, %o0 40024208: 30 bf ff e6 b,a 400241a0 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002420c: 10 bf ff ce b 40024144 40024210: 9a 10 00 02 mov %g2, %o5 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 40024214: 10 bf ff 61 b 40023f98 40024218: c0 27 bf f4 clr [ %fp + -12 ] * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 4002421c: 32 bf ff c6 bne,a 40024134 <== NOT EXECUTED 40024220: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40024224: 80 8a 40 1a btst %o1, %i2 <== NOT EXECUTED 40024228: 32 bf ff ba bne,a 40024110 <== NOT EXECUTED 4002422c: 88 01 20 01 inc %g4 <== NOT EXECUTED 40024230: 10 bf ff c1 b 40024134 <== NOT EXECUTED 40024234: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 40024238: 7f ff d0 51 call 4001837c <__errno> 4002423c: 01 00 00 00 nop 40024240: 82 10 20 03 mov 3, %g1 ! 3 40024244: c2 22 00 00 st %g1, [ %o0 ] 40024248: 10 bf ff d9 b 400241ac 4002424c: 90 10 3f ff mov -1, %o0 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40024250: 7f ff d0 4b call 4001837c <__errno> 40024254: 01 00 00 00 nop 40024258: 82 10 20 16 mov 0x16, %g1 ! 16 4002425c: c2 22 00 00 st %g1, [ %o0 ] 40024260: 10 bf ff d3 b 400241ac 40024264: 90 10 3f ff mov -1, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 40024268: 7f ff d0 45 call 4001837c <__errno> <== NOT EXECUTED 4002426c: 01 00 00 00 nop <== NOT EXECUTED 40024270: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 40024274: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024278: 10 bf ff cd b 400241ac <== NOT EXECUTED 4002427c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40009d98 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 40009d98: 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 ) ) { 40009d9c: 90 10 00 1c mov %i4, %o0 40009da0: 40 00 00 4c call 40009ed0 <_POSIX_Absolute_timeout_to_ticks> 40009da4: 92 07 bf f4 add %fp, -12, %o1 40009da8: 80 a2 20 02 cmp %o0, 2 40009dac: 18 80 00 03 bgu 40009db8 40009db0: 98 10 20 01 mov 1, %o4 40009db4: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 40009db8: da 07 bf f4 ld [ %fp + -12 ], %o5 40009dbc: 90 10 00 18 mov %i0, %o0 40009dc0: 92 10 00 19 mov %i1, %o1 40009dc4: 94 10 00 1a mov %i2, %o2 40009dc8: 7f ff ff 21 call 40009a4c <_POSIX_Message_queue_Receive_support> 40009dcc: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 40009dd0: 81 c7 e0 08 ret 40009dd4: 91 e8 00 08 restore %g0, %o0, %o0 40009dd8 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 40009dd8: 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 ) ) { 40009ddc: 90 10 00 1c mov %i4, %o0 40009de0: 40 00 00 3c call 40009ed0 <_POSIX_Absolute_timeout_to_ticks> 40009de4: 92 07 bf f4 add %fp, -12, %o1 40009de8: 80 a2 20 02 cmp %o0, 2 40009dec: 18 80 00 03 bgu 40009df8 40009df0: 98 10 20 01 mov 1, %o4 40009df4: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 40009df8: da 07 bf f4 ld [ %fp + -12 ], %o5 40009dfc: 90 10 00 18 mov %i0, %o0 40009e00: 92 10 00 19 mov %i1, %o1 40009e04: 94 10 00 1a mov %i2, %o2 40009e08: 7f ff ff 65 call 40009b9c <_POSIX_Message_queue_Send_support> 40009e0c: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 40009e10: 81 c7 e0 08 ret 40009e14: 91 e8 00 08 restore %g0, %o0, %o0 40005404 : */ void pthread_cleanup_pop( int execute ) { 40005404: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005408: 09 10 00 5b sethi %hi(0x40016c00), %g4 POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4000540c: 05 10 00 5b sethi %hi(0x40016c00), %g2 40005410: c2 01 21 d0 ld [ %g4 + 0x1d0 ], %g1 40005414: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 40005418: 82 00 60 01 inc %g1 4000541c: e0 00 e1 60 ld [ %g3 + 0x160 ], %l0 40005420: c2 21 21 d0 st %g1, [ %g4 + 0x1d0 ] */ void pthread_cleanup_pop( int execute ) { 40005424: a4 10 00 18 mov %i0, %l2 * ensure that we do not get prempted and deleted while we are holding * memory that needs to be freed. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40005428: 7f ff f3 cc call 40002358 4000542c: 01 00 00 00 nop 40005430: b0 10 00 08 mov %o0, %i0 if ( _Chain_Is_empty( handler_stack ) ) { 40005434: c2 04 20 d8 ld [ %l0 + 0xd8 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40005438: a0 04 20 dc add %l0, 0xdc, %l0 4000543c: 80 a0 40 10 cmp %g1, %l0 40005440: 02 80 00 18 be 400054a0 40005444: 01 00 00 00 nop _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 40005448: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000544c: c4 04 00 00 ld [ %l0 ], %g2 previous = the_node->previous; 40005450: c2 04 20 04 ld [ %l0 + 4 ], %g1 next->previous = previous; previous->next = next; 40005454: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40005458: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000545c: 7f ff f3 c3 call 40002368 40005460: 01 00 00 00 nop tmp_handler = *handler; _Workspace_Free( handler ); 40005464: 90 10 00 10 mov %l0, %o0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); tmp_handler = *handler; 40005468: e2 04 20 0c ld [ %l0 + 0xc ], %l1 _Workspace_Free( handler ); 4000546c: 40 00 13 ce call 4000a3a4 <_Workspace_Free> 40005470: e0 04 20 08 ld [ %l0 + 8 ], %l0 _Thread_Enable_dispatch(); 40005474: 40 00 0e 42 call 40008d7c <_Thread_Enable_dispatch> 40005478: 01 00 00 00 nop if ( execute ) 4000547c: 80 a4 a0 00 cmp %l2, 0 40005480: 12 80 00 04 bne 40005490 40005484: 01 00 00 00 nop 40005488: 81 c7 e0 08 ret <== NOT EXECUTED 4000548c: 81 e8 00 00 restore <== NOT EXECUTED (*tmp_handler.routine)( tmp_handler.arg ); 40005490: 9f c4 00 00 call %l0 40005494: 90 10 00 11 mov %l1, %o0 40005498: 81 c7 e0 08 ret 4000549c: 81 e8 00 00 restore _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 400054a0: 40 00 0e 37 call 40008d7c <_Thread_Enable_dispatch> 400054a4: 01 00 00 00 nop _ISR_Enable( level ); 400054a8: 7f ff f3 b0 call 40002368 400054ac: 81 e8 00 00 restore 400054b0: 01 00 00 00 nop 400064fc : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 400064fc: 9d e3 bf 60 save %sp, -160, %sp 40006500: aa 10 00 18 mov %i0, %l5 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 40006504: 80 a6 a0 00 cmp %i2, 0 40006508: 02 80 00 6f be 400066c4 4000650c: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40006510: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006514: 80 a6 60 00 cmp %i1, 0 40006518: 02 80 00 03 be 40006524 4000651c: a2 10 61 78 or %g1, 0x178, %l1 40006520: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 40006524: c2 04 40 00 ld [ %l1 ], %g1 40006528: 80 a0 60 00 cmp %g1, 0 4000652c: 22 80 00 66 be,a 400066c4 40006530: 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) ) 40006534: c2 04 60 04 ld [ %l1 + 4 ], %g1 40006538: 80 a0 60 00 cmp %g1, 0 4000653c: 02 80 00 07 be 40006558 40006540: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40006544: c4 04 60 08 ld [ %l1 + 8 ], %g2 40006548: c6 00 61 90 ld [ %g1 + 0x190 ], %g3 4000654c: 80 a0 80 03 cmp %g2, %g3 40006550: 2a 80 00 5d bcs,a 400066c4 40006554: 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 ) { 40006558: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 4000655c: 80 a0 60 01 cmp %g1, 1 40006560: 02 80 00 5b be 400066cc 40006564: 80 a0 60 02 cmp %g1, 2 40006568: 22 80 00 04 be,a 40006578 4000656c: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 40006570: 81 c7 e0 08 ret 40006574: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 40006578: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 4000657c: c4 27 bf e0 st %g2, [ %fp + -32 ] 40006580: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 40006584: c2 27 bf e4 st %g1, [ %fp + -28 ] 40006588: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000658c: c4 27 bf e8 st %g2, [ %fp + -24 ] 40006590: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 40006594: c2 27 bf ec st %g1, [ %fp + -20 ] 40006598: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 4000659c: c4 27 bf f0 st %g2, [ %fp + -16 ] 400065a0: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 400065a4: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 400065a8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400065ac: 80 a0 60 00 cmp %g1, 0 400065b0: 12 80 00 45 bne 400066c4 400065b4: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 400065b8: e8 07 bf e0 ld [ %fp + -32 ], %l4 400065bc: 82 05 3f ff add %l4, -1, %g1 400065c0: 80 a0 60 fd cmp %g1, 0xfd 400065c4: 18 bf ff eb bgu 40006570 400065c8: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400065cc: 02 80 00 54 be 4000671c 400065d0: a6 10 20 00 clr %l3 400065d4: 04 80 00 7c ble 400067c4 400065d8: 80 a6 60 02 cmp %i1, 2 400065dc: 02 80 00 4d be 40006710 400065e0: 80 a6 60 03 cmp %i1, 3 400065e4: 32 80 00 38 bne,a 400066c4 400065e8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 400065ec: 40 00 11 ab call 4000ac98 <_Timespec_To_ticks> 400065f0: 90 07 bf e8 add %fp, -24, %o0 400065f4: a0 10 00 08 mov %o0, %l0 400065f8: 40 00 11 a8 call 4000ac98 <_Timespec_To_ticks> 400065fc: 90 07 bf f0 add %fp, -16, %o0 40006600: 80 a4 00 08 cmp %l0, %o0 40006604: 0a 80 00 30 bcs 400066c4 40006608: b0 10 20 16 mov 0x16, %i0 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 4000660c: c2 07 bf e4 ld [ %fp + -28 ], %g1 40006610: 82 00 7f ff add %g1, -1, %g1 40006614: 80 a0 60 fd cmp %g1, 0xfd 40006618: 18 80 00 2b bgu 400066c4 4000661c: a6 10 20 03 mov 3, %l3 40006620: 03 10 00 1a sethi %hi(0x40006800), %g1 40006624: a0 10 63 84 or %g1, 0x384, %l0 ! 40006b84 <_POSIX_Threads_Sporadic_budget_callout> #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 40006628: 2d 10 00 76 sethi %hi(0x4001d800), %l6 4000662c: d0 05 a3 68 ld [ %l6 + 0x368 ], %o0 ! 4001db68 <_RTEMS_Allocator_Mutex> 40006630: 40 00 07 56 call 40008388 <_API_Mutex_Lock> 40006634: 31 10 00 77 sethi %hi(0x4001dc00), %i0 * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 40006638: 40 00 09 e1 call 40008dbc <_Objects_Allocate> 4000663c: 90 16 21 40 or %i0, 0x140, %o0 ! 4001dd40 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 40006640: a4 92 20 00 orcc %o0, 0, %l2 40006644: 02 80 00 1d be 400066b8 40006648: 03 10 00 73 sethi %hi(0x4001cc00), %g1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 4000664c: c6 04 60 08 ld [ %l1 + 8 ], %g3 40006650: c4 00 61 90 ld [ %g1 + 0x190 ], %g2 40006654: c0 27 bf dc clr [ %fp + -36 ] 40006658: 97 28 a0 01 sll %g2, 1, %o3 4000665c: 80 a2 c0 03 cmp %o3, %g3 40006660: 1a 80 00 03 bcc 4000666c 40006664: d4 04 60 04 ld [ %l1 + 4 ], %o2 40006668: 96 10 00 03 mov %g3, %o3 4000666c: 82 07 bf dc add %fp, -36, %g1 40006670: e6 23 a0 60 st %l3, [ %sp + 0x60 ] 40006674: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 40006678: c0 23 a0 68 clr [ %sp + 0x68 ] 4000667c: 9a 10 20 ff mov 0xff, %o5 40006680: a6 10 20 01 mov 1, %l3 40006684: 9a 23 40 14 sub %o5, %l4, %o5 40006688: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 4000668c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40006690: 90 16 21 40 or %i0, 0x140, %o0 40006694: 92 10 00 12 mov %l2, %o1 40006698: 40 00 0d ba call 40009d80 <_Thread_Initialize> 4000669c: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 400066a0: 80 8a 20 ff btst 0xff, %o0 400066a4: 12 80 00 20 bne 40006724 400066a8: 11 10 00 77 sethi %hi(0x4001dc00), %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 400066ac: 92 10 00 12 mov %l2, %o1 400066b0: 40 00 0a be call 400091a8 <_Objects_Free> 400066b4: 90 12 21 40 or %o0, 0x140, %o0 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400066b8: d0 05 a3 68 ld [ %l6 + 0x368 ], %o0 400066bc: 40 00 07 49 call 400083e0 <_API_Mutex_Unlock> 400066c0: b0 10 20 0b mov 0xb, %i0 400066c4: 81 c7 e0 08 ret 400066c8: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400066cc: 03 10 00 76 sethi %hi(0x4001d800), %g1 400066d0: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 4001db70 <_Thread_Executing> 400066d4: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 400066d8: c8 00 e0 80 ld [ %g3 + 0x80 ], %g4 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 400066dc: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 400066e0: c8 27 bf e0 st %g4, [ %fp + -32 ] 400066e4: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 400066e8: c2 27 bf e4 st %g1, [ %fp + -28 ] 400066ec: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 400066f0: c4 27 bf e8 st %g2, [ %fp + -24 ] 400066f4: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 400066f8: c2 27 bf ec st %g1, [ %fp + -20 ] 400066fc: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40006700: c4 27 bf f0 st %g2, [ %fp + -16 ] 40006704: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 40006708: 10 bf ff a8 b 400065a8 4000670c: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 40006710: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 40006714: 10 bf ff c5 b 40006628 <== NOT EXECUTED 40006718: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000671c: 10 bf ff c3 b 40006628 40006720: a0 10 20 00 clr %l0 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40006724: e0 04 a1 60 ld [ %l2 + 0x160 ], %l0 api->Attributes = *the_attr; 40006728: 92 10 00 11 mov %l1, %o1 4000672c: 94 10 20 38 mov 0x38, %o2 40006730: 40 00 25 d4 call 4000fe80 40006734: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 40006738: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 4000673c: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 40006740: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006744: c2 07 bf e0 ld [ %fp + -32 ], %g1 * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 40006748: e6 2c a0 75 stb %l3, [ %l2 + 0x75 ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000674c: c2 24 20 80 st %g1, [ %l0 + 0x80 ] 40006750: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006754: 94 10 00 1a mov %i2, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006758: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 4000675c: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006760: 96 10 00 1b mov %i3, %o3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006764: c2 24 20 88 st %g1, [ %l0 + 0x88 ] 40006768: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 4000676c: 90 10 00 12 mov %l2, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006770: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40006774: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006778: 92 10 20 01 mov 1, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000677c: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 40006780: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006784: 98 10 20 00 clr %o4 40006788: 40 00 10 86 call 4000a9a0 <_Thread_Start> 4000678c: c2 24 20 94 st %g1, [ %l0 + 0x94 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 40006790: 80 a6 60 03 cmp %i1, 3 40006794: 02 80 00 19 be 400067f8 40006798: a2 10 00 08 mov %o0, %l1 * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 4000679c: 80 8c 60 ff btst 0xff, %l1 400067a0: 12 80 00 0f bne 400067dc 400067a4: 90 16 21 40 or %i0, 0x140, %o0 400067a8: 40 00 0a 80 call 400091a8 <_Objects_Free> <== NOT EXECUTED 400067ac: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400067b0: d0 05 a3 68 ld [ %l6 + 0x368 ], %o0 <== NOT EXECUTED 400067b4: 40 00 07 0b call 400083e0 <_API_Mutex_Unlock> <== NOT EXECUTED 400067b8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 400067bc: 81 c7 e0 08 ret <== NOT EXECUTED 400067c0: 81 e8 00 00 restore <== NOT EXECUTED */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400067c4: 80 a6 60 00 cmp %i1, 0 400067c8: a6 10 20 01 mov 1, %l3 400067cc: 02 bf ff 97 be 40006628 400067d0: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 400067d4: 81 c7 e0 08 ret 400067d8: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400067dc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 _RTEMS_Unlock_allocator(); 400067e0: d0 05 a3 68 ld [ %l6 + 0x368 ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400067e4: c2 25 40 00 st %g1, [ %l5 ] _RTEMS_Unlock_allocator(); 400067e8: 40 00 06 fe call 400083e0 <_API_Mutex_Unlock> 400067ec: b0 10 20 00 clr %i0 400067f0: 81 c7 e0 08 ret 400067f4: 81 e8 00 00 restore arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 400067f8: 40 00 11 28 call 4000ac98 <_Timespec_To_ticks> 400067fc: 90 04 20 88 add %l0, 0x88, %o0 40006800: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006804: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006808: 11 10 00 76 sethi %hi(0x4001d800), %o0 4000680c: 40 00 12 38 call 4000b0ec <_Watchdog_Insert> 40006810: 90 12 23 90 or %o0, 0x390, %o0 ! 4001db90 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 40006814: 10 bf ff e3 b 400067a0 40006818: 80 8c 60 ff btst 0xff, %l1 40005450 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40005450: 9d e3 bf 98 save %sp, -104, %sp 40005454: 05 10 00 57 sethi %hi(0x40015c00), %g2 40005458: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 ! 40015fe0 <_Thread_Dispatch_disable_level> 4000545c: 82 00 60 01 inc %g1 40005460: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 40005464: 29 10 00 59 sethi %hi(0x40016400), %l4 40005468: 40 00 09 d4 call 40007bb8 <_Objects_Allocate> 4000546c: 90 15 20 34 or %l4, 0x34, %o0 ! 40016434 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 40005470: a4 92 20 00 orcc %o0, 0, %l2 40005474: 02 80 00 2b be 40005520 40005478: 03 10 00 57 sethi %hi(0x40015c00), %g1 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 4000547c: f2 24 a0 14 st %i1, [ %l2 + 0x14 ] 40005480: a2 10 00 12 mov %l2, %l1 40005484: a6 10 63 40 or %g1, 0x340, %l3 40005488: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 4000548c: 83 2e 60 02 sll %i1, 2, %g1 40005490: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 40005494: 80 a0 60 00 cmp %g1, 0 40005498: 22 80 00 0e be,a 400054d0 4000549c: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 400054a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 400054a4: c2 10 a0 10 lduh [ %g2 + 0x10 ], %g1 400054a8: 82 00 60 01 inc %g1 400054ac: a1 28 60 02 sll %g1, 2, %l0 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 400054b0: 40 00 13 24 call 4000a140 <_Workspace_Allocate> 400054b4: 90 10 00 10 mov %l0, %o0 if ( !table ) { 400054b8: 82 92 20 00 orcc %o0, 0, %g1 400054bc: 02 80 00 1d be 40005530 400054c0: 94 10 00 10 mov %l0, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 400054c4: c2 24 60 1c st %g1, [ %l1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 400054c8: 40 00 26 c5 call 4000efdc 400054cc: 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++ ) { 400054d0: 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; 400054d4: 80 a6 60 05 cmp %i1, 5 400054d8: 12 bf ff ed bne 4000548c 400054dc: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400054e0: c4 04 a0 08 ld [ %l2 + 8 ], %g2 400054e4: 82 15 20 34 or %l4, 0x34, %g1 400054e8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400054ec: 03 00 00 3f sethi %hi(0xfc00), %g1 400054f0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400054f4: 82 08 80 01 and %g2, %g1, %g1 400054f8: 83 28 60 02 sll %g1, 2, %g1 400054fc: e4 20 c0 01 st %l2, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 40005500: c0 24 a0 0c clr [ %l2 + 0xc ] } } the_key->is_active = TRUE; 40005504: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40005508: c4 26 00 00 st %g2, [ %i0 ] } } the_key->is_active = TRUE; 4000550c: c2 2c a0 10 stb %g1, [ %l2 + 0x10 ] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); 40005510: 40 00 0d 4b call 40008a3c <_Thread_Enable_dispatch> 40005514: b0 10 20 00 clr %i0 return 0; } 40005518: 81 c7 e0 08 ret 4000551c: 81 e8 00 00 restore _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 40005520: 40 00 0d 47 call 40008a3c <_Thread_Enable_dispatch> 40005524: b0 10 20 0b mov 0xb, %i0 40005528: 81 c7 e0 08 ret 4000552c: 81 e8 00 00 restore bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 40005530: a0 86 7f ff addcc %i1, -1, %l0 40005534: 02 80 00 0a be 4000555c 40005538: 82 06 60 05 add %i1, 5, %g1 4000553c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40005540: b2 04 80 01 add %l2, %g1, %i1 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 40005544: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 40005548: 40 00 12 f7 call 4000a124 <_Workspace_Free> <== NOT EXECUTED 4000554c: b2 06 7f fc add %i1, -4, %i1 <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 40005550: a0 84 3f ff addcc %l0, -1, %l0 <== NOT EXECUTED 40005554: 32 bf ff fd bne,a 40005548 <== NOT EXECUTED 40005558: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 4000555c: 90 15 20 34 or %l4, 0x34, %o0 40005560: 92 10 00 12 mov %l2, %o1 40005564: 40 00 0a 90 call 40007fa4 <_Objects_Free> 40005568: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 4000556c: 40 00 0d 34 call 40008a3c <_Thread_Enable_dispatch> 40005570: 01 00 00 00 nop 40005574: 81 c7 e0 08 ret 40005578: 81 e8 00 00 restore 4000557c : */ int pthread_key_delete( pthread_key_t key ) { 4000557c: 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 *) 40005580: 23 10 00 59 sethi %hi(0x40016400), %l1 40005584: 92 10 00 18 mov %i0, %o1 40005588: 94 07 bf f4 add %fp, -12, %o2 4000558c: 40 00 0a f3 call 40008158 <_Objects_Get> 40005590: 90 14 60 34 or %l1, 0x34, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005594: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005598: a0 10 00 08 mov %o0, %l0 4000559c: 80 a0 60 00 cmp %g1, 0 400055a0: 12 80 00 23 bne 4000562c 400055a4: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 400055a8: 90 14 60 34 or %l1, 0x34, %o0 400055ac: 40 00 09 af call 40007c68 <_Objects_Close> 400055b0: 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 ] ) 400055b4: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 400055b8: 80 a2 20 00 cmp %o0, 0 400055bc: 02 80 00 04 be 400055cc 400055c0: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 400055c4: 40 00 12 d8 call 4000a124 <_Workspace_Free> 400055c8: 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 ] ) 400055cc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 400055d0: 80 a2 20 00 cmp %o0, 0 400055d4: 22 80 00 05 be,a 400055e8 400055d8: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400055dc: 40 00 12 d2 call 4000a124 <_Workspace_Free> 400055e0: 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 ] ) 400055e4: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 400055e8: 80 a2 20 00 cmp %o0, 0 400055ec: 22 80 00 05 be,a 40005600 400055f0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400055f4: 40 00 12 cc call 4000a124 <_Workspace_Free> 400055f8: 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 ] ) 400055fc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40005600: 80 a2 20 00 cmp %o0, 0 40005604: 22 80 00 05 be,a 40005618 40005608: 90 14 60 34 or %l1, 0x34, %o0 _Workspace_Free( the_key->Values[ the_api ] ); 4000560c: 40 00 12 c6 call 4000a124 <_Workspace_Free> <== NOT EXECUTED 40005610: 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 ); 40005614: 90 14 60 34 or %l1, 0x34, %o0 <== NOT EXECUTED 40005618: 92 10 00 10 mov %l0, %o1 4000561c: 40 00 0a 62 call 40007fa4 <_Objects_Free> 40005620: 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(); 40005624: 40 00 0d 06 call 40008a3c <_Thread_Enable_dispatch> 40005628: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 4000562c: 81 c7 e0 08 ret 40005630: 81 e8 00 00 restore 40024404 : int pthread_kill( pthread_t thread, int sig ) { 40024404: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 40024408: 80 a6 60 00 cmp %i1, 0 4002440c: 02 80 00 2f be 400244c8 40024410: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40024414: a0 06 7f ff add %i1, -1, %l0 40024418: 80 a4 20 1f cmp %l0, 0x1f 4002441c: 18 80 00 2b bgu 400244c8 40024420: 11 10 00 aa sethi %hi(0x4002a800), %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40024424: 94 07 bf f4 add %fp, -12, %o2 40024428: 7f ff a4 b9 call 4000d70c <_Objects_Get> 4002442c: 90 12 22 d0 or %o0, 0x2d0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40024430: c2 07 bf f4 ld [ %fp + -12 ], %g1 40024434: 80 a0 60 00 cmp %g1, 0 40024438: 12 80 00 2a bne 400244e0 4002443c: 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 ) { 40024440: 87 2e 60 02 sll %i1, 2, %g3 40024444: 85 2e 60 04 sll %i1, 4, %g2 40024448: 03 10 00 ab sethi %hi(0x4002ac00), %g1 4002444c: 84 20 80 03 sub %g2, %g3, %g2 40024450: 82 10 62 3c or %g1, 0x23c, %g1 40024454: 82 00 40 02 add %g1, %g2, %g1 40024458: c6 00 60 08 ld [ %g1 + 8 ], %g3 4002445c: 80 a0 e0 01 cmp %g3, 1 40024460: 02 80 00 14 be 400244b0 40024464: c8 02 21 60 ld [ %o0 + 0x160 ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40024468: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002446c: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40024470: b2 10 20 01 mov 1, %i1 40024474: 83 2e 40 10 sll %i1, %l0, %g1 40024478: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002447c: 94 10 20 00 clr %o2 40024480: 7f ff ff 90 call 400242c0 <_POSIX_signals_Unblock_thread> 40024484: c4 21 20 c8 st %g2, [ %g4 + 0xc8 ] the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40024488: 03 10 00 aa sethi %hi(0x4002a800), %g1 4002448c: c4 00 60 9c ld [ %g1 + 0x9c ], %g2 ! 4002a89c <_ISR_Nest_level> 40024490: 80 a0 a0 00 cmp %g2, 0 40024494: 02 80 00 07 be 400244b0 40024498: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 4002449c: 03 10 00 aa sethi %hi(0x4002a800), %g1 400244a0: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 4002a8c0 <_Thread_Executing> 400244a4: 80 a6 00 02 cmp %i0, %g2 400244a8: 02 80 00 06 be 400244c0 400244ac: 03 10 00 aa sethi %hi(0x4002a800), %g1 _ISR_Signals_to_thread_executing = TRUE; } _Thread_Enable_dispatch(); 400244b0: 7f ff a7 16 call 4000e108 <_Thread_Enable_dispatch> 400244b4: b0 10 20 00 clr %i0 400244b8: 81 c7 e0 08 ret 400244bc: 81 e8 00 00 restore (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; 400244c0: 10 bf ff fc b 400244b0 <== NOT EXECUTED 400244c4: f2 28 61 58 stb %i1, [ %g1 + 0x158 ] <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 400244c8: 7f ff cf ad call 4001837c <__errno> 400244cc: b0 10 3f ff mov -1, %i0 400244d0: 82 10 20 16 mov 0x16, %g1 400244d4: c2 22 00 00 st %g1, [ %o0 ] 400244d8: 81 c7 e0 08 ret 400244dc: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 400244e0: 7f ff cf a7 call 4001837c <__errno> 400244e4: b0 10 3f ff mov -1, %i0 400244e8: 82 10 20 03 mov 3, %g1 400244ec: c2 22 00 00 st %g1, [ %o0 ] } 400244f0: 81 c7 e0 08 ret 400244f4: 81 e8 00 00 restore 400072c4 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 400072c4: 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; 400072c8: 03 10 00 5d sethi %hi(0x40017400), %g1 400072cc: 80 a6 60 00 cmp %i1, 0 400072d0: 02 80 00 03 be 400072dc 400072d4: a0 10 61 9c or %g1, 0x19c, %l0 400072d8: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 400072dc: 80 a6 20 00 cmp %i0, 0 400072e0: 02 80 00 17 be 4000733c 400072e4: 01 00 00 00 nop break; } } #endif if ( !the_attr->is_initialized ) 400072e8: c2 04 00 00 ld [ %l0 ], %g1 400072ec: 80 a0 60 00 cmp %g1, 0 400072f0: 02 80 00 13 be 4000733c 400072f4: 01 00 00 00 nop /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 400072f8: c2 04 20 04 ld [ %l0 + 4 ], %g1 400072fc: 80 a0 60 00 cmp %g1, 0 40007300: 12 80 00 4d bne 40007434 40007304: 11 10 00 5d sethi %hi(0x40017400), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40007308: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000730c: 80 a0 60 01 cmp %g1, 1 40007310: 02 80 00 37 be 400073ec 40007314: 80 a0 60 02 cmp %g1, 2 40007318: 02 80 00 3c be 40007408 4000731c: 80 a0 60 00 cmp %g1, 0 40007320: 12 80 00 07 bne 4000733c 40007324: a2 10 20 00 clr %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 40007328: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000732c: 82 00 7f ff add %g1, -1, %g1 40007330: 80 a0 60 fd cmp %g1, 0xfd 40007334: 08 80 00 04 bleu 40007344 40007338: 05 10 00 64 sethi %hi(0x40019000), %g2 *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 4000733c: 81 c7 e0 08 ret 40007340: 91 e8 20 16 restore %g0, 0x16, %o0 40007344: c2 00 a0 e0 ld [ %g2 + 0xe0 ], %g1 40007348: 82 00 60 01 inc %g1 4000734c: c2 20 a0 e0 st %g1, [ %g2 + 0xe0 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 40007350: 25 10 00 65 sethi %hi(0x40019400), %l2 40007354: 40 00 0a 8e call 40009d8c <_Objects_Allocate> 40007358: 90 14 a0 b0 or %l2, 0xb0, %o0 ! 400194b0 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 4000735c: b2 92 20 00 orcc %o0, 0, %i1 40007360: 02 80 00 31 be 40007424 40007364: 01 00 00 00 nop _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 40007368: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000736c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 40007370: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40007374: 80 a0 a0 00 cmp %g2, 0 40007378: 32 80 00 04 bne,a 40007388 4000737c: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 40007380: 82 10 20 01 mov 1, %g1 40007384: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 40007388: c6 04 20 08 ld [ %l0 + 8 ], %g3 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 4000738c: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 40007390: 82 10 20 ff mov 0xff, %g1 40007394: 82 20 40 03 sub %g1, %g3, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 40007398: 92 06 60 54 add %i1, 0x54, %o1 4000739c: 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; 400073a0: c4 2e 60 58 stb %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 400073a4: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 400073a8: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 400073ac: 40 00 08 36 call 40009484 <_CORE_mutex_Initialize> 400073b0: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400073b4: c4 06 60 08 ld [ %i1 + 8 ], %g2 400073b8: 82 14 a0 b0 or %l2, 0xb0, %g1 400073bc: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400073c0: 03 00 00 3f sethi %hi(0xfc00), %g1 400073c4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400073c8: 82 08 80 01 and %g2, %g1, %g1 400073cc: 83 28 60 02 sll %g1, 2, %g1 400073d0: f2 20 c0 01 st %i1, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 400073d4: 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; 400073d8: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 400073dc: 40 00 0e 0d call 4000ac10 <_Thread_Enable_dispatch> 400073e0: b0 10 20 00 clr %i0 400073e4: 81 c7 e0 08 ret 400073e8: 81 e8 00 00 restore break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 400073ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 400073f0: 82 00 7f ff add %g1, -1, %g1 400073f4: 80 a0 60 fd cmp %g1, 0xfd 400073f8: 18 bf ff d1 bgu 4000733c 400073fc: a2 10 20 02 mov 2, %l1 40007400: 10 bf ff d1 b 40007344 40007404: 05 10 00 64 sethi %hi(0x40019000), %g2 40007408: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000740c: 82 00 7f ff add %g1, -1, %g1 40007410: 80 a0 60 fd cmp %g1, 0xfd 40007414: 18 bf ff ca bgu 4000733c 40007418: a2 10 20 03 mov 3, %l1 4000741c: 10 bf ff ca b 40007344 40007420: 05 10 00 64 sethi %hi(0x40019000), %g2 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 40007424: 40 00 0d fb call 4000ac10 <_Thread_Enable_dispatch> 40007428: b0 10 20 0b mov 0xb, %i0 4000742c: 81 c7 e0 08 ret 40007430: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40007434: 15 10 00 5d sethi %hi(0x40017400), %o2 <== NOT EXECUTED 40007438: 17 10 00 5d sethi %hi(0x40017400), %o3 <== NOT EXECUTED 4000743c: 90 12 21 b0 or %o0, 0x1b0, %o0 <== NOT EXECUTED 40007440: 94 12 a2 30 or %o2, 0x230, %o2 <== NOT EXECUTED 40007444: 96 12 e1 f8 or %o3, 0x1f8, %o3 <== NOT EXECUTED 40007448: 7f ff f2 a4 call 40003ed8 <__assert_func> <== NOT EXECUTED 4000744c: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED 40007450: 01 00 00 00 nop 400074c4 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 400074c4: 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 ) 400074c8: 80 a6 a0 00 cmp %i2, 0 400074cc: 02 80 00 06 be 400074e4 400074d0: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 400074d4: 82 06 7f ff add %i1, -1, %g1 400074d8: 80 a0 60 fd cmp %g1, 0xfd 400074dc: 08 80 00 04 bleu 400074ec 400074e0: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 400074e4: 81 c7 e0 08 ret 400074e8: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 400074ec: 7f ff ff da call 40007454 400074f0: 90 10 00 18 mov %i0, %o0 if ( status ) 400074f4: b0 92 20 00 orcc %o0, 0, %i0 400074f8: 12 80 00 14 bne 40007548 400074fc: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 40007500: 7f ff ff 46 call 40007218 <_POSIX_Mutex_Get> 40007504: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40007508: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000750c: 80 a0 60 00 cmp %g1, 0 40007510: 32 80 00 0e bne,a 40007548 40007514: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40007518: 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( 4000751c: 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( 40007520: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40007524: 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( 40007528: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 4000752c: 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( 40007530: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40007534: 94 10 20 00 clr %o2 40007538: 40 00 08 5e call 400096b0 <_CORE_mutex_Surrender> 4000753c: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 40007540: 40 00 0d b4 call 4000ac10 <_Thread_Enable_dispatch> 40007544: 01 00 00 00 nop 40007548: 81 c7 e0 08 ret 4000754c: 81 e8 00 00 restore 40007550 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 40007550: 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 ); 40007554: 90 10 00 19 mov %i1, %o0 40007558: 40 00 00 2f call 40007614 <_POSIX_Absolute_timeout_to_ticks> 4000755c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40007560: 80 a2 20 02 cmp %o0, 2 40007564: 08 80 00 05 bleu 40007578 40007568: d4 07 bf f4 ld [ %fp + -12 ], %o2 4000756c: 80 a2 20 03 cmp %o0, 3 40007570: 02 80 00 07 be 4000758c 40007574: 90 10 00 18 mov %i0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40007578: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000757c: 7f ff ff bc call 4000746c <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 40007580: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40007584: 81 c7 e0 08 ret <== NOT EXECUTED 40007588: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 4000758c: 7f ff ff b8 call 4000746c <_POSIX_Mutex_Lock_support> 40007590: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40007594: 81 c7 e0 08 ret 40007598: 91 e8 00 08 restore %g0, %o0, %o0 40006c58 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 40006c58: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 40006c5c: a0 96 20 00 orcc %i0, 0, %l0 40006c60: 02 80 00 0a be 40006c88 40006c64: 80 a6 60 00 cmp %i1, 0 40006c68: 02 80 00 08 be 40006c88 40006c6c: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 40006c70: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006c74: 80 a0 60 00 cmp %g1, 0 40006c78: 02 80 00 06 be 40006c90 40006c7c: b0 10 20 00 clr %i0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 40006c80: 81 c7 e0 08 ret 40006c84: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 40006c88: 81 c7 e0 08 ret 40006c8c: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 40006c90: b0 07 bf f4 add %fp, -12, %i0 40006c94: 90 10 21 00 mov 0x100, %o0 40006c98: 92 10 21 00 mov 0x100, %o1 40006c9c: 40 00 03 ba call 40007b84 40006ca0: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 40006ca4: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006ca8: 80 a0 60 00 cmp %g1, 0 40006cac: 02 80 00 09 be 40006cd0 40006cb0: 82 10 20 01 mov 1, %g1 once_control->is_initialized = TRUE; once_control->init_executed = TRUE; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 40006cb4: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40006cb8: 94 10 00 18 mov %i0, %o2 40006cbc: 92 10 21 00 mov 0x100, %o1 40006cc0: 40 00 03 b1 call 40007b84 40006cc4: b0 10 20 00 clr %i0 } return 0; } 40006cc8: 81 c7 e0 08 ret 40006ccc: 81 e8 00 00 restore if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = TRUE; once_control->init_executed = TRUE; 40006cd0: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 40006cd4: 9f c6 40 00 call %i1 40006cd8: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 40006cdc: 10 bf ff f7 b 40006cb8 40006ce0: d0 07 bf f4 ld [ %fp + -12 ], %o0 40005f60 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 40005f60: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 40005f64: 80 a6 20 00 cmp %i0, 0 40005f68: 02 80 00 26 be 40006000 40005f6c: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40005f70: 80 a6 60 00 cmp %i1, 0 40005f74: 22 80 00 29 be,a 40006018 40005f78: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40005f7c: c2 04 00 00 ld [ %l0 ], %g1 40005f80: 80 a0 60 00 cmp %g1, 0 40005f84: 02 80 00 1f be 40006000 40005f88: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 40005f8c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40005f90: 80 a0 60 00 cmp %g1, 0 40005f94: 12 80 00 1b bne 40006000 40005f98: 05 10 00 70 sethi %hi(0x4001c000), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005f9c: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 4001c230 <_Thread_Dispatch_disable_level> 40005fa0: 82 00 60 01 inc %g1 40005fa4: c2 20 a2 30 st %g1, [ %g2 + 0x230 ] * 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 *) 40005fa8: 33 10 00 71 sethi %hi(0x4001c400), %i1 40005fac: 40 00 0b 03 call 40008bb8 <_Objects_Allocate> 40005fb0: 90 16 60 80 or %i1, 0x80, %o0 ! 4001c480 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 40005fb4: a0 92 20 00 orcc %o0, 0, %l0 40005fb8: 02 80 00 14 be 40006008 40005fbc: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 40005fc0: 40 00 09 03 call 400083cc <_CORE_RWLock_Initialize> 40005fc4: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005fc8: c4 04 20 08 ld [ %l0 + 8 ], %g2 40005fcc: 82 16 60 80 or %i1, 0x80, %g1 40005fd0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 40005fd4: 03 00 00 3f sethi %hi(0xfc00), %g1 40005fd8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005fdc: 82 08 80 01 and %g2, %g1, %g1 40005fe0: 83 28 60 02 sll %g1, 2, %g1 40005fe4: 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; 40005fe8: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 40005fec: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 40005ff0: 40 00 0e 93 call 40009a3c <_Thread_Enable_dispatch> 40005ff4: b0 10 20 00 clr %i0 40005ff8: 81 c7 e0 08 ret 40005ffc: 81 e8 00 00 restore return 0; } 40006000: 81 c7 e0 08 ret 40006004: 91 e8 20 16 restore %g0, 0x16, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 40006008: 40 00 0e 8d call 40009a3c <_Thread_Enable_dispatch> 4000600c: b0 10 20 0b mov 0xb, %i0 40006010: 81 c7 e0 08 ret 40006014: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 40006018: 40 00 02 b5 call 40006aec <== NOT EXECUTED 4000601c: 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 ) 40006020: 10 bf ff d8 b 40005f80 <== NOT EXECUTED 40006024: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40006098 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40006098: 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 ) 4000609c: 80 a6 20 00 cmp %i0, 0 400060a0: 02 80 00 11 be 400060e4 400060a4: 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 ); 400060a8: 92 07 bf f0 add %fp, -16, %o1 400060ac: 40 00 1d 6f call 4000d668 <_POSIX_Absolute_timeout_to_ticks> 400060b0: a0 10 20 00 clr %l0 switch (status) { 400060b4: 80 a2 20 02 cmp %o0, 2 400060b8: 18 80 00 0e bgu 400060f0 400060bc: b2 10 00 08 mov %o0, %i1 400060c0: d2 06 00 00 ld [ %i0 ], %o1 400060c4: 11 10 00 71 sethi %hi(0x4001c400), %o0 400060c8: 94 07 bf f4 add %fp, -12, %o2 400060cc: 40 00 0c 23 call 40009158 <_Objects_Get> 400060d0: 90 12 20 80 or %o0, 0x80, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400060d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400060d8: 80 a0 60 00 cmp %g1, 0 400060dc: 22 80 00 11 be,a 40006120 400060e0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400060e4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 400060e8: 81 c7 e0 08 ret 400060ec: 91 e8 00 08 restore %g0, %o0, %o0 * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 400060f0: 80 a2 20 03 cmp %o0, 3 400060f4: 12 bf ff f4 bne 400060c4 400060f8: d2 06 00 00 ld [ %i0 ], %o1 400060fc: 11 10 00 71 sethi %hi(0x4001c400), %o0 40006100: 94 07 bf f4 add %fp, -12, %o2 40006104: 40 00 0c 15 call 40009158 <_Objects_Get> 40006108: 90 12 20 80 or %o0, 0x80, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000610c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006110: 80 a0 60 00 cmp %g1, 0 40006114: 12 bf ff f4 bne 400060e4 40006118: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 4000611c: d2 06 00 00 ld [ %i0 ], %o1 40006120: d6 07 bf f0 ld [ %fp + -16 ], %o3 40006124: a0 0c 20 ff and %l0, 0xff, %l0 40006128: 90 02 20 10 add %o0, 0x10, %o0 4000612c: 94 10 00 10 mov %l0, %o2 40006130: 40 00 08 b2 call 400083f8 <_CORE_RWLock_Obtain_for_reading> 40006134: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40006138: 40 00 0e 41 call 40009a3c <_Thread_Enable_dispatch> 4000613c: 01 00 00 00 nop 40006140: 03 10 00 70 sethi %hi(0x4001c000), %g1 if ( !do_wait && 40006144: 80 a4 20 00 cmp %l0, 0 40006148: 12 80 00 0f bne 40006184 4000614c: 86 10 62 f0 or %g1, 0x2f0, %g3 40006150: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 40006154: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 4001c2f0 <_Thread_Executing> <== NOT EXECUTED 40006158: 86 10 62 f0 or %g1, 0x2f0, %g3 <== NOT EXECUTED 4000615c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40006160: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006164: 32 80 00 09 bne,a 40006188 <== NOT EXECUTED 40006168: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000616c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40006170: 02 bf ff de be 400060e8 <== NOT EXECUTED 40006174: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006178: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 4000617c: 08 bf ff db bleu 400060e8 <== NOT EXECUTED 40006180: 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( 40006184: c2 00 c0 00 ld [ %g3 ], %g1 40006188: 40 00 00 44 call 40006298 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000618c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40006190: 81 c7 e0 08 ret 40006194: 91 e8 00 08 restore %g0, %o0, %o0 40006198 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40006198: 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 ) 4000619c: 80 a6 20 00 cmp %i0, 0 400061a0: 02 80 00 11 be 400061e4 400061a4: 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 ); 400061a8: 92 07 bf f0 add %fp, -16, %o1 400061ac: 40 00 1d 2f call 4000d668 <_POSIX_Absolute_timeout_to_ticks> 400061b0: a0 10 20 00 clr %l0 switch (status) { 400061b4: 80 a2 20 02 cmp %o0, 2 400061b8: 18 80 00 0e bgu 400061f0 400061bc: b2 10 00 08 mov %o0, %i1 400061c0: d2 06 00 00 ld [ %i0 ], %o1 400061c4: 11 10 00 71 sethi %hi(0x4001c400), %o0 400061c8: 94 07 bf f4 add %fp, -12, %o2 400061cc: 40 00 0b e3 call 40009158 <_Objects_Get> 400061d0: 90 12 20 80 or %o0, 0x80, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400061d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400061d8: 80 a0 60 00 cmp %g1, 0 400061dc: 22 80 00 11 be,a 40006220 400061e0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400061e4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 400061e8: 81 c7 e0 08 ret 400061ec: 91 e8 00 08 restore %g0, %o0, %o0 * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 400061f0: 80 a2 20 03 cmp %o0, 3 400061f4: 12 bf ff f4 bne 400061c4 400061f8: d2 06 00 00 ld [ %i0 ], %o1 400061fc: 11 10 00 71 sethi %hi(0x4001c400), %o0 40006200: 94 07 bf f4 add %fp, -12, %o2 40006204: 40 00 0b d5 call 40009158 <_Objects_Get> 40006208: 90 12 20 80 or %o0, 0x80, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000620c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006210: 80 a0 60 00 cmp %g1, 0 40006214: 12 bf ff f4 bne 400061e4 40006218: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4000621c: d2 06 00 00 ld [ %i0 ], %o1 40006220: d6 07 bf f0 ld [ %fp + -16 ], %o3 40006224: a0 0c 20 ff and %l0, 0xff, %l0 40006228: 90 02 20 10 add %o0, 0x10, %o0 4000622c: 94 10 00 10 mov %l0, %o2 40006230: 40 00 08 a7 call 400084cc <_CORE_RWLock_Obtain_for_writing> 40006234: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40006238: 40 00 0e 01 call 40009a3c <_Thread_Enable_dispatch> 4000623c: 01 00 00 00 nop 40006240: 03 10 00 70 sethi %hi(0x4001c000), %g1 if ( !do_wait && 40006244: 80 a4 20 00 cmp %l0, 0 40006248: 12 80 00 0f bne 40006284 4000624c: 86 10 62 f0 or %g1, 0x2f0, %g3 40006250: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 40006254: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 4001c2f0 <_Thread_Executing> <== NOT EXECUTED 40006258: 86 10 62 f0 or %g1, 0x2f0, %g3 <== NOT EXECUTED 4000625c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40006260: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006264: 32 80 00 09 bne,a 40006288 <== NOT EXECUTED 40006268: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000626c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40006270: 02 bf ff de be 400061e8 <== NOT EXECUTED 40006274: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006278: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 4000627c: 08 bf ff db bleu 400061e8 <== NOT EXECUTED 40006280: 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( 40006284: c2 00 c0 00 ld [ %g3 ], %g1 40006288: 40 00 00 04 call 40006298 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000628c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40006290: 81 c7 e0 08 ret 40006294: 91 e8 00 08 restore %g0, %o0, %o0 400056b8 : int pthread_setcancelstate( int state, int *oldstate ) { 400056b8: 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() ) 400056bc: 03 10 00 58 sethi %hi(0x40016000), %g1 400056c0: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 400160bc <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 400056c4: 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() ) 400056c8: 80 a0 a0 00 cmp %g2, 0 400056cc: 12 80 00 1a bne 40005734 400056d0: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 400056d4: 80 a6 60 00 cmp %i1, 0 400056d8: 02 80 00 04 be 400056e8 400056dc: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 400056e0: 08 80 00 04 bleu 400056f0 400056e4: 07 10 00 58 sethi %hi(0x40016000), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 400056e8: 81 c7 e0 08 ret <== NOT EXECUTED 400056ec: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400056f0: 31 10 00 58 sethi %hi(0x40016000), %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400056f4: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1 400056f8: c4 06 20 e0 ld [ %i0 + 0xe0 ], %g2 400056fc: 82 00 60 01 inc %g1 40005700: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40005704: c2 20 e0 20 st %g1, [ %g3 + 0x20 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40005708: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000570c: 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; 40005710: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005714: 12 80 00 06 bne 4000572c 40005718: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 4000571c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40005720: 80 a0 60 01 cmp %g1, 1 40005724: 22 80 00 06 be,a 4000573c 40005728: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4000572c: 40 00 0b 4f call 40008468 <_Thread_Enable_dispatch> 40005730: b0 10 20 00 clr %i0 40005734: 81 c7 e0 08 ret 40005738: 81 e8 00 00 restore _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000573c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005740: 02 bf ff fb be 4000572c <== NOT EXECUTED 40005744: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40005748: 40 00 0b 48 call 40008468 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000574c: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40005750: d0 06 20 e0 ld [ %i0 + 0xe0 ], %o0 <== NOT EXECUTED 40005754: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40005758: 7f ff fe ca call 40005280 <_POSIX_Thread_Exit> <== NOT EXECUTED 4000575c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005760: 81 c7 e0 08 ret <== NOT EXECUTED 40005764: 81 e8 00 00 restore <== NOT EXECUTED 40005768 : int pthread_setcanceltype( int type, int *oldtype ) { 40005768: 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() ) 4000576c: 03 10 00 58 sethi %hi(0x40016000), %g1 40005770: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 400160bc <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 40005774: 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() ) 40005778: 80 a0 a0 00 cmp %g2, 0 4000577c: 12 80 00 1a bne 400057e4 40005780: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 40005784: 80 a6 60 00 cmp %i1, 0 40005788: 02 80 00 04 be 40005798 4000578c: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 40005790: 08 80 00 04 bleu 400057a0 40005794: 07 10 00 58 sethi %hi(0x40016000), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 40005798: 81 c7 e0 08 ret <== NOT EXECUTED 4000579c: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400057a0: 31 10 00 58 sethi %hi(0x40016000), %i0 400057a4: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1 400057a8: c4 06 20 e0 ld [ %i0 + 0xe0 ], %g2 400057ac: 82 00 60 01 inc %g1 400057b0: c2 20 e0 20 st %g1, [ %g3 + 0x20 ] 400057b4: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 400057b8: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 400057bc: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400057c0: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 400057c4: 80 a0 a0 00 cmp %g2, 0 400057c8: 12 80 00 05 bne 400057dc 400057cc: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 400057d0: 80 a1 20 01 cmp %g4, 1 400057d4: 22 80 00 06 be,a 400057ec 400057d8: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400057dc: 40 00 0b 23 call 40008468 <_Thread_Enable_dispatch> 400057e0: b0 10 20 00 clr %i0 400057e4: 81 c7 e0 08 ret 400057e8: 81 e8 00 00 restore _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400057ec: 80 a0 60 00 cmp %g1, 0 400057f0: 02 bf ff fb be 400057dc 400057f4: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400057f8: 40 00 0b 1c call 40008468 <_Thread_Enable_dispatch> <== NOT EXECUTED 400057fc: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40005800: d0 06 20 e0 ld [ %i0 + 0xe0 ], %o0 <== NOT EXECUTED 40005804: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40005808: 7f ff fe 9e call 40005280 <_POSIX_Thread_Exit> <== NOT EXECUTED 4000580c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005810: 81 c7 e0 08 ret <== NOT EXECUTED 40005814: 81 e8 00 00 restore <== NOT EXECUTED 40007e8c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 40007e8c: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 40007e90: 80 a6 a0 00 cmp %i2, 0 40007e94: 22 80 00 41 be,a 40007f98 40007e98: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 40007e9c: c2 06 80 00 ld [ %i2 ], %g1 40007ea0: 82 00 7f ff add %g1, -1, %g1 40007ea4: 80 a0 60 fd cmp %g1, 0xfd 40007ea8: 18 80 00 0a bgu 40007ed0 40007eac: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40007eb0: 02 80 00 0a be 40007ed8 40007eb4: a4 10 20 00 clr %l2 40007eb8: 04 80 00 4d ble 40007fec 40007ebc: 80 a6 60 02 cmp %i1, 2 40007ec0: 02 80 00 48 be 40007fe0 40007ec4: 80 a6 60 03 cmp %i1, 3 40007ec8: 02 80 00 36 be 40007fa0 40007ecc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return ESRCH; } 40007ed0: 81 c7 e0 08 ret 40007ed4: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40007ed8: a6 10 20 00 clr %l3 40007edc: 92 10 00 18 mov %i0, %o1 40007ee0: 11 10 00 64 sethi %hi(0x40019000), %o0 40007ee4: 94 07 bf f4 add %fp, -12, %o2 40007ee8: 40 00 09 11 call 4000a32c <_Objects_Get> 40007eec: 90 12 23 70 or %o0, 0x370, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40007ef0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007ef4: a2 10 00 08 mov %o0, %l1 40007ef8: 80 a0 60 00 cmp %g1, 0 40007efc: 12 80 00 27 bne 40007f98 40007f00: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40007f04: e0 02 21 60 ld [ %o0 + 0x160 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40007f08: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40007f0c: 80 a0 60 03 cmp %g1, 3 40007f10: 02 80 00 46 be 40008028 40007f14: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 40007f18: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 40007f1c: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 40007f20: e4 24 60 7c st %l2, [ %l1 + 0x7c ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40007f24: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 40007f28: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 40007f2c: e6 24 60 80 st %l3, [ %l1 + 0x80 ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40007f30: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 40007f34: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40007f38: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40007f3c: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 40007f40: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 40007f44: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40007f48: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 40007f4c: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 40007f50: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40007f54: 06 80 00 0f bl 40007f90 40007f58: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 40007f5c: 80 a6 60 02 cmp %i1, 2 40007f60: 14 80 00 29 bg 40008004 40007f64: 80 a6 60 03 cmp %i1, 3 40007f68: c6 04 20 80 ld [ %l0 + 0x80 ], %g3 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40007f6c: 03 10 00 64 sethi %hi(0x40019000), %g1 40007f70: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 ! 40019038 <_Thread_Ticks_per_timeslice> 40007f74: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40007f78: 90 10 00 11 mov %l1, %o0 40007f7c: 92 22 40 03 sub %o1, %g3, %o1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40007f80: c4 24 60 78 st %g2, [ %l1 + 0x78 ] the_thread->real_priority = 40007f84: d2 24 60 18 st %o1, [ %l1 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40007f88: 40 00 09 a8 call 4000a628 <_Thread_Change_priority> 40007f8c: 94 10 20 01 mov 1, %o2 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 40007f90: 40 00 0b 20 call 4000ac10 <_Thread_Enable_dispatch> 40007f94: b0 10 20 00 clr %i0 40007f98: 81 c7 e0 08 ret 40007f9c: 81 e8 00 00 restore case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 40007fa0: 40 00 0f 19 call 4000bc04 <_Timespec_To_ticks> 40007fa4: 90 06 a0 08 add %i2, 8, %o0 40007fa8: a0 10 00 08 mov %o0, %l0 40007fac: 40 00 0f 16 call 4000bc04 <_Timespec_To_ticks> 40007fb0: 90 06 a0 10 add %i2, 0x10, %o0 40007fb4: 80 a4 00 08 cmp %l0, %o0 40007fb8: 2a bf ff f8 bcs,a 40007f98 40007fbc: 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 ) ) 40007fc0: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40007fc4: 82 00 7f ff add %g1, -1, %g1 40007fc8: 80 a0 60 fd cmp %g1, 0xfd 40007fcc: 18 bf ff c1 bgu 40007ed0 40007fd0: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007fd4: a4 10 20 03 mov 3, %l2 40007fd8: 10 bf ff c1 b 40007edc 40007fdc: a6 10 61 a8 or %g1, 0x1a8, %l3 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40007fe0: a4 10 20 02 mov 2, %l2 40007fe4: 10 bf ff be b 40007edc 40007fe8: a6 10 20 00 clr %l3 40007fec: 80 a6 60 00 cmp %i1, 0 40007ff0: a4 10 20 01 mov 1, %l2 40007ff4: 02 bf ff ba be 40007edc 40007ff8: a6 10 20 00 clr %l3 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 40007ffc: 81 c7 e0 08 ret 40008000: 91 e8 20 16 restore %g0, 0x16, %o0 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40008004: 12 bf ff e3 bne 40007f90 40008008: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 4000800c: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 40008010: 40 00 10 7d call 4000c204 <_Watchdog_Remove> 40008014: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40008018: 92 10 00 11 mov %l1, %o1 4000801c: 7f ff ff 77 call 40007df8 <_POSIX_Threads_Sporadic_budget_TSR> 40008020: 90 10 20 00 clr %o0 40008024: 30 bf ff db b,a 40007f90 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 40008028: 40 00 10 77 call 4000c204 <_Watchdog_Remove> 4000802c: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40008030: 10 bf ff bb b 40007f1c 40008034: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 4000583c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 4000583c: 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() ) 40005840: 03 10 00 58 sethi %hi(0x40016000), %g1 40005844: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 400160bc <_ISR_Nest_level> 40005848: 80 a0 a0 00 cmp %g2, 0 4000584c: 12 80 00 15 bne 400058a0 40005850: 07 10 00 58 sethi %hi(0x40016000), %g3 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40005854: 33 10 00 58 sethi %hi(0x40016000), %i1 40005858: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1 4000585c: c4 06 60 e0 ld [ %i1 + 0xe0 ], %g2 40005860: 82 00 60 01 inc %g1 40005864: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40005868: c2 20 e0 20 st %g1, [ %g3 + 0x20 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000586c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40005870: 80 a0 60 00 cmp %g1, 0 40005874: 12 80 00 0d bne 400058a8 40005878: 01 00 00 00 nop 4000587c: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40005880: 80 a0 60 00 cmp %g1, 0 40005884: 02 80 00 09 be 400058a8 40005888: 01 00 00 00 nop thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4000588c: 40 00 0a f7 call 40008468 <_Thread_Enable_dispatch> 40005890: 01 00 00 00 nop if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40005894: f0 06 60 e0 ld [ %i1 + 0xe0 ], %i0 40005898: 7f ff fe 7a call 40005280 <_POSIX_Thread_Exit> 4000589c: 93 e8 3f ff restore %g0, -1, %o1 400058a0: 81 c7 e0 08 ret <== NOT EXECUTED 400058a4: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400058a8: 40 00 0a f0 call 40008468 <_Thread_Enable_dispatch> 400058ac: 81 e8 00 00 restore 400058b0: 01 00 00 00 nop <== NOT EXECUTED 40006e7c : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40006e7c: 9a 92 60 00 orcc %o1, 0, %o5 40006e80: 02 80 00 4d be 40006fb4 40006e84: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40006e88: 02 80 00 4c be 40006fb8 40006e8c: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006e90: c2 03 40 00 ld [ %o5 ], %g1 40006e94: 80 a0 60 00 cmp %g1, 0 40006e98: 22 80 00 44 be,a 40006fa8 40006e9c: c2 03 60 04 ld [ %o5 + 4 ], %g1 *registered_major = 0; /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006ea0: 03 10 00 76 sethi %hi(0x4001d800), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40006ea4: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006ea8: c8 00 63 70 ld [ %g1 + 0x370 ], %g4 40006eac: 80 a1 00 08 cmp %g4, %o0 40006eb0: 08 80 00 39 bleu 40006f94 40006eb4: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40006eb8: 80 a2 20 00 cmp %o0, 0 40006ebc: 12 80 00 29 bne 40006f60 40006ec0: 03 10 00 76 sethi %hi(0x4001d800), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40006ec4: 90 81 3f ff addcc %g4, -1, %o0 40006ec8: 02 80 00 35 be 40006f9c 40006ecc: 05 10 00 76 sethi %hi(0x4001d800), %g2 40006ed0: c6 00 a3 74 ld [ %g2 + 0x374 ], %g3 ! 4001db74 <_IO_Driver_address_table> 40006ed4: 85 29 20 03 sll %g4, 3, %g2 40006ed8: 83 29 20 05 sll %g4, 5, %g1 40006edc: 82 20 40 02 sub %g1, %g2, %g1 40006ee0: 82 00 7f e8 add %g1, -24, %g1 40006ee4: 10 80 00 05 b 40006ef8 40006ee8: 84 00 c0 01 add %g3, %g1, %g2 40006eec: 90 82 3f ff addcc %o0, -1, %o0 40006ef0: 02 80 00 2b be 40006f9c 40006ef4: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 40006ef8: c2 00 80 00 ld [ %g2 ], %g1 40006efc: 80 a0 60 00 cmp %g1, 0 40006f00: 12 bf ff fb bne 40006eec 40006f04: 88 10 00 02 mov %g2, %g4 40006f08: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40006f0c: 80 a0 60 00 cmp %g1, 0 40006f10: 32 bf ff f8 bne,a 40006ef0 40006f14: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f18: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 40006f1c: d0 22 80 00 st %o0, [ %o2 ] if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f20: c2 21 00 00 st %g1, [ %g4 ] 40006f24: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f28: 92 10 20 00 clr %o1 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f2c: c4 21 20 04 st %g2, [ %g4 + 4 ] 40006f30: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f34: 94 10 20 00 clr %o2 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006f38: c2 21 20 08 st %g1, [ %g4 + 8 ] 40006f3c: c4 03 60 0c ld [ %o5 + 0xc ], %g2 40006f40: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40006f44: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 40006f48: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 40006f4c: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 40006f50: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f54: 82 13 c0 00 mov %o7, %g1 40006f58: 7f ff ff 48 call 40006c78 40006f5c: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40006f60: c8 00 63 74 ld [ %g1 + 0x374 ], %g4 40006f64: 85 2a 20 03 sll %o0, 3, %g2 40006f68: 83 2a 20 05 sll %o0, 5, %g1 40006f6c: 82 20 40 02 sub %g1, %g2, %g1 40006f70: c6 01 00 01 ld [ %g4 + %g1 ], %g3 40006f74: 80 a0 e0 00 cmp %g3, 0 40006f78: 12 80 00 06 bne 40006f90 40006f7c: 88 01 00 01 add %g4, %g1, %g4 40006f80: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 40006f84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006f88: 22 bf ff e5 be,a 40006f1c <== NOT EXECUTED 40006f8c: c2 03 40 00 ld [ %o5 ], %g1 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f90: 82 10 20 0c mov 0xc, %g1 } 40006f94: 81 c3 e0 08 retl 40006f98: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006f9c: 82 10 20 05 mov 5, %g1 } 40006fa0: 81 c3 e0 08 retl 40006fa4: 90 10 00 01 mov %g1, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006fa8: 80 a0 60 00 cmp %g1, 0 40006fac: 12 bf ff be bne 40006ea4 40006fb0: 03 10 00 76 sethi %hi(0x4001d800), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006fb4: 82 10 20 09 mov 9, %g1 } 40006fb8: 81 c3 e0 08 retl 40006fbc: 90 10 00 01 mov %g1, %o0 40008338 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40008338: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 4000833c: 80 a6 20 00 cmp %i0, 0 40008340: 02 80 00 23 be 400083cc 40008344: 03 10 00 98 sethi %hi(0x40026000), %g1 return; 40008348: a4 10 60 f4 or %g1, 0xf4, %l2 ! 400260f4 <_Objects_Information_table+0x4> 4000834c: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40008350: c2 04 80 00 ld [ %l2 ], %g1 40008354: 80 a0 60 00 cmp %g1, 0 40008358: 22 80 00 1a be,a 400083c0 4000835c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40008360: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40008364: 80 a4 60 00 cmp %l1, 0 40008368: 22 80 00 16 be,a 400083c0 4000836c: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40008370: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40008374: 86 90 60 00 orcc %g1, 0, %g3 40008378: 22 80 00 12 be,a 400083c0 4000837c: a4 04 a0 04 add %l2, 4, %l2 40008380: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40008384: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40008388: 83 2c 20 02 sll %l0, 2, %g1 4000838c: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 40008390: 80 a2 20 00 cmp %o0, 0 40008394: 02 80 00 05 be 400083a8 40008398: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 4000839c: 9f c6 00 00 call %i0 400083a0: 01 00 00 00 nop 400083a4: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 400083a8: 83 28 e0 10 sll %g3, 0x10, %g1 400083ac: 83 30 60 10 srl %g1, 0x10, %g1 400083b0: 80 a0 40 10 cmp %g1, %l0 400083b4: 3a bf ff f5 bcc,a 40008388 400083b8: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400083bc: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 400083c0: 80 a4 80 13 cmp %l2, %l3 400083c4: 32 bf ff e4 bne,a 40008354 400083c8: c2 04 80 00 ld [ %l2 ], %g1 400083cc: 81 c7 e0 08 ret 400083d0: 81 e8 00 00 restore 400068e4 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 400068e4: 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 *) 400068e8: 11 10 00 79 sethi %hi(0x4001e400), %o0 400068ec: 92 10 00 18 mov %i0, %o1 400068f0: 90 12 22 7c or %o0, 0x27c, %o0 400068f4: 40 00 09 4e call 40008e2c <_Objects_Get> 400068f8: 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 ) { 400068fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006900: 80 a0 60 00 cmp %g1, 0 40006904: 02 80 00 04 be 40006914 40006908: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4000690c: 81 c7 e0 08 ret 40006910: 91 e8 20 04 restore %g0, 4, %o0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40006914: 25 10 00 7a sethi %hi(0x4001e800), %l2 40006918: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 4000691c: c2 04 a0 b0 ld [ %l2 + 0xb0 ], %g1 40006920: 80 a0 80 01 cmp %g2, %g1 40006924: 02 80 00 06 be 4000693c 40006928: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 4000692c: 40 00 0b a7 call 400097c8 <_Thread_Enable_dispatch> 40006930: b0 10 20 17 mov 0x17, %i0 40006934: 81 c7 e0 08 ret 40006938: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 4000693c: 12 80 00 0f bne 40006978 40006940: 01 00 00 00 nop switch ( the_period->state ) { 40006944: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40006948: 80 a0 60 00 cmp %g1, 0 4000694c: 02 80 00 07 be 40006968 40006950: b0 10 20 0b mov 0xb, %i0 40006954: 82 00 7f fd add %g1, -3, %g1 40006958: 80 a0 60 01 cmp %g1, 1 4000695c: 18 80 00 03 bgu 40006968 40006960: b0 10 20 00 clr %i0 40006964: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40006968: 40 00 0b 98 call 400097c8 <_Thread_Enable_dispatch> 4000696c: 01 00 00 00 nop 40006970: 81 c7 e0 08 ret 40006974: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40006978: 7f ff f0 77 call 40002b54 4000697c: 01 00 00 00 nop 40006980: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40006984: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40006988: 80 a4 e0 02 cmp %l3, 2 4000698c: 02 80 00 1a be 400069f4 40006990: 80 a4 e0 04 cmp %l3, 4 40006994: 02 80 00 32 be 40006a5c 40006998: 80 a4 e0 00 cmp %l3, 0 4000699c: 12 bf ff dc bne 4000690c 400069a0: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 400069a4: 7f ff f0 70 call 40002b64 400069a8: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 400069ac: 7f ff ff 58 call 4000670c <_Rate_monotonic_Initiate_statistics> 400069b0: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 400069b4: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400069b8: 03 10 00 1b sethi %hi(0x40006c00), %g1 400069bc: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 40006db8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 400069c0: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069c4: 92 04 60 10 add %l1, 0x10, %o1 400069c8: 11 10 00 7a sethi %hi(0x4001e800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400069cc: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069d0: 90 12 20 d0 or %o0, 0xd0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400069d4: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400069d8: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 400069dc: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 400069e0: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400069e4: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069e8: 40 00 10 ef call 4000ada4 <_Watchdog_Insert> 400069ec: b0 10 20 00 clr %i0 400069f0: 30 bf ff de b,a 40006968 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 400069f4: 7f ff ff 62 call 4000677c <_Rate_monotonic_Update_statistics> 400069f8: 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; 400069fc: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40006a00: 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; 40006a04: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40006a08: 7f ff f0 57 call 40002b64 40006a0c: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40006a10: c2 04 a0 b0 ld [ %l2 + 0xb0 ], %g1 40006a14: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006a18: 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; 40006a1c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006a20: 40 00 0d ff call 4000a21c <_Thread_Set_state> 40006a24: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40006a28: 7f ff f0 4b call 40002b54 40006a2c: 01 00 00 00 nop local_state = the_period->state; 40006a30: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006a34: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40006a38: 7f ff f0 4b call 40002b64 40006a3c: 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 ) 40006a40: 80 a4 20 03 cmp %l0, 3 40006a44: 02 80 00 17 be 40006aa0 40006a48: d0 04 a0 b0 ld [ %l2 + 0xb0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 40006a4c: 40 00 0b 5f call 400097c8 <_Thread_Enable_dispatch> 40006a50: b0 10 20 00 clr %i0 40006a54: 81 c7 e0 08 ret 40006a58: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40006a5c: 7f ff ff 48 call 4000677c <_Rate_monotonic_Update_statistics> 40006a60: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40006a64: 7f ff f0 40 call 40002b64 40006a68: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006a6c: 82 10 20 02 mov 2, %g1 40006a70: 92 04 60 10 add %l1, 0x10, %o1 40006a74: 11 10 00 7a sethi %hi(0x4001e800), %o0 40006a78: 90 12 20 d0 or %o0, 0xd0, %o0 ! 4001e8d0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006a7c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40006a80: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40006a84: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006a88: 40 00 10 c7 call 4000ada4 <_Watchdog_Insert> 40006a8c: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40006a90: 40 00 0b 4e call 400097c8 <_Thread_Enable_dispatch> 40006a94: 01 00 00 00 nop 40006a98: 81 c7 e0 08 ret 40006a9c: 81 e8 00 00 restore /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006aa0: 40 00 0a 4d call 400093d4 <_Thread_Clear_state> <== NOT EXECUTED 40006aa4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40006aa8: 30 bf ff e9 b,a 40006a4c <== NOT EXECUTED 40024804 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40024804: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 40024808: 80 a6 60 00 cmp %i1, 0 4002480c: 02 80 00 4a be 40024934 40024810: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40024814: 13 10 01 20 sethi %hi(0x40048000), %o1 40024818: 9f c6 40 00 call %i1 4002481c: 92 12 63 80 or %o1, 0x380, %o1 ! 40048380 <_POSIX_Threads_Default_attributes+0x38> #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40024820: 90 10 00 18 mov %i0, %o0 40024824: 13 10 01 20 sethi %hi(0x40048000), %o1 40024828: 9f c6 40 00 call %i1 4002482c: 92 12 63 a0 or %o1, 0x3a0, %o1 ! 400483a0 <_POSIX_Threads_Default_attributes+0x58> #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 40024830: 90 10 00 18 mov %i0, %o0 40024834: 13 10 01 20 sethi %hi(0x40048000), %o1 40024838: 9f c6 40 00 call %i1 4002483c: 92 12 63 c8 or %o1, 0x3c8, %o1 ! 400483c8 <_POSIX_Threads_Default_attributes+0x80> Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40024840: 90 10 00 18 mov %i0, %o0 40024844: 13 10 01 20 sethi %hi(0x40048000), %o1 40024848: 9f c6 40 00 call %i1 4002484c: 92 12 63 f0 or %o1, 0x3f0, %o1 ! 400483f0 <_POSIX_Threads_Default_attributes+0xa8> #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 40024850: 90 10 00 18 mov %i0, %o0 40024854: 13 10 01 21 sethi %hi(0x40048400), %o1 40024858: 9f c6 40 00 call %i1 4002485c: 92 12 60 40 or %o1, 0x40, %o1 ! 40048440 <_POSIX_Threads_Default_attributes+0xf8> /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40024860: 03 10 01 83 sethi %hi(0x40060c00), %g1 40024864: a6 10 60 bc or %g1, 0xbc, %l3 ! 40060cbc <_Rate_monotonic_Information> 40024868: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 4002486c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40024870: 80 a4 80 01 cmp %l2, %g1 40024874: 18 80 00 30 bgu 40024934 40024878: 03 10 01 21 sethi %hi(0x40048400), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 4002487c: 05 10 01 22 sethi %hi(0x40048800), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40024880: b6 10 60 90 or %g1, 0x90, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40024884: b8 10 a0 98 or %g2, 0x98, %i4 40024888: a8 07 bf 98 add %fp, -104, %l4 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 4002488c: ae 07 bf d0 add %fp, -48, %l7 40024890: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40024894: ba 07 bf b0 add %fp, -80, %i5 40024898: aa 07 bf e8 add %fp, -24, %l5 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 4002489c: 10 80 00 06 b 400248b4 400248a0: b4 07 bf c8 add %fp, -56, %i2 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 400248a4: a4 04 a0 01 inc %l2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 400248a8: 80 a0 40 12 cmp %g1, %l2 400248ac: 0a 80 00 22 bcs 40024934 400248b0: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 400248b4: 90 10 00 12 mov %l2, %o0 400248b8: 40 00 2e e3 call 40030444 400248bc: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 400248c0: 80 a2 20 00 cmp %o0, 0 400248c4: 32 bf ff f8 bne,a 400248a4 400248c8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400248cc: 92 10 00 17 mov %l7, %o1 400248d0: 40 00 2e f2 call 40030498 400248d4: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 400248d8: d0 07 bf d0 ld [ %fp + -48 ], %o0 400248dc: 80 a2 20 00 cmp %o0, 0 400248e0: 12 80 00 4b bne 40024a0c 400248e4: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400248e8: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 400248ec: 94 10 00 12 mov %l2, %o2 400248f0: 92 10 00 1b mov %i3, %o1 400248f4: 96 10 00 16 mov %l6, %o3 400248f8: 9f c6 40 00 call %i1 400248fc: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40024900: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40024904: 94 10 00 15 mov %l5, %o2 40024908: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 4002490c: 80 a0 60 00 cmp %g1, 0 40024910: 12 80 00 0b bne 4002493c 40024914: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 40024918: 9f c6 40 00 call %i1 4002491c: 90 10 00 18 mov %i0, %o0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40024920: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 40024924: a4 04 a0 01 inc %l2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40024928: 80 a0 40 12 cmp %g1, %l2 4002492c: 1a bf ff e3 bcc 400248b8 40024930: 90 10 00 12 mov %l2, %o0 40024934: 81 c7 e0 08 ret 40024938: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 4002493c: 40 00 05 fd call 40026130 <_Timespec_Divide_by_integer> 40024940: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40024944: d0 07 bf a4 ld [ %fp + -92 ], %o0 40024948: 40 00 78 86 call 40042b60 <.div> 4002494c: 92 10 23 e8 mov 0x3e8, %o1 40024950: a2 10 00 08 mov %o0, %l1 40024954: d0 07 bf ac ld [ %fp + -84 ], %o0 40024958: 40 00 78 82 call 40042b60 <.div> 4002495c: 92 10 23 e8 mov 0x3e8, %o1 40024960: c2 07 bf e8 ld [ %fp + -24 ], %g1 40024964: a0 10 00 08 mov %o0, %l0 40024968: d0 07 bf ec ld [ %fp + -20 ], %o0 4002496c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40024970: 40 00 78 7c call 40042b60 <.div> 40024974: 92 10 23 e8 mov 0x3e8, %o1 40024978: d8 07 bf a8 ld [ %fp + -88 ], %o4 4002497c: d4 07 bf a0 ld [ %fp + -96 ], %o2 40024980: 96 10 00 11 mov %l1, %o3 40024984: 9a 10 00 10 mov %l0, %o5 40024988: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 4002498c: 13 10 01 21 sethi %hi(0x40048400), %o1 40024990: 90 10 00 18 mov %i0, %o0 40024994: 9f c6 40 00 call %i1 40024998: 92 12 60 a8 or %o1, 0xa8, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 4002499c: d2 07 bf 98 ld [ %fp + -104 ], %o1 400249a0: 94 10 00 15 mov %l5, %o2 400249a4: 40 00 05 e3 call 40026130 <_Timespec_Divide_by_integer> 400249a8: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 400249ac: d0 07 bf bc ld [ %fp + -68 ], %o0 400249b0: 40 00 78 6c call 40042b60 <.div> 400249b4: 92 10 23 e8 mov 0x3e8, %o1 400249b8: a2 10 00 08 mov %o0, %l1 400249bc: d0 07 bf c4 ld [ %fp + -60 ], %o0 400249c0: 40 00 78 68 call 40042b60 <.div> 400249c4: 92 10 23 e8 mov 0x3e8, %o1 400249c8: c2 07 bf e8 ld [ %fp + -24 ], %g1 400249cc: a0 10 00 08 mov %o0, %l0 400249d0: d0 07 bf ec ld [ %fp + -20 ], %o0 400249d4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400249d8: 40 00 78 62 call 40042b60 <.div> 400249dc: 92 10 23 e8 mov 0x3e8, %o1 400249e0: d4 07 bf b8 ld [ %fp + -72 ], %o2 400249e4: d8 07 bf c0 ld [ %fp + -64 ], %o4 400249e8: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 400249ec: 96 10 00 11 mov %l1, %o3 400249f0: 9a 10 00 10 mov %l0, %o5 400249f4: 90 10 00 18 mov %i0, %o0 400249f8: 13 10 01 21 sethi %hi(0x40048400), %o1 400249fc: 9f c6 40 00 call %i1 40024a00: 92 12 60 c8 or %o1, 0xc8, %o1 ! 400484c8 <_POSIX_Threads_Default_attributes+0x180> /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40024a04: 10 bf ff a8 b 400248a4 40024a08: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 40024a0c: 94 10 00 16 mov %l6, %o2 40024a10: 7f ff 93 72 call 400097d8 40024a14: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40024a18: 10 bf ff b5 b 400248ec 40024a1c: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40010040 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40010040: 9d e3 bf 90 save %sp, -112, %sp 40010044: 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 ) 40010048: 80 a6 60 00 cmp %i1, 0 4001004c: 02 80 00 28 be 400100ec 40010050: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40010054: 23 10 00 cd sethi %hi(0x40033400), %l1 40010058: 40 00 09 38 call 40012538 <_API_Mutex_Lock> 4001005c: d0 04 63 48 ld [ %l1 + 0x348 ], %o0 ! 40033748 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40010060: 92 10 00 10 mov %l0, %o1 40010064: 11 10 00 cd sethi %hi(0x40033400), %o0 40010068: 94 07 bf f0 add %fp, -16, %o2 4001006c: 40 00 10 4f call 400141a8 <_Objects_Get_no_protection> 40010070: 90 12 20 cc or %o0, 0xcc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010074: c2 07 bf f0 ld [ %fp + -16 ], %g1 40010078: 80 a0 60 00 cmp %g1, 0 4001007c: 12 80 00 16 bne 400100d4 40010080: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40010084: 92 10 00 19 mov %i1, %o1 40010088: 94 10 00 1a mov %i2, %o2 4001008c: 90 02 20 68 add %o0, 0x68, %o0 40010090: 96 07 bf f4 add %fp, -12, %o3 40010094: 40 00 0c 6e call 4001324c <_Heap_Extend> 40010098: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4001009c: 80 a2 20 01 cmp %o0, 1 400100a0: 02 80 00 11 be 400100e4 400100a4: 01 00 00 00 nop 400100a8: 1a 80 00 13 bcc 400100f4 400100ac: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100b0: c6 07 bf f4 ld [ %fp + -12 ], %g3 400100b4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 400100b8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100bc: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 400100c0: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400100c4: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 400100c8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 400100cc: 10 80 00 06 b 400100e4 400100d0: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 400100d4: 80 a0 60 01 cmp %g1, 1 400100d8: 02 80 00 03 be 400100e4 400100dc: b0 10 20 04 mov 4, %i0 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 400100e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 400100e4: 40 00 09 2b call 40012590 <_API_Mutex_Unlock> 400100e8: d0 04 63 48 ld [ %l1 + 0x348 ], %o0 return return_status; } 400100ec: 81 c7 e0 08 ret 400100f0: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 400100f4: 12 bf ff fb bne 400100e0 400100f8: b0 10 20 18 mov 0x18, %i0 400100fc: 30 bf ff fa b,a 400100e4 400103fc : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400103fc: 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 ) 40010400: 80 a6 e0 00 cmp %i3, 0 40010404: 02 80 00 2e be 400104bc 40010408: 21 10 00 cd sethi %hi(0x40033400), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4001040c: 40 00 08 4b call 40012538 <_API_Mutex_Lock> 40010410: d0 04 23 48 ld [ %l0 + 0x348 ], %o0 ! 40033748 <_RTEMS_Allocator_Mutex> 40010414: 92 10 00 18 mov %i0, %o1 40010418: 11 10 00 cd sethi %hi(0x40033400), %o0 4001041c: 94 07 bf f0 add %fp, -16, %o2 40010420: 40 00 0f 62 call 400141a8 <_Objects_Get_no_protection> 40010424: 90 12 20 cc or %o0, 0xcc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40010428: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001042c: 80 a0 60 00 cmp %g1, 0 40010430: 12 80 00 14 bne 40010480 40010434: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40010438: 94 10 00 1a mov %i2, %o2 4001043c: 92 10 00 19 mov %i1, %o1 40010440: 90 02 20 68 add %o0, 0x68, %o0 40010444: 96 07 bf ec add %fp, -20, %o3 40010448: 40 00 0d 0b call 40013874 <_Heap_Resize_block> 4001044c: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40010450: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 40010454: b4 92 20 00 orcc %o0, 0, %i2 40010458: 12 80 00 13 bne 400104a4 4001045c: c2 26 c0 00 st %g1, [ %i3 ] 40010460: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40010464: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40010468: 12 80 00 17 bne 400104c4 <== NOT EXECUTED 4001046c: d0 04 23 48 ld [ %l0 + 0x348 ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 40010470: 40 00 08 48 call 40012590 <_API_Mutex_Unlock> <== NOT EXECUTED 40010474: b0 10 20 00 clr %i0 <== NOT EXECUTED 40010478: 81 c7 e0 08 ret <== NOT EXECUTED 4001047c: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010480: d0 04 23 48 ld [ %l0 + 0x348 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40010484: 82 18 60 01 xor %g1, 1, %g1 40010488: 80 a0 00 01 cmp %g0, %g1 4001048c: 84 40 3f ff addx %g0, -1, %g2 40010490: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010494: 40 00 08 3f call 40012590 <_API_Mutex_Unlock> 40010498: b0 06 20 19 add %i0, 0x19, %i0 4001049c: 81 c7 e0 08 ret 400104a0: 81 e8 00 00 restore _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 400104a4: d0 04 23 48 ld [ %l0 + 0x348 ], %o0 400104a8: 40 00 08 3a call 40012590 <_API_Mutex_Unlock> 400104ac: b0 10 20 0d mov 0xd, %i0 return 400104b0: 80 a6 a0 01 cmp %i2, 1 400104b4: 02 80 00 07 be 400104d0 400104b8: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 400104bc: 81 c7 e0 08 ret 400104c0: 91 e8 20 09 restore %g0, 9, %o0 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 400104c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400104c8: 40 00 22 d1 call 4001900c <_Region_Process_queue> <== NOT EXECUTED 400104cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400104d0: 81 c7 e0 08 ret <== NOT EXECUTED 400104d4: 81 e8 00 00 restore <== NOT EXECUTED 400054bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 400054bc: 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 ) ) 400054c0: a4 96 20 00 orcc %i0, 0, %l2 400054c4: 02 80 00 33 be 40005590 400054c8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400054cc: 80 a7 20 00 cmp %i4, 0 400054d0: 02 80 00 30 be 40005590 400054d4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 400054d8: 82 8e a0 c0 andcc %i2, 0xc0, %g1 400054dc: 12 80 00 2f bne 40005598 400054e0: a0 0e a0 30 and %i2, 0x30, %l0 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 400054e4: 80 a4 20 00 cmp %l0, 0 400054e8: 02 80 00 04 be 400054f8 400054ec: 80 a6 60 01 cmp %i1, 1 400054f0: 18 80 00 28 bgu 40005590 400054f4: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400054f8: 05 10 00 65 sethi %hi(0x40019400), %g2 400054fc: c2 00 a3 40 ld [ %g2 + 0x340 ], %g1 ! 40019740 <_Thread_Dispatch_disable_level> 40005500: 82 00 60 01 inc %g1 40005504: c2 20 a3 40 st %g1, [ %g2 + 0x340 ] * 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 ); 40005508: 31 10 00 65 sethi %hi(0x40019400), %i0 4000550c: 40 00 05 94 call 40006b5c <_Objects_Allocate> 40005510: 90 16 22 0c or %i0, 0x20c, %o0 ! 4001960c <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40005514: a2 92 20 00 orcc %o0, 0, %l1 40005518: 02 80 00 4e be 40005650 4000551c: 80 a4 20 00 cmp %l0, 0 * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 40005520: 02 80 00 2c be 400055d0 40005524: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40005528: 80 8e a0 40 btst 0x40, %i2 4000552c: 02 80 00 44 be 4000563c 40005530: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40005534: 82 10 20 02 mov 2, %g1 40005538: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 4000553c: 80 a4 20 10 cmp %l0, 0x10 40005540: 02 80 00 48 be 40005660 40005544: 82 10 20 02 mov 2, %g1 the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40005548: 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; 4000554c: 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( 40005550: 82 1e 60 01 xor %i1, 1, %g1 40005554: 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; 40005558: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 4000555c: 94 60 3f ff subx %g0, -1, %o2 40005560: 90 04 60 14 add %l1, 0x14, %o0 40005564: 40 00 03 64 call 400062f4 <_CORE_mutex_Initialize> 40005568: 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 ) { 4000556c: 80 a2 20 06 cmp %o0, 6 40005570: 32 80 00 26 bne,a 40005608 40005574: c4 04 60 08 ld [ %l1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40005578: 90 16 22 0c or %i0, 0x20c, %o0 <== NOT EXECUTED 4000557c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40005580: 40 00 06 72 call 40006f48 <_Objects_Free> <== NOT EXECUTED 40005584: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40005588: 40 00 09 44 call 40007a98 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000558c: 01 00 00 00 nop <== NOT EXECUTED 40005590: 81 c7 e0 08 ret 40005594: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40005598: 80 a4 20 10 cmp %l0, 0x10 4000559c: 02 80 00 06 be 400055b4 400055a0: 80 a4 20 20 cmp %l0, 0x20 400055a4: 02 80 00 05 be 400055b8 400055a8: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400055ac: 81 c7 e0 08 ret 400055b0: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 400055b4: 80 8e a0 04 btst 4, %i2 400055b8: 02 bf ff fd be 400055ac 400055bc: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 400055c0: 12 bf ff ca bne 400054e8 400055c4: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 400055c8: 81 c7 e0 08 ret 400055cc: 91 e8 20 0b restore %g0, 0xb, %o0 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 400055d0: 80 8e a0 04 btst 4, %i2 400055d4: 22 80 00 04 be,a 400055e4 400055d8: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400055dc: 82 10 20 01 mov 1, %g1 400055e0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400055e4: 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; 400055e8: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400055ec: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400055f0: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400055f4: 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( 400055f8: 90 04 60 14 add %l1, 0x14, %o0 400055fc: 40 00 04 29 call 400066a0 <_CORE_semaphore_Initialize> 40005600: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005604: c4 04 60 08 ld [ %l1 + 8 ], %g2 40005608: 82 16 22 0c or %i0, 0x20c, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000560c: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005610: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40005614: c4 27 00 00 st %g2, [ %i4 ] 40005618: 03 00 00 3f sethi %hi(0xfc00), %g1 4000561c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005620: 84 08 80 01 and %g2, %g1, %g2 40005624: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40005628: b0 10 20 00 clr %i0 4000562c: 40 00 09 1b call 40007a98 <_Thread_Enable_dispatch> 40005630: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 40005634: 81 c7 e0 08 ret 40005638: 81 e8 00 00 restore if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4000563c: 02 80 00 0f be 40005678 40005640: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40005644: 82 10 20 03 mov 3, %g1 40005648: 10 bf ff bd b 4000553c 4000564c: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40005650: 40 00 09 12 call 40007a98 <_Thread_Enable_dispatch> 40005654: b0 10 20 05 mov 5, %i0 40005658: 81 c7 e0 08 ret 4000565c: 81 e8 00 00 restore if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40005660: c2 07 bf e8 ld [ %fp + -24 ], %g1 40005664: 80 a0 60 01 cmp %g1, 1 40005668: 18 80 00 09 bgu 4000568c 4000566c: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40005670: 10 bf ff b8 b 40005550 40005674: c0 2f bf e4 clrb [ %fp + -28 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 40005678: 22 bf ff b1 be,a 4000553c 4000567c: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40005680: 82 10 20 01 mov 1, %g1 40005684: 10 bf ff ae b 4000553c 40005688: c2 27 bf e8 st %g1, [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4000568c: 80 a0 60 03 cmp %g1, 3 40005690: 18 bf ff b1 bgu 40005554 40005694: 82 1e 60 01 xor %i1, 1, %g1 case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 40005698: 82 10 20 01 mov 1, %g1 4000569c: 10 bf ff ad b 40005550 400056a0: c2 2f bf e4 stb %g1, [ %fp + -28 ] 40024b88 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40024b88: 9d e3 bf 90 save %sp, -112, %sp 40024b8c: 11 10 01 7f sethi %hi(0x4005fc00), %o0 40024b90: 92 10 00 18 mov %i0, %o1 40024b94: 90 12 23 b8 or %o0, 0x3b8, %o0 40024b98: 7f ff 9a 92 call 4000b5e0 <_Objects_Get> 40024b9c: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40024ba0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40024ba4: 80 a0 60 00 cmp %g1, 0 40024ba8: 12 80 00 0b bne 40024bd4 40024bac: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40024bb0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40024bb4: 80 88 60 30 btst 0x30, %g1 40024bb8: 12 80 00 09 bne 40024bdc 40024bbc: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40024bc0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40024bc4: 7f ff 97 79 call 4000a9a8 <_CORE_semaphore_Flush> <== NOT EXECUTED 40024bc8: 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(); 40024bcc: 7f ff 9c ef call 4000bf88 <_Thread_Enable_dispatch> 40024bd0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40024bd4: 81 c7 e0 08 ret 40024bd8: 81 e8 00 00 restore the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 40024bdc: 92 10 20 00 clr %o1 40024be0: 7f ff 96 87 call 4000a5fc <_CORE_mutex_Flush> 40024be4: 94 10 20 01 mov 1, %o2 40024be8: 30 bf ff f9 b,a 40024bcc 40016d84 : */ void rtems_shutdown_executive( uint32_t result ) { 40016d84: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 40016d88: 05 10 00 66 sethi %hi(0x40019800), %g2 40016d8c: c2 00 a0 e4 ld [ %g2 + 0xe4 ], %g1 ! 400198e4 <_System_state_Current> 40016d90: 80 a0 60 04 cmp %g1, 4 40016d94: 02 80 00 07 be 40016db0 40016d98: 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 ); 40016d9c: 13 10 00 65 sethi %hi(0x40019400), %o1 40016da0: c2 20 a0 e4 st %g1, [ %g2 + 0xe4 ] 40016da4: 92 12 62 b8 or %o1, 0x2b8, %o1 40016da8: 7f ff c8 d8 call 40009108 <_CPU_Context_switch> 40016dac: 90 07 bf 70 add %fp, -144, %o0 40016db0: 81 c7 e0 08 ret <== NOT EXECUTED 40016db4: 81 e8 00 00 restore <== NOT EXECUTED 400077bc : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400077bc: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400077c0: 03 10 00 7d sethi %hi(0x4001f400), %g1 400077c4: c4 00 61 a8 ld [ %g1 + 0x1a8 ], %g2 ! 4001f5a8 <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400077c8: 90 10 00 18 mov %i0, %o0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400077cc: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 400077d0: c4 08 60 04 ldub [ %g1 + 4 ], %g2 400077d4: 80 a0 a0 00 cmp %g2, 0 400077d8: 02 80 00 1c be 40007848 400077dc: b0 10 20 16 mov 0x16, %i0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 400077e0: 80 a6 60 0f cmp %i1, 0xf 400077e4: 18 80 00 19 bgu 40007848 400077e8: b0 10 20 0a mov 0xa, %i0 400077ec: 03 10 00 7d sethi %hi(0x4001f400), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 400077f0: 80 a2 20 00 cmp %o0, 0 400077f4: 02 80 00 17 be 40007850 400077f8: 86 10 61 d0 or %g1, 0x1d0, %g3 400077fc: 03 10 00 7d sethi %hi(0x4001f400), %g1 40007800: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 4001f5d0 <_Thread_Executing> 40007804: 86 10 61 d0 or %g1, 0x1d0, %g3 40007808: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4000780c: 80 a2 00 01 cmp %o0, %g1 40007810: 22 80 00 11 be,a 40007854 40007814: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 40007818: 40 00 08 6a call 400099c0 <_Thread_Get> 4000781c: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40007820: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007824: 80 a0 60 00 cmp %g1, 0 40007828: 12 80 00 08 bne 40007848 4000782c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007830: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 40007834: 82 06 60 08 add %i1, 8, %g1 40007838: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 4000783c: b0 10 20 00 clr %i0 40007840: 40 00 08 52 call 40009988 <_Thread_Enable_dispatch> 40007844: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007848: 81 c7 e0 08 ret 4000784c: 81 e8 00 00 restore */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40007850: c2 00 c0 00 ld [ %g3 ], %g1 40007854: 84 06 60 08 add %i1, 8, %g2 40007858: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 4000785c: 85 28 a0 02 sll %g2, 2, %g2 40007860: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 40007864: 81 c7 e0 08 ret 40007868: 91 e8 20 00 restore %g0, 0, %o0 4000694c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4000694c: 9d e3 bf 90 save %sp, -112, %sp 40006950: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40006954: 80 a6 60 00 cmp %i1, 0 40006958: 02 80 00 26 be 400069f0 4000695c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40006960: 80 a6 a0 00 cmp %i2, 0 40006964: 02 80 00 23 be 400069f0 40006968: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 4000696c: 11 10 00 5c sethi %hi(0x40017000), %o0 40006970: 92 10 00 12 mov %l2, %o1 40006974: 90 12 21 a4 or %o0, 0x1a4, %o0 40006978: 40 00 05 74 call 40007f48 <_Objects_Get> 4000697c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40006980: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006984: a0 10 00 08 mov %o0, %l0 40006988: 80 a0 60 00 cmp %g1, 0 4000698c: 12 80 00 19 bne 400069f0 40006990: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40006994: a2 02 20 10 add %o0, 0x10, %l1 40006998: 40 00 0c d2 call 40009ce0 <_Watchdog_Remove> 4000699c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 400069a0: 7f ff ee 9a call 40002408 400069a4: 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 ) { 400069a8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 400069ac: 80 a0 60 00 cmp %g1, 0 400069b0: 12 80 00 12 bne 400069f8 400069b4: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400069b8: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400069bc: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400069c0: 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; 400069c4: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400069c8: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 400069cc: 7f ff ee 93 call 40002418 400069d0: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400069d4: 92 10 00 11 mov %l1, %o1 400069d8: 11 10 00 5b sethi %hi(0x40016c00), %o0 400069dc: 90 12 20 b0 or %o0, 0xb0, %o0 ! 40016cb0 <_Watchdog_Ticks_chain> 400069e0: 40 00 0c 55 call 40009b34 <_Watchdog_Insert> 400069e4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 400069e8: 40 00 07 91 call 4000882c <_Thread_Enable_dispatch> 400069ec: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400069f0: 81 c7 e0 08 ret 400069f4: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 400069f8: 7f ff ee 88 call 40002418 <== NOT EXECUTED 400069fc: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40006a00: 40 00 07 8b call 4000882c <_Thread_Enable_dispatch> <== NOT EXECUTED 40006a04: 01 00 00 00 nop <== NOT EXECUTED 40006a08: 81 c7 e0 08 ret <== NOT EXECUTED 40006a0c: 81 e8 00 00 restore <== NOT EXECUTED 400118e4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 400118e4: 9d e3 bf 90 save %sp, -112, %sp 400118e8: 92 96 20 00 orcc %i0, 0, %o1 400118ec: 12 80 00 05 bne 40011900 400118f0: 03 10 00 b9 sethi %hi(0x4002e400), %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; 400118f4: 90 10 20 13 mov 0x13, %o0 } return status; } 400118f8: 81 c7 e0 08 ret 400118fc: 91 e8 00 08 restore %g0, %o0, %o0 40011900: c4 08 61 b4 ldub [ %g1 + 0x1b4 ], %g2 40011904: 80 a2 40 02 cmp %o1, %g2 40011908: 18 80 00 56 bgu 40011a60 4001190c: 80 a2 7f ff cmp %o1, -1 40011910: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 40011914: 05 10 00 cd sethi %hi(0x40033400), %g2 40011918: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 40033690 <_Thread_Dispatch_disable_level> 4001191c: 82 00 60 01 inc %g1 40011920: c2 20 a2 90 st %g1, [ %g2 + 0x290 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40011924: 23 10 00 bc sethi %hi(0x4002f000), %l1 initialized = true; 40011928: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 4001192c: e0 0c 60 f8 ldub [ %l1 + 0xf8 ], %l0 initialized = true; _Thread_Enable_dispatch(); 40011930: 40 00 0c 97 call 40014b8c <_Thread_Enable_dispatch> 40011934: c2 2c 60 f8 stb %g1, [ %l1 + 0xf8 ] if ( tmpInitialized ) 40011938: 80 a4 20 00 cmp %l0, 0 4001193c: 12 bf ff ef bne 400118f8 40011940: 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); 40011944: 05 10 00 cd sethi %hi(0x40033400), %g2 40011948: 82 10 a1 ac or %g2, 0x1ac, %g1 ! 400335ac <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001194c: 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; 40011950: 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); 40011954: 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( 40011958: 92 10 00 18 mov %i0, %o1 4001195c: 94 10 00 19 mov %i1, %o2 40011960: 19 00 00 20 sethi %hi(0x8000), %o4 40011964: c2 20 a1 ac st %g1, [ %g2 + 0x1ac ] 40011968: 98 16 80 0c or %i2, %o4, %o4 4001196c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40011970: 96 10 21 00 mov 0x100, %o3 40011974: 90 12 21 45 or %o0, 0x145, %o0 40011978: 7f ff fc 78 call 40010b58 4001197c: 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) { 40011980: 80 a2 20 00 cmp %o0, 0 40011984: 12 80 00 34 bne 40011a54 40011988: 03 10 00 cd sethi %hi(0x40033400), %g1 * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 4001198c: 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 ) 40011990: 86 10 61 4c or %g1, 0x14c, %g3 40011994: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40011998: 03 00 00 3f sethi %hi(0xfc00), %g1 4001199c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400119a0: 82 0a c0 01 and %o3, %g1, %g1 400119a4: 80 a0 40 02 cmp %g1, %g2 400119a8: 18 80 00 05 bgu 400119bc 400119ac: 98 10 20 00 clr %o4 400119b0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 400119b4: 83 28 60 02 sll %g1, 2, %g1 400119b8: d8 00 80 01 ld [ %g2 + %g1 ], %o4 400119bc: 09 10 00 cd sethi %hi(0x40033400), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400119c0: 1b 10 00 cd sethi %hi(0x40033400), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400119c4: 84 11 21 8c or %g4, 0x18c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400119c8: 82 13 61 a0 or %o5, 0x1a0, %g1 400119cc: 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; 400119d0: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 400119d4: 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; 400119d8: 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); 400119dc: 84 00 a0 04 add %g2, 4, %g2 400119e0: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400119e4: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400119e8: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 400119ec: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 400119f0: c4 21 21 8c st %g2, [ %g4 + 0x18c ] 400119f4: c2 23 61 a0 st %g1, [ %o5 + 0x1a0 ] 400119f8: 05 10 00 d0 sethi %hi(0x40034000), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400119fc: 07 10 00 52 sethi %hi(0x40014800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a00: 03 10 00 cd sethi %hi(0x40033400), %g1 the_watchdog->routine = routine; 40011a04: 86 10 e1 f4 or %g3, 0x1f4, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a08: 82 10 61 b8 or %g1, 0x1b8, %g1 the_watchdog->routine = routine; 40011a0c: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40011a10: d8 20 a0 40 st %o4, [ %g2 + 0x40 ] 40011a14: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40011a18: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011a1c: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40011a20: 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; 40011a24: 05 10 00 46 sethi %hi(0x40011800), %g2 40011a28: 03 10 00 d0 sethi %hi(0x40034000), %g1 40011a2c: 84 10 a2 70 or %g2, 0x270, %g2 /* * Start the timer server */ status = rtems_task_start( 40011a30: 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; 40011a34: c4 20 60 3c st %g2, [ %g1 + 0x3c ] /* * Start the timer server */ status = rtems_task_start( 40011a38: 13 10 00 46 sethi %hi(0x40011800), %o1 40011a3c: 94 10 20 00 clr %o2 40011a40: 7f ff fd 9e call 400110b8 40011a44: 92 12 63 44 or %o1, 0x344, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40011a48: 80 a2 20 00 cmp %o0, 0 40011a4c: 02 bf ff ab be 400118f8 40011a50: 01 00 00 00 nop * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 40011a54: c0 2c 60 f8 clrb [ %l1 + 0xf8 ] } return status; } 40011a58: 81 c7 e0 08 ret 40011a5c: 91 e8 00 08 restore %g0, %o0, %o0 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 40011a60: 02 bf ff ad be 40011914 40011a64: b0 10 20 00 clr %i0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 40011a68: 10 bf ff a4 b 400118f8 40011a6c: 90 10 20 13 mov 0x13, %o0 40011664 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 40011664: 9d e3 bf 90 save %sp, -112, %sp 40011668: 11 10 00 cf sethi %hi(0x40033c00), %o0 4001166c: 92 10 00 18 mov %i0, %o1 40011670: 90 12 23 fc or %o0, 0x3fc, %o0 40011674: 40 00 0a df call 400141f0 <_Objects_Get> 40011678: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001167c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011680: a0 10 00 08 mov %o0, %l0 40011684: 80 a0 60 00 cmp %g1, 0 40011688: 12 80 00 11 bne 400116cc 4001168c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40011690: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40011694: 80 a0 60 01 cmp %g1, 1 40011698: 22 80 00 15 be,a 400116ec 4001169c: 31 10 00 d0 sethi %hi(0x40034000), %i0 400116a0: 1a 80 00 0d bcc 400116d4 400116a4: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400116a8: a0 02 20 10 add %o0, 0x10, %l0 400116ac: 40 00 13 96 call 40016504 <_Watchdog_Remove> 400116b0: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400116b4: 11 10 00 cd sethi %hi(0x40033400), %o0 400116b8: 92 10 00 10 mov %l0, %o1 400116bc: 40 00 13 27 call 40016358 <_Watchdog_Insert> 400116c0: 90 12 23 70 or %o0, 0x370, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400116c4: 40 00 0d 32 call 40014b8c <_Thread_Enable_dispatch> 400116c8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400116cc: 81 c7 e0 08 ret 400116d0: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400116d4: 18 bf ff fc bgu 400116c4 400116d8: 01 00 00 00 nop (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 400116dc: 40 00 0d 2c call 40014b8c <_Thread_Enable_dispatch> 400116e0: b0 10 20 0b mov 0xb, %i0 ! b 400116e4: 81 c7 e0 08 ret 400116e8: 81 e8 00 00 restore case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 400116ec: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 400116f0: 80 a0 60 00 cmp %g1, 0 400116f4: 02 80 00 08 be 40011714 400116f8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400116fc: 40 00 13 82 call 40016504 <_Watchdog_Remove> 40011700: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40011704: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 40011708: 9f c0 40 00 call %g1 4001170c: 90 10 00 10 mov %l0, %o0 40011710: 30 bf ff ed b,a 400116c4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 40011714: 40 00 0d 1e call 40014b8c <_Thread_Enable_dispatch> <== NOT EXECUTED 40011718: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 4001171c: 81 c7 e0 08 ret <== NOT EXECUTED 40011720: 81 e8 00 00 restore <== NOT EXECUTED 40011724 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011724: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011728: 03 10 00 d0 sethi %hi(0x40034000), %g1 4001172c: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 40034040 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011730: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011734: 80 a0 a0 00 cmp %g2, 0 40011738: 02 80 00 28 be 400117d8 4001173c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40011740: 80 a6 a0 00 cmp %i2, 0 40011744: 02 80 00 25 be 400117d8 40011748: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001174c: 80 a6 60 00 cmp %i1, 0 40011750: 02 80 00 22 be 400117d8 40011754: b0 10 20 0a mov 0xa, %i0 40011758: 11 10 00 cf sethi %hi(0x40033c00), %o0 4001175c: 92 10 00 11 mov %l1, %o1 40011760: 90 12 23 fc or %o0, 0x3fc, %o0 40011764: 40 00 0a a3 call 400141f0 <_Objects_Get> 40011768: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001176c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011770: a0 10 00 08 mov %o0, %l0 40011774: 80 a0 60 00 cmp %g1, 0 40011778: 12 80 00 18 bne 400117d8 4001177c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40011780: 40 00 13 61 call 40016504 <_Watchdog_Remove> 40011784: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40011788: 7f ff e6 8a call 4000b1b0 4001178c: 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 ) { 40011790: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40011794: 80 a0 60 00 cmp %g1, 0 40011798: 12 80 00 12 bne 400117e0 4001179c: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400117a0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400117a4: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400117a8: 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; 400117ac: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400117b0: 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; 400117b4: 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 ); 400117b8: 7f ff e6 82 call 4000b1c0 400117bc: 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 ); 400117c0: 03 10 00 d0 sethi %hi(0x40034000), %g1 400117c4: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 ! 4003403c <_Timer_Server_schedule_operation> 400117c8: 9f c0 80 00 call %g2 400117cc: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400117d0: 40 00 0c ef call 40014b8c <_Thread_Enable_dispatch> 400117d4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400117d8: 81 c7 e0 08 ret 400117dc: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 400117e0: 7f ff e6 78 call 4000b1c0 <== NOT EXECUTED 400117e4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400117e8: 40 00 0c e9 call 40014b8c <_Thread_Enable_dispatch> <== NOT EXECUTED 400117ec: 01 00 00 00 nop <== NOT EXECUTED 400117f0: 81 c7 e0 08 ret <== NOT EXECUTED 400117f4: 81 e8 00 00 restore <== NOT EXECUTED 400065e0 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 400065e0: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 400065e4: 80 a6 60 00 cmp %i1, 0 400065e8: 02 80 00 05 be 400065fc 400065ec: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 400065f0: 80 a6 20 00 cmp %i0, 0 400065f4: 12 80 00 04 bne 40006604 400065f8: 11 10 00 78 sethi %hi(0x4001e000), %o0 if (!ptr) return false; *pointer = ptr; return true; } 400065fc: 81 c7 e0 08 ret <== NOT EXECUTED 40006600: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 40006604: 40 00 05 fd call 40007df8 <_Protected_heap_Allocate> 40006608: 90 12 22 f4 or %o0, 0x2f4, %o0 if (!ptr) 4000660c: 80 a2 20 00 cmp %o0, 0 40006610: 02 bf ff fb be 400065fc 40006614: 01 00 00 00 nop return false; *pointer = ptr; 40006618: d0 26 40 00 st %o0, [ %i1 ] 4000661c: 81 c7 e0 08 ret 40006620: 91 e8 20 01 restore %g0, 1, %o0 400065c4 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 400065c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 400065c8: 11 10 00 78 sethi %hi(0x4001e000), %o0 <== NOT EXECUTED 400065cc: 90 12 22 f4 or %o0, 0x2f4, %o0 ! 4001e2f4 <_Workspace_Area> <== NOT EXECUTED 400065d0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400065d4: 40 00 06 15 call 40007e28 <_Protected_heap_Free> <== NOT EXECUTED 400065d8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400065dc: 01 00 00 00 nop 40006624 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 40006624: 80 a2 20 00 cmp %o0, 0 40006628: 02 80 00 07 be 40006644 4000662c: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 40006630: 11 10 00 78 sethi %hi(0x4001e000), %o0 40006634: 90 12 22 f4 or %o0, 0x2f4, %o0 ! 4001e2f4 <_Workspace_Area> 40006638: 82 13 c0 00 mov %o7, %g1 4000663c: 40 00 06 07 call 40007e58 <_Protected_heap_Get_information> 40006640: 9e 10 40 00 mov %g1, %o7 } 40006644: 81 c3 e0 08 retl <== NOT EXECUTED 40006648: 01 00 00 00 nop 40007dd4 : */ int sem_destroy( sem_t *sem ) { 40007dd4: 9d e3 bf 90 save %sp, -112, %sp 40007dd8: d2 06 00 00 ld [ %i0 ], %o1 40007ddc: 11 10 00 80 sethi %hi(0x40020000), %o0 40007de0: 94 07 bf f4 add %fp, -12, %o2 40007de4: 40 00 09 78 call 4000a3c4 <_Objects_Get> 40007de8: 90 12 21 e0 or %o0, 0x1e0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40007dec: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007df0: 80 a0 60 00 cmp %g1, 0 40007df4: 22 80 00 08 be,a 40007e14 40007df8: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40007dfc: 40 00 24 f0 call 400111bc <__errno> 40007e00: b0 10 3f ff mov -1, %i0 40007e04: 82 10 20 16 mov 0x16, %g1 40007e08: c2 22 00 00 st %g1, [ %o0 ] } 40007e0c: 81 c7 e0 08 ret 40007e10: 81 e8 00 00 restore case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40007e14: 80 a0 60 00 cmp %g1, 0 40007e18: 12 80 00 08 bne 40007e38 40007e1c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 40007e20: 40 00 1c 1d call 4000ee94 <_POSIX_Semaphore_Delete> 40007e24: b0 10 20 00 clr %i0 ! 0 _Thread_Enable_dispatch(); 40007e28: 40 00 0b a0 call 4000aca8 <_Thread_Enable_dispatch> 40007e2c: 01 00 00 00 nop 40007e30: 81 c7 e0 08 ret 40007e34: 81 e8 00 00 restore /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 40007e38: 40 00 0b 9c call 4000aca8 <_Thread_Enable_dispatch> <== NOT EXECUTED 40007e3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40007e40: 40 00 24 df call 400111bc <__errno> <== NOT EXECUTED 40007e44: 01 00 00 00 nop <== NOT EXECUTED 40007e48: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40007e4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007e50: 81 c7 e0 08 ret <== NOT EXECUTED 40007e54: 81 e8 00 00 restore <== NOT EXECUTED 40007eac : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 40007eac: 9d e3 bf 90 save %sp, -112, %sp 40007eb0: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 40007eb4: 80 a6 20 00 cmp %i0, 0 40007eb8: 02 80 00 0c be 40007ee8 40007ebc: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 40007ec0: 90 10 20 00 clr %o0 40007ec4: 40 00 1b a8 call 4000ed64 <_POSIX_Semaphore_Create_support> 40007ec8: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 40007ecc: 80 a2 3f ff cmp %o0, -1 40007ed0: 02 80 00 04 be 40007ee0 40007ed4: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 40007ed8: c4 00 60 08 ld [ %g1 + 8 ], %g2 40007edc: c4 26 00 00 st %g2, [ %i0 ] return status; } 40007ee0: 81 c7 e0 08 ret 40007ee4: 91 e8 00 08 restore %g0, %o0, %o0 { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 40007ee8: 40 00 24 b5 call 400111bc <__errno> <== NOT EXECUTED 40007eec: 01 00 00 00 nop <== NOT EXECUTED 40007ef0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40007ef4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007ef8: 10 bf ff fa b 40007ee0 <== NOT EXECUTED 40007efc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000807c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 4000807c: 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 ); 40008080: 90 10 00 19 mov %i1, %o0 40008084: 40 00 18 c3 call 4000e390 <_POSIX_Absolute_timeout_to_ticks> 40008088: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 4000808c: 80 a2 20 02 cmp %o0, 2 40008090: 08 80 00 07 bleu 400080ac 40008094: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 40008098: 90 10 00 18 mov %i0, %o0 4000809c: 40 00 1b b2 call 4000ef64 <_POSIX_Semaphore_Wait_support> 400080a0: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 400080a4: 81 c7 e0 08 ret 400080a8: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 400080ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400080b0: 40 00 1b ad call 4000ef64 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 400080b4: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 400080b8: 81 c7 e0 08 ret <== NOT EXECUTED 400080bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000817c : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 4000817c: 92 10 20 01 mov 1, %o1 40008180: 94 10 20 00 clr %o2 40008184: 82 13 c0 00 mov %o7, %g1 40008188: 40 00 1b 77 call 4000ef64 <_POSIX_Semaphore_Wait_support> 4000818c: 9e 10 40 00 mov %g1, %o7 40008190: 01 00 00 00 nop <== NOT EXECUTED 40007fe0 : #include int sigsuspend( const sigset_t *sigmask ) { 40007fe0: 9d e3 bf 90 save %sp, -112, %sp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 40007fe4: 90 10 20 01 mov 1, %o0 40007fe8: 92 10 00 18 mov %i0, %o1 40007fec: a0 07 bf f4 add %fp, -12, %l0 40007ff0: 7f ff ff f1 call 40007fb4 40007ff4: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 40007ff8: a2 07 bf f0 add %fp, -16, %l1 40007ffc: 7f ff ff b7 call 40007ed8 40008000: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 40008004: 90 10 00 11 mov %l1, %o0 40008008: 92 10 20 00 clr %o1 4000800c: 40 00 00 2e call 400080c4 40008010: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 40008014: 92 10 00 10 mov %l0, %o1 status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); (void) sigfillset( &all_signals ); status = sigtimedwait( &all_signals, NULL, NULL ); 40008018: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 4000801c: 94 10 20 00 clr %o2 40008020: 7f ff ff e5 call 40007fb4 40008024: 90 10 20 00 clr %o0 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 40008028: 80 a4 7f ff cmp %l1, -1 4000802c: 12 80 00 05 bne 40008040 40008030: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 40008034: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40008038: 81 c7 e0 08 ret <== NOT EXECUTED 4000803c: 81 e8 00 00 restore <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 40008040: 40 00 23 f0 call 40011000 <__errno> 40008044: b0 10 3f ff mov -1, %i0 40008048: 82 10 20 04 mov 4, %g1 4000804c: c2 22 00 00 st %g1, [ %o0 ] 40008050: 81 c7 e0 08 ret 40008054: 81 e8 00 00 restore 40008294 : int sigwait( const sigset_t *set, int *sig ) { 40008294: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 40008298: 92 10 20 00 clr %o1 4000829c: 90 10 00 18 mov %i0, %o0 400082a0: 7f ff ff 89 call 400080c4 400082a4: 94 10 20 00 clr %o2 if ( status != -1 ) { 400082a8: 80 a2 3f ff cmp %o0, -1 400082ac: 02 80 00 07 be 400082c8 400082b0: 80 a6 60 00 cmp %i1, 0 if ( sig ) 400082b4: 02 80 00 03 be 400082c0 400082b8: b0 10 20 00 clr %i0 *sig = status; 400082bc: d0 26 40 00 st %o0, [ %i1 ] 400082c0: 81 c7 e0 08 ret 400082c4: 81 e8 00 00 restore return 0; } return errno; 400082c8: 40 00 23 4e call 40011000 <__errno> <== NOT EXECUTED 400082cc: 01 00 00 00 nop <== NOT EXECUTED 400082d0: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 400082d4: 81 c7 e0 08 ret <== NOT EXECUTED 400082d8: 81 e8 00 00 restore <== NOT EXECUTED 40006e38 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 40006e38: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 40006e3c: 80 a6 a0 00 cmp %i2, 0 40006e40: 02 80 00 54 be 40006f90 40006e44: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 40006e48: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 40006e4c: 82 10 61 ff or %g1, 0x1ff, %g1 40006e50: 80 a0 80 01 cmp %g2, %g1 40006e54: 18 80 00 4f bgu 40006f90 40006e58: 01 00 00 00 nop 40006e5c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40006e60: 80 a0 80 01 cmp %g2, %g1 40006e64: 18 80 00 4b bgu 40006f90 40006e68: 80 a0 a0 00 cmp %g2, 0 40006e6c: 06 80 00 49 bl 40006f90 40006e70: 80 a6 60 04 cmp %i1, 4 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 40006e74: 02 80 00 04 be 40006e84 40006e78: 80 a6 60 00 cmp %i1, 0 40006e7c: 12 80 00 45 bne 40006f90 40006e80: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 40006e84: c2 06 80 00 ld [ %i2 ], %g1 40006e88: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40006e8c: c6 06 a0 08 ld [ %i2 + 8 ], %g3 40006e90: c8 06 a0 0c ld [ %i2 + 0xc ], %g4 40006e94: c2 27 bf e4 st %g1, [ %fp + -28 ] 40006e98: c4 27 bf e8 st %g2, [ %fp + -24 ] 40006e9c: c6 27 bf ec st %g3, [ %fp + -20 ] /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 40006ea0: 80 a6 60 04 cmp %i1, 4 40006ea4: 02 80 00 5c be 40007014 40006ea8: c8 27 bf f0 st %g4, [ %fp + -16 ] 40006eac: 92 10 00 18 mov %i0, %o1 40006eb0: 11 10 00 7a sethi %hi(0x4001e800), %o0 40006eb4: 94 07 bf f4 add %fp, -12, %o2 40006eb8: 40 00 09 1f call 40009334 <_Objects_Get> 40006ebc: 90 12 20 70 or %o0, 0x70, %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 ) { 40006ec0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006ec4: 80 a0 60 00 cmp %g1, 0 40006ec8: 12 80 00 67 bne 40007064 40006ecc: 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 ) { 40006ed0: c2 07 bf ec ld [ %fp + -20 ], %g1 40006ed4: 80 a0 60 00 cmp %g1, 0 40006ed8: 12 80 00 05 bne 40006eec 40006edc: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006ee0: 80 a0 60 00 cmp %g1, 0 40006ee4: 02 80 00 31 be 40006fa8 40006ee8: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 40006eec: 40 00 0f 4b call 4000ac18 <_Timespec_To_ticks> 40006ef0: 90 10 00 1a mov %i2, %o0 40006ef4: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 40006ef8: 40 00 0f 48 call 4000ac18 <_Timespec_To_ticks> 40006efc: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 40006f00: 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 ); 40006f04: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 40006f08: 17 10 00 1c sethi %hi(0x40007000), %o3 40006f0c: 90 06 60 10 add %i1, 0x10, %o0 40006f10: 96 12 e0 7c or %o3, 0x7c, %o3 40006f14: 40 00 1b 93 call 4000dd60 <_POSIX_Timer_Insert_helper> 40006f18: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 40006f1c: 80 8a 20 ff btst 0xff, %o0 40006f20: 02 80 00 18 be 40006f80 40006f24: 80 a6 e0 00 cmp %i3, 0 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 40006f28: 02 80 00 0b be 40006f54 40006f2c: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 40006f30: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 40006f34: c2 26 c0 00 st %g1, [ %i3 ] 40006f38: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 40006f3c: c4 26 e0 04 st %g2, [ %i3 + 4 ] 40006f40: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 40006f44: c2 26 e0 08 st %g1, [ %i3 + 8 ] 40006f48: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 40006f4c: c4 26 e0 0c st %g2, [ %i3 + 0xc ] ptimer->timer_data = normalize; 40006f50: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 40006f54: 90 06 60 6c add %i1, 0x6c, %o0 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 40006f58: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 40006f5c: c4 07 bf e8 ld [ %fp + -24 ], %g2 40006f60: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 40006f64: c2 07 bf ec ld [ %fp + -20 ], %g1 40006f68: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 40006f6c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 40006f70: 82 10 20 03 mov 3, %g1 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 40006f74: c4 26 60 60 st %g2, [ %i1 + 0x60 ] /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 40006f78: 40 00 06 80 call 40008978 <_TOD_Get> 40006f7c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 40006f80: 40 00 0b 26 call 40009c18 <_Thread_Enable_dispatch> 40006f84: b0 10 20 00 clr %i0 40006f88: 81 c7 e0 08 ret 40006f8c: 81 e8 00 00 restore /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40006f90: 40 00 23 4f call 4000fccc <__errno> 40006f94: b0 10 3f ff mov -1, %i0 40006f98: 82 10 20 16 mov 0x16, %g1 40006f9c: c2 22 00 00 st %g1, [ %o0 ] 40006fa0: 81 c7 e0 08 ret 40006fa4: 81 e8 00 00 restore case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 40006fa8: 40 00 10 6c call 4000b158 <_Watchdog_Remove> 40006fac: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 40006fb0: 80 a6 e0 00 cmp %i3, 0 40006fb4: 02 80 00 0b be 40006fe0 40006fb8: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 40006fbc: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 <== NOT EXECUTED 40006fc0: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 40006fc4: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 <== NOT EXECUTED 40006fc8: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 40006fcc: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 <== NOT EXECUTED 40006fd0: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 40006fd4: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 <== NOT EXECUTED 40006fd8: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 40006fdc: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 40006fe0: b0 10 20 00 clr %i0 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 40006fe4: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 40006fe8: c4 07 bf e8 ld [ %fp + -24 ], %g2 40006fec: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 40006ff0: c2 07 bf ec ld [ %fp + -20 ], %g1 40006ff4: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 40006ff8: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 40006ffc: 82 10 20 04 mov 4, %g1 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 40007000: c4 26 60 60 st %g2, [ %i1 + 0x60 ] /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 40007004: 40 00 0b 05 call 40009c18 <_Thread_Enable_dispatch> 40007008: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000700c: 81 c7 e0 08 ret 40007010: 81 e8 00 00 restore normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 40007014: b2 07 bf ec add %fp, -20, %i1 40007018: 21 10 00 79 sethi %hi(0x4001e400), %l0 4000701c: 92 10 00 19 mov %i1, %o1 40007020: 40 00 0e d6 call 4000ab78 <_Timespec_Greater_than> 40007024: 90 14 21 b0 or %l0, 0x1b0, %o0 40007028: 80 8a 20 ff btst 0xff, %o0 4000702c: 12 bf ff d9 bne 40006f90 40007030: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 40007034: 94 10 00 19 mov %i1, %o2 40007038: 40 00 0e e2 call 4000abc0 <_Timespec_Subtract> 4000703c: 90 14 21 b0 or %l0, 0x1b0, %o0 40007040: 92 10 00 18 mov %i0, %o1 40007044: 11 10 00 7a sethi %hi(0x4001e800), %o0 40007048: 94 07 bf f4 add %fp, -12, %o2 4000704c: 40 00 08 ba call 40009334 <_Objects_Get> 40007050: 90 12 20 70 or %o0, 0x70, %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 ) { 40007054: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007058: 80 a0 60 00 cmp %g1, 0 4000705c: 02 bf ff 9d be 40006ed0 40007060: b2 10 00 08 mov %o0, %i1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40007064: 40 00 23 1a call 4000fccc <__errno> <== NOT EXECUTED 40007068: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000706c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40007070: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40007074: 81 c7 e0 08 ret <== NOT EXECUTED 40007078: 81 e8 00 00 restore <== NOT EXECUTED 40005360 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 40005360: 9d e3 bf 90 save %sp, -112, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 40005364: 03 10 00 57 sethi %hi(0x40015c00), %g1 40005368: a2 10 63 3c or %g1, 0x33c, %l1 ! 40015f3c <_POSIX_signals_Ualarm_timer> 4000536c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40005370: 80 a0 a0 00 cmp %g2, 0 40005374: 02 80 00 3c be 40005464 40005378: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 4000537c: 40 00 10 9d call 400095f0 <_Watchdog_Remove> 40005380: 90 10 00 11 mov %l1, %o0 40005384: 90 02 3f fe add %o0, -2, %o0 40005388: 80 a2 20 01 cmp %o0, 1 4000538c: 08 80 00 07 bleu 400053a8 40005390: b0 10 20 00 clr %i0 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 40005394: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40005398: 12 80 00 1a bne 40005400 <== NOT EXECUTED 4000539c: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 400053a0: 81 c7 e0 08 ret 400053a4: 81 e8 00 00 restore * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 400053a8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400053ac: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 400053b0: d0 04 60 14 ld [ %l1 + 0x14 ], %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400053b4: 92 07 bf f0 add %fp, -16, %o1 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 400053b8: 90 02 00 01 add %o0, %g1, %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400053bc: 40 00 0e f1 call 40008f80 <_Timespec_From_ticks> 400053c0: 90 22 00 02 sub %o0, %g2, %o0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400053c4: c4 07 bf f0 ld [ %fp + -16 ], %g2 remaining += tp.tv_nsec / 1000; 400053c8: d0 07 bf f4 ld [ %fp + -12 ], %o0 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400053cc: 87 28 a0 03 sll %g2, 3, %g3 400053d0: 83 28 a0 08 sll %g2, 8, %g1 400053d4: 82 20 40 03 sub %g1, %g3, %g1 remaining += tp.tv_nsec / 1000; 400053d8: 92 10 23 e8 mov 0x3e8, %o1 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400053dc: a1 28 60 06 sll %g1, 6, %l0 400053e0: a0 24 00 01 sub %l0, %g1, %l0 remaining += tp.tv_nsec / 1000; 400053e4: 40 00 34 a2 call 4001266c <.div> 400053e8: a0 04 00 02 add %l0, %g2, %l0 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400053ec: a1 2c 20 06 sll %l0, 6, %l0 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 400053f0: 80 a4 a0 00 cmp %l2, 0 400053f4: 02 bf ff eb be 400053a0 400053f8: b0 02 00 10 add %o0, %l0, %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 400053fc: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 40005400: 90 10 00 12 mov %l2, %o0 40005404: 40 00 34 98 call 40012664 <.udiv> 40005408: 92 14 22 40 or %l0, 0x240, %o1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000540c: 92 14 22 40 or %l0, 0x240, %o1 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 40005410: d0 27 bf f0 st %o0, [ %fp + -16 ] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 40005414: 40 00 35 40 call 40012914 <.urem> 40005418: 90 10 00 12 mov %l2, %o0 4000541c: 85 2a 20 02 sll %o0, 2, %g2 40005420: 83 2a 20 07 sll %o0, 7, %g1 40005424: 82 20 40 02 sub %g1, %g2, %g1 40005428: 82 00 40 08 add %g1, %o0, %g1 4000542c: 83 28 60 03 sll %g1, 3, %g1 ticks = _Timespec_To_ticks( &tp ); 40005430: a0 07 bf f0 add %fp, -16, %l0 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 40005434: c2 27 bf f4 st %g1, [ %fp + -12 ] ticks = _Timespec_To_ticks( &tp ); 40005438: 40 00 0e fd call 4000902c <_Timespec_To_ticks> 4000543c: 90 10 00 10 mov %l0, %o0 if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 40005440: 40 00 0e fb call 4000902c <_Timespec_To_ticks> 40005444: 90 10 00 10 mov %l0, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40005448: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000544c: d0 24 60 0c st %o0, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40005450: 11 10 00 58 sethi %hi(0x40016000), %o0 40005454: 40 00 0f fc call 40009444 <_Watchdog_Insert> 40005458: 90 12 21 80 or %o0, 0x180, %o0 ! 40016180 <_Watchdog_Ticks_chain> } return remaining; } 4000545c: 81 c7 e0 08 ret 40005460: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40005464: 03 10 00 15 sethi %hi(0x40005400), %g1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40005468: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; 4000546c: 82 10 60 90 or %g1, 0x90, %g1 the_watchdog->id = id; 40005470: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 40005474: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40005478: c2 24 60 1c st %g1, [ %l1 + 0x1c ] /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 4000547c: 80 a4 a0 00 cmp %l2, 0 40005480: 02 bf ff c8 be 400053a0 40005484: b0 10 20 00 clr %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 40005488: 10 bf ff de b 40005400 4000548c: 21 00 03 d0 sethi %hi(0xf4000), %l0