40007300 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40007300: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007304: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40007308: e0 00 60 84 ld [ %g1 + 0x84 ], %l0 ! 4001ac84 <_API_extensions_List> 4000730c: 82 10 60 84 or %g1, 0x84, %g1 40007310: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007314: 80 a4 00 11 cmp %l0, %l1 40007318: 02 80 00 0c be 40007348 <_API_extensions_Run_postdriver+0x48> 4000731c: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40007320: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007324: 80 a0 60 00 cmp %g1, 0 40007328: 22 80 00 05 be,a 4000733c <_API_extensions_Run_postdriver+0x3c> 4000732c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40007330: 9f c0 40 00 call %g1 40007334: 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 ) { 40007338: 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 ) ; 4000733c: 80 a4 00 11 cmp %l0, %l1 40007340: 32 bf ff f9 bne,a 40007324 <_API_extensions_Run_postdriver+0x24> 40007344: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007348: 81 c7 e0 08 ret 4000734c: 81 e8 00 00 restore 40007350 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40007350: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007354: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40007358: e0 00 60 84 ld [ %g1 + 0x84 ], %l0 ! 4001ac84 <_API_extensions_List> 4000735c: 82 10 60 84 or %g1, 0x84, %g1 40007360: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007364: 80 a4 00 11 cmp %l0, %l1 40007368: 02 80 00 0d be 4000739c <_API_extensions_Run_postswitch+0x4c> 4000736c: 03 10 00 6a sethi %hi(0x4001a800), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 40007370: a4 10 63 00 or %g1, 0x300, %l2 ! 4001ab00 <_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 ) 40007374: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007378: 80 a0 60 00 cmp %g1, 0 4000737c: 22 80 00 05 be,a 40007390 <_API_extensions_Run_postswitch+0x40> 40007380: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40007384: 9f c0 40 00 call %g1 40007388: 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 ) { 4000738c: 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 ) ; 40007390: 80 a4 00 11 cmp %l0, %l1 40007394: 32 bf ff f9 bne,a 40007378 <_API_extensions_Run_postswitch+0x28> 40007398: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000739c: 81 c7 e0 08 ret 400073a0: 81 e8 00 00 restore 400072b0 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 400072b0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400072b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400072b8: e0 00 60 84 ld [ %g1 + 0x84 ], %l0 ! 4001ac84 <_API_extensions_List> 400072bc: 82 10 60 84 or %g1, 0x84, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400072c0: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400072c4: 80 a4 00 11 cmp %l0, %l1 400072c8: 02 80 00 0c be 400072f8 <_API_extensions_Run_predriver+0x48> 400072cc: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 400072d0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400072d4: 80 a0 60 00 cmp %g1, 0 400072d8: 22 80 00 05 be,a 400072ec <_API_extensions_Run_predriver+0x3c> 400072dc: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 400072e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400072e4: 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 ) { 400072e8: 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 ) ; 400072ec: 80 a4 00 11 cmp %l0, %l1 400072f0: 32 bf ff f9 bne,a 400072d4 <_API_extensions_Run_predriver+0x24> 400072f4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400072f8: 81 c7 e0 08 ret 400072fc: 81 e8 00 00 restore 40009750 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 40009750: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 40009754: 03 10 00 75 sethi %hi(0x4001d400), %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 ); 40009758: 7f ff e5 d2 call 40002ea0 4000975c: e0 00 61 e0 ld [ %g1 + 0x1e0 ], %l0 ! 4001d5e0 <_Thread_Executing> 40009760: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 40009764: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 40009768: 80 a0 60 00 cmp %g1, 0 4000976c: 02 80 00 2d be 40009820 <_CORE_RWLock_Release+0xd0> 40009770: 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 ) { 40009774: 22 80 00 23 be,a 40009800 <_CORE_RWLock_Release+0xb0> 40009778: 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; 4000977c: 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; 40009780: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 40009784: 7f ff e5 cb call 40002eb0 40009788: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 4000978c: 40 00 06 07 call 4000afa8 <_Thread_queue_Dequeue> 40009790: 90 10 00 18 mov %i0, %o0 if ( next ) { 40009794: 80 a2 20 00 cmp %o0, 0 40009798: 02 80 00 18 be 400097f8 <_CORE_RWLock_Release+0xa8> 4000979c: 01 00 00 00 nop if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 400097a0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 400097a4: 80 a0 60 01 cmp %g1, 1 400097a8: 02 80 00 24 be 40009838 <_CORE_RWLock_Release+0xe8> 400097ac: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 400097b0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400097b4: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 400097b8: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 400097bc: 10 80 00 0a b 400097e4 <_CORE_RWLock_Release+0x94> 400097c0: 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 || 400097c4: 80 a0 60 01 cmp %g1, 1 400097c8: 02 80 00 0c be 400097f8 <_CORE_RWLock_Release+0xa8> 400097cc: 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; 400097d0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 400097d4: 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; 400097d8: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 400097dc: 40 00 07 19 call 4000b440 <_Thread_queue_Extract> 400097e0: 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 ); 400097e4: 40 00 07 68 call 4000b584 <_Thread_queue_First> 400097e8: 90 10 00 18 mov %i0, %o0 if ( !next || 400097ec: 80 a2 20 00 cmp %o0, 0 400097f0: 32 bf ff f5 bne,a 400097c4 <_CORE_RWLock_Release+0x74> 400097f4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 400097f8: 81 c7 e0 08 ret 400097fc: 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; 40009800: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 40009804: 80 a0 60 00 cmp %g1, 0 40009808: 02 bf ff dd be 4000977c <_CORE_RWLock_Release+0x2c> 4000980c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 40009810: 7f ff e5 a8 call 40002eb0 40009814: b0 10 20 00 clr %i0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40009818: 81 c7 e0 08 ret 4000981c: 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 ); 40009820: 7f ff e5 a4 call 40002eb0 <== NOT EXECUTED 40009824: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 40009828: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000982c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40009830: 81 c7 e0 08 ret <== NOT EXECUTED 40009834: 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; 40009838: 82 10 20 02 mov 2, %g1 4000983c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40009840: 81 c7 e0 08 ret 40009844: 91 e8 20 00 restore %g0, 0, %o0 4001389c <_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 ) { 4001389c: 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 ) { 400138a0: 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 ) { 400138a4: 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 ) { 400138a8: 80 a0 40 1a cmp %g1, %i2 400138ac: 0a 80 00 17 bcs 40013908 <_CORE_message_queue_Broadcast+0x6c> 400138b0: 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 ) { 400138b4: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 400138b8: 80 a0 60 00 cmp %g1, 0 400138bc: 02 80 00 0a be 400138e4 <_CORE_message_queue_Broadcast+0x48> 400138c0: a2 10 20 00 clr %l1 *count = 0; 400138c4: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 400138c8: 81 c7 e0 08 ret <== NOT EXECUTED 400138cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 400138d0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 400138d4: 40 00 23 3a call 4001c5bc 400138d8: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 400138dc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 400138e0: 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))) { 400138e4: 40 00 0a 05 call 400160f8 <_Thread_queue_Dequeue> 400138e8: 90 10 00 12 mov %l2, %o0 400138ec: 92 10 00 19 mov %i1, %o1 400138f0: a0 10 00 08 mov %o0, %l0 400138f4: 80 a2 20 00 cmp %o0, 0 400138f8: 12 bf ff f6 bne 400138d0 <_CORE_message_queue_Broadcast+0x34> 400138fc: 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; 40013900: e2 27 40 00 st %l1, [ %i5 ] 40013904: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40013908: 81 c7 e0 08 ret 4001390c: 81 e8 00 00 restore 40015950 <_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 ) { 40015950: 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 ) { 40015954: 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 ) { 40015958: 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 ) { 4001595c: 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 ) { 40015960: 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 ) { 40015964: 0a 80 00 22 bcs 400159ec <_CORE_message_queue_Submit+0x9c> 40015968: 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 ) { 4001596c: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40015970: 80 a0 a0 00 cmp %g2, 0 40015974: 02 80 00 22 be 400159fc <_CORE_message_queue_Submit+0xac> 40015978: 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 < 4001597c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40015980: 80 a0 40 02 cmp %g1, %g2 40015984: 18 80 00 2b bgu 40015a30 <_CORE_message_queue_Submit+0xe0> 40015988: 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 ) { 4001598c: 02 80 00 18 be 400159ec <_CORE_message_queue_Submit+0x9c> 40015990: 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() ) { 40015994: 03 10 00 ae sethi %hi(0x4002b800), %g1 40015998: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4002bb9c <_ISR_Nest_level> 4001599c: 80 a0 a0 00 cmp %g2, 0 400159a0: 32 80 00 13 bne,a 400159ec <_CORE_message_queue_Submit+0x9c> 400159a4: 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; 400159a8: 03 10 00 ae sethi %hi(0x4002b800), %g1 _ISR_Disable( level ); 400159ac: 7f ff b3 2b call 40002658 400159b0: e0 00 63 c0 ld [ %g1 + 0x3c0 ], %l0 ! 4002bbc0 <_Thread_Executing> 400159b4: 82 10 20 01 mov 1, %g1 400159b8: 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; 400159bc: 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; 400159c0: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 400159c4: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 400159c8: 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; 400159cc: 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 ); 400159d0: 7f ff b3 26 call 40002668 400159d4: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 400159d8: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 400159dc: 90 10 00 11 mov %l1, %o0 400159e0: 15 10 00 3f sethi %hi(0x4000fc00), %o2 400159e4: 7f ff e7 9e call 4000f85c <_Thread_queue_Enqueue_with_handler> 400159e8: 94 12 a0 b4 or %o2, 0xb4, %o2 ! 4000fcb4 <_Thread_queue_Timeout> 400159ec: 81 c7 e0 08 ret 400159f0: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 400159f4: 81 c7 e0 08 ret <== NOT EXECUTED 400159f8: 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 ); 400159fc: 7f ff e7 34 call 4000f6cc <_Thread_queue_Dequeue> 40015a00: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40015a04: a0 92 20 00 orcc %o0, 0, %l0 40015a08: 02 80 00 1b be 40015a74 <_CORE_message_queue_Submit+0x124> 40015a0c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015a10: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40015a14: 40 00 15 3b call 4001af00 40015a18: 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; 40015a1c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40015a20: 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; 40015a24: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40015a28: 81 c7 e0 08 ret 40015a2c: 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 *) 40015a30: 7f ff e0 1e call 4000daa8 <_Chain_Get> 40015a34: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40015a38: a0 92 20 00 orcc %o0, 0, %l0 40015a3c: 02 bf ff ee be 400159f4 <_CORE_message_queue_Submit+0xa4> 40015a40: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015a44: 94 10 00 1a mov %i2, %o2 40015a48: 40 00 15 2e call 4001af00 40015a4c: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40015a50: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40015a54: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40015a58: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40015a5c: 92 10 00 10 mov %l0, %o1 40015a60: 94 10 00 1d mov %i5, %o2 40015a64: 40 00 0d 1c call 40018ed4 <_CORE_message_queue_Insert_message> 40015a68: b0 10 20 00 clr %i0 40015a6c: 81 c7 e0 08 ret 40015a70: 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 ) { 40015a74: 10 bf ff c2 b 4001597c <_CORE_message_queue_Submit+0x2c> 40015a78: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4000cf40 <_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 ) { 4000cf40: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000cf44: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000cf48: c6 00 63 00 ld [ %g1 + 0x300 ], %g3 ! 4001ab00 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000cf4c: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000cf50: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000cf54: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000cf58: 80 a0 60 00 cmp %g1, 0 4000cf5c: 22 80 00 12 be,a 4000cfa4 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000cf60: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 4000cf64: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000cf68: 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; 4000cf6c: 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; 4000cf70: 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; 4000cf74: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000cf78: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000cf7c: 80 a0 a0 02 cmp %g2, 2 4000cf80: 02 80 00 0e be 4000cfb8 <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000cf84: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000cf88: 80 a0 a0 03 cmp %g2, 3 4000cf8c: 22 80 00 0d be,a 4000cfc0 <_CORE_mutex_Seize_interrupt_trylock+0x80> 4000cf90: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 4000cf94: 7f ff d3 a9 call 40001e38 4000cf98: b0 10 20 00 clr %i0 4000cf9c: 81 c7 e0 08 ret 4000cfa0: 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 ) ) { 4000cfa4: 80 a0 c0 01 cmp %g3, %g1 4000cfa8: 22 80 00 2a be,a 4000d050 <_CORE_mutex_Seize_interrupt_trylock+0x110> 4000cfac: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000cfb0: 81 c7 e0 08 ret 4000cfb4: 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++; 4000cfb8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000cfbc: 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++; 4000cfc0: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000cfc4: 12 bf ff f4 bne 4000cf94 <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000cfc8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000cfcc: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 4000cfd0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 if ( current == ceiling ) { 4000cfd4: 80 a0 80 01 cmp %g2, %g1 4000cfd8: 02 80 00 2f be 4000d094 <_CORE_mutex_Seize_interrupt_trylock+0x154> 4000cfdc: 01 00 00 00 nop _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000cfe0: 1a 80 00 11 bcc 4000d024 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 4000cfe4: 82 10 20 06 mov 6, %g1 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000cfe8: 05 10 00 6a sethi %hi(0x4001a800), %g2 4000cfec: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> 4000cff0: 82 00 60 01 inc %g1 4000cff4: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000cff8: 7f ff d3 90 call 40001e38 4000cffc: 01 00 00 00 nop _Thread_Change_priority( 4000d000: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000d004: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000d008: 94 10 20 00 clr %o2 4000d00c: 7f ff ed a9 call 400086b0 <_Thread_Change_priority> 4000d010: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000d014: 7f ff ef 21 call 40008c98 <_Thread_Enable_dispatch> 4000d018: 01 00 00 00 nop 4000d01c: 81 c7 e0 08 ret 4000d020: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000d024: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4000d028: 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; 4000d02c: 84 10 20 01 mov 1, %g2 4000d030: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000d034: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000d038: 82 00 7f ff add %g1, -1, %g1 4000d03c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] _ISR_Enable( level ); 4000d040: 7f ff d3 7e call 40001e38 4000d044: b0 10 20 00 clr %i0 4000d048: 81 c7 e0 08 ret 4000d04c: 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 ) { 4000d050: 80 a0 60 00 cmp %g1, 0 4000d054: 22 80 00 0a be,a 4000d07c <_CORE_mutex_Seize_interrupt_trylock+0x13c> 4000d058: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000d05c: 80 a0 60 01 cmp %g1, 1 4000d060: 12 bf ff d4 bne 4000cfb0 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000d064: 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; 4000d068: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 4000d06c: 7f ff d3 73 call 40001e38 4000d070: b0 10 20 00 clr %i0 4000d074: 81 c7 e0 08 ret 4000d078: 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++; 4000d07c: 82 00 60 01 inc %g1 4000d080: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000d084: 7f ff d3 6d call 40001e38 4000d088: b0 10 20 00 clr %i0 4000d08c: 81 c7 e0 08 ret 4000d090: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000d094: 7f ff d3 69 call 40001e38 <== NOT EXECUTED 4000d098: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000d09c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d0a0: 81 e8 00 00 restore <== NOT EXECUTED 40007720 <_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 ) { 40007720: 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 ) { 40007724: 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 ) { 40007728: 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 ) { 4000772c: 80 a0 60 00 cmp %g1, 0 40007730: 02 80 00 07 be 4000774c <_CORE_mutex_Surrender+0x2c> 40007734: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 40007738: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000773c: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 40007740: 80 a2 00 02 cmp %o0, %g2 40007744: 12 80 00 2e bne 400077fc <_CORE_mutex_Surrender+0xdc> 40007748: 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 ) 4000774c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40007750: 80 a0 60 00 cmp %g1, 0 40007754: 02 80 00 22 be 400077dc <_CORE_mutex_Surrender+0xbc> 40007758: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 4000775c: 80 a0 60 00 cmp %g1, 0 40007760: 12 80 00 21 bne 400077e4 <_CORE_mutex_Surrender+0xc4> 40007764: 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; 40007768: 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 ) || 4000776c: 80 a0 a0 02 cmp %g2, 2 40007770: 02 80 00 31 be 40007834 <_CORE_mutex_Surrender+0x114> 40007774: 80 a0 a0 03 cmp %g2, 3 40007778: 22 80 00 30 be,a 40007838 <_CORE_mutex_Surrender+0x118> 4000777c: 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; 40007780: 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 ) || 40007784: 80 a0 a0 02 cmp %g2, 2 40007788: 02 80 00 1f be 40007804 <_CORE_mutex_Surrender+0xe4> 4000778c: c0 24 20 60 clr [ %l0 + 0x60 ] 40007790: 80 a0 a0 03 cmp %g2, 3 40007794: 22 80 00 1d be,a 40007808 <_CORE_mutex_Surrender+0xe8> 40007798: 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 ) ) ) { 4000779c: 40 00 06 1a call 40009004 <_Thread_queue_Dequeue> 400077a0: 90 10 00 10 mov %l0, %o0 400077a4: 86 92 20 00 orcc %o0, 0, %g3 400077a8: 02 80 00 37 be 40007884 <_CORE_mutex_Surrender+0x164> 400077ac: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400077b0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 400077b4: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400077b8: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400077bc: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400077c0: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 400077c4: 80 a0 a0 02 cmp %g2, 2 400077c8: 02 80 00 2a be 40007870 <_CORE_mutex_Surrender+0x150> 400077cc: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 400077d0: 80 a0 a0 03 cmp %g2, 3 400077d4: 22 80 00 1c be,a 40007844 <_CORE_mutex_Surrender+0x124> 400077d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400077dc: 81 c7 e0 08 ret 400077e0: 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 ) { 400077e4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 400077e8: 80 a0 60 00 cmp %g1, 0 400077ec: 02 bf ff fc be 400077dc <_CORE_mutex_Surrender+0xbc> 400077f0: 80 a0 60 01 cmp %g1, 1 400077f4: 12 bf ff dd bne 40007768 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 400077f8: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400077fc: 81 c7 e0 08 ret 40007800: 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 && 40007804: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007808: 80 a0 60 00 cmp %g1, 0 4000780c: 12 bf ff e4 bne 4000779c <_CORE_mutex_Surrender+0x7c> 40007810: 01 00 00 00 nop 40007814: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40007818: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000781c: 80 a2 40 01 cmp %o1, %g1 40007820: 02 bf ff df be 4000779c <_CORE_mutex_Surrender+0x7c> 40007824: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40007828: 40 00 03 a2 call 400086b0 <_Thread_Change_priority> 4000782c: 94 10 20 01 mov 1, %o2 ! 1 40007830: 30 bf ff db b,a 4000779c <_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--; 40007834: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007838: 82 00 7f ff add %g1, -1, %g1 4000783c: 10 bf ff d1 b 40007780 <_CORE_mutex_Surrender+0x60> 40007840: 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 < 40007844: 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++; 40007848: 82 00 60 01 inc %g1 4000784c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 40007850: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 40007854: 80 a2 40 02 cmp %o1, %g2 40007858: 1a bf ff e1 bcc 400077dc <_CORE_mutex_Surrender+0xbc> 4000785c: 94 10 20 00 clr %o2 the_thread->current_priority){ _Thread_Change_priority( 40007860: 40 00 03 94 call 400086b0 <_Thread_Change_priority> 40007864: b0 10 20 00 clr %i0 40007868: 81 c7 e0 08 ret 4000786c: 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++; 40007870: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40007874: 82 00 60 01 inc %g1 40007878: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 4000787c: 81 c7 e0 08 ret 40007880: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007884: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40007888: 81 c7 e0 08 ret 4000788c: 91 e8 20 00 restore %g0, 0, %o0 400082c0 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 400082c0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 400082c4: 7f ff e8 b0 call 40002584 400082c8: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 400082cc: c2 06 20 04 ld [ %i0 + 4 ], %g1 400082d0: 80 a0 60 00 cmp %g1, 0 400082d4: 02 80 00 0c be 40008304 <_CORE_spinlock_Release+0x44> 400082d8: 03 10 00 54 sethi %hi(0x40015000), %g1 } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 400082dc: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 40015050 <_Thread_Executing> 400082e0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 400082e4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 400082e8: 80 a0 c0 01 cmp %g3, %g1 400082ec: 02 80 00 0a be 40008314 <_CORE_spinlock_Release+0x54> 400082f0: 01 00 00 00 nop _ISR_Enable( level ); 400082f4: 7f ff e8 a8 call 40002594 <== NOT EXECUTED 400082f8: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 400082fc: 81 c7 e0 08 ret <== NOT EXECUTED 40008300: 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 ); 40008304: 7f ff e8 a4 call 40002594 40008308: b0 10 20 06 mov 6, %i0 4000830c: 81 c7 e0 08 ret 40008310: 81 e8 00 00 restore } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40008314: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008318: 82 00 7f ff add %g1, -1, %g1 4000831c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40008320: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40008324: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40008328: 7f ff e8 9b call 40002594 4000832c: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40008330: 81 c7 e0 08 ret 40008334: 81 e8 00 00 restore 40008338 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 40008338: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 4000833c: 05 10 00 54 sethi %hi(0x40015000), %g2 40008340: c2 00 a0 e4 ld [ %g2 + 0xe4 ], %g1 ! 400150e4 <_Watchdog_Ticks_since_boot> 40008344: a2 10 a0 e4 or %g2, 0xe4, %l1 _ISR_Disable( level ); 40008348: 7f ff e8 8f call 40002584 4000834c: a0 06 80 01 add %i2, %g1, %l0 40008350: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40008354: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008358: 80 a0 60 01 cmp %g1, 1 4000835c: 02 80 00 34 be 4000842c <_CORE_spinlock_Wait+0xf4> 40008360: 03 10 00 54 sethi %hi(0x40015000), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40008364: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008368: 82 00 60 01 inc %g1 4000836c: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008370: c4 06 20 04 ld [ %i0 + 4 ], %g2 40008374: 80 a0 a0 00 cmp %g2, 0 40008378: 02 80 00 1a be 400083e0 <_CORE_spinlock_Wait+0xa8> 4000837c: 80 8e 60 ff btst 0xff, %i1 40008380: 03 10 00 53 sethi %hi(0x40014c00), %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40008384: 02 80 00 22 be 4000840c <_CORE_spinlock_Wait+0xd4> 40008388: b2 10 63 90 or %g1, 0x390, %i1 ! 40014f90 <_Thread_Dispatch_disable_level> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 4000838c: 80 a6 a0 00 cmp %i2, 0 40008390: 02 80 00 06 be 400083a8 <_CORE_spinlock_Wait+0x70> 40008394: 01 00 00 00 nop 40008398: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4000839c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400083a0: 08 80 00 2d bleu 40008454 <_CORE_spinlock_Wait+0x11c> <== NOT EXECUTED 400083a4: 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 ); 400083a8: 7f ff e8 7b call 40002594 400083ac: 90 10 00 04 mov %g4, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 400083b0: 40 00 04 d9 call 40009714 <_Thread_Enable_dispatch> 400083b4: 01 00 00 00 nop 400083b8: c2 06 40 00 ld [ %i1 ], %g1 400083bc: 82 00 60 01 inc %g1 400083c0: 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 ); 400083c4: 7f ff e8 70 call 40002584 400083c8: 01 00 00 00 nop 400083cc: 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 ) { 400083d0: c2 06 20 04 ld [ %i0 + 4 ], %g1 400083d4: 80 a0 60 00 cmp %g1, 0 400083d8: 12 bf ff ee bne 40008390 <_CORE_spinlock_Wait+0x58> 400083dc: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 400083e0: 03 10 00 54 sethi %hi(0x40015000), %g1 400083e4: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 40015050 <_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; 400083e8: 84 10 20 01 mov 1, %g2 400083ec: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 400083f0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 400083f4: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 400083f8: b0 10 20 00 clr %i0 400083fc: 7f ff e8 66 call 40002594 40008400: 90 10 00 04 mov %g4, %o0 40008404: 81 c7 e0 08 ret 40008408: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 4000840c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008410: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008414: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008418: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 4000841c: 7f ff e8 5e call 40002594 <== NOT EXECUTED 40008420: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40008424: 81 c7 e0 08 ret <== NOT EXECUTED 40008428: 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) && 4000842c: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40008430: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40008434: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008438: 80 a0 c0 01 cmp %g3, %g1 4000843c: 12 bf ff ca bne 40008364 <_CORE_spinlock_Wait+0x2c> 40008440: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40008444: 7f ff e8 54 call 40002594 40008448: b0 10 20 01 mov 1, %i0 ! 1 4000844c: 81 c7 e0 08 ret 40008450: 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; 40008454: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008458: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000845c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008460: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40008464: 7f ff e8 4c call 40002594 <== NOT EXECUTED 40008468: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 4000846c: 81 c7 e0 08 ret <== NOT EXECUTED 40008470: 81 e8 00 00 restore <== NOT EXECUTED 400265cc <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 400265cc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 400265d0: 7f ff 76 23 call 40003e5c <== NOT EXECUTED 400265d4: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400265d8: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400265dc: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 400265e0: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 400265e4: 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; 400265e8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 400265ec: 7f ff 76 20 call 40003e6c <== NOT EXECUTED 400265f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400265f4: 01 00 00 00 nop 4000ce00 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000ce00: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000ce04: c4 00 63 04 ld [ %g1 + 0x304 ], %g2 ! 4001ab04 <_Debug_Level> <== NOT EXECUTED 4000ce08: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 4000ce0c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000ce10: 81 c3 e0 08 retl <== NOT EXECUTED 4000ce14: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40006460 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40006460: 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 ]; 40006464: f2 06 21 5c ld [ %i0 + 0x15c ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40006468: 7f ff ee 70 call 40001e28 4000646c: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40006470: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 40006474: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40006478: 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 ) ) { 4000647c: 9a 88 c0 04 andcc %g3, %g4, %o5 40006480: 02 80 00 28 be 40006520 <_Event_Surrender+0xc0> 40006484: 03 10 00 6a sethi %hi(0x4001a800), %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() && 40006488: c4 00 62 dc ld [ %g1 + 0x2dc ], %g2 ! 4001aadc <_ISR_Nest_level> 4000648c: 80 a0 a0 00 cmp %g2, 0 40006490: 22 80 00 08 be,a 400064b0 <_Event_Surrender+0x50> 40006494: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40006498: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000649c: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 400064a0: 80 a6 00 02 cmp %i0, %g2 400064a4: 02 80 00 2a be 4000654c <_Event_Surrender+0xec> 400064a8: 19 10 00 6c sethi %hi(0x4001b000), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400064ac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400064b0: 80 88 61 00 btst 0x100, %g1 400064b4: 02 80 00 19 be 40006518 <_Event_Surrender+0xb8> 400064b8: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400064bc: 02 80 00 04 be 400064cc <_Event_Surrender+0x6c> 400064c0: 80 8c 60 02 btst 2, %l1 400064c4: 02 80 00 15 be 40006518 <_Event_Surrender+0xb8> 400064c8: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400064cc: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400064d0: 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 ); 400064d4: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 400064d8: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400064dc: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400064e0: 7f ff ee 56 call 40001e38 400064e4: 90 10 00 10 mov %l0, %o0 400064e8: 7f ff ee 50 call 40001e28 400064ec: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400064f0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400064f4: 80 a0 60 02 cmp %g1, 2 400064f8: 02 80 00 0c be 40006528 <_Event_Surrender+0xc8> 400064fc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40006500: 90 10 00 10 mov %l0, %o0 40006504: 7f ff ee 4d call 40001e38 40006508: 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 ); 4000650c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006510: 40 00 08 e5 call 400088a4 <_Thread_Clear_state> 40006514: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40006518: 7f ff ee 48 call 40001e38 <== NOT EXECUTED 4000651c: 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 ); 40006520: 7f ff ee 46 call 40001e38 40006524: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40006528: 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 ); 4000652c: 7f ff ee 43 call 40001e38 40006530: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40006534: 40 00 0e d6 call 4000a08c <_Watchdog_Remove> 40006538: 90 06 20 48 add %i0, 0x48, %o0 4000653c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40006540: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006544: 40 00 08 d8 call 400088a4 <_Thread_Clear_state> 40006548: 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() && 4000654c: c2 03 23 60 ld [ %o4 + 0x360 ], %g1 40006550: 80 a0 60 01 cmp %g1, 1 40006554: 02 80 00 07 be 40006570 <_Event_Surrender+0x110> 40006558: 80 a0 c0 0d cmp %g3, %o5 4000655c: c2 03 23 60 ld [ %o4 + 0x360 ], %g1 40006560: 80 a0 60 02 cmp %g1, 2 40006564: 32 bf ff d3 bne,a 400064b0 <_Event_Surrender+0x50> 40006568: 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) ) { 4000656c: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 40006570: 02 80 00 04 be 40006580 <_Event_Surrender+0x120> 40006574: 80 8c 60 02 btst 2, %l1 40006578: 02 80 00 09 be 4000659c <_Event_Surrender+0x13c> <== NOT EXECUTED 4000657c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40006580: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40006584: 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 ); 40006588: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 4000658c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40006590: 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; 40006594: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40006598: c2 23 23 60 st %g1, [ %o4 + 0x360 ] } _ISR_Enable( level ); 4000659c: 7f ff ee 27 call 40001e38 400065a0: 91 e8 00 10 restore %g0, %l0, %o0 400065a4: 01 00 00 00 nop 400065a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400065a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400065ac: 90 10 00 18 mov %i0, %o0 400065b0: 40 00 09 c8 call 40008cd0 <_Thread_Get> 400065b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 400065b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065bc: 80 a0 60 00 cmp %g1, 0 400065c0: 12 80 00 19 bne 40006624 <_Event_Timeout+0x7c> 400065c4: 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 ); 400065c8: 7f ff ee 18 call 40001e28 400065cc: 01 00 00 00 nop 400065d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 400065d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400065d8: 80 a0 60 00 cmp %g1, 0 400065dc: 02 80 00 14 be 4000662c <_Event_Timeout+0x84> 400065e0: 03 10 00 6a sethi %hi(0x4001a800), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400065e4: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 400065e8: 80 a6 00 02 cmp %i0, %g2 400065ec: 02 80 00 18 be 4000664c <_Event_Timeout+0xa4> 400065f0: 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; 400065f4: 82 10 20 06 mov 6, %g1 400065f8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400065fc: 7f ff ee 0f call 40001e38 40006600: 90 10 00 03 mov %g3, %o0 40006604: 90 10 00 18 mov %i0, %o0 40006608: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000660c: 40 00 08 a6 call 400088a4 <_Thread_Clear_state> 40006610: 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; 40006614: 05 10 00 6a sethi %hi(0x4001a800), %g2 40006618: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> 4000661c: 82 00 7f ff add %g1, -1, %g1 40006620: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] 40006624: 81 c7 e0 08 ret 40006628: 81 e8 00 00 restore 4000662c: 05 10 00 6a sethi %hi(0x4001a800), %g2 <== NOT EXECUTED 40006630: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006634: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006638: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4000663c: 7f ff ed ff call 40001e38 <== NOT EXECUTED 40006640: 01 00 00 00 nop <== NOT EXECUTED 40006644: 81 c7 e0 08 ret <== NOT EXECUTED 40006648: 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; 4000664c: 05 10 00 6c sethi %hi(0x4001b000), %g2 40006650: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 4001b360 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40006654: 80 a0 60 01 cmp %g1, 1 40006658: 38 bf ff e8 bgu,a 400065f8 <_Event_Timeout+0x50> 4000665c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40006660: 82 10 20 02 mov 2, %g1 40006664: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 40006668: 10 bf ff e4 b 400065f8 <_Event_Timeout+0x50> 4000666c: 82 10 20 06 mov 6, %g1 4000a9a4 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000a9a4: 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; 4000a9a8: 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); 4000a9ac: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 4000a9b0: 90 10 00 19 mov %i1, %o0 4000a9b4: 92 10 00 16 mov %l6, %o1 4000a9b8: 40 00 01 82 call 4000afc0 <_Heap_Calc_block_size> 4000a9bc: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 4000a9c0: ae 92 20 00 orcc %o0, 0, %l7 4000a9c4: 02 80 00 69 be 4000ab68 <_Heap_Allocate_aligned+0x1c4> 4000a9c8: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 4000a9cc: 80 a6 a0 00 cmp %i2, 0 4000a9d0: 22 80 00 02 be,a 4000a9d8 <_Heap_Allocate_aligned+0x34> 4000a9d4: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000a9d8: 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; 4000a9dc: 80 a5 40 11 cmp %l5, %l1 4000a9e0: 02 80 00 62 be 4000ab68 <_Heap_Allocate_aligned+0x1c4> 4000a9e4: 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); 4000a9e8: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000a9ec: 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); 4000a9f0: 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; 4000a9f4: 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. */ 4000a9f8: 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; 4000a9fc: 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. */ 4000aa00: 18 80 00 22 bgu 4000aa88 <_Heap_Allocate_aligned+0xe4> 4000aa04: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000aa08: 40 00 41 11 call 4001ae4c <.urem> 4000aa0c: 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)); 4000aa10: 92 10 00 16 mov %l6, %o1 4000aa14: b0 24 00 08 sub %l0, %o0, %i0 4000aa18: 40 00 41 0d call 4001ae4c <.urem> 4000aa1c: 90 10 00 18 mov %i0, %o0 4000aa20: a0 04 60 08 add %l1, 8, %l0 4000aa24: 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) { 4000aa28: 80 a4 00 02 cmp %l0, %g2 4000aa2c: 38 80 00 18 bgu,a 4000aa8c <_Heap_Allocate_aligned+0xe8> 4000aa30: 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) { 4000aa34: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 4000aa38: 82 20 80 10 sub %g2, %l0, %g1 4000aa3c: 80 a0 40 1d cmp %g1, %i5 4000aa40: 1a 80 00 1e bcc 4000aab8 <_Heap_Allocate_aligned+0x114> 4000aa44: 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) { 4000aa48: 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; 4000aa4c: 90 10 00 10 mov %l0, %o0 4000aa50: 92 10 00 1a mov %i2, %o1 4000aa54: 80 a5 80 01 cmp %l6, %g1 4000aa58: 18 80 00 17 bgu 4000aab4 <_Heap_Allocate_aligned+0x110> 4000aa5c: 84 10 00 10 mov %l0, %g2 4000aa60: 40 00 40 fb call 4001ae4c <.urem> <== NOT EXECUTED 4000aa64: 01 00 00 00 nop <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 4000aa68: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED *value = r ? v - r + a : v; 4000aa6c: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 4000aa70: 86 10 20 00 clr %g3 <== NOT EXECUTED 4000aa74: 12 80 00 35 bne 4000ab48 <_Heap_Allocate_aligned+0x1a4> <== NOT EXECUTED 4000aa78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000aa7c: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 4000aa80: 38 80 00 0d bgu,a 4000aab4 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 4000aa84: 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) 4000aa88: 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; 4000aa8c: 80 a5 40 11 cmp %l5, %l1 4000aa90: 12 bf ff d6 bne 4000a9e8 <_Heap_Allocate_aligned+0x44> 4000aa94: a8 05 20 01 inc %l4 4000aa98: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 4000aa9c: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 4000aaa0: 80 a0 40 14 cmp %g1, %l4 4000aaa4: 2a 80 00 02 bcs,a 4000aaac <_Heap_Allocate_aligned+0x108> 4000aaa8: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 4000aaac: 81 c7 e0 08 ret 4000aab0: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000aab4: 80 a6 20 00 cmp %i0, 0 4000aab8: 22 bf ff f5 be,a 4000aa8c <_Heap_Allocate_aligned+0xe8> 4000aabc: 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; 4000aac0: 82 04 e0 08 add %l3, 8, %g1 4000aac4: 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; 4000aac8: 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) { 4000aacc: 80 a0 80 1d cmp %g2, %i5 4000aad0: 2a 80 00 29 bcs,a 4000ab74 <_Heap_Allocate_aligned+0x1d0> 4000aad4: 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; 4000aad8: 82 10 a0 01 or %g2, 1, %g1 4000aadc: 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); 4000aae0: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 4000aae4: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 4000aae8: 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 ); 4000aaec: 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; 4000aaf0: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000aaf4: 82 10 60 01 or %g1, 1, %g1 4000aaf8: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 4000aafc: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 4000ab00: 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; 4000ab04: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 4000ab08: 80 a0 c0 01 cmp %g3, %g1 4000ab0c: 1a 80 00 03 bcc 4000ab18 <_Heap_Allocate_aligned+0x174> 4000ab10: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 4000ab14: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 4000ab18: 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; 4000ab1c: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 4000ab20: 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; 4000ab24: 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; 4000ab28: 86 00 e0 01 inc %g3 stats->allocs += 1; 4000ab2c: 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; 4000ab30: 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; 4000ab34: 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; 4000ab38: 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; 4000ab3c: 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; 4000ab40: 10 bf ff d7 b 4000aa9c <_Heap_Allocate_aligned+0xf8> 4000ab44: 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; 4000ab48: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 4000ab4c: 90 20 40 04 sub %g1, %g4, %o0 <== NOT EXECUTED 4000ab50: 86 22 00 10 sub %o0, %l0, %g3 <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 4000ab54: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 4000ab58: 28 bf ff cd bleu,a 4000aa8c <_Heap_Allocate_aligned+0xe8> <== NOT EXECUTED 4000ab5c: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 4000ab60: 10 bf ff d5 b 4000aab4 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 4000ab64: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 4000ab68: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 4000ab6c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab70: 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; 4000ab74: 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; 4000ab78: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 4000ab7c: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 4000ab80: 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; 4000ab84: c6 20 a0 08 st %g3, [ %g2 + 8 ] 4000ab88: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 4000ab8c: 10 bf ff d8 b 4000aaec <_Heap_Allocate_aligned+0x148> 4000ab90: 88 10 00 12 mov %l2, %g4 40031bc4 <_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; 40031bc4: 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; 40031bc8: 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; 40031bcc: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 40031bd0: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 40031bd4: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 40031bd8: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 40031bdc: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 40031be0: 80 a0 40 0b cmp %g1, %o3 40031be4: 02 80 00 26 be 40031c7c <_Heap_Get_information+0xb8> 40031be8: c0 22 60 10 clr [ %o1 + 0x10 ] 40031bec: 10 80 00 0e b 40031c24 <_Heap_Get_information+0x60> 40031bf0: 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; 40031bf4: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 40031bf8: 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++; 40031bfc: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 40031c00: 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++; 40031c04: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 40031c08: 80 a0 c0 04 cmp %g3, %g4 40031c0c: 1a 80 00 03 bcc 40031c18 <_Heap_Get_information+0x54> 40031c10: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 40031c14: 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 ) { 40031c18: 80 a2 c0 0d cmp %o3, %o5 40031c1c: 02 80 00 18 be 40031c7c <_Heap_Get_information+0xb8> 40031c20: 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); 40031c24: 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 ); 40031c28: 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); 40031c2c: 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) ) { 40031c30: 80 8b 20 01 btst 1, %o4 40031c34: 32 bf ff f0 bne,a 40031bf4 <_Heap_Get_information+0x30> 40031c38: 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++; 40031c3c: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 40031c40: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 40031c44: 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++; 40031c48: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 40031c4c: 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++; 40031c50: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 40031c54: 80 a0 c0 04 cmp %g3, %g4 40031c58: 1a 80 00 03 bcc 40031c64 <_Heap_Get_information+0xa0> 40031c5c: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 40031c60: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 40031c64: c2 03 40 00 ld [ %o5 ], %g1 40031c68: 80 a0 40 04 cmp %g1, %g4 40031c6c: 02 bf ff ec be 40031c1c <_Heap_Get_information+0x58> 40031c70: 80 a2 c0 0d cmp %o3, %o5 40031c74: 81 c3 e0 08 retl <== NOT EXECUTED 40031c78: 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; 40031c7c: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 40031c80: 90 10 20 00 clr %o0 40031c84: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 40031c88: 81 c3 e0 08 retl 40031c8c: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40018254 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40018254: 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; 40018258: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 4001825c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 40018260: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 40018264: 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); 40018268: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4001826c: 7f ff f6 34 call 40015b3c <.urem> 40018270: 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 ); 40018274: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 40018278: 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); 4001827c: 82 06 7f f8 add %i1, -8, %g1 40018280: 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)) 40018284: 80 a4 40 04 cmp %l1, %g4 40018288: 84 60 3f ff subx %g0, -1, %g2 4001828c: 80 a0 c0 11 cmp %g3, %l1 40018290: 82 60 3f ff subx %g0, -1, %g1 40018294: 80 88 80 01 btst %g2, %g1 40018298: 02 80 00 2f be 40018354 <_Heap_Resize_block+0x100> 4001829c: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400182a0: 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); 400182a4: 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 ); 400182a8: 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) || 400182ac: 80 a4 80 04 cmp %l2, %g4 400182b0: 84 60 3f ff subx %g0, -1, %g2 400182b4: 80 a0 c0 12 cmp %g3, %l2 400182b8: 82 60 3f ff subx %g0, -1, %g1 400182bc: 80 88 80 01 btst %g2, %g1 400182c0: 02 80 00 25 be 40018354 <_Heap_Resize_block+0x100> 400182c4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 400182c8: c2 04 a0 04 ld [ %l2 + 4 ], %g1 400182cc: 80 88 60 01 btst 1, %g1 400182d0: 02 80 00 21 be 40018354 <_Heap_Resize_block+0x100> 400182d4: 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) || 400182d8: 80 a0 c0 12 cmp %g3, %l2 400182dc: a8 10 20 01 mov 1, %l4 400182e0: 02 80 00 04 be 400182f0 <_Heap_Resize_block+0x9c> 400182e4: 82 04 80 17 add %l2, %l7, %g1 400182e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 400182ec: 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) 400182f0: 82 24 80 19 sub %l2, %i1, %g1 400182f4: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 400182f8: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 400182fc: 80 a0 40 1a cmp %g1, %i2 40018300: 1a 80 00 17 bcc 4001835c <_Heap_Resize_block+0x108> 40018304: 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 */ 40018308: 80 8d 20 ff btst 0xff, %l4 4001830c: 12 80 00 10 bne 4001834c <_Heap_Resize_block+0xf8> 40018310: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40018314: 92 10 00 15 mov %l5, %o1 40018318: 7f ff f6 09 call 40015b3c <.urem> 4001831c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40018320: 80 a2 20 00 cmp %o0, 0 40018324: 02 80 00 05 be 40018338 <_Heap_Resize_block+0xe4> 40018328: 80 a4 00 16 cmp %l0, %l6 4001832c: 82 04 00 15 add %l0, %l5, %g1 40018330: a0 20 40 08 sub %g1, %o0, %l0 40018334: 80 a4 00 16 cmp %l0, %l6 40018338: 0a 80 00 2e bcs 400183f0 <_Heap_Resize_block+0x19c> 4001833c: 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) 40018340: 80 a5 c0 08 cmp %l7, %o0 40018344: 1a 80 00 32 bcc 4001840c <_Heap_Resize_block+0x1b8> 40018348: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 4001834c: 81 c7 e0 08 ret 40018350: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 40018354: 81 c7 e0 08 ret 40018358: 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; 4001835c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40018360: 92 10 00 15 mov %l5, %o1 40018364: 7f ff f5 f6 call 40015b3c <.urem> 40018368: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4001836c: a0 a4 00 08 subcc %l0, %o0, %l0 40018370: 22 80 00 1c be,a 400183e0 <_Heap_Resize_block+0x18c> 40018374: 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; 40018378: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 4001837c: 80 a5 80 02 cmp %l6, %g2 40018380: 18 80 00 1e bgu 400183f8 <_Heap_Resize_block+0x1a4> 40018384: 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) { 40018388: 80 8d 20 ff btst 0xff, %l4 4001838c: 12 80 00 2a bne 40018434 <_Heap_Resize_block+0x1e0> 40018390: 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; 40018394: 82 10 80 1b or %g2, %i3, %g1 40018398: 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 ); 4001839c: 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; 400183a0: 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; 400183a4: 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; 400183a8: 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; 400183ac: 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; 400183b0: 84 11 20 01 or %g4, 1, %g2 400183b4: 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; 400183b8: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 400183bc: da 20 e0 08 st %o5, [ %g3 + 8 ] 400183c0: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 400183c4: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 400183c8: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 400183cc: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 400183d0: c6 23 60 0c st %g3, [ %o5 + 0xc ] 400183d4: c6 23 20 08 st %g3, [ %o4 + 8 ] 400183d8: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 400183dc: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 400183e0: 82 00 60 01 inc %g1 400183e4: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 400183e8: 81 c7 e0 08 ret 400183ec: 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; 400183f0: 10 bf ff d4 b 40018340 <_Heap_Resize_block+0xec> 400183f4: 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) { 400183f8: a0 a4 00 01 subcc %l0, %g1, %l0 400183fc: 12 bf ff e3 bne 40018388 <_Heap_Resize_block+0x134> 40018400: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 40018404: 10 bf ff f7 b 400183e0 <_Heap_Resize_block+0x18c> 40018408: 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 = 4001840c: 92 10 00 12 mov %l2, %o1 40018410: 7f ff bd f7 call 40007bec <_Heap_Block_allocate> 40018414: 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; 40018418: 90 02 00 18 add %o0, %i0, %o0 4001841c: 90 12 00 1b or %o0, %i3, %o0 40018420: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 40018424: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40018428: 82 00 7f ff add %g1, -1, %g1 4001842c: 10 bf ff ec b 400183dc <_Heap_Resize_block+0x188> 40018430: 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) { 40018434: 38 bf ff eb bgu,a 400183e0 <_Heap_Resize_block+0x18c> <== NOT EXECUTED 40018438: 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; 4001843c: 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 ); 40018440: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 40018444: 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; 40018448: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 4001844c: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40018450: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40018454: 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 */ 40018458: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4001845c: 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 */ 40018460: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40018464: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 40018468: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4001846c: 7f ff d3 69 call 4000d210 <_Heap_Free> <== NOT EXECUTED 40018470: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 40018474: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 40018478: 10 bf ff d9 b 400183dc <_Heap_Resize_block+0x188> <== NOT EXECUTED 4001847c: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 40010b14 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 40010b14: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 40010b18: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 40010b1c: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 40010b20: 06 80 00 8c bl 40010d50 <_Heap_Walk+0x23c> 40010b24: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 40010b28: c2 04 60 04 ld [ %l1 + 4 ], %g1 40010b2c: 80 88 60 01 btst 1, %g1 40010b30: 02 80 00 81 be 40010d34 <_Heap_Walk+0x220> 40010b34: 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) { 40010b38: c4 04 40 00 ld [ %l1 ], %g2 40010b3c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40010b40: 80 a0 80 01 cmp %g2, %g1 40010b44: 02 80 00 08 be 40010b64 <_Heap_Walk+0x50> 40010b48: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 40010b4c: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010b50: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010b54: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40010b58: 7f ff d7 d6 call 40006ab0 <== NOT EXECUTED 40010b5c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 40010b60: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 40010b64: 22 80 00 63 be,a 40010cf0 <_Heap_Walk+0x1dc> 40010b68: 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)) { 40010b6c: 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); 40010b70: c8 04 60 04 ld [ %l1 + 4 ], %g4 40010b74: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 40010b78: 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 ); 40010b7c: a0 04 40 12 add %l1, %l2, %l0 40010b80: 80 a4 00 01 cmp %l0, %g1 40010b84: 84 60 3f ff subx %g0, -1, %g2 40010b88: 80 a0 c0 10 cmp %g3, %l0 40010b8c: 82 60 3f ff subx %g0, -1, %g1 40010b90: 80 88 80 01 btst %g2, %g1 40010b94: 02 80 00 77 be 40010d70 <_Heap_Walk+0x25c> 40010b98: 03 10 00 77 sethi %hi(0x4001dc00), %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); 40010b9c: 05 10 00 7a sethi %hi(0x4001e800), %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"); 40010ba0: ba 10 60 08 or %g1, 8, %i5 printk("PASS: %d !the_block not in the free list", source); 40010ba4: ae 10 a1 d8 or %g2, 0x1d8, %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); 40010ba8: 03 10 00 7a sethi %hi(0x4001e800), %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); 40010bac: 05 10 00 7a sethi %hi(0x4001e800), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40010bb0: 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); 40010bb4: b8 10 61 a8 or %g1, 0x1a8, %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); 40010bb8: b6 10 a1 78 or %g2, 0x178, %i3 40010bbc: 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)) { 40010bc0: c2 04 20 04 ld [ %l0 + 4 ], %g1 40010bc4: 80 88 60 01 btst 1, %g1 40010bc8: 12 80 00 20 bne 40010c48 <_Heap_Walk+0x134> 40010bcc: 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) { 40010bd0: c2 04 00 00 ld [ %l0 ], %g1 40010bd4: 80 a0 40 12 cmp %g1, %l2 40010bd8: 02 80 00 07 be 40010bf4 <_Heap_Walk+0xe0> 40010bdc: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 40010be0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 40010be4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010be8: 7f ff d7 b2 call 40006ab0 <== NOT EXECUTED 40010bec: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 40010bf0: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 40010bf4: 32 80 00 0a bne,a 40010c1c <_Heap_Walk+0x108> 40010bf8: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 40010bfc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40010c00: 12 80 00 49 bne 40010d24 <_Heap_Walk+0x210> <== NOT EXECUTED 40010c04: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 40010c08: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40010c0c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010c10: 7f ff d7 a8 call 40006ab0 <== NOT EXECUTED 40010c14: 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; 40010c18: 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) 40010c1c: 80 a0 40 11 cmp %g1, %l1 40010c20: 02 80 00 0a be 40010c48 <_Heap_Walk+0x134> 40010c24: 80 a4 e0 00 cmp %l3, 0 40010c28: 80 a6 00 01 cmp %i0, %g1 40010c2c: 02 80 00 58 be 40010d8c <_Heap_Walk+0x278> 40010c30: 80 a0 40 11 cmp %g1, %l1 block = block->next; 40010c34: 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) 40010c38: 80 a0 40 11 cmp %g1, %l1 40010c3c: 12 bf ff fc bne 40010c2c <_Heap_Walk+0x118> 40010c40: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 40010c44: 80 a4 e0 00 cmp %l3, 0 40010c48: 32 80 00 58 bne,a 40010da8 <_Heap_Walk+0x294> 40010c4c: 27 10 00 77 sethi %hi(0x4001dc00), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 40010c50: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40010c54: 80 a0 40 12 cmp %g1, %l2 40010c58: 18 80 00 40 bgu 40010d58 <_Heap_Walk+0x244> 40010c5c: 11 10 00 7a sethi %hi(0x4001e800), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 40010c60: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 40010c64: 40 00 28 7a call 4001ae4c <.urem> 40010c68: 90 10 00 12 mov %l2, %o0 40010c6c: 80 a2 20 00 cmp %o0, 0 40010c70: 12 80 00 15 bne 40010cc4 <_Heap_Walk+0x1b0> 40010c74: 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) 40010c78: 12 80 00 17 bne 40010cd4 <_Heap_Walk+0x1c0> 40010c7c: 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 ) { 40010c80: 02 80 00 1c be 40010cf0 <_Heap_Walk+0x1dc> 40010c84: 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); 40010c88: 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)) { 40010c8c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40010c90: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 40010c94: a4 09 3f fe and %g4, -2, %l2 40010c98: a0 04 00 12 add %l0, %l2, %l0 40010c9c: 80 a4 00 01 cmp %l0, %g1 40010ca0: 84 60 3f ff subx %g0, -1, %g2 40010ca4: 80 a0 c0 10 cmp %g3, %l0 40010ca8: 82 60 3f ff subx %g0, -1, %g1 40010cac: 80 88 80 01 btst %g2, %g1 40010cb0: 02 80 00 2f be 40010d6c <_Heap_Walk+0x258> 40010cb4: 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); 40010cb8: a2 10 00 15 mov %l5, %l1 40010cbc: 10 bf ff c1 b 40010bc0 <_Heap_Walk+0xac> 40010cc0: 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); 40010cc4: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010cc8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010ccc: 7f ff d7 79 call 40006ab0 <== NOT EXECUTED 40010cd0: 90 12 22 30 or %o0, 0x230, %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", 40010cd4: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 40010cd8: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010cdc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010ce0: 90 12 22 58 or %o0, 0x258, %o0 <== NOT EXECUTED 40010ce4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40010ce8: 7f ff d7 72 call 40006ab0 <== NOT EXECUTED 40010cec: 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) { 40010cf0: 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); 40010cf4: c2 04 60 04 ld [ %l1 + 4 ], %g1 40010cf8: 94 08 7f fe and %g1, -2, %o2 40010cfc: 80 a2 c0 0a cmp %o3, %o2 40010d00: 02 80 00 07 be 40010d1c <_Heap_Walk+0x208> 40010d04: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 40010d08: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d0c: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010d10: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40010d14: 7f ff d7 67 call 40006ab0 <== NOT EXECUTED 40010d18: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 40010d1c: 81 c7 e0 08 ret 40010d20: 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"); 40010d24: 7f ff d7 63 call 40006ab0 <== NOT EXECUTED 40010d28: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 40010d2c: 10 bf ff b8 b 40010c0c <_Heap_Walk+0xf8> <== NOT EXECUTED 40010d30: 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); 40010d34: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010d38: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d3c: 90 12 20 e0 or %o0, 0xe0, %o0 <== NOT EXECUTED 40010d40: 7f ff d7 5c call 40006ab0 <== NOT EXECUTED 40010d44: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 40010d48: 10 bf ff 7d b 40010b3c <_Heap_Walk+0x28> <== NOT EXECUTED 40010d4c: 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; 40010d50: 10 bf ff 76 b 40010b28 <_Heap_Walk+0x14> <== NOT EXECUTED 40010d54: 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); 40010d58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d5c: 7f ff d7 55 call 40006ab0 <== NOT EXECUTED 40010d60: 90 12 22 08 or %o0, 0x208, %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", 40010d64: 10 bf ff dd b 40010cd8 <_Heap_Walk+0x1c4> <== NOT EXECUTED 40010d68: 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); 40010d6c: 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); 40010d70: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40010d74: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010d78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d7c: 7f ff d7 4d call 40006ab0 <== NOT EXECUTED 40010d80: 90 12 21 50 or %o0, 0x150, %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", 40010d84: 10 bf ff d5 b 40010cd8 <_Heap_Walk+0x1c4> <== NOT EXECUTED 40010d88: 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) { 40010d8c: 02 bf ff ae be 40010c44 <_Heap_Walk+0x130> <== NOT EXECUTED 40010d90: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 40010d94: 12 80 00 0a bne 40010dbc <_Heap_Walk+0x2a8> <== NOT EXECUTED 40010d98: 27 10 00 77 sethi %hi(0x4001dc00), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 40010d9c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40010da0: 7f ff d7 44 call 40006ab0 <== NOT EXECUTED 40010da4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 40010da8: 90 14 e0 08 or %l3, 8, %o0 <== NOT EXECUTED 40010dac: 7f ff d7 41 call 40006ab0 <== NOT EXECUTED 40010db0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 40010db4: 10 bf ff a8 b 40010c54 <_Heap_Walk+0x140> <== NOT EXECUTED 40010db8: 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"); 40010dbc: 7f ff d7 3d call 40006ab0 <== NOT EXECUTED 40010dc0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 40010dc4: 10 bf ff f7 b 40010da0 <_Heap_Walk+0x28c> <== NOT EXECUTED 40010dc8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40007d5c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007d5c: 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 ) 40007d60: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007d64: 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 ) 40007d68: 80 a0 60 00 cmp %g1, 0 40007d6c: 02 80 00 1d be 40007de0 <_Objects_Allocate+0x84> 40007d70: 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 ); 40007d74: a2 04 20 20 add %l0, 0x20, %l1 40007d78: 40 00 14 47 call 4000ce94 <_Chain_Get> 40007d7c: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40007d80: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40007d84: 80 a0 60 00 cmp %g1, 0 40007d88: 02 80 00 16 be 40007de0 <_Objects_Allocate+0x84> 40007d8c: 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 ) { 40007d90: 80 a2 20 00 cmp %o0, 0 40007d94: 02 80 00 15 be 40007de8 <_Objects_Allocate+0x8c> 40007d98: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40007d9c: c4 06 20 08 ld [ %i0 + 8 ], %g2 40007da0: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007da4: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40007da8: 03 00 00 3f sethi %hi(0xfc00), %g1 40007dac: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007db0: 84 08 80 01 and %g2, %g1, %g2 40007db4: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007db8: 40 00 36 b5 call 4001588c <.udiv> 40007dbc: 90 20 80 08 sub %g2, %o0, %o0 40007dc0: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 40007dc4: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40007dc8: 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 ]--; 40007dcc: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 40007dd0: 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 ]--; 40007dd4: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 40007dd8: 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 ]--; 40007ddc: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 40007de0: 81 c7 e0 08 ret 40007de4: 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 ); 40007de8: 40 00 00 14 call 40007e38 <_Objects_Extend_information> 40007dec: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40007df0: 40 00 14 29 call 4000ce94 <_Chain_Get> 40007df4: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40007df8: b0 92 20 00 orcc %o0, 0, %i0 40007dfc: 32 bf ff e9 bne,a 40007da0 <_Objects_Allocate+0x44> 40007e00: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 40007e04: 81 c7 e0 08 ret <== NOT EXECUTED 40007e08: 81 e8 00 00 restore <== NOT EXECUTED 40007e38 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40007e38: 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; 40007e3c: 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 ) 40007e40: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40007e44: 03 00 00 3f sethi %hi(0xfc00), %g1 40007e48: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007e4c: a8 08 80 01 and %g2, %g1, %l4 40007e50: 80 a5 40 14 cmp %l5, %l4 40007e54: 1a 80 00 79 bcc 40008038 <_Objects_Extend_information+0x200> 40007e58: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40007e5c: a6 10 00 14 mov %l4, %l3 40007e60: a4 10 20 00 clr %l2 40007e64: a2 10 20 00 clr %l1 40007e68: ac 10 20 01 mov 1, %l6 40007e6c: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007e70: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40007e74: 80 a0 60 00 cmp %g1, 0 40007e78: 12 80 00 8d bne 400080ac <_Objects_Extend_information+0x274> 40007e7c: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40007e80: 90 02 00 14 add %o0, %l4, %o0 40007e84: 90 02 00 1d add %o0, %i5, %o0 40007e88: 40 00 08 f0 call 4000a248 <_Workspace_Allocate_or_fatal_error> 40007e8c: 91 2a 20 02 sll %o0, 2, %o0 40007e90: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007e94: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007e98: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007e9c: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007ea0: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007ea4: 18 80 00 94 bgu 400080f4 <_Objects_Extend_information+0x2bc> 40007ea8: 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++ ) { 40007eac: 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, 40007eb0: 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++ ) { 40007eb4: 02 80 00 08 be 40007ed4 <_Objects_Extend_information+0x9c> 40007eb8: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 40007ebc: 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++ ) { 40007ec0: 84 00 a0 01 inc %g2 40007ec4: 80 a0 80 14 cmp %g2, %l4 40007ec8: 0a bf ff fd bcs 40007ebc <_Objects_Extend_information+0x84> 40007ecc: c0 24 00 01 clr [ %l0 + %g1 ] 40007ed0: 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; 40007ed4: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007ed8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007edc: 86 04 c0 01 add %l3, %g1, %g3 40007ee0: 80 a4 c0 03 cmp %l3, %g3 40007ee4: 1a 80 00 0a bcc 40007f0c <_Objects_Extend_information+0xd4> 40007ee8: c0 25 c0 15 clr [ %l7 + %l5 ] 40007eec: 83 2c e0 02 sll %l3, 2, %g1 40007ef0: 84 04 00 01 add %l0, %g1, %g2 40007ef4: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 40007ef8: 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++ ) { 40007efc: 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 ); 40007f00: 80 a0 40 03 cmp %g1, %g3 40007f04: 0a bf ff fd bcs 40007ef8 <_Objects_Extend_information+0xc0> 40007f08: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40007f0c: 7f ff e7 c7 call 40001e28 40007f10: 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( 40007f14: c2 06 00 00 ld [ %i0 ], %g1 40007f18: 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; 40007f1c: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007f20: 89 29 20 1b sll %g4, 0x1b, %g4 40007f24: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40007f28: 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( 40007f2c: 87 30 e0 10 srl %g3, 0x10, %g3 40007f30: 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; 40007f34: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007f38: 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; 40007f3c: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40007f40: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40007f44: 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( 40007f48: 82 10 40 04 or %g1, %g4, %g1 40007f4c: 82 10 40 03 or %g1, %g3, %g1 40007f50: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007f54: 7f ff e7 b9 call 40001e38 40007f58: 01 00 00 00 nop if ( old_tables ) 40007f5c: 80 a4 20 00 cmp %l0, 0 40007f60: 22 80 00 05 be,a 40007f74 <_Objects_Extend_information+0x13c> 40007f64: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 40007f68: 40 00 08 aa call 4000a210 <_Workspace_Free> 40007f6c: 90 10 00 10 mov %l0, %o0 40007f70: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40007f74: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40007f78: 80 a0 60 00 cmp %g1, 0 40007f7c: 02 80 00 55 be 400080d0 <_Objects_Extend_information+0x298> 40007f80: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 40007f84: 90 10 00 10 mov %l0, %o0 40007f88: 40 00 36 07 call 400157a4 <.umul> 40007f8c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40007f90: 40 00 08 a7 call 4000a22c <_Workspace_Allocate> 40007f94: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007f98: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40007f9c: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007fa0: d2 00 40 14 ld [ %g1 + %l4 ], %o1 40007fa4: 80 a2 60 00 cmp %o1, 0 40007fa8: 02 80 00 64 be 40008138 <_Objects_Extend_information+0x300> 40007fac: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007fb0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40007fb4: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007fb8: a0 10 00 13 mov %l3, %l0 40007fbc: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007fc0: 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( 40007fc4: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007fc8: 40 00 13 c6 call 4000cee0 <_Chain_Initialize> 40007fcc: 90 10 00 13 mov %l3, %o0 40007fd0: 30 80 00 0c b,a 40008000 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007fd4: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40007fd8: 83 28 60 18 sll %g1, 0x18, %g1 40007fdc: 85 28 a0 1b sll %g2, 0x1b, %g2 40007fe0: 82 10 40 12 or %g1, %l2, %g1 40007fe4: 82 10 40 02 or %g1, %g2, %g1 40007fe8: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007fec: 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( 40007ff0: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40007ff4: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007ff8: 7f ff fd 2f call 400074b4 <_Chain_Append> 40007ffc: 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 ) { 40008000: 40 00 13 a5 call 4000ce94 <_Chain_Get> 40008004: 90 10 00 13 mov %l3, %o0 40008008: 80 a2 20 00 cmp %o0, 0 4000800c: 32 bf ff f2 bne,a 40007fd4 <_Objects_Extend_information+0x19c> 40008010: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008014: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40008018: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 4000801c: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008020: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 40008024: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008028: 82 00 40 04 add %g1, %g4, %g1 4000802c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40008030: 81 c7 e0 08 ret 40008034: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40008038: 90 10 00 15 mov %l5, %o0 4000803c: 40 00 36 14 call 4001588c <.udiv> 40008040: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40008044: a4 92 20 00 orcc %o0, 0, %l2 40008048: 02 80 00 3e be 40008140 <_Objects_Extend_information+0x308> 4000804c: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 40008050: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 40008054: c2 00 80 00 ld [ %g2 ], %g1 40008058: 80 a0 60 00 cmp %g1, 0 4000805c: 12 80 00 08 bne 4000807c <_Objects_Extend_information+0x244> 40008060: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008064: 10 80 00 0c b 40008094 <_Objects_Extend_information+0x25c> <== NOT EXECUTED 40008068: 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 ) 4000806c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40008070: 80 a0 60 00 cmp %g1, 0 40008074: 02 80 00 08 be 40008094 <_Objects_Extend_information+0x25c> 40008078: 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++ ) { 4000807c: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008080: 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++ ) { 40008084: 80 a4 80 11 cmp %l2, %l1 40008088: 18 bf ff f9 bgu 4000806c <_Objects_Extend_information+0x234> 4000808c: 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 ) { 40008090: 80 a4 c0 15 cmp %l3, %l5 40008094: 2a bf ff b9 bcs,a 40007f78 <_Objects_Extend_information+0x140> 40008098: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 4000809c: ac 04 a0 01 add %l2, 1, %l6 400080a0: 83 2d a0 01 sll %l6, 1, %g1 400080a4: 10 bf ff 73 b 40007e70 <_Objects_Extend_information+0x38> 400080a8: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 400080ac: 90 02 00 14 add %o0, %l4, %o0 400080b0: 90 02 00 1d add %o0, %i5, %o0 400080b4: 40 00 08 5e call 4000a22c <_Workspace_Allocate> 400080b8: 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 ) 400080bc: ae 92 20 00 orcc %o0, 0, %l7 400080c0: 32 bf ff 76 bne,a 40007e98 <_Objects_Extend_information+0x60> 400080c4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400080c8: 81 c7 e0 08 ret <== NOT EXECUTED 400080cc: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 400080d0: 90 10 00 10 mov %l0, %o0 400080d4: 40 00 35 b4 call 400157a4 <.umul> 400080d8: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 400080dc: 40 00 08 5b call 4000a248 <_Workspace_Allocate_or_fatal_error> 400080e0: a9 2c 60 02 sll %l1, 2, %l4 400080e4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400080e8: d0 24 00 14 st %o0, [ %l0 + %l4 ] 400080ec: 10 bf ff b1 b 40007fb0 <_Objects_Extend_information+0x178> 400080f0: 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, 400080f4: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 400080f8: ab 2c a0 02 sll %l2, 2, %l5 400080fc: 90 10 00 17 mov %l7, %o0 40008100: 40 00 1c 05 call 4000f114 40008104: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008108: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000810c: 94 10 00 15 mov %l5, %o2 40008110: 40 00 1c 01 call 4000f114 40008114: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40008118: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 4000811c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40008120: 94 05 00 0a add %l4, %o2, %o2 40008124: 90 10 00 10 mov %l0, %o0 40008128: 40 00 1b fb call 4000f114 4000812c: 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; 40008130: 10 bf ff 6a b 40007ed8 <_Objects_Extend_information+0xa0> 40008134: c0 25 80 15 clr [ %l6 + %l5 ] 40008138: 81 c7 e0 08 ret <== NOT EXECUTED 4000813c: 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++ ) { 40008140: 10 bf ff d4 b 40008090 <_Objects_Extend_information+0x258> <== NOT EXECUTED 40008144: a2 10 20 00 clr %l1 <== NOT EXECUTED 400081f8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 400081f8: 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 ) 400081fc: 82 06 3f ff add %i0, -1, %g1 40008200: 80 a0 60 03 cmp %g1, 3 40008204: 38 80 00 1e bgu,a 4000827c <_Objects_Get_information+0x84> 40008208: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 4000820c: 80 a6 60 00 cmp %i1, 0 40008210: 12 80 00 04 bne 40008220 <_Objects_Get_information+0x28> 40008214: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 40008218: 81 c7 e0 08 ret 4000821c: 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 ); 40008220: 40 00 14 78 call 4000d400 <_Objects_API_maximum_class> 40008224: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40008228: 80 a2 20 00 cmp %o0, 0 4000822c: 06 bf ff fb bl 40008218 <_Objects_Get_information+0x20> 40008230: 80 a2 00 19 cmp %o0, %i1 40008234: 2a 80 00 12 bcs,a 4000827c <_Objects_Get_information+0x84> 40008238: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 4000823c: 85 2e 20 02 sll %i0, 2, %g2 40008240: 03 10 00 6a sethi %hi(0x4001a800), %g1 40008244: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 4001a9a0 <_Objects_Information_table> 40008248: c4 00 40 02 ld [ %g1 + %g2 ], %g2 4000824c: 80 a0 a0 00 cmp %g2, 0 40008250: 02 80 00 0b be 4000827c <_Objects_Get_information+0x84> 40008254: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40008258: 83 2e 60 02 sll %i1, 2, %g1 4000825c: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40008260: 80 a6 20 00 cmp %i0, 0 40008264: 02 80 00 06 be 4000827c <_Objects_Get_information+0x84> 40008268: 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 ) 4000826c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008270: 80 a0 60 00 cmp %g1, 0 40008274: 22 80 00 02 be,a 4000827c <_Objects_Get_information+0x84> 40008278: b0 10 20 00 clr %i0 return NULL; #endif return info; } 4000827c: 81 c7 e0 08 ret 40008280: 81 e8 00 00 restore 40019300 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 40019300: 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) 40019304: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40019308: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4001930c: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40019310: 22 80 00 02 be,a 40019318 <_Objects_Get_next+0x18> <== NOT EXECUTED 40019314: 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) 40019318: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001931c: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40019320: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40019324: 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); 40019328: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001932c: 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) 40019330: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40019334: 0a 80 00 0b bcs 40019360 <_Objects_Get_next+0x60> <== NOT EXECUTED 40019338: 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); 4001933c: 7f ff d5 74 call 4000e90c <_Objects_Get> <== NOT EXECUTED 40019340: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 40019344: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40019348: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001934c: 32 bf ff f6 bne,a 40019324 <_Objects_Get_next+0x24> <== NOT EXECUTED 40019350: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40019354: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40019358: 81 c7 e0 08 ret <== NOT EXECUTED 4001935c: 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; 40019360: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40019364: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40019368: 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; 4001936c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40019370: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 40019374: 81 c7 e0 08 ret <== NOT EXECUTED 40019378: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400095fc <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 400095fc: 9d e3 bf 90 save %sp, -112, %sp 40009600: 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 ) 40009604: 80 a6 60 00 cmp %i1, 0 40009608: 02 80 00 24 be 40009698 <_Objects_Id_to_name+0x9c> 4000960c: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40009610: 80 a2 60 00 cmp %o1, 0 40009614: 02 80 00 26 be 400096ac <_Objects_Id_to_name+0xb0> 40009618: 03 10 00 7c sethi %hi(0x4001f000), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000961c: 83 32 60 18 srl %o1, 0x18, %g1 40009620: 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 ) 40009624: 84 00 7f ff add %g1, -1, %g2 40009628: 80 a0 a0 03 cmp %g2, 3 4000962c: 38 80 00 1b bgu,a 40009698 <_Objects_Id_to_name+0x9c> 40009630: 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 ] ) 40009634: 85 28 60 02 sll %g1, 2, %g2 40009638: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4000963c: 82 10 63 b0 or %g1, 0x3b0, %g1 ! 4001efb0 <_Objects_Information_table> 40009640: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40009644: 80 a0 a0 00 cmp %g2, 0 40009648: 02 80 00 16 be 400096a0 <_Objects_Id_to_name+0xa4> 4000964c: 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 ]; 40009650: 83 28 60 02 sll %g1, 2, %g1 40009654: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 40009658: 80 a2 20 00 cmp %o0, 0 4000965c: 02 80 00 0f be 40009698 <_Objects_Id_to_name+0x9c> 40009660: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 40009664: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 40009668: 80 a0 60 00 cmp %g1, 0 4000966c: 12 80 00 0e bne 400096a4 <_Objects_Id_to_name+0xa8> 40009670: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 40009674: 7f ff ff c5 call 40009588 <_Objects_Get> 40009678: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 4000967c: 80 a2 20 00 cmp %o0, 0 40009680: 22 80 00 06 be,a 40009698 <_Objects_Id_to_name+0x9c> 40009684: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 40009688: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 4000968c: b0 10 20 00 clr %i0 40009690: 40 00 02 5b call 40009ffc <_Thread_Enable_dispatch> 40009694: c2 26 40 00 st %g1, [ %i1 ] 40009698: 81 c7 e0 08 ret 4000969c: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 400096a0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 400096a4: 81 c7 e0 08 ret <== NOT EXECUTED 400096a8: 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; 400096ac: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 400096b0: 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); 400096b4: 83 32 60 18 srl %o1, 0x18, %g1 400096b8: 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 ) 400096bc: 84 00 7f ff add %g1, -1, %g2 400096c0: 80 a0 a0 03 cmp %g2, 3 400096c4: 38 bf ff f5 bgu,a 40009698 <_Objects_Id_to_name+0x9c> 400096c8: 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 ] ) 400096cc: 10 bf ff db b 40009638 <_Objects_Id_to_name+0x3c> 400096d0: 85 28 60 02 sll %g1, 2, %g2 40013a20 <_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 ) { 40013a20: 9d e3 bf 98 save %sp, -104, %sp 40013a24: a8 10 00 18 mov %i0, %l4 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 40013a28: 80 a6 a0 00 cmp %i2, 0 40013a2c: 02 80 00 1d be 40013aa0 <_Objects_Name_to_id_string+0x80> 40013a30: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 40013a34: 80 a6 60 00 cmp %i1, 0 40013a38: 22 80 00 1a be,a 40013aa0 <_Objects_Name_to_id_string+0x80> 40013a3c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 40013a40: e6 15 20 10 lduh [ %l4 + 0x10 ], %l3 40013a44: 80 a4 e0 00 cmp %l3, 0 40013a48: 22 80 00 16 be,a 40013aa0 <_Objects_Name_to_id_string+0x80> 40013a4c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40013a50: e4 05 20 1c ld [ %l4 + 0x1c ], %l2 40013a54: a0 10 20 01 mov 1, %l0 the_object = information->local_table[ index ]; 40013a58: 83 2c 20 02 sll %l0, 2, %g1 40013a5c: e2 04 80 01 ld [ %l2 + %g1 ], %l1 if ( !the_object ) 40013a60: 80 a4 60 00 cmp %l1, 0 40013a64: 02 80 00 0b be 40013a90 <_Objects_Name_to_id_string+0x70> 40013a68: a0 04 20 01 inc %l0 continue; if ( !the_object->name.name_p ) 40013a6c: d2 04 60 0c ld [ %l1 + 0xc ], %o1 40013a70: 80 a2 60 00 cmp %o1, 0 40013a74: 02 80 00 07 be 40013a90 <_Objects_Name_to_id_string+0x70> 40013a78: 90 10 00 19 mov %i1, %o0 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 40013a7c: 40 00 0c cf call 40016db8 40013a80: d4 15 20 3a lduh [ %l4 + 0x3a ], %o2 40013a84: 80 a2 20 00 cmp %o0, 0 40013a88: 22 80 00 08 be,a 40013aa8 <_Objects_Name_to_id_string+0x88> 40013a8c: 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++ ) { 40013a90: 80 a4 00 13 cmp %l0, %l3 40013a94: 08 bf ff f2 bleu 40013a5c <_Objects_Name_to_id_string+0x3c> 40013a98: 83 2c 20 02 sll %l0, 2, %g1 40013a9c: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 40013aa0: 81 c7 e0 08 ret 40013aa4: 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; 40013aa8: c2 26 80 00 st %g1, [ %i2 ] 40013aac: 81 c7 e0 08 ret 40013ab0: 91 e8 20 00 restore %g0, 0, %o0 4000847c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 4000847c: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 40008480: 80 a2 e0 00 cmp %o3, 0 40008484: 02 80 00 20 be 40008504 <_Objects_Name_to_id_u32+0x88> 40008488: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 4000848c: 80 a2 60 00 cmp %o1, 0 40008490: 22 80 00 1d be,a 40008504 <_Objects_Name_to_id_u32+0x88> 40008494: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40008498: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 4000849c: 85 28 60 10 sll %g1, 0x10, %g2 400084a0: 80 a0 a0 00 cmp %g2, 0 400084a4: 22 80 00 18 be,a 40008504 <_Objects_Name_to_id_u32+0x88> 400084a8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 400084ac: 80 a2 a0 00 cmp %o2, 0 400084b0: 12 80 00 17 bne 4000850c <_Objects_Name_to_id_u32+0x90> 400084b4: 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++ ) { 400084b8: 89 30 a0 10 srl %g2, 0x10, %g4 400084bc: 80 a1 20 00 cmp %g4, 0 400084c0: 02 80 00 11 be 40008504 <_Objects_Name_to_id_u32+0x88> 400084c4: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400084c8: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 400084cc: 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 ]; 400084d0: 83 28 e0 02 sll %g3, 2, %g1 400084d4: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 400084d8: 80 a0 a0 00 cmp %g2, 0 400084dc: 02 80 00 06 be 400084f4 <_Objects_Name_to_id_u32+0x78> 400084e0: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 400084e4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 400084e8: 80 a0 40 09 cmp %g1, %o1 400084ec: 22 80 00 0f be,a 40008528 <_Objects_Name_to_id_u32+0xac> 400084f0: 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++ ) { 400084f4: 80 a0 c0 04 cmp %g3, %g4 400084f8: 08 bf ff f7 bleu 400084d4 <_Objects_Name_to_id_u32+0x58> 400084fc: 83 28 e0 02 sll %g3, 2, %g1 40008500: 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 } 40008504: 81 c3 e0 08 retl 40008508: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 4000850c: 82 10 63 ff or %g1, 0x3ff, %g1 40008510: 80 a2 80 01 cmp %o2, %g1 40008514: 02 bf ff e9 be 400084b8 <_Objects_Name_to_id_u32+0x3c> 40008518: 80 a2 a0 01 cmp %o2, 1 4000851c: 02 bf ff e7 be 400084b8 <_Objects_Name_to_id_u32+0x3c> 40008520: 90 10 20 01 mov 1, %o0 40008524: 30 bf ff f8 b,a 40008504 <_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; 40008528: 90 10 20 00 clr %o0 4000852c: 81 c3 e0 08 retl 40008530: c2 22 c0 00 st %g1, [ %o3 ] 4000853c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 4000853c: 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; 40008540: 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; 40008544: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40008548: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 4000854c: 03 00 00 3f sethi %hi(0xfc00), %g1 40008550: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008554: 92 10 00 10 mov %l0, %o1 40008558: a4 08 80 01 and %g2, %g1, %l2 4000855c: 40 00 34 cc call 4001588c <.udiv> 40008560: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 40008564: 80 a2 20 00 cmp %o0, 0 40008568: 02 80 00 12 be 400085b0 <_Objects_Shrink_information+0x74> 4000856c: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40008570: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40008574: c2 00 c0 00 ld [ %g3 ], %g1 40008578: 80 a4 00 01 cmp %l0, %g1 4000857c: 12 80 00 09 bne 400085a0 <_Objects_Shrink_information+0x64> 40008580: a2 10 20 04 mov 4, %l1 40008584: 10 80 00 0d b 400085b8 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 40008588: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4000858c: 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 ) { 40008590: 80 a4 00 01 cmp %l0, %g1 40008594: 02 80 00 09 be 400085b8 <_Objects_Shrink_information+0x7c> 40008598: 82 04 60 04 add %l1, 4, %g1 4000859c: 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++ ) { 400085a0: 84 00 a0 01 inc %g2 400085a4: 80 a2 00 02 cmp %o0, %g2 400085a8: 38 bf ff f9 bgu,a 4000858c <_Objects_Shrink_information+0x50> 400085ac: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 400085b0: 81 c7 e0 08 ret 400085b4: 81 e8 00 00 restore 400085b8: 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; 400085bc: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 400085c0: 10 80 00 0f b 400085fc <_Objects_Shrink_information+0xc0> 400085c4: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 400085c8: 82 04 80 01 add %l2, %g1, %g1 400085cc: 80 a0 40 03 cmp %g1, %g3 400085d0: 08 80 00 10 bleu 40008610 <_Objects_Shrink_information+0xd4> 400085d4: 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 ); 400085d8: 40 00 12 25 call 4000ce6c <_Chain_Extract> 400085dc: 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 ) ); 400085e0: 80 a4 20 00 cmp %l0, 0 400085e4: 22 80 00 10 be,a 40008624 <_Objects_Shrink_information+0xe8> 400085e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 400085ec: c2 04 00 00 ld [ %l0 ], %g1 400085f0: 80 a0 60 00 cmp %g1, 0 400085f4: 02 80 00 0b be 40008620 <_Objects_Shrink_information+0xe4> 400085f8: 84 10 00 10 mov %l0, %g2 400085fc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008600: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40008604: 80 a0 c0 12 cmp %g3, %l2 40008608: 3a bf ff f0 bcc,a 400085c8 <_Objects_Shrink_information+0x8c> 4000860c: 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; 40008610: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40008614: 80 a4 20 00 cmp %l0, 0 40008618: 32 bf ff f6 bne,a 400085f0 <_Objects_Shrink_information+0xb4> 4000861c: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40008620: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40008624: 40 00 06 fb call 4000a210 <_Workspace_Free> 40008628: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4000862c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40008630: 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; 40008634: 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; 40008638: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4000863c: 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; 40008640: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008644: 82 20 40 02 sub %g1, %g2, %g1 40008648: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 4000864c: 81 c7 e0 08 ret 40008650: 81 e8 00 00 restore 40007188 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40007188: 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; 4000718c: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 40007190: 80 a6 20 00 cmp %i0, 0 40007194: 02 80 00 1f be 40007210 <_POSIX_API_Initialize+0x88> 40007198: 03 10 00 63 sethi %hi(0x40018c00), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 4000719c: 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; 400071a0: 05 10 00 6a sethi %hi(0x4001a800), %g2 400071a4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400071a8: 82 10 63 14 or %g1, 0x314, %g1 ! 4001af14 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 400071ac: 40 00 14 82 call 4000c3b4 <_POSIX_signals_Manager_Initialization> 400071b0: c2 20 a1 ac st %g1, [ %g2 + 0x1ac ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 400071b4: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 400071b8: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 400071bc: 40 00 15 0a call 4000c5e4 <_POSIX_Threads_Manager_initialization> 400071c0: 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( 400071c4: 40 00 14 25 call 4000c258 <_POSIX_Condition_variables_Manager_initialization> 400071c8: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 400071cc: 40 00 14 30 call 4000c28c <_POSIX_Key_Manager_initialization> 400071d0: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 400071d4: 40 00 14 51 call 4000c318 <_POSIX_Mutex_Manager_initialization> 400071d8: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 400071dc: 40 00 14 39 call 4000c2c0 <_POSIX_Message_queue_Manager_initialization> 400071e0: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 400071e4: 40 00 15 c7 call 4000c900 <_POSIX_Semaphore_Manager_initialization> 400071e8: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 400071ec: 40 00 15 b8 call 4000c8cc <_POSIX_Timer_Manager_initialization> 400071f0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 400071f4: 40 00 14 56 call 4000c34c <_POSIX_Barrier_Manager_initialization> 400071f8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 400071fc: 40 00 14 61 call 4000c380 <_POSIX_RWLock_Manager_initialization> 40007200: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40007204: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40007208: 40 00 14 e0 call 4000c588 <_POSIX_Spinlock_Manager_initialization> 4000720c: 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 ) 40007210: 10 bf ff e3 b 4000719c <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 40007214: b0 10 62 08 or %g1, 0x208, %i0 <== NOT EXECUTED 400072fc <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 400072fc: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40007300: 80 a6 20 00 cmp %i0, 0 40007304: 02 80 00 12 be 4000734c <_POSIX_Condition_variables_Get+0x50> 40007308: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 4000730c: f2 06 00 00 ld [ %i0 ], %i1 40007310: 80 a6 7f ff cmp %i1, -1 40007314: 02 80 00 05 be 40007328 <_POSIX_Condition_variables_Get+0x2c> 40007318: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 4000731c: 31 10 00 62 sethi %hi(0x40018800), %i0 40007320: 40 00 0c 52 call 4000a468 <_Objects_Get> 40007324: 91 ee 20 24 restore %i0, 0x24, %o0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40007328: 40 00 00 0d call 4000735c <== NOT EXECUTED 4000732c: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40007330: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007334: 12 80 00 07 bne 40007350 <_POSIX_Condition_variables_Get+0x54> <== NOT EXECUTED 40007338: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000733c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40007340: 31 10 00 62 sethi %hi(0x40018800), %i0 <== NOT EXECUTED 40007344: 40 00 0c 49 call 4000a468 <_Objects_Get> <== NOT EXECUTED 40007348: 91 ee 20 24 restore %i0, 0x24, %o0 <== NOT EXECUTED * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); if ( status ) { *location = OBJECTS_ERROR; 4000734c: 82 10 20 01 mov 1, %g1 40007350: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 40007354: 81 c7 e0 08 ret 40007358: 91 e8 20 00 restore %g0, 0, %o0 40007514 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 40007514: 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 ) ) { 40007518: a0 07 bf f4 add %fp, -12, %l0 4000751c: 90 10 00 19 mov %i1, %o0 40007520: 40 00 00 7f call 4000771c <_POSIX_Mutex_Get> 40007524: 92 10 00 10 mov %l0, %o1 40007528: 80 a2 20 00 cmp %o0, 0 4000752c: 22 80 00 18 be,a 4000758c <_POSIX_Condition_variables_Wait_support+0x78> 40007530: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40007534: 03 10 00 60 sethi %hi(0x40018000), %g1 40007538: c4 00 63 90 ld [ %g1 + 0x390 ], %g2 ! 40018390 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4000753c: 92 10 00 10 mov %l0, %o1 40007540: 84 00 bf ff add %g2, -1, %g2 40007544: 90 10 00 18 mov %i0, %o0 40007548: c4 20 63 90 st %g2, [ %g1 + 0x390 ] 4000754c: 7f ff ff 6c call 400072fc <_POSIX_Condition_variables_Get> 40007550: 01 00 00 00 nop switch ( location ) { 40007554: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007558: 80 a0 60 00 cmp %g1, 0 4000755c: 12 80 00 1a bne 400075c4 <_POSIX_Condition_variables_Wait_support+0xb0> 40007560: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40007564: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40007568: 80 a0 a0 00 cmp %g2, 0 4000756c: 02 80 00 0a be 40007594 <_POSIX_Condition_variables_Wait_support+0x80> 40007570: 01 00 00 00 nop 40007574: c2 06 40 00 ld [ %i1 ], %g1 40007578: 80 a0 80 01 cmp %g2, %g1 4000757c: 02 80 00 06 be 40007594 <_POSIX_Condition_variables_Wait_support+0x80> 40007580: 01 00 00 00 nop _Thread_Enable_dispatch(); 40007584: 40 00 0d f2 call 4000ad4c <_Thread_Enable_dispatch> <== NOT EXECUTED 40007588: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 4000758c: 81 c7 e0 08 ret 40007590: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40007594: 40 00 00 ff call 40007990 40007598: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 4000759c: 80 8e e0 ff btst 0xff, %i3 400075a0: 22 80 00 0b be,a 400075cc <_POSIX_Condition_variables_Wait_support+0xb8> 400075a4: c2 06 40 00 ld [ %i1 ], %g1 status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 400075a8: 40 00 0d e9 call 4000ad4c <_Thread_Enable_dispatch> 400075ac: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 400075b0: 40 00 00 d7 call 4000790c 400075b4: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 400075b8: 80 a2 20 00 cmp %o0, 0 400075bc: 02 80 00 1c be 4000762c <_POSIX_Condition_variables_Wait_support+0x118> 400075c0: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 400075c4: 81 c7 e0 08 ret 400075c8: 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; 400075cc: 21 10 00 61 sethi %hi(0x40018400), %l0 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 400075d0: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 400075d4: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 400075d8: 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; 400075dc: 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; 400075e0: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 400075e4: 92 10 00 1a mov %i2, %o1 400075e8: 90 10 00 03 mov %g3, %o0 400075ec: 15 10 00 2d sethi %hi(0x4000b400), %o2 400075f0: 94 12 a3 20 or %o2, 0x320, %o2 ! 4000b720 <_Thread_queue_Timeout> 400075f4: 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; 400075f8: 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; 400075fc: 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 ); 40007600: 40 00 0f 12 call 4000b248 <_Thread_queue_Enqueue_with_handler> 40007604: c6 20 a0 44 st %g3, [ %g2 + 0x44 ] _Thread_Enable_dispatch(); 40007608: 40 00 0d d1 call 4000ad4c <_Thread_Enable_dispatch> 4000760c: 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; 40007610: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40007614: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 40007618: 80 a6 20 00 cmp %i0, 0 4000761c: 02 bf ff e5 be 400075b0 <_POSIX_Condition_variables_Wait_support+0x9c> 40007620: 80 a6 20 74 cmp %i0, 0x74 40007624: 02 bf ff e3 be 400075b0 <_POSIX_Condition_variables_Wait_support+0x9c> 40007628: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 4000762c: 81 c7 e0 08 ret 40007630: 81 e8 00 00 restore 4000dfa8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000dfa8: 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); 4000dfac: 03 10 00 6b sethi %hi(0x4001ac00), %g1 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4000dfb0: c6 06 20 08 ld [ %i0 + 8 ], %g3 4000dfb4: a4 10 62 94 or %g1, 0x294, %l2 4000dfb8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 4000dfbc: 85 30 e0 18 srl %g3, 0x18, %g2 4000dfc0: 89 28 60 10 sll %g1, 0x10, %g4 4000dfc4: 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 ]; 4000dfc8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000dfcc: 84 00 a0 06 add %g2, 6, %g2 4000dfd0: 82 10 63 ff or %g1, 0x3ff, %g1 4000dfd4: ab 28 a0 02 sll %g2, 2, %l5 4000dfd8: 86 08 c0 01 and %g3, %g1, %g3 4000dfdc: a8 10 20 00 clr %l4 4000dfe0: a7 28 e0 02 sll %g3, 2, %l3 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000dfe4: 80 a1 20 00 cmp %g4, 0 4000dfe8: 02 80 00 29 be 4000e08c <_POSIX_Keys_Run_destructors+0xe4> 4000dfec: a0 10 20 01 mov 1, %l0 4000dff0: a2 10 20 01 mov 1, %l1 the_key = (POSIX_Keys_Control *) 4000dff4: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 4000dff8: 83 2c 20 02 sll %l0, 2, %g1 4000dffc: f0 00 80 01 ld [ %g2 + %g1 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000e000: 80 a6 20 00 cmp %i0, 0 4000e004: 02 80 00 16 be 4000e05c <_POSIX_Keys_Run_destructors+0xb4> 4000e008: a0 04 20 01 inc %l0 4000e00c: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 4000e010: 80 a0 60 00 cmp %g1, 0 4000e014: 22 80 00 13 be,a 4000e060 <_POSIX_Keys_Run_destructors+0xb8> 4000e018: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED 4000e01c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000e020: 80 a0 e0 00 cmp %g3, 0 4000e024: 22 80 00 0f be,a 4000e060 <_POSIX_Keys_Run_destructors+0xb8> 4000e028: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000e02c: c2 06 00 15 ld [ %i0 + %l5 ], %g1 4000e030: c4 00 40 13 ld [ %g1 + %l3 ], %g2 if ( value ) { 4000e034: 90 90 a0 00 orcc %g2, 0, %o0 4000e038: 22 80 00 0a be,a 4000e060 <_POSIX_Keys_Run_destructors+0xb8> 4000e03c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000e040: 9f c0 c0 00 call %g3 4000e044: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000e048: c2 06 00 15 ld [ %i0 + %l5 ], %g1 4000e04c: c4 00 40 13 ld [ %g1 + %l3 ], %g2 4000e050: 80 a0 00 02 cmp %g0, %g2 4000e054: 82 40 3f ff addx %g0, -1, %g1 4000e058: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000e05c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 4000e060: 89 28 60 10 sll %g1, 0x10, %g4 4000e064: 83 31 20 10 srl %g4, 0x10, %g1 4000e068: 80 a0 40 10 cmp %g1, %l0 4000e06c: 3a bf ff e3 bcc,a 4000dff8 <_POSIX_Keys_Run_destructors+0x50> 4000e070: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000e074: 80 8c 60 ff btst 0xff, %l1 4000e078: 12 80 00 05 bne 4000e08c <_POSIX_Keys_Run_destructors+0xe4> 4000e07c: 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 ) 4000e080: 80 a5 20 04 cmp %l4, 4 4000e084: 12 bf ff d9 bne 4000dfe8 <_POSIX_Keys_Run_destructors+0x40> 4000e088: 80 a1 20 00 cmp %g4, 0 4000e08c: 81 c7 e0 08 ret 4000e090: 81 e8 00 00 restore 40012530 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40012530: 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 ); 40012534: 92 10 20 ff mov 0xff, %o1 40012538: 90 10 00 18 mov %i0, %o0 4001253c: 40 00 12 af call 40016ff8 40012540: a8 10 00 18 mov %i0, %l4 if ( n > NAME_MAX ) 40012544: b0 10 20 5b mov 0x5b, %i0 40012548: 80 a2 20 ff cmp %o0, 0xff 4001254c: 18 80 00 37 bgu 40012628 <_POSIX_Message_queue_Create_support+0xf8> 40012550: a4 10 00 08 mov %o0, %l2 40012554: 05 10 00 94 sethi %hi(0x40025000), %g2 40012558: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 40025230 <_Thread_Dispatch_disable_level> 4001255c: 82 00 60 01 inc %g1 40012560: c2 20 a2 30 st %g1, [ %g2 + 0x230 ] * 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 ) { 40012564: 80 a6 a0 00 cmp %i2, 0 40012568: 22 80 00 32 be,a 40012630 <_POSIX_Message_queue_Create_support+0x100> 4001256c: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40012570: e2 06 a0 04 ld [ %i2 + 4 ], %l1 40012574: 80 a4 60 00 cmp %l1, 0 40012578: 04 80 00 3d ble 4001266c <_POSIX_Message_queue_Create_support+0x13c> 4001257c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 40012580: f4 06 a0 08 ld [ %i2 + 8 ], %i2 40012584: 80 a6 a0 00 cmp %i2, 0 40012588: 04 80 00 39 ble 4001266c <_POSIX_Message_queue_Create_support+0x13c> 4001258c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 40012590: 27 10 00 95 sethi %hi(0x40025400), %l3 40012594: 7f ff ee 03 call 4000dda0 <_Objects_Allocate> 40012598: 90 14 e1 c0 or %l3, 0x1c0, %o0 ! 400255c0 <_POSIX_Message_queue_Information> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 4001259c: a0 92 20 00 orcc %o0, 0, %l0 400125a0: 02 80 00 3b be 4001268c <_POSIX_Message_queue_Create_support+0x15c> 400125a4: 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; 400125a8: 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; 400125ac: 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); 400125b0: 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; 400125b4: 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; 400125b8: 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); 400125bc: 7f ff f7 7b call 400103a8 <_Workspace_Allocate> 400125c0: c2 2c 20 14 stb %g1, [ %l0 + 0x14 ] if (!name) { 400125c4: b2 92 20 00 orcc %o0, 0, %i1 400125c8: 22 80 00 39 be,a 400126ac <_POSIX_Message_queue_Create_support+0x17c> 400125cc: 90 14 e1 c0 or %l3, 0x1c0, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 400125d0: 40 00 10 1f call 4001664c 400125d4: 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( 400125d8: 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; 400125dc: c0 24 20 5c clr [ %l0 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 400125e0: 96 10 00 1a mov %i2, %o3 400125e4: 90 04 20 1c add %l0, 0x1c, %o0 400125e8: 40 00 03 80 call 400133e8 <_CORE_message_queue_Initialize> 400125ec: 92 04 20 5c add %l0, 0x5c, %o1 400125f0: 80 8a 20 ff btst 0xff, %o0 400125f4: 02 80 00 11 be 40012638 <_POSIX_Message_queue_Create_support+0x108> 400125f8: 82 14 e1 c0 or %l3, 0x1c0, %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400125fc: c4 04 20 08 ld [ %l0 + 8 ], %g2 40012600: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 40012604: 03 00 00 3f sethi %hi(0xfc00), %g1 40012608: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4001260c: 84 08 80 01 and %g2, %g1, %g2 40012610: 85 28 a0 02 sll %g2, 2, %g2 40012614: 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; 40012618: f2 24 20 0c st %i1, [ %l0 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 4001261c: e0 26 c0 00 st %l0, [ %i3 ] _Thread_Enable_dispatch(); 40012620: 7f ff f1 ad call 4000ecd4 <_Thread_Enable_dispatch> 40012624: b0 10 20 00 clr %i0 return 0; } 40012628: 81 c7 e0 08 ret 4001262c: 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 ); 40012630: 10 bf ff d8 b 40012590 <_POSIX_Message_queue_Create_support+0x60> 40012634: 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 ); 40012638: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001263c: 7f ff ee d4 call 4000e18c <_Objects_Free> <== NOT EXECUTED 40012640: 90 14 e1 c0 or %l3, 0x1c0, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 40012644: 7f ff f7 52 call 4001038c <_Workspace_Free> <== NOT EXECUTED 40012648: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 4001264c: 7f ff f1 a2 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012650: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 40012654: 40 00 0a ca call 4001517c <__errno> <== NOT EXECUTED 40012658: 01 00 00 00 nop <== NOT EXECUTED 4001265c: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40012660: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012664: 81 c7 e0 08 ret <== NOT EXECUTED 40012668: 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(); 4001266c: 7f ff f1 9a call 4000ecd4 <_Thread_Enable_dispatch> 40012670: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 40012674: 40 00 0a c2 call 4001517c <__errno> 40012678: 01 00 00 00 nop 4001267c: 82 10 20 16 mov 0x16, %g1 ! 16 40012680: c2 22 00 00 st %g1, [ %o0 ] 40012684: 81 c7 e0 08 ret 40012688: 81 e8 00 00 restore attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 4001268c: 7f ff f1 92 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012690: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 40012694: 40 00 0a ba call 4001517c <__errno> <== NOT EXECUTED 40012698: 01 00 00 00 nop <== NOT EXECUTED 4001269c: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED 400126a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400126a4: 81 c7 e0 08 ret <== NOT EXECUTED 400126a8: 81 e8 00 00 restore <== NOT EXECUTED 400126ac: 7f ff ee b8 call 4000e18c <_Objects_Free> <== NOT EXECUTED 400126b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 400126b4: 7f ff f1 88 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400126b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 400126bc: 40 00 0a b0 call 4001517c <__errno> <== NOT EXECUTED 400126c0: 01 00 00 00 nop <== NOT EXECUTED 400126c4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400126c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400126cc: 81 c7 e0 08 ret <== NOT EXECUTED 400126d0: 81 e8 00 00 restore <== NOT EXECUTED 4000a840 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 4000a840: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 4000a844: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 4000a848: 80 a0 60 00 cmp %g1, 0 4000a84c: 12 80 00 16 bne 4000a8a4 <_POSIX_Message_queue_Delete+0x64> 4000a850: b2 10 00 18 mov %i0, %i1 4000a854: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000a858: 80 a0 60 00 cmp %g1, 0 4000a85c: 12 80 00 12 bne 4000a8a4 <_POSIX_Message_queue_Delete+0x64> 4000a860: 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 ) 4000a864: d0 06 20 0c ld [ %i0 + 0xc ], %o0 4000a868: 80 a2 20 00 cmp %o0, 0 4000a86c: 02 80 00 04 be 4000a87c <_POSIX_Message_queue_Delete+0x3c> 4000a870: 31 10 00 95 sethi %hi(0x40025400), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 4000a874: 40 00 16 c6 call 4001038c <_Workspace_Free> <== NOT EXECUTED 4000a878: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 4000a87c: 92 10 00 19 mov %i1, %o1 4000a880: 40 00 0d 74 call 4000de50 <_Objects_Close> 4000a884: 90 16 21 c0 or %i0, 0x1c0, %o0 _CORE_message_queue_Close( 4000a888: 90 06 60 1c add %i1, 0x1c, %o0 4000a88c: 92 10 20 00 clr %o1 4000a890: 94 10 20 05 mov 5, %o2 4000a894: 40 00 0a 5c call 4000d204 <_CORE_message_queue_Close> 4000a898: b0 16 21 c0 or %i0, 0x1c0, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4000a89c: 40 00 0e 3c call 4000e18c <_Objects_Free> 4000a8a0: 81 e8 00 00 restore 4000a8a4: 81 c7 e0 08 ret 4000a8a8: 81 e8 00 00 restore 4000ad9c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4000ad9c: 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 ) 4000ada0: 80 a6 e0 20 cmp %i3, 0x20 4000ada4: 18 80 00 47 bgu 4000aec0 <_POSIX_Message_queue_Send_support+0x124> 4000ada8: 11 10 00 95 sethi %hi(0x40025400), %o0 4000adac: 92 10 00 18 mov %i0, %o1 4000adb0: 90 12 23 3c or %o0, 0x33c, %o0 4000adb4: 40 00 0d 63 call 4000e340 <_Objects_Get> 4000adb8: 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 ) { 4000adbc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000adc0: 80 a0 60 00 cmp %g1, 0 4000adc4: 12 80 00 31 bne 4000ae88 <_POSIX_Message_queue_Send_support+0xec> 4000adc8: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4000adcc: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000add0: 80 88 a0 03 btst 3, %g2 4000add4: 02 80 00 41 be 4000aed8 <_POSIX_Message_queue_Send_support+0x13c> 4000add8: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000addc: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000ade0: 12 80 00 15 bne 4000ae34 <_POSIX_Message_queue_Send_support+0x98> 4000ade4: 82 10 20 00 clr %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000ade8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] <== NOT EXECUTED 4000adec: fa 23 a0 60 st %i5, [ %sp + 0x60 ] <== NOT EXECUTED 4000adf0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000adf4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000adf8: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 4000adfc: 9a 20 00 1b neg %i3, %o5 <== NOT EXECUTED 4000ae00: 98 10 20 00 clr %o4 <== NOT EXECUTED 4000ae04: 40 00 09 65 call 4000d398 <_CORE_message_queue_Submit> <== NOT EXECUTED 4000ae08: 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(); 4000ae0c: 40 00 0f b2 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000ae10: 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 ) 4000ae14: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 4000ae18: 02 80 00 19 be 4000ae7c <_POSIX_Message_queue_Send_support+0xe0> <== NOT EXECUTED 4000ae1c: 03 10 00 94 sethi %hi(0x40025000), %g1 <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4000ae20: 80 a7 60 00 cmp %i5, 0 4000ae24: 12 80 00 1f bne 4000aea0 <_POSIX_Message_queue_Send_support+0x104> 4000ae28: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4000ae2c: 81 c7 e0 08 ret 4000ae30: 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 ) 4000ae34: 83 30 a0 0e srl %g2, 0xe, %g1 4000ae38: 82 18 60 01 xor %g1, 1, %g1 4000ae3c: 82 08 60 01 and %g1, 1, %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000ae40: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 4000ae44: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000ae48: 92 10 00 19 mov %i1, %o1 4000ae4c: 94 10 00 1a mov %i2, %o2 4000ae50: 96 10 00 18 mov %i0, %o3 4000ae54: 9a 20 00 1b neg %i3, %o5 4000ae58: 98 10 20 00 clr %o4 4000ae5c: 40 00 09 4f call 4000d398 <_CORE_message_queue_Submit> 4000ae60: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4000ae64: 40 00 0f 9c call 4000ecd4 <_Thread_Enable_dispatch> 4000ae68: 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 ) 4000ae6c: 80 a7 60 07 cmp %i5, 7 4000ae70: 12 bf ff ed bne 4000ae24 <_POSIX_Message_queue_Send_support+0x88> 4000ae74: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 4000ae78: 03 10 00 94 sethi %hi(0x40025000), %g1 4000ae7c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 400252f0 <_Thread_Executing> 4000ae80: 10 bf ff e8 b 4000ae20 <_POSIX_Message_queue_Send_support+0x84> 4000ae84: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4000ae88: 40 00 28 bd call 4001517c <__errno> 4000ae8c: b0 10 3f ff mov -1, %i0 4000ae90: 82 10 20 09 mov 9, %g1 4000ae94: c2 22 00 00 st %g1, [ %o0 ] } 4000ae98: 81 c7 e0 08 ret 4000ae9c: 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( 4000aea0: 40 00 28 b7 call 4001517c <__errno> 4000aea4: b0 10 3f ff mov -1, %i0 4000aea8: a0 10 00 08 mov %o0, %l0 4000aeac: 40 00 00 5b call 4000b018 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000aeb0: 90 10 00 1d mov %i5, %o0 4000aeb4: d0 24 00 00 st %o0, [ %l0 ] 4000aeb8: 81 c7 e0 08 ret 4000aebc: 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 ); 4000aec0: 40 00 28 af call 4001517c <__errno> 4000aec4: b0 10 3f ff mov -1, %i0 4000aec8: 82 10 20 16 mov 0x16, %g1 4000aecc: c2 22 00 00 st %g1, [ %o0 ] 4000aed0: 81 c7 e0 08 ret 4000aed4: 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(); 4000aed8: 40 00 0f 7f call 4000ecd4 <_Thread_Enable_dispatch> 4000aedc: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 4000aee0: 40 00 28 a7 call 4001517c <__errno> 4000aee4: 01 00 00 00 nop 4000aee8: 82 10 20 09 mov 9, %g1 ! 9 4000aeec: c2 22 00 00 st %g1, [ %o0 ] 4000aef0: 81 c7 e0 08 ret 4000aef4: 81 e8 00 00 restore 40008418 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 40008418: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 4000841c: 80 a6 20 00 cmp %i0, 0 40008420: 02 80 00 12 be 40008468 <_POSIX_Mutex_Get+0x50> 40008424: b4 10 00 19 mov %i1, %i2 40008428: f2 06 00 00 ld [ %i0 ], %i1 4000842c: 80 a6 7f ff cmp %i1, -1 40008430: 02 80 00 05 be 40008444 <_POSIX_Mutex_Get+0x2c> 40008434: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 40008438: 31 10 00 69 sethi %hi(0x4001a400), %i0 4000843c: 40 00 0c 3c call 4000b52c <_Objects_Get> 40008440: 91 ee 23 b0 restore %i0, 0x3b0, %o0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008444: 40 00 00 20 call 400084c4 <== NOT EXECUTED 40008448: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000844c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008450: 12 80 00 07 bne 4000846c <_POSIX_Mutex_Get+0x54> <== NOT EXECUTED 40008454: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40008458: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 4000845c: 31 10 00 69 sethi %hi(0x4001a400), %i0 <== NOT EXECUTED 40008460: 40 00 0c 33 call 4000b52c <_Objects_Get> <== NOT EXECUTED 40008464: 91 ee 23 b0 restore %i0, 0x3b0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008468: 82 10 20 01 mov 1, %g1 4000846c: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 40008470: 81 c7 e0 08 ret 40008474: 91 e8 20 00 restore %g0, 0, %o0 400083b0 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 400083b0: 9d e3 bf 98 save %sp, -104, %sp 400083b4: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400083b8: 80 a6 20 00 cmp %i0, 0 400083bc: 02 80 00 13 be 40008408 <_POSIX_Mutex_Get_interrupt_disable+0x58> 400083c0: b6 10 00 1a mov %i2, %i3 400083c4: f2 06 00 00 ld [ %i0 ], %i1 400083c8: 80 a6 7f ff cmp %i1, -1 400083cc: 02 80 00 05 be 400083e0 <_POSIX_Mutex_Get_interrupt_disable+0x30> 400083d0: b4 10 00 10 mov %l0, %i2 return (POSIX_Mutex_Control *) 400083d4: 31 10 00 69 sethi %hi(0x4001a400), %i0 400083d8: 40 00 0c 37 call 4000b4b4 <_Objects_Get_isr_disable> 400083dc: 91 ee 23 b0 restore %i0, 0x3b0, %o0 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400083e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400083e4: 40 00 00 38 call 400084c4 <== NOT EXECUTED 400083e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400083ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400083f0: 12 80 00 06 bne 40008408 <_POSIX_Mutex_Get_interrupt_disable+0x58> <== NOT EXECUTED 400083f4: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED 400083f8: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 400083fc: 31 10 00 69 sethi %hi(0x4001a400), %i0 <== NOT EXECUTED 40008400: 40 00 0c 2d call 4000b4b4 <_Objects_Get_isr_disable> <== NOT EXECUTED 40008404: 91 ee 23 b0 restore %i0, 0x3b0, %o0 <== NOT EXECUTED ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008408: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000840c: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 40008410: 81 c7 e0 08 ret <== NOT EXECUTED 40008414: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ff64 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4000ff64: 9d e3 bf 98 save %sp, -104, %sp 4000ff68: 03 10 00 84 sethi %hi(0x40021000), %g1 4000ff6c: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 400211e0 <_Thread_Dispatch_disable_level> 4000ff70: 84 00 a0 01 inc %g2 4000ff74: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 4000ff78: 80 a6 60 00 cmp %i1, 0 4000ff7c: 12 80 00 2e bne 40010034 <_POSIX_Semaphore_Create_support+0xd0> 4000ff80: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 4000ff84: 02 80 00 07 be 4000ffa0 <_POSIX_Semaphore_Create_support+0x3c> 4000ff88: 21 10 00 85 sethi %hi(0x40021400), %l0 if( strlen(name) > PATH_MAX ) { 4000ff8c: 40 00 0f d6 call 40013ee4 4000ff90: 90 10 00 18 mov %i0, %o0 4000ff94: 80 a2 20 ff cmp %o0, 0xff 4000ff98: 18 80 00 2f bgu 40010054 <_POSIX_Semaphore_Create_support+0xf0> 4000ff9c: 21 10 00 85 sethi %hi(0x40021400), %l0 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4000ffa0: 7f ff ec 21 call 4000b024 <_Objects_Allocate> 4000ffa4: 90 14 20 f0 or %l0, 0xf0, %o0 ! 400214f0 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4000ffa8: b2 92 20 00 orcc %o0, 0, %i1 4000ffac: 02 80 00 32 be 40010074 <_POSIX_Semaphore_Create_support+0x110> 4000ffb0: 80 a6 20 00 cmp %i0, 0 rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { 4000ffb4: 02 80 00 1c be 40010024 <_POSIX_Semaphore_Create_support+0xc0> 4000ffb8: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000ffbc: 84 10 20 01 mov 1, %g2 } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000ffc0: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 4000ffc4: c4 2e 60 15 stb %g2, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000ffc8: c4 26 60 18 st %g2, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000ffcc: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000ffd0: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000ffd4: 94 10 00 1a mov %i2, %o2 4000ffd8: 90 06 60 1c add %i1, 0x1c, %o0 4000ffdc: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000ffe0: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000ffe4: 7f ff ea e1 call 4000ab68 <_CORE_semaphore_Initialize> 4000ffe8: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000ffec: 82 14 20 f0 or %l0, 0xf0, %g1 4000fff0: c4 06 60 08 ld [ %i1 + 8 ], %g2 4000fff4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 4000fff8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000fffc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40010000: 84 08 80 01 and %g2, %g1, %g2 40010004: 85 28 a0 02 sll %g2, 2, %g2 40010008: 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; 4001000c: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 40010010: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 40010014: 7f ff ef a5 call 4000bea8 <_Thread_Enable_dispatch> 40010018: b0 10 20 00 clr %i0 return 0; } 4001001c: 81 c7 e0 08 ret 40010020: 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; 40010024: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 40010028: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 4001002c: 10 bf ff e9 b 4000ffd0 <_POSIX_Semaphore_Create_support+0x6c> 40010030: c0 2e 60 15 clrb [ %i1 + 0x15 ] _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); 40010034: 7f ff ef 9d call 4000bea8 <_Thread_Enable_dispatch> 40010038: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSYS ); 4001003c: 40 00 08 e0 call 400123bc <__errno> 40010040: 01 00 00 00 nop 40010044: 82 10 20 58 mov 0x58, %g1 ! 58 40010048: c2 22 00 00 st %g1, [ %o0 ] 4001004c: 81 c7 e0 08 ret 40010050: 81 e8 00 00 restore } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); 40010054: 7f ff ef 95 call 4000bea8 <_Thread_Enable_dispatch> <== NOT EXECUTED 40010058: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4001005c: 40 00 08 d8 call 400123bc <__errno> <== NOT EXECUTED 40010060: 01 00 00 00 nop <== NOT EXECUTED 40010064: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED 40010068: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001006c: 81 c7 e0 08 ret <== NOT EXECUTED 40010070: 81 e8 00 00 restore <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40010074: 7f ff ef 8d call 4000bea8 <_Thread_Enable_dispatch> 40010078: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSPC ); 4001007c: 40 00 08 d0 call 400123bc <__errno> 40010080: 01 00 00 00 nop 40010084: 82 10 20 1c mov 0x1c, %g1 ! 1c 40010088: c2 22 00 00 st %g1, [ %o0 ] 4001008c: 81 c7 e0 08 ret 40010090: 81 e8 00 00 restore 4000c848 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000c848: 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 ]; 4000c84c: f0 06 61 60 ld [ %i1 + 0x160 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000c850: 40 00 04 37 call 4000d92c <_Timespec_To_ticks> 4000c854: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000c858: 80 a2 20 00 cmp %o0, 0 4000c85c: 22 80 00 02 be,a 4000c864 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000c860: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000c864: 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 || 4000c868: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000c86c: 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; 4000c870: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 4000c874: 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 || 4000c878: 80 a0 e0 00 cmp %g3, 0 4000c87c: 02 80 00 10 be 4000c8bc <_POSIX_Threads_Sporadic_budget_TSR+0x74> 4000c880: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000c884: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000c888: 80 a0 40 09 cmp %g1, %o1 4000c88c: 18 80 00 0d bgu 4000c8c0 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 4000c890: 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 ); 4000c894: 40 00 04 26 call 4000d92c <_Timespec_To_ticks> 4000c898: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000c89c: 80 a2 20 00 cmp %o0, 0 4000c8a0: 22 80 00 02 be,a 4000c8a8 <_POSIX_Threads_Sporadic_budget_TSR+0x60> 4000c8a4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000c8a8: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000c8ac: b2 06 20 9c add %i0, 0x9c, %i1 4000c8b0: 31 10 00 6a sethi %hi(0x4001a800), %i0 4000c8b4: 7f ff f5 8b call 40009ee0 <_Watchdog_Insert> 4000c8b8: 91 ee 23 20 restore %i0, 0x320, %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 ); 4000c8bc: 90 10 00 19 mov %i1, %o0 4000c8c0: 7f ff ef 7c call 400086b0 <_Thread_Change_priority> 4000c8c4: 94 10 20 01 mov 1, %o2 4000c8c8: 30 bf ff f3 b,a 4000c894 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 4000c7f8 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000c7f8: 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 || 4000c7fc: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000c800: 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 */ 4000c804: 82 10 3f ff mov -1, %g1 4000c808: 84 10 20 ff mov 0xff, %g2 4000c80c: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 4000c810: 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 || 4000c814: 80 a1 20 00 cmp %g4, 0 4000c818: 02 80 00 06 be 4000c830 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000c81c: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000c820: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000c824: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 4000c828: 08 80 00 06 bleu 4000c840 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000c82c: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000c830: 94 10 20 01 mov 1, %o2 ! 1 4000c834: 82 13 c0 00 mov %o7, %g1 4000c838: 7f ff ef 9e call 400086b0 <_Thread_Change_priority> 4000c83c: 9e 10 40 00 mov %g1, %o7 4000c840: 81 c3 e0 08 retl <== NOT EXECUTED 4000c844: 01 00 00 00 nop 4000df38 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4000df38: 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 ]; 4000df3c: e2 06 21 60 ld [ %i0 + 0x160 ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4000df40: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 4000df44: 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; 4000df48: b0 04 60 dc add %l1, 0xdc, %i0 4000df4c: 80 a0 80 18 cmp %g2, %i0 4000df50: 02 80 00 14 be 4000dfa0 <_POSIX_Threads_cancel_run+0x68> 4000df54: c2 24 60 cc st %g1, [ %l1 + 0xcc ] _ISR_Disable( level ); 4000df58: 7f ff cf b4 call 40001e28 <== NOT EXECUTED 4000df5c: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 4000df60: e0 06 20 04 ld [ %i0 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000df64: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 4000df68: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000df6c: 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; 4000df70: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000df74: 7f ff cf b1 call 40001e38 <== NOT EXECUTED 4000df78: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 4000df7c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000df80: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000df84: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 4000df88: 7f ff f0 a2 call 4000a210 <_Workspace_Free> <== NOT EXECUTED 4000df8c: 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 ) ) { 4000df90: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 4000df94: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 4000df98: 12 bf ff f0 bne 4000df58 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED 4000df9c: 01 00 00 00 nop <== NOT EXECUTED 4000dfa0: 81 c7 e0 08 ret 4000dfa4: 81 e8 00 00 restore 4000ef60 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000ef60: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000ef64: 7f ff f4 fd call 4000c358 <_Watchdog_Remove> 4000ef68: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000ef6c: 7f ff cf 16 call 40002bc4 4000ef70: 01 00 00 00 nop 4000ef74: 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 ) { 4000ef78: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000ef7c: 80 a0 60 00 cmp %g1, 0 4000ef80: 12 80 00 0f bne 4000efbc <_POSIX_Timer_Insert_helper+0x5c> 4000ef84: 92 10 00 18 mov %i0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000ef88: f6 26 20 1c st %i3, [ %i0 + 0x1c ] the_watchdog->id = id; 4000ef8c: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000ef90: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000ef94: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000ef98: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000ef9c: 11 10 00 7e sethi %hi(0x4001f800), %o0 4000efa0: 7f ff f4 83 call 4000c1ac <_Watchdog_Insert> 4000efa4: 90 12 21 00 or %o0, 0x100, %o0 ! 4001f900 <_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 ); 4000efa8: b0 10 20 01 mov 1, %i0 4000efac: 7f ff cf 0a call 40002bd4 4000efb0: 90 10 00 10 mov %l0, %o0 return true; } 4000efb4: 81 c7 e0 08 ret 4000efb8: 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 ); 4000efbc: 7f ff cf 06 call 40002bd4 <== NOT EXECUTED 4000efc0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000efc4: 81 c7 e0 08 ret <== NOT EXECUTED 4000efc8: 81 e8 00 00 restore <== NOT EXECUTED 4000827c <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 4000827c: 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; 40008280: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40008284: 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; 40008288: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000828c: 80 a0 a0 00 cmp %g2, 0 40008290: 12 80 00 0e bne 400082c8 <_POSIX_Timer_TSR+0x4c> 40008294: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 40008298: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 4000829c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400082a0: 32 80 00 0b bne,a 400082cc <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 400082a4: 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; 400082a8: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 400082ac: 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 ) ) { 400082b0: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 400082b4: 40 00 1a 4a call 4000ebdc 400082b8: 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; 400082bc: c0 26 60 68 clr [ %i1 + 0x68 ] 400082c0: 81 c7 e0 08 ret 400082c4: 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( 400082c8: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 400082cc: d4 06 60 08 ld [ %i1 + 8 ], %o2 400082d0: 90 06 60 10 add %i1, 0x10, %o0 400082d4: 17 10 00 20 sethi %hi(0x40008000), %o3 400082d8: 98 10 00 19 mov %i1, %o4 400082dc: 40 00 1b 21 call 4000ef60 <_POSIX_Timer_Insert_helper> 400082e0: 96 12 e2 7c or %o3, 0x27c, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 400082e4: 80 8a 20 ff btst 0xff, %o0 400082e8: 02 bf ff f6 be 400082c0 <_POSIX_Timer_TSR+0x44> 400082ec: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 400082f0: 40 00 06 22 call 40009b78 <_TOD_Get> 400082f4: 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; 400082f8: 82 10 20 03 mov 3, %g1 400082fc: 10 bf ff ed b 400082b0 <_POSIX_Timer_TSR+0x34> 40008300: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000e13c <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4000e13c: 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 ); 4000e140: 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 ) 4000e144: 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 ); 4000e148: 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 ) 4000e14c: b8 10 3f ff mov -1, %i4 4000e150: 02 80 00 04 be 4000e160 <_POSIX_signals_Clear_signals+0x24> 4000e154: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000e158: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000e15c: 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 ); 4000e160: 7f ff cf 32 call 40001e28 4000e164: 01 00 00 00 nop 4000e168: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000e16c: 80 8e e0 ff btst 0xff, %i3 4000e170: 22 80 00 33 be,a 4000e23c <_POSIX_signals_Clear_signals+0x100> 4000e174: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000e178: 05 10 00 6c sethi %hi(0x4001b000), %g2 4000e17c: c2 00 a1 dc ld [ %g2 + 0x1dc ], %g1 ! 4001b1dc <_POSIX_signals_Pending> 4000e180: 82 0c 00 01 and %l0, %g1, %g1 4000e184: 80 88 40 1c btst %g1, %i4 4000e188: 02 80 00 37 be 4000e264 <_POSIX_signals_Clear_signals+0x128> 4000e18c: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000e190: 87 2e 60 04 sll %i1, 4, %g3 4000e194: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000e198: 86 20 c0 02 sub %g3, %g2, %g3 4000e19c: 82 10 60 10 or %g1, 0x10, %g1 4000e1a0: c4 00 40 03 ld [ %g1 + %g3 ], %g2 4000e1a4: 80 a0 a0 02 cmp %g2, 2 4000e1a8: 12 80 00 34 bne 4000e278 <_POSIX_signals_Clear_signals+0x13c> 4000e1ac: 03 10 00 6c sethi %hi(0x4001b000), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 4000e1b0: 88 10 61 e0 or %g1, 0x1e0, %g4 ! 4001b1e0 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000e1b4: c4 00 c0 04 ld [ %g3 + %g4 ], %g2 4000e1b8: 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; 4000e1bc: 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)) 4000e1c0: 80 a0 80 0d cmp %g2, %o5 4000e1c4: 02 80 00 34 be 4000e294 <_POSIX_signals_Clear_signals+0x158> 4000e1c8: b8 10 20 00 clr %i4 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4000e1cc: c2 00 80 00 ld [ %g2 ], %g1 4000e1d0: b8 10 00 02 mov %g2, %i4 the_chain->first = new_first; 4000e1d4: c2 20 c0 04 st %g1, [ %g3 + %g4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000e1d8: 80 a3 40 01 cmp %o5, %g1 4000e1dc: 02 80 00 2e be 4000e294 <_POSIX_signals_Clear_signals+0x158> 4000e1e0: d8 20 60 04 st %o4, [ %g1 + 4 ] _POSIX_signals_Clear_process_signals( mask ); if ( psiginfo ) { 4000e1e4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4000e1e8: 02 80 00 1b be 4000e254 <_POSIX_signals_Clear_signals+0x118> 4000e1ec: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000e1f0: 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; 4000e1f4: b0 10 20 01 mov 1, %i0 4000e1f8: c2 26 80 00 st %g1, [ %i2 ] 4000e1fc: c4 07 20 0c ld [ %i4 + 0xc ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000e200: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000e204: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000e208: 82 10 61 94 or %g1, 0x194, %g1 4000e20c: c6 07 20 10 ld [ %i4 + 0x10 ], %g3 4000e210: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 4000e214: 82 00 7f fc add %g1, -4, %g1 4000e218: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000e21c: f8 20 60 08 st %i4, [ %g1 + 8 ] 4000e220: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000e224: 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; 4000e228: f8 20 80 00 st %i4, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4000e22c: 7f ff cf 03 call 40001e38 4000e230: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e234: 81 c7 e0 08 ret 4000e238: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000e23c: 82 0c 00 02 and %l0, %g2, %g1 4000e240: 80 88 40 1c btst %g1, %i4 4000e244: 02 80 00 08 be 4000e264 <_POSIX_signals_Clear_signals+0x128> 4000e248: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 4000e24c: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000e250: b0 10 20 01 mov 1, %i0 do_callout = true; } } _ISR_Enable( level ); 4000e254: 7f ff ce f9 call 40001e38 4000e258: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e25c: 81 c7 e0 08 ret 4000e260: 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; 4000e264: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 4000e268: 7f ff ce f4 call 40001e38 4000e26c: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e270: 81 c7 e0 08 ret 4000e274: 81 e8 00 00 restore &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 4000e278: 90 10 00 10 mov %l0, %o0 4000e27c: 40 00 01 9c call 4000e8ec <_POSIX_signals_Clear_process_signals> 4000e280: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4000e284: 7f ff ce ed call 40001e38 4000e288: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e28c: 81 c7 e0 08 ret 4000e290: 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 ); 4000e294: 40 00 01 96 call 4000e8ec <_POSIX_signals_Clear_process_signals> 4000e298: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000e29c: 10 bf ff d3 b 4000e1e8 <_POSIX_signals_Clear_signals+0xac> 4000e2a0: 80 a7 20 00 cmp %i4, 0 400074a0 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 400074a0: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400074a4: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 400074a8: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400074ac: 82 02 3f ff add %o0, -1, %g1 400074b0: 83 28 80 01 sll %g2, %g1, %g1 400074b4: 80 88 40 03 btst %g1, %g3 400074b8: 12 80 00 11 bne 400074fc <_POSIX_signals_Get_highest+0x5c> 400074bc: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 400074c0: 90 02 20 01 inc %o0 400074c4: 80 a2 20 20 cmp %o0, 0x20 400074c8: 12 bf ff fa bne 400074b0 <_POSIX_signals_Get_highest+0x10> 400074cc: 82 02 3f ff add %o0, -1, %g1 400074d0: 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 ) ) 400074d4: 10 80 00 05 b 400074e8 <_POSIX_signals_Get_highest+0x48> 400074d8: 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++ ) { 400074dc: 80 a2 20 1b cmp %o0, 0x1b 400074e0: 02 80 00 09 be 40007504 <_POSIX_signals_Get_highest+0x64> 400074e4: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 400074e8: 82 02 3f ff add %o0, -1, %g1 400074ec: 83 28 80 01 sll %g2, %g1, %g1 400074f0: 80 88 40 03 btst %g1, %g3 400074f4: 22 bf ff fa be,a 400074dc <_POSIX_signals_Get_highest+0x3c> 400074f8: 90 02 20 01 inc %o0 return signo; } return 0; } 400074fc: 81 c3 e0 08 retl 40007500: 01 00 00 00 nop 40007504: 81 c3 e0 08 retl <== NOT EXECUTED 40007508: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4000c474 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000c474: 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 ]; 4000c478: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 4000c47c: 80 a4 20 00 cmp %l0, 0 4000c480: 02 80 00 3c be 4000c570 <_POSIX_signals_Post_switch_extension+0xfc> 4000c484: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000c488: a2 10 61 dc or %g1, 0x1dc, %l1 ! 4001b1dc <_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 ); 4000c48c: 7f ff d6 67 call 40001e28 4000c490: 01 00 00 00 nop 4000c494: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000c498: c2 04 40 00 ld [ %l1 ], %g1 4000c49c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000c4a0: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000c4a4: 82 10 40 02 or %g1, %g2, %g1 4000c4a8: 80 a8 40 03 andncc %g1, %g3, %g0 4000c4ac: 02 80 00 2f be 4000c568 <_POSIX_signals_Post_switch_extension+0xf4> 4000c4b0: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 4000c4b4: 7f ff d6 61 call 40001e38 4000c4b8: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 4000c4bc: 92 10 00 18 mov %i0, %o1 4000c4c0: 94 10 20 00 clr %o2 4000c4c4: 40 00 06 f4 call 4000e094 <_POSIX_signals_Check_signal> 4000c4c8: 90 10 00 10 mov %l0, %o0 4000c4cc: 80 8a 20 ff btst 0xff, %o0 4000c4d0: 12 bf ff ef bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c4d4: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000c4d8: 90 10 00 10 mov %l0, %o0 4000c4dc: 94 10 20 01 mov 1, %o2 4000c4e0: 40 00 06 ed call 4000e094 <_POSIX_signals_Check_signal> 4000c4e4: b0 06 20 01 inc %i0 4000c4e8: 80 8a 20 ff btst 0xff, %o0 4000c4ec: 12 bf ff e8 bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c4f0: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000c4f4: 12 bf ff f3 bne 4000c4c0 <_POSIX_signals_Post_switch_extension+0x4c> 4000c4f8: 92 10 00 18 mov %i0, %o1 4000c4fc: 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 ) ) 4000c500: 92 10 00 18 mov %i0, %o1 4000c504: 94 10 20 00 clr %o2 4000c508: 40 00 06 e3 call 4000e094 <_POSIX_signals_Check_signal> 4000c50c: 90 10 00 10 mov %l0, %o0 4000c510: 80 8a 20 ff btst 0xff, %o0 4000c514: 12 bf ff de bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c518: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000c51c: 90 10 00 10 mov %l0, %o0 4000c520: 94 10 20 01 mov 1, %o2 4000c524: 40 00 06 dc call 4000e094 <_POSIX_signals_Check_signal> 4000c528: b0 06 20 01 inc %i0 4000c52c: 80 8a 20 ff btst 0xff, %o0 4000c530: 12 bf ff d7 bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c534: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000c538: 12 bf ff f3 bne 4000c504 <_POSIX_signals_Post_switch_extension+0x90> 4000c53c: 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 ); 4000c540: 7f ff d6 3a call 40001e28 <== NOT EXECUTED 4000c544: 01 00 00 00 nop <== NOT EXECUTED 4000c548: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( !(~api->signals_blocked & 4000c54c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4000c550: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 <== NOT EXECUTED 4000c554: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 <== NOT EXECUTED 4000c558: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 4000c55c: 80 a8 40 03 andncc %g1, %g3, %g0 <== NOT EXECUTED 4000c560: 12 bf ff d5 bne 4000c4b4 <_POSIX_signals_Post_switch_extension+0x40> <== NOT EXECUTED 4000c564: 01 00 00 00 nop <== NOT EXECUTED (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000c568: 7f ff d6 34 call 40001e38 4000c56c: 81 e8 00 00 restore 4000c570: 81 c7 e0 08 ret <== NOT EXECUTED 4000c574: 81 e8 00 00 restore <== NOT EXECUTED 40006690 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 40006690: 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 ); 40006694: 7f ff f3 ac call 40003544 40006698: 33 10 00 5c sethi %hi(0x40017000), %i1 4000669c: 7f ff ff 07 call 400062b8 400066a0: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 400066a4: 40 00 10 53 call 4000a7f0 <_Watchdog_Remove> 400066a8: 90 16 62 3c or %i1, 0x23c, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066ac: 31 10 00 5d sethi %hi(0x40017400), %i0 400066b0: b2 16 62 3c or %i1, 0x23c, %i1 400066b4: 40 00 0f e4 call 4000a644 <_Watchdog_Insert> 400066b8: 91 ee 20 80 restore %i0, 0x80, %o0 400066bc: 01 00 00 00 nop <== NOT EXECUTED 400254c0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 400254c0: 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 ) ) { 400254c4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 400254c8: 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 ); 400254cc: 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 ) ) { 400254d0: 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 ); 400254d4: 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 ) ) { 400254d8: 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 ); 400254dc: 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 ) ) { 400254e0: 02 80 00 25 be 40025574 <_POSIX_signals_Unblock_thread+0xb4> 400254e4: c6 06 21 60 ld [ %i0 + 0x160 ], %g3 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 400254e8: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 400254ec: 80 a8 80 01 andncc %g2, %g1, %g0 400254f0: 02 80 00 1f be 4002556c <_POSIX_signals_Unblock_thread+0xac> 400254f4: 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 ) { 400254f8: 80 89 00 01 btst %g4, %g1 400254fc: 02 80 00 11 be 40025540 <_POSIX_signals_Unblock_thread+0x80> 40025500: da 2e 20 75 stb %o5, [ %i0 + 0x75 ] the_thread->Wait.return_code = EINTR; 40025504: 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) ){ 40025508: 80 89 20 08 btst 8, %g4 4002550c: 02 80 00 18 be 4002556c <_POSIX_signals_Unblock_thread+0xac> 40025510: c2 26 20 34 st %g1, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 40025514: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40025518: 80 a0 60 02 cmp %g1, 2 4002551c: 02 80 00 36 be 400255f4 <_POSIX_signals_Unblock_thread+0x134> 40025520: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40025524: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40025528: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4002552c: b0 10 20 00 clr %i0 40025530: 7f ff a6 79 call 4000ef14 <_Thread_Clear_state> 40025534: 92 12 63 f8 or %o1, 0x3f8, %o1 40025538: 81 c7 e0 08 ret 4002553c: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 40025540: 80 a1 20 00 cmp %g4, 0 40025544: 12 80 00 0a bne 4002556c <_POSIX_signals_Unblock_thread+0xac> 40025548: 03 10 00 ae sethi %hi(0x4002b800), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4002554c: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4002bb9c <_ISR_Nest_level> 40025550: 80 a0 a0 00 cmp %g2, 0 40025554: 02 80 00 06 be 4002556c <_POSIX_signals_Unblock_thread+0xac> 40025558: 03 10 00 ae sethi %hi(0x4002b800), %g1 4002555c: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4002bbc0 <_Thread_Executing> 40025560: 80 a6 00 02 cmp %i0, %g2 40025564: 02 80 00 1c be 400255d4 <_POSIX_signals_Unblock_thread+0x114> 40025568: 03 10 00 af sethi %hi(0x4002bc00), %g1 _ISR_Signals_to_thread_executing = TRUE; } } return false; } 4002556c: 81 c7 e0 08 ret 40025570: 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) ) { 40025574: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40025578: 80 88 80 01 btst %g2, %g1 4002557c: 22 80 00 12 be,a 400255c4 <_POSIX_signals_Unblock_thread+0x104> 40025580: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 the_thread->Wait.return_code = EINTR; 40025584: 82 10 20 04 mov 4, %g1 40025588: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4002558c: 80 a6 a0 00 cmp %i2, 0 40025590: 02 80 00 14 be 400255e0 <_POSIX_signals_Unblock_thread+0x120> 40025594: 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; 40025598: c2 06 80 00 ld [ %i2 ], %g1 4002559c: c2 20 c0 00 st %g1, [ %g3 ] 400255a0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 400255a4: c4 20 e0 04 st %g2, [ %g3 + 4 ] 400255a8: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400255ac: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 400255b0: 90 10 00 18 mov %i0, %o0 400255b4: 7f ff a9 6c call 4000fb64 <_Thread_queue_Extract_with_proxy> 400255b8: b0 10 20 01 mov 1, %i0 400255bc: 81 c7 e0 08 ret 400255c0: 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) ) { 400255c4: 80 a8 80 01 andncc %g2, %g1, %g0 400255c8: 12 bf ff f0 bne 40025588 <_POSIX_signals_Unblock_thread+0xc8> 400255cc: 82 10 20 04 mov 4, %g1 400255d0: 30 bf ff e7 b,a 4002556c <_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; 400255d4: da 28 60 58 stb %o5, [ %g1 + 0x58 ] 400255d8: 81 c7 e0 08 ret 400255dc: 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; 400255e0: 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; 400255e4: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 400255e8: 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; 400255ec: 10 bf ff f1 b 400255b0 <_POSIX_signals_Unblock_thread+0xf0> 400255f0: 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 ); 400255f4: 7f ff ac 76 call 400107cc <_Watchdog_Remove> 400255f8: 90 06 20 48 add %i0, 0x48, %o0 400255fc: 10 bf ff cb b 40025528 <_POSIX_signals_Unblock_thread+0x68> 40025600: 90 10 00 18 mov %i0, %o0 40026dc4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 40026dc4: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 40026dc8: 80 a6 20 00 cmp %i0, 0 40026dcc: 02 80 00 10 be 40026e0c <_Protected_heap_Get_information+0x48> 40026dd0: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 40026dd4: 02 80 00 0e be 40026e0c <_Protected_heap_Get_information+0x48> 40026dd8: 23 10 01 85 sethi %hi(0x40061400), %l1 return false; _RTEMS_Lock_allocator(); 40026ddc: 7f ff 92 47 call 4000b6f8 <_API_Mutex_Lock> 40026de0: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 ! 400614a8 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 40026de4: 90 10 00 18 mov %i0, %o0 40026de8: 40 00 2b 77 call 40031bc4 <_Heap_Get_information> 40026dec: 92 10 00 19 mov %i1, %o1 40026df0: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 40026df4: 7f ff 92 57 call 4000b750 <_API_Mutex_Unlock> 40026df8: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 40026dfc: 80 a0 00 10 cmp %g0, %l0 40026e00: 82 60 3f ff subx %g0, -1, %g1 40026e04: 81 c7 e0 08 ret 40026e08: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 40026e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40026e10: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007fb8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40007fb8: 9d e3 bf 90 save %sp, -112, %sp 40007fbc: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007fc0: 92 10 00 18 mov %i0, %o1 40007fc4: 90 12 21 84 or %o0, 0x184, %o0 40007fc8: 40 00 08 19 call 4000a02c <_Objects_Get> 40007fcc: 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 ) { 40007fd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007fd4: 80 a0 60 00 cmp %g1, 0 40007fd8: 12 80 00 11 bne 4000801c <_Rate_monotonic_Timeout+0x64> 40007fdc: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40007fe0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40007fe4: 03 00 00 10 sethi %hi(0x4000), %g1 40007fe8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40007fec: 80 88 80 01 btst %g2, %g1 40007ff0: 32 80 00 0d bne,a 40008024 <_Rate_monotonic_Timeout+0x6c> 40007ff4: 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 ) { 40007ff8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40007ffc: 80 a0 60 01 cmp %g1, 1 40008000: 02 80 00 12 be 40008048 <_Rate_monotonic_Timeout+0x90> 40008004: 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; 40008008: 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; 4000800c: 05 10 00 7e sethi %hi(0x4001f800), %g2 40008010: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1 ! 4001fb00 <_Thread_Dispatch_disable_level> 40008014: 82 00 7f ff add %g1, -1, %g1 40008018: c2 20 a3 00 st %g1, [ %g2 + 0x300 ] 4000801c: 81 c7 e0 08 ret 40008020: 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 ) && 40008024: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008028: 80 a0 80 01 cmp %g2, %g1 4000802c: 32 bf ff f4 bne,a 40007ffc <_Rate_monotonic_Timeout+0x44> 40008030: 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 ); 40008034: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40008038: 40 00 09 67 call 4000a5d4 <_Thread_Clear_state> 4000803c: 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 ); 40008040: 10 80 00 05 b 40008054 <_Rate_monotonic_Timeout+0x9c> 40008044: 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; 40008048: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 4000804c: 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; 40008050: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40008054: 7f ff fe 2e call 4000790c <_Rate_monotonic_Initiate_statistics> 40008058: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000805c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008060: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008064: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008068: 11 10 00 7e sethi %hi(0x4001f800), %o0 4000806c: 40 00 0f ce call 4000bfa4 <_Watchdog_Insert> 40008070: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 4001fbe0 <_Watchdog_Ticks_chain> 40008074: 30 bf ff e6 b,a 4000800c <_Rate_monotonic_Timeout+0x54> 40008a34 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 40008a34: 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 ); 40008a38: 35 10 00 6a sethi %hi(0x4001a800), %i2 40008a3c: 7f ff fc c8 call 40007d5c <_Objects_Allocate> 40008a40: 90 16 a3 a0 or %i2, 0x3a0, %o0 ! 4001aba0 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008a44: 37 10 00 6a sethi %hi(0x4001a800), %i3 40008a48: c2 06 e2 40 ld [ %i3 + 0x240 ], %g1 ! 4001aa40 <_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(); 40008a4c: 39 10 00 6a sethi %hi(0x4001a800), %i4 40008a50: 82 00 60 01 inc %g1 40008a54: d0 27 23 ec st %o0, [ %i4 + 0x3ec ] 40008a58: c2 26 e2 40 st %g1, [ %i3 + 0x240 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 40008a5c: 33 10 00 6a sethi %hi(0x4001a800), %i1 40008a60: c2 06 62 d8 ld [ %i1 + 0x2d8 ], %g1 ! 4001aad8 <_Configuration_Table> 40008a64: 05 10 00 66 sethi %hi(0x40019800), %g2 40008a68: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 40008a6c: d6 00 a3 a0 ld [ %g2 + 0x3a0 ], %o3 40008a70: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008a74: 82 10 62 50 or %g1, 0x250, %g1 ! 40018e50 <_Status_Object_name_errors_to_status+0x14> 40008a78: c2 27 bf f4 st %g1, [ %fp + -12 ] 40008a7c: 80 a2 c0 03 cmp %o3, %g3 40008a80: 1a 80 00 03 bcc 40008a8c <_Thread_Create_idle+0x58> 40008a84: d2 07 23 ec ld [ %i4 + 0x3ec ], %o1 40008a88: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 40008a8c: 03 10 00 66 sethi %hi(0x40019800), %g1 40008a90: da 08 63 a4 ldub [ %g1 + 0x3a4 ], %o5 ! 40019ba4 40008a94: 84 07 bf f4 add %fp, -12, %g2 40008a98: 82 10 20 01 mov 1, %g1 40008a9c: c0 23 a0 60 clr [ %sp + 0x60 ] 40008aa0: c0 23 a0 64 clr [ %sp + 0x64 ] 40008aa4: c0 23 a0 68 clr [ %sp + 0x68 ] 40008aa8: 90 16 a3 a0 or %i2, 0x3a0, %o0 40008aac: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008ab0: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 40008ab4: 94 10 20 00 clr %o2 40008ab8: 40 00 00 b2 call 40008d80 <_Thread_Initialize> 40008abc: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 40008ac0: c4 06 62 d8 ld [ %i1 + 0x2d8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40008ac4: c2 06 e2 40 ld [ %i3 + 0x240 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008ac8: c6 07 23 ec ld [ %i4 + 0x3ec ], %g3 40008acc: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40008ad0: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 40008ad4: c2 26 e2 40 st %g1, [ %i3 + 0x240 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008ad8: 05 10 00 6a sethi %hi(0x4001a800), %g2 40008adc: 03 10 00 6a sethi %hi(0x4001a800), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40008ae0: 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 = 40008ae4: c6 20 a3 00 st %g3, [ %g2 + 0x300 ] 40008ae8: c6 20 62 cc st %g3, [ %g1 + 0x2cc ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40008aec: b2 10 20 00 clr %i1 40008af0: b6 10 20 00 clr %i3 40008af4: 40 00 03 ab call 400099a0 <_Thread_Start> 40008af8: 99 e8 20 00 restore %g0, 0, %o4 40008afc: 01 00 00 00 nop 40008cd0 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40008cd0: 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 ) ) { 40008cd4: 80 a2 20 00 cmp %o0, 0 40008cd8: 02 80 00 1d be 40008d4c <_Thread_Get+0x7c> 40008cdc: 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); 40008ce0: 83 32 20 18 srl %o0, 0x18, %g1 40008ce4: 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 ) 40008ce8: 84 00 7f ff add %g1, -1, %g2 40008cec: 80 a0 a0 03 cmp %g2, 3 40008cf0: 38 80 00 14 bgu,a 40008d40 <_Thread_Get+0x70> 40008cf4: 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 :) */ 40008cf8: 89 32 20 1b srl %o0, 0x1b, %g4 40008cfc: 80 a1 20 01 cmp %g4, 1 40008d00: 12 80 00 0f bne 40008d3c <_Thread_Get+0x6c> 40008d04: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 40008d08: 03 10 00 6a sethi %hi(0x4001a800), %g1 40008d0c: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 4001a9a0 <_Objects_Information_table> 40008d10: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 40008d14: 80 a0 60 00 cmp %g1, 0 40008d18: 22 80 00 17 be,a 40008d74 <_Thread_Get+0xa4> 40008d1c: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 40008d20: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40008d24: 80 a2 20 00 cmp %o0, 0 40008d28: 02 80 00 11 be 40008d6c <_Thread_Get+0x9c> 40008d2c: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008d30: 82 13 c0 00 mov %o7, %g1 40008d34: 7f ff fd 72 call 400082fc <_Objects_Get> 40008d38: 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; 40008d3c: 82 10 20 01 mov 1, %g1 40008d40: 90 10 20 00 clr %o0 40008d44: 81 c3 e0 08 retl 40008d48: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008d4c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40008d50: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001aa40 <_Thread_Dispatch_disable_level> 40008d54: 84 00 a0 01 inc %g2 40008d58: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 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; 40008d5c: 03 10 00 6a sethi %hi(0x4001a800), %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; 40008d60: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40008d64: 81 c3 e0 08 retl 40008d68: d0 00 63 00 ld [ %g1 + 0x300 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 40008d6c: 81 c3 e0 08 retl <== NOT EXECUTED 40008d70: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 40008d74: 81 c3 e0 08 retl 40008d78: 90 10 20 00 clr %o0 4000e6d4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000e6d4: 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; 4000e6d8: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000e6dc: e2 00 63 00 ld [ %g1 + 0x300 ], %l1 ! 4001ab00 <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 4000e6e0: 3f 10 00 39 sethi %hi(0x4000e400), %i7 4000e6e4: be 17 e2 d4 or %i7, 0x2d4, %i7 ! 4000e6d4 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000e6e8: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000e6ec: 7f ff cd d3 call 40001e38 4000e6f0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000e6f4: 05 10 00 69 sethi %hi(0x4001a400), %g2 doneConstructors = 1; 4000e6f8: 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; 4000e6fc: e0 08 a3 00 ldub [ %g2 + 0x300 ], %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 ); 4000e700: 90 10 00 11 mov %l1, %o0 4000e704: 7f ff ed 65 call 40009c98 <_User_extensions_Thread_begin> 4000e708: c2 28 a3 00 stb %g1, [ %g2 + 0x300 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000e70c: 7f ff e9 63 call 40008c98 <_Thread_Enable_dispatch> 4000e710: 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) */ 4000e714: 80 a4 20 00 cmp %l0, 0 4000e718: 02 80 00 1e be 4000e790 <_Thread_Handler+0xbc> 4000e71c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000e720: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000e724: 80 a0 60 01 cmp %g1, 1 4000e728: 22 80 00 21 be,a 4000e7ac <_Thread_Handler+0xd8> 4000e72c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000e730: 80 a0 60 01 cmp %g1, 1 4000e734: 1a 80 00 0c bcc 4000e764 <_Thread_Handler+0x90> 4000e738: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000e73c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000e740: 9f c0 40 00 call %g1 4000e744: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 4000e748: 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 ); 4000e74c: 7f ff ed 67 call 40009ce8 <_User_extensions_Thread_exitted> 4000e750: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000e754: 90 10 20 00 clr %o0 4000e758: 92 10 20 01 mov 1, %o1 4000e75c: 7f ff e5 50 call 40007c9c <_Internal_error_Occurred> 4000e760: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000e764: 22 80 00 16 be,a 4000e7bc <_Thread_Handler+0xe8> <== NOT EXECUTED 4000e768: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000e76c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000e770: 12 bf ff f7 bne 4000e74c <_Thread_Handler+0x78> <== NOT EXECUTED 4000e774: 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 = 4000e778: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000e77c: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000e780: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000e784: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000e788: 10 bf ff f1 b 4000e74c <_Thread_Handler+0x78> <== NOT EXECUTED 4000e78c: 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 (); 4000e790: 40 00 2c ca call 40019ab8 <_init> 4000e794: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000e798: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000e79c: 80 a0 60 01 cmp %g1, 1 4000e7a0: 12 bf ff e5 bne 4000e734 <_Thread_Handler+0x60> 4000e7a4: 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 = 4000e7a8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000e7ac: 9f c0 40 00 call %g1 4000e7b0: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 4000e7b4: 10 bf ff e6 b 4000e74c <_Thread_Handler+0x78> 4000e7b8: 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 = 4000e7bc: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000e7c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000e7c4: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED 4000e7c8: 10 bf ff e1 b 4000e74c <_Thread_Handler+0x78> <== NOT EXECUTED 4000e7cc: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED 40008d80 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008d80: 9d e3 bf 98 save %sp, -104, %sp 40008d84: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008d88: 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 ) { 40008d8c: e6 00 40 00 ld [ %g1 ], %l3 40008d90: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008d94: 02 80 00 51 be 40008ed8 <_Thread_Initialize+0x158> 40008d98: 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; 40008d9c: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40008da0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008da4: 21 10 00 6a sethi %hi(0x4001a800), %l0 40008da8: c2 04 22 e0 ld [ %l0 + 0x2e0 ], %g1 ! 4001aae0 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40008dac: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40008db0: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40008db4: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40008db8: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40008dbc: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40008dc0: c0 26 60 6c clr [ %i1 + 0x6c ] 40008dc4: 80 a0 60 00 cmp %g1, 0 40008dc8: 12 80 00 32 bne 40008e90 <_Thread_Initialize+0x110> 40008dcc: c0 26 61 58 clr [ %i1 + 0x158 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 40008dd0: c0 26 61 68 clr [ %i1 + 0x168 ] 40008dd4: 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; 40008dd8: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40008ddc: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40008de0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 40008de4: 80 a4 a0 02 cmp %l2, 2 40008de8: 12 80 00 05 bne 40008dfc <_Thread_Initialize+0x7c> 40008dec: 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; 40008df0: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40008df4: c4 00 61 98 ld [ %g1 + 0x198 ], %g2 ! 4001a998 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40008df8: 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; 40008dfc: 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 ); 40008e00: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40008e04: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40008e08: 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 ); 40008e0c: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40008e10: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 40008e14: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40008e18: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40008e1c: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40008e20: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40008e24: 40 00 02 02 call 4000962c <_Thread_Set_priority> 40008e28: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40008e2c: c4 06 60 08 ld [ %i1 + 8 ], %g2 40008e30: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008e34: 03 00 00 3f sethi %hi(0xfc00), %g1 40008e38: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008e3c: 84 08 80 01 and %g2, %g1, %g2 40008e40: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40008e44: 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; 40008e48: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40008e4c: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40008e50: 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 ); 40008e54: 90 10 00 19 mov %i1, %o0 40008e58: 40 00 03 cc call 40009d88 <_User_extensions_Thread_create> 40008e5c: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 40008e60: 80 8a 20 ff btst 0xff, %o0 40008e64: 12 80 00 09 bne 40008e88 <_Thread_Initialize+0x108> 40008e68: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40008e6c: 02 80 00 05 be 40008e80 <_Thread_Initialize+0x100> <== NOT EXECUTED 40008e70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 40008e74: 40 00 04 e7 call 4000a210 <_Workspace_Free> <== NOT EXECUTED 40008e78: 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 ); 40008e7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008e80: 40 00 02 a7 call 4000991c <_Thread_Stack_Free> <== NOT EXECUTED 40008e84: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40008e88: 81 c7 e0 08 ret 40008e8c: 81 e8 00 00 restore /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 40008e90: 90 00 60 01 add %g1, 1, %o0 40008e94: 40 00 04 e6 call 4000a22c <_Workspace_Allocate> 40008e98: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40008e9c: b6 92 20 00 orcc %o0, 0, %i3 40008ea0: 02 80 00 19 be 40008f04 <_Thread_Initialize+0x184> 40008ea4: c2 04 22 e0 ld [ %l0 + 0x2e0 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008ea8: 88 80 60 01 addcc %g1, 1, %g4 40008eac: 02 bf ff cb be 40008dd8 <_Thread_Initialize+0x58> 40008eb0: f6 26 61 68 st %i3, [ %i1 + 0x168 ] 40008eb4: 84 10 20 00 clr %g2 40008eb8: 86 10 00 1b mov %i3, %g3 the_thread->extensions[i] = NULL; 40008ebc: 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++ ) 40008ec0: 84 00 a0 01 inc %g2 40008ec4: 80 a0 80 04 cmp %g2, %g4 40008ec8: 0a bf ff fd bcs 40008ebc <_Thread_Initialize+0x13c> 40008ecc: 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; 40008ed0: 10 bf ff c3 b 40008ddc <_Thread_Initialize+0x5c> 40008ed4: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40008ed8: 90 10 00 19 mov %i1, %o0 40008edc: 40 00 02 74 call 400098ac <_Thread_Stack_Allocate> 40008ee0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40008ee4: 80 a2 20 00 cmp %o0, 0 40008ee8: 02 80 00 09 be 40008f0c <_Thread_Initialize+0x18c> 40008eec: 80 a6 c0 08 cmp %i3, %o0 40008ef0: 18 80 00 07 bgu 40008f0c <_Thread_Initialize+0x18c> 40008ef4: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40008ef8: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40008efc: 10 bf ff aa b 40008da4 <_Thread_Initialize+0x24> 40008f00: 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 ); 40008f04: 40 00 02 86 call 4000991c <_Thread_Stack_Free> <== NOT EXECUTED 40008f08: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008f0c: 81 c7 e0 08 ret 40008f10: 91 e8 20 00 restore %g0, 0, %o0 4000e5b0 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000e5b0: 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; 4000e5b4: 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; 4000e5b8: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000e5bc: 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; 4000e5c0: 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; 4000e5c4: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000e5c8: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000e5cc: 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; 4000e5d0: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000e5d4: 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 ) ) { 4000e5d8: 7f ff ee 9b call 4000a044 <_Thread_queue_Extract_with_proxy> 4000e5dc: 90 10 00 18 mov %i0, %o0 4000e5e0: 80 8a 20 ff btst 0xff, %o0 4000e5e4: 32 80 00 07 bne,a 4000e600 <_Thread_Reset+0x50> 4000e5e8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000e5ec: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000e5f0: 80 a0 60 02 cmp %g1, 2 4000e5f4: 02 80 00 0c be 4000e624 <_Thread_Reset+0x74> 4000e5f8: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000e5fc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 4000e600: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000e604: 80 a0 40 19 cmp %g1, %i1 4000e608: 02 80 00 05 be 4000e61c <_Thread_Reset+0x6c> 4000e60c: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000e610: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000e614: 7f ff ef 0b call 4000a240 <_Thread_Set_priority> 4000e618: 81 e8 00 00 restore 4000e61c: 81 c7 e0 08 ret 4000e620: 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 ); 4000e624: 7f ff f1 b4 call 4000acf4 <_Watchdog_Remove> <== NOT EXECUTED 4000e628: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000e62c: 10 bf ff f5 b 4000e600 <_Thread_Reset+0x50> <== NOT EXECUTED 4000e630: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000d884 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000d884: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000d888: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000d88c: e0 00 63 00 ld [ %g1 + 0x300 ], %l0 ! 4001ab00 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000d890: 7f ff d1 66 call 40001e28 4000d894: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000d898: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000d89c: c4 04 40 00 ld [ %l1 ], %g2 4000d8a0: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000d8a4: 80 a0 80 01 cmp %g2, %g1 4000d8a8: 02 80 00 18 be 4000d908 <_Thread_Reset_timeslice+0x84> 4000d8ac: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d8b0: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000d8b4: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000d8b8: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d8bc: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d8c0: 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; 4000d8c4: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000d8c8: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d8cc: 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; 4000d8d0: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000d8d4: 7f ff d1 59 call 40001e38 4000d8d8: 01 00 00 00 nop 4000d8dc: 7f ff d1 53 call 40001e28 4000d8e0: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000d8e4: 07 10 00 6a sethi %hi(0x4001a800), %g3 4000d8e8: c2 00 e2 cc ld [ %g3 + 0x2cc ], %g1 ! 4001aacc <_Thread_Heir> 4000d8ec: 80 a4 00 01 cmp %l0, %g1 4000d8f0: 02 80 00 08 be 4000d910 <_Thread_Reset_timeslice+0x8c> 4000d8f4: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 4000d8f8: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000d8fc: c4 28 63 10 stb %g2, [ %g1 + 0x310 ] ! 4001ab10 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000d900: 7f ff d1 4e call 40001e38 <== NOT EXECUTED 4000d904: 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 ); 4000d908: 7f ff d1 4c call 40001e38 4000d90c: 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; 4000d910: c2 04 40 00 ld [ %l1 ], %g1 4000d914: c2 20 e2 cc st %g1, [ %g3 + 0x2cc ] _Context_Switch_necessary = TRUE; 4000d918: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000d91c: c4 28 63 10 stb %g2, [ %g1 + 0x310 ] ! 4001ab10 <_Context_Switch_necessary> _ISR_Enable( level ); 4000d920: 7f ff d1 46 call 40001e38 4000d924: 81 e8 00 00 restore 4000d928: 01 00 00 00 nop 4000af74 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4000af74: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000af78: 7f ff de c9 call 40002a9c 4000af7c: 01 00 00 00 nop 4000af80: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000af84: 80 8e 60 ff btst 0xff, %i1 4000af88: 22 80 00 0d be,a 4000afbc <_Thread_Resume+0x48> 4000af8c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 4000af90: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 4000af94: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 4000af98: 80 88 60 02 btst 2, %g1 4000af9c: 02 80 00 06 be 4000afb4 <_Thread_Resume+0x40> 4000afa0: 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); 4000afa4: 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 ) ) { 4000afa8: 80 a0 60 00 cmp %g1, 0 4000afac: 02 80 00 0a be 4000afd4 <_Thread_Resume+0x60> 4000afb0: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 4000afb4: 7f ff de be call 40002aac 4000afb8: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 4000afbc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000afc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000afc4: 02 bf ff f4 be 4000af94 <_Thread_Resume+0x20> <== NOT EXECUTED 4000afc8: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 4000afcc: 7f ff de b8 call 40002aac <== NOT EXECUTED 4000afd0: 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; 4000afd4: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 4000afd8: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 4000afdc: 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); 4000afe0: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 4000afe4: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000afe8: 1b 10 00 9d sethi %hi(0x40027400), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000afec: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000aff0: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000aff4: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 4000aff8: c2 26 00 00 st %g1, [ %i0 ] 4000affc: c4 13 61 34 lduh [ %o5 + 0x134 ], %g2 old_last_node = the_chain->last; 4000b000: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 4000b004: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000b008: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000b00c: c8 26 20 04 st %g4, [ %i0 + 4 ] 4000b010: c4 33 61 34 sth %g2, [ %o5 + 0x134 ] 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; 4000b014: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 4000b018: 7f ff de a5 call 40002aac 4000b01c: 90 10 00 10 mov %l0, %o0 4000b020: 7f ff de 9f call 40002a9c 4000b024: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000b028: 09 10 00 9d sethi %hi(0x40027400), %g4 4000b02c: c4 01 21 0c ld [ %g4 + 0x10c ], %g2 ! 4002750c <_Thread_Heir> 4000b030: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000b034: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 4000b038: 80 a0 c0 01 cmp %g3, %g1 4000b03c: 1a bf ff de bcc 4000afb4 <_Thread_Resume+0x40> 4000b040: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000b044: 03 10 00 9d sethi %hi(0x40027400), %g1 4000b048: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 40027540 <_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; 4000b04c: f0 21 21 0c st %i0, [ %g4 + 0x10c ] if ( _Thread_Executing->is_preemptible || 4000b050: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 4000b054: 80 a0 60 00 cmp %g1, 0 4000b058: 02 80 00 06 be 4000b070 <_Thread_Resume+0xfc> 4000b05c: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000b060: 84 10 20 01 mov 1, %g2 4000b064: 03 10 00 9d sethi %hi(0x40027400), %g1 4000b068: c4 28 61 50 stb %g2, [ %g1 + 0x150 ] ! 40027550 <_Context_Switch_necessary> 4000b06c: 30 bf ff d2 b,a 4000afb4 <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000b070: 12 bf ff d1 bne 4000afb4 <_Thread_Resume+0x40> 4000b074: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000b078: 10 bf ff fc b 4000b068 <_Thread_Resume+0xf4> <== NOT EXECUTED 4000b07c: 03 10 00 9d sethi %hi(0x40027400), %g1 <== NOT EXECUTED 400098ac <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 400098ac: 9d e3 bf 98 save %sp, -104, %sp 400098b0: 03 10 00 66 sethi %hi(0x40019800), %g1 400098b4: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 40019ba0 400098b8: 80 a6 40 01 cmp %i1, %g1 400098bc: 2a 80 00 02 bcs,a 400098c4 <_Thread_Stack_Allocate+0x18> 400098c0: 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 ) { 400098c4: 03 10 00 6a sethi %hi(0x4001a800), %g1 400098c8: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001aad8 <_Configuration_Table> 400098cc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 400098d0: 80 a0 60 00 cmp %g1, 0 400098d4: 22 80 00 0a be,a 400098fc <_Thread_Stack_Allocate+0x50> 400098d8: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 400098dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400098e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 400098e4: 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 ) 400098e8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 400098ec: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 400098f0: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 400098f4: 81 c7 e0 08 ret <== NOT EXECUTED 400098f8: 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 ); 400098fc: 40 00 02 4c call 4000a22c <_Workspace_Allocate> 40009900: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 40009904: 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 ) 40009908: 80 a0 00 08 cmp %g0, %o0 4000990c: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40009910: b0 0e 40 18 and %i1, %i0, %i0 40009914: 81 c7 e0 08 ret 40009918: 81 e8 00 00 restore 4000991c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000991c: 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 ) 40009920: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 40009924: 80 a0 60 00 cmp %g1, 0 40009928: 02 80 00 09 be 4000994c <_Thread_Stack_Free+0x30> 4000992c: 03 10 00 6a sethi %hi(0x4001a800), %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 ) 40009930: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001aad8 <_Configuration_Table> 40009934: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 40009938: 80 a0 60 00 cmp %g1, 0 4000993c: 22 80 00 06 be,a 40009954 <_Thread_Stack_Free+0x38> 40009940: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 40009944: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009948: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 4000994c: 81 c7 e0 08 ret <== NOT EXECUTED 40009950: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 40009954: 40 00 02 2f call 4000a210 <_Workspace_Free> 40009958: 81 e8 00 00 restore 4000995c: 01 00 00 00 nop 4000922c <_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 ) { 4000922c: 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; 40009230: 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); 40009234: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009238: 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); 4000923c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 40009240: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 40009244: 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 ) { 40009248: 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 ) ) 4000924c: 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); 40009250: 83 34 a0 06 srl %l2, 6, %g1 40009254: 12 80 00 30 bne 40009314 <_Thread_queue_Enqueue_priority+0xe8> 40009258: 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; 4000925c: 85 28 60 04 sll %g1, 4, %g2 40009260: 83 28 60 02 sll %g1, 2, %g1 40009264: 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; 40009268: b0 10 00 01 mov %g1, %i0 4000926c: 82 05 80 01 add %l6, %g1, %g1 40009270: 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 ); 40009274: 7f ff e2 ed call 40001e28 40009278: 01 00 00 00 nop 4000927c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 40009280: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40009284: 80 a4 00 13 cmp %l0, %l3 40009288: 32 80 00 18 bne,a 400092e8 <_Thread_queue_Enqueue_priority+0xbc> 4000928c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 40009290: 10 80 00 81 b 40009494 <_Thread_queue_Enqueue_priority+0x268> 40009294: 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 ) ) 40009298: 80 a4 00 13 cmp %l0, %l3 4000929c: 02 80 00 17 be 400092f8 <_Thread_queue_Enqueue_priority+0xcc> 400092a0: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 400092a4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 400092a8: 80 a4 80 11 cmp %l2, %l1 400092ac: 28 80 00 14 bleu,a 400092fc <_Thread_queue_Enqueue_priority+0xd0> 400092b0: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 400092b4: 7f ff e2 e1 call 40001e38 400092b8: 90 10 00 14 mov %l4, %o0 400092bc: 7f ff e2 db call 40001e28 400092c0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400092c4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400092c8: 80 8d 40 01 btst %l5, %g1 400092cc: 02 80 00 6b be 40009478 <_Thread_queue_Enqueue_priority+0x24c> 400092d0: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 400092d4: 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 ) ) { 400092d8: 80 a4 00 13 cmp %l0, %l3 400092dc: 02 80 00 07 be 400092f8 <_Thread_queue_Enqueue_priority+0xcc> 400092e0: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 400092e4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 400092e8: 80 a4 80 11 cmp %l2, %l1 400092ec: 38 bf ff eb bgu,a 40009298 <_Thread_queue_Enqueue_priority+0x6c> 400092f0: 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 ) ) { 400092f4: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400092f8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 400092fc: 80 a6 20 01 cmp %i0, 1 40009300: 02 80 00 47 be 4000941c <_Thread_queue_Enqueue_priority+0x1f0> 40009304: 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; 40009308: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 4000930c: 81 c7 e0 08 ret <== NOT EXECUTED 40009310: 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; 40009314: 85 28 60 04 sll %g1, 4, %g2 40009318: 83 28 60 02 sll %g1, 2, %g1 4000931c: 82 20 80 01 sub %g2, %g1, %g1 40009320: 05 10 00 66 sethi %hi(0x40019800), %g2 40009324: a6 06 00 01 add %i0, %g1, %l3 40009328: ae 10 a3 a4 or %g2, 0x3a4, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 4000932c: 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; 40009330: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 40009334: 7f ff e2 bd call 40001e28 40009338: a2 00 60 01 add %g1, 1, %l1 4000933c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 40009340: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40009344: 80 a4 c0 10 cmp %l3, %l0 40009348: 22 80 00 25 be,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 4000934c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 40009350: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40009354: 80 a4 80 11 cmp %l2, %l1 40009358: 3a 80 00 21 bcc,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 4000935c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40009360: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40009364: 80 a4 c0 10 cmp %l3, %l0 40009368: 32 80 00 19 bne,a 400093cc <_Thread_queue_Enqueue_priority+0x1a0> 4000936c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40009370: 10 80 00 1b b 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 40009374: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40009378: 7f ff e2 b0 call 40001e38 4000937c: 90 10 00 14 mov %l4, %o0 40009380: 7f ff e2 aa call 40001e28 40009384: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40009388: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000938c: 80 8d 40 01 btst %l5, %g1 40009390: 02 80 00 3d be 40009484 <_Thread_queue_Enqueue_priority+0x258> 40009394: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 40009398: 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 ) ) { 4000939c: 80 a4 00 13 cmp %l0, %l3 400093a0: 22 80 00 0f be,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 400093a4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 400093a8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 400093ac: 80 a4 80 11 cmp %l2, %l1 400093b0: 3a 80 00 0b bcc,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 400093b4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 400093b8: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400093bc: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 400093c0: 22 80 00 07 be,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 400093c4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 400093c8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 400093cc: 80 a4 80 11 cmp %l2, %l1 400093d0: 0a bf ff ea bcs 40009378 <_Thread_queue_Enqueue_priority+0x14c> 400093d4: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400093d8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 400093dc: 80 a6 20 01 cmp %i0, 1 400093e0: 12 bf ff ca bne 40009308 <_Thread_queue_Enqueue_priority+0xdc> 400093e4: 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 ) 400093e8: 80 a4 80 11 cmp %l2, %l1 400093ec: 02 80 00 18 be 4000944c <_Thread_queue_Enqueue_priority+0x220> 400093f0: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400093f4: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400093f8: 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; 400093fc: 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; 40009400: 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; 40009404: 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; 40009408: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000940c: 7f ff e2 8b call 40001e38 40009410: 01 00 00 00 nop 40009414: 81 c7 e0 08 ret 40009418: 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 ) 4000941c: 02 80 00 0c be 4000944c <_Thread_queue_Enqueue_priority+0x220> 40009420: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009424: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009428: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 4000942c: 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; 40009430: 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; 40009434: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40009438: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000943c: 7f ff e2 7f call 40001e38 40009440: 90 10 00 14 mov %l4, %o0 40009444: 81 c7 e0 08 ret 40009448: 81 e8 00 00 restore 4000944c: 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; 40009450: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009454: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40009458: 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; 4000945c: 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; 40009460: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40009464: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009468: 7f ff e2 74 call 40001e38 4000946c: b0 10 20 01 mov 1, %i0 40009470: 81 c7 e0 08 ret 40009474: 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 ); 40009478: 7f ff e2 70 call 40001e38 <== NOT EXECUTED 4000947c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40009480: 30 bf ff 7d b,a 40009274 <_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 ); 40009484: 7f ff e2 6d call 40001e38 <== NOT EXECUTED 40009488: 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; 4000948c: 10 bf ff aa b 40009334 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 40009490: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40009494: 10 bf ff 9a b 400092fc <_Thread_queue_Enqueue_priority+0xd0> 40009498: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 4000e7d0 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000e7d0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000e7d4: 7f ff cd 95 call 40001e28 4000e7d8: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000e7dc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000e7e0: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000e7e4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000e7e8: 80 88 80 01 btst %g2, %g1 4000e7ec: 02 80 00 19 be 4000e850 <_Thread_queue_Extract_fifo+0x80> 4000e7f0: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000e7f4: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000e7f8: 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 ) ) { 4000e7fc: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000e800: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000e804: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000e808: 80 a0 e0 02 cmp %g3, 2 4000e80c: 02 80 00 07 be 4000e828 <_Thread_queue_Extract_fifo+0x58> 4000e810: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000e814: 7f ff cd 89 call 40001e38 4000e818: 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 ); 4000e81c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000e820: 7f ff e8 21 call 400088a4 <_Thread_Clear_state> 4000e824: 81 e8 00 00 restore 4000e828: 82 10 20 03 mov 3, %g1 4000e82c: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000e830: 7f ff cd 82 call 40001e38 4000e834: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000e838: 7f ff ee 15 call 4000a08c <_Watchdog_Remove> 4000e83c: 90 06 60 48 add %i1, 0x48, %o0 4000e840: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000e844: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000e848: 7f ff e8 17 call 400088a4 <_Thread_Clear_state> 4000e84c: 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 ); 4000e850: 7f ff cd 7a call 40001e38 <== NOT EXECUTED 4000e854: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000e858: 01 00 00 00 nop 4000d60c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000d60c: 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 ); 4000d610: 7f ff d2 06 call 40001e28 4000d614: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000d618: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000d61c: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000d620: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000d624: 80 88 80 01 btst %g2, %g1 4000d628: 02 80 00 23 be 4000d6b4 <_Thread_queue_Extract_priority_helper+0xa8> 4000d62c: 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)); 4000d630: 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; 4000d634: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000d638: 80 a0 c0 01 cmp %g3, %g1 4000d63c: 02 80 00 2a be 4000d6e4 <_Thread_queue_Extract_priority_helper+0xd8> 4000d640: 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; 4000d644: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000d648: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000d64c: 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; 4000d650: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000d654: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000d658: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000d65c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000d660: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000d664: 80 a0 80 01 cmp %g2, %g1 4000d668: 02 80 00 07 be 4000d684 <_Thread_queue_Extract_priority_helper+0x78> 4000d66c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000d670: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000d674: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000d678: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000d67c: 82 00 e0 3c add %g3, 0x3c, %g1 4000d680: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000d684: 80 8e a0 ff btst 0xff, %i2 4000d688: 12 80 00 0d bne 4000d6bc <_Thread_queue_Extract_priority_helper+0xb0> 4000d68c: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000d690: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000d694: 80 a0 60 02 cmp %g1, 2 4000d698: 02 80 00 0b be 4000d6c4 <_Thread_queue_Extract_priority_helper+0xb8> 4000d69c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000d6a0: 7f ff d1 e6 call 40001e38 4000d6a4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000d6a8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000d6ac: 7f ff ec 7e call 400088a4 <_Thread_Clear_state> 4000d6b0: 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 ); 4000d6b4: 7f ff d1 e1 call 40001e38 <== NOT EXECUTED 4000d6b8: 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 ); 4000d6bc: 7f ff d1 df call 40001e38 4000d6c0: 91 e8 00 08 restore %g0, %o0, %o0 4000d6c4: 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 ); 4000d6c8: 7f ff d1 dc call 40001e38 4000d6cc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000d6d0: 7f ff f2 6f call 4000a08c <_Watchdog_Remove> 4000d6d4: 90 06 20 48 add %i0, 0x48, %o0 4000d6d8: b2 16 63 f8 or %i1, 0x3f8, %i1 4000d6dc: 7f ff ec 72 call 400088a4 <_Thread_Clear_state> 4000d6e0: 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; 4000d6e4: 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; 4000d6e8: 10 bf ff e7 b 4000d684 <_Thread_queue_Extract_priority_helper+0x78> 4000d6ec: c4 20 40 00 st %g2, [ %g1 ] 4000d6f0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4000d6f0: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000d6f4: 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 && 4000d6f8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000d6fc: 80 a0 e0 00 cmp %g3, 0 4000d700: 02 80 00 06 be 4000d718 <_Thread_queue_Process_timeout+0x28> 4000d704: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000d708: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 4000d70c: 80 a2 40 02 cmp %o1, %g2 4000d710: 02 80 00 07 be 4000d72c <_Thread_queue_Process_timeout+0x3c> 4000d714: 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; 4000d718: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000d71c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000d720: 82 13 c0 00 mov %o7, %g1 4000d724: 7f ff ff af call 4000d5e0 <_Thread_queue_Extract> 4000d728: 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 ) { 4000d72c: 02 80 00 06 be 4000d744 <_Thread_queue_Process_timeout+0x54> 4000d730: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000d734: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000d738: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000d73c: 81 c3 e0 08 retl 4000d740: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 4000d744: 81 c3 e0 08 retl <== NOT EXECUTED 4000d748: 01 00 00 00 nop 4000956c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000956c: 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 ) 40009570: 80 a6 20 00 cmp %i0, 0 40009574: 02 80 00 13 be 400095c0 <_Thread_queue_Requeue+0x54> 40009578: 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 ) { 4000957c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40009580: 80 a4 20 01 cmp %l0, 1 40009584: 02 80 00 04 be 40009594 <_Thread_queue_Requeue+0x28> 40009588: 01 00 00 00 nop 4000958c: 81 c7 e0 08 ret <== NOT EXECUTED 40009590: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40009594: 7f ff e2 25 call 40001e28 40009598: 01 00 00 00 nop 4000959c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 400095a0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 400095a4: 03 00 00 ef sethi %hi(0x3bc00), %g1 400095a8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 400095ac: 80 88 80 01 btst %g2, %g1 400095b0: 12 80 00 06 bne 400095c8 <_Thread_queue_Requeue+0x5c> 400095b4: 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 ); 400095b8: 7f ff e2 20 call 40001e38 400095bc: 90 10 00 11 mov %l1, %o0 400095c0: 81 c7 e0 08 ret 400095c4: 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 ); 400095c8: 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; 400095cc: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 400095d0: 40 00 10 0f call 4000d60c <_Thread_queue_Extract_priority_helper> 400095d4: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 400095d8: 90 10 00 18 mov %i0, %o0 400095dc: 92 10 00 19 mov %i1, %o1 400095e0: 7f ff ff 13 call 4000922c <_Thread_queue_Enqueue_priority> 400095e4: 94 07 bf f4 add %fp, -12, %o2 400095e8: 30 bf ff f4 b,a 400095b8 <_Thread_queue_Requeue+0x4c> 40012cac <_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) { 40012cac: 9d e3 bf 98 save %sp, -104, %sp 40012cb0: 03 10 00 d2 sethi %hi(0x40034800), %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 ); 40012cb4: 05 10 00 d2 sethi %hi(0x40034800), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40012cb8: a0 10 60 9c or %g1, 0x9c, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40012cbc: 03 10 00 d2 sethi %hi(0x40034800), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40012cc0: a4 10 a0 90 or %g2, 0x90, %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 ); 40012cc4: a2 10 60 7c or %g1, 0x7c, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40012cc8: 40 00 02 ca call 400137f0 <_Chain_Get> 40012ccc: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40012cd0: 80 a2 20 00 cmp %o0, 0 40012cd4: 02 80 00 0f be 40012d10 <_Timer_Server_process_insertions+0x64> 40012cd8: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40012cdc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012ce0: 80 a0 60 01 cmp %g1, 1 40012ce4: 02 80 00 12 be 40012d2c <_Timer_Server_process_insertions+0x80> 40012ce8: 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 ) { 40012cec: 02 80 00 0b be 40012d18 <_Timer_Server_process_insertions+0x6c> 40012cf0: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012cf4: 7f ff ff ee call 40012cac <_Timer_Server_process_insertions> <== NOT EXECUTED 40012cf8: 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 ); 40012cfc: 40 00 02 bd call 400137f0 <_Chain_Get> 40012d00: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40012d04: 80 a2 20 00 cmp %o0, 0 40012d08: 32 bf ff f6 bne,a 40012ce0 <_Timer_Server_process_insertions+0x34> 40012d0c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 40012d10: 81 c7 e0 08 ret 40012d14: 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 ); 40012d18: 40 00 12 10 call 40017558 <_Watchdog_Insert> 40012d1c: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012d20: 7f ff ff e3 call 40012cac <_Timer_Server_process_insertions> 40012d24: 01 00 00 00 nop 40012d28: 30 bf ff f5 b,a 40012cfc <_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 ); 40012d2c: 92 02 20 10 add %o0, 0x10, %o1 40012d30: 40 00 12 0a call 40017558 <_Watchdog_Insert> 40012d34: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012d38: 7f ff ff dd call 40012cac <_Timer_Server_process_insertions> 40012d3c: 01 00 00 00 nop 40012d40: 30 bf ff ef b,a 40012cfc <_Timer_Server_process_insertions+0x50> 4000b790 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000b790: 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; 4000b794: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000b798: 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; 4000b79c: 91 38 60 1f sra %g1, 0x1f, %o0 4000b7a0: 92 10 00 01 mov %g1, %o1 4000b7a4: 83 30 60 1d srl %g1, 0x1d, %g1 4000b7a8: 87 2a 60 03 sll %o1, 3, %g3 4000b7ac: 85 2a 20 03 sll %o0, 3, %g2 4000b7b0: 84 10 40 02 or %g1, %g2, %g2 4000b7b4: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b7b8: 99 28 a0 05 sll %g2, 5, %o4 4000b7bc: 9b 28 e0 05 sll %g3, 5, %o5 4000b7c0: 98 10 40 0c or %g1, %o4, %o4 4000b7c4: 9a a3 40 03 subcc %o5, %g3, %o5 4000b7c8: 83 33 60 1a srl %o5, 0x1a, %g1 4000b7cc: 98 63 00 02 subx %o4, %g2, %o4 4000b7d0: 97 2b 60 06 sll %o5, 6, %o3 4000b7d4: 95 2b 20 06 sll %o4, 6, %o2 4000b7d8: 96 a2 c0 0d subcc %o3, %o5, %o3 4000b7dc: 94 10 40 0a or %g1, %o2, %o2 4000b7e0: 94 62 80 0c subx %o2, %o4, %o2 4000b7e4: 96 82 c0 09 addcc %o3, %o1, %o3 4000b7e8: 94 42 80 08 addx %o2, %o0, %o2 4000b7ec: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b7f0: 85 2a a0 02 sll %o2, 2, %g2 4000b7f4: 84 10 40 02 or %g1, %g2, %g2 4000b7f8: 87 2a e0 02 sll %o3, 2, %g3 4000b7fc: 96 82 c0 03 addcc %o3, %g3, %o3 4000b800: 94 42 80 02 addx %o2, %g2, %o2 4000b804: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b808: 85 2a a0 02 sll %o2, 2, %g2 4000b80c: 84 10 40 02 or %g1, %g2, %g2 4000b810: 87 2a e0 02 sll %o3, 2, %g3 4000b814: 96 82 c0 03 addcc %o3, %g3, %o3 4000b818: 94 42 80 02 addx %o2, %g2, %o2 4000b81c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b820: 85 2a a0 02 sll %o2, 2, %g2 4000b824: 84 10 40 02 or %g1, %g2, %g2 4000b828: 87 2a e0 02 sll %o3, 2, %g3 4000b82c: 96 82 c0 03 addcc %o3, %g3, %o3 4000b830: 94 42 80 02 addx %o2, %g2, %o2 4000b834: 85 32 e0 17 srl %o3, 0x17, %g2 4000b838: 83 2a a0 09 sll %o2, 9, %g1 4000b83c: 9b 2a e0 09 sll %o3, 9, %o5 4000b840: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000b844: 96 83 40 0f addcc %o5, %o7, %o3 4000b848: 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; 4000b84c: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000b850: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000b854: 80 92 80 0b orcc %o2, %o3, %g0 4000b858: 02 80 00 5d be 4000b9cc <_Timespec_Divide+0x23c> 4000b85c: 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; 4000b860: 92 10 00 08 mov %o0, %o1 4000b864: 83 32 60 1d srl %o1, 0x1d, %g1 4000b868: 9b 2a 60 03 sll %o1, 3, %o5 4000b86c: 91 3a 20 1f sra %o0, 0x1f, %o0 4000b870: 99 2a 20 03 sll %o0, 3, %o4 4000b874: 98 10 40 0c or %g1, %o4, %o4 4000b878: 83 33 60 1b srl %o5, 0x1b, %g1 4000b87c: 85 2b 20 05 sll %o4, 5, %g2 4000b880: 87 2b 60 05 sll %o5, 5, %g3 4000b884: 84 10 40 02 or %g1, %g2, %g2 4000b888: 86 a0 c0 0d subcc %g3, %o5, %g3 4000b88c: 83 30 e0 1a srl %g3, 0x1a, %g1 4000b890: 84 60 80 0c subx %g2, %o4, %g2 4000b894: 9b 28 e0 06 sll %g3, 6, %o5 4000b898: 99 28 a0 06 sll %g2, 6, %o4 4000b89c: 9a a3 40 03 subcc %o5, %g3, %o5 4000b8a0: 98 10 40 0c or %g1, %o4, %o4 4000b8a4: 98 63 00 02 subx %o4, %g2, %o4 4000b8a8: 9a 83 40 09 addcc %o5, %o1, %o5 4000b8ac: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8b0: 98 43 00 08 addx %o4, %o0, %o4 4000b8b4: 87 2b 60 02 sll %o5, 2, %g3 4000b8b8: 85 2b 20 02 sll %o4, 2, %g2 4000b8bc: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8c0: 84 10 40 02 or %g1, %g2, %g2 4000b8c4: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8c8: 98 43 00 02 addx %o4, %g2, %o4 4000b8cc: 87 2b 60 02 sll %o5, 2, %g3 4000b8d0: 85 2b 20 02 sll %o4, 2, %g2 4000b8d4: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8d8: 84 10 40 02 or %g1, %g2, %g2 4000b8dc: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8e0: 98 43 00 02 addx %o4, %g2, %o4 4000b8e4: 87 2b 60 02 sll %o5, 2, %g3 4000b8e8: 85 2b 20 02 sll %o4, 2, %g2 4000b8ec: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8f0: 84 10 40 02 or %g1, %g2, %g2 4000b8f4: 98 43 00 02 addx %o4, %g2, %o4 4000b8f8: 83 2b 20 09 sll %o4, 9, %g1 4000b8fc: 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; 4000b900: 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; 4000b904: a0 11 00 01 or %g4, %g1, %l0 4000b908: 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; 4000b90c: a2 84 40 13 addcc %l1, %l3, %l1 4000b910: 83 34 60 1e srl %l1, 0x1e, %g1 4000b914: 87 2c 60 02 sll %l1, 2, %g3 4000b918: a5 3c a0 1f sra %l2, 0x1f, %l2 4000b91c: a0 44 00 12 addx %l0, %l2, %l0 4000b920: 85 2c 20 02 sll %l0, 2, %g2 4000b924: 84 10 40 02 or %g1, %g2, %g2 4000b928: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b92c: 99 28 a0 05 sll %g2, 5, %o4 4000b930: 9b 28 e0 05 sll %g3, 5, %o5 4000b934: 98 10 40 0c or %g1, %o4, %o4 4000b938: 9a a3 40 03 subcc %o5, %g3, %o5 4000b93c: 98 63 00 02 subx %o4, %g2, %o4 4000b940: 9a 83 40 11 addcc %o5, %l1, %o5 4000b944: 83 33 60 1e srl %o5, 0x1e, %g1 4000b948: 98 43 00 10 addx %o4, %l0, %o4 4000b94c: 87 2b 60 02 sll %o5, 2, %g3 4000b950: 85 2b 20 02 sll %o4, 2, %g2 4000b954: 9a 83 40 03 addcc %o5, %g3, %o5 4000b958: 84 10 40 02 or %g1, %g2, %g2 4000b95c: 83 33 60 1e srl %o5, 0x1e, %g1 4000b960: 87 2b 60 02 sll %o5, 2, %g3 4000b964: 98 43 00 02 addx %o4, %g2, %o4 4000b968: 9a 83 40 03 addcc %o5, %g3, %o5 4000b96c: 85 2b 20 02 sll %o4, 2, %g2 4000b970: 84 10 40 02 or %g1, %g2, %g2 4000b974: 83 33 60 1b srl %o5, 0x1b, %g1 4000b978: 98 43 00 02 addx %o4, %g2, %o4 4000b97c: 99 2b 20 05 sll %o4, 5, %o4 4000b980: 98 10 40 0c or %g1, %o4, %o4 4000b984: 93 2b 60 05 sll %o5, 5, %o1 4000b988: 40 00 36 fe call 40019580 <__udivdi3> 4000b98c: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000b990: 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; 4000b994: a0 10 00 08 mov %o0, %l0 4000b998: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000b99c: 96 10 23 e8 mov 0x3e8, %o3 4000b9a0: 40 00 36 f8 call 40019580 <__udivdi3> 4000b9a4: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000b9a8: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000b9ac: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000b9b0: 94 10 20 00 clr %o2 4000b9b4: 92 10 00 11 mov %l1, %o1 4000b9b8: 40 00 37 ce call 400198f0 <__umoddi3> 4000b9bc: 96 10 23 e8 mov 0x3e8, %o3 4000b9c0: d2 26 c0 00 st %o1, [ %i3 ] 4000b9c4: 81 c7 e0 08 ret 4000b9c8: 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; 4000b9cc: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000b9d0: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000b9d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b9d8: 81 e8 00 00 restore <== NOT EXECUTED 400103ac <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 400103ac: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 400103b0: 40 00 14 e1 call 40015734 <_Chain_Extract> 400103b4: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 400103b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400103bc: 80 a0 60 00 cmp %g1, 0 400103c0: 02 80 00 04 be 400103d0 <_User_extensions_Remove_set+0x24> 400103c4: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 400103c8: 40 00 14 db call 40015734 <_Chain_Extract> <== NOT EXECUTED 400103cc: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 400103d0: 81 c7 e0 08 ret 400103d4: 81 e8 00 00 restore 40009d88 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40009d88: 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 ; 40009d8c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40009d90: e0 00 60 78 ld [ %g1 + 0x78 ], %l0 ! 4001ac78 <_User_extensions_List> 40009d94: 82 10 60 78 or %g1, 0x78, %g1 40009d98: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40009d9c: 80 a4 00 11 cmp %l0, %l1 40009da0: 02 80 00 10 be 40009de0 <_User_extensions_Thread_create+0x58> 40009da4: 03 10 00 6a sethi %hi(0x4001a800), %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)( 40009da8: a4 10 63 00 or %g1, 0x300, %l2 ! 4001ab00 <_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 ) { 40009dac: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40009db0: 80 a0 60 00 cmp %g1, 0 40009db4: 02 80 00 07 be 40009dd0 <_User_extensions_Thread_create+0x48> 40009db8: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40009dbc: 9f c0 40 00 call %g1 40009dc0: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40009dc4: 80 8a 20 ff btst 0xff, %o0 40009dc8: 02 80 00 08 be 40009de8 <_User_extensions_Thread_create+0x60> 40009dcc: 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 ) { 40009dd0: 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 ) ; 40009dd4: 80 a4 00 11 cmp %l0, %l1 40009dd8: 32 bf ff f6 bne,a 40009db0 <_User_extensions_Thread_create+0x28> 40009ddc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40009de0: 81 c7 e0 08 ret 40009de4: 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 ) 40009de8: 81 c7 e0 08 ret <== NOT EXECUTED 40009dec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000bd64 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000bd64: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000bd68: 7f ff db 4d call 40002a9c 4000bd6c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bd70: 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; 4000bd74: 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 ) ) { 4000bd78: 80 a0 80 10 cmp %g2, %l0 4000bd7c: 02 80 00 1f be 4000bdf8 <_Watchdog_Adjust+0x94> 4000bd80: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000bd84: 12 80 00 1f bne 4000be00 <_Watchdog_Adjust+0x9c> 4000bd88: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000bd8c: 80 a6 a0 00 cmp %i2, 0 4000bd90: 02 80 00 1a be 4000bdf8 <_Watchdog_Adjust+0x94> 4000bd94: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000bd98: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000bd9c: 80 a6 80 19 cmp %i2, %i1 4000bda0: 1a 80 00 0b bcc 4000bdcc <_Watchdog_Adjust+0x68> 4000bda4: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 4000bda8: 10 80 00 1d b 4000be1c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000bdac: 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 ) { 4000bdb0: b4 a6 80 19 subcc %i2, %i1, %i2 4000bdb4: 02 80 00 11 be 4000bdf8 <_Watchdog_Adjust+0x94> 4000bdb8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000bdbc: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000bdc0: 80 a6 40 1a cmp %i1, %i2 4000bdc4: 18 80 00 16 bgu 4000be1c <_Watchdog_Adjust+0xb8> 4000bdc8: 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; 4000bdcc: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 4000bdd0: 7f ff db 37 call 40002aac 4000bdd4: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000bdd8: 40 00 00 b4 call 4000c0a8 <_Watchdog_Tickle> 4000bddc: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000bde0: 7f ff db 2f call 40002a9c 4000bde4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bde8: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 4000bdec: 80 a4 00 01 cmp %l0, %g1 4000bdf0: 12 bf ff f0 bne 4000bdb0 <_Watchdog_Adjust+0x4c> 4000bdf4: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 4000bdf8: 7f ff db 2d call 40002aac 4000bdfc: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000be00: 12 bf ff fe bne 4000bdf8 <_Watchdog_Adjust+0x94> 4000be04: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000be08: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000be0c: 82 00 40 1a add %g1, %i2, %g1 4000be10: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 4000be14: 7f ff db 26 call 40002aac 4000be18: 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; 4000be1c: 10 bf ff f7 b 4000bdf8 <_Watchdog_Adjust+0x94> 4000be20: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 40017488 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 40017488: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 4001748c: a2 96 60 00 orcc %i1, 0, %l1 40017490: 12 80 00 04 bne 400174a0 <_Watchdog_Adjust_to_chain+0x18> 40017494: 01 00 00 00 nop 40017498: 81 c7 e0 08 ret 4001749c: 81 e8 00 00 restore return; } _ISR_Disable( level ); 400174a0: 7f ff cf 86 call 4000b2b8 400174a4: 01 00 00 00 nop 400174a8: a6 10 00 08 mov %o0, %l3 400174ac: 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; 400174b0: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 400174b4: 80 a0 80 10 cmp %g2, %l0 400174b8: 02 80 00 25 be 4001754c <_Watchdog_Adjust_to_chain+0xc4> 400174bc: a4 06 a0 04 add %i2, 4, %l2 400174c0: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 400174c4: 80 a6 40 11 cmp %i1, %l1 400174c8: 18 80 00 20 bgu 40017548 <_Watchdog_Adjust_to_chain+0xc0> 400174cc: 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; 400174d0: 10 80 00 15 b 40017524 <_Watchdog_Adjust_to_chain+0x9c> 400174d4: 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; 400174d8: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 400174dc: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400174e0: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 400174e4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 400174e8: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 400174ec: 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; 400174f0: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 400174f4: 7f ff cf 75 call 4000b2c8 400174f8: 90 10 00 13 mov %l3, %o0 400174fc: 7f ff cf 6f call 4000b2b8 40017500: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40017504: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40017508: 80 a4 00 02 cmp %l0, %g2 4001750c: 02 80 00 10 be 4001754c <_Watchdog_Adjust_to_chain+0xc4> 40017510: 01 00 00 00 nop 40017514: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40017518: 80 a0 60 00 cmp %g1, 0 4001751c: 32 80 00 07 bne,a 40017538 <_Watchdog_Adjust_to_chain+0xb0> 40017520: 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)) 40017524: 80 a4 00 02 cmp %l0, %g2 40017528: 32 bf ff ec bne,a 400174d8 <_Watchdog_Adjust_to_chain+0x50> 4001752c: c2 00 80 00 ld [ %g2 ], %g1 40017530: 10 bf ff ec b 400174e0 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 40017534: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 40017538: 02 80 00 05 be 4001754c <_Watchdog_Adjust_to_chain+0xc4> 4001753c: 01 00 00 00 nop 40017540: 10 bf ff e1 b 400174c4 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 40017544: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 40017548: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 4001754c: 7f ff cf 5f call 4000b2c8 40017550: 91 e8 00 13 restore %g0, %l3, %o0 40017554: 01 00 00 00 nop 40009ee0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009ee0: 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; 40009ee4: 03 10 00 6a sethi %hi(0x4001a800), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009ee8: 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; 40009eec: e6 00 62 dc ld [ %g1 + 0x2dc ], %l3 _ISR_Disable( level ); 40009ef0: 7f ff df ce call 40001e28 40009ef4: 01 00 00 00 nop 40009ef8: 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 ) { 40009efc: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009f00: 80 a0 60 00 cmp %g1, 0 40009f04: 12 80 00 4a bne 4000a02c <_Watchdog_Insert+0x14c> 40009f08: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40009f0c: 2b 10 00 6a sethi %hi(0x4001a800), %l5 40009f10: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 ! 4001ab90 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009f14: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40009f18: 82 00 60 01 inc %g1 40009f1c: 2f 10 00 6a sethi %hi(0x4001a800), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009f20: c4 26 60 08 st %g2, [ %i1 + 8 ] 40009f24: a8 15 e2 fc or %l7, 0x2fc, %l4 _Watchdog_Sync_count++; 40009f28: c2 25 63 90 st %g1, [ %l5 + 0x390 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009f2c: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40009f30: 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 ; 40009f34: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40009f38: 80 a4 a0 00 cmp %l2, 0 40009f3c: 02 80 00 2b be 40009fe8 <_Watchdog_Insert+0x108> 40009f40: 03 10 00 6a sethi %hi(0x4001a800), %g1 40009f44: c2 04 40 00 ld [ %l1 ], %g1 40009f48: 80 a0 60 00 cmp %g1, 0 40009f4c: 02 80 00 27 be 40009fe8 <_Watchdog_Insert+0x108> 40009f50: 03 10 00 6a sethi %hi(0x4001a800), %g1 break; if ( delta_interval < after->delta_interval ) { 40009f54: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009f58: 80 a4 80 10 cmp %l2, %l0 40009f5c: 1a 80 00 13 bcc 40009fa8 <_Watchdog_Insert+0xc8> 40009f60: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40009f64: 10 80 00 20 b 40009fe4 <_Watchdog_Insert+0x104> 40009f68: 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 ) { 40009f6c: c2 05 00 00 ld [ %l4 ], %g1 40009f70: 80 a4 c0 01 cmp %l3, %g1 40009f74: 0a 80 00 30 bcs 4000a034 <_Watchdog_Insert+0x154> 40009f78: 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 ) ) 40009f7c: a4 a4 80 10 subcc %l2, %l0, %l2 40009f80: 02 80 00 19 be 40009fe4 <_Watchdog_Insert+0x104> 40009f84: e2 04 40 00 ld [ %l1 ], %l1 40009f88: c2 04 40 00 ld [ %l1 ], %g1 40009f8c: 80 a0 60 00 cmp %g1, 0 40009f90: 02 80 00 16 be 40009fe8 <_Watchdog_Insert+0x108> 40009f94: 03 10 00 6a sethi %hi(0x4001a800), %g1 break; if ( delta_interval < after->delta_interval ) { 40009f98: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009f9c: 80 a4 00 12 cmp %l0, %l2 40009fa0: 18 80 00 10 bgu 40009fe0 <_Watchdog_Insert+0x100> 40009fa4: 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 ); 40009fa8: 7f ff df a4 call 40001e38 40009fac: 90 10 00 18 mov %i0, %o0 40009fb0: 7f ff df 9e call 40001e28 40009fb4: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40009fb8: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009fbc: 80 a0 60 01 cmp %g1, 1 40009fc0: 02 bf ff eb be 40009f6c <_Watchdog_Insert+0x8c> 40009fc4: 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; 40009fc8: e6 25 e2 fc st %l3, [ %l7 + 0x2fc ] <== NOT EXECUTED _Watchdog_Sync_count--; 40009fcc: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 <== NOT EXECUTED 40009fd0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009fd4: c2 25 63 90 st %g1, [ %l5 + 0x390 ] <== NOT EXECUTED _ISR_Enable( level ); 40009fd8: 7f ff df 98 call 40001e38 <== NOT EXECUTED 40009fdc: 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; 40009fe0: 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; 40009fe4: 03 10 00 6a sethi %hi(0x4001a800), %g1 40009fe8: c6 00 63 94 ld [ %g1 + 0x394 ], %g3 ! 4001ab94 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 40009fec: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40009ff0: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40009ff4: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40009ff8: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40009ffc: 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; 4000a000: e6 25 e2 fc st %l3, [ %l7 + 0x2fc ] 4000a004: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 4000a008: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 after_node->next = the_node; 4000a00c: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4000a010: c4 26 60 04 st %g2, [ %i1 + 4 ] 4000a014: 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; 4000a018: 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; 4000a01c: c8 26 40 00 st %g4, [ %i1 ] 4000a020: c2 25 63 90 st %g1, [ %l5 + 0x390 ] _ISR_Enable( level ); 4000a024: 7f ff df 85 call 40001e38 4000a028: 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 ); 4000a02c: 7f ff df 83 call 40001e38 <== NOT EXECUTED 4000a030: 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; 4000a034: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000a038: 10 bf ff bf b 40009f34 <_Watchdog_Insert+0x54> 4000a03c: e4 06 60 0c ld [ %i1 + 0xc ], %l2 4000a08c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4000a08c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000a090: 7f ff df 66 call 40001e28 4000a094: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 4000a098: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 4000a09c: 80 a6 20 01 cmp %i0, 1 4000a0a0: 02 80 00 2a be 4000a148 <_Watchdog_Remove+0xbc> 4000a0a4: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a0a8: 1a 80 00 09 bcc 4000a0cc <_Watchdog_Remove+0x40> 4000a0ac: 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; 4000a0b0: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a0b4: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 4001ab94 <_Watchdog_Ticks_since_boot> 4000a0b8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a0bc: 7f ff df 5f call 40001e38 4000a0c0: 01 00 00 00 nop return( previous_state ); } 4000a0c4: 81 c7 e0 08 ret 4000a0c8: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4000a0cc: 18 bf ff fa bgu 4000a0b4 <_Watchdog_Remove+0x28> 4000a0d0: 03 10 00 6a sethi %hi(0x4001a800), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000a0d4: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000a0d8: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000a0dc: c2 01 00 00 ld [ %g4 ], %g1 4000a0e0: 80 a0 60 00 cmp %g1, 0 4000a0e4: 02 80 00 07 be 4000a100 <_Watchdog_Remove+0x74> 4000a0e8: 03 10 00 6a sethi %hi(0x4001a800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000a0ec: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 4000a0f0: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 4000a0f4: 82 00 40 02 add %g1, %g2, %g1 4000a0f8: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 4000a0fc: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a100: c4 00 63 90 ld [ %g1 + 0x390 ], %g2 ! 4001ab90 <_Watchdog_Sync_count> 4000a104: 80 a0 a0 00 cmp %g2, 0 4000a108: 22 80 00 07 be,a 4000a124 <_Watchdog_Remove+0x98> 4000a10c: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 4000a110: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a114: c6 00 62 dc ld [ %g1 + 0x2dc ], %g3 ! 4001aadc <_ISR_Nest_level> 4000a118: 05 10 00 6a sethi %hi(0x4001a800), %g2 4000a11c: c6 20 a2 fc st %g3, [ %g2 + 0x2fc ] ! 4001aafc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000a120: c2 04 20 04 ld [ %l0 + 4 ], %g1 next->previous = previous; previous->next = next; 4000a124: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000a128: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a12c: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a130: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 4001ab94 <_Watchdog_Ticks_since_boot> 4000a134: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a138: 7f ff df 40 call 40001e38 4000a13c: 01 00 00 00 nop return( previous_state ); } 4000a140: 81 c7 e0 08 ret 4000a144: 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; 4000a148: c4 00 63 94 ld [ %g1 + 0x394 ], %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; 4000a14c: 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; 4000a150: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 4000a154: 7f ff df 39 call 40001e38 <== NOT EXECUTED 4000a158: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 4000a15c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a160: 81 e8 00 00 restore <== NOT EXECUTED 4000a27c <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000a27c: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 4000a280: 80 a6 20 00 cmp %i0, 0 4000a284: 02 80 00 15 be 4000a2d8 <_Workspace_Handler_initialization+0x5c> 4000a288: 80 8e 20 07 btst 7, %i0 4000a28c: 12 80 00 14 bne 4000a2dc <_Workspace_Handler_initialization+0x60> 4000a290: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 4000a294: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a298: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001aad8 <_Configuration_Table> 4000a29c: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 4000a2a0: 80 a0 e0 00 cmp %g3, 0 4000a2a4: 32 80 00 11 bne,a 4000a2e8 <_Workspace_Handler_initialization+0x6c> 4000a2a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 4000a2ac: 92 10 00 18 mov %i0, %o1 4000a2b0: 94 10 00 19 mov %i1, %o2 4000a2b4: 11 10 00 6a sethi %hi(0x4001a800), %o0 4000a2b8: 96 10 20 08 mov 8, %o3 4000a2bc: 7f ff f5 eb call 40007a68 <_Heap_Initialize> 4000a2c0: 90 12 22 64 or %o0, 0x264, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000a2c4: 80 a2 20 00 cmp %o0, 0 4000a2c8: 02 80 00 0d be 4000a2fc <_Workspace_Handler_initialization+0x80> 4000a2cc: 92 10 20 01 mov 1, %o1 4000a2d0: 81 c7 e0 08 ret 4000a2d4: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 4000a2d8: 90 10 20 00 clr %o0 4000a2dc: 92 10 20 01 mov 1, %o1 4000a2e0: 7f ff f6 6f call 40007c9c <_Internal_error_Occurred> 4000a2e4: 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 ); 4000a2e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a2ec: 40 00 13 c3 call 4000f1f8 <== NOT EXECUTED 4000a2f0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 4000a2f4: 10 bf ff ef b 4000a2b0 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 4000a2f8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4000a2fc: 7f ff f6 68 call 40007c9c <_Internal_error_Occurred> <== NOT EXECUTED 4000a300: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 4000a304: 01 00 00 00 nop 400083c4 : } unsigned int alarm( unsigned int seconds ) { 400083c4: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 400083c8: 03 10 00 69 sethi %hi(0x4001a400), %g1 400083cc: a2 10 60 84 or %g1, 0x84, %l1 ! 4001a484 <_POSIX_signals_Alarm_timer> 400083d0: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400083d4: 80 a0 a0 00 cmp %g2, 0 400083d8: 02 80 00 23 be 40008464 400083dc: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 400083e0: 40 00 14 a0 call 4000d660 <_Watchdog_Remove> 400083e4: 90 10 00 11 mov %l1, %o0 400083e8: 90 02 3f fe add %o0, -2, %o0 400083ec: 80 a2 20 01 cmp %o0, 1 400083f0: 08 80 00 09 bleu 40008414 400083f4: b0 10 20 00 clr %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400083f8: e4 24 60 0c st %l2, [ %l1 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 400083fc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40008400: 11 10 00 69 sethi %hi(0x4001a400), %o0 <== NOT EXECUTED 40008404: 40 00 14 2c call 4000d4b4 <_Watchdog_Insert> <== NOT EXECUTED 40008408: 90 12 22 b4 or %o0, 0x2b4, %o0 ! 4001a6b4 <_Watchdog_Seconds_chain> <== NOT EXECUTED } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4000840c: 81 c7 e0 08 ret <== NOT EXECUTED 40008410: 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 - 40008414: c4 04 60 14 ld [ %l1 + 0x14 ], %g2 40008418: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000841c: e0 04 60 18 ld [ %l1 + 0x18 ], %l0 40008420: d2 00 63 80 ld [ %g1 + 0x380 ], %o1 40008424: a0 24 00 02 sub %l0, %g2, %l0 40008428: 11 00 03 d0 sethi %hi(0xf4000), %o0 4000842c: 40 00 36 7d call 40015e20 <.udiv> 40008430: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 40008434: 92 10 00 08 mov %o0, %o1 40008438: 40 00 36 7a call 40015e20 <.udiv> 4000843c: 90 10 00 10 mov %l0, %o0 40008440: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40008444: 92 10 00 11 mov %l1, %o1 40008448: b0 20 40 08 sub %g1, %o0, %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000844c: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40008450: 11 10 00 69 sethi %hi(0x4001a400), %o0 40008454: 40 00 14 18 call 4000d4b4 <_Watchdog_Insert> 40008458: 90 12 22 b4 or %o0, 0x2b4, %o0 ! 4001a6b4 <_Watchdog_Seconds_chain> } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4000845c: 81 c7 e0 08 ret 40008460: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40008464: 03 10 00 21 sethi %hi(0x40008400), %g1 40008468: 82 10 60 9c or %g1, 0x9c, %g1 ! 4000849c <_POSIX_signals_Alarm_TSR> the_watchdog->id = id; the_watchdog->user_data = user_data; 4000846c: b0 10 20 00 clr %i0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40008470: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40008474: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 40008478: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000847c: c2 24 60 1c st %g1, [ %l1 + 0x1c ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008480: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40008484: 92 10 00 11 mov %l1, %o1 40008488: 11 10 00 69 sethi %hi(0x4001a400), %o0 4000848c: 40 00 14 0a call 4000d4b4 <_Watchdog_Insert> 40008490: 90 12 22 b4 or %o0, 0x2b4, %o0 ! 4001a6b4 <_Watchdog_Seconds_chain> 40008494: 81 c7 e0 08 ret 40008498: 81 e8 00 00 restore 40025110 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40025110: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40025114: 7f ff ff 0c call 40024d44 40025118: 01 00 00 00 nop 4002511c: 80 a2 00 18 cmp %o0, %i0 40025120: 12 80 00 c6 bne 40025438 40025124: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 40025128: 02 80 00 ca be 40025450 4002512c: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40025130: 80 a0 e0 1f cmp %g3, 0x1f 40025134: 18 80 00 c7 bgu 40025450 40025138: 03 10 00 b0 sethi %hi(0x4002c000), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 4002513c: a1 2e 60 02 sll %i1, 2, %l0 40025140: a4 10 61 3c or %g1, 0x13c, %l2 40025144: a3 2e 60 04 sll %i1, 4, %l1 40025148: 82 24 40 10 sub %l1, %l0, %g1 4002514c: 82 04 80 01 add %l2, %g1, %g1 40025150: c4 00 60 08 ld [ %g1 + 8 ], %g2 40025154: 80 a0 a0 01 cmp %g2, 1 40025158: 02 80 00 95 be 400253ac 4002515c: 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 ) ) 40025160: 80 a6 60 08 cmp %i1, 8 40025164: 02 80 00 94 be 400253b4 40025168: 80 a6 60 04 cmp %i1, 4 4002516c: 02 80 00 92 be 400253b4 40025170: 80 a6 60 0b cmp %i1, 0xb 40025174: 02 80 00 90 be 400253b4 40025178: 82 10 20 01 mov 1, %g1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4002517c: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 40025180: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 40025184: 80 a6 a0 00 cmp %i2, 0 40025188: 02 80 00 a3 be 40025414 4002518c: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 40025190: c2 06 80 00 ld [ %i2 ], %g1 40025194: c2 27 bf f4 st %g1, [ %fp + -12 ] 40025198: 05 10 00 ae sethi %hi(0x4002b800), %g2 4002519c: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1 ! 4002bb00 <_Thread_Dispatch_disable_level> 400251a0: 82 00 60 01 inc %g1 400251a4: c2 20 a3 00 st %g1, [ %g2 + 0x300 ] /* * 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; 400251a8: 03 10 00 ae sethi %hi(0x4002b800), %g1 400251ac: c8 00 63 c0 ld [ %g1 + 0x3c0 ], %g4 ! 4002bbc0 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 400251b0: c4 01 21 60 ld [ %g4 + 0x160 ], %g2 400251b4: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 400251b8: 80 ae 00 01 andncc %i0, %g1, %g0 400251bc: 12 80 00 69 bne 40025360 400251c0: 03 10 00 b0 sethi %hi(0x4002c000), %g1 goto process_it; 400251c4: 98 10 62 c8 or %g1, 0x2c8, %o4 ! 4002c2c8 <_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 ; 400251c8: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 400251cc: 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; 400251d0: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 400251d4: 80 a0 80 0d cmp %g2, %o5 400251d8: 22 80 00 1a be,a 40025240 400251dc: 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)) { 400251e0: 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; 400251e4: 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)) { 400251e8: 80 8e 00 01 btst %i0, %g1 400251ec: 12 80 00 5d bne 40025360 400251f0: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 400251f4: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 400251f8: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 400251fc: 22 80 00 0d be,a 40025230 <== NOT EXECUTED 40025200: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40025204: 10 80 00 58 b 40025364 <== NOT EXECUTED 40025208: 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 ]; 4002520c: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40025210: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40025214: 12 80 00 53 bne 40025360 <== NOT EXECUTED 40025218: 88 10 00 02 mov %g2, %g4 <== NOT EXECUTED 4002521c: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 <== NOT EXECUTED 40025220: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 40025224: 12 80 00 50 bne 40025364 <== NOT EXECUTED 40025228: 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 ) { 4002522c: 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 ) ; 40025230: 80 a0 80 0d cmp %g2, %o5 <== NOT EXECUTED 40025234: 32 bf ff f6 bne,a 4002520c <== NOT EXECUTED 40025238: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 4002523c: 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 ; 40025240: 80 a3 00 0b cmp %o4, %o3 40025244: 12 bf ff e2 bne 400251cc 40025248: 03 10 00 a6 sethi %hi(0x40029800), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4002524c: c4 08 63 14 ldub [ %g1 + 0x314 ], %g2 ! 40029b14 40025250: 90 10 20 00 clr %o0 40025254: 03 10 00 ae sethi %hi(0x4002b800), %g1 40025258: 84 00 a0 01 inc %g2 4002525c: 94 10 62 68 or %g1, 0x268, %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 ) 40025260: 35 04 00 00 sethi %hi(0x10000000), %i2 40025264: 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 ] ) 40025268: c2 02 80 00 ld [ %o2 ], %g1 4002526c: 80 a0 60 00 cmp %g1, 0 40025270: 22 80 00 35 be,a 40025344 40025274: 9a 10 00 02 mov %g2, %o5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40025278: 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 ) 4002527c: 80 a0 60 00 cmp %g1, 0 40025280: 22 80 00 31 be,a 40025344 40025284: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED continue; maximum = the_info->maximum; 40025288: d8 10 60 10 lduh [ %g1 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002528c: 80 a3 20 00 cmp %o4, 0 40025290: 02 80 00 5f be 4002540c 40025294: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 40025298: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 4002529c: 83 29 20 02 sll %g4, 2, %g1 400252a0: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 400252a4: 80 a0 e0 00 cmp %g3, 0 400252a8: 02 80 00 23 be 40025334 400252ac: 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 ) 400252b0: da 00 e0 14 ld [ %g3 + 0x14 ], %o5 400252b4: 80 a3 40 02 cmp %o5, %g2 400252b8: 38 80 00 1f bgu,a 40025334 400252bc: 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 ]; 400252c0: c2 00 e1 60 ld [ %g3 + 0x160 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 400252c4: 80 a0 60 00 cmp %g1, 0 400252c8: 22 80 00 1b be,a 40025334 400252cc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED 400252d0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 400252d4: 80 ae 00 01 andncc %i0, %g1, %g0 400252d8: 22 80 00 17 be,a 40025334 400252dc: 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 ) { 400252e0: 80 a3 40 02 cmp %o5, %g2 400252e4: 2a 80 00 0b bcs,a 40025310 400252e8: 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 ) ) 400252ec: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 <== NOT EXECUTED 400252f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400252f4: 22 80 00 10 be,a 40025334 <== NOT EXECUTED 400252f8: 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 ) ) { 400252fc: d2 00 e0 10 ld [ %g3 + 0x10 ], %o1 <== NOT EXECUTED 40025300: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 40025304: 12 80 00 46 bne 4002541c <== NOT EXECUTED 40025308: 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++ ) { 4002530c: 88 01 20 01 inc %g4 <== NOT EXECUTED 40025310: 80 a3 00 04 cmp %o4, %g4 40025314: 0a 80 00 0c bcs 40025344 40025318: 90 10 00 03 mov %g3, %o0 the_thread = (Thread_Control *) object_table[ index ]; 4002531c: 83 29 20 02 sll %g4, 2, %g1 40025320: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 40025324: 80 a0 e0 00 cmp %g3, 0 40025328: 12 bf ff e2 bne 400252b0 4002532c: 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 ) { 40025330: 9a 10 00 02 mov %g2, %o5 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 40025334: 88 01 20 01 inc %g4 40025338: 80 a3 00 04 cmp %o4, %g4 4002533c: 1a bf ff f9 bcc 40025320 40025340: 83 29 20 02 sll %g4, 2, %g1 40025344: 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; 40025348: 80 a2 80 0f cmp %o2, %o7 4002534c: 12 bf ff c7 bne 40025268 40025350: 84 10 00 0d mov %o5, %g2 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 40025354: 80 a2 20 00 cmp %o0, 0 40025358: 02 80 00 0b be 40025384 4002535c: 88 10 00 08 mov %o0, %g4 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40025360: 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 ) ) { 40025364: 90 10 00 04 mov %g4, %o0 40025368: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4002536c: 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 ) ) { 40025370: 40 00 00 54 call 400254c0 <_POSIX_signals_Unblock_thread> 40025374: 94 07 bf ec add %fp, -20, %o2 40025378: 80 8a 20 ff btst 0xff, %o0 4002537c: 12 80 00 09 bne 400253a0 40025380: 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 ); 40025384: 40 00 00 3f call 40025480 <_POSIX_signals_Set_process_signals> 40025388: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4002538c: b4 24 40 10 sub %l1, %l0, %i2 40025390: c2 04 80 1a ld [ %l2 + %i2 ], %g1 40025394: 80 a0 60 02 cmp %g1, 2 40025398: 02 80 00 0d be 400253cc 4002539c: 11 10 00 b0 sethi %hi(0x4002c000), %o0 psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 400253a0: 7f ff a7 da call 4000f308 <_Thread_Enable_dispatch> 400253a4: 01 00 00 00 nop 400253a8: 90 10 20 00 clr %o0 ! 0 return 0; } 400253ac: 81 c7 e0 08 ret 400253b0: 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 ); 400253b4: 40 00 00 d1 call 400256f8 400253b8: 01 00 00 00 nop 400253bc: 40 00 00 92 call 40025604 400253c0: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400253c4: 81 c7 e0 08 ret 400253c8: 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 *) 400253cc: 7f ff a1 b7 call 4000daa8 <_Chain_Get> 400253d0: 90 12 22 bc or %o0, 0x2bc, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 400253d4: 80 a2 20 00 cmp %o0, 0 400253d8: 02 80 00 24 be 40025468 400253dc: 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 ); 400253e0: 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; 400253e4: c2 22 20 08 st %g1, [ %o0 + 8 ] 400253e8: c4 07 bf f0 ld [ %fp + -16 ], %g2 400253ec: c4 22 20 0c st %g2, [ %o0 + 0xc ] 400253f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400253f4: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 400253f8: 11 10 00 b0 sethi %hi(0x4002c000), %o0 400253fc: 90 12 23 0c or %o0, 0x30c, %o0 ! 4002c30c <_POSIX_signals_Siginfo> 40025400: 7f ff a1 9e call 4000da78 <_Chain_Append> 40025404: 90 02 00 1a add %o0, %i2, %o0 40025408: 30 bf ff e6 b,a 400253a0 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002540c: 10 bf ff ce b 40025344 40025410: 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; 40025414: 10 bf ff 61 b 40025198 40025418: 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 ) 4002541c: 32 bf ff c6 bne,a 40025334 <== NOT EXECUTED 40025420: 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 ) { 40025424: 80 8a 40 1a btst %o1, %i2 <== NOT EXECUTED 40025428: 32 bf ff ba bne,a 40025310 <== NOT EXECUTED 4002542c: 88 01 20 01 inc %g4 <== NOT EXECUTED 40025430: 10 bf ff c1 b 40025334 <== NOT EXECUTED 40025434: 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 ); 40025438: 7f ff d0 51 call 4001957c <__errno> 4002543c: 01 00 00 00 nop 40025440: 82 10 20 03 mov 3, %g1 ! 3 40025444: c2 22 00 00 st %g1, [ %o0 ] 40025448: 10 bf ff d9 b 400253ac 4002544c: 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 ); 40025450: 7f ff d0 4b call 4001957c <__errno> 40025454: 01 00 00 00 nop 40025458: 82 10 20 16 mov 0x16, %g1 ! 16 4002545c: c2 22 00 00 st %g1, [ %o0 ] 40025460: 10 bf ff d3 b 400253ac 40025464: 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 ); 40025468: 7f ff d0 45 call 4001957c <__errno> <== NOT EXECUTED 4002546c: 01 00 00 00 nop <== NOT EXECUTED 40025470: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 40025474: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40025478: 10 bf ff cd b 400253ac <== NOT EXECUTED 4002547c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000af98 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000af98: 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 ) ) { 4000af9c: 90 10 00 1c mov %i4, %o0 4000afa0: 40 00 00 4c call 4000b0d0 <_POSIX_Absolute_timeout_to_ticks> 4000afa4: 92 07 bf f4 add %fp, -12, %o1 4000afa8: 80 a2 20 02 cmp %o0, 2 4000afac: 18 80 00 03 bgu 4000afb8 4000afb0: 98 10 20 01 mov 1, %o4 4000afb4: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000afb8: da 07 bf f4 ld [ %fp + -12 ], %o5 4000afbc: 90 10 00 18 mov %i0, %o0 4000afc0: 92 10 00 19 mov %i1, %o1 4000afc4: 94 10 00 1a mov %i2, %o2 4000afc8: 7f ff ff 21 call 4000ac4c <_POSIX_Message_queue_Receive_support> 4000afcc: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 4000afd0: 81 c7 e0 08 ret 4000afd4: 91 e8 00 08 restore %g0, %o0, %o0 4000afd8 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000afd8: 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 ) ) { 4000afdc: 90 10 00 1c mov %i4, %o0 4000afe0: 40 00 00 3c call 4000b0d0 <_POSIX_Absolute_timeout_to_ticks> 4000afe4: 92 07 bf f4 add %fp, -12, %o1 4000afe8: 80 a2 20 02 cmp %o0, 2 4000afec: 18 80 00 03 bgu 4000aff8 4000aff0: 98 10 20 01 mov 1, %o4 4000aff4: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000aff8: da 07 bf f4 ld [ %fp + -12 ], %o5 4000affc: 90 10 00 18 mov %i0, %o0 4000b000: 92 10 00 19 mov %i1, %o1 4000b004: 94 10 00 1a mov %i2, %o2 4000b008: 7f ff ff 65 call 4000ad9c <_POSIX_Message_queue_Send_support> 4000b00c: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 4000b010: 81 c7 e0 08 ret 4000b014: 91 e8 00 08 restore %g0, %o0, %o0 40006604 : */ void pthread_cleanup_pop( int execute ) { 40006604: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006608: 09 10 00 60 sethi %hi(0x40018000), %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 ]; 4000660c: 05 10 00 60 sethi %hi(0x40018000), %g2 40006610: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1 40006614: c6 00 a1 90 ld [ %g2 + 0x190 ], %g3 40006618: 82 00 60 01 inc %g1 4000661c: e0 00 e1 60 ld [ %g3 + 0x160 ], %l0 40006620: c2 21 20 d0 st %g1, [ %g4 + 0xd0 ] */ void pthread_cleanup_pop( int execute ) { 40006624: 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 ); 40006628: 7f ff ef 8e call 40002460 4000662c: 01 00 00 00 nop 40006630: b0 10 00 08 mov %o0, %i0 if ( _Chain_Is_empty( handler_stack ) ) { 40006634: 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; 40006638: a0 04 20 dc add %l0, 0xdc, %l0 4000663c: 80 a0 40 10 cmp %g1, %l0 40006640: 02 80 00 18 be 400066a0 40006644: 01 00 00 00 nop _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 40006648: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000664c: c4 04 00 00 ld [ %l0 ], %g2 previous = the_node->previous; 40006650: c2 04 20 04 ld [ %l0 + 4 ], %g1 next->previous = previous; previous->next = next; 40006654: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40006658: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000665c: 7f ff ef 85 call 40002470 40006660: 01 00 00 00 nop tmp_handler = *handler; _Workspace_Free( handler ); 40006664: 90 10 00 10 mov %l0, %o0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); tmp_handler = *handler; 40006668: e2 04 20 0c ld [ %l0 + 0xc ], %l1 _Workspace_Free( handler ); 4000666c: 40 00 13 ce call 4000b5a4 <_Workspace_Free> 40006670: e0 04 20 08 ld [ %l0 + 8 ], %l0 _Thread_Enable_dispatch(); 40006674: 40 00 0e 42 call 40009f7c <_Thread_Enable_dispatch> 40006678: 01 00 00 00 nop if ( execute ) 4000667c: 80 a4 a0 00 cmp %l2, 0 40006680: 12 80 00 04 bne 40006690 40006684: 01 00 00 00 nop 40006688: 81 c7 e0 08 ret <== NOT EXECUTED 4000668c: 81 e8 00 00 restore <== NOT EXECUTED (*tmp_handler.routine)( tmp_handler.arg ); 40006690: 9f c4 00 00 call %l0 40006694: 90 10 00 11 mov %l1, %o0 40006698: 81 c7 e0 08 ret 4000669c: 81 e8 00 00 restore _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 400066a0: 40 00 0e 37 call 40009f7c <_Thread_Enable_dispatch> 400066a4: 01 00 00 00 nop _ISR_Enable( level ); 400066a8: 7f ff ef 72 call 40002470 400066ac: 81 e8 00 00 restore 400066b0: 01 00 00 00 nop 400076fc : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 400076fc: 9d e3 bf 60 save %sp, -160, %sp 40007700: 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 ) 40007704: 80 a6 a0 00 cmp %i2, 0 40007708: 02 80 00 6f be 400078c4 4000770c: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40007710: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40007714: 80 a6 60 00 cmp %i1, 0 40007718: 02 80 00 03 be 40007724 4000771c: a2 10 63 28 or %g1, 0x328, %l1 40007720: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 40007724: c2 04 40 00 ld [ %l1 ], %g1 40007728: 80 a0 60 00 cmp %g1, 0 4000772c: 22 80 00 66 be,a 400078c4 40007730: 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) ) 40007734: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007738: 80 a0 60 00 cmp %g1, 0 4000773c: 02 80 00 07 be 40007758 40007740: 03 10 00 77 sethi %hi(0x4001dc00), %g1 40007744: c4 04 60 08 ld [ %l1 + 8 ], %g2 40007748: c6 00 63 40 ld [ %g1 + 0x340 ], %g3 4000774c: 80 a0 80 03 cmp %g2, %g3 40007750: 2a 80 00 5d bcs,a 400078c4 40007754: 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 ) { 40007758: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 4000775c: 80 a0 60 01 cmp %g1, 1 40007760: 02 80 00 5b be 400078cc 40007764: 80 a0 60 02 cmp %g1, 2 40007768: 22 80 00 04 be,a 40007778 4000776c: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 40007770: 81 c7 e0 08 ret 40007774: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 40007778: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 4000777c: c4 27 bf e0 st %g2, [ %fp + -32 ] 40007780: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 40007784: c2 27 bf e4 st %g1, [ %fp + -28 ] 40007788: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000778c: c4 27 bf e8 st %g2, [ %fp + -24 ] 40007790: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 40007794: c2 27 bf ec st %g1, [ %fp + -20 ] 40007798: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 4000779c: c4 27 bf f0 st %g2, [ %fp + -16 ] 400077a0: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 400077a4: 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 ) 400077a8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400077ac: 80 a0 60 00 cmp %g1, 0 400077b0: 12 80 00 45 bne 400078c4 400077b4: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 400077b8: e8 07 bf e0 ld [ %fp + -32 ], %l4 400077bc: 82 05 3f ff add %l4, -1, %g1 400077c0: 80 a0 60 fd cmp %g1, 0xfd 400077c4: 18 bf ff eb bgu 40007770 400077c8: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400077cc: 02 80 00 54 be 4000791c 400077d0: a6 10 20 00 clr %l3 400077d4: 04 80 00 7c ble 400079c4 400077d8: 80 a6 60 02 cmp %i1, 2 400077dc: 02 80 00 4d be 40007910 400077e0: 80 a6 60 03 cmp %i1, 3 400077e4: 32 80 00 38 bne,a 400078c4 400077e8: 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 ) < 400077ec: 40 00 11 ab call 4000be98 <_Timespec_To_ticks> 400077f0: 90 07 bf e8 add %fp, -24, %o0 400077f4: a0 10 00 08 mov %o0, %l0 400077f8: 40 00 11 a8 call 4000be98 <_Timespec_To_ticks> 400077fc: 90 07 bf f0 add %fp, -16, %o0 40007800: 80 a4 00 08 cmp %l0, %o0 40007804: 0a 80 00 30 bcs 400078c4 40007808: 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 ) ) 4000780c: c2 07 bf e4 ld [ %fp + -28 ], %g1 40007810: 82 00 7f ff add %g1, -1, %g1 40007814: 80 a0 60 fd cmp %g1, 0xfd 40007818: 18 80 00 2b bgu 400078c4 4000781c: a6 10 20 03 mov 3, %l3 40007820: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007824: a0 10 61 84 or %g1, 0x184, %l0 ! 40007d84 <_POSIX_Threads_Sporadic_budget_callout> #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 40007828: 2d 10 00 7b sethi %hi(0x4001ec00), %l6 4000782c: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 ! 4001ee78 <_RTEMS_Allocator_Mutex> 40007830: 40 00 07 56 call 40009588 <_API_Mutex_Lock> 40007834: 31 10 00 7c sethi %hi(0x4001f000), %i0 * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 40007838: 40 00 09 e1 call 40009fbc <_Objects_Allocate> 4000783c: 90 16 20 50 or %i0, 0x50, %o0 ! 4001f050 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 40007840: a4 92 20 00 orcc %o0, 0, %l2 40007844: 02 80 00 1d be 400078b8 40007848: 03 10 00 77 sethi %hi(0x4001dc00), %g1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 4000784c: c6 04 60 08 ld [ %l1 + 8 ], %g3 40007850: c4 00 63 40 ld [ %g1 + 0x340 ], %g2 40007854: c0 27 bf dc clr [ %fp + -36 ] 40007858: 97 28 a0 01 sll %g2, 1, %o3 4000785c: 80 a2 c0 03 cmp %o3, %g3 40007860: 1a 80 00 03 bcc 4000786c 40007864: d4 04 60 04 ld [ %l1 + 4 ], %o2 40007868: 96 10 00 03 mov %g3, %o3 4000786c: 82 07 bf dc add %fp, -36, %g1 40007870: e6 23 a0 60 st %l3, [ %sp + 0x60 ] 40007874: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 40007878: c0 23 a0 68 clr [ %sp + 0x68 ] 4000787c: 9a 10 20 ff mov 0xff, %o5 40007880: a6 10 20 01 mov 1, %l3 40007884: 9a 23 40 14 sub %o5, %l4, %o5 40007888: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 4000788c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007890: 90 16 20 50 or %i0, 0x50, %o0 40007894: 92 10 00 12 mov %l2, %o1 40007898: 40 00 0d ba call 4000af80 <_Thread_Initialize> 4000789c: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 400078a0: 80 8a 20 ff btst 0xff, %o0 400078a4: 12 80 00 20 bne 40007924 400078a8: 11 10 00 7c sethi %hi(0x4001f000), %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 400078ac: 92 10 00 12 mov %l2, %o1 400078b0: 40 00 0a be call 4000a3a8 <_Objects_Free> 400078b4: 90 12 20 50 or %o0, 0x50, %o0 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400078b8: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 400078bc: 40 00 07 49 call 400095e0 <_API_Mutex_Unlock> 400078c0: b0 10 20 0b mov 0xb, %i0 400078c4: 81 c7 e0 08 ret 400078c8: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400078cc: 03 10 00 7b sethi %hi(0x4001ec00), %g1 400078d0: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 4001ee80 <_Thread_Executing> 400078d4: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 400078d8: 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; 400078dc: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 400078e0: c8 27 bf e0 st %g4, [ %fp + -32 ] 400078e4: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 400078e8: c2 27 bf e4 st %g1, [ %fp + -28 ] 400078ec: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 400078f0: c4 27 bf e8 st %g2, [ %fp + -24 ] 400078f4: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 400078f8: c2 27 bf ec st %g1, [ %fp + -20 ] 400078fc: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40007900: c4 27 bf f0 st %g2, [ %fp + -16 ] 40007904: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 40007908: 10 bf ff a8 b 400077a8 4000790c: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 40007910: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 40007914: 10 bf ff c5 b 40007828 <== NOT EXECUTED 40007918: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000791c: 10 bf ff c3 b 40007828 40007920: a0 10 20 00 clr %l0 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40007924: e0 04 a1 60 ld [ %l2 + 0x160 ], %l0 api->Attributes = *the_attr; 40007928: 92 10 00 11 mov %l1, %o1 4000792c: 94 10 20 38 mov 0x38, %o2 40007930: 40 00 25 d4 call 40011080 40007934: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 40007938: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 4000793c: 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; 40007940: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007944: 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; 40007948: 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; 4000794c: c2 24 20 80 st %g1, [ %l0 + 0x80 ] 40007950: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007954: 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; 40007958: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 4000795c: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007960: 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; 40007964: c2 24 20 88 st %g1, [ %l0 + 0x88 ] 40007968: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 4000796c: 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; 40007970: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40007974: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007978: 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; 4000797c: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 40007980: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007984: 98 10 20 00 clr %o4 40007988: 40 00 10 86 call 4000bba0 <_Thread_Start> 4000798c: c2 24 20 94 st %g1, [ %l0 + 0x94 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 40007990: 80 a6 60 03 cmp %i1, 3 40007994: 02 80 00 19 be 400079f8 40007998: 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 ) { 4000799c: 80 8c 60 ff btst 0xff, %l1 400079a0: 12 80 00 0f bne 400079dc 400079a4: 90 16 20 50 or %i0, 0x50, %o0 400079a8: 40 00 0a 80 call 4000a3a8 <_Objects_Free> <== NOT EXECUTED 400079ac: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400079b0: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 <== NOT EXECUTED 400079b4: 40 00 07 0b call 400095e0 <_API_Mutex_Unlock> <== NOT EXECUTED 400079b8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 400079bc: 81 c7 e0 08 ret <== NOT EXECUTED 400079c0: 81 e8 00 00 restore <== NOT EXECUTED */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400079c4: 80 a6 60 00 cmp %i1, 0 400079c8: a6 10 20 01 mov 1, %l3 400079cc: 02 bf ff 97 be 40007828 400079d0: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 400079d4: 81 c7 e0 08 ret 400079d8: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400079dc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 _RTEMS_Unlock_allocator(); 400079e0: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400079e4: c2 25 40 00 st %g1, [ %l5 ] _RTEMS_Unlock_allocator(); 400079e8: 40 00 06 fe call 400095e0 <_API_Mutex_Unlock> 400079ec: b0 10 20 00 clr %i0 400079f0: 81 c7 e0 08 ret 400079f4: 81 e8 00 00 restore arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 400079f8: 40 00 11 28 call 4000be98 <_Timespec_To_ticks> 400079fc: 90 04 20 88 add %l0, 0x88, %o0 40007a00: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007a04: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007a08: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007a0c: 40 00 12 38 call 4000c2ec <_Watchdog_Insert> 40007a10: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 4001eea0 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 40007a14: 10 bf ff e3 b 400079a0 40007a18: 80 8c 60 ff btst 0xff, %l1 40006650 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40006650: 9d e3 bf 98 save %sp, -104, %sp 40006654: 05 10 00 5c sethi %hi(0x40017000), %g2 40006658: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 400172e0 <_Thread_Dispatch_disable_level> 4000665c: 82 00 60 01 inc %g1 40006660: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 40006664: 29 10 00 5d sethi %hi(0x40017400), %l4 40006668: 40 00 09 d4 call 40008db8 <_Objects_Allocate> 4000666c: 90 15 23 34 or %l4, 0x334, %o0 ! 40017734 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 40006670: a4 92 20 00 orcc %o0, 0, %l2 40006674: 02 80 00 2b be 40006720 40006678: 03 10 00 5c sethi %hi(0x40017000), %g1 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 4000667c: f2 24 a0 14 st %i1, [ %l2 + 0x14 ] 40006680: a2 10 00 12 mov %l2, %l1 40006684: a6 10 62 40 or %g1, 0x240, %l3 40006688: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 4000668c: 83 2e 60 02 sll %i1, 2, %g1 40006690: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 40006694: 80 a0 60 00 cmp %g1, 0 40006698: 22 80 00 0e be,a 400066d0 4000669c: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 400066a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 400066a4: c2 10 a0 10 lduh [ %g2 + 0x10 ], %g1 400066a8: 82 00 60 01 inc %g1 400066ac: a1 28 60 02 sll %g1, 2, %l0 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 400066b0: 40 00 13 24 call 4000b340 <_Workspace_Allocate> 400066b4: 90 10 00 10 mov %l0, %o0 if ( !table ) { 400066b8: 82 92 20 00 orcc %o0, 0, %g1 400066bc: 02 80 00 1d be 40006730 400066c0: 94 10 00 10 mov %l0, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 400066c4: c2 24 60 1c st %g1, [ %l1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 400066c8: 40 00 26 c5 call 400101dc 400066cc: 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++ ) { 400066d0: 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; 400066d4: 80 a6 60 05 cmp %i1, 5 400066d8: 12 bf ff ed bne 4000668c 400066dc: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400066e0: c4 04 a0 08 ld [ %l2 + 8 ], %g2 400066e4: 82 15 23 34 or %l4, 0x334, %g1 400066e8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400066ec: 03 00 00 3f sethi %hi(0xfc00), %g1 400066f0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400066f4: 82 08 80 01 and %g2, %g1, %g1 400066f8: 83 28 60 02 sll %g1, 2, %g1 400066fc: 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; 40006700: c0 24 a0 0c clr [ %l2 + 0xc ] } } the_key->is_active = TRUE; 40006704: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40006708: c4 26 00 00 st %g2, [ %i0 ] } } the_key->is_active = TRUE; 4000670c: 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(); 40006710: 40 00 0d 4b call 40009c3c <_Thread_Enable_dispatch> 40006714: b0 10 20 00 clr %i0 return 0; } 40006718: 81 c7 e0 08 ret 4000671c: 81 e8 00 00 restore _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 40006720: 40 00 0d 47 call 40009c3c <_Thread_Enable_dispatch> 40006724: b0 10 20 0b mov 0xb, %i0 40006728: 81 c7 e0 08 ret 4000672c: 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; 40006730: a0 86 7f ff addcc %i1, -1, %l0 40006734: 02 80 00 0a be 4000675c 40006738: 82 06 60 05 add %i1, 5, %g1 4000673c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40006740: b2 04 80 01 add %l2, %g1, %i1 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 40006744: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 40006748: 40 00 12 f7 call 4000b324 <_Workspace_Free> <== NOT EXECUTED 4000674c: 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; 40006750: a0 84 3f ff addcc %l0, -1, %l0 <== NOT EXECUTED 40006754: 32 bf ff fd bne,a 40006748 <== NOT EXECUTED 40006758: 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 ); 4000675c: 90 15 23 34 or %l4, 0x334, %o0 40006760: 92 10 00 12 mov %l2, %o1 40006764: 40 00 0a 90 call 400091a4 <_Objects_Free> 40006768: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 4000676c: 40 00 0d 34 call 40009c3c <_Thread_Enable_dispatch> 40006770: 01 00 00 00 nop 40006774: 81 c7 e0 08 ret 40006778: 81 e8 00 00 restore 4000677c : */ int pthread_key_delete( pthread_key_t key ) { 4000677c: 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 *) 40006780: 23 10 00 5d sethi %hi(0x40017400), %l1 40006784: 92 10 00 18 mov %i0, %o1 40006788: 94 07 bf f4 add %fp, -12, %o2 4000678c: 40 00 0a f3 call 40009358 <_Objects_Get> 40006790: 90 14 63 34 or %l1, 0x334, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006794: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006798: a0 10 00 08 mov %o0, %l0 4000679c: 80 a0 60 00 cmp %g1, 0 400067a0: 12 80 00 23 bne 4000682c 400067a4: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 400067a8: 90 14 63 34 or %l1, 0x334, %o0 400067ac: 40 00 09 af call 40008e68 <_Objects_Close> 400067b0: 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 ] ) 400067b4: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 400067b8: 80 a2 20 00 cmp %o0, 0 400067bc: 02 80 00 04 be 400067cc 400067c0: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 400067c4: 40 00 12 d8 call 4000b324 <_Workspace_Free> 400067c8: 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 ] ) 400067cc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 400067d0: 80 a2 20 00 cmp %o0, 0 400067d4: 22 80 00 05 be,a 400067e8 400067d8: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400067dc: 40 00 12 d2 call 4000b324 <_Workspace_Free> 400067e0: 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 ] ) 400067e4: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 400067e8: 80 a2 20 00 cmp %o0, 0 400067ec: 22 80 00 05 be,a 40006800 400067f0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400067f4: 40 00 12 cc call 4000b324 <_Workspace_Free> 400067f8: 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 ] ) 400067fc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40006800: 80 a2 20 00 cmp %o0, 0 40006804: 22 80 00 05 be,a 40006818 40006808: 90 14 63 34 or %l1, 0x334, %o0 _Workspace_Free( the_key->Values[ the_api ] ); 4000680c: 40 00 12 c6 call 4000b324 <_Workspace_Free> <== NOT EXECUTED 40006810: 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 ); 40006814: 90 14 63 34 or %l1, 0x334, %o0 <== NOT EXECUTED 40006818: 92 10 00 10 mov %l0, %o1 4000681c: 40 00 0a 62 call 400091a4 <_Objects_Free> 40006820: 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(); 40006824: 40 00 0d 06 call 40009c3c <_Thread_Enable_dispatch> 40006828: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 4000682c: 81 c7 e0 08 ret 40006830: 81 e8 00 00 restore 40025604 : int pthread_kill( pthread_t thread, int sig ) { 40025604: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 40025608: 80 a6 60 00 cmp %i1, 0 4002560c: 02 80 00 2f be 400256c8 40025610: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40025614: a0 06 7f ff add %i1, -1, %l0 40025618: 80 a4 20 1f cmp %l0, 0x1f 4002561c: 18 80 00 2b bgu 400256c8 40025620: 11 10 00 af sethi %hi(0x4002bc00), %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40025624: 94 07 bf f4 add %fp, -12, %o2 40025628: 7f ff a4 b9 call 4000e90c <_Objects_Get> 4002562c: 90 12 21 d0 or %o0, 0x1d0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40025630: c2 07 bf f4 ld [ %fp + -12 ], %g1 40025634: 80 a0 60 00 cmp %g1, 0 40025638: 12 80 00 2a bne 400256e0 4002563c: 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 ) { 40025640: 87 2e 60 02 sll %i1, 2, %g3 40025644: 85 2e 60 04 sll %i1, 4, %g2 40025648: 03 10 00 b0 sethi %hi(0x4002c000), %g1 4002564c: 84 20 80 03 sub %g2, %g3, %g2 40025650: 82 10 61 3c or %g1, 0x13c, %g1 40025654: 82 00 40 02 add %g1, %g2, %g1 40025658: c6 00 60 08 ld [ %g1 + 8 ], %g3 4002565c: 80 a0 e0 01 cmp %g3, 1 40025660: 02 80 00 14 be 400256b0 40025664: c8 02 21 60 ld [ %o0 + 0x160 ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40025668: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002566c: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40025670: b2 10 20 01 mov 1, %i1 40025674: 83 2e 40 10 sll %i1, %l0, %g1 40025678: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002567c: 94 10 20 00 clr %o2 40025680: 7f ff ff 90 call 400254c0 <_POSIX_signals_Unblock_thread> 40025684: 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 ) ) 40025688: 03 10 00 ae sethi %hi(0x4002b800), %g1 4002568c: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4002bb9c <_ISR_Nest_level> 40025690: 80 a0 a0 00 cmp %g2, 0 40025694: 02 80 00 07 be 400256b0 40025698: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 4002569c: 03 10 00 ae sethi %hi(0x4002b800), %g1 400256a0: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4002bbc0 <_Thread_Executing> 400256a4: 80 a6 00 02 cmp %i0, %g2 400256a8: 02 80 00 06 be 400256c0 400256ac: 03 10 00 af sethi %hi(0x4002bc00), %g1 _ISR_Signals_to_thread_executing = TRUE; } _Thread_Enable_dispatch(); 400256b0: 7f ff a7 16 call 4000f308 <_Thread_Enable_dispatch> 400256b4: b0 10 20 00 clr %i0 400256b8: 81 c7 e0 08 ret 400256bc: 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; 400256c0: 10 bf ff fc b 400256b0 <== NOT EXECUTED 400256c4: f2 28 60 58 stb %i1, [ %g1 + 0x58 ] <== 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 ); 400256c8: 7f ff cf ad call 4001957c <__errno> 400256cc: b0 10 3f ff mov -1, %i0 400256d0: 82 10 20 16 mov 0x16, %g1 400256d4: c2 22 00 00 st %g1, [ %o0 ] 400256d8: 81 c7 e0 08 ret 400256dc: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 400256e0: 7f ff cf a7 call 4001957c <__errno> 400256e4: b0 10 3f ff mov -1, %i0 400256e8: 82 10 20 03 mov 3, %g1 400256ec: c2 22 00 00 st %g1, [ %o0 ] } 400256f0: 81 c7 e0 08 ret 400256f4: 81 e8 00 00 restore 400084c4 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 400084c4: 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; 400084c8: 03 10 00 61 sethi %hi(0x40018400), %g1 400084cc: 80 a6 60 00 cmp %i1, 0 400084d0: 02 80 00 03 be 400084dc 400084d4: a0 10 63 4c or %g1, 0x34c, %l0 400084d8: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 400084dc: 80 a6 20 00 cmp %i0, 0 400084e0: 02 80 00 17 be 4000853c 400084e4: 01 00 00 00 nop break; } } #endif if ( !the_attr->is_initialized ) 400084e8: c2 04 00 00 ld [ %l0 ], %g1 400084ec: 80 a0 60 00 cmp %g1, 0 400084f0: 02 80 00 13 be 4000853c 400084f4: 01 00 00 00 nop /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 400084f8: c2 04 20 04 ld [ %l0 + 4 ], %g1 400084fc: 80 a0 60 00 cmp %g1, 0 40008500: 12 80 00 4d bne 40008634 40008504: 11 10 00 61 sethi %hi(0x40018400), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40008508: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000850c: 80 a0 60 01 cmp %g1, 1 40008510: 02 80 00 37 be 400085ec 40008514: 80 a0 60 02 cmp %g1, 2 40008518: 02 80 00 3c be 40008608 4000851c: 80 a0 60 00 cmp %g1, 0 40008520: 12 80 00 07 bne 4000853c 40008524: a2 10 20 00 clr %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 40008528: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000852c: 82 00 7f ff add %g1, -1, %g1 40008530: 80 a0 60 fd cmp %g1, 0xfd 40008534: 08 80 00 04 bleu 40008544 40008538: 05 10 00 68 sethi %hi(0x4001a000), %g2 *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 4000853c: 81 c7 e0 08 ret 40008540: 91 e8 20 16 restore %g0, 0x16, %o0 40008544: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 40008548: 82 00 60 01 inc %g1 4000854c: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 40008550: 25 10 00 69 sethi %hi(0x4001a400), %l2 40008554: 40 00 0a 8e call 4000af8c <_Objects_Allocate> 40008558: 90 14 a3 b0 or %l2, 0x3b0, %o0 ! 4001a7b0 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 4000855c: b2 92 20 00 orcc %o0, 0, %i1 40008560: 02 80 00 31 be 40008624 40008564: 01 00 00 00 nop _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 40008568: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000856c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 40008570: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008574: 80 a0 a0 00 cmp %g2, 0 40008578: 32 80 00 04 bne,a 40008588 4000857c: 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; 40008580: 82 10 20 01 mov 1, %g1 40008584: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 40008588: 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; 4000858c: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 40008590: 82 10 20 ff mov 0xff, %g1 40008594: 82 20 40 03 sub %g1, %g3, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 40008598: 92 06 60 54 add %i1, 0x54, %o1 4000859c: 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; 400085a0: c4 2e 60 58 stb %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 400085a4: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 400085a8: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 400085ac: 40 00 08 36 call 4000a684 <_CORE_mutex_Initialize> 400085b0: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400085b4: c4 06 60 08 ld [ %i1 + 8 ], %g2 400085b8: 82 14 a3 b0 or %l2, 0x3b0, %g1 400085bc: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400085c0: 03 00 00 3f sethi %hi(0xfc00), %g1 400085c4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400085c8: 82 08 80 01 and %g2, %g1, %g1 400085cc: 83 28 60 02 sll %g1, 2, %g1 400085d0: 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; 400085d4: 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; 400085d8: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 400085dc: 40 00 0e 0d call 4000be10 <_Thread_Enable_dispatch> 400085e0: b0 10 20 00 clr %i0 400085e4: 81 c7 e0 08 ret 400085e8: 81 e8 00 00 restore break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 400085ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 400085f0: 82 00 7f ff add %g1, -1, %g1 400085f4: 80 a0 60 fd cmp %g1, 0xfd 400085f8: 18 bf ff d1 bgu 4000853c 400085fc: a2 10 20 02 mov 2, %l1 40008600: 10 bf ff d1 b 40008544 40008604: 05 10 00 68 sethi %hi(0x4001a000), %g2 40008608: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000860c: 82 00 7f ff add %g1, -1, %g1 40008610: 80 a0 60 fd cmp %g1, 0xfd 40008614: 18 bf ff ca bgu 4000853c 40008618: a2 10 20 03 mov 3, %l1 4000861c: 10 bf ff ca b 40008544 40008620: 05 10 00 68 sethi %hi(0x4001a000), %g2 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 40008624: 40 00 0d fb call 4000be10 <_Thread_Enable_dispatch> 40008628: b0 10 20 0b mov 0xb, %i0 4000862c: 81 c7 e0 08 ret 40008630: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40008634: 15 10 00 61 sethi %hi(0x40018400), %o2 <== NOT EXECUTED 40008638: 17 10 00 61 sethi %hi(0x40018400), %o3 <== NOT EXECUTED 4000863c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40008640: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 40008644: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40008648: 7f ff f2 a4 call 400050d8 <__assert_func> <== NOT EXECUTED 4000864c: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED 40008650: 01 00 00 00 nop 400086c4 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 400086c4: 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 ) 400086c8: 80 a6 a0 00 cmp %i2, 0 400086cc: 02 80 00 06 be 400086e4 400086d0: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 400086d4: 82 06 7f ff add %i1, -1, %g1 400086d8: 80 a0 60 fd cmp %g1, 0xfd 400086dc: 08 80 00 04 bleu 400086ec 400086e0: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 400086e4: 81 c7 e0 08 ret 400086e8: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 400086ec: 7f ff ff da call 40008654 400086f0: 90 10 00 18 mov %i0, %o0 if ( status ) 400086f4: b0 92 20 00 orcc %o0, 0, %i0 400086f8: 12 80 00 14 bne 40008748 400086fc: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 40008700: 7f ff ff 46 call 40008418 <_POSIX_Mutex_Get> 40008704: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40008708: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000870c: 80 a0 60 00 cmp %g1, 0 40008710: 32 80 00 0e bne,a 40008748 40008714: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008718: 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( 4000871c: 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( 40008720: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40008724: 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( 40008728: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 4000872c: 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( 40008730: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40008734: 94 10 20 00 clr %o2 40008738: 40 00 08 5e call 4000a8b0 <_CORE_mutex_Surrender> 4000873c: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 40008740: 40 00 0d b4 call 4000be10 <_Thread_Enable_dispatch> 40008744: 01 00 00 00 nop 40008748: 81 c7 e0 08 ret 4000874c: 81 e8 00 00 restore 40008750 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 40008750: 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 ); 40008754: 90 10 00 19 mov %i1, %o0 40008758: 40 00 00 2f call 40008814 <_POSIX_Absolute_timeout_to_ticks> 4000875c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40008760: 80 a2 20 02 cmp %o0, 2 40008764: 08 80 00 05 bleu 40008778 40008768: d4 07 bf f4 ld [ %fp + -12 ], %o2 4000876c: 80 a2 20 03 cmp %o0, 3 40008770: 02 80 00 07 be 4000878c 40008774: 90 10 00 18 mov %i0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40008778: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000877c: 7f ff ff bc call 4000866c <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 40008780: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40008784: 81 c7 e0 08 ret <== NOT EXECUTED 40008788: 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( 4000878c: 7f ff ff b8 call 4000866c <_POSIX_Mutex_Lock_support> 40008790: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40008794: 81 c7 e0 08 ret 40008798: 91 e8 00 08 restore %g0, %o0, %o0 40007e58 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 40007e58: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 40007e5c: a0 96 20 00 orcc %i0, 0, %l0 40007e60: 02 80 00 0a be 40007e88 40007e64: 80 a6 60 00 cmp %i1, 0 40007e68: 02 80 00 08 be 40007e88 40007e6c: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 40007e70: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007e74: 80 a0 60 00 cmp %g1, 0 40007e78: 02 80 00 06 be 40007e90 40007e7c: b0 10 20 00 clr %i0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 40007e80: 81 c7 e0 08 ret 40007e84: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 40007e88: 81 c7 e0 08 ret 40007e8c: 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); 40007e90: b0 07 bf f4 add %fp, -12, %i0 40007e94: 90 10 21 00 mov 0x100, %o0 40007e98: 92 10 21 00 mov 0x100, %o1 40007e9c: 40 00 03 ba call 40008d84 40007ea0: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 40007ea4: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007ea8: 80 a0 60 00 cmp %g1, 0 40007eac: 02 80 00 09 be 40007ed0 40007eb0: 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); 40007eb4: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40007eb8: 94 10 00 18 mov %i0, %o2 40007ebc: 92 10 21 00 mov 0x100, %o1 40007ec0: 40 00 03 b1 call 40008d84 40007ec4: b0 10 20 00 clr %i0 } return 0; } 40007ec8: 81 c7 e0 08 ret 40007ecc: 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; 40007ed0: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 40007ed4: 9f c6 40 00 call %i1 40007ed8: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 40007edc: 10 bf ff f7 b 40007eb8 40007ee0: d0 07 bf f4 ld [ %fp + -12 ], %o0 40007160 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 40007160: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 40007164: 80 a6 20 00 cmp %i0, 0 40007168: 02 80 00 26 be 40007200 4000716c: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40007170: 80 a6 60 00 cmp %i1, 0 40007174: 22 80 00 29 be,a 40007218 40007178: 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 ) 4000717c: c2 04 00 00 ld [ %l0 ], %g1 40007180: 80 a0 60 00 cmp %g1, 0 40007184: 02 80 00 1f be 40007200 40007188: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 4000718c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007190: 80 a0 60 00 cmp %g1, 0 40007194: 12 80 00 1b bne 40007200 40007198: 05 10 00 75 sethi %hi(0x4001d400), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000719c: c2 00 a1 20 ld [ %g2 + 0x120 ], %g1 ! 4001d520 <_Thread_Dispatch_disable_level> 400071a0: 82 00 60 01 inc %g1 400071a4: c2 20 a1 20 st %g1, [ %g2 + 0x120 ] * 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 *) 400071a8: 33 10 00 75 sethi %hi(0x4001d400), %i1 400071ac: 40 00 0b 03 call 40009db8 <_Objects_Allocate> 400071b0: 90 16 63 70 or %i1, 0x370, %o0 ! 4001d770 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 400071b4: a0 92 20 00 orcc %o0, 0, %l0 400071b8: 02 80 00 14 be 40007208 400071bc: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 400071c0: 40 00 09 03 call 400095cc <_CORE_RWLock_Initialize> 400071c4: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400071c8: c4 04 20 08 ld [ %l0 + 8 ], %g2 400071cc: 82 16 63 70 or %i1, 0x370, %g1 400071d0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400071d4: 03 00 00 3f sethi %hi(0xfc00), %g1 400071d8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400071dc: 82 08 80 01 and %g2, %g1, %g1 400071e0: 83 28 60 02 sll %g1, 2, %g1 400071e4: 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; 400071e8: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 400071ec: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 400071f0: 40 00 0e 93 call 4000ac3c <_Thread_Enable_dispatch> 400071f4: b0 10 20 00 clr %i0 400071f8: 81 c7 e0 08 ret 400071fc: 81 e8 00 00 restore return 0; } 40007200: 81 c7 e0 08 ret 40007204: 91 e8 20 16 restore %g0, 0x16, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 40007208: 40 00 0e 8d call 4000ac3c <_Thread_Enable_dispatch> 4000720c: b0 10 20 0b mov 0xb, %i0 40007210: 81 c7 e0 08 ret 40007214: 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 ); 40007218: 40 00 02 b5 call 40007cec <== NOT EXECUTED 4000721c: 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 ) 40007220: 10 bf ff d8 b 40007180 <== NOT EXECUTED 40007224: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40007298 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40007298: 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 ) 4000729c: 80 a6 20 00 cmp %i0, 0 400072a0: 02 80 00 11 be 400072e4 400072a4: 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 ); 400072a8: 92 07 bf f0 add %fp, -16, %o1 400072ac: 40 00 1d 6f call 4000e868 <_POSIX_Absolute_timeout_to_ticks> 400072b0: a0 10 20 00 clr %l0 switch (status) { 400072b4: 80 a2 20 02 cmp %o0, 2 400072b8: 18 80 00 0e bgu 400072f0 400072bc: b2 10 00 08 mov %o0, %i1 400072c0: d2 06 00 00 ld [ %i0 ], %o1 400072c4: 11 10 00 75 sethi %hi(0x4001d400), %o0 400072c8: 94 07 bf f4 add %fp, -12, %o2 400072cc: 40 00 0c 23 call 4000a358 <_Objects_Get> 400072d0: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400072d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400072d8: 80 a0 60 00 cmp %g1, 0 400072dc: 22 80 00 11 be,a 40007320 400072e0: 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( 400072e4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 400072e8: 81 c7 e0 08 ret 400072ec: 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) { 400072f0: 80 a2 20 03 cmp %o0, 3 400072f4: 12 bf ff f4 bne 400072c4 400072f8: d2 06 00 00 ld [ %i0 ], %o1 400072fc: 11 10 00 75 sethi %hi(0x4001d400), %o0 40007300: 94 07 bf f4 add %fp, -12, %o2 40007304: 40 00 0c 15 call 4000a358 <_Objects_Get> 40007308: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000730c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007310: 80 a0 60 00 cmp %g1, 0 40007314: 12 bf ff f4 bne 400072e4 40007318: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 4000731c: d2 06 00 00 ld [ %i0 ], %o1 40007320: d6 07 bf f0 ld [ %fp + -16 ], %o3 40007324: a0 0c 20 ff and %l0, 0xff, %l0 40007328: 90 02 20 10 add %o0, 0x10, %o0 4000732c: 94 10 00 10 mov %l0, %o2 40007330: 40 00 08 b2 call 400095f8 <_CORE_RWLock_Obtain_for_reading> 40007334: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40007338: 40 00 0e 41 call 4000ac3c <_Thread_Enable_dispatch> 4000733c: 01 00 00 00 nop 40007340: 03 10 00 75 sethi %hi(0x4001d400), %g1 if ( !do_wait && 40007344: 80 a4 20 00 cmp %l0, 0 40007348: 12 80 00 0f bne 40007384 4000734c: 86 10 61 e0 or %g1, 0x1e0, %g3 40007350: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40007354: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001d5e0 <_Thread_Executing> <== NOT EXECUTED 40007358: 86 10 61 e0 or %g1, 0x1e0, %g3 <== NOT EXECUTED 4000735c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40007360: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007364: 32 80 00 09 bne,a 40007388 <== NOT EXECUTED 40007368: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000736c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40007370: 02 bf ff de be 400072e8 <== NOT EXECUTED 40007374: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007378: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 4000737c: 08 bf ff db bleu 400072e8 <== NOT EXECUTED 40007380: 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( 40007384: c2 00 c0 00 ld [ %g3 ], %g1 40007388: 40 00 00 44 call 40007498 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000738c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40007390: 81 c7 e0 08 ret 40007394: 91 e8 00 08 restore %g0, %o0, %o0 40007398 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40007398: 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 ) 4000739c: 80 a6 20 00 cmp %i0, 0 400073a0: 02 80 00 11 be 400073e4 400073a4: 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 ); 400073a8: 92 07 bf f0 add %fp, -16, %o1 400073ac: 40 00 1d 2f call 4000e868 <_POSIX_Absolute_timeout_to_ticks> 400073b0: a0 10 20 00 clr %l0 switch (status) { 400073b4: 80 a2 20 02 cmp %o0, 2 400073b8: 18 80 00 0e bgu 400073f0 400073bc: b2 10 00 08 mov %o0, %i1 400073c0: d2 06 00 00 ld [ %i0 ], %o1 400073c4: 11 10 00 75 sethi %hi(0x4001d400), %o0 400073c8: 94 07 bf f4 add %fp, -12, %o2 400073cc: 40 00 0b e3 call 4000a358 <_Objects_Get> 400073d0: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400073d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400073d8: 80 a0 60 00 cmp %g1, 0 400073dc: 22 80 00 11 be,a 40007420 400073e0: 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( 400073e4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 400073e8: 81 c7 e0 08 ret 400073ec: 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) { 400073f0: 80 a2 20 03 cmp %o0, 3 400073f4: 12 bf ff f4 bne 400073c4 400073f8: d2 06 00 00 ld [ %i0 ], %o1 400073fc: 11 10 00 75 sethi %hi(0x4001d400), %o0 40007400: 94 07 bf f4 add %fp, -12, %o2 40007404: 40 00 0b d5 call 4000a358 <_Objects_Get> 40007408: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000740c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007410: 80 a0 60 00 cmp %g1, 0 40007414: 12 bf ff f4 bne 400073e4 40007418: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4000741c: d2 06 00 00 ld [ %i0 ], %o1 40007420: d6 07 bf f0 ld [ %fp + -16 ], %o3 40007424: a0 0c 20 ff and %l0, 0xff, %l0 40007428: 90 02 20 10 add %o0, 0x10, %o0 4000742c: 94 10 00 10 mov %l0, %o2 40007430: 40 00 08 a7 call 400096cc <_CORE_RWLock_Obtain_for_writing> 40007434: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40007438: 40 00 0e 01 call 4000ac3c <_Thread_Enable_dispatch> 4000743c: 01 00 00 00 nop 40007440: 03 10 00 75 sethi %hi(0x4001d400), %g1 if ( !do_wait && 40007444: 80 a4 20 00 cmp %l0, 0 40007448: 12 80 00 0f bne 40007484 4000744c: 86 10 61 e0 or %g1, 0x1e0, %g3 40007450: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40007454: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001d5e0 <_Thread_Executing> <== NOT EXECUTED 40007458: 86 10 61 e0 or %g1, 0x1e0, %g3 <== NOT EXECUTED 4000745c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40007460: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007464: 32 80 00 09 bne,a 40007488 <== NOT EXECUTED 40007468: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000746c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40007470: 02 bf ff de be 400073e8 <== NOT EXECUTED 40007474: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007478: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 4000747c: 08 bf ff db bleu 400073e8 <== NOT EXECUTED 40007480: 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( 40007484: c2 00 c0 00 ld [ %g3 ], %g1 40007488: 40 00 00 04 call 40007498 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000748c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40007490: 81 c7 e0 08 ret 40007494: 91 e8 00 08 restore %g0, %o0, %o0 400068b8 : int pthread_setcancelstate( int state, int *oldstate ) { 400068b8: 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() ) 400068bc: 03 10 00 5c sethi %hi(0x40017000), %g1 400068c0: c4 00 63 bc ld [ %g1 + 0x3bc ], %g2 ! 400173bc <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 400068c4: 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() ) 400068c8: 80 a0 a0 00 cmp %g2, 0 400068cc: 12 80 00 1a bne 40006934 400068d0: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 400068d4: 80 a6 60 00 cmp %i1, 0 400068d8: 02 80 00 04 be 400068e8 400068dc: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 400068e0: 08 80 00 04 bleu 400068f0 400068e4: 07 10 00 5c sethi %hi(0x40017000), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 400068e8: 81 c7 e0 08 ret <== NOT EXECUTED 400068ec: 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 ]; 400068f0: 31 10 00 5c sethi %hi(0x40017000), %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400068f4: c2 00 e3 20 ld [ %g3 + 0x320 ], %g1 400068f8: c4 06 23 e0 ld [ %i0 + 0x3e0 ], %g2 400068fc: 82 00 60 01 inc %g1 40006900: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40006904: c2 20 e3 20 st %g1, [ %g3 + 0x320 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006908: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000690c: 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; 40006910: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006914: 12 80 00 06 bne 4000692c 40006918: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 4000691c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40006920: 80 a0 60 01 cmp %g1, 1 40006924: 22 80 00 06 be,a 4000693c 40006928: 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(); 4000692c: 40 00 0b 4f call 40009668 <_Thread_Enable_dispatch> 40006930: b0 10 20 00 clr %i0 40006934: 81 c7 e0 08 ret 40006938: 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 && 4000693c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006940: 02 bf ff fb be 4000692c <== NOT EXECUTED 40006944: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40006948: 40 00 0b 48 call 40009668 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000694c: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006950: d0 06 23 e0 ld [ %i0 + 0x3e0 ], %o0 <== NOT EXECUTED 40006954: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40006958: 7f ff fe ca call 40006480 <_POSIX_Thread_Exit> <== NOT EXECUTED 4000695c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006960: 81 c7 e0 08 ret <== NOT EXECUTED 40006964: 81 e8 00 00 restore <== NOT EXECUTED 40006968 : int pthread_setcanceltype( int type, int *oldtype ) { 40006968: 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() ) 4000696c: 03 10 00 5c sethi %hi(0x40017000), %g1 40006970: c4 00 63 bc ld [ %g1 + 0x3bc ], %g2 ! 400173bc <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 40006974: 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() ) 40006978: 80 a0 a0 00 cmp %g2, 0 4000697c: 12 80 00 1a bne 400069e4 40006980: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 40006984: 80 a6 60 00 cmp %i1, 0 40006988: 02 80 00 04 be 40006998 4000698c: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 40006990: 08 80 00 04 bleu 400069a0 40006994: 07 10 00 5c sethi %hi(0x40017000), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 40006998: 81 c7 e0 08 ret <== NOT EXECUTED 4000699c: 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 ]; 400069a0: 31 10 00 5c sethi %hi(0x40017000), %i0 400069a4: c2 00 e3 20 ld [ %g3 + 0x320 ], %g1 400069a8: c4 06 23 e0 ld [ %i0 + 0x3e0 ], %g2 400069ac: 82 00 60 01 inc %g1 400069b0: c2 20 e3 20 st %g1, [ %g3 + 0x320 ] 400069b4: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 400069b8: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 400069bc: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400069c0: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 400069c4: 80 a0 a0 00 cmp %g2, 0 400069c8: 12 80 00 05 bne 400069dc 400069cc: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 400069d0: 80 a1 20 01 cmp %g4, 1 400069d4: 22 80 00 06 be,a 400069ec 400069d8: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400069dc: 40 00 0b 23 call 40009668 <_Thread_Enable_dispatch> 400069e0: b0 10 20 00 clr %i0 400069e4: 81 c7 e0 08 ret 400069e8: 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 && 400069ec: 80 a0 60 00 cmp %g1, 0 400069f0: 02 bf ff fb be 400069dc 400069f4: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400069f8: 40 00 0b 1c call 40009668 <_Thread_Enable_dispatch> <== NOT EXECUTED 400069fc: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006a00: d0 06 23 e0 ld [ %i0 + 0x3e0 ], %o0 <== NOT EXECUTED 40006a04: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40006a08: 7f ff fe 9e call 40006480 <_POSIX_Thread_Exit> <== NOT EXECUTED 40006a0c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006a10: 81 c7 e0 08 ret <== NOT EXECUTED 40006a14: 81 e8 00 00 restore <== NOT EXECUTED 4000908c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 4000908c: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 40009090: 80 a6 a0 00 cmp %i2, 0 40009094: 22 80 00 41 be,a 40009198 40009098: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4000909c: c2 06 80 00 ld [ %i2 ], %g1 400090a0: 82 00 7f ff add %g1, -1, %g1 400090a4: 80 a0 60 fd cmp %g1, 0xfd 400090a8: 18 80 00 0a bgu 400090d0 400090ac: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400090b0: 02 80 00 0a be 400090d8 400090b4: a4 10 20 00 clr %l2 400090b8: 04 80 00 4d ble 400091ec 400090bc: 80 a6 60 02 cmp %i1, 2 400090c0: 02 80 00 48 be 400091e0 400090c4: 80 a6 60 03 cmp %i1, 3 400090c8: 02 80 00 36 be 400091a0 400090cc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return ESRCH; } 400090d0: 81 c7 e0 08 ret 400090d4: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400090d8: a6 10 20 00 clr %l3 400090dc: 92 10 00 18 mov %i0, %o1 400090e0: 11 10 00 69 sethi %hi(0x4001a400), %o0 400090e4: 94 07 bf f4 add %fp, -12, %o2 400090e8: 40 00 09 11 call 4000b52c <_Objects_Get> 400090ec: 90 12 22 70 or %o0, 0x270, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400090f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400090f4: a2 10 00 08 mov %o0, %l1 400090f8: 80 a0 60 00 cmp %g1, 0 400090fc: 12 80 00 27 bne 40009198 40009100: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40009104: e0 02 21 60 ld [ %o0 + 0x160 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40009108: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 4000910c: 80 a0 60 03 cmp %g1, 3 40009110: 02 80 00 46 be 40009228 40009114: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 40009118: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 4000911c: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 40009120: 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; 40009124: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 40009128: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 4000912c: 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; 40009130: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 40009134: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009138: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 4000913c: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 40009140: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 40009144: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40009148: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 4000914c: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 40009150: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009154: 06 80 00 0f bl 40009190 40009158: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 4000915c: 80 a6 60 02 cmp %i1, 2 40009160: 14 80 00 29 bg 40009204 40009164: 80 a6 60 03 cmp %i1, 3 40009168: 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; 4000916c: 03 10 00 68 sethi %hi(0x4001a000), %g1 40009170: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 4001a338 <_Thread_Ticks_per_timeslice> 40009174: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009178: 90 10 00 11 mov %l1, %o0 4000917c: 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; 40009180: c4 24 60 78 st %g2, [ %l1 + 0x78 ] the_thread->real_priority = 40009184: d2 24 60 18 st %o1, [ %l1 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009188: 40 00 09 a8 call 4000b828 <_Thread_Change_priority> 4000918c: 94 10 20 01 mov 1, %o2 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 40009190: 40 00 0b 20 call 4000be10 <_Thread_Enable_dispatch> 40009194: b0 10 20 00 clr %i0 40009198: 81 c7 e0 08 ret 4000919c: 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 ) < 400091a0: 40 00 0f 19 call 4000ce04 <_Timespec_To_ticks> 400091a4: 90 06 a0 08 add %i2, 8, %o0 400091a8: a0 10 00 08 mov %o0, %l0 400091ac: 40 00 0f 16 call 4000ce04 <_Timespec_To_ticks> 400091b0: 90 06 a0 10 add %i2, 0x10, %o0 400091b4: 80 a4 00 08 cmp %l0, %o0 400091b8: 2a bf ff f8 bcs,a 40009198 400091bc: 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 ) ) 400091c0: c2 06 a0 04 ld [ %i2 + 4 ], %g1 400091c4: 82 00 7f ff add %g1, -1, %g1 400091c8: 80 a0 60 fd cmp %g1, 0xfd 400091cc: 18 bf ff c1 bgu 400090d0 400091d0: 03 10 00 23 sethi %hi(0x40008c00), %g1 400091d4: a4 10 20 03 mov 3, %l2 400091d8: 10 bf ff c1 b 400090dc 400091dc: a6 10 63 a8 or %g1, 0x3a8, %l3 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400091e0: a4 10 20 02 mov 2, %l2 400091e4: 10 bf ff be b 400090dc 400091e8: a6 10 20 00 clr %l3 400091ec: 80 a6 60 00 cmp %i1, 0 400091f0: a4 10 20 01 mov 1, %l2 400091f4: 02 bf ff ba be 400090dc 400091f8: a6 10 20 00 clr %l3 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 400091fc: 81 c7 e0 08 ret 40009200: 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 ) { 40009204: 12 bf ff e3 bne 40009190 40009208: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 4000920c: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 40009210: 40 00 10 7d call 4000d404 <_Watchdog_Remove> 40009214: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40009218: 92 10 00 11 mov %l1, %o1 4000921c: 7f ff ff 77 call 40008ff8 <_POSIX_Threads_Sporadic_budget_TSR> 40009220: 90 10 20 00 clr %o0 40009224: 30 bf ff db b,a 40009190 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 40009228: 40 00 10 77 call 4000d404 <_Watchdog_Remove> 4000922c: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40009230: 10 bf ff bb b 4000911c 40009234: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 40006a3c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40006a3c: 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() ) 40006a40: 03 10 00 5c sethi %hi(0x40017000), %g1 40006a44: c4 00 63 bc ld [ %g1 + 0x3bc ], %g2 ! 400173bc <_ISR_Nest_level> 40006a48: 80 a0 a0 00 cmp %g2, 0 40006a4c: 12 80 00 15 bne 40006aa0 40006a50: 07 10 00 5c sethi %hi(0x40017000), %g3 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006a54: 33 10 00 5c sethi %hi(0x40017000), %i1 40006a58: c2 00 e3 20 ld [ %g3 + 0x320 ], %g1 40006a5c: c4 06 63 e0 ld [ %i1 + 0x3e0 ], %g2 40006a60: 82 00 60 01 inc %g1 40006a64: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40006a68: c2 20 e3 20 st %g1, [ %g3 + 0x320 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006a6c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40006a70: 80 a0 60 00 cmp %g1, 0 40006a74: 12 80 00 0d bne 40006aa8 40006a78: 01 00 00 00 nop 40006a7c: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40006a80: 80 a0 60 00 cmp %g1, 0 40006a84: 02 80 00 09 be 40006aa8 40006a88: 01 00 00 00 nop thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40006a8c: 40 00 0a f7 call 40009668 <_Thread_Enable_dispatch> 40006a90: 01 00 00 00 nop if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006a94: f0 06 63 e0 ld [ %i1 + 0x3e0 ], %i0 40006a98: 7f ff fe 7a call 40006480 <_POSIX_Thread_Exit> 40006a9c: 93 e8 3f ff restore %g0, -1, %o1 40006aa0: 81 c7 e0 08 ret <== NOT EXECUTED 40006aa4: 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(); 40006aa8: 40 00 0a f0 call 40009668 <_Thread_Enable_dispatch> 40006aac: 81 e8 00 00 restore 40006ab0: 01 00 00 00 nop <== NOT EXECUTED 4000807c : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 4000807c: 9a 92 60 00 orcc %o1, 0, %o5 40008080: 02 80 00 4d be 400081b4 40008084: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40008088: 02 80 00 4c be 400081b8 4000808c: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40008090: c2 03 40 00 ld [ %o5 ], %g1 40008094: 80 a0 60 00 cmp %g1, 0 40008098: 22 80 00 44 be,a 400081a8 4000809c: 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 ) 400080a0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 400080a4: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 400080a8: c8 00 62 70 ld [ %g1 + 0x270 ], %g4 400080ac: 80 a1 00 08 cmp %g4, %o0 400080b0: 08 80 00 39 bleu 40008194 400080b4: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 400080b8: 80 a2 20 00 cmp %o0, 0 400080bc: 12 80 00 29 bne 40008160 400080c0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 400080c4: 90 81 3f ff addcc %g4, -1, %o0 400080c8: 02 80 00 35 be 4000819c 400080cc: 05 10 00 7b sethi %hi(0x4001ec00), %g2 400080d0: c6 00 a2 74 ld [ %g2 + 0x274 ], %g3 ! 4001ee74 <_IO_Driver_address_table> 400080d4: 85 29 20 03 sll %g4, 3, %g2 400080d8: 83 29 20 05 sll %g4, 5, %g1 400080dc: 82 20 40 02 sub %g1, %g2, %g1 400080e0: 82 00 7f e8 add %g1, -24, %g1 400080e4: 10 80 00 05 b 400080f8 400080e8: 84 00 c0 01 add %g3, %g1, %g2 400080ec: 90 82 3f ff addcc %o0, -1, %o0 400080f0: 02 80 00 2b be 4000819c 400080f4: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 400080f8: c2 00 80 00 ld [ %g2 ], %g1 400080fc: 80 a0 60 00 cmp %g1, 0 40008100: 12 bf ff fb bne 400080ec 40008104: 88 10 00 02 mov %g2, %g4 40008108: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000810c: 80 a0 60 00 cmp %g1, 0 40008110: 32 bf ff f8 bne,a 400080f0 40008114: 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; 40008118: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 4000811c: 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; 40008120: c2 21 00 00 st %g1, [ %g4 ] 40008124: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008128: 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; 4000812c: c4 21 20 04 st %g2, [ %g4 + 4 ] 40008130: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008134: 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; 40008138: c2 21 20 08 st %g1, [ %g4 + 8 ] 4000813c: c4 03 60 0c ld [ %o5 + 0xc ], %g2 40008140: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40008144: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 40008148: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 4000814c: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 40008150: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008154: 82 13 c0 00 mov %o7, %g1 40008158: 7f ff ff 48 call 40007e78 4000815c: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40008160: c8 00 62 74 ld [ %g1 + 0x274 ], %g4 40008164: 85 2a 20 03 sll %o0, 3, %g2 40008168: 83 2a 20 05 sll %o0, 5, %g1 4000816c: 82 20 40 02 sub %g1, %g2, %g1 40008170: c6 01 00 01 ld [ %g4 + %g1 ], %g3 40008174: 80 a0 e0 00 cmp %g3, 0 40008178: 12 80 00 06 bne 40008190 4000817c: 88 01 00 01 add %g4, %g1, %g4 40008180: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 40008184: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008188: 22 bf ff e5 be,a 4000811c <== NOT EXECUTED 4000818c: 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 ); 40008190: 82 10 20 0c mov 0xc, %g1 } 40008194: 81 c3 e0 08 retl 40008198: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 4000819c: 82 10 20 05 mov 5, %g1 } 400081a0: 81 c3 e0 08 retl 400081a4: 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 ) 400081a8: 80 a0 60 00 cmp %g1, 0 400081ac: 12 bf ff be bne 400080a4 400081b0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 400081b4: 82 10 20 09 mov 9, %g1 } 400081b8: 81 c3 e0 08 retl 400081bc: 90 10 00 01 mov %g1, %o0 40009538 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40009538: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 4000953c: 80 a6 20 00 cmp %i0, 0 40009540: 02 80 00 23 be 400095cc 40009544: 03 10 00 9c sethi %hi(0x40027000), %g1 return; 40009548: a4 10 63 e4 or %g1, 0x3e4, %l2 ! 400273e4 <_Objects_Information_table+0x4> 4000954c: 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 ] ) 40009550: c2 04 80 00 ld [ %l2 ], %g1 40009554: 80 a0 60 00 cmp %g1, 0 40009558: 22 80 00 1a be,a 400095c0 4000955c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40009560: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40009564: 80 a4 60 00 cmp %l1, 0 40009568: 22 80 00 16 be,a 400095c0 4000956c: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40009570: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40009574: 86 90 60 00 orcc %g1, 0, %g3 40009578: 22 80 00 12 be,a 400095c0 4000957c: a4 04 a0 04 add %l2, 4, %l2 40009580: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40009584: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40009588: 83 2c 20 02 sll %l0, 2, %g1 4000958c: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 40009590: 80 a2 20 00 cmp %o0, 0 40009594: 02 80 00 05 be 400095a8 40009598: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 4000959c: 9f c6 00 00 call %i0 400095a0: 01 00 00 00 nop 400095a4: 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++ ) { 400095a8: 83 28 e0 10 sll %g3, 0x10, %g1 400095ac: 83 30 60 10 srl %g1, 0x10, %g1 400095b0: 80 a0 40 10 cmp %g1, %l0 400095b4: 3a bf ff f5 bcc,a 40009588 400095b8: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400095bc: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 400095c0: 80 a4 80 13 cmp %l2, %l3 400095c4: 32 bf ff e4 bne,a 40009554 400095c8: c2 04 80 00 ld [ %l2 ], %g1 400095cc: 81 c7 e0 08 ret 400095d0: 81 e8 00 00 restore 40007ae4 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40007ae4: 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 *) 40007ae8: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007aec: 92 10 00 18 mov %i0, %o1 40007af0: 90 12 21 84 or %o0, 0x184, %o0 40007af4: 40 00 09 4e call 4000a02c <_Objects_Get> 40007af8: 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 ) { 40007afc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b00: 80 a0 60 00 cmp %g1, 0 40007b04: 02 80 00 04 be 40007b14 40007b08: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007b0c: 81 c7 e0 08 ret 40007b10: 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 ) ) { 40007b14: 25 10 00 7e sethi %hi(0x4001f800), %l2 40007b18: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40007b1c: c2 04 a3 c0 ld [ %l2 + 0x3c0 ], %g1 40007b20: 80 a0 80 01 cmp %g2, %g1 40007b24: 02 80 00 06 be 40007b3c 40007b28: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 40007b2c: 40 00 0b a7 call 4000a9c8 <_Thread_Enable_dispatch> 40007b30: b0 10 20 17 mov 0x17, %i0 40007b34: 81 c7 e0 08 ret 40007b38: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40007b3c: 12 80 00 0f bne 40007b78 40007b40: 01 00 00 00 nop switch ( the_period->state ) { 40007b44: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40007b48: 80 a0 60 00 cmp %g1, 0 40007b4c: 02 80 00 07 be 40007b68 40007b50: b0 10 20 0b mov 0xb, %i0 40007b54: 82 00 7f fd add %g1, -3, %g1 40007b58: 80 a0 60 01 cmp %g1, 1 40007b5c: 18 80 00 03 bgu 40007b68 40007b60: b0 10 20 00 clr %i0 40007b64: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40007b68: 40 00 0b 98 call 4000a9c8 <_Thread_Enable_dispatch> 40007b6c: 01 00 00 00 nop 40007b70: 81 c7 e0 08 ret 40007b74: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007b78: 7f ff ec 39 call 40002c5c 40007b7c: 01 00 00 00 nop 40007b80: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40007b84: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40007b88: 80 a4 e0 02 cmp %l3, 2 40007b8c: 02 80 00 1a be 40007bf4 40007b90: 80 a4 e0 04 cmp %l3, 4 40007b94: 02 80 00 32 be 40007c5c 40007b98: 80 a4 e0 00 cmp %l3, 0 40007b9c: 12 bf ff dc bne 40007b0c 40007ba0: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 40007ba4: 7f ff ec 32 call 40002c6c 40007ba8: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40007bac: 7f ff ff 58 call 4000790c <_Rate_monotonic_Initiate_statistics> 40007bb0: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007bb4: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007bb8: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007bbc: 82 10 63 b8 or %g1, 0x3b8, %g1 ! 40007fb8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 40007bc0: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bc4: 92 04 60 10 add %l1, 0x10, %o1 40007bc8: 11 10 00 7e sethi %hi(0x4001f800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007bcc: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bd0: 90 12 23 e0 or %o0, 0x3e0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007bd4: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007bd8: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007bdc: 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; 40007be0: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007be4: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007be8: 40 00 10 ef call 4000bfa4 <_Watchdog_Insert> 40007bec: b0 10 20 00 clr %i0 40007bf0: 30 bf ff de b,a 40007b68 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 40007bf4: 7f ff ff 62 call 4000797c <_Rate_monotonic_Update_statistics> 40007bf8: 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; 40007bfc: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007c00: 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; 40007c04: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40007c08: 7f ff ec 19 call 40002c6c 40007c0c: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40007c10: c2 04 a3 c0 ld [ %l2 + 0x3c0 ], %g1 40007c14: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007c18: 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; 40007c1c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007c20: 40 00 0d ff call 4000b41c <_Thread_Set_state> 40007c24: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40007c28: 7f ff ec 0d call 40002c5c 40007c2c: 01 00 00 00 nop local_state = the_period->state; 40007c30: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007c34: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40007c38: 7f ff ec 0d call 40002c6c 40007c3c: 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 ) 40007c40: 80 a4 20 03 cmp %l0, 3 40007c44: 02 80 00 17 be 40007ca0 40007c48: d0 04 a3 c0 ld [ %l2 + 0x3c0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 40007c4c: 40 00 0b 5f call 4000a9c8 <_Thread_Enable_dispatch> 40007c50: b0 10 20 00 clr %i0 40007c54: 81 c7 e0 08 ret 40007c58: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007c5c: 7f ff ff 48 call 4000797c <_Rate_monotonic_Update_statistics> 40007c60: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40007c64: 7f ff ec 02 call 40002c6c 40007c68: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007c6c: 82 10 20 02 mov 2, %g1 40007c70: 92 04 60 10 add %l1, 0x10, %o1 40007c74: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007c78: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 4001fbe0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007c7c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40007c80: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40007c84: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007c88: 40 00 10 c7 call 4000bfa4 <_Watchdog_Insert> 40007c8c: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40007c90: 40 00 0b 4e call 4000a9c8 <_Thread_Enable_dispatch> 40007c94: 01 00 00 00 nop 40007c98: 81 c7 e0 08 ret 40007c9c: 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 ); 40007ca0: 40 00 0a 4d call 4000a5d4 <_Thread_Clear_state> <== NOT EXECUTED 40007ca4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40007ca8: 30 bf ff e9 b,a 40007c4c <== NOT EXECUTED 40025a04 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40025a04: 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 ) 40025a08: 80 a6 60 00 cmp %i1, 0 40025a0c: 02 80 00 4a be 40025b34 40025a10: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40025a14: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a18: 9f c6 40 00 call %i1 40025a1c: 92 12 61 30 or %o1, 0x130, %o1 ! 40049530 <_POSIX_Threads_Default_attributes+0x38> #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40025a20: 90 10 00 18 mov %i0, %o0 40025a24: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a28: 9f c6 40 00 call %i1 40025a2c: 92 12 61 50 or %o1, 0x150, %o1 ! 40049550 <_POSIX_Threads_Default_attributes+0x58> #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 40025a30: 90 10 00 18 mov %i0, %o0 40025a34: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a38: 9f c6 40 00 call %i1 40025a3c: 92 12 61 78 or %o1, 0x178, %o1 ! 40049578 <_POSIX_Threads_Default_attributes+0x80> Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40025a40: 90 10 00 18 mov %i0, %o0 40025a44: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a48: 9f c6 40 00 call %i1 40025a4c: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 400495a0 <_POSIX_Threads_Default_attributes+0xa8> #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 40025a50: 90 10 00 18 mov %i0, %o0 40025a54: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a58: 9f c6 40 00 call %i1 40025a5c: 92 12 61 f0 or %o1, 0x1f0, %o1 ! 400495f0 <_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 ; 40025a60: 03 10 01 87 sethi %hi(0x40061c00), %g1 40025a64: a6 10 63 bc or %g1, 0x3bc, %l3 ! 40061fbc <_Rate_monotonic_Information> 40025a68: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40025a6c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40025a70: 80 a4 80 01 cmp %l2, %g1 40025a74: 18 80 00 30 bgu 40025b34 40025a78: 03 10 01 25 sethi %hi(0x40049400), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40025a7c: 05 10 01 26 sethi %hi(0x40049800), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40025a80: b6 10 62 40 or %g1, 0x240, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40025a84: b8 10 a2 48 or %g2, 0x248, %i4 40025a88: 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 ); 40025a8c: ae 07 bf d0 add %fp, -48, %l7 40025a90: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025a94: ba 07 bf b0 add %fp, -80, %i5 40025a98: 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( 40025a9c: 10 80 00 06 b 40025ab4 40025aa0: 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++ ) { 40025aa4: 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 ; 40025aa8: 80 a0 40 12 cmp %g1, %l2 40025aac: 0a 80 00 22 bcs 40025b34 40025ab0: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40025ab4: 90 10 00 12 mov %l2, %o0 40025ab8: 40 00 2e e3 call 40031644 40025abc: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 40025ac0: 80 a2 20 00 cmp %o0, 0 40025ac4: 32 bf ff f8 bne,a 40025aa4 40025ac8: 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 ); 40025acc: 92 10 00 17 mov %l7, %o1 40025ad0: 40 00 2e f2 call 40031698 40025ad4: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 40025ad8: d0 07 bf d0 ld [ %fp + -48 ], %o0 40025adc: 80 a2 20 00 cmp %o0, 0 40025ae0: 12 80 00 4b bne 40025c0c 40025ae4: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40025ae8: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 40025aec: 94 10 00 12 mov %l2, %o2 40025af0: 92 10 00 1b mov %i3, %o1 40025af4: 96 10 00 16 mov %l6, %o3 40025af8: 9f c6 40 00 call %i1 40025afc: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40025b00: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025b04: 94 10 00 15 mov %l5, %o2 40025b08: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40025b0c: 80 a0 60 00 cmp %g1, 0 40025b10: 12 80 00 0b bne 40025b3c 40025b14: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 40025b18: 9f c6 40 00 call %i1 40025b1c: 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 ; 40025b20: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 40025b24: 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 ; 40025b28: 80 a0 40 12 cmp %g1, %l2 40025b2c: 1a bf ff e3 bcc 40025ab8 40025b30: 90 10 00 12 mov %l2, %o0 40025b34: 81 c7 e0 08 ret 40025b38: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025b3c: 40 00 05 fd call 40027330 <_Timespec_Divide_by_integer> 40025b40: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40025b44: d0 07 bf a4 ld [ %fp + -92 ], %o0 40025b48: 40 00 78 86 call 40043d60 <.div> 40025b4c: 92 10 23 e8 mov 0x3e8, %o1 40025b50: a2 10 00 08 mov %o0, %l1 40025b54: d0 07 bf ac ld [ %fp + -84 ], %o0 40025b58: 40 00 78 82 call 40043d60 <.div> 40025b5c: 92 10 23 e8 mov 0x3e8, %o1 40025b60: c2 07 bf e8 ld [ %fp + -24 ], %g1 40025b64: a0 10 00 08 mov %o0, %l0 40025b68: d0 07 bf ec ld [ %fp + -20 ], %o0 40025b6c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40025b70: 40 00 78 7c call 40043d60 <.div> 40025b74: 92 10 23 e8 mov 0x3e8, %o1 40025b78: d8 07 bf a8 ld [ %fp + -88 ], %o4 40025b7c: d4 07 bf a0 ld [ %fp + -96 ], %o2 40025b80: 96 10 00 11 mov %l1, %o3 40025b84: 9a 10 00 10 mov %l0, %o5 40025b88: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40025b8c: 13 10 01 25 sethi %hi(0x40049400), %o1 40025b90: 90 10 00 18 mov %i0, %o0 40025b94: 9f c6 40 00 call %i1 40025b98: 92 12 62 58 or %o1, 0x258, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40025b9c: d2 07 bf 98 ld [ %fp + -104 ], %o1 40025ba0: 94 10 00 15 mov %l5, %o2 40025ba4: 40 00 05 e3 call 40027330 <_Timespec_Divide_by_integer> 40025ba8: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40025bac: d0 07 bf bc ld [ %fp + -68 ], %o0 40025bb0: 40 00 78 6c call 40043d60 <.div> 40025bb4: 92 10 23 e8 mov 0x3e8, %o1 40025bb8: a2 10 00 08 mov %o0, %l1 40025bbc: d0 07 bf c4 ld [ %fp + -60 ], %o0 40025bc0: 40 00 78 68 call 40043d60 <.div> 40025bc4: 92 10 23 e8 mov 0x3e8, %o1 40025bc8: c2 07 bf e8 ld [ %fp + -24 ], %g1 40025bcc: a0 10 00 08 mov %o0, %l0 40025bd0: d0 07 bf ec ld [ %fp + -20 ], %o0 40025bd4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40025bd8: 40 00 78 62 call 40043d60 <.div> 40025bdc: 92 10 23 e8 mov 0x3e8, %o1 40025be0: d4 07 bf b8 ld [ %fp + -72 ], %o2 40025be4: d8 07 bf c0 ld [ %fp + -64 ], %o4 40025be8: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40025bec: 96 10 00 11 mov %l1, %o3 40025bf0: 9a 10 00 10 mov %l0, %o5 40025bf4: 90 10 00 18 mov %i0, %o0 40025bf8: 13 10 01 25 sethi %hi(0x40049400), %o1 40025bfc: 9f c6 40 00 call %i1 40025c00: 92 12 62 78 or %o1, 0x278, %o1 ! 40049678 <_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 ; 40025c04: 10 bf ff a8 b 40025aa4 40025c08: 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 ); 40025c0c: 94 10 00 16 mov %l6, %o2 40025c10: 7f ff 93 72 call 4000a9d8 40025c14: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40025c18: 10 bf ff b5 b 40025aec 40025c1c: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40011240 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40011240: 9d e3 bf 90 save %sp, -112, %sp 40011244: 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 ) 40011248: 80 a6 60 00 cmp %i1, 0 4001124c: 02 80 00 28 be 400112ec 40011250: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40011254: 23 10 00 d2 sethi %hi(0x40034800), %l1 40011258: 40 00 09 38 call 40013738 <_API_Mutex_Lock> 4001125c: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 ! 40034a38 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40011260: 92 10 00 10 mov %l0, %o1 40011264: 11 10 00 d1 sethi %hi(0x40034400), %o0 40011268: 94 07 bf f0 add %fp, -16, %o2 4001126c: 40 00 10 4f call 400153a8 <_Objects_Get_no_protection> 40011270: 90 12 23 bc or %o0, 0x3bc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011274: c2 07 bf f0 ld [ %fp + -16 ], %g1 40011278: 80 a0 60 00 cmp %g1, 0 4001127c: 12 80 00 16 bne 400112d4 40011280: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40011284: 92 10 00 19 mov %i1, %o1 40011288: 94 10 00 1a mov %i2, %o2 4001128c: 90 02 20 68 add %o0, 0x68, %o0 40011290: 96 07 bf f4 add %fp, -12, %o3 40011294: 40 00 0c 6e call 4001444c <_Heap_Extend> 40011298: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4001129c: 80 a2 20 01 cmp %o0, 1 400112a0: 02 80 00 11 be 400112e4 400112a4: 01 00 00 00 nop 400112a8: 1a 80 00 13 bcc 400112f4 400112ac: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112b0: c6 07 bf f4 ld [ %fp + -12 ], %g3 400112b4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 400112b8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112bc: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 400112c0: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112c4: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 400112c8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 400112cc: 10 80 00 06 b 400112e4 400112d0: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 400112d4: 80 a0 60 01 cmp %g1, 1 400112d8: 02 80 00 03 be 400112e4 400112dc: 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; 400112e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 400112e4: 40 00 09 2b call 40013790 <_API_Mutex_Unlock> 400112e8: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 return return_status; } 400112ec: 81 c7 e0 08 ret 400112f0: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 400112f4: 12 bf ff fb bne 400112e0 400112f8: b0 10 20 18 mov 0x18, %i0 400112fc: 30 bf ff fa b,a 400112e4 400115fc : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400115fc: 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 ) 40011600: 80 a6 e0 00 cmp %i3, 0 40011604: 02 80 00 2e be 400116bc 40011608: 21 10 00 d2 sethi %hi(0x40034800), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4001160c: 40 00 08 4b call 40013738 <_API_Mutex_Lock> 40011610: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 ! 40034a38 <_RTEMS_Allocator_Mutex> 40011614: 92 10 00 18 mov %i0, %o1 40011618: 11 10 00 d1 sethi %hi(0x40034400), %o0 4001161c: 94 07 bf f0 add %fp, -16, %o2 40011620: 40 00 0f 62 call 400153a8 <_Objects_Get_no_protection> 40011624: 90 12 23 bc or %o0, 0x3bc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011628: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001162c: 80 a0 60 00 cmp %g1, 0 40011630: 12 80 00 14 bne 40011680 40011634: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40011638: 94 10 00 1a mov %i2, %o2 4001163c: 92 10 00 19 mov %i1, %o1 40011640: 90 02 20 68 add %o0, 0x68, %o0 40011644: 96 07 bf ec add %fp, -20, %o3 40011648: 40 00 0d 0b call 40014a74 <_Heap_Resize_block> 4001164c: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40011650: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 40011654: b4 92 20 00 orcc %o0, 0, %i2 40011658: 12 80 00 13 bne 400116a4 4001165c: c2 26 c0 00 st %g1, [ %i3 ] 40011660: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011668: 12 80 00 17 bne 400116c4 <== NOT EXECUTED 4001166c: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 40011670: 40 00 08 48 call 40013790 <_API_Mutex_Unlock> <== NOT EXECUTED 40011674: b0 10 20 00 clr %i0 <== NOT EXECUTED 40011678: 81 c7 e0 08 ret <== NOT EXECUTED 4001167c: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011680: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011684: 82 18 60 01 xor %g1, 1, %g1 40011688: 80 a0 00 01 cmp %g0, %g1 4001168c: 84 40 3f ff addx %g0, -1, %g2 40011690: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011694: 40 00 08 3f call 40013790 <_API_Mutex_Unlock> 40011698: b0 06 20 19 add %i0, 0x19, %i0 4001169c: 81 c7 e0 08 ret 400116a0: 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(); 400116a4: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 400116a8: 40 00 08 3a call 40013790 <_API_Mutex_Unlock> 400116ac: b0 10 20 0d mov 0xd, %i0 return 400116b0: 80 a6 a0 01 cmp %i2, 1 400116b4: 02 80 00 07 be 400116d0 400116b8: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 400116bc: 81 c7 e0 08 ret 400116c0: 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 */ 400116c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400116c8: 40 00 22 d1 call 4001a20c <_Region_Process_queue> <== NOT EXECUTED 400116cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400116d0: 81 c7 e0 08 ret <== NOT EXECUTED 400116d4: 81 e8 00 00 restore <== NOT EXECUTED 400066bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 400066bc: 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 ) ) 400066c0: a4 96 20 00 orcc %i0, 0, %l2 400066c4: 02 80 00 33 be 40006790 400066c8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400066cc: 80 a7 20 00 cmp %i4, 0 400066d0: 02 80 00 30 be 40006790 400066d4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 400066d8: 82 8e a0 c0 andcc %i2, 0xc0, %g1 400066dc: 12 80 00 2f bne 40006798 400066e0: 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 ) ) 400066e4: 80 a4 20 00 cmp %l0, 0 400066e8: 02 80 00 04 be 400066f8 400066ec: 80 a6 60 01 cmp %i1, 1 400066f0: 18 80 00 28 bgu 40006790 400066f4: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400066f8: 05 10 00 6a sethi %hi(0x4001a800), %g2 400066fc: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> 40006700: 82 00 60 01 inc %g1 40006704: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] * 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 ); 40006708: 31 10 00 6a sethi %hi(0x4001a800), %i0 4000670c: 40 00 05 94 call 40007d5c <_Objects_Allocate> 40006710: 90 16 21 0c or %i0, 0x10c, %o0 ! 4001a90c <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40006714: a2 92 20 00 orcc %o0, 0, %l1 40006718: 02 80 00 4e be 40006850 4000671c: 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 ) ) { 40006720: 02 80 00 2c be 400067d0 40006724: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40006728: 80 8e a0 40 btst 0x40, %i2 4000672c: 02 80 00 44 be 4000683c 40006730: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40006734: 82 10 20 02 mov 2, %g1 40006738: 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 ) ) { 4000673c: 80 a4 20 10 cmp %l0, 0x10 40006740: 02 80 00 48 be 40006860 40006744: 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; 40006748: 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; 4000674c: 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( 40006750: 82 1e 60 01 xor %i1, 1, %g1 40006754: 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; 40006758: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 4000675c: 94 60 3f ff subx %g0, -1, %o2 40006760: 90 04 60 14 add %l1, 0x14, %o0 40006764: 40 00 03 64 call 400074f4 <_CORE_mutex_Initialize> 40006768: 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 ) { 4000676c: 80 a2 20 06 cmp %o0, 6 40006770: 32 80 00 26 bne,a 40006808 40006774: 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 ); 40006778: 90 16 21 0c or %i0, 0x10c, %o0 <== NOT EXECUTED 4000677c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40006780: 40 00 06 72 call 40008148 <_Objects_Free> <== NOT EXECUTED 40006784: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40006788: 40 00 09 44 call 40008c98 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000678c: 01 00 00 00 nop <== NOT EXECUTED 40006790: 81 c7 e0 08 ret 40006794: 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 ) || 40006798: 80 a4 20 10 cmp %l0, 0x10 4000679c: 02 80 00 06 be 400067b4 400067a0: 80 a4 20 20 cmp %l0, 0x20 400067a4: 02 80 00 05 be 400067b8 400067a8: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400067ac: 81 c7 e0 08 ret 400067b0: 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 ) || 400067b4: 80 8e a0 04 btst 4, %i2 400067b8: 02 bf ff fd be 400067ac 400067bc: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 400067c0: 12 bf ff ca bne 400066e8 400067c4: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 400067c8: 81 c7 e0 08 ret 400067cc: 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 ) ) 400067d0: 80 8e a0 04 btst 4, %i2 400067d4: 22 80 00 04 be,a 400067e4 400067d8: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400067dc: 82 10 20 01 mov 1, %g1 400067e0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400067e4: 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; 400067e8: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400067ec: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400067f0: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400067f4: 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( 400067f8: 90 04 60 14 add %l1, 0x14, %o0 400067fc: 40 00 04 29 call 400078a0 <_CORE_semaphore_Initialize> 40006800: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40006804: c4 04 60 08 ld [ %l1 + 8 ], %g2 40006808: 82 16 21 0c or %i0, 0x10c, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000680c: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40006810: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40006814: c4 27 00 00 st %g2, [ %i4 ] 40006818: 03 00 00 3f sethi %hi(0xfc00), %g1 4000681c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006820: 84 08 80 01 and %g2, %g1, %g2 40006824: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40006828: b0 10 20 00 clr %i0 4000682c: 40 00 09 1b call 40008c98 <_Thread_Enable_dispatch> 40006830: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 40006834: 81 c7 e0 08 ret 40006838: 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 ) ) 4000683c: 02 80 00 0f be 40006878 40006840: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40006844: 82 10 20 03 mov 3, %g1 40006848: 10 bf ff bd b 4000673c 4000684c: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40006850: 40 00 09 12 call 40008c98 <_Thread_Enable_dispatch> 40006854: b0 10 20 05 mov 5, %i0 40006858: 81 c7 e0 08 ret 4000685c: 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 ) { 40006860: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006864: 80 a0 60 01 cmp %g1, 1 40006868: 18 80 00 09 bgu 4000688c 4000686c: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40006870: 10 bf ff b8 b 40006750 40006874: 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 ) ) 40006878: 22 bf ff b1 be,a 4000673c 4000687c: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40006880: 82 10 20 01 mov 1, %g1 40006884: 10 bf ff ae b 4000673c 40006888: 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 ) { 4000688c: 80 a0 60 03 cmp %g1, 3 40006890: 18 bf ff b1 bgu 40006754 40006894: 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; 40006898: 82 10 20 01 mov 1, %g1 4000689c: 10 bf ff ad b 40006750 400068a0: c2 2f bf e4 stb %g1, [ %fp + -28 ] 40025d88 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40025d88: 9d e3 bf 90 save %sp, -112, %sp 40025d8c: 11 10 01 84 sethi %hi(0x40061000), %o0 40025d90: 92 10 00 18 mov %i0, %o1 40025d94: 90 12 22 c0 or %o0, 0x2c0, %o0 40025d98: 7f ff 9a 92 call 4000c7e0 <_Objects_Get> 40025d9c: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40025da0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40025da4: 80 a0 60 00 cmp %g1, 0 40025da8: 12 80 00 0b bne 40025dd4 40025dac: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40025db0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40025db4: 80 88 60 30 btst 0x30, %g1 40025db8: 12 80 00 09 bne 40025ddc 40025dbc: 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( 40025dc0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40025dc4: 7f ff 97 79 call 4000bba8 <_CORE_semaphore_Flush> <== NOT EXECUTED 40025dc8: 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(); 40025dcc: 7f ff 9c ef call 4000d188 <_Thread_Enable_dispatch> 40025dd0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40025dd4: 81 c7 e0 08 ret 40025dd8: 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( 40025ddc: 92 10 20 00 clr %o1 40025de0: 7f ff 96 87 call 4000b7fc <_CORE_mutex_Flush> 40025de4: 94 10 20 01 mov 1, %o2 40025de8: 30 bf ff f9 b,a 40025dcc 40017f84 : */ void rtems_shutdown_executive( uint32_t result ) { 40017f84: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 40017f88: 05 10 00 6a sethi %hi(0x4001a800), %g2 40017f8c: c2 00 a3 e4 ld [ %g2 + 0x3e4 ], %g1 ! 4001abe4 <_System_state_Current> 40017f90: 80 a0 60 04 cmp %g1, 4 40017f94: 02 80 00 07 be 40017fb0 40017f98: 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 ); 40017f9c: 13 10 00 6a sethi %hi(0x4001a800), %o1 40017fa0: c2 20 a3 e4 st %g1, [ %g2 + 0x3e4 ] 40017fa4: 92 12 61 b8 or %o1, 0x1b8, %o1 40017fa8: 7f ff c8 d8 call 4000a308 <_CPU_Context_switch> 40017fac: 90 07 bf 70 add %fp, -144, %o0 40017fb0: 81 c7 e0 08 ret <== NOT EXECUTED 40017fb4: 81 e8 00 00 restore <== NOT EXECUTED 400089bc : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400089bc: 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() ) 400089c0: 03 10 00 82 sethi %hi(0x40020800), %g1 400089c4: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400208b8 <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400089c8: 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() ) 400089cc: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 400089d0: c4 08 60 04 ldub [ %g1 + 4 ], %g2 400089d4: 80 a0 a0 00 cmp %g2, 0 400089d8: 02 80 00 1c be 40008a48 400089dc: 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 ) 400089e0: 80 a6 60 0f cmp %i1, 0xf 400089e4: 18 80 00 19 bgu 40008a48 400089e8: b0 10 20 0a mov 0xa, %i0 400089ec: 03 10 00 82 sethi %hi(0x40020800), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 400089f0: 80 a2 20 00 cmp %o0, 0 400089f4: 02 80 00 17 be 40008a50 400089f8: 86 10 60 e0 or %g1, 0xe0, %g3 400089fc: 03 10 00 82 sethi %hi(0x40020800), %g1 40008a00: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400208e0 <_Thread_Executing> 40008a04: 86 10 60 e0 or %g1, 0xe0, %g3 40008a08: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008a0c: 80 a2 00 01 cmp %o0, %g1 40008a10: 22 80 00 11 be,a 40008a54 40008a14: 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 ); 40008a18: 40 00 08 6a call 4000abc0 <_Thread_Get> 40008a1c: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40008a20: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008a24: 80 a0 60 00 cmp %g1, 0 40008a28: 12 80 00 08 bne 40008a48 40008a2c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40008a30: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 40008a34: 82 06 60 08 add %i1, 8, %g1 40008a38: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 40008a3c: b0 10 20 00 clr %i0 40008a40: 40 00 08 52 call 4000ab88 <_Thread_Enable_dispatch> 40008a44: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40008a48: 81 c7 e0 08 ret 40008a4c: 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; 40008a50: c2 00 c0 00 ld [ %g3 ], %g1 40008a54: 84 06 60 08 add %i1, 8, %g2 40008a58: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 40008a5c: 85 28 a0 02 sll %g2, 2, %g2 40008a60: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 40008a64: 81 c7 e0 08 ret 40008a68: 91 e8 20 00 restore %g0, 0, %o0 40007b4c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40007b4c: 9d e3 bf 90 save %sp, -112, %sp 40007b50: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40007b54: 80 a6 60 00 cmp %i1, 0 40007b58: 02 80 00 26 be 40007bf0 40007b5c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40007b60: 80 a6 a0 00 cmp %i2, 0 40007b64: 02 80 00 23 be 40007bf0 40007b68: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40007b6c: 11 10 00 61 sethi %hi(0x40018400), %o0 40007b70: 92 10 00 12 mov %l2, %o1 40007b74: 90 12 20 a4 or %o0, 0xa4, %o0 40007b78: 40 00 05 74 call 40009148 <_Objects_Get> 40007b7c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40007b80: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b84: a0 10 00 08 mov %o0, %l0 40007b88: 80 a0 60 00 cmp %g1, 0 40007b8c: 12 80 00 19 bne 40007bf0 40007b90: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40007b94: a2 02 20 10 add %o0, 0x10, %l1 40007b98: 40 00 0c d2 call 4000aee0 <_Watchdog_Remove> 40007b9c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40007ba0: 7f ff ea 5c call 40002510 40007ba4: 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 ) { 40007ba8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40007bac: 80 a0 60 00 cmp %g1, 0 40007bb0: 12 80 00 12 bne 40007bf8 40007bb4: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007bb8: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 40007bbc: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40007bc0: 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; 40007bc4: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007bc8: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 40007bcc: 7f ff ea 55 call 40002520 40007bd0: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bd4: 92 10 00 11 mov %l1, %o1 40007bd8: 11 10 00 5f sethi %hi(0x40017c00), %o0 40007bdc: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 40017fb0 <_Watchdog_Ticks_chain> 40007be0: 40 00 0c 55 call 4000ad34 <_Watchdog_Insert> 40007be4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 40007be8: 40 00 07 91 call 40009a2c <_Thread_Enable_dispatch> 40007bec: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007bf0: 81 c7 e0 08 ret 40007bf4: 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 ); 40007bf8: 7f ff ea 4a call 40002520 <== NOT EXECUTED 40007bfc: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40007c00: 40 00 07 8b call 40009a2c <_Thread_Enable_dispatch> <== NOT EXECUTED 40007c04: 01 00 00 00 nop <== NOT EXECUTED 40007c08: 81 c7 e0 08 ret <== NOT EXECUTED 40007c0c: 81 e8 00 00 restore <== NOT EXECUTED 40012ae4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 40012ae4: 9d e3 bf 90 save %sp, -112, %sp 40012ae8: 92 96 20 00 orcc %i0, 0, %o1 40012aec: 12 80 00 05 bne 40012b00 40012af0: 03 10 00 bd sethi %hi(0x4002f400), %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; 40012af4: 90 10 20 13 mov 0x13, %o0 } return status; } 40012af8: 81 c7 e0 08 ret 40012afc: 91 e8 00 08 restore %g0, %o0, %o0 40012b00: c4 08 63 54 ldub [ %g1 + 0x354 ], %g2 40012b04: 80 a2 40 02 cmp %o1, %g2 40012b08: 18 80 00 56 bgu 40012c60 40012b0c: 80 a2 7f ff cmp %o1, -1 40012b10: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 40012b14: 05 10 00 d2 sethi %hi(0x40034800), %g2 40012b18: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 40034980 <_Thread_Dispatch_disable_level> 40012b1c: 82 00 60 01 inc %g1 40012b20: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012b24: 23 10 00 c0 sethi %hi(0x40030000), %l1 initialized = true; 40012b28: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012b2c: e0 0c 62 ac ldub [ %l1 + 0x2ac ], %l0 initialized = true; _Thread_Enable_dispatch(); 40012b30: 40 00 0c 97 call 40015d8c <_Thread_Enable_dispatch> 40012b34: c2 2c 62 ac stb %g1, [ %l1 + 0x2ac ] if ( tmpInitialized ) 40012b38: 80 a4 20 00 cmp %l0, 0 40012b3c: 12 bf ff ef bne 40012af8 40012b40: 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); 40012b44: 05 10 00 d2 sethi %hi(0x40034800), %g2 40012b48: 82 10 a0 9c or %g2, 0x9c, %g1 ! 4003489c <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012b4c: 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; 40012b50: 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); 40012b54: 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( 40012b58: 92 10 00 18 mov %i0, %o1 40012b5c: 94 10 00 19 mov %i1, %o2 40012b60: 19 00 00 20 sethi %hi(0x8000), %o4 40012b64: c2 20 a0 9c st %g1, [ %g2 + 0x9c ] 40012b68: 98 16 80 0c or %i2, %o4, %o4 40012b6c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40012b70: 96 10 21 00 mov 0x100, %o3 40012b74: 90 12 21 45 or %o0, 0x145, %o0 40012b78: 7f ff fc 78 call 40011d58 40012b7c: 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) { 40012b80: 80 a2 20 00 cmp %o0, 0 40012b84: 12 80 00 34 bne 40012c54 40012b88: 03 10 00 d2 sethi %hi(0x40034800), %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( 40012b8c: 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 ) 40012b90: 86 10 60 3c or %g1, 0x3c, %g3 40012b94: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40012b98: 03 00 00 3f sethi %hi(0xfc00), %g1 40012b9c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40012ba0: 82 0a c0 01 and %o3, %g1, %g1 40012ba4: 80 a0 40 02 cmp %g1, %g2 40012ba8: 18 80 00 05 bgu 40012bbc 40012bac: 98 10 20 00 clr %o4 40012bb0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 40012bb4: 83 28 60 02 sll %g1, 2, %g1 40012bb8: d8 00 80 01 ld [ %g2 + %g1 ], %o4 40012bbc: 09 10 00 d2 sethi %hi(0x40034800), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bc0: 1b 10 00 d2 sethi %hi(0x40034800), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012bc4: 84 11 20 7c or %g4, 0x7c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bc8: 82 13 60 90 or %o5, 0x90, %g1 40012bcc: 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; 40012bd0: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 40012bd4: 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; 40012bd8: 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); 40012bdc: 84 00 a0 04 add %g2, 4, %g2 40012be0: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40012be4: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012be8: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012bec: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 40012bf0: c4 21 20 7c st %g2, [ %g4 + 0x7c ] 40012bf4: c2 23 60 90 st %g1, [ %o5 + 0x90 ] 40012bf8: 05 10 00 d4 sethi %hi(0x40035000), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012bfc: 07 10 00 56 sethi %hi(0x40015800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c00: 03 10 00 d2 sethi %hi(0x40034800), %g1 the_watchdog->routine = routine; 40012c04: 86 10 e3 f4 or %g3, 0x3f4, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c08: 82 10 60 a8 or %g1, 0xa8, %g1 the_watchdog->routine = routine; 40012c0c: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40012c10: d8 20 a3 30 st %o4, [ %g2 + 0x330 ] 40012c14: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40012c18: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c1c: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012c20: 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; 40012c24: 05 10 00 4b sethi %hi(0x40012c00), %g2 40012c28: 03 10 00 d4 sethi %hi(0x40035000), %g1 40012c2c: 84 10 a0 70 or %g2, 0x70, %g2 /* * Start the timer server */ status = rtems_task_start( 40012c30: 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; 40012c34: c4 20 63 2c st %g2, [ %g1 + 0x32c ] /* * Start the timer server */ status = rtems_task_start( 40012c38: 13 10 00 4b sethi %hi(0x40012c00), %o1 40012c3c: 94 10 20 00 clr %o2 40012c40: 7f ff fd 9e call 400122b8 40012c44: 92 12 61 44 or %o1, 0x144, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40012c48: 80 a2 20 00 cmp %o0, 0 40012c4c: 02 bf ff ab be 40012af8 40012c50: 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; 40012c54: c0 2c 62 ac clrb [ %l1 + 0x2ac ] } return status; } 40012c58: 81 c7 e0 08 ret 40012c5c: 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 ) 40012c60: 02 bf ff ad be 40012b14 40012c64: 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; 40012c68: 10 bf ff a4 b 40012af8 40012c6c: 90 10 20 13 mov 0x13, %o0 40012864 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 40012864: 9d e3 bf 90 save %sp, -112, %sp 40012868: 11 10 00 d4 sethi %hi(0x40035000), %o0 4001286c: 92 10 00 18 mov %i0, %o1 40012870: 90 12 22 ec or %o0, 0x2ec, %o0 40012874: 40 00 0a df call 400153f0 <_Objects_Get> 40012878: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001287c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012880: a0 10 00 08 mov %o0, %l0 40012884: 80 a0 60 00 cmp %g1, 0 40012888: 12 80 00 11 bne 400128cc 4001288c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40012890: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012894: 80 a0 60 01 cmp %g1, 1 40012898: 22 80 00 15 be,a 400128ec 4001289c: 31 10 00 d4 sethi %hi(0x40035000), %i0 400128a0: 1a 80 00 0d bcc 400128d4 400128a4: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400128a8: a0 02 20 10 add %o0, 0x10, %l0 400128ac: 40 00 13 96 call 40017704 <_Watchdog_Remove> 400128b0: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400128b4: 11 10 00 d2 sethi %hi(0x40034800), %o0 400128b8: 92 10 00 10 mov %l0, %o1 400128bc: 40 00 13 27 call 40017558 <_Watchdog_Insert> 400128c0: 90 12 22 60 or %o0, 0x260, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400128c4: 40 00 0d 32 call 40015d8c <_Thread_Enable_dispatch> 400128c8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400128cc: 81 c7 e0 08 ret 400128d0: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400128d4: 18 bf ff fc bgu 400128c4 400128d8: 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(); 400128dc: 40 00 0d 2c call 40015d8c <_Thread_Enable_dispatch> 400128e0: b0 10 20 0b mov 0xb, %i0 ! b 400128e4: 81 c7 e0 08 ret 400128e8: 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 ) { 400128ec: c2 06 23 2c ld [ %i0 + 0x32c ], %g1 400128f0: 80 a0 60 00 cmp %g1, 0 400128f4: 02 80 00 08 be 40012914 400128f8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400128fc: 40 00 13 82 call 40017704 <_Watchdog_Remove> 40012900: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40012904: c2 06 23 2c ld [ %i0 + 0x32c ], %g1 40012908: 9f c0 40 00 call %g1 4001290c: 90 10 00 10 mov %l0, %o0 40012910: 30 bf ff ed b,a 400128c4 _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(); 40012914: 40 00 0d 1e call 40015d8c <_Thread_Enable_dispatch> <== NOT EXECUTED 40012918: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 4001291c: 81 c7 e0 08 ret <== NOT EXECUTED 40012920: 81 e8 00 00 restore <== NOT EXECUTED 40012924 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012924: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012928: 03 10 00 d4 sethi %hi(0x40035000), %g1 4001292c: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 40035330 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012930: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012934: 80 a0 a0 00 cmp %g2, 0 40012938: 02 80 00 28 be 400129d8 4001293c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40012940: 80 a6 a0 00 cmp %i2, 0 40012944: 02 80 00 25 be 400129d8 40012948: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001294c: 80 a6 60 00 cmp %i1, 0 40012950: 02 80 00 22 be 400129d8 40012954: b0 10 20 0a mov 0xa, %i0 40012958: 11 10 00 d4 sethi %hi(0x40035000), %o0 4001295c: 92 10 00 11 mov %l1, %o1 40012960: 90 12 22 ec or %o0, 0x2ec, %o0 40012964: 40 00 0a a3 call 400153f0 <_Objects_Get> 40012968: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001296c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012970: a0 10 00 08 mov %o0, %l0 40012974: 80 a0 60 00 cmp %g1, 0 40012978: 12 80 00 18 bne 400129d8 4001297c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012980: 40 00 13 61 call 40017704 <_Watchdog_Remove> 40012984: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40012988: 7f ff e2 4c call 4000b2b8 4001298c: 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 ) { 40012990: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012994: 80 a0 60 00 cmp %g1, 0 40012998: 12 80 00 12 bne 400129e0 4001299c: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400129a0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400129a4: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400129a8: 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; 400129ac: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400129b0: 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; 400129b4: 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 ); 400129b8: 7f ff e2 44 call 4000b2c8 400129bc: 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 ); 400129c0: 03 10 00 d4 sethi %hi(0x40035000), %g1 400129c4: c4 00 63 2c ld [ %g1 + 0x32c ], %g2 ! 4003532c <_Timer_Server_schedule_operation> 400129c8: 9f c0 80 00 call %g2 400129cc: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400129d0: 40 00 0c ef call 40015d8c <_Thread_Enable_dispatch> 400129d4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400129d8: 81 c7 e0 08 ret 400129dc: 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 ); 400129e0: 7f ff e2 3a call 4000b2c8 <== NOT EXECUTED 400129e4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400129e8: 40 00 0c e9 call 40015d8c <_Thread_Enable_dispatch> <== NOT EXECUTED 400129ec: 01 00 00 00 nop <== NOT EXECUTED 400129f0: 81 c7 e0 08 ret <== NOT EXECUTED 400129f4: 81 e8 00 00 restore <== NOT EXECUTED 400077e0 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 400077e0: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 400077e4: 80 a6 60 00 cmp %i1, 0 400077e8: 02 80 00 05 be 400077fc 400077ec: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 400077f0: 80 a6 20 00 cmp %i0, 0 400077f4: 12 80 00 04 bne 40007804 400077f8: 11 10 00 7d sethi %hi(0x4001f400), %o0 if (!ptr) return false; *pointer = ptr; return true; } 400077fc: 81 c7 e0 08 ret <== NOT EXECUTED 40007800: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 40007804: 40 00 05 fd call 40008ff8 <_Protected_heap_Allocate> 40007808: 90 12 22 04 or %o0, 0x204, %o0 if (!ptr) 4000780c: 80 a2 20 00 cmp %o0, 0 40007810: 02 bf ff fb be 400077fc 40007814: 01 00 00 00 nop return false; *pointer = ptr; 40007818: d0 26 40 00 st %o0, [ %i1 ] 4000781c: 81 c7 e0 08 ret 40007820: 91 e8 20 01 restore %g0, 1, %o0 400077c4 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 400077c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 400077c8: 11 10 00 7d sethi %hi(0x4001f400), %o0 <== NOT EXECUTED 400077cc: 90 12 22 04 or %o0, 0x204, %o0 ! 4001f604 <_Workspace_Area> <== NOT EXECUTED 400077d0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400077d4: 40 00 06 15 call 40009028 <_Protected_heap_Free> <== NOT EXECUTED 400077d8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400077dc: 01 00 00 00 nop 40007824 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 40007824: 80 a2 20 00 cmp %o0, 0 40007828: 02 80 00 07 be 40007844 4000782c: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 40007830: 11 10 00 7d sethi %hi(0x4001f400), %o0 40007834: 90 12 22 04 or %o0, 0x204, %o0 ! 4001f604 <_Workspace_Area> 40007838: 82 13 c0 00 mov %o7, %g1 4000783c: 40 00 06 07 call 40009058 <_Protected_heap_Get_information> 40007840: 9e 10 40 00 mov %g1, %o7 } 40007844: 81 c3 e0 08 retl <== NOT EXECUTED 40007848: 01 00 00 00 nop 40008fd4 : */ int sem_destroy( sem_t *sem ) { 40008fd4: 9d e3 bf 90 save %sp, -112, %sp 40008fd8: d2 06 00 00 ld [ %i0 ], %o1 40008fdc: 11 10 00 85 sethi %hi(0x40021400), %o0 40008fe0: 94 07 bf f4 add %fp, -12, %o2 40008fe4: 40 00 09 78 call 4000b5c4 <_Objects_Get> 40008fe8: 90 12 20 f0 or %o0, 0xf0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40008fec: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008ff0: 80 a0 60 00 cmp %g1, 0 40008ff4: 22 80 00 08 be,a 40009014 40008ff8: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40008ffc: 40 00 24 f0 call 400123bc <__errno> 40009000: b0 10 3f ff mov -1, %i0 40009004: 82 10 20 16 mov 0x16, %g1 40009008: c2 22 00 00 st %g1, [ %o0 ] } 4000900c: 81 c7 e0 08 ret 40009010: 81 e8 00 00 restore case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40009014: 80 a0 60 00 cmp %g1, 0 40009018: 12 80 00 08 bne 40009038 4000901c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 40009020: 40 00 1c 1d call 40010094 <_POSIX_Semaphore_Delete> 40009024: b0 10 20 00 clr %i0 ! 0 _Thread_Enable_dispatch(); 40009028: 40 00 0b a0 call 4000bea8 <_Thread_Enable_dispatch> 4000902c: 01 00 00 00 nop 40009030: 81 c7 e0 08 ret 40009034: 81 e8 00 00 restore /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 40009038: 40 00 0b 9c call 4000bea8 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000903c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40009040: 40 00 24 df call 400123bc <__errno> <== NOT EXECUTED 40009044: 01 00 00 00 nop <== NOT EXECUTED 40009048: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000904c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009050: 81 c7 e0 08 ret <== NOT EXECUTED 40009054: 81 e8 00 00 restore <== NOT EXECUTED 400090ac : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 400090ac: 9d e3 bf 90 save %sp, -112, %sp 400090b0: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 400090b4: 80 a6 20 00 cmp %i0, 0 400090b8: 02 80 00 0c be 400090e8 400090bc: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 400090c0: 90 10 20 00 clr %o0 400090c4: 40 00 1b a8 call 4000ff64 <_POSIX_Semaphore_Create_support> 400090c8: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 400090cc: 80 a2 3f ff cmp %o0, -1 400090d0: 02 80 00 04 be 400090e0 400090d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 400090d8: c4 00 60 08 ld [ %g1 + 8 ], %g2 400090dc: c4 26 00 00 st %g2, [ %i0 ] return status; } 400090e0: 81 c7 e0 08 ret 400090e4: 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 ); 400090e8: 40 00 24 b5 call 400123bc <__errno> <== NOT EXECUTED 400090ec: 01 00 00 00 nop <== NOT EXECUTED 400090f0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400090f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400090f8: 10 bf ff fa b 400090e0 <== NOT EXECUTED 400090fc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000927c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 4000927c: 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 ); 40009280: 90 10 00 19 mov %i1, %o0 40009284: 40 00 18 c3 call 4000f590 <_POSIX_Absolute_timeout_to_ticks> 40009288: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 4000928c: 80 a2 20 02 cmp %o0, 2 40009290: 08 80 00 07 bleu 400092ac 40009294: 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 ); 40009298: 90 10 00 18 mov %i0, %o0 4000929c: 40 00 1b b2 call 40010164 <_POSIX_Semaphore_Wait_support> 400092a0: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 400092a4: 81 c7 e0 08 ret 400092a8: 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 ); 400092ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400092b0: 40 00 1b ad call 40010164 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 400092b4: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 400092b8: 81 c7 e0 08 ret <== NOT EXECUTED 400092bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000937c : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 4000937c: 92 10 20 01 mov 1, %o1 40009380: 94 10 20 00 clr %o2 40009384: 82 13 c0 00 mov %o7, %g1 40009388: 40 00 1b 77 call 40010164 <_POSIX_Semaphore_Wait_support> 4000938c: 9e 10 40 00 mov %g1, %o7 40009390: 01 00 00 00 nop <== NOT EXECUTED 400091e0 : #include int sigsuspend( const sigset_t *sigmask ) { 400091e0: 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 ); 400091e4: 90 10 20 01 mov 1, %o0 400091e8: 92 10 00 18 mov %i0, %o1 400091ec: a0 07 bf f4 add %fp, -12, %l0 400091f0: 7f ff ff f1 call 400091b4 400091f4: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 400091f8: a2 07 bf f0 add %fp, -16, %l1 400091fc: 7f ff ff b7 call 400090d8 40009200: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 40009204: 90 10 00 11 mov %l1, %o0 40009208: 92 10 20 00 clr %o1 4000920c: 40 00 00 2e call 400092c4 40009210: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 40009214: 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 ); 40009218: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 4000921c: 94 10 20 00 clr %o2 40009220: 7f ff ff e5 call 400091b4 40009224: 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 ) 40009228: 80 a4 7f ff cmp %l1, -1 4000922c: 12 80 00 05 bne 40009240 40009230: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 40009234: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009238: 81 c7 e0 08 ret <== NOT EXECUTED 4000923c: 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 ); 40009240: 40 00 23 f0 call 40012200 <__errno> 40009244: b0 10 3f ff mov -1, %i0 40009248: 82 10 20 04 mov 4, %g1 4000924c: c2 22 00 00 st %g1, [ %o0 ] 40009250: 81 c7 e0 08 ret 40009254: 81 e8 00 00 restore 40009494 : int sigwait( const sigset_t *set, int *sig ) { 40009494: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 40009498: 92 10 20 00 clr %o1 4000949c: 90 10 00 18 mov %i0, %o0 400094a0: 7f ff ff 89 call 400092c4 400094a4: 94 10 20 00 clr %o2 if ( status != -1 ) { 400094a8: 80 a2 3f ff cmp %o0, -1 400094ac: 02 80 00 07 be 400094c8 400094b0: 80 a6 60 00 cmp %i1, 0 if ( sig ) 400094b4: 02 80 00 03 be 400094c0 400094b8: b0 10 20 00 clr %i0 *sig = status; 400094bc: d0 26 40 00 st %o0, [ %i1 ] 400094c0: 81 c7 e0 08 ret 400094c4: 81 e8 00 00 restore return 0; } return errno; 400094c8: 40 00 23 4e call 40012200 <__errno> <== NOT EXECUTED 400094cc: 01 00 00 00 nop <== NOT EXECUTED 400094d0: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 400094d4: 81 c7 e0 08 ret <== NOT EXECUTED 400094d8: 81 e8 00 00 restore <== NOT EXECUTED 40008038 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 40008038: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 4000803c: 80 a6 a0 00 cmp %i2, 0 40008040: 02 80 00 54 be 40008190 40008044: 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 ) || 40008048: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 4000804c: 82 10 61 ff or %g1, 0x1ff, %g1 40008050: 80 a0 80 01 cmp %g2, %g1 40008054: 18 80 00 4f bgu 40008190 40008058: 01 00 00 00 nop 4000805c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40008060: 80 a0 80 01 cmp %g2, %g1 40008064: 18 80 00 4b bgu 40008190 40008068: 80 a0 a0 00 cmp %g2, 0 4000806c: 06 80 00 49 bl 40008190 40008070: 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 ) { 40008074: 02 80 00 04 be 40008084 40008078: 80 a6 60 00 cmp %i1, 0 4000807c: 12 80 00 45 bne 40008190 40008080: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 40008084: c2 06 80 00 ld [ %i2 ], %g1 40008088: c4 06 a0 04 ld [ %i2 + 4 ], %g2 4000808c: c6 06 a0 08 ld [ %i2 + 8 ], %g3 40008090: c8 06 a0 0c ld [ %i2 + 0xc ], %g4 40008094: c2 27 bf e4 st %g1, [ %fp + -28 ] 40008098: c4 27 bf e8 st %g2, [ %fp + -24 ] 4000809c: c6 27 bf ec st %g3, [ %fp + -20 ] /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 400080a0: 80 a6 60 04 cmp %i1, 4 400080a4: 02 80 00 5c be 40008214 400080a8: c8 27 bf f0 st %g4, [ %fp + -16 ] 400080ac: 92 10 00 18 mov %i0, %o1 400080b0: 11 10 00 7e sethi %hi(0x4001f800), %o0 400080b4: 94 07 bf f4 add %fp, -12, %o2 400080b8: 40 00 09 1f call 4000a534 <_Objects_Get> 400080bc: 90 12 23 70 or %o0, 0x370, %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 ) { 400080c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400080c4: 80 a0 60 00 cmp %g1, 0 400080c8: 12 80 00 67 bne 40008264 400080cc: 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 ) { 400080d0: c2 07 bf ec ld [ %fp + -20 ], %g1 400080d4: 80 a0 60 00 cmp %g1, 0 400080d8: 12 80 00 05 bne 400080ec 400080dc: c2 07 bf f0 ld [ %fp + -16 ], %g1 400080e0: 80 a0 60 00 cmp %g1, 0 400080e4: 02 80 00 31 be 400081a8 400080e8: 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 ); 400080ec: 40 00 0f 4b call 4000be18 <_Timespec_To_ticks> 400080f0: 90 10 00 1a mov %i2, %o0 400080f4: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 400080f8: 40 00 0f 48 call 4000be18 <_Timespec_To_ticks> 400080fc: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 40008100: 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 ); 40008104: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 40008108: 17 10 00 20 sethi %hi(0x40008000), %o3 4000810c: 90 06 60 10 add %i1, 0x10, %o0 40008110: 96 12 e2 7c or %o3, 0x27c, %o3 40008114: 40 00 1b 93 call 4000ef60 <_POSIX_Timer_Insert_helper> 40008118: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 4000811c: 80 8a 20 ff btst 0xff, %o0 40008120: 02 80 00 18 be 40008180 40008124: 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 ) 40008128: 02 80 00 0b be 40008154 4000812c: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 40008130: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 40008134: c2 26 c0 00 st %g1, [ %i3 ] 40008138: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 4000813c: c4 26 e0 04 st %g2, [ %i3 + 4 ] 40008140: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 40008144: c2 26 e0 08 st %g1, [ %i3 + 8 ] 40008148: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 4000814c: c4 26 e0 0c st %g2, [ %i3 + 0xc ] ptimer->timer_data = normalize; 40008150: 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 ); 40008154: 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; 40008158: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 4000815c: c4 07 bf e8 ld [ %fp + -24 ], %g2 40008160: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 40008164: c2 07 bf ec ld [ %fp + -20 ], %g1 40008168: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 4000816c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 40008170: 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; 40008174: 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 ); 40008178: 40 00 06 80 call 40009b78 <_TOD_Get> 4000817c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 40008180: 40 00 0b 26 call 4000ae18 <_Thread_Enable_dispatch> 40008184: b0 10 20 00 clr %i0 40008188: 81 c7 e0 08 ret 4000818c: 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 ); 40008190: 40 00 23 4f call 40010ecc <__errno> 40008194: b0 10 3f ff mov -1, %i0 40008198: 82 10 20 16 mov 0x16, %g1 4000819c: c2 22 00 00 st %g1, [ %o0 ] 400081a0: 81 c7 e0 08 ret 400081a4: 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 ); 400081a8: 40 00 10 6c call 4000c358 <_Watchdog_Remove> 400081ac: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 400081b0: 80 a6 e0 00 cmp %i3, 0 400081b4: 02 80 00 0b be 400081e0 400081b8: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 400081bc: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 <== NOT EXECUTED 400081c0: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 400081c4: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 <== NOT EXECUTED 400081c8: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 400081cc: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 <== NOT EXECUTED 400081d0: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 400081d4: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 <== NOT EXECUTED 400081d8: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 400081dc: 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(); 400081e0: 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; 400081e4: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 400081e8: c4 07 bf e8 ld [ %fp + -24 ], %g2 400081ec: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 400081f0: c2 07 bf ec ld [ %fp + -20 ], %g1 400081f4: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 400081f8: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 400081fc: 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; 40008200: 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(); 40008204: 40 00 0b 05 call 4000ae18 <_Thread_Enable_dispatch> 40008208: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000820c: 81 c7 e0 08 ret 40008210: 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 ) ) 40008214: b2 07 bf ec add %fp, -20, %i1 40008218: 21 10 00 7e sethi %hi(0x4001f800), %l0 4000821c: 92 10 00 19 mov %i1, %o1 40008220: 40 00 0e d6 call 4000bd78 <_Timespec_Greater_than> 40008224: 90 14 20 b0 or %l0, 0xb0, %o0 40008228: 80 8a 20 ff btst 0xff, %o0 4000822c: 12 bf ff d9 bne 40008190 40008230: 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 ); 40008234: 94 10 00 19 mov %i1, %o2 40008238: 40 00 0e e2 call 4000bdc0 <_Timespec_Subtract> 4000823c: 90 14 20 b0 or %l0, 0xb0, %o0 40008240: 92 10 00 18 mov %i0, %o1 40008244: 11 10 00 7e sethi %hi(0x4001f800), %o0 40008248: 94 07 bf f4 add %fp, -12, %o2 4000824c: 40 00 08 ba call 4000a534 <_Objects_Get> 40008250: 90 12 23 70 or %o0, 0x370, %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 ) { 40008254: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008258: 80 a0 60 00 cmp %g1, 0 4000825c: 02 bf ff 9d be 400080d0 40008260: b2 10 00 08 mov %o0, %i1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40008264: 40 00 23 1a call 40010ecc <__errno> <== NOT EXECUTED 40008268: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000826c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40008270: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008274: 81 c7 e0 08 ret <== NOT EXECUTED 40008278: 81 e8 00 00 restore <== NOT EXECUTED 40006560 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 40006560: 9d e3 bf 90 save %sp, -112, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 40006564: 03 10 00 5c sethi %hi(0x40017000), %g1 40006568: a2 10 62 3c or %g1, 0x23c, %l1 ! 4001723c <_POSIX_signals_Ualarm_timer> 4000656c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40006570: 80 a0 a0 00 cmp %g2, 0 40006574: 02 80 00 3c be 40006664 40006578: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 4000657c: 40 00 10 9d call 4000a7f0 <_Watchdog_Remove> 40006580: 90 10 00 11 mov %l1, %o0 40006584: 90 02 3f fe add %o0, -2, %o0 40006588: 80 a2 20 01 cmp %o0, 1 4000658c: 08 80 00 07 bleu 400065a8 40006590: 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 ) { 40006594: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40006598: 12 80 00 1a bne 40006600 <== NOT EXECUTED 4000659c: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 400065a0: 81 c7 e0 08 ret 400065a4: 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); 400065a8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400065ac: 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); 400065b0: d0 04 60 14 ld [ %l1 + 0x14 ], %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400065b4: 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); 400065b8: 90 02 00 01 add %o0, %g1, %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400065bc: 40 00 0e f1 call 4000a180 <_Timespec_From_ticks> 400065c0: 90 22 00 02 sub %o0, %g2, %o0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400065c4: c4 07 bf f0 ld [ %fp + -16 ], %g2 remaining += tp.tv_nsec / 1000; 400065c8: 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; 400065cc: 87 28 a0 03 sll %g2, 3, %g3 400065d0: 83 28 a0 08 sll %g2, 8, %g1 400065d4: 82 20 40 03 sub %g1, %g3, %g1 remaining += tp.tv_nsec / 1000; 400065d8: 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; 400065dc: a1 28 60 06 sll %g1, 6, %l0 400065e0: a0 24 00 01 sub %l0, %g1, %l0 remaining += tp.tv_nsec / 1000; 400065e4: 40 00 34 a2 call 4001386c <.div> 400065e8: 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; 400065ec: 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 ) { 400065f0: 80 a4 a0 00 cmp %l2, 0 400065f4: 02 bf ff eb be 400065a0 400065f8: b0 02 00 10 add %o0, %l0, %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 400065fc: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 40006600: 90 10 00 12 mov %l2, %o0 40006604: 40 00 34 98 call 40013864 <.udiv> 40006608: 92 14 22 40 or %l0, 0x240, %o1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000660c: 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; 40006610: d0 27 bf f0 st %o0, [ %fp + -16 ] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 40006614: 40 00 35 40 call 40013b14 <.urem> 40006618: 90 10 00 12 mov %l2, %o0 4000661c: 85 2a 20 02 sll %o0, 2, %g2 40006620: 83 2a 20 07 sll %o0, 7, %g1 40006624: 82 20 40 02 sub %g1, %g2, %g1 40006628: 82 00 40 08 add %g1, %o0, %g1 4000662c: 83 28 60 03 sll %g1, 3, %g1 ticks = _Timespec_To_ticks( &tp ); 40006630: 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; 40006634: c2 27 bf f4 st %g1, [ %fp + -12 ] ticks = _Timespec_To_ticks( &tp ); 40006638: 40 00 0e fd call 4000a22c <_Timespec_To_ticks> 4000663c: 90 10 00 10 mov %l0, %o0 if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 40006640: 40 00 0e fb call 4000a22c <_Timespec_To_ticks> 40006644: 90 10 00 10 mov %l0, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006648: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000664c: d0 24 60 0c st %o0, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006650: 11 10 00 5d sethi %hi(0x40017400), %o0 40006654: 40 00 0f fc call 4000a644 <_Watchdog_Insert> 40006658: 90 12 20 80 or %o0, 0x80, %o0 ! 40017480 <_Watchdog_Ticks_chain> } return remaining; } 4000665c: 81 c7 e0 08 ret 40006660: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006664: 03 10 00 19 sethi %hi(0x40006400), %g1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40006668: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; 4000666c: 82 10 62 90 or %g1, 0x290, %g1 the_watchdog->id = id; 40006670: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 40006674: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006678: 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 ) { 4000667c: 80 a4 a0 00 cmp %l2, 0 40006680: 02 bf ff c8 be 400065a0 40006684: b0 10 20 00 clr %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 40006688: 10 bf ff de b 40006600 4000668c: 21 00 03 d0 sethi %hi(0xf4000), %l0