=============================================================================== ffc09a98 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09a98: 94 21 ff f0 stwu r1,-16(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09a9c: 3d 20 00 00 lis r9,0 * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09aa0: 7c 08 02 a6 mflr r0 ffc09aa4: 93 c1 00 08 stw r30,8(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09aa8: 3b c9 2d a0 addi r30,r9,11680 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09aac: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09ab0: 93 e1 00 0c stw r31,12(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09ab4: 83 e9 2d a0 lwz r31,11680(r9) * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09ab8: 90 01 00 14 stw r0,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09abc: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09ac0: 41 9e 00 1c beq- cr7,ffc09adc <_API_extensions_Run_postdriver+0x44><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); ffc09ac4: 80 1f 00 08 lwz r0,8(r31) ffc09ac8: 7c 09 03 a6 mtctr r0 ffc09acc: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc09ad0: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09ad4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09ad8: 40 9e ff ec bne+ cr7,ffc09ac4 <_API_extensions_Run_postdriver+0x2c> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc09adc: 80 01 00 14 lwz r0,20(r1) ffc09ae0: 83 c1 00 08 lwz r30,8(r1) ffc09ae4: 7c 08 03 a6 mtlr r0 ffc09ae8: 83 e1 00 0c lwz r31,12(r1) ffc09aec: 38 21 00 10 addi r1,r1,16 ffc09af0: 4e 80 00 20 blr =============================================================================== ffc09af4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09af4: 94 21 ff e8 stwu r1,-24(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09af8: 3d 20 00 00 lis r9,0 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09afc: 7c 08 02 a6 mflr r0 ffc09b00: 93 c1 00 10 stw r30,16(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09b04: 3b c9 2d a0 addi r30,r9,11680 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09b08: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09b0c: 93 e1 00 14 stw r31,20(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09b10: 83 e9 2d a0 lwz r31,11680(r9) * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09b14: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09b18: 7f 9f f0 00 cmpw cr7,r31,r30 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09b1c: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09b20: 41 9e 00 28 beq- cr7,ffc09b48 <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN ffc09b24: 3f a0 00 00 lis r29,0 ffc09b28: 3b bd 30 e4 addi r29,r29,12516 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); ffc09b2c: 80 1f 00 0c lwz r0,12(r31) ffc09b30: 80 7d 00 0c lwz r3,12(r29) ffc09b34: 7c 09 03 a6 mtctr r0 ffc09b38: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc09b3c: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09b40: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09b44: 40 9e ff e8 bne+ cr7,ffc09b2c <_API_extensions_Run_postswitch+0x38> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09b48: 80 01 00 1c lwz r0,28(r1) ffc09b4c: 83 a1 00 0c lwz r29,12(r1) ffc09b50: 7c 08 03 a6 mtlr r0 ffc09b54: 83 c1 00 10 lwz r30,16(r1) ffc09b58: 83 e1 00 14 lwz r31,20(r1) ffc09b5c: 38 21 00 18 addi r1,r1,24 ffc09b60: 4e 80 00 20 blr =============================================================================== ffc0ce04 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0ce04: 94 21 ff f0 stwu r1,-16(r1) ffc0ce08: 7c 08 02 a6 mflr r0 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0ce0c: 3d 20 00 00 lis r9,0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0ce10: 90 01 00 14 stw r0,20(r1) ffc0ce14: 93 e1 00 0c stw r31,12(r1) ffc0ce18: 7c 7f 1b 78 mr r31,r3 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0ce1c: 81 29 30 f0 lwz r9,12528(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ce20: 7d 60 00 a6 mfmsr r11 ffc0ce24: 7c 10 42 a6 mfsprg r0,0 ffc0ce28: 7d 60 00 78 andc r0,r11,r0 ffc0ce2c: 7c 00 01 24 mtmsr r0 * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ ffc0ce30: 80 03 00 44 lwz r0,68(r3) ffc0ce34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ce38: 41 9e 00 cc beq- cr7,ffc0cf04 <_CORE_RWLock_Release+0x100> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { ffc0ce3c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ce40: 41 9e 00 94 beq- cr7,ffc0ced4 <_CORE_RWLock_Release+0xd0> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0ce44: 38 00 00 00 li r0,0 ffc0ce48: 90 09 00 34 stw r0,52(r9) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; ffc0ce4c: 90 1f 00 44 stw r0,68(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ce50: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); ffc0ce54: 7f e3 fb 78 mr r3,r31 ffc0ce58: 48 00 22 59 bl ffc0f0b0 <_Thread_queue_Dequeue> if ( next ) { ffc0ce5c: 2c 03 00 00 cmpwi r3,0 ffc0ce60: 41 82 00 5c beq- ffc0cebc <_CORE_RWLock_Release+0xb8> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { ffc0ce64: 80 03 00 30 lwz r0,48(r3) ffc0ce68: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ce6c: 41 9e 00 bc beq- cr7,ffc0cf28 <_CORE_RWLock_Release+0x124> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; ffc0ce70: 81 3f 00 48 lwz r9,72(r31) ffc0ce74: 38 09 00 01 addi r0,r9,1 ffc0ce78: 90 1f 00 48 stw r0,72(r31) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; ffc0ce7c: 38 00 00 01 li r0,1 ffc0ce80: 90 1f 00 44 stw r0,68(r31) ffc0ce84: 48 00 00 20 b ffc0cea4 <_CORE_RWLock_Release+0xa0> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || ffc0ce88: 80 09 00 30 lwz r0,48(r9) ffc0ce8c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ce90: 41 9e 00 2c beq- cr7,ffc0cebc <_CORE_RWLock_Release+0xb8><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; ffc0ce94: 81 3f 00 48 lwz r9,72(r31) ffc0ce98: 38 09 00 01 addi r0,r9,1 ffc0ce9c: 90 1f 00 48 stw r0,72(r31) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0cea0: 48 00 26 cd bl ffc0f56c <_Thread_queue_Extract> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); ffc0cea4: 7f e3 fb 78 mr r3,r31 ffc0cea8: 48 00 28 61 bl ffc0f708 <_Thread_queue_First> if ( !next || ffc0ceac: 7c 69 1b 79 mr. r9,r3 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0ceb0: 7f e3 fb 78 mr r3,r31 ffc0ceb4: 7d 24 4b 78 mr r4,r9 /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || ffc0ceb8: 40 82 ff d0 bne+ ffc0ce88 <_CORE_RWLock_Release+0x84> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0cebc: 80 01 00 14 lwz r0,20(r1) ffc0cec0: 38 60 00 00 li r3,0 ffc0cec4: 83 e1 00 0c lwz r31,12(r1) ffc0cec8: 38 21 00 10 addi r1,r1,16 ffc0cecc: 7c 08 03 a6 mtlr r0 ffc0ced0: 4e 80 00 20 blr _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; ffc0ced4: 81 43 00 48 lwz r10,72(r3) ffc0ced8: 38 0a ff ff addi r0,r10,-1 if ( the_rwlock->number_of_readers != 0 ) { ffc0cedc: 2f 80 00 00 cmpwi cr7,r0,0 _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; ffc0cee0: 90 03 00 48 stw r0,72(r3) if ( the_rwlock->number_of_readers != 0 ) { ffc0cee4: 41 9e ff 60 beq+ cr7,ffc0ce44 <_CORE_RWLock_Release+0x40> ffc0cee8: 7d 60 01 24 mtmsr r11 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0ceec: 80 01 00 14 lwz r0,20(r1) ffc0cef0: 38 60 00 00 li r3,0 ffc0cef4: 83 e1 00 0c lwz r31,12(r1) ffc0cef8: 38 21 00 10 addi r1,r1,16 ffc0cefc: 7c 08 03 a6 mtlr r0 ffc0cf00: 4e 80 00 20 blr ffc0cf04: 7d 60 01 24 mtmsr r11 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0cf08: 38 00 00 02 li r0,2 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0cf0c: 83 e1 00 0c lwz r31,12(r1) */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0cf10: 90 09 00 34 stw r0,52(r9) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0cf14: 38 60 00 00 li r3,0 ffc0cf18: 80 01 00 14 lwz r0,20(r1) ffc0cf1c: 38 21 00 10 addi r1,r1,16 ffc0cf20: 7c 08 03 a6 mtlr r0 ffc0cf24: 4e 80 00 20 blr 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; ffc0cf28: 38 00 00 02 li r0,2 ffc0cf2c: 90 1f 00 44 stw r0,68(r31) return CORE_RWLOCK_SUCCESSFUL; ffc0cf30: 4b ff ff 8c b ffc0cebc <_CORE_RWLock_Release+0xb8> =============================================================================== ffc0cf34 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0cf34: 94 21 ff e8 stwu r1,-24(r1) ffc0cf38: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cf3c: 38 81 00 08 addi r4,r1,8 void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0cf40: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cf44: 48 00 1c f9 bl ffc0ec3c <_Thread_Get> switch ( location ) { ffc0cf48: 80 01 00 08 lwz r0,8(r1) ffc0cf4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf50: 40 9e 00 18 bne- cr7,ffc0cf68 <_CORE_RWLock_Timeout+0x34><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0cf54: 48 00 29 09 bl ffc0f85c <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0cf58: 3d 20 00 00 lis r9,0 ffc0cf5c: 81 69 27 b8 lwz r11,10168(r9) ffc0cf60: 38 0b ff ff addi r0,r11,-1 ffc0cf64: 90 09 27 b8 stw r0,10168(r9) _Thread_Unnest_dispatch(); break; } } ffc0cf68: 80 01 00 1c lwz r0,28(r1) ffc0cf6c: 38 21 00 18 addi r1,r1,24 ffc0cf70: 7c 08 03 a6 mtlr r0 ffc0cf74: 4e 80 00 20 blr =============================================================================== ffc1c9f8 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1c9f8: 94 21 ff e0 stwu r1,-32(r1) ffc1c9fc: 7c 08 02 a6 mflr r0 ffc1ca00: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1ca04: 80 03 00 4c lwz r0,76(r3) Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1ca08: 93 41 00 08 stw r26,8(r1) ffc1ca0c: 7d 1a 43 78 mr r26,r8 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1ca10: 7f 80 28 40 cmplw cr7,r0,r5 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1ca14: 93 a1 00 14 stw r29,20(r1) ffc1ca18: 7c 9d 23 78 mr r29,r4 ffc1ca1c: 93 c1 00 18 stw r30,24(r1) ffc1ca20: 7c 7e 1b 78 mr r30,r3 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; ffc1ca24: 38 60 00 01 li r3,1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1ca28: 93 e1 00 1c stw r31,28(r1) ffc1ca2c: 7c bf 2b 78 mr r31,r5 ffc1ca30: 93 61 00 0c stw r27,12(r1) ffc1ca34: 93 81 00 10 stw r28,16(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1ca38: 41 9c 00 20 blt- cr7,ffc1ca58 <_CORE_message_queue_Broadcast+0x60><== NEVER TAKEN * 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 ) { ffc1ca3c: 80 1e 00 48 lwz r0,72(r30) ffc1ca40: 3b 60 00 00 li r27,0 ffc1ca44: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ca48: 41 be 00 4c beq+ cr7,ffc1ca94 <_CORE_message_queue_Broadcast+0x9c> *count = 0; ffc1ca4c: 38 00 00 00 li r0,0 ffc1ca50: 90 08 00 00 stw r0,0(r8) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc1ca54: 38 60 00 00 li r3,0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1ca58: 80 01 00 24 lwz r0,36(r1) ffc1ca5c: 83 41 00 08 lwz r26,8(r1) ffc1ca60: 7c 08 03 a6 mtlr r0 ffc1ca64: 83 61 00 0c lwz r27,12(r1) ffc1ca68: 83 81 00 10 lwz r28,16(r1) ffc1ca6c: 83 a1 00 14 lwz r29,20(r1) ffc1ca70: 83 c1 00 18 lwz r30,24(r1) ffc1ca74: 83 e1 00 1c lwz r31,28(r1) ffc1ca78: 38 21 00 20 addi r1,r1,32 ffc1ca7c: 4e 80 00 20 blr const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc1ca80: 80 7c 00 2c lwz r3,44(r28) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; ffc1ca84: 3b 7b 00 01 addi r27,r27,1 ffc1ca88: 48 00 b8 21 bl ffc282a8 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc1ca8c: 81 3c 00 28 lwz r9,40(r28) ffc1ca90: 93 e9 00 00 stw r31,0(r9) /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = ffc1ca94: 7f c3 f3 78 mr r3,r30 ffc1ca98: 48 00 36 d9 bl ffc20170 <_Thread_queue_Dequeue> ffc1ca9c: 7f a4 eb 78 mr r4,r29 ffc1caa0: 7c 7c 1b 79 mr. r28,r3 ffc1caa4: 7f e5 fb 78 mr r5,r31 ffc1caa8: 40 82 ff d8 bne+ ffc1ca80 <_CORE_message_queue_Broadcast+0x88> #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1caac: 80 01 00 24 lwz r0,36(r1) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; ffc1cab0: 93 7a 00 00 stw r27,0(r26) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1cab4: 7c 08 03 a6 mtlr r0 ffc1cab8: 83 41 00 08 lwz r26,8(r1) ffc1cabc: 83 61 00 0c lwz r27,12(r1) ffc1cac0: 83 81 00 10 lwz r28,16(r1) ffc1cac4: 83 a1 00 14 lwz r29,20(r1) ffc1cac8: 83 c1 00 18 lwz r30,24(r1) ffc1cacc: 83 e1 00 1c lwz r31,28(r1) ffc1cad0: 38 21 00 20 addi r1,r1,32 ffc1cad4: 4e 80 00 20 blr =============================================================================== ffc1538c <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc1538c: 94 21 ff e0 stwu r1,-32(r1) ffc15390: 7c 08 02 a6 mflr r0 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc15394: 7c c9 33 78 mr r9,r6 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc15398: 90 01 00 24 stw r0,36(r1) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc1539c: 70 c0 00 03 andi. r0,r6,3 { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc153a0: 38 00 00 00 li r0,0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc153a4: 93 a1 00 14 stw r29,20(r1) ffc153a8: 7c 9d 23 78 mr r29,r4 ffc153ac: 93 e1 00 1c stw r31,28(r1) ffc153b0: 7c 7f 1b 78 mr r31,r3 ffc153b4: 93 81 00 10 stw r28,16(r1) ffc153b8: 93 c1 00 18 stw r30,24(r1) size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc153bc: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc153c0: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc153c4: 90 c3 00 4c stw r6,76(r3) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; ffc153c8: 90 03 00 60 stw r0,96(r3) the_message_queue->notify_argument = the_argument; ffc153cc: 90 03 00 64 stw r0,100(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc153d0: 41 82 00 3c beq- ffc1540c <_CORE_message_queue_Initialize+0x80> allocated_message_size += sizeof(uint32_t); ffc153d4: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc153d8: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc153dc: 7f 86 48 40 cmplw cr7,r6,r9 return false; ffc153e0: 3b c0 00 00 li r30,0 if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) ffc153e4: 40 9d 00 28 ble- cr7,ffc1540c <_CORE_message_queue_Initialize+0x80><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc153e8: 80 01 00 24 lwz r0,36(r1) ffc153ec: 7f c3 f3 78 mr r3,r30 ffc153f0: 83 81 00 10 lwz r28,16(r1) ffc153f4: 7c 08 03 a6 mtlr r0 ffc153f8: 83 a1 00 14 lwz r29,20(r1) ffc153fc: 83 c1 00 18 lwz r30,24(r1) ffc15400: 83 e1 00 1c lwz r31,28(r1) ffc15404: 38 21 00 20 addi r1,r1,32 ffc15408: 4e 80 00 20 blr /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); ffc1540c: 3b 89 00 14 addi r28,r9,20 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * ffc15410: 7c 7c 29 d6 mullw r3,r28,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; ffc15414: 3b c0 00 00 li r30,0 * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc15418: 7f 83 48 40 cmplw cr7,r3,r9 ffc1541c: 41 9c ff cc blt+ cr7,ffc153e8 <_CORE_message_queue_Initialize+0x5c><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc15420: 90 a1 00 08 stw r5,8(r1) ffc15424: 48 00 3e 6d bl ffc19290 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc15428: 2f 83 00 00 cmpwi cr7,r3,0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc1542c: 7c 64 1b 78 mr r4,r3 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc15430: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc15434: 80 a1 00 08 lwz r5,8(r1) ffc15438: 41 be ff b0 beq- cr7,ffc153e8 <_CORE_message_queue_Initialize+0x5c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc1543c: 38 7f 00 68 addi r3,r31,104 ffc15440: 7f 86 e3 78 mr r6,r28 ffc15444: 48 00 6d 5d bl ffc1c1a0 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc15448: 38 1f 00 50 addi r0,r31,80 Chain_Node *tail = _Chain_Tail( the_chain ); ffc1544c: 39 3f 00 54 addi r9,r31,84 head->next = tail; head->previous = NULL; ffc15450: 93 df 00 54 stw r30,84(r31) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc15454: 7f e3 fb 78 mr r3,r31 tail->previous = head; ffc15458: 90 1f 00 58 stw r0,88(r31) ffc1545c: 38 a0 00 80 li r5,128 ffc15460: 38 c0 00 06 li r6,6 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc15464: 91 3f 00 50 stw r9,80(r31) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc15468: 3b c0 00 01 li r30,1 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc1546c: 80 9d 00 00 lwz r4,0(r29) ffc15470: 68 84 00 01 xori r4,r4,1 ffc15474: 7c 84 00 34 cntlzw r4,r4 ffc15478: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc1547c: 48 00 2e bd bl ffc18338 <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc15480: 80 01 00 24 lwz r0,36(r1) ffc15484: 7f c3 f3 78 mr r3,r30 ffc15488: 83 81 00 10 lwz r28,16(r1) ffc1548c: 7c 08 03 a6 mtlr r0 ffc15490: 83 a1 00 14 lwz r29,20(r1) ffc15494: 83 c1 00 18 lwz r30,24(r1) ffc15498: 83 e1 00 1c lwz r31,28(r1) ffc1549c: 38 21 00 20 addi r1,r1,32 ffc154a0: 4e 80 00 20 blr =============================================================================== ffc09f14 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09f14: 94 21 ff d8 stwu r1,-40(r1) ffc09f18: 7c 08 02 a6 mflr r0 ffc09f1c: 93 c1 00 20 stw r30,32(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09f20: 3f c0 00 00 lis r30,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09f24: 90 01 00 2c stw r0,44(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09f28: 80 1e 27 8c lwz r0,10124(r30) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09f2c: 93 61 00 14 stw r27,20(r1) ffc09f30: 7c db 33 78 mr r27,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09f34: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09f38: 93 81 00 18 stw r28,24(r1) ffc09f3c: 7c bc 2b 78 mr r28,r5 ffc09f40: 93 a1 00 1c stw r29,28(r1) ffc09f44: 7c 9d 23 78 mr r29,r4 ffc09f48: 93 e1 00 24 stw r31,36(r1) ffc09f4c: 7c 7f 1b 78 mr r31,r3 ffc09f50: 90 e1 00 08 stw r7,8(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09f54: 41 9e 00 0c beq- cr7,ffc09f60 <_CORE_mutex_Seize+0x4c> ffc09f58: 2f 85 00 00 cmpwi cr7,r5,0 ffc09f5c: 40 9e 00 5c bne- cr7,ffc09fb8 <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN ffc09f60: 7f e3 fb 78 mr r3,r31 ffc09f64: 38 81 00 08 addi r4,r1,8 ffc09f68: 48 00 66 fd bl ffc10664 <_CORE_mutex_Seize_interrupt_trylock> ffc09f6c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09f70: 41 9e 00 24 beq- cr7,ffc09f94 <_CORE_mutex_Seize+0x80> ffc09f74: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09f78: 40 9e 00 60 bne- cr7,ffc09fd8 <_CORE_mutex_Seize+0xc4> ffc09f7c: 80 01 00 08 lwz r0,8(r1) ffc09f80: 7c 00 01 24 mtmsr r0 ffc09f84: 3d 20 00 00 lis r9,0 ffc09f88: 81 29 30 f0 lwz r9,12528(r9) ffc09f8c: 38 00 00 01 li r0,1 ffc09f90: 90 09 00 34 stw r0,52(r9) } ffc09f94: 80 01 00 2c lwz r0,44(r1) ffc09f98: 83 61 00 14 lwz r27,20(r1) ffc09f9c: 7c 08 03 a6 mtlr r0 ffc09fa0: 83 81 00 18 lwz r28,24(r1) ffc09fa4: 83 a1 00 1c lwz r29,28(r1) ffc09fa8: 83 c1 00 20 lwz r30,32(r1) ffc09fac: 83 e1 00 24 lwz r31,36(r1) ffc09fb0: 38 21 00 28 addi r1,r1,40 ffc09fb4: 4e 80 00 20 blr bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09fb8: 3d 20 00 00 lis r9,0 ffc09fbc: 80 09 27 d0 lwz r0,10192(r9) ffc09fc0: 2b 80 00 01 cmplwi cr7,r0,1 ffc09fc4: 40 9d ff 9c ble+ cr7,ffc09f60 <_CORE_mutex_Seize+0x4c> ffc09fc8: 38 60 00 00 li r3,0 ffc09fcc: 38 80 00 00 li r4,0 ffc09fd0: 38 a0 00 12 li r5,18 ffc09fd4: 48 00 08 a1 bl ffc0a874 <_Internal_error_Occurred> ffc09fd8: 3d 20 00 00 lis r9,0 ffc09fdc: 81 7e 27 8c lwz r11,10124(r30) ffc09fe0: 81 29 30 f0 lwz r9,12528(r9) 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; ffc09fe4: 38 00 00 01 li r0,1 ffc09fe8: 90 1f 00 30 stw r0,48(r31) ffc09fec: 38 0b 00 01 addi r0,r11,1 ffc09ff0: 93 e9 00 44 stw r31,68(r9) ffc09ff4: 93 a9 00 20 stw r29,32(r9) ffc09ff8: 90 1e 27 8c stw r0,10124(r30) ffc09ffc: 80 01 00 08 lwz r0,8(r1) ffc0a000: 7c 00 01 24 mtmsr r0 ffc0a004: 7f e3 fb 78 mr r3,r31 ffc0a008: 7f 64 db 78 mr r4,r27 ffc0a00c: 4b ff fe 45 bl ffc09e50 <_CORE_mutex_Seize_interrupt_blocking> } ffc0a010: 80 01 00 2c lwz r0,44(r1) ffc0a014: 83 61 00 14 lwz r27,20(r1) ffc0a018: 7c 08 03 a6 mtlr r0 ffc0a01c: 83 81 00 18 lwz r28,24(r1) ffc0a020: 83 a1 00 1c lwz r29,28(r1) ffc0a024: 83 c1 00 20 lwz r30,32(r1) ffc0a028: 83 e1 00 24 lwz r31,36(r1) ffc0a02c: 38 21 00 28 addi r1,r1,40 ffc0a030: 4e 80 00 20 blr =============================================================================== ffc0a1f4 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { ffc0a1f4: 94 21 ff f0 stwu r1,-16(r1) ffc0a1f8: 7c 08 02 a6 mflr r0 ffc0a1fc: 93 e1 00 0c stw r31,12(r1) ffc0a200: 7c 7f 1b 78 mr r31,r3 ffc0a204: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a208: 48 00 20 79 bl ffc0c280 <_Thread_queue_Dequeue> ffc0a20c: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a210: 38 60 00 00 li r3,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a214: 41 9e 00 18 beq- cr7,ffc0a22c <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a218: 80 01 00 14 lwz r0,20(r1) ffc0a21c: 83 e1 00 0c lwz r31,12(r1) ffc0a220: 38 21 00 10 addi r1,r1,16 ffc0a224: 7c 08 03 a6 mtlr r0 ffc0a228: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a22c: 7c 00 00 a6 mfmsr r0 ffc0a230: 7d 30 42 a6 mfsprg r9,0 ffc0a234: 7c 09 48 78 andc r9,r0,r9 ffc0a238: 7d 20 01 24 mtmsr r9 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0a23c: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0a240: 38 60 00 04 li r3,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0a244: 81 7f 00 40 lwz r11,64(r31) ffc0a248: 7f 89 58 40 cmplw cr7,r9,r11 ffc0a24c: 40 9c 00 10 bge- cr7,ffc0a25c <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0a250: 39 29 00 01 addi r9,r9,1 ffc0a254: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a258: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a25c: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a260: 80 01 00 14 lwz r0,20(r1) ffc0a264: 83 e1 00 0c lwz r31,12(r1) ffc0a268: 38 21 00 10 addi r1,r1,16 ffc0a26c: 7c 08 03 a6 mtlr r0 ffc0a270: 4e 80 00 20 blr =============================================================================== ffc1060c <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc1060c: 2c 05 00 00 cmpwi r5,0 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc10610: 38 00 00 00 li r0,0 size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc10614: 39 43 00 04 addi r10,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc10618: 90 03 00 04 stw r0,4(r3) ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc1061c: 7c 69 1b 78 mr r9,r3 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10620: 41 82 00 38 beq- ffc10658 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc10624: 39 05 ff ff addi r8,r5,-1 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc10628: 7c a9 03 a6 mtctr r5 Chain_Node *next = starting_address; ffc1062c: 7c 89 23 78 mr r9,r4 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc10630: 7c 6b 1b 78 mr r11,r3 ffc10634: 48 00 00 0c b ffc10640 <_Chain_Initialize+0x34> Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10638: 7d 2b 4b 78 mr r11,r9 current->next = next; next->previous = current; current = next; next = (Chain_Node *) ffc1063c: 7c 09 03 78 mr r9,r0 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; ffc10640: 91 2b 00 00 stw r9,0(r11) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc10644: 7c 09 32 14 add r0,r9,r6 head->previous = NULL; while ( count-- ) { current->next = next; next->previous = current; ffc10648: 91 69 00 04 stw r11,4(r9) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc1064c: 42 00 ff ec bdnz+ ffc10638 <_Chain_Initialize+0x2c> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc10650: 7c c6 41 d6 mullw r6,r6,r8 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10654: 7d 24 32 14 add r9,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc10658: 91 49 00 00 stw r10,0(r9) tail->previous = current; ffc1065c: 91 23 00 08 stw r9,8(r3) } ffc10660: 4e 80 00 20 blr =============================================================================== ffc0896c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc0896c: 94 21 ff f0 stwu r1,-16(r1) ffc08970: 7c 08 02 a6 mflr r0 ffc08974: 90 01 00 14 stw r0,20(r1) ffc08978: 93 e1 00 0c stw r31,12(r1) ffc0897c: 7c 7f 1b 78 mr r31,r3 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 ]; ffc08980: 81 63 01 30 lwz r11,304(r3) option_set = (rtems_option) the_thread->Wait.option; ffc08984: 80 c3 00 30 lwz r6,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08988: 7d 40 00 a6 mfmsr r10 ffc0898c: 7c 10 42 a6 mfsprg r0,0 ffc08990: 7d 40 00 78 andc r0,r10,r0 ffc08994: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc08998: 81 2b 00 00 lwz r9,0(r11) event_condition = (rtems_event_set) the_thread->Wait.count; ffc0899c: 80 03 00 24 lwz r0,36(r3) seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { ffc089a0: 7c 08 48 39 and. r8,r0,r9 ffc089a4: 41 82 00 b0 beq- ffc08a54 <_Event_Surrender+0xe8> /* * 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() && ffc089a8: 3c e0 00 00 lis r7,0 ffc089ac: 38 e7 30 e4 addi r7,r7,12516 ffc089b0: 80 a7 00 08 lwz r5,8(r7) ffc089b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc089b8: 41 9e 00 10 beq- cr7,ffc089c8 <_Event_Surrender+0x5c> ffc089bc: 80 e7 00 0c lwz r7,12(r7) ffc089c0: 7f 83 38 00 cmpw cr7,r3,r7 ffc089c4: 41 9e 00 d0 beq- cr7,ffc08a94 <_Event_Surrender+0x128> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc089c8: 80 ff 00 10 lwz r7,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc089cc: 70 e5 01 00 andi. r5,r7,256 ffc089d0: 41 82 00 6c beq- ffc08a3c <_Event_Surrender+0xd0> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc089d4: 7f 80 40 00 cmpw cr7,r0,r8 ffc089d8: 41 9e 00 0c beq- cr7,ffc089e4 <_Event_Surrender+0x78> ffc089dc: 70 c0 00 02 andi. r0,r6,2 ffc089e0: 41 82 00 5c beq- ffc08a3c <_Event_Surrender+0xd0> <== NEVER TAKEN 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; ffc089e4: 80 ff 00 28 lwz r7,40(r31) RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); ffc089e8: 7d 29 40 78 andc r9,r9,r8 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; ffc089ec: 38 00 00 00 li r0,0 /* * 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 ); ffc089f0: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc089f4: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc089f8: 91 07 00 00 stw r8,0(r7) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc089fc: 7c 00 00 a6 mfmsr r0 ffc08a00: 7d 40 01 24 mtmsr r10 ffc08a04: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc08a08: 80 1f 00 50 lwz r0,80(r31) ffc08a0c: 2f 80 00 02 cmpwi cr7,r0,2 ffc08a10: 41 9e 00 5c beq- cr7,ffc08a6c <_Event_Surrender+0x100> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08a14: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08a18: 3c 80 10 03 lis r4,4099 ffc08a1c: 7f e3 fb 78 mr r3,r31 ffc08a20: 60 84 ff f8 ori r4,r4,65528 ffc08a24: 48 00 2f 11 bl ffc0b934 <_Thread_Clear_state> } return; } } _ISR_Enable( level ); } ffc08a28: 80 01 00 14 lwz r0,20(r1) ffc08a2c: 83 e1 00 0c lwz r31,12(r1) ffc08a30: 38 21 00 10 addi r1,r1,16 ffc08a34: 7c 08 03 a6 mtlr r0 ffc08a38: 4e 80 00 20 blr ffc08a3c: 7d 40 01 24 mtmsr r10 ffc08a40: 80 01 00 14 lwz r0,20(r1) ffc08a44: 83 e1 00 0c lwz r31,12(r1) ffc08a48: 38 21 00 10 addi r1,r1,16 ffc08a4c: 7c 08 03 a6 mtlr r0 ffc08a50: 4e 80 00 20 blr ffc08a54: 7d 40 01 24 mtmsr r10 ffc08a58: 80 01 00 14 lwz r0,20(r1) ffc08a5c: 83 e1 00 0c lwz r31,12(r1) ffc08a60: 38 21 00 10 addi r1,r1,16 ffc08a64: 7c 08 03 a6 mtlr r0 ffc08a68: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc08a6c: 38 00 00 03 li r0,3 ffc08a70: 90 1f 00 50 stw r0,80(r31) ffc08a74: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc08a78: 38 7f 00 48 addi r3,r31,72 ffc08a7c: 48 00 4a 79 bl ffc0d4f4 <_Watchdog_Remove> ffc08a80: 3c 80 10 03 lis r4,4099 ffc08a84: 7f e3 fb 78 mr r3,r31 ffc08a88: 60 84 ff f8 ori r4,r4,65528 ffc08a8c: 48 00 2e a9 bl ffc0b934 <_Thread_Clear_state> ffc08a90: 4b ff ff b0 b ffc08a40 <_Event_Surrender+0xd4> * 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() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc08a94: 3c e0 00 00 lis r7,0 ffc08a98: 80 a7 27 e0 lwz r5,10208(r7) /* * 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() && _Thread_Is_executing( the_thread ) && ffc08a9c: 2f 85 00 02 cmpwi cr7,r5,2 ffc08aa0: 41 9e 00 10 beq- cr7,ffc08ab0 <_Event_Surrender+0x144> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc08aa4: 80 a7 27 e0 lwz r5,10208(r7) * 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() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc08aa8: 2f 85 00 01 cmpwi cr7,r5,1 ffc08aac: 40 9e ff 1c bne+ cr7,ffc089c8 <_Event_Surrender+0x5c> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc08ab0: 7f 80 40 00 cmpw cr7,r0,r8 ffc08ab4: 41 9e 00 0c beq- cr7,ffc08ac0 <_Event_Surrender+0x154> ffc08ab8: 70 c0 00 02 andi. r0,r6,2 ffc08abc: 41 82 00 24 beq- ffc08ae0 <_Event_Surrender+0x174> <== NEVER TAKEN 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; ffc08ac0: 80 df 00 28 lwz r6,40(r31) _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; ffc08ac4: 38 00 00 00 li r0,0 ffc08ac8: 7d 29 40 78 andc r9,r9,r8 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc08acc: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08ad0: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08ad4: 38 00 00 03 li r0,3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08ad8: 91 06 00 00 stw r8,0(r6) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08adc: 90 07 27 e0 stw r0,10208(r7) ffc08ae0: 7d 40 01 24 mtmsr r10 ffc08ae4: 4b ff ff 5c b ffc08a40 <_Event_Surrender+0xd4> =============================================================================== ffc08ae8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08ae8: 94 21 ff e8 stwu r1,-24(r1) ffc08aec: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08af0: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08af4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08af8: 48 00 33 15 bl ffc0be0c <_Thread_Get> switch ( location ) { ffc08afc: 80 01 00 08 lwz r0,8(r1) ffc08b00: 2f 80 00 00 cmpwi cr7,r0,0 ffc08b04: 40 9e 00 50 bne- cr7,ffc08b54 <_Event_Timeout+0x6c> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08b08: 7d 20 00 a6 mfmsr r9 ffc08b0c: 7d 70 42 a6 mfsprg r11,0 ffc08b10: 7d 2b 58 78 andc r11,r9,r11 ffc08b14: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc08b18: 3d 60 00 00 lis r11,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc08b1c: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc08b20: 81 6b 30 f0 lwz r11,12528(r11) ffc08b24: 7f 83 58 00 cmpw cr7,r3,r11 ffc08b28: 41 9e 00 3c beq- cr7,ffc08b64 <_Event_Timeout+0x7c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc08b2c: 38 00 00 06 li r0,6 ffc08b30: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08b34: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08b38: 3c 80 10 03 lis r4,4099 ffc08b3c: 60 84 ff f8 ori r4,r4,65528 ffc08b40: 48 00 2d f5 bl ffc0b934 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc08b44: 3d 20 00 00 lis r9,0 ffc08b48: 81 69 27 8c lwz r11,10124(r9) ffc08b4c: 38 0b ff ff addi r0,r11,-1 ffc08b50: 90 09 27 8c stw r0,10124(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc08b54: 80 01 00 1c lwz r0,28(r1) ffc08b58: 38 21 00 18 addi r1,r1,24 ffc08b5c: 7c 08 03 a6 mtlr r0 ffc08b60: 4e 80 00 20 blr } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc08b64: 3d 60 00 00 lis r11,0 ffc08b68: 80 0b 27 e0 lwz r0,10208(r11) ffc08b6c: 2f 80 00 01 cmpwi cr7,r0,1 ffc08b70: 40 9e ff bc bne+ cr7,ffc08b2c <_Event_Timeout+0x44> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc08b74: 38 00 00 02 li r0,2 ffc08b78: 90 0b 27 e0 stw r0,10208(r11) ffc08b7c: 4b ff ff b0 b ffc08b2c <_Event_Timeout+0x44> =============================================================================== ffc1087c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc1087c: 94 21 ff e0 stwu r1,-32(r1) ffc10880: 7c 08 02 a6 mflr r0 ffc10884: 7d 80 00 26 mfcr r12 ffc10888: 7c 89 23 78 mr r9,r4 ffc1088c: 90 01 00 24 stw r0,36(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE ffc10890: 38 04 00 04 addi r0,r4,4 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc10894: 7f 84 00 40 cmplw cr7,r4,r0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10898: 93 a1 00 14 stw r29,20(r1) ffc1089c: 7c 7d 1b 78 mr r29,r3 ffc108a0: 91 81 00 08 stw r12,8(r1) ffc108a4: 93 61 00 0c stw r27,12(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; ffc108a8: 81 83 00 10 lwz r12,16(r3) uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; ffc108ac: 38 60 00 00 li r3,0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc108b0: 93 81 00 10 stw r28,16(r1) ffc108b4: 93 c1 00 18 stw r30,24(r1) ffc108b8: 93 e1 00 1c stw r31,28(r1) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc108bc: 41 9d 01 60 bgt- cr7,ffc10a1c <_Heap_Allocate_aligned_with_boundary+0x1a0> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc108c0: 2e 06 00 00 cmpwi cr4,r6,0 ffc108c4: 40 92 01 8c bne- cr4,ffc10a50 <_Heap_Allocate_aligned_with_boundary+0x1d4> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc108c8: 80 9d 00 08 lwz r4,8(r29) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc108cc: 38 60 00 00 li r3,0 ffc108d0: 7f 9d 20 00 cmpw cr7,r29,r4 ffc108d4: 41 9e 01 48 beq- cr7,ffc10a1c <_Heap_Allocate_aligned_with_boundary+0x1a0> ffc108d8: 3b c0 00 01 li r30,1 * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc108dc: 2c 05 00 00 cmpwi r5,0 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc108e0: 3b 6c 00 07 addi r27,r12,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc108e4: 23 89 00 04 subfic r28,r9,4 ffc108e8: 48 00 00 24 b ffc1090c <_Heap_Allocate_aligned_with_boundary+0x90> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc108ec: 3b e4 00 08 addi r31,r4,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc108f0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc108f4: 40 9e 00 ec bne- cr7,ffc109e0 <_Heap_Allocate_aligned_with_boundary+0x164><== ALWAYS TAKEN break; } block = block->next; ffc108f8: 80 84 00 08 lwz r4,8(r4) ffc108fc: 39 7e 00 01 addi r11,r30,1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10900: 7f 9d 20 00 cmpw cr7,r29,r4 ffc10904: 41 9e 01 44 beq- cr7,ffc10a48 <_Heap_Allocate_aligned_with_boundary+0x1cc> ffc10908: 7d 7e 5b 78 mr r30,r11 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { ffc1090c: 81 64 00 04 lwz r11,4(r4) ffc10910: 7f 80 58 40 cmplw cr7,r0,r11 ffc10914: 40 bc ff e4 bge- cr7,ffc108f8 <_Heap_Allocate_aligned_with_boundary+0x7c> if ( alignment == 0 ) { ffc10918: 41 a2 ff d4 beq- ffc108ec <_Heap_Allocate_aligned_with_boundary+0x70> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc1091c: 55 6b 00 3c rlwinm r11,r11,0,0,30 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc10920: 80 fd 00 14 lwz r7,20(r29) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc10924: 7d 64 5a 14 add r11,r4,r11 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; ffc10928: 7f fc 5a 14 add r31,r28,r11 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1092c: 7f ff 2b 96 divwu r31,r31,r5 ffc10930: 7f ff 29 d6 mullw r31,r31,r5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; ffc10934: 7d 47 d8 50 subf r10,r7,r27 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc10938: 7d 6a 5a 14 add r11,r10,r11 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { ffc1093c: 7f 8b f8 40 cmplw cr7,r11,r31 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc10940: 38 64 00 08 addi r3,r4,8 ffc10944: 40 9c 00 0c bge- cr7,ffc10950 <_Heap_Allocate_aligned_with_boundary+0xd4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10948: 7d 6b 2b 96 divwu r11,r11,r5 ffc1094c: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc10950: 41 92 00 60 beq- cr4,ffc109b0 <_Heap_Allocate_aligned_with_boundary+0x134> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; ffc10954: 7d 5f 4a 14 add r10,r31,r9 ffc10958: 7d 6a 33 96 divwu r11,r10,r6 ffc1095c: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10960: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10964: 40 9c 00 4c bge- cr7,ffc109b0 <_Heap_Allocate_aligned_with_boundary+0x134> ffc10968: 7f 8a 58 40 cmplw cr7,r10,r11 ffc1096c: 40 9d 00 44 ble- cr7,ffc109b0 <_Heap_Allocate_aligned_with_boundary+0x134> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc10970: 7d 03 4a 14 add r8,r3,r9 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc10974: 7f 88 58 40 cmplw cr7,r8,r11 ffc10978: 40 bd 00 10 ble+ cr7,ffc10988 <_Heap_Allocate_aligned_with_boundary+0x10c> ffc1097c: 4b ff ff 7c b ffc108f8 <_Heap_Allocate_aligned_with_boundary+0x7c> /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10980: 40 99 00 30 ble- cr6,ffc109b0 <_Heap_Allocate_aligned_with_boundary+0x134> if ( boundary_line < boundary_floor ) { ffc10984: 41 a5 ff 74 bgt- cr1,ffc108f8 <_Heap_Allocate_aligned_with_boundary+0x7c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc10988: 7f e9 58 50 subf r31,r9,r11 ffc1098c: 7f ff 2b 96 divwu r31,r31,r5 ffc10990: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc10994: 7d 5f 4a 14 add r10,r31,r9 ffc10998: 7d 6a 33 96 divwu r11,r10,r6 ffc1099c: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc109a0: 7f 9f 58 40 cmplw cr7,r31,r11 ffc109a4: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc109a8: 7c 88 58 40 cmplw cr1,r8,r11 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc109ac: 41 9c ff d4 blt+ cr7,ffc10980 <_Heap_Allocate_aligned_with_boundary+0x104> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { ffc109b0: 7f 83 f8 40 cmplw cr7,r3,r31 ffc109b4: 41 bd ff 44 bgt- cr7,ffc108f8 <_Heap_Allocate_aligned_with_boundary+0x7c> ffc109b8: 7d 7f 63 96 divwu r11,r31,r12 ffc109bc: 7d 6b 61 d6 mullw r11,r11,r12 ffc109c0: 21 44 ff f8 subfic r10,r4,-8 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; ffc109c4: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc109c8: 7f 87 58 40 cmplw cr7,r7,r11 ffc109cc: 40 bd ff 24 ble- cr7,ffc108f0 <_Heap_Allocate_aligned_with_boundary+0x74> ffc109d0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc109d4: 40 be ff 24 bne- cr7,ffc108f8 <_Heap_Allocate_aligned_with_boundary+0x7c> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc109d8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc109dc: 41 9e ff 1c beq+ cr7,ffc108f8 <_Heap_Allocate_aligned_with_boundary+0x7c><== NEVER TAKEN search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc109e0: 81 7d 00 48 lwz r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc109e4: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc109e8: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc109ec: 7f e5 fb 78 mr r5,r31 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc109f0: 39 6b 00 01 addi r11,r11,1 stats->searches += search_count; ffc109f4: 7c 00 f2 14 add r0,r0,r30 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc109f8: 91 7d 00 48 stw r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc109fc: 7d 26 4b 78 mr r6,r9 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc10a00: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc10a04: 4b ff 9d 15 bl ffc0a718 <_Heap_Block_allocate> ffc10a08: 7f e3 fb 78 mr r3,r31 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc10a0c: 80 1d 00 44 lwz r0,68(r29) ffc10a10: 7f 80 f0 40 cmplw cr7,r0,r30 ffc10a14: 40 9c 00 08 bge- cr7,ffc10a1c <_Heap_Allocate_aligned_with_boundary+0x1a0> stats->max_search = search_count; ffc10a18: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; } ffc10a1c: 80 01 00 24 lwz r0,36(r1) ffc10a20: 81 81 00 08 lwz r12,8(r1) ffc10a24: 7c 08 03 a6 mtlr r0 ffc10a28: 83 61 00 0c lwz r27,12(r1) ffc10a2c: 83 81 00 10 lwz r28,16(r1) ffc10a30: 7d 80 81 20 mtcrf 8,r12 ffc10a34: 83 a1 00 14 lwz r29,20(r1) ffc10a38: 83 c1 00 18 lwz r30,24(r1) ffc10a3c: 83 e1 00 1c lwz r31,28(r1) ffc10a40: 38 21 00 20 addi r1,r1,32 ffc10a44: 4e 80 00 20 blr do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10a48: 38 60 00 00 li r3,0 ffc10a4c: 4b ff ff c0 b ffc10a0c <_Heap_Allocate_aligned_with_boundary+0x190> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc10a50: 7f 84 30 40 cmplw cr7,r4,r6 ffc10a54: 41 bd ff c8 bgt- cr7,ffc10a1c <_Heap_Allocate_aligned_with_boundary+0x1a0> return NULL; } if ( alignment == 0 ) { ffc10a58: 2f 85 00 00 cmpwi cr7,r5,0 ffc10a5c: 40 be fe 6c bne- cr7,ffc108c8 <_Heap_Allocate_aligned_with_boundary+0x4c> alignment = page_size; ffc10a60: 7d 85 63 78 mr r5,r12 ffc10a64: 4b ff fe 64 b ffc108c8 <_Heap_Allocate_aligned_with_boundary+0x4c> =============================================================================== ffc10f58 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10f58: 94 21 ff c0 stwu r1,-64(r1) ffc10f5c: 7d 80 00 26 mfcr r12 ffc10f60: 7c 08 02 a6 mflr r0 ffc10f64: 93 a1 00 34 stw r29,52(r1) Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; ffc10f68: 7f a4 2a 14 add r29,r4,r5 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc10f6c: 7f 84 e8 40 cmplw cr7,r4,r29 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10f70: 90 01 00 44 stw r0,68(r1) ffc10f74: 93 41 00 28 stw r26,40(r1) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc10f78: 3b 40 00 00 li r26,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10f7c: 93 c1 00 38 stw r30,56(r1) ffc10f80: 7c 7e 1b 78 mr r30,r3 ffc10f84: 93 01 00 20 stw r24,32(r1) ffc10f88: 93 21 00 24 stw r25,36(r1) ffc10f8c: 7c d9 33 78 mr r25,r6 ffc10f90: 93 61 00 2c stw r27,44(r1) ffc10f94: 93 81 00 30 stw r28,48(r1) ffc10f98: 93 e1 00 3c stw r31,60(r1) ffc10f9c: 7c 9f 23 78 mr r31,r4 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc10fa0: 83 63 00 20 lwz r27,32(r3) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return false; ffc10fa4: 38 60 00 00 li r3,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10fa8: 92 e1 00 1c stw r23,28(r1) ffc10fac: 91 81 00 18 stw r12,24(r1) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc10fb0: 93 41 00 08 stw r26,8(r1) Heap_Block *extend_last_block = NULL; ffc10fb4: 93 41 00 0c stw r26,12(r1) uintptr_t const page_size = heap->page_size; ffc10fb8: 83 9e 00 10 lwz r28,16(r30) uintptr_t const min_block_size = heap->min_block_size; ffc10fbc: 80 de 00 14 lwz r6,20(r30) uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; ffc10fc0: 83 1e 00 30 lwz r24,48(r30) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc10fc4: 40 9d 00 40 ble- cr7,ffc11004 <_Heap_Extend+0xac> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10fc8: 80 01 00 44 lwz r0,68(r1) ffc10fcc: 81 81 00 18 lwz r12,24(r1) ffc10fd0: 7c 08 03 a6 mtlr r0 ffc10fd4: 82 e1 00 1c lwz r23,28(r1) ffc10fd8: 83 01 00 20 lwz r24,32(r1) ffc10fdc: 7d 81 81 20 mtcrf 24,r12 ffc10fe0: 83 21 00 24 lwz r25,36(r1) ffc10fe4: 83 41 00 28 lwz r26,40(r1) ffc10fe8: 83 61 00 2c lwz r27,44(r1) ffc10fec: 83 81 00 30 lwz r28,48(r1) ffc10ff0: 83 a1 00 34 lwz r29,52(r1) ffc10ff4: 83 c1 00 38 lwz r30,56(r1) ffc10ff8: 83 e1 00 3c lwz r31,60(r1) ffc10ffc: 38 21 00 40 addi r1,r1,64 ffc11000: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc11004: 7c 83 23 78 mr r3,r4 ffc11008: 38 e1 00 08 addi r7,r1,8 ffc1100c: 7c a4 2b 78 mr r4,r5 ffc11010: 39 01 00 0c addi r8,r1,12 ffc11014: 7f 85 e3 78 mr r5,r28 ffc11018: 4b ff 99 39 bl ffc0a950 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc1101c: 2f 83 00 00 cmpwi cr7,r3,0 /* For simplicity we reject extend areas that are too small */ return false; ffc11020: 7f 43 d3 78 mr r3,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc11024: 41 be ff a4 beq- cr7,ffc10fc8 <_Heap_Extend+0x70> ffc11028: 7f 69 db 78 mr r9,r27 ffc1102c: 3a e0 00 00 li r23,0 ffc11030: 38 00 00 00 li r0,0 ffc11034: 39 00 00 00 li r8,0 ffc11038: 48 00 00 44 b ffc1107c <_Heap_Extend+0x124> return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc1103c: 7f 9d 58 40 cmplw cr7,r29,r11 ffc11040: 40 9c 00 08 bge- cr7,ffc11048 <_Heap_Extend+0xf0> ffc11044: 7d 20 4b 78 mr r0,r9 ffc11048: 7d 4b e3 96 divwu r10,r11,r28 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc1104c: 7f 8b f8 00 cmpw cr7,r11,r31 ffc11050: 7d 4a e1 d6 mullw r10,r10,r28 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc11054: 39 4a ff f8 addi r10,r10,-8 ffc11058: 41 9e 00 64 beq- cr7,ffc110bc <_Heap_Extend+0x164> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc1105c: 7f 9f 58 40 cmplw cr7,r31,r11 ffc11060: 40 9d 00 08 ble- cr7,ffc11068 <_Heap_Extend+0x110> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc11064: 7d 57 53 78 mr r23,r10 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc11068: 81 2a 00 04 lwz r9,4(r10) ffc1106c: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc11070: 7d 2a 4a 14 add r9,r10,r9 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc11074: 7f 9b 48 00 cmpw cr7,r27,r9 ffc11078: 41 9e 00 60 beq- cr7,ffc110d8 <_Heap_Extend+0x180> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc1107c: 7f 89 d8 00 cmpw cr7,r9,r27 ffc11080: 7d 2a 4b 78 mr r10,r9 ffc11084: 41 9e 01 b8 beq- cr7,ffc1123c <_Heap_Extend+0x2e4> uintptr_t const sub_area_end = start_block->prev_size; ffc11088: 81 69 00 00 lwz r11,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc1108c: 7f 9f 58 40 cmplw cr7,r31,r11 ffc11090: 40 9c 00 0c bge- cr7,ffc1109c <_Heap_Extend+0x144> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc11094: 7f 8a e8 40 cmplw cr7,r10,r29 ffc11098: 41 9c 02 28 blt- cr7,ffc112c0 <_Heap_Extend+0x368> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc1109c: 7f 8a e8 00 cmpw cr7,r10,r29 ffc110a0: 40 9e ff 9c bne+ cr7,ffc1103c <_Heap_Extend+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc110a4: 7d 4b e3 96 divwu r10,r11,r28 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc110a8: 7f 8b f8 00 cmpw cr7,r11,r31 ffc110ac: 7d 4a e1 d6 mullw r10,r10,r28 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc110b0: 7d 28 4b 78 mr r8,r9 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc110b4: 39 4a ff f8 addi r10,r10,-8 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc110b8: 40 9e ff a4 bne+ cr7,ffc1105c <_Heap_Extend+0x104> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc110bc: 93 a9 00 00 stw r29,0(r9) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc110c0: 7d 5a 53 78 mr r26,r10 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc110c4: 81 2a 00 04 lwz r9,4(r10) ffc110c8: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc110cc: 7d 2a 4a 14 add r9,r10,r9 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc110d0: 7f 9b 48 00 cmpw cr7,r27,r9 ffc110d4: 40 9e ff a8 bne+ cr7,ffc1107c <_Heap_Extend+0x124> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc110d8: 81 3e 00 18 lwz r9,24(r30) ffc110dc: 7f 9f 48 40 cmplw cr7,r31,r9 ffc110e0: 41 9c 01 64 blt- cr7,ffc11244 <_Heap_Extend+0x2ec> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc110e4: 81 3e 00 1c lwz r9,28(r30) ffc110e8: 7f 9d 48 40 cmplw cr7,r29,r9 ffc110ec: 40 9d 00 08 ble- cr7,ffc110f4 <_Heap_Extend+0x19c> heap->area_end = extend_area_end; ffc110f0: 93 be 00 1c stw r29,28(r30) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc110f4: 81 5e 00 20 lwz r10,32(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc110f8: 81 21 00 08 lwz r9,8(r1) ffc110fc: 81 61 00 0c lwz r11,12(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc11100: 7f 8a 48 40 cmplw cr7,r10,r9 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc11104: 93 a9 00 00 stw r29,0(r9) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc11108: 7d 49 58 50 subf r10,r9,r11 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; ffc1110c: 61 47 00 01 ori r7,r10,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc11110: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc11114: 39 40 00 00 li r10,0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = ffc11118: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc1111c: 91 4b 00 04 stw r10,4(r11) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc11120: 40 9d 01 58 ble- cr7,ffc11278 <_Heap_Extend+0x320> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc11124: 91 3e 00 20 stw r9,32(r30) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { ffc11128: 2e 08 00 00 cmpwi cr4,r8,0 ffc1112c: 41 92 01 b0 beq- cr4,ffc112dc <_Heap_Extend+0x384> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc11130: 80 1e 00 10 lwz r0,16(r30) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc11134: 3b ff 00 08 addi r31,r31,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc11138: 7d 3f 03 96 divwu r9,r31,r0 ffc1113c: 7d 29 01 d6 mullw r9,r9,r0 if ( remainder != 0 ) { ffc11140: 7d 29 f8 51 subf. r9,r9,r31 ffc11144: 41 82 00 0c beq- ffc11150 <_Heap_Extend+0x1f8> <== ALWAYS TAKEN return value - remainder + alignment; ffc11148: 7f ff 02 14 add r31,r31,r0 <== NOT EXECUTED ffc1114c: 7f e9 f8 50 subf r31,r9,r31 <== NOT EXECUTED uintptr_t const new_first_block_begin = ffc11150: 38 9f ff f8 addi r4,r31,-8 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc11154: 81 28 00 00 lwz r9,0(r8) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = ffc11158: 7c 04 40 50 subf r0,r4,r8 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; ffc1115c: 60 00 00 01 ori r0,r0,1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc11160: 91 3f ff f8 stw r9,-8(r31) new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Free_block( heap, new_first_block ); ffc11164: 7f c3 f3 78 mr r3,r30 uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; ffc11168: 90 04 00 04 stw r0,4(r4) _Heap_Free_block( heap, new_first_block ); ffc1116c: 4b ff fd b1 bl ffc10f1c <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc11170: 2d 9a 00 00 cmpwi cr3,r26,0 ffc11174: 41 8e 01 18 beq- cr3,ffc1128c <_Heap_Extend+0x334> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc11178: 81 3e 00 10 lwz r9,16(r30) ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, ffc1117c: 38 1d ff f8 addi r0,r29,-8 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( ffc11180: 7c 1a 00 50 subf r0,r26,r0 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc11184: 81 7a 00 04 lwz r11,4(r26) ffc11188: 7c 00 4b 96 divwu r0,r0,r9 ffc1118c: 7c 00 49 d6 mullw r0,r0,r9 | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc11190: 7f c3 f3 78 mr r3,r30 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc11194: 7d 60 58 50 subf r11,r0,r11 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc11198: 7d 20 d2 14 add r9,r0,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc1119c: 61 6b 00 01 ori r11,r11,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc111a0: 91 69 00 04 stw r11,4(r9) (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc111a4: 7f 44 d3 78 mr r4,r26 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc111a8: 81 3a 00 04 lwz r9,4(r26) ffc111ac: 55 29 07 fe clrlwi r9,r9,31 block->size_and_flag = size | flag; ffc111b0: 7c 00 4b 78 or r0,r0,r9 ffc111b4: 90 1a 00 04 stw r0,4(r26) ffc111b8: 4b ff fd 65 bl ffc10f1c <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc111bc: 41 92 01 0c beq- cr4,ffc112c8 <_Heap_Extend+0x370> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc111c0: 81 3e 00 24 lwz r9,36(r30) extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc111c4: 2f 99 00 00 cmpwi cr7,r25,0 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc111c8: 81 5e 00 20 lwz r10,32(r30) *extended_size_ptr = extended_size; return true; ffc111cc: 38 60 00 01 li r3,1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc111d0: 81 69 00 04 lwz r11,4(r9) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc111d4: 81 1e 00 30 lwz r8,48(r30) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc111d8: 7d 49 50 50 subf r10,r9,r10 /* Statistics */ stats->size += extended_size; ffc111dc: 80 1e 00 2c lwz r0,44(r30) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc111e0: 55 6b 07 fe clrlwi r11,r11,31 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc111e4: 7f 18 40 50 subf r24,r24,r8 block->size_and_flag = size | flag; ffc111e8: 7d 4b 5b 78 or r11,r10,r11 /* Statistics */ stats->size += extended_size; ffc111ec: 7c 00 c2 14 add r0,r0,r24 ffc111f0: 91 69 00 04 stw r11,4(r9) ffc111f4: 90 1e 00 2c stw r0,44(r30) if ( extended_size_ptr != NULL ) ffc111f8: 41 be fd d0 beq- cr7,ffc10fc8 <_Heap_Extend+0x70> <== NEVER TAKEN *extended_size_ptr = extended_size; return true; } ffc111fc: 80 01 00 44 lwz r0,68(r1) ffc11200: 81 81 00 18 lwz r12,24(r1) ffc11204: 7c 08 03 a6 mtlr r0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; ffc11208: 93 19 00 00 stw r24,0(r25) return true; } ffc1120c: 7d 81 81 20 mtcrf 24,r12 ffc11210: 82 e1 00 1c lwz r23,28(r1) ffc11214: 83 01 00 20 lwz r24,32(r1) ffc11218: 83 21 00 24 lwz r25,36(r1) ffc1121c: 83 41 00 28 lwz r26,40(r1) ffc11220: 83 61 00 2c lwz r27,44(r1) ffc11224: 83 81 00 30 lwz r28,48(r1) ffc11228: 83 a1 00 34 lwz r29,52(r1) ffc1122c: 83 c1 00 38 lwz r30,56(r1) ffc11230: 83 e1 00 3c lwz r31,60(r1) ffc11234: 38 21 00 40 addi r1,r1,64 ffc11238: 4e 80 00 20 blr return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc1123c: 81 5e 00 18 lwz r10,24(r30) ffc11240: 4b ff fe 48 b ffc11088 <_Heap_Extend+0x130> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc11244: 81 5e 00 20 lwz r10,32(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc11248: 81 21 00 08 lwz r9,8(r1) ffc1124c: 81 61 00 0c lwz r11,12(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc11250: 7f 8a 48 40 cmplw cr7,r10,r9 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; ffc11254: 93 fe 00 18 stw r31,24(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc11258: 7d 49 58 50 subf r10,r9,r11 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; ffc1125c: 61 47 00 01 ori r7,r10,1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc11260: 93 a9 00 00 stw r29,0(r9) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc11264: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc11268: 39 40 00 00 li r10,0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = ffc1126c: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc11270: 91 4b 00 04 stw r10,4(r11) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc11274: 41 bd fe b0 bgt- cr7,ffc11124 <_Heap_Extend+0x1cc> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc11278: 81 3e 00 24 lwz r9,36(r30) ffc1127c: 7f 89 58 40 cmplw cr7,r9,r11 ffc11280: 40 bc fe a8 bge- cr7,ffc11128 <_Heap_Extend+0x1d0> heap->last_block = extend_last_block; ffc11284: 91 7e 00 24 stw r11,36(r30) ffc11288: 4b ff fe a0 b ffc11128 <_Heap_Extend+0x1d0> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc1128c: 2f 97 00 00 cmpwi cr7,r23,0 ffc11290: 41 be ff 2c beq- cr7,ffc111bc <_Heap_Extend+0x264> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc11294: 81 37 00 04 lwz r9,4(r23) ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); ffc11298: 80 01 00 08 lwz r0,8(r1) ffc1129c: 55 29 07 fe clrlwi r9,r9,31 ffc112a0: 7c 17 00 50 subf r0,r23,r0 block->size_and_flag = size | flag; ffc112a4: 7c 00 4b 78 or r0,r0,r9 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc112a8: 81 21 00 0c lwz r9,12(r1) ffc112ac: 90 17 00 04 stw r0,4(r23) uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc112b0: 80 09 00 04 lwz r0,4(r9) ffc112b4: 60 00 00 01 ori r0,r0,1 ffc112b8: 90 09 00 04 stw r0,4(r9) ffc112bc: 4b ff ff 00 b ffc111bc <_Heap_Extend+0x264> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; ffc112c0: 38 60 00 00 li r3,0 ffc112c4: 4b ff fd 04 b ffc10fc8 <_Heap_Extend+0x70> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc112c8: 40 8e fe f8 bne+ cr3,ffc111c0 <_Heap_Extend+0x268> _Heap_Free_block( heap, extend_first_block ); ffc112cc: 80 81 00 08 lwz r4,8(r1) ffc112d0: 7f c3 f3 78 mr r3,r30 ffc112d4: 4b ff fc 49 bl ffc10f1c <_Heap_Free_block> ffc112d8: 4b ff fe e8 b ffc111c0 <_Heap_Extend+0x268> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { ffc112dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc112e0: 41 be fe 90 beq- cr7,ffc11170 <_Heap_Extend+0x218> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; ffc112e4: 7c 0b 00 50 subf r0,r11,r0 ffc112e8: 60 00 00 01 ori r0,r0,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc112ec: 90 0b 00 04 stw r0,4(r11) ffc112f0: 4b ff fe 80 b ffc11170 <_Heap_Extend+0x218> =============================================================================== ffc10a68 <_Heap_Free>: ffc10a68: 80 03 00 10 lwz r0,16(r3) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc10a6c: 7c 69 1b 78 mr r9,r3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc10a70: 81 63 00 20 lwz r11,32(r3) bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc10a74: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10a78: 7d 44 03 96 divwu r10,r4,r0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc10a7c: 94 21 ff f0 stwu r1,-16(r1) ffc10a80: 93 e1 00 0c stw r31,12(r1) ffc10a84: 7d 4a 01 d6 mullw r10,r10,r0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10a88: 39 4a ff f8 addi r10,r10,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc10a8c: 7f 8a 58 40 cmplw cr7,r10,r11 ffc10a90: 41 9c 01 24 blt- cr7,ffc10bb4 <_Heap_Free+0x14c> ffc10a94: 80 09 00 24 lwz r0,36(r9) ffc10a98: 7f 8a 00 40 cmplw cr7,r10,r0 ffc10a9c: 41 9d 01 18 bgt- cr7,ffc10bb4 <_Heap_Free+0x14c> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10aa0: 80 ea 00 04 lwz r7,4(r10) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc10aa4: 54 e6 00 3c rlwinm r6,r7,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc10aa8: 7d 0a 32 14 add r8,r10,r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc10aac: 7f 8b 40 40 cmplw cr7,r11,r8 ffc10ab0: 41 9d 01 04 bgt- cr7,ffc10bb4 <_Heap_Free+0x14c> <== NEVER TAKEN ffc10ab4: 7f 80 40 40 cmplw cr7,r0,r8 ffc10ab8: 41 9c 00 fc blt- cr7,ffc10bb4 <_Heap_Free+0x14c> <== NEVER TAKEN ffc10abc: 80 a8 00 04 lwz r5,4(r8) if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc10ac0: 70 a4 00 01 andi. r4,r5,1 ffc10ac4: 41 82 00 f0 beq- ffc10bb4 <_Heap_Free+0x14c> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc10ac8: 7f 80 40 00 cmpw cr7,r0,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc10acc: 54 a4 00 3c rlwinm r4,r5,0,0,30 ffc10ad0: 38 a0 00 00 li r5,0 ffc10ad4: 41 9e 00 18 beq- cr7,ffc10aec <_Heap_Free+0x84> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10ad8: 7c a8 22 14 add r5,r8,r4 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc10adc: 80 a5 00 04 lwz r5,4(r5) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc10ae0: 70 a3 00 01 andi. r3,r5,1 ffc10ae4: 7c a0 00 26 mfcr r5 ffc10ae8: 54 a5 1f fe rlwinm r5,r5,3,31,31 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc10aec: 70 e7 00 01 andi. r7,r7,1 ffc10af0: 40 82 00 6c bne- ffc10b5c <_Heap_Free+0xf4> uintptr_t const prev_size = block->prev_size; ffc10af4: 83 ea 00 00 lwz r31,0(r10) Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); ffc10af8: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc10afc: 7d 9f 50 50 subf r12,r31,r10 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc10b00: 7f 8b 60 40 cmplw cr7,r11,r12 ffc10b04: 41 9d 00 b0 bgt- cr7,ffc10bb4 <_Heap_Free+0x14c> <== NEVER TAKEN ffc10b08: 7f 80 60 40 cmplw cr7,r0,r12 ffc10b0c: 7c e3 3b 78 mr r3,r7 ffc10b10: 41 9c 00 a4 blt- cr7,ffc10bb4 <_Heap_Free+0x14c> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc10b14: 80 0c 00 04 lwz r0,4(r12) } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc10b18: 70 0b 00 01 andi. r11,r0,1 ffc10b1c: 41 82 00 98 beq- ffc10bb4 <_Heap_Free+0x14c> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc10b20: 2f 85 00 00 cmpwi cr7,r5,0 ffc10b24: 41 9e 00 e8 beq- cr7,ffc10c0c <_Heap_Free+0x1a4> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10b28: 80 e9 00 38 lwz r7,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10b2c: 7c 86 22 14 add r4,r6,r4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10b30: 81 68 00 08 lwz r11,8(r8) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10b34: 7f e4 fa 14 add r31,r4,r31 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10b38: 81 48 00 0c lwz r10,12(r8) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10b3c: 63 e0 00 01 ori r0,r31,1 } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10b40: 39 07 ff ff addi r8,r7,-1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc10b44: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc10b48: 91 4b 00 0c stw r10,12(r11) ffc10b4c: 91 09 00 38 stw r8,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10b50: 90 0c 00 04 stw r0,4(r12) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc10b54: 7f ec f9 2e stwx r31,r12,r31 ffc10b58: 48 00 00 34 b ffc10b8c <_Heap_Free+0x124> uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc10b5c: 2f 85 00 00 cmpwi cr7,r5,0 ffc10b60: 41 9e 00 60 beq- cr7,ffc10bc0 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10b64: 81 68 00 08 lwz r11,8(r8) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; ffc10b68: 7c 84 32 14 add r4,r4,r6 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10b6c: 81 08 00 0c lwz r8,12(r8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10b70: 60 80 00 01 ori r0,r4,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc10b74: 91 6a 00 08 stw r11,8(r10) new_block->prev = prev; ffc10b78: 91 0a 00 0c stw r8,12(r10) next->prev = new_block; prev->next = new_block; ffc10b7c: 91 48 00 08 stw r10,8(r8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc10b80: 91 4b 00 0c stw r10,12(r11) ffc10b84: 90 0a 00 04 stw r0,4(r10) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc10b88: 7c 8a 21 2e stwx r4,r10,r4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10b8c: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc10b90: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10b94: 81 09 00 50 lwz r8,80(r9) stats->free_size += block_size; ffc10b98: 81 49 00 30 lwz r10,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10b9c: 39 6b ff ff addi r11,r11,-1 ++stats->frees; ffc10ba0: 38 08 00 01 addi r0,r8,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10ba4: 91 69 00 40 stw r11,64(r9) ++stats->frees; stats->free_size += block_size; ffc10ba8: 7c ca 32 14 add r6,r10,r6 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10bac: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc10bb0: 90 c9 00 30 stw r6,48(r9) return( true ); } ffc10bb4: 83 e1 00 0c lwz r31,12(r1) ffc10bb8: 38 21 00 10 addi r1,r1,16 ffc10bbc: 4e 80 00 20 blr block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc10bc0: 80 e9 00 38 lwz r7,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc10bc4: 81 69 00 3c lwz r11,60(r9) block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc10bc8: 38 07 00 01 addi r0,r7,1 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc10bcc: 91 2a 00 0c stw r9,12(r10) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc10bd0: 60 c7 00 01 ori r7,r6,1 ffc10bd4: 90 ea 00 04 stw r7,4(r10) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { ffc10bd8: 7f 80 58 40 cmplw cr7,r0,r11 } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc10bdc: 80 e8 00 04 lwz r7,4(r8) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc10be0: 81 69 00 08 lwz r11,8(r9) ffc10be4: 54 e7 00 3c rlwinm r7,r7,0,0,30 next_block->prev_size = block_size; ffc10be8: 7c ca 31 2e stwx r6,r10,r6 new_block->next = next; ffc10bec: 91 6a 00 08 stw r11,8(r10) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc10bf0: 90 e8 00 04 stw r7,4(r8) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc10bf4: 91 4b 00 0c stw r10,12(r11) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc10bf8: 91 49 00 08 stw r10,8(r9) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc10bfc: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc10c00: 40 bd ff 8c ble- cr7,ffc10b8c <_Heap_Free+0x124> stats->max_free_blocks = stats->free_blocks; ffc10c04: 90 09 00 3c stw r0,60(r9) ffc10c08: 4b ff ff 84 b ffc10b8c <_Heap_Free+0x124> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc10c0c: 7f e6 fa 14 add r31,r6,r31 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10c10: 63 e0 00 01 ori r0,r31,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc10c14: 7f ea 31 2e stwx r31,r10,r6 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10c18: 90 0c 00 04 stw r0,4(r12) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc10c1c: 80 08 00 04 lwz r0,4(r8) ffc10c20: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc10c24: 90 08 00 04 stw r0,4(r8) ffc10c28: 4b ff ff 64 b ffc10b8c <_Heap_Free+0x124> =============================================================================== ffc0b55c <_Heap_Walk>: uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0b55c: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b560: 94 21 ff 98 stwu r1,-104(r1) ffc0b564: 7c 08 02 a6 mflr r0 ffc0b568: 92 e1 00 44 stw r23,68(r1) ffc0b56c: 90 01 00 6c stw r0,108(r1) ffc0b570: 93 01 00 48 stw r24,72(r1) ffc0b574: 93 21 00 4c stw r25,76(r1) ffc0b578: 7c 99 23 78 mr r25,r4 ffc0b57c: 93 41 00 50 stw r26,80(r1) ffc0b580: 93 61 00 54 stw r27,84(r1) ffc0b584: 93 e1 00 64 stw r31,100(r1) ffc0b588: 7c 7f 1b 78 mr r31,r3 ffc0b58c: 91 c1 00 20 stw r14,32(r1) ffc0b590: 91 e1 00 24 stw r15,36(r1) ffc0b594: 92 01 00 28 stw r16,40(r1) ffc0b598: 92 21 00 2c stw r17,44(r1) ffc0b59c: 92 41 00 30 stw r18,48(r1) ffc0b5a0: 92 61 00 34 stw r19,52(r1) ffc0b5a4: 92 81 00 38 stw r20,56(r1) ffc0b5a8: 92 a1 00 3c stw r21,60(r1) ffc0b5ac: 92 c1 00 40 stw r22,64(r1) ffc0b5b0: 93 81 00 58 stw r28,88(r1) ffc0b5b4: 93 a1 00 5c stw r29,92(r1) ffc0b5b8: 93 c1 00 60 stw r30,96(r1) uintptr_t const page_size = heap->page_size; ffc0b5bc: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b5c0: 83 03 00 14 lwz r24,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b5c4: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b5c8: 82 e3 00 24 lwz r23,36(r3) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0b5cc: 41 9e 00 7c beq- cr7,ffc0b648 <_Heap_Walk+0xec> ffc0b5d0: 3d 20 ff c1 lis r9,-63 ffc0b5d4: 39 29 b4 5c addi r9,r9,-19364 ffc0b5d8: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b5dc: 3d 20 00 00 lis r9,0 return true; ffc0b5e0: 38 60 00 01 li r3,1 Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b5e4: 80 09 27 d0 lwz r0,10192(r9) ffc0b5e8: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b5ec: 41 9e 00 7c beq- cr7,ffc0b668 <_Heap_Walk+0x10c> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0b5f0: 80 01 00 6c lwz r0,108(r1) ffc0b5f4: 81 c1 00 20 lwz r14,32(r1) ffc0b5f8: 7c 08 03 a6 mtlr r0 ffc0b5fc: 81 e1 00 24 lwz r15,36(r1) ffc0b600: 82 01 00 28 lwz r16,40(r1) ffc0b604: 82 21 00 2c lwz r17,44(r1) ffc0b608: 82 41 00 30 lwz r18,48(r1) ffc0b60c: 82 61 00 34 lwz r19,52(r1) ffc0b610: 82 81 00 38 lwz r20,56(r1) ffc0b614: 82 a1 00 3c lwz r21,60(r1) ffc0b618: 82 c1 00 40 lwz r22,64(r1) ffc0b61c: 82 e1 00 44 lwz r23,68(r1) ffc0b620: 83 01 00 48 lwz r24,72(r1) ffc0b624: 83 21 00 4c lwz r25,76(r1) ffc0b628: 83 41 00 50 lwz r26,80(r1) ffc0b62c: 83 61 00 54 lwz r27,84(r1) ffc0b630: 83 81 00 58 lwz r28,88(r1) ffc0b634: 83 a1 00 5c lwz r29,92(r1) ffc0b638: 83 c1 00 60 lwz r30,96(r1) ffc0b63c: 83 e1 00 64 lwz r31,100(r1) ffc0b640: 38 21 00 68 addi r1,r1,104 ffc0b644: 4e 80 00 20 blr uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0b648: 3d 20 ff c1 lis r9,-63 ffc0b64c: 39 29 b4 58 addi r9,r9,-19368 ffc0b650: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b654: 3d 20 00 00 lis r9,0 return true; ffc0b658: 38 60 00 01 li r3,1 Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b65c: 80 09 27 d0 lwz r0,10192(r9) ffc0b660: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b664: 40 9e ff 8c bne+ cr7,ffc0b5f0 <_Heap_Walk+0x94> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( ffc0b668: 80 1f 00 0c lwz r0,12(r31) ffc0b66c: 3c a0 ff c2 lis r5,-62 ffc0b670: 81 1f 00 18 lwz r8,24(r31) ffc0b674: 7f 23 cb 78 mr r3,r25 ffc0b678: 81 3f 00 1c lwz r9,28(r31) ffc0b67c: 38 80 00 00 li r4,0 ffc0b680: 81 7f 00 08 lwz r11,8(r31) ffc0b684: 38 a5 b8 1c addi r5,r5,-18404 ffc0b688: 90 01 00 10 stw r0,16(r1) ffc0b68c: 7f 66 db 78 mr r6,r27 ffc0b690: 7f 07 c3 78 mr r7,r24 ffc0b694: 80 01 00 18 lwz r0,24(r1) ffc0b698: 7f 4a d3 78 mr r10,r26 ffc0b69c: 92 e1 00 08 stw r23,8(r1) ffc0b6a0: 7c 09 03 a6 mtctr r0 ffc0b6a4: 91 61 00 0c stw r11,12(r1) ffc0b6a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b6ac: 4e 80 04 21 bctrl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { ffc0b6b0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b6b4: 41 9e 00 ac beq- cr7,ffc0b760 <_Heap_Walk+0x204> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0b6b8: 73 67 00 07 andi. r7,r27,7 ffc0b6bc: 40 82 00 cc bne- ffc0b788 <_Heap_Walk+0x22c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b6c0: 7c 18 db 96 divwu r0,r24,r27 ffc0b6c4: 7c 00 d9 d6 mullw r0,r0,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0b6c8: 7f 98 00 00 cmpw cr7,r24,r0 ffc0b6cc: 40 9e 00 e8 bne- cr7,ffc0b7b4 <_Heap_Walk+0x258> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b6d0: 38 1a 00 08 addi r0,r26,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b6d4: 7d 20 db 96 divwu r9,r0,r27 ffc0b6d8: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( ffc0b6dc: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b6e0: 40 9e 01 00 bne- cr7,ffc0b7e0 <_Heap_Walk+0x284> block = next_block; } while ( block != first_block ); return true; } ffc0b6e4: 82 da 00 04 lwz r22,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0b6e8: 72 c7 00 01 andi. r7,r22,1 ffc0b6ec: 41 82 01 64 beq- ffc0b850 <_Heap_Walk+0x2f4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0b6f0: 81 37 00 04 lwz r9,4(r23) ffc0b6f4: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0b6f8: 7d 37 4a 14 add r9,r23,r9 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0b6fc: 80 09 00 04 lwz r0,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0b700: 70 07 00 01 andi. r7,r0,1 ffc0b704: 41 82 00 34 beq- ffc0b738 <_Heap_Walk+0x1dc> ); return false; } if ( ffc0b708: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0b70c: 41 9e 01 00 beq- cr7,ffc0b80c <_Heap_Walk+0x2b0> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0b710: 80 01 00 18 lwz r0,24(r1) <== NOT EXECUTED ffc0b714: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc0b718: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc0b71c: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc0b720: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b724: 38 a5 b9 84 addi r5,r5,-18044 <== NOT EXECUTED ffc0b728: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0b72c: 4e 80 04 21 bctrl <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b730: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0b734: 4b ff fe bc b ffc0b5f0 <_Heap_Walk+0x94> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b738: 80 01 00 18 lwz r0,24(r1) ffc0b73c: 3c a0 ff c2 lis r5,-62 ffc0b740: 7f 23 cb 78 mr r3,r25 ffc0b744: 38 80 00 01 li r4,1 ffc0b748: 7c 09 03 a6 mtctr r0 ffc0b74c: 38 a5 b9 6c addi r5,r5,-18068 ffc0b750: 4c c6 31 82 crclr 4*cr1+eq ffc0b754: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b758: 38 60 00 00 li r3,0 ffc0b75c: 4b ff fe 94 b ffc0b5f0 <_Heap_Walk+0x94> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0b760: 80 01 00 18 lwz r0,24(r1) ffc0b764: 3c a0 ff c2 lis r5,-62 ffc0b768: 7f 23 cb 78 mr r3,r25 ffc0b76c: 38 80 00 01 li r4,1 ffc0b770: 7c 09 03 a6 mtctr r0 ffc0b774: 38 a5 b8 b0 addi r5,r5,-18256 ffc0b778: 4c c6 31 82 crclr 4*cr1+eq ffc0b77c: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b780: 38 60 00 00 li r3,0 ffc0b784: 4b ff fe 6c b ffc0b5f0 <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0b788: 80 01 00 18 lwz r0,24(r1) ffc0b78c: 3c a0 ff c2 lis r5,-62 ffc0b790: 7f 23 cb 78 mr r3,r25 ffc0b794: 38 80 00 01 li r4,1 ffc0b798: 7c 09 03 a6 mtctr r0 ffc0b79c: 38 a5 b8 c4 addi r5,r5,-18236 ffc0b7a0: 7f 66 db 78 mr r6,r27 ffc0b7a4: 4c c6 31 82 crclr 4*cr1+eq ffc0b7a8: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b7ac: 38 60 00 00 li r3,0 ffc0b7b0: 4b ff fe 40 b ffc0b5f0 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0b7b4: 80 01 00 18 lwz r0,24(r1) ffc0b7b8: 3c a0 ff c2 lis r5,-62 ffc0b7bc: 7f 23 cb 78 mr r3,r25 ffc0b7c0: 38 80 00 01 li r4,1 ffc0b7c4: 7c 09 03 a6 mtctr r0 ffc0b7c8: 38 a5 b8 e4 addi r5,r5,-18204 ffc0b7cc: 7f 06 c3 78 mr r6,r24 ffc0b7d0: 4c c6 31 82 crclr 4*cr1+eq ffc0b7d4: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b7d8: 38 60 00 00 li r3,0 ffc0b7dc: 4b ff fe 14 b ffc0b5f0 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0b7e0: 80 01 00 18 lwz r0,24(r1) ffc0b7e4: 3c a0 ff c2 lis r5,-62 ffc0b7e8: 7f 23 cb 78 mr r3,r25 ffc0b7ec: 38 80 00 01 li r4,1 ffc0b7f0: 7c 09 03 a6 mtctr r0 ffc0b7f4: 38 a5 b9 08 addi r5,r5,-18168 ffc0b7f8: 7f 46 d3 78 mr r6,r26 ffc0b7fc: 4c c6 31 82 crclr 4*cr1+eq ffc0b800: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b804: 38 60 00 00 li r3,0 ffc0b808: 4b ff fd e8 b ffc0b5f0 <_Heap_Walk+0x94> block = next_block; } while ( block != first_block ); return true; } ffc0b80c: 80 df 00 08 lwz r6,8(r31) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0b810: 81 1f 00 10 lwz r8,16(r31) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0b814: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0b818: 41 9e 01 28 beq- cr7,ffc0b940 <_Heap_Walk+0x3e4> block = next_block; } while ( block != first_block ); return true; } ffc0b81c: 80 1f 00 20 lwz r0,32(r31) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0b820: 7f 80 30 40 cmplw cr7,r0,r6 ffc0b824: 40 9d 00 54 ble- cr7,ffc0b878 <_Heap_Walk+0x31c> <== ALWAYS TAKEN const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0b828: 80 01 00 18 lwz r0,24(r1) ffc0b82c: 3c a0 ff c2 lis r5,-62 ffc0b830: 7f 23 cb 78 mr r3,r25 ffc0b834: 38 80 00 01 li r4,1 ffc0b838: 7c 09 03 a6 mtctr r0 ffc0b83c: 38 a5 b9 b4 addi r5,r5,-17996 ffc0b840: 4c c6 31 82 crclr 4*cr1+eq ffc0b844: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b848: 38 60 00 00 li r3,0 ffc0b84c: 4b ff fd a4 b ffc0b5f0 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0b850: 80 01 00 18 lwz r0,24(r1) ffc0b854: 3c a0 ff c2 lis r5,-62 ffc0b858: 7f 23 cb 78 mr r3,r25 ffc0b85c: 38 80 00 01 li r4,1 ffc0b860: 7c 09 03 a6 mtctr r0 ffc0b864: 38 a5 b9 3c addi r5,r5,-18116 ffc0b868: 4c c6 31 82 crclr 4*cr1+eq ffc0b86c: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b870: 38 60 00 00 li r3,0 ffc0b874: 4b ff fd 7c b ffc0b5f0 <_Heap_Walk+0x94> ffc0b878: 81 5f 00 24 lwz r10,36(r31) ffc0b87c: 7f 8a 30 40 cmplw cr7,r10,r6 ffc0b880: 41 bc ff a8 blt- cr7,ffc0b828 <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b884: 39 26 00 08 addi r9,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b888: 7d 69 43 96 divwu r11,r9,r8 ffc0b88c: 7d 6b 41 d6 mullw r11,r11,r8 ); return false; } if ( ffc0b890: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b894: 40 9e 03 a8 bne- cr7,ffc0bc3c <_Heap_Walk+0x6e0> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0b898: 81 26 00 04 lwz r9,4(r6) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b89c: 7f eb fb 78 mr r11,r31 ffc0b8a0: 7c c5 33 78 mr r5,r6 ffc0b8a4: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b8a8: 7d 26 4a 14 add r9,r6,r9 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0b8ac: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b8b0: 71 27 00 01 andi. r7,r9,1 ffc0b8b4: 41 a2 00 58 beq+ ffc0b90c <_Heap_Walk+0x3b0> <== ALWAYS TAKEN ffc0b8b8: 48 00 03 ac b ffc0bc64 <_Heap_Walk+0x708> <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; ffc0b8bc: 80 c6 00 08 lwz r6,8(r6) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0b8c0: 7f 9f 30 00 cmpw cr7,r31,r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0b8c4: 7f 00 30 40 cmplw cr6,r0,r6 ffc0b8c8: 7c 86 50 40 cmplw cr1,r6,r10 ffc0b8cc: 41 9e 00 78 beq- cr7,ffc0b944 <_Heap_Walk+0x3e8> ffc0b8d0: 41 b9 ff 58 bgt- cr6,ffc0b828 <_Heap_Walk+0x2cc> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b8d4: 39 26 00 08 addi r9,r6,8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0b8d8: 41 a5 ff 50 bgt- cr1,ffc0b828 <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b8dc: 7c e9 43 96 divwu r7,r9,r8 ffc0b8e0: 7c e7 41 d6 mullw r7,r7,r8 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b8e4: 7c ab 2b 78 mr r11,r5 ); return false; } if ( ffc0b8e8: 7f 89 38 00 cmpw cr7,r9,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b8ec: 7c c5 33 78 mr r5,r6 ); return false; } if ( ffc0b8f0: 40 9e 03 4c bne- cr7,ffc0bc3c <_Heap_Walk+0x6e0> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0b8f4: 81 26 00 04 lwz r9,4(r6) ffc0b8f8: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b8fc: 7d 29 32 14 add r9,r9,r6 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0b900: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b904: 71 27 00 01 andi. r7,r9,1 ffc0b908: 40 82 03 5c bne- ffc0bc64 <_Heap_Walk+0x708> ); return false; } if ( free_block->prev != prev_block ) { ffc0b90c: 80 e6 00 0c lwz r7,12(r6) ffc0b910: 7f 87 58 00 cmpw cr7,r7,r11 ffc0b914: 41 9e ff a8 beq+ cr7,ffc0b8bc <_Heap_Walk+0x360> (*printer)( ffc0b918: 80 01 00 18 lwz r0,24(r1) ffc0b91c: 3c a0 ff c2 lis r5,-62 ffc0b920: 7f 23 cb 78 mr r3,r25 ffc0b924: 38 80 00 01 li r4,1 ffc0b928: 7c 09 03 a6 mtctr r0 ffc0b92c: 38 a5 ba 20 addi r5,r5,-17888 ffc0b930: 4c c6 31 82 crclr 4*cr1+eq ffc0b934: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b938: 38 60 00 00 li r3,0 ffc0b93c: 4b ff fc b4 b ffc0b5f0 <_Heap_Walk+0x94> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0b940: 80 1f 00 20 lwz r0,32(r31) "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b944: 3e 60 ff c2 lis r19,-62 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b948: 3e 80 ff c2 lis r20,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0b94c: 3e 40 ff c2 lis r18,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b950: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b954: 3a 73 bb d0 addi r19,r19,-17456 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b958: 3a 94 bb b8 addi r20,r20,-17480 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0b95c: 3a 52 bb 14 addi r18,r18,-17644 ffc0b960: 3e 20 ff c2 lis r17,-62 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b964: 3e a0 ff c2 lis r21,-62 ffc0b968: 3d e0 ff c2 lis r15,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0b96c: 3e 00 ff c2 lis r16,-62 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b970: 3d c0 ff c2 lis r14,-62 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0b974: 56 dc 00 3c rlwinm r28,r22,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0b978: 7f dc ea 14 add r30,r28,r29 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0b97c: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b980: 40 9d 00 34 ble- cr7,ffc0b9b4 <_Heap_Walk+0x458> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( ffc0b984: 3c a0 ff c2 lis r5,-62 ffc0b988: 7f 23 cb 78 mr r3,r25 ffc0b98c: 38 80 00 01 li r4,1 ffc0b990: 38 a5 ba 54 addi r5,r5,-17836 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b994: 80 01 00 18 lwz r0,24(r1) ffc0b998: 7f a6 eb 78 mr r6,r29 ffc0b99c: 7f c7 f3 78 mr r7,r30 ffc0b9a0: 7c 09 03 a6 mtctr r0 ffc0b9a4: 4c c6 31 82 crclr 4*cr1+eq ffc0b9a8: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0b9ac: 38 60 00 00 li r3,0 ffc0b9b0: 4b ff fc 40 b ffc0b5f0 <_Heap_Walk+0x94> ffc0b9b4: 80 1f 00 24 lwz r0,36(r31) ffc0b9b8: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b9bc: 41 bc ff c8 blt- cr7,ffc0b984 <_Heap_Walk+0x428> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b9c0: 7d 3c db 96 divwu r9,r28,r27 ffc0b9c4: 7d 29 d9 d6 mullw r9,r9,r27 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc0b9c8: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b9cc: 7f 9c 48 00 cmpw cr7,r28,r9 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc0b9d0: 7c 00 00 34 cntlzw r0,r0 ffc0b9d4: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0b9d8: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b9dc: 41 9e 00 0c beq- cr7,ffc0b9e8 <_Heap_Walk+0x48c> ffc0b9e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b9e4: 40 9e 01 e0 bne- cr7,ffc0bbc4 <_Heap_Walk+0x668> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0b9e8: 7f 98 e0 40 cmplw cr7,r24,r28 ffc0b9ec: 40 9d 00 0c ble- cr7,ffc0b9f8 <_Heap_Walk+0x49c> ffc0b9f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b9f4: 40 9e 02 00 bne- cr7,ffc0bbf4 <_Heap_Walk+0x698> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0b9f8: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0b9fc: 41 9c 00 0c blt- cr7,ffc0ba08 <_Heap_Walk+0x4ac> ffc0ba00: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ba04: 40 9e 02 24 bne- cr7,ffc0bc28 <_Heap_Walk+0x6cc> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0ba08: 80 1e 00 04 lwz r0,4(r30) ffc0ba0c: 56 d6 07 fe clrlwi r22,r22,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0ba10: 70 07 00 01 andi. r7,r0,1 ffc0ba14: 41 82 00 74 beq- ffc0ba88 <_Heap_Walk+0x52c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0ba18: 2f 96 00 00 cmpwi cr7,r22,0 ffc0ba1c: 41 9e 00 40 beq- cr7,ffc0ba5c <_Heap_Walk+0x500> (*printer)( ffc0ba20: 80 01 00 18 lwz r0,24(r1) ffc0ba24: 7f 23 cb 78 mr r3,r25 ffc0ba28: 38 80 00 00 li r4,0 ffc0ba2c: 7e 85 a3 78 mr r5,r20 ffc0ba30: 7c 09 03 a6 mtctr r0 ffc0ba34: 7f a6 eb 78 mr r6,r29 ffc0ba38: 7f 87 e3 78 mr r7,r28 ffc0ba3c: 4c c6 31 82 crclr 4*cr1+eq ffc0ba40: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0ba44: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0ba48: 41 9e 01 0c beq- cr7,ffc0bb54 <_Heap_Walk+0x5f8> ffc0ba4c: 82 de 00 04 lwz r22,4(r30) ffc0ba50: 7f dd f3 78 mr r29,r30 ffc0ba54: 80 1f 00 20 lwz r0,32(r31) ffc0ba58: 4b ff ff 1c b ffc0b974 <_Heap_Walk+0x418> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0ba5c: 80 01 00 18 lwz r0,24(r1) ffc0ba60: 7f a6 eb 78 mr r6,r29 ffc0ba64: 7f 23 cb 78 mr r3,r25 ffc0ba68: 81 1d 00 00 lwz r8,0(r29) ffc0ba6c: 38 80 00 00 li r4,0 ffc0ba70: 7c 09 03 a6 mtctr r0 ffc0ba74: 7e 65 9b 78 mr r5,r19 ffc0ba78: 7f 87 e3 78 mr r7,r28 ffc0ba7c: 4c c6 31 82 crclr 4*cr1+eq ffc0ba80: 4e 80 04 21 bctrl ffc0ba84: 4b ff ff c0 b ffc0ba44 <_Heap_Walk+0x4e8> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? ffc0ba88: 81 1d 00 0c lwz r8,12(r29) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0ba8c: 81 3f 00 08 lwz r9,8(r31) block = next_block; } while ( block != first_block ); return true; } ffc0ba90: 80 1f 00 0c lwz r0,12(r31) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0ba94: 7f 89 40 00 cmpw cr7,r9,r8 ffc0ba98: 41 9e 01 00 beq- cr7,ffc0bb98 <_Heap_Walk+0x63c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0ba9c: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0baa0: 41 9e 01 08 beq- cr7,ffc0bba8 <_Heap_Walk+0x64c> ffc0baa4: 39 35 bb 84 addi r9,r21,-17532 block->next, block->next == last_free_block ? ffc0baa8: 81 5d 00 08 lwz r10,8(r29) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0baac: 7f 80 50 00 cmpw cr7,r0,r10 ffc0bab0: 41 9e 00 e0 beq- cr7,ffc0bb90 <_Heap_Walk+0x634> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0bab4: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0bab8: 41 9e 00 e8 beq- cr7,ffc0bba0 <_Heap_Walk+0x644> ffc0babc: 38 15 bb 84 addi r0,r21,-17532 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bac0: 90 01 00 08 stw r0,8(r1) ffc0bac4: 7f 23 cb 78 mr r3,r25 ffc0bac8: 38 80 00 00 li r4,0 ffc0bacc: 80 01 00 18 lwz r0,24(r1) ffc0bad0: 7e 45 93 78 mr r5,r18 ffc0bad4: 7f a6 eb 78 mr r6,r29 ffc0bad8: 7f 87 e3 78 mr r7,r28 ffc0badc: 7c 09 03 a6 mtctr r0 ffc0bae0: 4c c6 31 82 crclr 4*cr1+eq ffc0bae4: 4e 80 04 21 bctrl block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0bae8: 81 1e 00 00 lwz r8,0(r30) ffc0baec: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0baf0: 40 9e 00 6c bne- cr7,ffc0bb5c <_Heap_Walk+0x600> ); return false; } if ( !prev_used ) { ffc0baf4: 2f 96 00 00 cmpwi cr7,r22,0 ffc0baf8: 41 9e 00 b8 beq- cr7,ffc0bbb0 <_Heap_Walk+0x654> block = next_block; } while ( block != first_block ); return true; } ffc0bafc: 81 3f 00 08 lwz r9,8(r31) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0bb00: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0bb04: 41 9e 00 24 beq- cr7,ffc0bb28 <_Heap_Walk+0x5cc> <== NEVER TAKEN if ( free_block == block ) { ffc0bb08: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0bb0c: 40 be 00 0c bne+ cr7,ffc0bb18 <_Heap_Walk+0x5bc> ffc0bb10: 4b ff ff 34 b ffc0ba44 <_Heap_Walk+0x4e8> ffc0bb14: 41 ba ff 30 beq- cr6,ffc0ba44 <_Heap_Walk+0x4e8> return true; } free_block = free_block->next; ffc0bb18: 81 29 00 08 lwz r9,8(r9) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0bb1c: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0bb20: 7f 1d 48 00 cmpw cr6,r29,r9 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0bb24: 40 9e ff f0 bne+ cr7,ffc0bb14 <_Heap_Walk+0x5b8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0bb28: 3c a0 ff c2 lis r5,-62 ffc0bb2c: 7f 23 cb 78 mr r3,r25 ffc0bb30: 38 80 00 01 li r4,1 ffc0bb34: 38 a5 bb f8 addi r5,r5,-17416 ffc0bb38: 80 01 00 18 lwz r0,24(r1) ffc0bb3c: 7f a6 eb 78 mr r6,r29 ffc0bb40: 7c 09 03 a6 mtctr r0 ffc0bb44: 4c c6 31 82 crclr 4*cr1+eq ffc0bb48: 4e 80 04 21 bctrl return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; ffc0bb4c: 38 60 00 00 li r3,0 ffc0bb50: 4b ff fa a0 b ffc0b5f0 <_Heap_Walk+0x94> } block = next_block; } while ( block != first_block ); return true; ffc0bb54: 38 60 00 01 li r3,1 ffc0bb58: 4b ff fa 98 b ffc0b5f0 <_Heap_Walk+0x94> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0bb5c: 80 01 00 18 lwz r0,24(r1) ffc0bb60: 3c a0 ff c2 lis r5,-62 ffc0bb64: 7f 23 cb 78 mr r3,r25 ffc0bb68: 38 80 00 01 li r4,1 ffc0bb6c: 7c 09 03 a6 mtctr r0 ffc0bb70: 38 a5 bb 4c addi r5,r5,-17588 ffc0bb74: 7f a6 eb 78 mr r6,r29 ffc0bb78: 7f 87 e3 78 mr r7,r28 ffc0bb7c: 7f c9 f3 78 mr r9,r30 ffc0bb80: 4c c6 31 82 crclr 4*cr1+eq ffc0bb84: 4e 80 04 21 bctrl return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; ffc0bb88: 38 60 00 00 li r3,0 ffc0bb8c: 4b ff fa 64 b ffc0b5f0 <_Heap_Walk+0x94> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bb90: 38 11 b8 00 addi r0,r17,-18432 ffc0bb94: 4b ff ff 2c b ffc0bac0 <_Heap_Walk+0x564> ffc0bb98: 39 30 b7 e4 addi r9,r16,-18460 ffc0bb9c: 4b ff ff 0c b ffc0baa8 <_Heap_Walk+0x54c> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0bba0: 38 0f b8 10 addi r0,r15,-18416 ffc0bba4: 4b ff ff 1c b ffc0bac0 <_Heap_Walk+0x564> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0bba8: 39 2e b7 f4 addi r9,r14,-18444 ffc0bbac: 4b ff fe fc b ffc0baa8 <_Heap_Walk+0x54c> return false; } if ( !prev_used ) { (*printer)( ffc0bbb0: 3c a0 ff c2 lis r5,-62 ffc0bbb4: 7f 23 cb 78 mr r3,r25 ffc0bbb8: 38 80 00 01 li r4,1 ffc0bbbc: 38 a5 bb 88 addi r5,r5,-17528 ffc0bbc0: 4b ff ff 78 b ffc0bb38 <_Heap_Walk+0x5dc> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0bbc4: 80 01 00 18 lwz r0,24(r1) ffc0bbc8: 3c a0 ff c2 lis r5,-62 ffc0bbcc: 7f 23 cb 78 mr r3,r25 ffc0bbd0: 38 80 00 01 li r4,1 ffc0bbd4: 7c 09 03 a6 mtctr r0 ffc0bbd8: 38 a5 ba 84 addi r5,r5,-17788 ffc0bbdc: 7f a6 eb 78 mr r6,r29 ffc0bbe0: 7f 87 e3 78 mr r7,r28 ffc0bbe4: 4c c6 31 82 crclr 4*cr1+eq ffc0bbe8: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0bbec: 38 60 00 00 li r3,0 ffc0bbf0: 4b ff fa 00 b ffc0b5f0 <_Heap_Walk+0x94> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( ffc0bbf4: 80 01 00 18 lwz r0,24(r1) ffc0bbf8: 3c a0 ff c2 lis r5,-62 ffc0bbfc: 7f 23 cb 78 mr r3,r25 ffc0bc00: 38 80 00 01 li r4,1 ffc0bc04: 7c 09 03 a6 mtctr r0 ffc0bc08: 38 a5 ba b4 addi r5,r5,-17740 ffc0bc0c: 7f a6 eb 78 mr r6,r29 ffc0bc10: 7f 87 e3 78 mr r7,r28 ffc0bc14: 7f 08 c3 78 mr r8,r24 ffc0bc18: 4c c6 31 82 crclr 4*cr1+eq ffc0bc1c: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0bc20: 38 60 00 00 li r3,0 ffc0bc24: 4b ff f9 cc b ffc0b5f0 <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0bc28: 3c a0 ff c2 lis r5,-62 ffc0bc2c: 7f 23 cb 78 mr r3,r25 ffc0bc30: 38 80 00 01 li r4,1 ffc0bc34: 38 a5 ba e0 addi r5,r5,-17696 ffc0bc38: 4b ff fd 5c b ffc0b994 <_Heap_Walk+0x438> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0bc3c: 80 01 00 18 lwz r0,24(r1) ffc0bc40: 3c a0 ff c2 lis r5,-62 ffc0bc44: 7f 23 cb 78 mr r3,r25 ffc0bc48: 38 80 00 01 li r4,1 ffc0bc4c: 7c 09 03 a6 mtctr r0 ffc0bc50: 38 a5 b9 d4 addi r5,r5,-17964 ffc0bc54: 4c c6 31 82 crclr 4*cr1+eq ffc0bc58: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0bc5c: 38 60 00 00 li r3,0 ffc0bc60: 4b ff f9 90 b ffc0b5f0 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0bc64: 80 01 00 18 lwz r0,24(r1) ffc0bc68: 3c a0 ff c2 lis r5,-62 ffc0bc6c: 7f 23 cb 78 mr r3,r25 ffc0bc70: 38 80 00 01 li r4,1 ffc0bc74: 7c 09 03 a6 mtctr r0 ffc0bc78: 38 a5 ba 04 addi r5,r5,-17916 ffc0bc7c: 4c c6 31 82 crclr 4*cr1+eq ffc0bc80: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0bc84: 38 60 00 00 li r3,0 ffc0bc88: 4b ff f9 68 b ffc0b5f0 <_Heap_Walk+0x94> =============================================================================== ffc0b45c <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b45c: 94 21 ff 88 stwu r1,-120(r1) ffc0b460: 7c 08 02 a6 mflr r0 ffc0b464: 93 e1 00 74 stw r31,116(r1) ffc0b468: 90 01 00 7c stw r0,124(r1) ffc0b46c: 7c 60 1b 78 mr r0,r3 ffc0b470: 90 c1 00 1c stw r6,28(r1) ffc0b474: 90 e1 00 20 stw r7,32(r1) ffc0b478: 91 01 00 24 stw r8,36(r1) ffc0b47c: 91 21 00 28 stw r9,40(r1) ffc0b480: 91 41 00 2c stw r10,44(r1) ffc0b484: 40 86 00 24 bne- cr1,ffc0b4a8 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b488: d8 21 00 30 stfd f1,48(r1) ffc0b48c: d8 41 00 38 stfd f2,56(r1) ffc0b490: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b494: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b498: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b49c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b4a0: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b4a4: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b4a8: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b4ac: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b4b0: 40 9e 00 58 bne- cr7,ffc0b508 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b4b4: 3c 60 ff c2 lis r3,-62 ffc0b4b8: 7c 04 03 78 mr r4,r0 ffc0b4bc: 38 63 b7 d8 addi r3,r3,-18472 ffc0b4c0: 4c c6 31 82 crclr 4*cr1+eq ffc0b4c4: 4b ff b1 2d bl ffc065f0 } va_start( ap, fmt ); ffc0b4c8: 38 00 00 03 li r0,3 ffc0b4cc: 98 01 00 08 stb r0,8(r1) ffc0b4d0: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b4d4: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b4d8: 98 01 00 09 stb r0,9(r1) ffc0b4dc: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b4e0: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b4e4: 90 01 00 0c stw r0,12(r1) ffc0b4e8: 38 01 00 10 addi r0,r1,16 ffc0b4ec: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b4f0: 4b ff d4 fd bl ffc089ec va_end( ap ); } ffc0b4f4: 80 01 00 7c lwz r0,124(r1) ffc0b4f8: 83 e1 00 74 lwz r31,116(r1) ffc0b4fc: 38 21 00 78 addi r1,r1,120 ffc0b500: 7c 08 03 a6 mtlr r0 ffc0b504: 4e 80 00 20 blr static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); ffc0b508: 3c 60 ff c2 lis r3,-62 ffc0b50c: 7c 04 03 78 mr r4,r0 ffc0b510: 38 63 b7 cc addi r3,r3,-18484 ffc0b514: 4c c6 31 82 crclr 4*cr1+eq ffc0b518: 4b ff b0 d9 bl ffc065f0 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b51c: 38 00 00 03 li r0,3 ffc0b520: 98 01 00 08 stb r0,8(r1) ffc0b524: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b528: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b52c: 98 01 00 09 stb r0,9(r1) ffc0b530: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b534: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b538: 90 01 00 0c stw r0,12(r1) ffc0b53c: 38 01 00 10 addi r0,r1,16 ffc0b540: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b544: 4b ff d4 a9 bl ffc089ec va_end( ap ); } ffc0b548: 80 01 00 7c lwz r0,124(r1) ffc0b54c: 83 e1 00 74 lwz r31,116(r1) ffc0b550: 38 21 00 78 addi r1,r1,120 ffc0b554: 7c 08 03 a6 mtlr r0 ffc0b558: 4e 80 00 20 blr =============================================================================== ffc09938 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09938: 94 21 ff f0 stwu r1,-16(r1) ffc0993c: 7c 08 02 a6 mflr r0 ffc09940: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09944: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09948: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0994c: 80 1e 27 e4 lwz r0,10212(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09950: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09954: 2f 80 00 00 cmpwi cr7,r0,0 ffc09958: 41 9e 00 2c beq- cr7,ffc09984 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc0995c: 3b e0 00 00 li r31,0 ffc09960: 3b de 27 e4 addi r30,r30,10212 (void) rtems_io_initialize( major, 0, NULL ); ffc09964: 7f e3 fb 78 mr r3,r31 ffc09968: 38 80 00 00 li r4,0 ffc0996c: 38 a0 00 00 li r5,0 ffc09970: 48 00 6c 41 bl ffc105b0 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09974: 80 1e 00 00 lwz r0,0(r30) ffc09978: 3b ff 00 01 addi r31,r31,1 ffc0997c: 7f 80 f8 40 cmplw cr7,r0,r31 ffc09980: 41 9d ff e4 bgt+ cr7,ffc09964 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc09984: 80 01 00 14 lwz r0,20(r1) ffc09988: 83 c1 00 08 lwz r30,8(r1) ffc0998c: 7c 08 03 a6 mtlr r0 ffc09990: 83 e1 00 0c lwz r31,12(r1) ffc09994: 38 21 00 10 addi r1,r1,16 ffc09998: 4e 80 00 20 blr =============================================================================== ffc09828 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc09828: 94 21 ff e0 stwu r1,-32(r1) ffc0982c: 7c 08 02 a6 mflr r0 uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc09830: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc09834: 90 01 00 24 stw r0,36(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc09838: 39 29 20 a0 addi r9,r9,8352 * workspace. * */ void _IO_Manager_initialization(void) { ffc0983c: 93 a1 00 14 stw r29,20(r1) ffc09840: 93 c1 00 18 stw r30,24(r1) uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; ffc09844: 83 a9 00 30 lwz r29,48(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; ffc09848: 83 c9 00 34 lwz r30,52(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc0984c: 93 e1 00 1c stw r31,28(r1) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc09850: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc09854: 93 61 00 0c stw r27,12(r1) ffc09858: 93 81 00 10 stw r28,16(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc0985c: 83 e9 00 38 lwz r31,56(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc09860: 40 9c 00 a4 bge- cr7,ffc09904 <_IO_Manager_initialization+0xdc> * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ffc09864: 1f 7d 00 18 mulli r27,r29,24 * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( ffc09868: 7f 63 db 78 mr r3,r27 ffc0986c: 48 00 3f 19 bl ffc0d784 <_Workspace_Allocate_or_fatal_error> /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc09870: 3f 80 00 00 lis r28,0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc09874: 3d 20 00 00 lis r9,0 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc09878: 90 7c 27 e8 stw r3,10216(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc0987c: 38 80 00 00 li r4,0 ffc09880: 7f 65 db 78 mr r5,r27 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc09884: 93 a9 27 e4 stw r29,10212(r9) memset( ffc09888: 48 00 aa c5 bl ffc1434c _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0988c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09890: 41 9e 00 50 beq- cr7,ffc098e0 <_IO_Manager_initialization+0xb8><== NEVER TAKEN ffc09894: 7f c9 03 a6 mtctr r30 ffc09898: 81 1c 27 e8 lwz r8,10216(r28) ffc0989c: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc098a0: 7f e9 fb 78 mr r9,r31 ffc098a4: 7c a9 50 6e lwzux r5,r9,r10 ffc098a8: 7d 68 52 14 add r11,r8,r10 ffc098ac: 80 e9 00 08 lwz r7,8(r9) ffc098b0: 80 09 00 0c lwz r0,12(r9) ffc098b4: 80 c9 00 04 lwz r6,4(r9) ffc098b8: 7c a8 51 2e stwx r5,r8,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc098bc: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc098c0: 90 cb 00 04 stw r6,4(r11) ffc098c4: 90 eb 00 08 stw r7,8(r11) ffc098c8: 90 0b 00 0c stw r0,12(r11) ffc098cc: 80 e9 00 10 lwz r7,16(r9) ffc098d0: 80 09 00 14 lwz r0,20(r9) ffc098d4: 90 eb 00 10 stw r7,16(r11) ffc098d8: 90 0b 00 14 stw r0,20(r11) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc098dc: 42 00 ff c4 bdnz+ ffc098a0 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc098e0: 80 01 00 24 lwz r0,36(r1) ffc098e4: 83 61 00 0c lwz r27,12(r1) ffc098e8: 7c 08 03 a6 mtlr r0 ffc098ec: 83 81 00 10 lwz r28,16(r1) ffc098f0: 83 a1 00 14 lwz r29,20(r1) ffc098f4: 83 c1 00 18 lwz r30,24(r1) ffc098f8: 83 e1 00 1c lwz r31,28(r1) ffc098fc: 38 21 00 20 addi r1,r1,32 ffc09900: 4e 80 00 20 blr ffc09904: 80 01 00 24 lwz r0,36(r1) * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; ffc09908: 3d 20 00 00 lis r9,0 ffc0990c: 93 e9 27 e8 stw r31,10216(r9) _IO_Number_of_drivers = number_of_drivers; ffc09910: 3d 20 00 00 lis r9,0 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc09914: 7c 08 03 a6 mtlr r0 * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; _IO_Number_of_drivers = number_of_drivers; ffc09918: 93 c9 27 e4 stw r30,10212(r9) sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc0991c: 83 61 00 0c lwz r27,12(r1) ffc09920: 83 81 00 10 lwz r28,16(r1) ffc09924: 83 a1 00 14 lwz r29,20(r1) ffc09928: 83 c1 00 18 lwz r30,24(r1) ffc0992c: 83 e1 00 1c lwz r31,28(r1) ffc09930: 38 21 00 20 addi r1,r1,32 ffc09934: 4e 80 00 20 blr =============================================================================== ffc0a874 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0a874: 94 21 ff f0 stwu r1,-16(r1) ffc0a878: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc0a87c: 3d 60 00 00 lis r11,0 ffc0a880: 39 2b 2c f0 addi r9,r11,11504 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0a884: 90 01 00 14 stw r0,20(r1) ffc0a888: 93 e1 00 0c stw r31,12(r1) ffc0a88c: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0a890: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc0a894: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc0a898: 90 6b 2c f0 stw r3,11504(r11) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); ffc0a89c: 48 00 27 bd bl ffc0d058 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0a8a0: 38 00 00 05 li r0,5 ffc0a8a4: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0a8a8: 7f e3 fb 78 mr r3,r31 ffc0a8ac: 90 09 27 d0 stw r0,10192(r9) ffc0a8b0: 4b ff 92 99 bl ffc03b48 <_BSP_Fatal_error> ffc0a8b4: 48 00 00 00 b ffc0a8b4 <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc0a8cc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0a8cc: 94 21 ff f0 stwu r1,-16(r1) ffc0a8d0: 7c 08 02 a6 mflr r0 ffc0a8d4: 90 01 00 14 stw r0,20(r1) * 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 ) ffc0a8d8: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0a8dc: 93 e1 00 0c stw r31,12(r1) ffc0a8e0: 7c 7f 1b 78 mr r31,r3 * 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 ) ffc0a8e4: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0a8e8: 93 c1 00 08 stw r30,8(r1) * 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 ) return NULL; ffc0a8ec: 38 60 00 00 li r3,0 * 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 ) ffc0a8f0: 40 9e 00 1c bne- cr7,ffc0a90c <_Objects_Allocate+0x40> <== ALWAYS TAKEN ); } #endif return the_object; } ffc0a8f4: 80 01 00 14 lwz r0,20(r1) ffc0a8f8: 83 c1 00 08 lwz r30,8(r1) ffc0a8fc: 7c 08 03 a6 mtlr r0 ffc0a900: 83 e1 00 0c lwz r31,12(r1) ffc0a904: 38 21 00 10 addi r1,r1,16 ffc0a908: 4e 80 00 20 blr /* * 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 ); ffc0a90c: 3b df 00 20 addi r30,r31,32 ffc0a910: 7f c3 f3 78 mr r3,r30 ffc0a914: 4b ff f4 09 bl ffc09d1c <_Chain_Get> if ( information->auto_extend ) { ffc0a918: 88 1f 00 12 lbz r0,18(r31) ffc0a91c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a920: 41 be ff d4 beq- cr7,ffc0a8f4 <_Objects_Allocate+0x28> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0a924: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a928: 41 9e 00 50 beq- cr7,ffc0a978 <_Objects_Allocate+0xac> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0a92c: a1 63 00 0a lhz r11,10(r3) ffc0a930: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0a934: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0a938: 7c 00 58 50 subf r0,r0,r11 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0a93c: a1 7f 00 2c lhz r11,44(r31) if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0a940: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc0a944: 81 3f 00 30 lwz r9,48(r31) ); } #endif return the_object; } ffc0a948: 83 c1 00 08 lwz r30,8(r1) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0a94c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a950: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0a954: 39 6b ff ff addi r11,r11,-1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0a958: 39 4a ff ff addi r10,r10,-1 ffc0a95c: 7d 49 01 2e stwx r10,r9,r0 ); } #endif return the_object; } ffc0a960: 80 01 00 14 lwz r0,20(r1) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0a964: b1 7f 00 2c sth r11,44(r31) ); } #endif return the_object; } ffc0a968: 7c 08 03 a6 mtlr r0 ffc0a96c: 83 e1 00 0c lwz r31,12(r1) ffc0a970: 38 21 00 10 addi r1,r1,16 ffc0a974: 4e 80 00 20 blr * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); ffc0a978: 7f e3 fb 78 mr r3,r31 ffc0a97c: 48 00 00 4d bl ffc0a9c8 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0a980: 7f c3 f3 78 mr r3,r30 ffc0a984: 4b ff f3 99 bl ffc09d1c <_Chain_Get> } if ( the_object ) { ffc0a988: 2c 03 00 00 cmpwi r3,0 ffc0a98c: 41 82 ff 68 beq+ ffc0a8f4 <_Objects_Allocate+0x28> ffc0a990: 4b ff ff 9c b ffc0a92c <_Objects_Allocate+0x60> =============================================================================== ffc0a9c8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a9c8: 94 21 ff c0 stwu r1,-64(r1) ffc0a9cc: 7c 08 02 a6 mflr r0 ffc0a9d0: 90 01 00 44 stw r0,68(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a9d4: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a9d8: 93 a1 00 34 stw r29,52(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a9dc: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a9e0: 93 e1 00 3c stw r31,60(r1) ffc0a9e4: 7c 7f 1b 78 mr r31,r3 ffc0a9e8: 92 c1 00 18 stw r22,24(r1) ffc0a9ec: 92 e1 00 1c stw r23,28(r1) ffc0a9f0: 93 01 00 20 stw r24,32(r1) ffc0a9f4: 93 21 00 24 stw r25,36(r1) ffc0a9f8: 93 41 00 28 stw r26,40(r1) ffc0a9fc: 93 61 00 2c stw r27,44(r1) ffc0aa00: 93 81 00 30 stw r28,48(r1) ffc0aa04: 93 c1 00 38 stw r30,56(r1) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0aa08: a3 a3 00 0a lhz r29,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0aa0c: 41 9e 02 8c beq- cr7,ffc0ac98 <_Objects_Extend_information+0x2d0> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0aa10: a3 43 00 10 lhz r26,16(r3) ffc0aa14: a1 63 00 14 lhz r11,20(r3) ffc0aa18: 7e da 5b 96 divwu r22,r26,r11 for ( ; block < block_count; block++ ) { ffc0aa1c: 2f 96 00 00 cmpwi cr7,r22,0 ffc0aa20: 41 9e 02 94 beq- cr7,ffc0acb4 <_Objects_Extend_information+0x2ec><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0aa24: 80 09 00 00 lwz r0,0(r9) ffc0aa28: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aa2c: 41 9e 02 9c beq- cr7,ffc0acc8 <_Objects_Extend_information+0x300><== NEVER TAKEN ffc0aa30: 7d 6a 5b 78 mr r10,r11 * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0aa34: 7e c9 03 a6 mtctr r22 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0aa38: 7f be eb 78 mr r30,r29 index_base = minimum_index; block = 0; ffc0aa3c: 3b 60 00 00 li r27,0 ffc0aa40: 48 00 00 10 b ffc0aa50 <_Objects_Extend_information+0x88> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0aa44: 84 09 00 04 lwzu r0,4(r9) ffc0aa48: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aa4c: 41 9e 01 fc beq- cr7,ffc0ac48 <_Objects_Extend_information+0x280> do_extend = false; break; } else index_base += information->allocation_size; ffc0aa50: 7f de 5a 14 add r30,r30,r11 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0aa54: 3b 7b 00 01 addi r27,r27,1 ffc0aa58: 42 00 ff ec bdnz+ ffc0aa44 <_Objects_Extend_information+0x7c> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0aa5c: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0aa60: 7f 5a 52 14 add r26,r26,r10 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { ffc0aa64: 2b 9a ff ff cmplwi cr7,r26,65535 ffc0aa68: 41 9d 01 a8 bgt- cr7,ffc0ac10 <_Objects_Extend_information+0x248> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc0aa6c: 88 1f 00 12 lbz r0,18(r31) /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0aa70: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0aa74: 2f 80 00 00 cmpwi cr7,r0,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0aa78: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0aa7c: 41 9e 01 d4 beq- cr7,ffc0ac50 <_Objects_Extend_information+0x288> new_object_block = _Workspace_Allocate( block_size ); ffc0aa80: 48 00 2c a5 bl ffc0d724 <_Workspace_Allocate> if ( !new_object_block ) ffc0aa84: 7c 7c 1b 79 mr. r28,r3 ffc0aa88: 41 82 01 88 beq- ffc0ac10 <_Objects_Extend_information+0x248> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0aa8c: 2f 99 00 00 cmpwi cr7,r25,0 ffc0aa90: 41 9e 00 fc beq- cr7,ffc0ab8c <_Objects_Extend_information+0x1c4> */ /* * Up the block count and maximum */ block_count++; ffc0aa94: 3a f6 00 01 addi r23,r22,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0aa98: 1c 77 00 03 mulli r3,r23,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc0aa9c: 7c 7a 1a 14 add r3,r26,r3 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0aaa0: 7c 63 ea 14 add r3,r3,r29 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0aaa4: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0aaa8: 48 00 2c 7d bl ffc0d724 <_Workspace_Allocate> if ( !object_blocks ) { ffc0aaac: 7c 78 1b 79 mr. r24,r3 ffc0aab0: 41 82 02 2c beq- ffc0acdc <_Objects_Extend_information+0x314> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0aab4: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0aab8: 56 f7 10 3a rlwinm r23,r23,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0aabc: 7f 38 ba 14 add r25,r24,r23 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0aac0: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0aac4: 7e f9 ba 14 add r23,r25,r23 ffc0aac8: 41 9c 01 94 blt- cr7,ffc0ac5c <_Objects_Extend_information+0x294> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aacc: 2f 9d 00 00 cmpwi cr7,r29,0 local_table[ index ] = NULL; ffc0aad0: 7f a9 03 a6 mtctr r29 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0aad4: 39 37 ff fc addi r9,r23,-4 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc0aad8: 38 00 00 00 li r0,0 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aadc: 41 9e 00 0c beq- cr7,ffc0aae8 <_Objects_Extend_information+0x120><== NEVER TAKEN local_table[ index ] = NULL; ffc0aae0: 94 09 00 04 stwu r0,4(r9) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aae4: 42 00 ff fc bdnz+ ffc0aae0 <_Objects_Extend_information+0x118> ffc0aae8: 56 d6 10 3a rlwinm r22,r22,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0aaec: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0aaf0: 38 00 00 00 li r0,0 ffc0aaf4: 7c 18 b1 2e stwx r0,r24,r22 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0aaf8: 7d 7e 5a 14 add r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0aafc: 7f 9e 58 40 cmplw cr7,r30,r11 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc0ab00: 7c 19 b1 2e stwx r0,r25,r22 for ( index=index_base ; ffc0ab04: 40 9c 00 30 bge- cr7,ffc0ab34 <_Objects_Extend_information+0x16c><== NEVER TAKEN ffc0ab08: 38 1e 00 01 addi r0,r30,1 ffc0ab0c: 7f 80 58 40 cmplw cr7,r0,r11 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0ab10: 57 c9 10 3a rlwinm r9,r30,2,0,29 ffc0ab14: 39 29 ff fc addi r9,r9,-4 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0ab18: 7d 7e 58 50 subf r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0ab1c: 7d 29 ba 14 add r9,r9,r23 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0ab20: 7d 69 03 a6 mtctr r11 ffc0ab24: 38 00 00 00 li r0,0 ffc0ab28: 41 9d 01 c0 bgt- cr7,ffc0ace8 <_Objects_Extend_information+0x320><== NEVER TAKEN ffc0ab2c: 94 09 00 04 stwu r0,4(r9) * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0ab30: 42 00 ff fc bdnz+ ffc0ab2c <_Objects_Extend_information+0x164> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ab34: 7c 00 00 a6 mfmsr r0 ffc0ab38: 7d 30 42 a6 mfsprg r9,0 ffc0ab3c: 7c 09 48 78 andc r9,r0,r9 ffc0ab40: 7d 20 01 24 mtmsr r9 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0ab44: 81 7f 00 00 lwz r11,0(r31) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc0ab48: 57 5a 04 3e clrlwi r26,r26,16 information->maximum_id = _Objects_Build_id( ffc0ab4c: a1 3f 00 04 lhz r9,4(r31) ffc0ab50: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0ab54: 80 7f 00 34 lwz r3,52(r31) ffc0ab58: 65 6b 00 01 oris r11,r11,1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0ab5c: 93 3f 00 30 stw r25,48(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0ab60: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0ab64: 7d 69 4b 78 or r9,r11,r9 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0ab68: 93 1f 00 34 stw r24,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0ab6c: 7d 29 d3 78 or r9,r9,r26 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0ab70: 92 ff 00 1c stw r23,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0ab74: b3 5f 00 10 sth r26,16(r31) information->maximum_id = _Objects_Build_id( ffc0ab78: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ab7c: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc0ab80: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ab84: 41 9e 00 08 beq- cr7,ffc0ab8c <_Objects_Extend_information+0x1c4> _Workspace_Free( old_tables ); ffc0ab88: 48 00 2b d1 bl ffc0d758 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0ab8c: 81 3f 00 34 lwz r9,52(r31) ffc0ab90: 57 7b 10 3a rlwinm r27,r27,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0ab94: 3b a1 00 08 addi r29,r1,8 ffc0ab98: a0 bf 00 14 lhz r5,20(r31) } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0ab9c: 7f 89 d9 2e stwx r28,r9,r27 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0aba0: 7f 84 e3 78 mr r4,r28 ffc0aba4: 7f a3 eb 78 mr r3,r29 ffc0aba8: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0abac: 3b 9f 00 20 addi r28,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0abb0: 48 00 5a 5d bl ffc1060c <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0abb4: 48 00 00 2c b ffc0abe0 <_Objects_Extend_information+0x218> ffc0abb8: 81 7f 00 00 lwz r11,0(r31) the_object->id = _Objects_Build_id( ffc0abbc: a0 1f 00 04 lhz r0,4(r31) ffc0abc0: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0abc4: 65 6b 00 01 oris r11,r11,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0abc8: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0abcc: 7d 60 03 78 or r0,r11,r0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0abd0: 7c 00 f3 78 or r0,r0,r30 ffc0abd4: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0abd8: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0abdc: 4b ff f0 e9 bl ffc09cc4 <_Chain_Append> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0abe0: 7f a3 eb 78 mr r3,r29 ffc0abe4: 4b ff f1 39 bl ffc09d1c <_Chain_Get> ffc0abe8: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0abec: 7f 83 e3 78 mr r3,r28 ffc0abf0: 7d 24 4b 78 mr r4,r9 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0abf4: 40 82 ff c4 bne+ ffc0abb8 <_Objects_Extend_information+0x1f0> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0abf8: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0abfc: a0 1f 00 14 lhz r0,20(r31) ffc0ac00: 81 7f 00 30 lwz r11,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0ac04: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0ac08: 7c 0b d9 2e stwx r0,r11,r27 information->inactive = ffc0ac0c: b1 3f 00 2c sth r9,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0ac10: 80 01 00 44 lwz r0,68(r1) ffc0ac14: 82 c1 00 18 lwz r22,24(r1) ffc0ac18: 7c 08 03 a6 mtlr r0 ffc0ac1c: 82 e1 00 1c lwz r23,28(r1) ffc0ac20: 83 01 00 20 lwz r24,32(r1) ffc0ac24: 83 21 00 24 lwz r25,36(r1) ffc0ac28: 83 41 00 28 lwz r26,40(r1) ffc0ac2c: 83 61 00 2c lwz r27,44(r1) ffc0ac30: 83 81 00 30 lwz r28,48(r1) ffc0ac34: 83 a1 00 34 lwz r29,52(r1) ffc0ac38: 83 c1 00 38 lwz r30,56(r1) ffc0ac3c: 83 e1 00 3c lwz r31,60(r1) ffc0ac40: 38 21 00 40 addi r1,r1,64 ffc0ac44: 4e 80 00 20 blr else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0ac48: 3b 20 00 00 li r25,0 ffc0ac4c: 4b ff fe 14 b ffc0aa60 <_Objects_Extend_information+0x98> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc0ac50: 48 00 2b 35 bl ffc0d784 <_Workspace_Allocate_or_fatal_error> ffc0ac54: 7c 7c 1b 78 mr r28,r3 ffc0ac58: 4b ff fe 34 b ffc0aa8c <_Objects_Extend_information+0xc4> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0ac5c: 56 d6 10 3a rlwinm r22,r22,2,0,29 /* * 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, ffc0ac60: 80 9f 00 34 lwz r4,52(r31) ffc0ac64: 7e c5 b3 78 mr r5,r22 ffc0ac68: 48 00 96 05 bl ffc1426c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0ac6c: 80 9f 00 30 lwz r4,48(r31) ffc0ac70: 7e c5 b3 78 mr r5,r22 ffc0ac74: 7f 23 cb 78 mr r3,r25 ffc0ac78: 48 00 95 f5 bl ffc1426c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0ac7c: a0 bf 00 10 lhz r5,16(r31) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0ac80: 80 9f 00 1c lwz r4,28(r31) ffc0ac84: 7e e3 bb 78 mr r3,r23 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0ac88: 7c bd 2a 14 add r5,r29,r5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0ac8c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0ac90: 48 00 95 dd bl ffc1426c ffc0ac94: 4b ff fe 58 b ffc0aaec <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0ac98: a3 43 00 10 lhz r26,16(r3) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0ac9c: 7f be eb 78 mr r30,r29 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0aca0: a1 43 00 14 lhz r10,20(r3) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0aca4: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0aca8: 3b 60 00 00 li r27,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0acac: 3a c0 00 00 li r22,0 ffc0acb0: 4b ff fd b0 b ffc0aa60 <_Objects_Extend_information+0x98> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0acb4: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0acb8: 7f be eb 78 mr r30,r29 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0acbc: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0acc0: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0acc4: 4b ff fd 9c b ffc0aa60 <_Objects_Extend_information+0x98><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0acc8: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0accc: 7f be eb 78 mr r30,r29 <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0acd0: 3b 20 00 00 li r25,0 <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0acd4: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0acd8: 4b ff fd 88 b ffc0aa60 <_Objects_Extend_information+0x98><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); ffc0acdc: 7f 83 e3 78 mr r3,r28 ffc0ace0: 48 00 2a 79 bl ffc0d758 <_Workspace_Free> return; ffc0ace4: 4b ff ff 2c b ffc0ac10 <_Objects_Extend_information+0x248> ffc0ace8: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0acec: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0acf0: 4b ff fe 3c b ffc0ab2c <_Objects_Extend_information+0x164><== NOT EXECUTED =============================================================================== ffc0ade0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0ade0: 94 21 ff e8 stwu r1,-24(r1) ffc0ade4: 7c 08 02 a6 mflr r0 ffc0ade8: 93 c1 00 10 stw r30,16(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0adec: 7c 9e 23 79 mr. r30,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0adf0: 93 a1 00 0c stw r29,12(r1) ffc0adf4: 7c 7d 1b 78 mr r29,r3 ffc0adf8: 93 e1 00 14 stw r31,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0adfc: 3b e0 00 00 li r31,0 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0ae00: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0ae04: 40 82 00 24 bne- ffc0ae28 <_Objects_Get_information+0x48> if ( info->maximum == 0 ) return NULL; #endif return info; } ffc0ae08: 80 01 00 1c lwz r0,28(r1) ffc0ae0c: 7f e3 fb 78 mr r3,r31 ffc0ae10: 83 a1 00 0c lwz r29,12(r1) ffc0ae14: 7c 08 03 a6 mtlr r0 ffc0ae18: 83 c1 00 10 lwz r30,16(r1) ffc0ae1c: 83 e1 00 14 lwz r31,20(r1) ffc0ae20: 38 21 00 18 addi r1,r1,24 ffc0ae24: 4e 80 00 20 blr /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); ffc0ae28: 48 00 5e 05 bl ffc10c2c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0ae2c: 2c 03 00 00 cmpwi r3,0 ffc0ae30: 41 82 ff d8 beq+ ffc0ae08 <_Objects_Get_information+0x28> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0ae34: 7f 83 f0 40 cmplw cr7,r3,r30 ffc0ae38: 41 9c ff d0 blt+ cr7,ffc0ae08 <_Objects_Get_information+0x28> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0ae3c: 3d 20 00 00 lis r9,0 ffc0ae40: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0ae44: 39 29 2b e0 addi r9,r9,11232 ffc0ae48: 7d 29 e8 2e lwzx r9,r9,r29 ffc0ae4c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ae50: 41 9e ff b8 beq+ cr7,ffc0ae08 <_Objects_Get_information+0x28><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0ae54: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0ae58: 7f e9 f0 2e lwzx r31,r9,r30 if ( !info ) ffc0ae5c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ae60: 41 9e ff a8 beq+ cr7,ffc0ae08 <_Objects_Get_information+0x28><== NEVER TAKEN * 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 ) ffc0ae64: a0 1f 00 10 lhz r0,16(r31) ffc0ae68: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ae6c: 40 9e ff 9c bne+ cr7,ffc0ae08 <_Objects_Get_information+0x28> return NULL; ffc0ae70: 3b e0 00 00 li r31,0 ffc0ae74: 4b ff ff 94 b ffc0ae08 <_Objects_Get_information+0x28> =============================================================================== ffc0d0ac <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0d0ac: 94 21 ff d8 stwu r1,-40(r1) ffc0d0b0: 7c 08 02 a6 mflr r0 ffc0d0b4: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0d0b8: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0d0bc: 93 e1 00 24 stw r31,36(r1) ffc0d0c0: 7c bf 2b 78 mr r31,r5 ffc0d0c4: 90 01 00 2c stw r0,44(r1) ffc0d0c8: 93 81 00 18 stw r28,24(r1) ffc0d0cc: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0d0d0: 40 82 00 2c bne- ffc0d0fc <_Objects_Get_name_as_string+0x50> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc0d0d4: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0d0d8: 80 01 00 2c lwz r0,44(r1) ffc0d0dc: 7f e3 fb 78 mr r3,r31 ffc0d0e0: 83 81 00 18 lwz r28,24(r1) ffc0d0e4: 7c 08 03 a6 mtlr r0 ffc0d0e8: 83 a1 00 1c lwz r29,28(r1) ffc0d0ec: 83 c1 00 20 lwz r30,32(r1) ffc0d0f0: 83 e1 00 24 lwz r31,36(r1) ffc0d0f4: 38 21 00 28 addi r1,r1,40 ffc0d0f8: 4e 80 00 20 blr Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) ffc0d0fc: 2f 85 00 00 cmpwi cr7,r5,0 ffc0d100: 41 9e ff d8 beq+ cr7,ffc0d0d8 <_Objects_Get_name_as_string+0x2c> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0d104: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d108: 7c 7c 1b 78 mr r28,r3 ffc0d10c: 40 9e 00 10 bne- cr7,ffc0d11c <_Objects_Get_name_as_string+0x70> ffc0d110: 3d 20 00 01 lis r9,1 ffc0d114: 81 29 af 50 lwz r9,-20656(r9) ffc0d118: 83 89 00 08 lwz r28,8(r9) information = _Objects_Get_information_id( tmpId ); ffc0d11c: 7f 83 e3 78 mr r3,r28 ffc0d120: 4b ff fe 59 bl ffc0cf78 <_Objects_Get_information_id> if ( !information ) ffc0d124: 7c 7d 1b 79 mr. r29,r3 ffc0d128: 41 82 ff ac beq+ ffc0d0d4 <_Objects_Get_name_as_string+0x28> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc0d12c: 7f 84 e3 78 mr r4,r28 ffc0d130: 38 a1 00 08 addi r5,r1,8 ffc0d134: 48 00 00 c9 bl ffc0d1fc <_Objects_Get> switch ( location ) { ffc0d138: 80 01 00 08 lwz r0,8(r1) ffc0d13c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d140: 40 be ff 94 bne- cr7,ffc0d0d4 <_Objects_Get_name_as_string+0x28> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { ffc0d144: 89 3d 00 38 lbz r9,56(r29) ffc0d148: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d14c: 41 9e 00 84 beq- cr7,ffc0d1d0 <_Objects_Get_name_as_string+0x124> s = the_object->name.name_p; ffc0d150: 81 03 00 0c lwz r8,12(r3) lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { ffc0d154: 7f e9 fb 78 mr r9,r31 ffc0d158: 2f 88 00 00 cmpwi cr7,r8,0 ffc0d15c: 41 9e 00 64 beq- cr7,ffc0d1c0 <_Objects_Get_name_as_string+0x114> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d160: 34 1e ff ff addic. r0,r30,-1 ffc0d164: 7f e9 fb 78 mr r9,r31 ffc0d168: 7c 09 03 a6 mtctr r0 ffc0d16c: 41 82 00 54 beq- ffc0d1c0 <_Objects_Get_name_as_string+0x114><== NEVER TAKEN ffc0d170: 88 08 00 00 lbz r0,0(r8) ffc0d174: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d178: 41 9e 00 48 beq- cr7,ffc0d1c0 <_Objects_Get_name_as_string+0x114> ffc0d17c: 3c e0 00 00 lis r7,0 ffc0d180: 39 60 00 00 li r11,0 ffc0d184: 38 e7 27 90 addi r7,r7,10128 ffc0d188: 48 00 00 10 b ffc0d198 <_Objects_Get_name_as_string+0xec> ffc0d18c: 7c 08 58 ae lbzx r0,r8,r11 ffc0d190: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d194: 41 9e 00 2c beq- cr7,ffc0d1c0 <_Objects_Get_name_as_string+0x114> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0d198: 81 47 00 00 lwz r10,0(r7) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d19c: 39 6b 00 01 addi r11,r11,1 *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0d1a0: 7d 4a 02 14 add r10,r10,r0 ffc0d1a4: 89 4a 00 01 lbz r10,1(r10) ffc0d1a8: 71 46 00 97 andi. r6,r10,151 ffc0d1ac: 40 82 00 08 bne- ffc0d1b4 <_Objects_Get_name_as_string+0x108> ffc0d1b0: 38 00 00 2a li r0,42 ffc0d1b4: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d1b8: 39 29 00 01 addi r9,r9,1 ffc0d1bc: 42 00 ff d0 bdnz+ ffc0d18c <_Objects_Get_name_as_string+0xe0> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0d1c0: 38 00 00 00 li r0,0 ffc0d1c4: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0d1c8: 48 00 0f 39 bl ffc0e100 <_Thread_Enable_dispatch> return name; ffc0d1cc: 4b ff ff 0c b ffc0d0d8 <_Objects_Get_name_as_string+0x2c> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc0d1d0: 80 03 00 0c lwz r0,12(r3) lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; ffc0d1d4: 39 01 00 0c addi r8,r1,12 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; ffc0d1d8: 99 21 00 10 stb r9,16(r1) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0d1dc: 54 0a 46 3e rlwinm r10,r0,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0d1e0: 54 0b 84 3e rlwinm r11,r0,16,16,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0d1e4: 99 41 00 0c stb r10,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0d1e8: 54 09 c2 3e rlwinm r9,r0,24,8,31 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0d1ec: 99 61 00 0d stb r11,13(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0d1f0: 99 21 00 0e stb r9,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc0d1f4: 98 01 00 0f stb r0,15(r1) ffc0d1f8: 4b ff ff 68 b ffc0d160 <_Objects_Get_name_as_string+0xb4> =============================================================================== ffc1ed90 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc1ed90: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc1ed94: a0 03 00 10 lhz r0,16(r3) /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc1ed98: 21 29 00 01 subfic r9,r9,1 ffc1ed9c: 7d 29 22 14 add r9,r9,r4 if ( information->maximum >= index ) { ffc1eda0: 7f 89 00 40 cmplw cr7,r9,r0 ffc1eda4: 41 9d 00 24 bgt- cr7,ffc1edc8 <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1eda8: 81 63 00 1c lwz r11,28(r3) ffc1edac: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc1edb0: 7c 6b 48 2e lwzx r3,r11,r9 ffc1edb4: 2f 83 00 00 cmpwi cr7,r3,0 ffc1edb8: 41 9e 00 10 beq- cr7,ffc1edc8 <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1edbc: 38 00 00 00 li r0,0 ffc1edc0: 90 05 00 00 stw r0,0(r5) return the_object; ffc1edc4: 4e 80 00 20 blr /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; ffc1edc8: 38 00 00 01 li r0,1 ffc1edcc: 90 05 00 00 stw r0,0(r5) return NULL; ffc1edd0: 38 60 00 00 li r3,0 } ffc1edd4: 4e 80 00 20 blr =============================================================================== ffc0ca94 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0ca94: 94 21 ff e0 stwu r1,-32(r1) ffc0ca98: 7c 08 02 a6 mflr r0 ffc0ca9c: 90 01 00 24 stw r0,36(r1) /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0caa0: 7c 60 1b 79 mr. r0,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0caa4: 93 c1 00 18 stw r30,24(r1) ffc0caa8: 7c 9e 23 78 mr r30,r4 ffc0caac: 93 e1 00 1c stw r31,28(r1) /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0cab0: 40 82 00 10 bne- ffc0cac0 <_Objects_Id_to_name+0x2c> ffc0cab4: 3d 20 00 00 lis r9,0 ffc0cab8: 81 29 31 50 lwz r9,12624(r9) ffc0cabc: 80 09 00 08 lwz r0,8(r9) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0cac0: 54 09 47 7e rlwinm r9,r0,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0cac4: 39 69 ff ff addi r11,r9,-1 ffc0cac8: 2b 8b 00 02 cmplwi cr7,r11,2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc0cacc: 3b e0 00 03 li r31,3 ffc0cad0: 41 9d 00 38 bgt- cr7,ffc0cb08 <_Objects_Id_to_name+0x74> if ( !_Objects_Information_table[ the_api ] ) ffc0cad4: 3d 60 00 00 lis r11,0 ffc0cad8: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0cadc: 39 6b 2c 40 addi r11,r11,11328 ffc0cae0: 7d 2b 48 2e lwzx r9,r11,r9 ffc0cae4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cae8: 41 9e 00 20 beq- cr7,ffc0cb08 <_Objects_Id_to_name+0x74> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0caec: 54 0b 3e 7a rlwinm r11,r0,7,25,29 ffc0caf0: 7c 69 58 2e lwzx r3,r9,r11 if ( !information ) ffc0caf4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0caf8: 41 9e 00 10 beq- cr7,ffc0cb08 <_Objects_Id_to_name+0x74><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) ffc0cafc: 89 23 00 38 lbz r9,56(r3) ffc0cb00: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cb04: 41 9e 00 20 beq- cr7,ffc0cb24 <_Objects_Id_to_name+0x90><== ALWAYS TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0cb08: 80 01 00 24 lwz r0,36(r1) ffc0cb0c: 7f e3 fb 78 mr r3,r31 ffc0cb10: 83 c1 00 18 lwz r30,24(r1) ffc0cb14: 7c 08 03 a6 mtlr r0 ffc0cb18: 83 e1 00 1c lwz r31,28(r1) ffc0cb1c: 38 21 00 20 addi r1,r1,32 ffc0cb20: 4e 80 00 20 blr #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); ffc0cb24: 7c 04 03 78 mr r4,r0 ffc0cb28: 38 a1 00 08 addi r5,r1,8 ffc0cb2c: 4b ff fe cd bl ffc0c9f8 <_Objects_Get> if ( !the_object ) ffc0cb30: 2c 03 00 00 cmpwi r3,0 ffc0cb34: 41 a2 ff d4 beq- ffc0cb08 <_Objects_Id_to_name+0x74> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0cb38: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0cb3c: 3b e0 00 00 li r31,0 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; ffc0cb40: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0cb44: 48 00 0e 89 bl ffc0d9cc <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0cb48: 80 01 00 24 lwz r0,36(r1) ffc0cb4c: 7f e3 fb 78 mr r3,r31 ffc0cb50: 83 c1 00 18 lwz r30,24(r1) ffc0cb54: 7c 08 03 a6 mtlr r0 ffc0cb58: 83 e1 00 1c lwz r31,28(r1) ffc0cb5c: 38 21 00 20 addi r1,r1,32 ffc0cb60: 4e 80 00 20 blr =============================================================================== ffc0b14c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b14c: 94 21 ff e8 stwu r1,-24(r1) ffc0b150: 7c 08 02 a6 mflr r0 ffc0b154: 90 01 00 1c stw r0,28(r1) ffc0b158: 93 e1 00 14 stw r31,20(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0b15c: a1 43 00 10 lhz r10,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0b160: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0b164: a0 03 00 14 lhz r0,20(r3) ffc0b168: 7d 5f 50 50 subf r10,r31,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b16c: 93 81 00 08 stw r28,8(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0b170: 7d 4a 03 96 divwu r10,r10,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b174: 93 a1 00 0c stw r29,12(r1) ffc0b178: 93 c1 00 10 stw r30,16(r1) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0b17c: 2f 8a 00 00 cmpwi cr7,r10,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b180: 7c 7c 1b 78 mr r28,r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0b184: 41 9e 00 3c beq- cr7,ffc0b1c0 <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0b188: 81 63 00 30 lwz r11,48(r3) ffc0b18c: 81 2b 00 00 lwz r9,0(r11) ffc0b190: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b194: 41 9e 00 4c beq- cr7,ffc0b1e0 <_Objects_Shrink_information+0x94><== NEVER TAKEN index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0b198: 39 20 00 00 li r9,0 ffc0b19c: 7d 49 03 a6 mtctr r10 ffc0b1a0: 48 00 00 18 b ffc0b1b8 <_Objects_Shrink_information+0x6c> if ( information->inactive_per_block[ block ] == ffc0b1a4: 85 4b 00 04 lwzu r10,4(r11) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0b1a8: 7f ff 02 14 add r31,r31,r0 ffc0b1ac: 55 3d 10 3a rlwinm r29,r9,2,0,29 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 ] == ffc0b1b0: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b1b4: 41 9e 00 30 beq- cr7,ffc0b1e4 <_Objects_Shrink_information+0x98> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0b1b8: 39 29 00 01 addi r9,r9,1 ffc0b1bc: 42 00 ff e8 bdnz+ ffc0b1a4 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0b1c0: 80 01 00 1c lwz r0,28(r1) ffc0b1c4: 83 81 00 08 lwz r28,8(r1) ffc0b1c8: 7c 08 03 a6 mtlr r0 ffc0b1cc: 83 a1 00 0c lwz r29,12(r1) ffc0b1d0: 83 c1 00 10 lwz r30,16(r1) ffc0b1d4: 83 e1 00 14 lwz r31,20(r1) ffc0b1d8: 38 21 00 18 addi r1,r1,24 ffc0b1dc: 4e 80 00 20 blr 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 ] == ffc0b1e0: 3b a0 00 00 li r29,0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); ffc0b1e4: 80 7c 00 20 lwz r3,32(r28) ffc0b1e8: 48 00 00 10 b ffc0b1f8 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b1ec: 2f 9e 00 00 cmpwi cr7,r30,0 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0b1f0: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b1f4: 41 9e 00 34 beq- cr7,ffc0b228 <_Objects_Shrink_information+0xdc> * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); ffc0b1f8: a0 03 00 0a lhz r0,10(r3) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0b1fc: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0b200: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b204: 41 bc ff e8 blt- cr7,ffc0b1ec <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0b208: a1 3c 00 14 lhz r9,20(r28) ffc0b20c: 7d 3f 4a 14 add r9,r31,r9 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && ffc0b210: 7f 80 48 40 cmplw cr7,r0,r9 ffc0b214: 40 9c ff d8 bge+ cr7,ffc0b1ec <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0b218: 4b ff ea dd bl ffc09cf4 <_Chain_Extract> } } while ( the_object ); ffc0b21c: 2f 9e 00 00 cmpwi cr7,r30,0 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0b220: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b224: 40 9e ff d4 bne+ cr7,ffc0b1f8 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0b228: 81 3c 00 34 lwz r9,52(r28) ffc0b22c: 7c 69 e8 2e lwzx r3,r9,r29 ffc0b230: 48 00 25 29 bl ffc0d758 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b234: a1 5c 00 2c lhz r10,44(r28) ffc0b238: a0 1c 00 14 lhz r0,20(r28) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0b23c: 81 7c 00 34 lwz r11,52(r28) information->inactive_per_block[ block ] = 0; ffc0b240: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0b244: 7c 00 50 50 subf r0,r0,r10 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0b248: 7f cb e9 2e stwx r30,r11,r29 information->inactive_per_block[ block ] = 0; ffc0b24c: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0b250: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0b254: 80 01 00 1c lwz r0,28(r1) ffc0b258: 83 81 00 08 lwz r28,8(r1) ffc0b25c: 7c 08 03 a6 mtlr r0 ffc0b260: 83 a1 00 0c lwz r29,12(r1) ffc0b264: 83 c1 00 10 lwz r30,16(r1) ffc0b268: 83 e1 00 14 lwz r31,20(r1) ffc0b26c: 38 21 00 18 addi r1,r1,24 ffc0b270: 4e 80 00 20 blr =============================================================================== ffc0b8b0 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0b8b0: 94 21 ff d8 stwu r1,-40(r1) ffc0b8b4: 7c 08 02 a6 mflr r0 ffc0b8b8: 90 01 00 2c stw r0,44(r1) /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0b8bc: 38 00 00 00 li r0,0 */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0b8c0: 93 81 00 18 stw r28,24(r1) ffc0b8c4: 7c 7c 1b 78 mr r28,r3 ffc0b8c8: 93 e1 00 24 stw r31,36(r1) ffc0b8cc: 7c 9f 23 78 mr r31,r4 ffc0b8d0: 93 a1 00 1c stw r29,28(r1) ffc0b8d4: 93 c1 00 20 stw r30,32(r1) /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0b8d8: 90 04 00 00 stw r0,0(r4) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) ffc0b8dc: 48 00 54 69 bl ffc10d44 <_Timespec_Is_valid> ffc0b8e0: 2f 83 00 00 cmpwi cr7,r3,0 return POSIX_ABSOLUTE_TIMEOUT_INVALID; ffc0b8e4: 38 60 00 00 li r3,0 *ticks_out = 0; /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) ffc0b8e8: 40 9e 00 24 bne- cr7,ffc0b90c <_POSIX_Absolute_timeout_to_ticks+0x5c> /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } ffc0b8ec: 80 01 00 2c lwz r0,44(r1) ffc0b8f0: 83 81 00 18 lwz r28,24(r1) ffc0b8f4: 7c 08 03 a6 mtlr r0 ffc0b8f8: 83 a1 00 1c lwz r29,28(r1) ffc0b8fc: 83 c1 00 20 lwz r30,32(r1) ffc0b900: 83 e1 00 24 lwz r31,36(r1) ffc0b904: 38 21 00 28 addi r1,r1,40 ffc0b908: 4e 80 00 20 blr return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); ffc0b90c: 3b c1 00 08 addi r30,r1,8 ffc0b910: 7f c3 f3 78 mr r3,r30 ffc0b914: 48 00 27 b9 bl ffc0e0cc <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0b918: 7f 83 e3 78 mr r3,r28 ffc0b91c: 7f c4 f3 78 mr r4,r30 ffc0b920: 48 00 54 61 bl ffc10d80 <_Timespec_Less_than> ffc0b924: 2f 83 00 00 cmpwi cr7,r3,0 return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; ffc0b928: 38 60 00 01 li r3,1 /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0b92c: 40 be ff c0 bne- cr7,ffc0b8ec <_POSIX_Absolute_timeout_to_ticks+0x3c> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); ffc0b930: 3b a1 00 10 addi r29,r1,16 ffc0b934: 7f 84 e3 78 mr r4,r28 ffc0b938: 7f a5 eb 78 mr r5,r29 ffc0b93c: 7f c3 f3 78 mr r3,r30 ffc0b940: 48 00 54 7d bl ffc10dbc <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0b944: 7f a3 eb 78 mr r3,r29 ffc0b948: 48 00 54 c9 bl ffc10e10 <_Timespec_To_ticks> /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0b94c: 2f 83 00 00 cmpwi cr7,r3,0 _Timespec_Subtract( ¤t_time, abstime, &difference ); /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0b950: 90 7f 00 00 stw r3,0(r31) /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; ffc0b954: 38 60 00 03 li r3,3 /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0b958: 40 9e ff 94 bne+ cr7,ffc0b8ec <_POSIX_Absolute_timeout_to_ticks+0x3c><== ALWAYS TAKEN return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; ffc0b95c: 38 60 00 02 li r3,2 <== NOT EXECUTED ffc0b960: 4b ff ff 8c b ffc0b8ec <_POSIX_Absolute_timeout_to_ticks+0x3c><== NOT EXECUTED =============================================================================== ffc0ecc8 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0ecc8: 94 21 ff d0 stwu r1,-48(r1) ffc0eccc: 7c 08 02 a6 mflr r0 ffc0ecd0: 93 e1 00 2c stw r31,44(r1) ffc0ecd4: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( ffc0ecd8: 3c 60 00 00 lis r3,0 ffc0ecdc: 93 81 00 20 stw r28,32(r1) ffc0ece0: 38 63 35 f8 addi r3,r3,13816 ffc0ece4: 7c 9c 23 78 mr r28,r4 ffc0ece8: 93 c1 00 28 stw r30,40(r1) ffc0ecec: 7f e4 fb 78 mr r4,r31 ffc0ecf0: 7c be 2b 78 mr r30,r5 ffc0ecf4: 38 a1 00 08 addi r5,r1,8 ffc0ecf8: 90 01 00 34 stw r0,52(r1) ffc0ecfc: 93 41 00 18 stw r26,24(r1) ffc0ed00: 7c fa 3b 78 mr r26,r7 ffc0ed04: 93 61 00 1c stw r27,28(r1) ffc0ed08: 7d 1b 43 78 mr r27,r8 ffc0ed0c: 93 a1 00 24 stw r29,36(r1) ffc0ed10: 7c dd 33 78 mr r29,r6 ffc0ed14: 48 00 41 ed bl ffc12f00 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0ed18: 80 01 00 08 lwz r0,8(r1) ffc0ed1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ed20: 41 9e 00 3c beq- cr7,ffc0ed5c <_POSIX_Message_queue_Receive_support+0x94> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0ed24: 48 00 d4 29 bl ffc1c14c <__errno> ffc0ed28: 38 00 00 09 li r0,9 ffc0ed2c: 90 03 00 00 stw r0,0(r3) ffc0ed30: 38 60 ff ff li r3,-1 } ffc0ed34: 80 01 00 34 lwz r0,52(r1) ffc0ed38: 83 41 00 18 lwz r26,24(r1) ffc0ed3c: 7c 08 03 a6 mtlr r0 ffc0ed40: 83 61 00 1c lwz r27,28(r1) ffc0ed44: 83 81 00 20 lwz r28,32(r1) ffc0ed48: 83 a1 00 24 lwz r29,36(r1) ffc0ed4c: 83 c1 00 28 lwz r30,40(r1) ffc0ed50: 83 e1 00 2c lwz r31,44(r1) ffc0ed54: 38 21 00 30 addi r1,r1,48 ffc0ed58: 4e 80 00 20 blr the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { ffc0ed5c: 80 03 00 14 lwz r0,20(r3) ffc0ed60: 54 09 07 be clrlwi r9,r0,30 ffc0ed64: 2f 89 00 01 cmpwi cr7,r9,1 ffc0ed68: 41 9e 00 e4 beq- cr7,ffc0ee4c <_POSIX_Message_queue_Receive_support+0x184> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0ed6c: 80 63 00 10 lwz r3,16(r3) if ( msg_len < the_mq->Message_queue.maximum_message_size ) { ffc0ed70: 81 23 00 68 lwz r9,104(r3) ffc0ed74: 7f 89 f0 40 cmplw cr7,r9,r30 ffc0ed78: 41 9d 00 9c bgt- cr7,ffc0ee14 <_POSIX_Message_queue_Receive_support+0x14c> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0ed7c: 2f 9a 00 00 cmpwi cr7,r26,0 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; ffc0ed80: 39 20 ff ff li r9,-1 ffc0ed84: 91 21 00 0c stw r9,12(r1) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0ed88: 38 e0 00 00 li r7,0 ffc0ed8c: 40 9e 00 78 bne- cr7,ffc0ee04 <_POSIX_Message_queue_Receive_support+0x13c><== ALWAYS TAKEN do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0ed90: 7f e4 fb 78 mr r4,r31 timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0ed94: 3f e0 00 00 lis r31,0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0ed98: 38 63 00 1c addi r3,r3,28 ffc0ed9c: 7f 85 e3 78 mr r5,r28 ffc0eda0: 38 c1 00 0c addi r6,r1,12 ffc0eda4: 7f 68 db 78 mr r8,r27 timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0eda8: 3b ff 36 64 addi r31,r31,13924 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0edac: 48 00 2c 39 bl ffc119e4 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); ffc0edb0: 48 00 51 15 bl ffc13ec4 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0edb4: 81 3f 00 0c lwz r9,12(r31) if ( !_Thread_Executing->Wait.return_code ) ffc0edb8: 81 69 00 34 lwz r11,52(r9) RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); ffc0edbc: 80 09 00 24 lwz r0,36(r9) ffc0edc0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0edc4: 7c 09 fe 70 srawi r9,r0,31 ffc0edc8: 7d 20 02 78 xor r0,r9,r0 ffc0edcc: 7c 09 00 50 subf r0,r9,r0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = ffc0edd0: 90 1d 00 00 stw r0,0(r29) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) ffc0edd4: 40 9e 00 58 bne- cr7,ffc0ee2c <_POSIX_Message_queue_Receive_support+0x164> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0edd8: 80 01 00 34 lwz r0,52(r1) _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; ffc0eddc: 80 61 00 0c lwz r3,12(r1) case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0ede0: 7c 08 03 a6 mtlr r0 ffc0ede4: 83 41 00 18 lwz r26,24(r1) ffc0ede8: 83 61 00 1c lwz r27,28(r1) ffc0edec: 83 81 00 20 lwz r28,32(r1) ffc0edf0: 83 a1 00 24 lwz r29,36(r1) ffc0edf4: 83 c1 00 28 lwz r30,40(r1) ffc0edf8: 83 e1 00 2c lwz r31,44(r1) ffc0edfc: 38 21 00 30 addi r1,r1,48 ffc0ee00: 4e 80 00 20 blr /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0ee04: 70 09 40 00 andi. r9,r0,16384 ffc0ee08: 7c e0 00 26 mfcr r7 ffc0ee0c: 54 e7 1f fe rlwinm r7,r7,3,31,31 ffc0ee10: 4b ff ff 80 b ffc0ed90 <_POSIX_Message_queue_Receive_support+0xc8> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); ffc0ee14: 48 00 50 b1 bl ffc13ec4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); ffc0ee18: 48 00 d3 35 bl ffc1c14c <__errno> ffc0ee1c: 38 00 00 7a li r0,122 ffc0ee20: 90 03 00 00 stw r0,0(r3) ffc0ee24: 38 60 ff ff li r3,-1 ffc0ee28: 4b ff ff 0c b ffc0ed34 <_POSIX_Message_queue_Receive_support+0x6c> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( ffc0ee2c: 48 00 d3 21 bl ffc1c14c <__errno> ffc0ee30: 81 3f 00 0c lwz r9,12(r31) ffc0ee34: 7c 7e 1b 78 mr r30,r3 ffc0ee38: 80 69 00 34 lwz r3,52(r9) ffc0ee3c: 48 00 03 71 bl ffc0f1ac <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0ee40: 90 7e 00 00 stw r3,0(r30) ffc0ee44: 38 60 ff ff li r3,-1 ffc0ee48: 4b ff fe ec b ffc0ed34 <_POSIX_Message_queue_Receive_support+0x6c> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); ffc0ee4c: 48 00 50 79 bl ffc13ec4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0ee50: 48 00 d2 fd bl ffc1c14c <__errno> ffc0ee54: 38 00 00 09 li r0,9 ffc0ee58: 90 03 00 00 stw r0,0(r3) ffc0ee5c: 38 60 ff ff li r3,-1 ffc0ee60: 4b ff fe d4 b ffc0ed34 <_POSIX_Message_queue_Receive_support+0x6c> =============================================================================== ffc0ee8c <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0ee8c: 2b 86 00 20 cmplwi cr7,r6,32 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0ee90: 94 21 ff d0 stwu r1,-48(r1) ffc0ee94: 7c 08 02 a6 mflr r0 ffc0ee98: 93 41 00 18 stw r26,24(r1) ffc0ee9c: 7c fa 3b 78 mr r26,r7 ffc0eea0: 93 61 00 1c stw r27,28(r1) ffc0eea4: 7c 9b 23 78 mr r27,r4 ffc0eea8: 93 81 00 20 stw r28,32(r1) ffc0eeac: 7c bc 2b 78 mr r28,r5 ffc0eeb0: 93 a1 00 24 stw r29,36(r1) ffc0eeb4: 7c 7d 1b 78 mr r29,r3 ffc0eeb8: 93 c1 00 28 stw r30,40(r1) ffc0eebc: 7c de 33 78 mr r30,r6 ffc0eec0: 93 e1 00 2c stw r31,44(r1) ffc0eec4: 7d 1f 43 78 mr r31,r8 ffc0eec8: 90 01 00 34 stw r0,52(r1) /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0eecc: 41 9d 01 04 bgt- cr7,ffc0efd0 <_POSIX_Message_queue_Send_support+0x144> RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( ffc0eed0: 3c 60 00 00 lis r3,0 ffc0eed4: 38 63 35 f8 addi r3,r3,13816 ffc0eed8: 7f a4 eb 78 mr r4,r29 ffc0eedc: 38 a1 00 08 addi r5,r1,8 ffc0eee0: 48 00 40 21 bl ffc12f00 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0eee4: 80 01 00 08 lwz r0,8(r1) ffc0eee8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eeec: 40 9e 00 d0 bne- cr7,ffc0efbc <_POSIX_Message_queue_Send_support+0x130> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { ffc0eef0: 80 03 00 14 lwz r0,20(r3) ffc0eef4: 70 09 00 03 andi. r9,r0,3 ffc0eef8: 41 82 00 ec beq- ffc0efe4 <_POSIX_Message_queue_Send_support+0x158> the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0eefc: 2f 9a 00 00 cmpwi cr7,r26,0 if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0ef00: 81 63 00 10 lwz r11,16(r3) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0ef04: 39 20 00 00 li r9,0 ffc0ef08: 40 9e 00 68 bne- cr7,ffc0ef70 <_POSIX_Message_queue_Send_support+0xe4> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0ef0c: 7f ea fb 78 mr r10,r31 ffc0ef10: 7f 64 db 78 mr r4,r27 ffc0ef14: 7f 85 e3 78 mr r5,r28 ffc0ef18: 7f a6 eb 78 mr r6,r29 ffc0ef1c: 38 e0 00 00 li r7,0 ffc0ef20: 7d 1e 00 d0 neg r8,r30 ffc0ef24: 38 6b 00 1c addi r3,r11,28 ffc0ef28: 48 00 2c 51 bl ffc11b78 <_CORE_message_queue_Submit> ffc0ef2c: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0ef30: 48 00 4f 95 bl ffc13ec4 <_Thread_Enable_dispatch> * 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 ) ffc0ef34: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0ef38: 41 9e 00 74 beq- cr7,ffc0efac <_POSIX_Message_queue_Send_support+0x120><== NEVER TAKEN msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) ffc0ef3c: 2f 9f 00 00 cmpwi cr7,r31,0 return msg_status; ffc0ef40: 38 60 00 00 li r3,0 */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) ffc0ef44: 40 9e 00 b8 bne- cr7,ffc0effc <_POSIX_Message_queue_Send_support+0x170> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0ef48: 80 01 00 34 lwz r0,52(r1) ffc0ef4c: 83 41 00 18 lwz r26,24(r1) ffc0ef50: 7c 08 03 a6 mtlr r0 ffc0ef54: 83 61 00 1c lwz r27,28(r1) ffc0ef58: 83 81 00 20 lwz r28,32(r1) ffc0ef5c: 83 a1 00 24 lwz r29,36(r1) ffc0ef60: 83 c1 00 28 lwz r30,40(r1) ffc0ef64: 83 e1 00 2c lwz r31,44(r1) ffc0ef68: 38 21 00 30 addi r1,r1,48 ffc0ef6c: 4e 80 00 20 blr /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0ef70: 70 09 40 00 andi. r9,r0,16384 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0ef74: 7f ea fb 78 mr r10,r31 ffc0ef78: 7f 64 db 78 mr r4,r27 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0ef7c: 7d 20 00 26 mfcr r9 ffc0ef80: 55 29 1f fe rlwinm r9,r9,3,31,31 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0ef84: 7f 85 e3 78 mr r5,r28 ffc0ef88: 7f a6 eb 78 mr r6,r29 ffc0ef8c: 38 e0 00 00 li r7,0 ffc0ef90: 7d 1e 00 d0 neg r8,r30 ffc0ef94: 38 6b 00 1c addi r3,r11,28 ffc0ef98: 48 00 2b e1 bl ffc11b78 <_CORE_message_queue_Submit> ffc0ef9c: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0efa0: 48 00 4f 25 bl ffc13ec4 <_Thread_Enable_dispatch> * 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 ) ffc0efa4: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0efa8: 40 9e ff 94 bne+ cr7,ffc0ef3c <_POSIX_Message_queue_Send_support+0xb0> msg_status = _Thread_Executing->Wait.return_code; ffc0efac: 3d 20 00 00 lis r9,0 ffc0efb0: 81 29 36 70 lwz r9,13936(r9) ffc0efb4: 83 e9 00 34 lwz r31,52(r9) ffc0efb8: 4b ff ff 84 b ffc0ef3c <_POSIX_Message_queue_Send_support+0xb0> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0efbc: 48 00 d1 91 bl ffc1c14c <__errno> ffc0efc0: 38 00 00 09 li r0,9 ffc0efc4: 90 03 00 00 stw r0,0(r3) ffc0efc8: 38 60 ff ff li r3,-1 ffc0efcc: 4b ff ff 7c b ffc0ef48 <_POSIX_Message_queue_Send_support+0xbc> * 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 ); ffc0efd0: 48 00 d1 7d bl ffc1c14c <__errno> ffc0efd4: 38 00 00 16 li r0,22 ffc0efd8: 90 03 00 00 stw r0,0(r3) ffc0efdc: 38 60 ff ff li r3,-1 ffc0efe0: 4b ff ff 68 b ffc0ef48 <_POSIX_Message_queue_Send_support+0xbc> 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(); ffc0efe4: 48 00 4e e1 bl ffc13ec4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0efe8: 48 00 d1 65 bl ffc1c14c <__errno> ffc0efec: 38 00 00 09 li r0,9 ffc0eff0: 90 03 00 00 stw r0,0(r3) ffc0eff4: 38 60 ff ff li r3,-1 ffc0eff8: 4b ff ff 50 b ffc0ef48 <_POSIX_Message_queue_Send_support+0xbc> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( ffc0effc: 48 00 d1 51 bl ffc1c14c <__errno> ffc0f000: 7c 7e 1b 78 mr r30,r3 ffc0f004: 7f e3 fb 78 mr r3,r31 ffc0f008: 48 00 01 a5 bl ffc0f1ac <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0f00c: 90 7e 00 00 stw r3,0(r30) ffc0f010: 38 60 ff ff li r3,-1 ffc0f014: 4b ff ff 34 b ffc0ef48 <_POSIX_Message_queue_Send_support+0xbc> =============================================================================== ffc0fb20 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { ffc0fb20: 7c 08 02 a6 mflr r0 ffc0fb24: 94 21 ff f8 stwu r1,-8(r1) ffc0fb28: 90 01 00 0c stw r0,12(r1) POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0fb2c: 81 23 01 34 lwz r9,308(r3) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc0fb30: 80 09 00 d8 lwz r0,216(r9) ffc0fb34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fb38: 40 9e 00 10 bne- cr7,ffc0fb48 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28><== NEVER TAKEN ffc0fb3c: 80 09 00 dc lwz r0,220(r9) ffc0fb40: 2f 80 00 01 cmpwi cr7,r0,1 ffc0fb44: 41 9e 00 18 beq- cr7,ffc0fb5c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x3c> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); ffc0fb48: 4b ff c8 95 bl ffc0c3dc <_Thread_Enable_dispatch> } ffc0fb4c: 80 01 00 0c lwz r0,12(r1) ffc0fb50: 38 21 00 08 addi r1,r1,8 ffc0fb54: 7c 08 03 a6 mtlr r0 ffc0fb58: 4e 80 00 20 blr POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && ffc0fb5c: 80 09 00 e0 lwz r0,224(r9) ffc0fb60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fb64: 41 9e ff e4 beq+ cr7,ffc0fb48 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0fb68: 3d 20 00 00 lis r9,0 ffc0fb6c: 81 69 27 b8 lwz r11,10168(r9) thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); ffc0fb70: 38 80 ff ff li r4,-1 ffc0fb74: 38 0b ff ff addi r0,r11,-1 ffc0fb78: 90 09 27 b8 stw r0,10168(r9) ffc0fb7c: 48 00 09 69 bl ffc104e4 <_POSIX_Thread_Exit> ffc0fb80: 4b ff ff cc b ffc0fb4c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x2c> =============================================================================== ffc114a0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc114a0: 94 21 ff e0 stwu r1,-32(r1) ffc114a4: 7c 08 02 a6 mflr r0 ffc114a8: 93 e1 00 1c stw r31,28(r1) ffc114ac: 7c 7f 1b 78 mr r31,r3 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc114b0: 80 64 00 00 lwz r3,0(r4) int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc114b4: 93 61 00 0c stw r27,12(r1) ffc114b8: 7c db 33 78 mr r27,r6 ffc114bc: 93 81 00 10 stw r28,16(r1) if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; ffc114c0: 3b 80 00 16 li r28,22 int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc114c4: 93 a1 00 14 stw r29,20(r1) ffc114c8: 7c bd 2b 78 mr r29,r5 ffc114cc: 93 c1 00 18 stw r30,24(r1) ffc114d0: 7c 9e 23 78 mr r30,r4 ffc114d4: 90 01 00 24 stw r0,36(r1) if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc114d8: 4b ff ff a5 bl ffc1147c <_POSIX_Priority_Is_valid> ffc114dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc114e0: 41 9e 00 38 beq- cr7,ffc11518 <_POSIX_Thread_Translate_sched_param+0x78><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { ffc114e4: 2f 9f 00 00 cmpwi cr7,r31,0 ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc114e8: 38 00 00 00 li r0,0 ffc114ec: 90 1d 00 00 stw r0,0(r29) *budget_callout = NULL; ffc114f0: 90 1b 00 00 stw r0,0(r27) if ( policy == SCHED_OTHER ) { ffc114f4: 41 9e 00 4c beq- cr7,ffc11540 <_POSIX_Thread_Translate_sched_param+0xa0> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { ffc114f8: 2f 9f 00 01 cmpwi cr7,r31,1 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; ffc114fc: 3b 80 00 00 li r28,0 if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { ffc11500: 41 9e 00 18 beq- cr7,ffc11518 <_POSIX_Thread_Translate_sched_param+0x78> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { ffc11504: 2f 9f 00 02 cmpwi cr7,r31,2 ffc11508: 41 9e 00 ec beq- cr7,ffc115f4 <_POSIX_Thread_Translate_sched_param+0x154> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { ffc1150c: 2f 9f 00 04 cmpwi cr7,r31,4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; ffc11510: 3b 80 00 16 li r28,22 if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { ffc11514: 41 9e 00 60 beq- cr7,ffc11574 <_POSIX_Thread_Translate_sched_param+0xd4> *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc11518: 80 01 00 24 lwz r0,36(r1) ffc1151c: 7f 83 e3 78 mr r3,r28 ffc11520: 83 61 00 0c lwz r27,12(r1) ffc11524: 7c 08 03 a6 mtlr r0 ffc11528: 83 81 00 10 lwz r28,16(r1) ffc1152c: 83 a1 00 14 lwz r29,20(r1) ffc11530: 83 c1 00 18 lwz r30,24(r1) ffc11534: 83 e1 00 1c lwz r31,28(r1) ffc11538: 38 21 00 20 addi r1,r1,32 ffc1153c: 4e 80 00 20 blr *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc11540: 38 00 00 01 li r0,1 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc11544: 83 61 00 0c lwz r27,12(r1) *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc11548: 90 1d 00 00 stw r0,0(r29) return 0; ffc1154c: 3b 80 00 00 li r28,0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc11550: 7f 83 e3 78 mr r3,r28 ffc11554: 80 01 00 24 lwz r0,36(r1) ffc11558: 83 81 00 10 lwz r28,16(r1) ffc1155c: 7c 08 03 a6 mtlr r0 ffc11560: 83 a1 00 14 lwz r29,20(r1) ffc11564: 83 c1 00 18 lwz r30,24(r1) ffc11568: 83 e1 00 1c lwz r31,28(r1) ffc1156c: 38 21 00 20 addi r1,r1,32 ffc11570: 4e 80 00 20 blr *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && ffc11574: 80 1e 00 08 lwz r0,8(r30) ffc11578: 2f 80 00 00 cmpwi cr7,r0,0 ffc1157c: 40 9e 00 10 bne- cr7,ffc1158c <_POSIX_Thread_Translate_sched_param+0xec> ffc11580: 80 1e 00 0c lwz r0,12(r30) ffc11584: 2f 80 00 00 cmpwi cr7,r0,0 ffc11588: 41 be ff 90 beq- cr7,ffc11518 <_POSIX_Thread_Translate_sched_param+0x78> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc1158c: 80 1e 00 10 lwz r0,16(r30) ffc11590: 2f 80 00 00 cmpwi cr7,r0,0 ffc11594: 40 9e 00 14 bne- cr7,ffc115a8 <_POSIX_Thread_Translate_sched_param+0x108> ffc11598: 80 1e 00 14 lwz r0,20(r30) (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; ffc1159c: 3b 80 00 16 li r28,22 if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc115a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc115a4: 41 be ff 74 beq- cr7,ffc11518 <_POSIX_Thread_Translate_sched_param+0x78> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc115a8: 38 7e 00 08 addi r3,r30,8 ffc115ac: 4b ff d0 0d bl ffc0e5b8 <_Timespec_To_ticks> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; ffc115b0: 3b 80 00 16 li r28,22 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc115b4: 7c 7f 1b 78 mr r31,r3 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) ffc115b8: 38 7e 00 10 addi r3,r30,16 ffc115bc: 4b ff cf fd bl ffc0e5b8 <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc115c0: 7f 9f 18 40 cmplw cr7,r31,r3 ffc115c4: 41 bc ff 54 blt- cr7,ffc11518 <_POSIX_Thread_Translate_sched_param+0x78> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) ffc115c8: 80 7e 00 04 lwz r3,4(r30) ffc115cc: 4b ff fe b1 bl ffc1147c <_POSIX_Priority_Is_valid> ffc115d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc115d4: 41 be ff 44 beq- cr7,ffc11518 <_POSIX_Thread_Translate_sched_param+0x78> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc115d8: 38 00 00 03 li r0,3 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc115dc: 3d 20 ff c1 lis r9,-63 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc115e0: 90 1d 00 00 stw r0,0(r29) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc115e4: 38 09 98 c8 addi r0,r9,-26424 return 0; ffc115e8: 3b 80 00 00 li r28,0 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc115ec: 90 1b 00 00 stw r0,0(r27) return 0; ffc115f0: 4b ff ff 28 b ffc11518 <_POSIX_Thread_Translate_sched_param+0x78> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; ffc115f4: 93 fd 00 00 stw r31,0(r29) return 0; ffc115f8: 4b ff ff 20 b ffc11518 <_POSIX_Thread_Translate_sched_param+0x78> =============================================================================== ffc0fb00 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { ffc0fb00: 7c 08 02 a6 mflr r0 ffc0fb04: 94 21 ff f8 stwu r1,-8(r1) ffc0fb08: 90 01 00 0c stw r0,12(r1) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0fb0c: 88 03 00 08 lbz r0,8(r3) ffc0fb10: 54 00 07 7e clrlwi r0,r0,29 /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) ffc0fb14: 2f 80 00 03 cmpwi cr7,r0,3 ffc0fb18: 41 9e 00 14 beq- cr7,ffc0fb2c <_POSIX_Threads_Exitted_extension+0x2c> pthread_exit( executing->Wait.return_argument ); } ffc0fb1c: 80 01 00 0c lwz r0,12(r1) ffc0fb20: 38 21 00 08 addi r1,r1,8 ffc0fb24: 7c 08 03 a6 mtlr r0 ffc0fb28: 4e 80 00 20 blr /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); ffc0fb2c: 80 63 00 28 lwz r3,40(r3) ffc0fb30: 48 00 34 55 bl ffc12f84 } ffc0fb34: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc0fb38: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0fb3c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0fb40: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc09494 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc09494: 94 21 ff 90 stwu r1,-112(r1) ffc09498: 7c 08 02 a6 mflr r0 uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc0949c: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc094a0: 90 01 00 74 stw r0,116(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc094a4: 39 29 20 84 addi r9,r9,8324 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc094a8: 93 c1 00 68 stw r30,104(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc094ac: 83 c9 00 34 lwz r30,52(r9) * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc094b0: 93 81 00 60 stw r28,96(r1) pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) ffc094b4: 2f 9e 00 00 cmpwi cr7,r30,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc094b8: 93 61 00 5c stw r27,92(r1) ffc094bc: 93 a1 00 64 stw r29,100(r1) ffc094c0: 93 e1 00 6c stw r31,108(r1) posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; ffc094c4: 83 89 00 30 lwz r28,48(r9) if ( !user_threads || maximum == 0 ) ffc094c8: 41 9e 00 64 beq- cr7,ffc0952c <_POSIX_Threads_Initialize_user_threads_body+0x98><== NEVER TAKEN ffc094cc: 2f 9c 00 00 cmpwi cr7,r28,0 ffc094d0: 41 9e 00 5c beq- cr7,ffc0952c <_POSIX_Threads_Initialize_user_threads_body+0x98><== NEVER TAKEN ffc094d4: 3b a0 00 00 li r29,0 ffc094d8: 3b e1 00 0c addi r31,r1,12 ffc094dc: 3b 61 00 08 addi r27,r1,8 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); ffc094e0: 7f e3 fb 78 mr r3,r31 ffc094e4: 48 00 81 19 bl ffc115fc (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); ffc094e8: 38 80 00 02 li r4,2 ffc094ec: 7f e3 fb 78 mr r3,r31 ffc094f0: 48 00 81 4d bl ffc1163c (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); ffc094f4: 80 9e 00 04 lwz r4,4(r30) ffc094f8: 7f e3 fb 78 mr r3,r31 ffc094fc: 48 00 81 75 bl ffc11670 status = pthread_create( ffc09500: 80 be 00 00 lwz r5,0(r30) ffc09504: 7f 63 db 78 mr r3,r27 ffc09508: 7f e4 fb 78 mr r4,r31 ffc0950c: 38 c0 00 00 li r6,0 ffc09510: 4b ff fb c1 bl ffc090d0 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) ffc09514: 7c 65 1b 79 mr. r5,r3 ffc09518: 40 82 00 38 bne- ffc09550 <_POSIX_Threads_Initialize_user_threads_body+0xbc> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { ffc0951c: 3b bd 00 01 addi r29,r29,1 ffc09520: 7f 9c e8 40 cmplw cr7,r28,r29 ffc09524: 3b de 00 08 addi r30,r30,8 ffc09528: 41 9d ff b8 bgt+ cr7,ffc094e0 <_POSIX_Threads_Initialize_user_threads_body+0x4c><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } ffc0952c: 80 01 00 74 lwz r0,116(r1) ffc09530: 83 61 00 5c lwz r27,92(r1) ffc09534: 7c 08 03 a6 mtlr r0 ffc09538: 83 81 00 60 lwz r28,96(r1) ffc0953c: 83 a1 00 64 lwz r29,100(r1) ffc09540: 83 c1 00 68 lwz r30,104(r1) ffc09544: 83 e1 00 6c lwz r31,108(r1) ffc09548: 38 21 00 70 addi r1,r1,112 ffc0954c: 4e 80 00 20 blr &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); ffc09550: 38 60 00 02 li r3,2 ffc09554: 38 80 00 01 li r4,1 ffc09558: 48 00 2a 25 bl ffc0bf7c <_Internal_error_Occurred> =============================================================================== ffc0fd70 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc0fd70: 94 21 ff f0 stwu r1,-16(r1) ffc0fd74: 7c 08 02 a6 mflr r0 ffc0fd78: 90 01 00 14 stw r0,20(r1) ffc0fd7c: 93 e1 00 0c stw r31,12(r1) Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0fd80: 83 e4 01 34 lwz r31,308(r4) */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc0fd84: 93 c1 00 08 stw r30,8(r1) ffc0fd88: 7c 9e 23 78 mr r30,r4 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); ffc0fd8c: 38 7f 00 98 addi r3,r31,152 ffc0fd90: 48 00 13 8d bl ffc1111c <_Timespec_To_ticks> */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0fd94: 80 1e 00 1c lwz r0,28(r30) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc0fd98: 3d 20 00 00 lis r9,0 ffc0fd9c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fda0: 88 89 26 cc lbz r4,9932(r9) ffc0fda4: 80 1f 00 88 lwz r0,136(r31) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; ffc0fda8: 90 7e 00 78 stw r3,120(r30) ffc0fdac: 7c 80 20 50 subf r4,r0,r4 new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; ffc0fdb0: 90 9e 00 18 stw r4,24(r30) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0fdb4: 40 9e 00 10 bne- cr7,ffc0fdc4 <_POSIX_Threads_Sporadic_budget_TSR+0x54><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { ffc0fdb8: 80 1e 00 14 lwz r0,20(r30) ffc0fdbc: 7f 80 20 40 cmplw cr7,r0,r4 ffc0fdc0: 41 9d 00 38 bgt- cr7,ffc0fdf8 <_POSIX_Threads_Sporadic_budget_TSR+0x88> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc0fdc4: 38 7f 00 90 addi r3,r31,144 ffc0fdc8: 48 00 13 55 bl ffc1111c <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0fdcc: 38 9f 00 a8 addi r4,r31,168 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0fdd0: 90 7f 00 b4 stw r3,180(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0fdd4: 3c 60 00 00 lis r3,0 ffc0fdd8: 38 63 2d 08 addi r3,r3,11528 ffc0fddc: 4b ff d5 51 bl ffc0d32c <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc0fde0: 80 01 00 14 lwz r0,20(r1) ffc0fde4: 83 c1 00 08 lwz r30,8(r1) ffc0fde8: 7c 08 03 a6 mtlr r0 ffc0fdec: 83 e1 00 0c lwz r31,12(r1) ffc0fdf0: 38 21 00 10 addi r1,r1,16 ffc0fdf4: 4e 80 00 20 blr if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc0fdf8: 7f c3 f3 78 mr r3,r30 ffc0fdfc: 38 a0 00 01 li r5,1 ffc0fe00: 4b ff b9 31 bl ffc0b730 <_Thread_Change_priority> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc0fe04: 38 7f 00 90 addi r3,r31,144 ffc0fe08: 48 00 13 15 bl ffc1111c <_Timespec_To_ticks> ffc0fe0c: 38 9f 00 a8 addi r4,r31,168 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0fe10: 90 7f 00 b4 stw r3,180(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0fe14: 3c 60 00 00 lis r3,0 ffc0fe18: 38 63 2d 08 addi r3,r3,11528 ffc0fe1c: 4b ff d5 11 bl ffc0d32c <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc0fe20: 80 01 00 14 lwz r0,20(r1) ffc0fe24: 83 c1 00 08 lwz r30,8(r1) ffc0fe28: 7c 08 03 a6 mtlr r0 ffc0fe2c: 83 e1 00 0c lwz r31,12(r1) ffc0fe30: 38 21 00 10 addi r1,r1,16 ffc0fe34: 4e 80 00 20 blr =============================================================================== ffc0fe38 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { ffc0fe38: 7c 08 02 a6 mflr r0 ffc0fe3c: 94 21 ff f8 stwu r1,-8(r1) ffc0fe40: 90 01 00 0c stw r0,12(r1) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0fe44: 80 03 00 1c lwz r0,28(r3) ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0fe48: 81 63 01 34 lwz r11,308(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0fe4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fe50: 80 0b 00 8c lwz r0,140(r11) ffc0fe54: 3d 60 00 00 lis r11,0 ffc0fe58: 88 8b 26 cc lbz r4,9932(r11) ffc0fe5c: 7c 80 20 50 subf r4,r0,r4 /* * 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 */ ffc0fe60: 38 00 ff ff li r0,-1 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; ffc0fe64: 90 83 00 18 stw r4,24(r3) /* * 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 */ ffc0fe68: 90 03 00 78 stw r0,120(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0fe6c: 40 9e 00 10 bne- cr7,ffc0fe7c <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { ffc0fe70: 80 03 00 14 lwz r0,20(r3) ffc0fe74: 7f 80 20 40 cmplw cr7,r0,r4 ffc0fe78: 41 9c 00 14 blt- cr7,ffc0fe8c <_POSIX_Threads_Sporadic_budget_callout+0x54><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } ffc0fe7c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc0fe80: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0fe84: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0fe88: 4e 80 00 20 blr <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc0fe8c: 38 a0 00 01 li r5,1 ffc0fe90: 4b ff b8 a1 bl ffc0b730 <_Thread_Change_priority> #if 0 printk( "lower priority\n" ); #endif } } } ffc0fe94: 80 01 00 0c lwz r0,12(r1) ffc0fe98: 38 21 00 08 addi r1,r1,8 ffc0fe9c: 7c 08 03 a6 mtlr r0 ffc0fea0: 4e 80 00 20 blr =============================================================================== ffc12ad8 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc12ad8: 94 21 ff e8 stwu r1,-24(r1) ffc12adc: 7c 08 02 a6 mflr r0 ffc12ae0: 90 01 00 1c stw r0,28(r1) ffc12ae4: 93 a1 00 0c stw r29,12(r1) ffc12ae8: 93 c1 00 10 stw r30,16(r1) ffc12aec: 93 e1 00 14 stw r31,20(r1) 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 ]; ffc12af0: 83 c3 01 34 lwz r30,308(r3) handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc12af4: 80 1e 00 e4 lwz r0,228(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc12af8: 3b be 00 e8 addi r29,r30,232 ffc12afc: 7f 80 e8 00 cmpw cr7,r0,r29 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; ffc12b00: 38 00 00 01 li r0,1 ffc12b04: 90 1e 00 d8 stw r0,216(r30) while ( !_Chain_Is_empty( handler_stack ) ) { ffc12b08: 41 9e 00 50 beq- cr7,ffc12b58 <_POSIX_Threads_cancel_run+0x80> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc12b0c: 7c 00 00 a6 mfmsr r0 ffc12b10: 7d 30 42 a6 mfsprg r9,0 ffc12b14: 7c 09 48 78 andc r9,r0,r9 ffc12b18: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); handler = (POSIX_Cancel_Handler_control *) ffc12b1c: 83 fe 00 ec lwz r31,236(r30) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc12b20: 81 7f 00 00 lwz r11,0(r31) previous = the_node->previous; ffc12b24: 81 3f 00 04 lwz r9,4(r31) next->previous = previous; ffc12b28: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc12b2c: 91 69 00 00 stw r11,0(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc12b30: 7c 00 01 24 mtmsr r0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); (*handler->routine)( handler->arg ); ffc12b34: 80 1f 00 08 lwz r0,8(r31) ffc12b38: 80 7f 00 0c lwz r3,12(r31) ffc12b3c: 7c 09 03 a6 mtctr r0 ffc12b40: 4e 80 04 21 bctrl _Workspace_Free( handler ); ffc12b44: 7f e3 fb 78 mr r3,r31 ffc12b48: 4b ff ac 11 bl ffc0d758 <_Workspace_Free> handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc12b4c: 80 1e 00 e4 lwz r0,228(r30) ffc12b50: 7f 80 e8 00 cmpw cr7,r0,r29 ffc12b54: 40 9e ff b8 bne+ cr7,ffc12b0c <_POSIX_Threads_cancel_run+0x34><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } ffc12b58: 80 01 00 1c lwz r0,28(r1) ffc12b5c: 83 a1 00 0c lwz r29,12(r1) ffc12b60: 7c 08 03 a6 mtlr r0 ffc12b64: 83 c1 00 10 lwz r30,16(r1) ffc12b68: 83 e1 00 14 lwz r31,20(r1) ffc12b6c: 38 21 00 18 addi r1,r1,24 ffc12b70: 4e 80 00 20 blr =============================================================================== ffc0921c <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc0921c: 94 21 ff f0 stwu r1,-16(r1) ffc09220: 7c 08 02 a6 mflr r0 ffc09224: 90 01 00 14 stw r0,20(r1) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc09228: 80 04 00 54 lwz r0,84(r4) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc0922c: 81 24 00 68 lwz r9,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc09230: 2f 80 00 00 cmpwi cr7,r0,0 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc09234: 93 e1 00 0c stw r31,12(r1) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc09238: 38 09 00 01 addi r0,r9,1 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc0923c: 7c 9f 23 78 mr r31,r4 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc09240: 90 04 00 68 stw r0,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc09244: 40 9e 00 40 bne- cr7,ffc09284 <_POSIX_Timer_TSR+0x68> ffc09248: 80 04 00 58 lwz r0,88(r4) ffc0924c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09250: 40 9e 00 34 bne- cr7,ffc09284 <_POSIX_Timer_TSR+0x68> <== ALWAYS TAKEN /* 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; ffc09254: 38 00 00 04 li r0,4 <== NOT EXECUTED ffc09258: 98 04 00 3c stb r0,60(r4) <== 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 ) ) { ffc0925c: 80 7f 00 38 lwz r3,56(r31) ffc09260: 80 9f 00 44 lwz r4,68(r31) ffc09264: 48 00 79 49 bl ffc10bac } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; ffc09268: 38 00 00 00 li r0,0 ffc0926c: 90 1f 00 68 stw r0,104(r31) } ffc09270: 80 01 00 14 lwz r0,20(r1) ffc09274: 83 e1 00 0c lwz r31,12(r1) ffc09278: 38 21 00 10 addi r1,r1,16 ffc0927c: 7c 08 03 a6 mtlr r0 ffc09280: 4e 80 00 20 blr 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( ffc09284: 80 9f 00 64 lwz r4,100(r31) ffc09288: 3c c0 ff c1 lis r6,-63 ffc0928c: 80 bf 00 08 lwz r5,8(r31) ffc09290: 38 7f 00 10 addi r3,r31,16 ffc09294: 38 c6 92 1c addi r6,r6,-28132 ffc09298: 7f e7 fb 78 mr r7,r31 ffc0929c: 48 00 7f 25 bl ffc111c0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) ffc092a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc092a4: 41 9e ff cc beq+ cr7,ffc09270 <_POSIX_Timer_TSR+0x54> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); ffc092a8: 38 7f 00 6c addi r3,r31,108 ffc092ac: 48 00 1e 79 bl ffc0b124 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc092b0: 38 00 00 03 li r0,3 ffc092b4: 98 1f 00 3c stb r0,60(r31) ffc092b8: 4b ff ff a4 b ffc0925c <_POSIX_Timer_TSR+0x40> =============================================================================== ffc12c50 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc12c50: 94 21 ff 90 stwu r1,-112(r1) ffc12c54: 7c 08 02 a6 mflr r0 ffc12c58: 7c a6 2b 78 mr r6,r5 ffc12c5c: 93 c1 00 68 stw r30,104(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc12c60: 3b c1 00 08 addi r30,r1,8 ffc12c64: 7f c5 f3 78 mr r5,r30 ffc12c68: 38 e0 00 01 li r7,1 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc12c6c: 93 a1 00 64 stw r29,100(r1) ffc12c70: 7c 9d 23 78 mr r29,r4 ffc12c74: 93 e1 00 6c stw r31,108(r1) ffc12c78: 7c 7f 1b 78 mr r31,r3 ffc12c7c: 90 01 00 74 stw r0,116(r1) ffc12c80: 92 e1 00 4c stw r23,76(r1) ffc12c84: 93 01 00 50 stw r24,80(r1) ffc12c88: 93 21 00 54 stw r25,84(r1) ffc12c8c: 93 41 00 58 stw r26,88(r1) ffc12c90: 93 61 00 5c stw r27,92(r1) ffc12c94: 93 81 00 60 stw r28,96(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc12c98: 48 00 00 e1 bl ffc12d78 <_POSIX_signals_Clear_signals> ffc12c9c: 2f 83 00 00 cmpwi cr7,r3,0 is_global, true ) ) return false; ffc12ca0: 38 60 00 00 li r3,0 { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc12ca4: 41 9e 00 88 beq- cr7,ffc12d2c <_POSIX_signals_Check_signal+0xdc> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) ffc12ca8: 1f 7d 00 0c mulli r27,r29,12 ffc12cac: 3f 40 00 00 lis r26,0 ffc12cb0: 3b 5a 31 40 addi r26,r26,12608 ffc12cb4: 7d 3a da 14 add r9,r26,r27 ffc12cb8: 83 89 00 08 lwz r28,8(r9) ffc12cbc: 2f 9c 00 01 cmpwi cr7,r28,1 ffc12cc0: 41 9e 00 6c beq- cr7,ffc12d2c <_POSIX_signals_Check_signal+0xdc><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; ffc12cc4: 83 3f 00 d0 lwz r25,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc12cc8: 3e e0 00 00 lis r23,0 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc12ccc: 80 09 00 04 lwz r0,4(r9) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc12cd0: 3a f7 30 e4 addi r23,r23,12516 ffc12cd4: 80 97 00 0c lwz r4,12(r23) ffc12cd8: 3b 01 00 14 addi r24,r1,20 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc12cdc: 7c 00 cb 78 or r0,r0,r25 ffc12ce0: 90 1f 00 d0 stw r0,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc12ce4: 7f 03 c3 78 mr r3,r24 ffc12ce8: 38 84 00 20 addi r4,r4,32 ffc12cec: 38 a0 00 28 li r5,40 ffc12cf0: 48 00 15 7d bl ffc1426c sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc12cf4: 7c 1a d8 2e lwzx r0,r26,r27 ffc12cf8: 2f 80 00 02 cmpwi cr7,r0,2 ffc12cfc: 41 9e 00 64 beq- cr7,ffc12d60 <_POSIX_signals_Check_signal+0x110> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); ffc12d00: 7f a3 eb 78 mr r3,r29 ffc12d04: 7f 89 03 a6 mtctr r28 ffc12d08: 4c c6 31 82 crclr 4*cr1+eq ffc12d0c: 4e 80 04 21 bctrl } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, ffc12d10: 80 77 00 0c lwz r3,12(r23) ffc12d14: 7f 04 c3 78 mr r4,r24 ffc12d18: 38 a0 00 28 li r5,40 ffc12d1c: 38 63 00 20 addi r3,r3,32 ffc12d20: 48 00 15 4d bl ffc1426c sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; ffc12d24: 93 3f 00 d0 stw r25,208(r31) return true; ffc12d28: 38 60 00 01 li r3,1 } ffc12d2c: 80 01 00 74 lwz r0,116(r1) ffc12d30: 82 e1 00 4c lwz r23,76(r1) ffc12d34: 7c 08 03 a6 mtlr r0 ffc12d38: 83 01 00 50 lwz r24,80(r1) ffc12d3c: 83 21 00 54 lwz r25,84(r1) ffc12d40: 83 41 00 58 lwz r26,88(r1) ffc12d44: 83 61 00 5c lwz r27,92(r1) ffc12d48: 83 81 00 60 lwz r28,96(r1) ffc12d4c: 83 a1 00 64 lwz r29,100(r1) ffc12d50: 83 c1 00 68 lwz r30,104(r1) ffc12d54: 83 e1 00 6c lwz r31,108(r1) ffc12d58: 38 21 00 70 addi r1,r1,112 ffc12d5c: 4e 80 00 20 blr /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc12d60: 7f a3 eb 78 mr r3,r29 ffc12d64: 7f 89 03 a6 mtctr r28 ffc12d68: 7f c4 f3 78 mr r4,r30 ffc12d6c: 38 a0 00 00 li r5,0 ffc12d70: 4e 80 04 21 bctrl signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; ffc12d74: 4b ff ff 9c b ffc12d10 <_POSIX_signals_Check_signal+0xc0> =============================================================================== ffc1359c <_POSIX_signals_Clear_process_signals>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1359c: 7d 60 00 a6 mfmsr r11 ffc135a0: 7c 10 42 a6 mfsprg r0,0 ffc135a4: 7d 60 00 78 andc r0,r11,r0 ffc135a8: 7c 00 01 24 mtmsr r0 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { ffc135ac: 3d 20 00 00 lis r9,0 ffc135b0: 1c 03 00 0c mulli r0,r3,12 ffc135b4: 39 29 31 40 addi r9,r9,12608 ffc135b8: 7d 29 00 2e lwzx r9,r9,r0 ffc135bc: 2f 89 00 02 cmpwi cr7,r9,2 ffc135c0: 41 9e 00 28 beq- cr7,ffc135e8 <_POSIX_signals_Clear_process_signals+0x4c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc135c4: 3d 20 00 00 lis r9,0 ffc135c8: 80 09 27 dc lwz r0,10204(r9) ffc135cc: 39 40 ff fe li r10,-2 ffc135d0: 38 63 ff ff addi r3,r3,-1 ffc135d4: 5d 43 18 3e rotlw r3,r10,r3 ffc135d8: 7c 63 00 38 and r3,r3,r0 ffc135dc: 90 69 27 dc stw r3,10204(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc135e0: 7d 60 01 24 mtmsr r11 } _ISR_Enable( level ); } ffc135e4: 4e 80 00 20 blr ffc135e8: 3d 20 00 00 lis r9,0 ffc135ec: 39 29 33 34 addi r9,r9,13108 ffc135f0: 7d 49 02 14 add r10,r9,r0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) ffc135f4: 7d 29 00 2e lwzx r9,r9,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc135f8: 38 0a 00 04 addi r0,r10,4 ffc135fc: 7f 89 00 00 cmpw cr7,r9,r0 ffc13600: 41 be ff c4 beq- cr7,ffc135c4 <_POSIX_signals_Clear_process_signals+0x28><== ALWAYS TAKEN ffc13604: 7d 60 01 24 mtmsr r11 <== NOT EXECUTED } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); } ffc13608: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc09ec8 <_POSIX_signals_Get_lowest>: ffc09ec8: 38 00 00 05 li r0,5 ffc09ecc: 7c 09 03 a6 mtctr r0 sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc09ed0: 39 20 00 1b li r9,27 ffc09ed4: 39 60 00 01 li r11,1 #include #include #include #include int _POSIX_signals_Get_lowest( ffc09ed8: 38 09 ff ff addi r0,r9,-1 ffc09edc: 7d 60 00 30 slw r0,r11,r0 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc09ee0: 7c 0a 18 39 and. r10,r0,r3 ffc09ee4: 40 82 00 38 bne- ffc09f1c <_POSIX_signals_Get_lowest+0x54><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc09ee8: 39 29 00 01 addi r9,r9,1 ffc09eec: 42 00 ff ec bdnz+ ffc09ed8 <_POSIX_signals_Get_lowest+0x10> ffc09ef0: 38 00 00 1a li r0,26 ffc09ef4: 39 20 00 01 li r9,1 ffc09ef8: 7c 09 03 a6 mtctr r0 ffc09efc: 39 60 00 01 li r11,1 ffc09f00: 48 00 00 0c b ffc09f0c <_POSIX_signals_Get_lowest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc09f04: 39 29 00 01 addi r9,r9,1 ffc09f08: 42 40 00 14 bdz- ffc09f1c <_POSIX_signals_Get_lowest+0x54> #include #include #include #include int _POSIX_signals_Get_lowest( ffc09f0c: 38 09 ff ff addi r0,r9,-1 ffc09f10: 7d 60 00 30 slw r0,r11,r0 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc09f14: 7c 0a 18 39 and. r10,r0,r3 ffc09f18: 41 82 ff ec beq+ ffc09f04 <_POSIX_signals_Get_lowest+0x3c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } ffc09f1c: 7d 23 4b 78 mr r3,r9 ffc09f20: 4e 80 00 20 blr =============================================================================== ffc0f74c <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0f74c: 94 21 ff e8 stwu r1,-24(r1) ffc0f750: 7c 08 02 a6 mflr r0 ffc0f754: 90 01 00 1c stw r0,28(r1) ffc0f758: 93 c1 00 10 stw r30,16(r1) POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0f75c: 83 c3 01 34 lwz r30,308(r3) */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0f760: 93 a1 00 0c stw r29,12(r1) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* * api may be NULL in case of a thread close in progress */ if ( !api ) ffc0f764: 2f 9e 00 00 cmpwi cr7,r30,0 */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0f768: 93 e1 00 14 stw r31,20(r1) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* * api may be NULL in case of a thread close in progress */ if ( !api ) ffc0f76c: 41 9e 00 c4 beq- cr7,ffc0f830 <_POSIX_signals_Post_switch_extension+0xe4> ffc0f770: 3f a0 00 00 lis r29,0 ffc0f774: 3b bd 27 dc addi r29,r29,10204 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f778: 7c 00 00 a6 mfmsr r0 ffc0f77c: 7d 30 42 a6 mfsprg r9,0 ffc0f780: 7c 09 48 78 andc r9,r0,r9 ffc0f784: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0f788: 81 5d 00 00 lwz r10,0(r29) ffc0f78c: 81 3e 00 d4 lwz r9,212(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0f790: 81 7e 00 d0 lwz r11,208(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0f794: 7d 49 4b 78 or r9,r10,r9 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0f798: 7d 2a 58 79 andc. r10,r9,r11 ffc0f79c: 41 82 00 90 beq- ffc0f82c <_POSIX_signals_Post_switch_extension+0xe0> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f7a0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0f7a4: 3b e0 00 1b li r31,27 _POSIX_signals_Check_signal( api, signo, false ); ffc0f7a8: 7f e4 fb 78 mr r4,r31 ffc0f7ac: 38 a0 00 00 li r5,0 ffc0f7b0: 7f c3 f3 78 mr r3,r30 ffc0f7b4: 48 00 34 9d bl ffc12c50 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc0f7b8: 7f e4 fb 78 mr r4,r31 ffc0f7bc: 7f c3 f3 78 mr r3,r30 ffc0f7c0: 38 a0 00 01 li r5,1 ffc0f7c4: 48 00 34 8d bl ffc12c50 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0f7c8: 2f 9f 00 1f cmpwi cr7,r31,31 ffc0f7cc: 3b ff 00 01 addi r31,r31,1 ffc0f7d0: 40 9e ff d8 bne+ cr7,ffc0f7a8 <_POSIX_signals_Post_switch_extension+0x5c> ffc0f7d4: 3b e0 00 01 li r31,1 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); ffc0f7d8: 7f e4 fb 78 mr r4,r31 ffc0f7dc: 38 a0 00 00 li r5,0 ffc0f7e0: 7f c3 f3 78 mr r3,r30 ffc0f7e4: 48 00 34 6d bl ffc12c50 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc0f7e8: 7f e4 fb 78 mr r4,r31 ffc0f7ec: 7f c3 f3 78 mr r3,r30 ffc0f7f0: 38 a0 00 01 li r5,1 ffc0f7f4: 48 00 34 5d bl ffc12c50 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc0f7f8: 2f 9f 00 1a cmpwi cr7,r31,26 ffc0f7fc: 3b ff 00 01 addi r31,r31,1 ffc0f800: 40 9e ff d8 bne+ cr7,ffc0f7d8 <_POSIX_signals_Post_switch_extension+0x8c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f804: 7c 00 00 a6 mfmsr r0 ffc0f808: 7d 30 42 a6 mfsprg r9,0 ffc0f80c: 7c 09 48 78 andc r9,r0,r9 ffc0f810: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0f814: 81 5d 00 00 lwz r10,0(r29) ffc0f818: 81 3e 00 d4 lwz r9,212(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0f81c: 81 7e 00 d0 lwz r11,208(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0f820: 7d 49 4b 78 or r9,r10,r9 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0f824: 7d 2a 58 79 andc. r10,r9,r11 ffc0f828: 40 82 ff 78 bne+ ffc0f7a0 <_POSIX_signals_Post_switch_extension+0x54><== NEVER TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f82c: 7c 00 01 24 mtmsr r0 for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } ffc0f830: 80 01 00 1c lwz r0,28(r1) ffc0f834: 83 a1 00 0c lwz r29,12(r1) ffc0f838: 7c 08 03 a6 mtlr r0 ffc0f83c: 83 c1 00 10 lwz r30,16(r1) ffc0f840: 83 e1 00 14 lwz r31,20(r1) ffc0f844: 38 21 00 18 addi r1,r1,24 ffc0f848: 4e 80 00 20 blr =============================================================================== ffc297f0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc297f0: 94 21 ff f0 stwu r1,-16(r1) ffc297f4: 7c 08 02 a6 mflr r0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc297f8: 3d 20 10 00 lis r9,4096 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc297fc: 90 01 00 14 stw r0,20(r1) /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc29800: 61 29 80 00 ori r9,r9,32768 ffc29804: 80 03 00 10 lwz r0,16(r3) bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc29808: 93 e1 00 0c stw r31,12(r1) ffc2980c: 7c 7f 1b 78 mr r31,r3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc29810: 7c 0b 48 38 and r11,r0,r9 ffc29814: 7f 8b 48 00 cmpw cr7,r11,r9 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc29818: 93 c1 00 08 stw r30,8(r1) ffc2981c: 39 64 ff ff addi r11,r4,-1 ffc29820: 39 20 00 01 li r9,1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc29824: 81 43 01 34 lwz r10,308(r3) ffc29828: 7d 2b 58 30 slw r11,r9,r11 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc2982c: 41 9e 00 70 beq- cr7,ffc2989c <_POSIX_signals_Unblock_thread+0xac> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc29830: 81 4a 00 d0 lwz r10,208(r10) } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; ffc29834: 3b c0 00 00 li r30,0 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc29838: 7d 68 50 79 andc. r8,r11,r10 ffc2983c: 41 82 00 44 beq- ffc29880 <_POSIX_signals_Unblock_thread+0x90> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { ffc29840: 74 0b 10 00 andis. r11,r0,4096 ffc29844: 41 82 00 b8 beq- ffc298fc <_POSIX_signals_Unblock_thread+0x10c> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc29848: 3d 20 00 03 lis r9,3 ffc2984c: 61 29 be e0 ori r9,r9,48864 the_thread->Wait.return_code = EINTR; /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) ffc29850: 7c 08 48 39 and. r8,r0,r9 * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { the_thread->Wait.return_code = EINTR; ffc29854: 39 20 00 04 li r9,4 ffc29858: 91 23 00 34 stw r9,52(r3) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) ffc2985c: 40 82 00 e4 bne- ffc29940 <_POSIX_signals_Unblock_thread+0x150> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { ffc29860: 70 09 00 08 andi. r9,r0,8 ffc29864: 41 a2 00 1c beq+ ffc29880 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); ffc29868: 38 63 00 48 addi r3,r3,72 ffc2986c: 4b fe ad c1 bl ffc1462c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc29870: 3c 80 10 03 lis r4,4099 ffc29874: 7f e3 fb 78 mr r3,r31 ffc29878: 60 84 ff f8 ori r4,r4,65528 ffc2987c: 4b fe 91 f1 bl ffc12a6c <_Thread_Clear_state> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc29880: 80 01 00 14 lwz r0,20(r1) ffc29884: 7f c3 f3 78 mr r3,r30 ffc29888: 83 e1 00 0c lwz r31,12(r1) ffc2988c: 7c 08 03 a6 mtlr r0 ffc29890: 83 c1 00 08 lwz r30,8(r1) ffc29894: 38 21 00 10 addi r1,r1,16 ffc29898: 4e 80 00 20 blr * 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) ) { ffc2989c: 80 03 00 30 lwz r0,48(r3) ffc298a0: 7d 68 00 39 and. r8,r11,r0 ffc298a4: 41 82 00 88 beq- ffc2992c <_POSIX_signals_Unblock_thread+0x13c> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc298a8: 2f 85 00 00 cmpwi cr7,r5,0 if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; ffc298ac: 81 3f 00 28 lwz r9,40(r31) */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; ffc298b0: 38 00 00 04 li r0,4 ffc298b4: 90 1f 00 34 stw r0,52(r31) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc298b8: 41 9e 00 90 beq- cr7,ffc29948 <_POSIX_signals_Unblock_thread+0x158> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; ffc298bc: 81 45 00 00 lwz r10,0(r5) ffc298c0: 81 65 00 04 lwz r11,4(r5) ffc298c4: 80 05 00 08 lwz r0,8(r5) ffc298c8: 91 49 00 00 stw r10,0(r9) ffc298cc: 91 69 00 04 stw r11,4(r9) ffc298d0: 90 09 00 08 stw r0,8(r9) } _Thread_queue_Extract_with_proxy( the_thread ); ffc298d4: 7f e3 fb 78 mr r3,r31 ffc298d8: 4b fe 9f 9d bl ffc13874 <_Thread_queue_Extract_with_proxy> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc298dc: 80 01 00 14 lwz r0,20(r1) } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); return true; ffc298e0: 3b c0 00 01 li r30,1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc298e4: 83 e1 00 0c lwz r31,12(r1) ffc298e8: 7c 08 03 a6 mtlr r0 ffc298ec: 7f c3 f3 78 mr r3,r30 ffc298f0: 83 c1 00 08 lwz r30,8(r1) ffc298f4: 38 21 00 10 addi r1,r1,16 ffc298f8: 4e 80 00 20 blr else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { ffc298fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc29900: 40 be ff 80 bne- cr7,ffc29880 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc29904: 3d 60 00 00 lis r11,0 ffc29908: 39 6b 32 64 addi r11,r11,12900 ffc2990c: 80 0b 00 08 lwz r0,8(r11) ffc29910: 2f 80 00 00 cmpwi cr7,r0,0 ffc29914: 41 be ff 6c beq- cr7,ffc29880 <_POSIX_signals_Unblock_thread+0x90> ffc29918: 80 0b 00 0c lwz r0,12(r11) ffc2991c: 7f 83 00 00 cmpw cr7,r3,r0 ffc29920: 40 9e ff 60 bne+ cr7,ffc29880 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc29924: 99 2b 00 18 stb r9,24(r11) ffc29928: 4b ff ff 58 b ffc29880 <_POSIX_signals_Unblock_thread+0x90> * 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) ) { ffc2992c: 80 0a 00 d0 lwz r0,208(r10) /* * This should only be reached via pthread_kill(). */ return false; ffc29930: 3b c0 00 00 li r30,0 * 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) ) { ffc29934: 7d 69 00 79 andc. r9,r11,r0 ffc29938: 40 82 ff 70 bne+ ffc298a8 <_POSIX_signals_Unblock_thread+0xb8> ffc2993c: 4b ff ff 44 b ffc29880 <_POSIX_signals_Unblock_thread+0x90> /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); ffc29940: 4b fe 9f 35 bl ffc13874 <_Thread_queue_Extract_with_proxy> ffc29944: 4b ff ff 3c b ffc29880 <_POSIX_signals_Unblock_thread+0x90> the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; ffc29948: 38 00 00 01 li r0,1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; ffc2994c: 90 89 00 00 stw r4,0(r9) the_info->si_code = SI_USER; ffc29950: 90 09 00 04 stw r0,4(r9) the_info->si_value.sival_int = 0; ffc29954: 90 a9 00 08 stw r5,8(r9) ffc29958: 4b ff ff 7c b ffc298d4 <_POSIX_signals_Unblock_thread+0xe4> =============================================================================== ffc093e8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc093e8: 94 21 ff d8 stwu r1,-40(r1) ffc093ec: 7c 08 02 a6 mflr r0 rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc093f0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc093f4: 90 01 00 2c stw r0,44(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc093f8: 39 29 20 70 addi r9,r9,8304 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc093fc: 93 e1 00 24 stw r31,36(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09400: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09404: 93 a1 00 1c stw r29,28(r1) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09408: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc0940c: 93 81 00 18 stw r28,24(r1) ffc09410: 93 c1 00 20 stw r30,32(r1) /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; maximum = Configuration_RTEMS_API.number_of_initialization_tasks; ffc09414: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09418: 41 9e 00 60 beq- cr7,ffc09478 <_RTEMS_tasks_Initialize_user_tasks_body+0x90> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc0941c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09420: 41 9e 00 58 beq- cr7,ffc09478 <_RTEMS_tasks_Initialize_user_tasks_body+0x90><== NEVER TAKEN ffc09424: 3b c0 00 00 li r30,0 ffc09428: 3b 81 00 08 addi r28,r1,8 return_value = rtems_task_create( ffc0942c: 80 bf 00 04 lwz r5,4(r31) ffc09430: 7f 88 e3 78 mr r8,r28 ffc09434: 80 7f 00 00 lwz r3,0(r31) ffc09438: 80 9f 00 08 lwz r4,8(r31) ffc0943c: 80 df 00 14 lwz r6,20(r31) ffc09440: 80 ff 00 0c lwz r7,12(r31) ffc09444: 4b ff fc b1 bl ffc090f4 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc09448: 7c 65 1b 79 mr. r5,r3 ffc0944c: 40 82 00 4c bne- ffc09498 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc09450: 80 bf 00 18 lwz r5,24(r31) ffc09454: 80 61 00 08 lwz r3,8(r1) ffc09458: 80 9f 00 10 lwz r4,16(r31) ffc0945c: 48 00 00 49 bl ffc094a4 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc09460: 7c 65 1b 79 mr. r5,r3 ffc09464: 40 82 00 34 bne- ffc09498 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc09468: 3b de 00 01 addi r30,r30,1 ffc0946c: 7f 9d f0 40 cmplw cr7,r29,r30 ffc09470: 3b ff 00 1c addi r31,r31,28 ffc09474: 41 9d ff b8 bgt+ cr7,ffc0942c <_RTEMS_tasks_Initialize_user_tasks_body+0x44><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc09478: 80 01 00 2c lwz r0,44(r1) ffc0947c: 83 81 00 18 lwz r28,24(r1) ffc09480: 7c 08 03 a6 mtlr r0 ffc09484: 83 a1 00 1c lwz r29,28(r1) ffc09488: 83 c1 00 20 lwz r30,32(r1) ffc0948c: 83 e1 00 24 lwz r31,36(r1) ffc09490: 38 21 00 28 addi r1,r1,40 ffc09494: 4e 80 00 20 blr id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); ffc09498: 38 60 00 01 li r3,1 ffc0949c: 38 80 00 01 li r4,1 ffc094a0: 48 00 13 d5 bl ffc0a874 <_Internal_error_Occurred> =============================================================================== ffc10224 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc10224: 81 23 01 3c lwz r9,316(r3) while (tvp) { ffc10228: 2f 89 00 00 cmpwi cr7,r9,0 ffc1022c: 41 9e 00 24 beq- cr7,ffc10250 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc10230: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc10234: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc10238: 81 4b 00 00 lwz r10,0(r11) ffc1023c: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; ffc10240: 81 29 00 00 lwz r9,0(r9) */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; ffc10244: 90 0b 00 00 stw r0,0(r11) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc10248: 2f 89 00 00 cmpwi cr7,r9,0 ffc1024c: 40 9e ff e4 bne+ cr7,ffc10230 <_RTEMS_tasks_Switch_extension+0xc><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; ffc10250: 81 24 01 3c lwz r9,316(r4) while (tvp) { ffc10254: 2f 89 00 00 cmpwi cr7,r9,0 ffc10258: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc1025c: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc10260: 80 09 00 0c lwz r0,12(r9) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; ffc10264: 81 4b 00 00 lwz r10,0(r11) ffc10268: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; ffc1026c: 81 29 00 00 lwz r9,0(r9) } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; ffc10270: 90 0b 00 00 stw r0,0(r11) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc10274: 2f 89 00 00 cmpwi cr7,r9,0 ffc10278: 40 9e ff e4 bne+ cr7,ffc1025c <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc1027c: 4e 80 00 20 blr =============================================================================== ffc0a9b8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc0a9b8: 94 21 ff e0 stwu r1,-32(r1) ffc0a9bc: 7c 08 02 a6 mflr r0 ffc0a9c0: 7c 64 1b 78 mr r4,r3 ffc0a9c4: 3c 60 00 00 lis r3,0 ffc0a9c8: 90 01 00 24 stw r0,36(r1) ffc0a9cc: 38 63 2c 38 addi r3,r3,11320 ffc0a9d0: 38 a1 00 08 addi r5,r1,8 ffc0a9d4: 93 e1 00 1c stw r31,28(r1) ffc0a9d8: 48 00 28 71 bl ffc0d248 <_Objects_Get> /* * 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 ) { ffc0a9dc: 80 01 00 08 lwz r0,8(r1) ffc0a9e0: 7c 7f 1b 78 mr r31,r3 ffc0a9e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a9e8: 40 9e 00 48 bne- cr7,ffc0aa30 <_Rate_monotonic_Timeout+0x78><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc0a9ec: 80 63 00 40 lwz r3,64(r3) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); ffc0a9f0: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc0a9f4: 70 09 40 00 andi. r9,r0,16384 ffc0a9f8: 41 82 00 14 beq- ffc0aa0c <_Rate_monotonic_Timeout+0x54> ffc0a9fc: 81 23 00 20 lwz r9,32(r3) ffc0aa00: 80 1f 00 08 lwz r0,8(r31) ffc0aa04: 7f 89 00 00 cmpw cr7,r9,r0 ffc0aa08: 41 9e 00 68 beq- cr7,ffc0aa70 <_Rate_monotonic_Timeout+0xb8> _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 ) { ffc0aa0c: 80 1f 00 38 lwz r0,56(r31) ffc0aa10: 2f 80 00 01 cmpwi cr7,r0,1 ffc0aa14: 41 9e 00 30 beq- cr7,ffc0aa44 <_Rate_monotonic_Timeout+0x8c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc0aa18: 38 00 00 04 li r0,4 ffc0aa1c: 90 1f 00 38 stw r0,56(r31) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0aa20: 3d 20 00 00 lis r9,0 ffc0aa24: 81 69 27 f0 lwz r11,10224(r9) ffc0aa28: 38 0b ff ff addi r0,r11,-1 ffc0aa2c: 90 09 27 f0 stw r0,10224(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc0aa30: 80 01 00 24 lwz r0,36(r1) ffc0aa34: 83 e1 00 1c lwz r31,28(r1) ffc0aa38: 38 21 00 20 addi r1,r1,32 ffc0aa3c: 7c 08 03 a6 mtlr r0 ffc0aa40: 4e 80 00 20 blr _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; ffc0aa44: 38 00 00 03 li r0,3 ffc0aa48: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc0aa4c: 7f e3 fb 78 mr r3,r31 ffc0aa50: 4b ff f7 55 bl ffc0a1a4 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0aa54: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0aa58: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0aa5c: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0aa60: 38 63 2e 28 addi r3,r3,11816 ffc0aa64: 38 9f 00 10 addi r4,r31,16 ffc0aa68: 48 00 4d 49 bl ffc0f7b0 <_Watchdog_Insert> ffc0aa6c: 4b ff ff b4 b ffc0aa20 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0aa70: 3c 80 10 03 lis r4,4099 ffc0aa74: 60 84 ff f8 ori r4,r4,65528 ffc0aa78: 48 00 32 1d bl ffc0dc94 <_Thread_Clear_state> ffc0aa7c: 4b ff ff d0 b ffc0aa4c <_Rate_monotonic_Timeout+0x94> =============================================================================== ffc10c50 <_Scheduler_priority_Block>: RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract( Thread_Control *the_thread ) { Chain_Control *ready = the_thread->scheduler.priority->ready_chain; ffc10c50: 81 24 00 8c lwz r9,140(r4) ffc10c54: 81 29 00 00 lwz r9,0(r9) if ( _Chain_Has_only_one_node( ready ) ) { ffc10c58: 81 69 00 00 lwz r11,0(r9) ffc10c5c: 80 09 00 08 lwz r0,8(r9) ffc10c60: 7f 8b 00 00 cmpw cr7,r11,r0 ffc10c64: 41 9e 00 a8 beq- cr7,ffc10d0c <_Scheduler_priority_Block+0xbc> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc10c68: 81 64 00 00 lwz r11,0(r4) previous = the_node->previous; ffc10c6c: 81 24 00 04 lwz r9,4(r4) next->previous = previous; ffc10c70: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc10c74: 91 69 00 00 stw r11,0(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc10c78: 3d 20 00 00 lis r9,0 ffc10c7c: 39 29 30 e4 addi r9,r9,12516 { _Scheduler_priority_Ready_queue_extract(the_thread); /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) ffc10c80: 80 09 00 10 lwz r0,16(r9) ffc10c84: 7f 84 00 00 cmpw cr7,r4,r0 ffc10c88: 41 9e 00 1c beq- cr7,ffc10ca4 <_Scheduler_priority_Block+0x54> _Scheduler_priority_Schedule_body(the_scheduler); if ( _Thread_Is_executing( the_thread ) ) ffc10c8c: 80 09 00 0c lwz r0,12(r9) ffc10c90: 7f 84 00 00 cmpw cr7,r4,r0 ffc10c94: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc10c98: 38 00 00 01 li r0,1 ffc10c9c: 98 09 00 18 stb r0,24(r9) ffc10ca0: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc10ca4: 3c a0 00 00 lis r5,0 Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { _Scheduler_priority_Block_body(the_scheduler, the_thread); } ffc10ca8: 81 43 00 00 lwz r10,0(r3) ffc10cac: 81 65 27 d8 lwz r11,10200(r5) ffc10cb0: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc10cb4: 3c e0 00 00 lis r7,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc10cb8: 91 65 27 d8 stw r11,10200(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc10cbc: 38 e7 31 00 addi r7,r7,12544 ffc10cc0: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc10cc4: 7c 07 40 2e lwzx r0,r7,r8 ffc10cc8: 7c 0b 00 34 cntlzw r11,r0 return (_Priority_Bits_index( major ) << 4) + ffc10ccc: 54 c6 20 36 rlwinm r6,r6,4,0,27 { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc10cd0: 7c 07 41 2e stwx r0,r7,r8 return (_Priority_Bits_index( major ) << 4) + ffc10cd4: 7d 66 5a 14 add r11,r6,r11 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc10cd8: 1d 6b 00 0c mulli r11,r11,12 ffc10cdc: 7d 0a 5a 14 add r8,r10,r11 ffc10ce0: 7d 6a 58 2e lwzx r11,r10,r11 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc10ce4: 38 08 00 04 addi r0,r8,4 ffc10ce8: 7f 8b 00 00 cmpw cr7,r11,r0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc10cec: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc10cf0: 41 9e 00 08 beq- cr7,ffc10cf8 <_Scheduler_priority_Block+0xa8><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc10cf4: 7d 60 5b 78 mr r0,r11 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc10cf8: 90 09 00 10 stw r0,16(r9) /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(the_scheduler); if ( _Thread_Is_executing( the_thread ) ) ffc10cfc: 80 09 00 0c lwz r0,12(r9) ffc10d00: 7f 84 00 00 cmpw cr7,r4,r0 ffc10d04: 4c be 00 20 bnelr+ cr7 ffc10d08: 4b ff ff 90 b ffc10c98 <_Scheduler_priority_Block+0x48> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc10d0c: 38 09 00 04 addi r0,r9,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc10d10: 91 29 00 08 stw r9,8(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc10d14: 90 09 00 00 stw r0,0(r9) head->previous = NULL; ffc10d18: 38 00 00 00 li r0,0 ffc10d1c: 90 09 00 04 stw r0,4(r9) { Chain_Control *ready = the_thread->scheduler.priority->ready_chain; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map ); ffc10d20: 81 24 00 8c lwz r9,140(r4) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc10d24: 81 69 00 04 lwz r11,4(r9) ffc10d28: 80 09 00 14 lwz r0,20(r9) ffc10d2c: 81 4b 00 00 lwz r10,0(r11) ffc10d30: 7d 40 00 38 and r0,r10,r0 if ( *the_priority_map->minor == 0 ) ffc10d34: 2f 80 00 00 cmpwi cr7,r0,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc10d38: 90 0b 00 00 stw r0,0(r11) if ( *the_priority_map->minor == 0 ) ffc10d3c: 40 be ff 3c bne- cr7,ffc10c78 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc10d40: 3d 60 00 00 lis r11,0 ffc10d44: 80 09 00 10 lwz r0,16(r9) ffc10d48: 81 4b 27 d8 lwz r10,10200(r11) ffc10d4c: 7d 40 00 38 and r0,r10,r0 ffc10d50: 90 0b 27 d8 stw r0,10200(r11) ffc10d54: 4b ff ff 24 b ffc10c78 <_Scheduler_priority_Block+0x28> =============================================================================== ffc0b478 <_Scheduler_priority_Schedule>: RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0b478: 3d 20 00 00 lis r9,0 void _Scheduler_priority_Schedule( Scheduler_Control *the_scheduler ) { _Scheduler_priority_Schedule_body( the_scheduler ); } ffc0b47c: 81 63 00 00 lwz r11,0(r3) ffc0b480: 80 09 27 d8 lwz r0,10200(r9) ffc0b484: 7c 07 00 34 cntlzw r7,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b488: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0b48c: 90 09 27 d8 stw r0,10200(r9) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b490: 39 08 31 00 addi r8,r8,12544 ffc0b494: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc0b498: 7c c8 50 2e lwzx r6,r8,r10 ffc0b49c: 7c c0 33 78 mr r0,r6 ffc0b4a0: 7c 06 00 34 cntlzw r6,r0 return (_Priority_Bits_index( major ) << 4) + ffc0b4a4: 54 e9 20 36 rlwinm r9,r7,4,0,27 { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b4a8: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0b4ac: 7d 29 32 14 add r9,r9,r6 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0b4b0: 1d 29 00 0c mulli r9,r9,12 ffc0b4b4: 7d 4b 4a 14 add r10,r11,r9 ffc0b4b8: 7d 2b 48 2e lwzx r9,r11,r9 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0b4bc: 38 0a 00 04 addi r0,r10,4 ffc0b4c0: 7f 89 00 00 cmpw cr7,r9,r0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0b4c4: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0b4c8: 41 9e 00 08 beq- cr7,ffc0b4d0 <_Scheduler_priority_Schedule+0x58><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc0b4cc: 7d 20 4b 78 mr r0,r9 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0b4d0: 3d 20 00 00 lis r9,0 ffc0b4d4: 90 09 30 f4 stw r0,12532(r9) ffc0b4d8: 4e 80 00 20 blr =============================================================================== ffc0b62c <_Scheduler_priority_Yield>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0b62c: 3d 40 00 00 lis r10,0 ffc0b630: 39 4a 30 e4 addi r10,r10,12516 ffc0b634: 81 2a 00 0c lwz r9,12(r10) ready = executing->scheduler.priority->ready_chain; ffc0b638: 81 69 00 8c lwz r11,140(r9) ffc0b63c: 81 6b 00 00 lwz r11,0(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b640: 7c 00 00 a6 mfmsr r0 ffc0b644: 7d 10 42 a6 mfsprg r8,0 ffc0b648: 7c 08 40 78 andc r8,r0,r8 ffc0b64c: 7d 00 01 24 mtmsr r8 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0b650: 80 eb 00 00 lwz r7,0(r11) ffc0b654: 81 0b 00 08 lwz r8,8(r11) ffc0b658: 7f 87 40 00 cmpw cr7,r7,r8 ffc0b65c: 41 9e 00 60 beq- cr7,ffc0b6bc <_Scheduler_priority_Yield+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b660: 80 c9 00 00 lwz r6,0(r9) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc0b664: 38 ab 00 04 addi r5,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0b668: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; ffc0b66c: 90 e6 00 04 stw r7,4(r6) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc0b670: 81 0b 00 08 lwz r8,8(r11) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc0b674: 90 c7 00 00 stw r6,0(r7) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc0b678: 91 2b 00 08 stw r9,8(r11) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc0b67c: 90 a9 00 00 stw r5,0(r9) tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; ffc0b680: 91 09 00 04 stw r8,4(r9) Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; ffc0b684: 91 28 00 00 stw r9,0(r8) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b688: 7d 00 00 a6 mfmsr r8 ffc0b68c: 7c 00 01 24 mtmsr r0 ffc0b690: 7d 00 01 24 mtmsr r8 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0b694: 81 0a 00 10 lwz r8,16(r10) ffc0b698: 7f 89 40 00 cmpw cr7,r9,r8 ffc0b69c: 41 9e 00 14 beq- cr7,ffc0b6b0 <_Scheduler_priority_Yield+0x84><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) _Chain_First( ready ); _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; ffc0b6a0: 39 20 00 01 li r9,1 ffc0b6a4: 99 2a 00 18 stb r9,24(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b6a8: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0b6ac: 4e 80 00 20 blr _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) _Chain_First( ready ); ffc0b6b0: 81 2b 00 00 lwz r9,0(r11) ffc0b6b4: 91 2a 00 10 stw r9,16(r10) ffc0b6b8: 4b ff ff e8 b ffc0b6a0 <_Scheduler_priority_Yield+0x74> _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0b6bc: 81 6a 00 10 lwz r11,16(r10) ffc0b6c0: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b6c4: 40 9e ff dc bne+ cr7,ffc0b6a0 <_Scheduler_priority_Yield+0x74> ffc0b6c8: 4b ff ff e0 b ffc0b6a8 <_Scheduler_priority_Yield+0x7c> =============================================================================== ffc0b730 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0b730: 94 21 ff e8 stwu r1,-24(r1) ffc0b734: 7c 08 02 a6 mflr r0 ffc0b738: 90 01 00 1c stw r0,28(r1) ffc0b73c: 93 e1 00 14 stw r31,20(r1) ffc0b740: 7c 7f 1b 78 mr r31,r3 ffc0b744: 93 81 00 08 stw r28,8(r1) ffc0b748: 7c bc 2b 78 mr r28,r5 ffc0b74c: 93 a1 00 0c stw r29,12(r1) ffc0b750: 93 c1 00 10 stw r30,16(r1) ffc0b754: 7c 9e 23 78 mr r30,r4 */ /* * Save original state */ original_state = the_thread->current_state; ffc0b758: 83 a3 00 10 lwz r29,16(r3) /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); ffc0b75c: 48 00 12 9d bl ffc0c9f8 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) ffc0b760: 80 1f 00 14 lwz r0,20(r31) ffc0b764: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0b768: 41 9e 00 10 beq- cr7,ffc0b778 <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0b76c: 7f e3 fb 78 mr r3,r31 ffc0b770: 7f c4 f3 78 mr r4,r30 ffc0b774: 48 00 11 bd bl ffc0c930 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b778: 7f c0 00 a6 mfmsr r30 ffc0b77c: 7c 10 42 a6 mfsprg r0,0 ffc0b780: 7f c0 00 78 andc r0,r30,r0 ffc0b784: 7c 00 01 24 mtmsr r0 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; ffc0b788: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0b78c: 2f 80 00 04 cmpwi cr7,r0,4 ffc0b790: 41 9e 00 88 beq- cr7,ffc0b818 <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0b794: 73 a9 00 04 andi. r9,r29,4 ffc0b798: 41 82 00 38 beq- ffc0b7d0 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b79c: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0b7a0: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0b7a4: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0b7a8: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0b7ac: 40 82 00 40 bne- ffc0b7ec <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0b7b0: 80 01 00 1c lwz r0,28(r1) ffc0b7b4: 83 81 00 08 lwz r28,8(r1) ffc0b7b8: 7c 08 03 a6 mtlr r0 ffc0b7bc: 83 a1 00 0c lwz r29,12(r1) ffc0b7c0: 83 c1 00 10 lwz r30,16(r1) ffc0b7c4: 83 e1 00 14 lwz r31,20(r1) ffc0b7c8: 38 21 00 18 addi r1,r1,24 ffc0b7cc: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0b7d0: 54 09 07 b8 rlwinm r9,r0,0,30,28 */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0b7d4: 91 3f 00 10 stw r9,16(r31) ffc0b7d8: 7f c0 01 24 mtmsr r30 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0b7dc: 3d 20 00 03 lis r9,3 ffc0b7e0: 61 29 be e0 ori r9,r9,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0b7e4: 7c 0b 48 39 and. r11,r0,r9 ffc0b7e8: 41 82 ff c8 beq+ ffc0b7b0 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0b7ec: 80 7f 00 44 lwz r3,68(r31) ffc0b7f0: 7f e4 fb 78 mr r4,r31 ffc0b7f4: 48 00 10 45 bl ffc0c838 <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0b7f8: 80 01 00 1c lwz r0,28(r1) ffc0b7fc: 83 81 00 08 lwz r28,8(r1) ffc0b800: 7c 08 03 a6 mtlr r0 ffc0b804: 83 a1 00 0c lwz r29,12(r1) ffc0b808: 83 c1 00 10 lwz r30,16(r1) ffc0b80c: 83 e1 00 14 lwz r31,20(r1) ffc0b810: 38 21 00 18 addi r1,r1,24 ffc0b814: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0b818: 73 bd 00 04 andi. r29,r29,4 ffc0b81c: 40 82 00 58 bne- ffc0b874 <_Thread_Change_priority+0x144><== NEVER TAKEN * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); if ( prepend_it ) ffc0b820: 2f 9c 00 00 cmpwi cr7,r28,0 * Ready Queue with interrupts off. * * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0b824: 93 bf 00 10 stw r29,16(r31) if ( prepend_it ) ffc0b828: 41 9e 00 bc beq- cr7,ffc0b8e4 <_Thread_Change_priority+0x1b4> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first( Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); ffc0b82c: 81 3f 00 8c lwz r9,140(r31) ffc0b830: 3d 40 00 00 lis r10,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0b834: 81 69 00 04 lwz r11,4(r9) ffc0b838: 80 09 00 0c lwz r0,12(r9) ffc0b83c: 81 0b 00 00 lwz r8,0(r11) ffc0b840: 7d 00 03 78 or r0,r8,r0 ffc0b844: 90 0b 00 00 stw r0,0(r11) _Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain, ffc0b848: 81 7f 00 8c lwz r11,140(r31) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0b84c: 80 09 00 08 lwz r0,8(r9) ffc0b850: 81 2b 00 00 lwz r9,0(r11) ffc0b854: 81 0a 27 d8 lwz r8,10200(r10) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0b858: 81 69 00 00 lwz r11,0(r9) ffc0b85c: 7d 00 03 78 or r0,r8,r0 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0b860: 91 3f 00 04 stw r9,4(r31) ffc0b864: 90 0a 27 d8 stw r0,10200(r10) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; ffc0b868: 93 eb 00 04 stw r31,4(r11) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; ffc0b86c: 93 e9 00 00 stw r31,0(r9) the_node->next = before_node; ffc0b870: 91 7f 00 00 stw r11,0(r31) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b874: 7c 00 00 a6 mfmsr r0 ffc0b878: 7f c0 01 24 mtmsr r30 ffc0b87c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( Scheduler_Control *the_scheduler ) { the_scheduler->Operations.schedule( the_scheduler ); ffc0b880: 3c 60 00 00 lis r3,0 ffc0b884: 38 63 2c c0 addi r3,r3,11456 ffc0b888: 80 03 00 04 lwz r0,4(r3) ffc0b88c: 7c 09 03 a6 mtctr r0 ffc0b890: 4e 80 04 21 bctrl * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0b894: 3d 20 00 00 lis r9,0 ffc0b898: 39 29 30 e4 addi r9,r9,12516 ffc0b89c: 81 69 00 0c lwz r11,12(r9) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(&_Scheduler); if ( !_Thread_Is_executing_also_the_heir() && ffc0b8a0: 80 09 00 10 lwz r0,16(r9) ffc0b8a4: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0b8a8: 41 9e 00 18 beq- cr7,ffc0b8c0 <_Thread_Change_priority+0x190> ffc0b8ac: 88 0b 00 74 lbz r0,116(r11) ffc0b8b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b8b4: 41 9e 00 0c beq- cr7,ffc0b8c0 <_Thread_Change_priority+0x190> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0b8b8: 38 00 00 01 li r0,1 ffc0b8bc: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b8c0: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0b8c4: 80 01 00 1c lwz r0,28(r1) ffc0b8c8: 83 81 00 08 lwz r28,8(r1) ffc0b8cc: 7c 08 03 a6 mtlr r0 ffc0b8d0: 83 a1 00 0c lwz r29,12(r1) ffc0b8d4: 83 c1 00 10 lwz r30,16(r1) ffc0b8d8: 83 e1 00 14 lwz r31,20(r1) ffc0b8dc: 38 21 00 18 addi r1,r1,24 ffc0b8e0: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue( Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); ffc0b8e4: 81 3f 00 8c lwz r9,140(r31) ffc0b8e8: 3d 40 00 00 lis r10,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0b8ec: 81 69 00 04 lwz r11,4(r9) ffc0b8f0: 80 09 00 0c lwz r0,12(r9) ffc0b8f4: 81 0b 00 00 lwz r8,0(r11) ffc0b8f8: 7d 00 03 78 or r0,r8,r0 ffc0b8fc: 90 0b 00 00 stw r0,0(r11) _Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain, ffc0b900: 81 7f 00 8c lwz r11,140(r31) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0b904: 80 09 00 08 lwz r0,8(r9) ffc0b908: 81 2b 00 00 lwz r9,0(r11) ffc0b90c: 81 0a 27 d8 lwz r8,10200(r10) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc0b910: 81 69 00 08 lwz r11,8(r9) ffc0b914: 7d 08 03 78 or r8,r8,r0 the_node->next = tail; tail->previous = the_node; ffc0b918: 93 e9 00 08 stw r31,8(r9) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc0b91c: 38 09 00 04 addi r0,r9,4 ffc0b920: 91 0a 27 d8 stw r8,10200(r10) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; ffc0b924: 91 7f 00 04 stw r11,4(r31) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc0b928: 90 1f 00 00 stw r0,0(r31) tail->previous = the_node; old_last->next = the_node; ffc0b92c: 93 eb 00 00 stw r31,0(r11) ffc0b930: 4b ff ff 44 b ffc0b874 <_Thread_Change_priority+0x144> =============================================================================== ffc0b9bc <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc0b9bc: 94 21 ff e8 stwu r1,-24(r1) ffc0b9c0: 7c 08 02 a6 mflr r0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0b9c4: 39 60 00 00 li r11,0 ffc0b9c8: 90 01 00 1c stw r0,28(r1) RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( ffc0b9cc: a0 04 00 0a lhz r0,10(r4) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0b9d0: 81 23 00 1c lwz r9,28(r3) ffc0b9d4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0b9d8: 93 c1 00 10 stw r30,16(r1) ffc0b9dc: 7c 7e 1b 78 mr r30,r3 ffc0b9e0: 93 e1 00 14 stw r31,20(r1) ffc0b9e4: 7c 9f 23 78 mr r31,r4 ffc0b9e8: 93 a1 00 0c stw r29,12(r1) ffc0b9ec: 7d 69 01 2e stwx r11,r9,r0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0b9f0: 3f a0 00 00 lis r29,0 ffc0b9f4: 81 3d 27 8c lwz r9,10124(r29) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc0b9f8: 7c 83 23 78 mr r3,r4 ffc0b9fc: 38 09 ff ff addi r0,r9,-1 ffc0ba00: 90 1d 27 8c stw r0,10124(r29) ffc0ba04: 48 00 17 a1 bl ffc0d1a4 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ba08: 81 3d 27 8c lwz r9,10124(r29) ffc0ba0c: 38 09 00 01 addi r0,r9,1 ffc0ba10: 90 1d 27 8c stw r0,10124(r29) /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); ffc0ba14: 7f e4 fb 78 mr r4,r31 ffc0ba18: 7f c3 f3 78 mr r3,r30 ffc0ba1c: 4b ff ef 79 bl ffc0a994 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); ffc0ba20: 7f e3 fb 78 mr r3,r31 ffc0ba24: 38 80 00 01 li r4,1 ffc0ba28: 48 00 0f 49 bl ffc0c970 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc0ba2c: 7f e3 fb 78 mr r3,r31 ffc0ba30: 48 00 0d 0d bl ffc0c73c <_Thread_queue_Extract_with_proxy> ffc0ba34: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ba38: 40 9e 00 10 bne- cr7,ffc0ba48 <_Thread_Close+0x8c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc0ba3c: 80 1f 00 50 lwz r0,80(r31) ffc0ba40: 2f 80 00 02 cmpwi cr7,r0,2 ffc0ba44: 41 9e 00 78 beq- cr7,ffc0babc <_Thread_Close+0x100> RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread ); ffc0ba48: 3c 60 00 00 lis r3,0 ffc0ba4c: 38 63 2c c0 addi r3,r3,11456 ffc0ba50: 80 03 00 18 lwz r0,24(r3) ffc0ba54: 7f e4 fb 78 mr r4,r31 ffc0ba58: 7c 09 03 a6 mtctr r0 ffc0ba5c: 4e 80 04 21 bctrl if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc0ba60: 80 7f 00 c0 lwz r3,192(r31) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; ffc0ba64: 38 00 00 00 li r0,0 if ( the_thread->Start.fp_context ) ffc0ba68: 2f 83 00 00 cmpwi cr7,r3,0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; ffc0ba6c: 90 1f 01 28 stw r0,296(r31) if ( the_thread->Start.fp_context ) ffc0ba70: 41 9e 00 08 beq- cr7,ffc0ba78 <_Thread_Close+0xbc> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc0ba74: 48 00 1c e5 bl ffc0d758 <_Workspace_Free> /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); ffc0ba78: 7f e3 fb 78 mr r3,r31 ffc0ba7c: 48 00 10 c1 bl ffc0cb3c <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc0ba80: 80 7f 01 38 lwz r3,312(r31) /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc0ba84: 38 00 00 00 li r0,0 if ( the_thread->extensions ) ffc0ba88: 2f 83 00 00 cmpwi cr7,r3,0 /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc0ba8c: 90 1f 00 c4 stw r0,196(r31) if ( the_thread->extensions ) ffc0ba90: 41 9e 00 08 beq- cr7,ffc0ba98 <_Thread_Close+0xdc> (void) _Workspace_Free( the_thread->extensions ); ffc0ba94: 48 00 1c c5 bl ffc0d758 <_Workspace_Free> the_thread->extensions = NULL; ffc0ba98: 38 00 00 00 li r0,0 } ffc0ba9c: 83 a1 00 0c lwz r29,12(r1) _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; if ( the_thread->extensions ) (void) _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; ffc0baa0: 90 1f 01 38 stw r0,312(r31) } ffc0baa4: 80 01 00 1c lwz r0,28(r1) ffc0baa8: 83 c1 00 10 lwz r30,16(r1) ffc0baac: 7c 08 03 a6 mtlr r0 ffc0bab0: 83 e1 00 14 lwz r31,20(r1) ffc0bab4: 38 21 00 18 addi r1,r1,24 ffc0bab8: 4e 80 00 20 blr */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); ffc0babc: 38 7f 00 48 addi r3,r31,72 ffc0bac0: 48 00 1a 35 bl ffc0d4f4 <_Watchdog_Remove> ffc0bac4: 4b ff ff 84 b ffc0ba48 <_Thread_Close+0x8c> =============================================================================== ffc0bbc4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0bbc4: 94 21 ff e8 stwu r1,-24(r1) ffc0bbc8: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0bbcc: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0bbd0: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0bbd4: 48 00 02 39 bl ffc0be0c <_Thread_Get> switch ( location ) { ffc0bbd8: 80 01 00 08 lwz r0,8(r1) ffc0bbdc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bbe0: 40 9e 00 20 bne- cr7,ffc0bc00 <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0bbe4: 3c 80 10 00 lis r4,4096 ffc0bbe8: 60 84 00 18 ori r4,r4,24 ffc0bbec: 4b ff fd 49 bl ffc0b934 <_Thread_Clear_state> ffc0bbf0: 3d 20 00 00 lis r9,0 ffc0bbf4: 81 69 27 8c lwz r11,10124(r9) ffc0bbf8: 38 0b ff ff addi r0,r11,-1 ffc0bbfc: 90 09 27 8c stw r0,10124(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0bc00: 80 01 00 1c lwz r0,28(r1) ffc0bc04: 38 21 00 18 addi r1,r1,24 ffc0bc08: 7c 08 03 a6 mtlr r0 ffc0bc0c: 4e 80 00 20 blr =============================================================================== ffc0bc10 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0bc10: 94 21 ff b8 stwu r1,-72(r1) ffc0bc14: 7c 08 02 a6 mflr r0 ffc0bc18: 93 a1 00 3c stw r29,60(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0bc1c: 3f a0 00 00 lis r29,0 ffc0bc20: 3b bd 30 e4 addi r29,r29,12516 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0bc24: 93 e1 00 44 stw r31,68(r1) ffc0bc28: 90 01 00 4c stw r0,76(r1) ffc0bc2c: 92 a1 00 1c stw r21,28(r1) ffc0bc30: 92 c1 00 20 stw r22,32(r1) ffc0bc34: 92 e1 00 24 stw r23,36(r1) ffc0bc38: 93 01 00 28 stw r24,40(r1) ffc0bc3c: 93 21 00 2c stw r25,44(r1) ffc0bc40: 93 41 00 30 stw r26,48(r1) ffc0bc44: 93 61 00 34 stw r27,52(r1) ffc0bc48: 93 81 00 38 stw r28,56(r1) ffc0bc4c: 93 c1 00 40 stw r30,64(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0bc50: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bc54: 7c 00 00 a6 mfmsr r0 ffc0bc58: 7d 30 42 a6 mfsprg r9,0 ffc0bc5c: 7c 09 48 78 andc r9,r0,r9 ffc0bc60: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0bc64: 89 3d 00 18 lbz r9,24(r29) ffc0bc68: 3f 20 00 00 lis r25,0 ffc0bc6c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bc70: 41 9e 01 30 beq- cr7,ffc0bda0 <_Thread_Dispatch+0x190> heir = _Thread_Heir; ffc0bc74: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_disable_level = 1; ffc0bc78: 39 20 00 01 li r9,1 ffc0bc7c: 91 39 27 8c stw r9,10124(r25) _Thread_Dispatch_necessary = false; ffc0bc80: 39 20 00 00 li r9,0 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0bc84: 7f 9f f0 00 cmpw cr7,r31,r30 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0bc88: 93 dd 00 0c stw r30,12(r29) executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; ffc0bc8c: 99 3d 00 18 stb r9,24(r29) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0bc90: 41 9e 01 10 beq- cr7,ffc0bda0 <_Thread_Dispatch+0x190> ffc0bc94: 3f 60 00 00 lis r27,0 ffc0bc98: 3f 00 00 00 lis r24,0 ffc0bc9c: 3b 41 00 08 addi r26,r1,8 ffc0bca0: 3b 7b 27 bc addi r27,r27,10172 ffc0bca4: 3b 81 00 10 addi r28,r1,16 ffc0bca8: 3b 18 27 a0 addi r24,r24,10144 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0bcac: 3e a0 00 00 lis r21,0 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc0bcb0: 3a c0 00 01 li r22,1 _Thread_Dispatch_necessary = false; ffc0bcb4: 3a e0 00 00 li r23,0 ffc0bcb8: 48 00 00 d0 b ffc0bd88 <_Thread_Dispatch+0x178> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bcbc: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0bcc0: 7f 43 d3 78 mr r3,r26 ffc0bcc4: 48 00 4b 15 bl ffc107d8 <_TOD_Get_uptime> _Timestamp_Subtract( ffc0bcc8: 7f 63 db 78 mr r3,r27 ffc0bccc: 7f 44 d3 78 mr r4,r26 ffc0bcd0: 7f 85 e3 78 mr r5,r28 ffc0bcd4: 48 00 11 3d bl ffc0ce10 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0bcd8: 7f 84 e3 78 mr r4,r28 ffc0bcdc: 38 7f 00 84 addi r3,r31,132 ffc0bce0: 48 00 10 d5 bl ffc0cdb4 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0bce4: 81 78 00 00 lwz r11,0(r24) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0bce8: 81 21 00 08 lwz r9,8(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0bcec: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0bcf0: 2f 8b 00 00 cmpwi cr7,r11,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0bcf4: 81 41 00 0c lwz r10,12(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0bcf8: 7f c4 f3 78 mr r4,r30 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0bcfc: 91 3b 00 00 stw r9,0(r27) ffc0bd00: 91 5b 00 04 stw r10,4(r27) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0bd04: 41 9e 00 14 beq- cr7,ffc0bd18 <_Thread_Dispatch+0x108> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0bd08: 80 0b 00 00 lwz r0,0(r11) ffc0bd0c: 90 1f 01 2c stw r0,300(r31) *_Thread_libc_reent = heir->libc_reent; ffc0bd10: 80 1e 01 2c lwz r0,300(r30) ffc0bd14: 90 0b 00 00 stw r0,0(r11) } _User_extensions_Thread_switch( executing, heir ); ffc0bd18: 48 00 15 99 bl ffc0d2b0 <_User_extensions_Thread_switch> * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0bd1c: 80 1f 01 28 lwz r0,296(r31) _Context_Save_fp( &executing->fp_context ); ffc0bd20: 38 7f 01 28 addi r3,r31,296 * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0bd24: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd28: 41 9e 00 08 beq- cr7,ffc0bd30 <_Thread_Dispatch+0x120> _Context_Save_fp( &executing->fp_context ); ffc0bd2c: 48 00 c7 d5 bl ffc18500 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0bd30: 38 7f 00 c8 addi r3,r31,200 ffc0bd34: 38 9e 00 c8 addi r4,r30,200 ffc0bd38: 48 00 c9 49 bl ffc18680 <_CPU_Context_switch> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0bd3c: 80 1f 01 28 lwz r0,296(r31) _Context_Restore_fp( &executing->fp_context ); ffc0bd40: 38 7f 01 28 addi r3,r31,296 _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0bd44: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd48: 41 9e 00 08 beq- cr7,ffc0bd50 <_Thread_Dispatch+0x140> _Context_Restore_fp( &executing->fp_context ); ffc0bd4c: 48 00 c8 75 bl ffc185c0 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0bd50: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bd54: 7c 00 00 a6 mfmsr r0 ffc0bd58: 7d 30 42 a6 mfsprg r9,0 ffc0bd5c: 7c 09 48 78 andc r9,r0,r9 ffc0bd60: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0bd64: 89 3d 00 18 lbz r9,24(r29) ffc0bd68: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bd6c: 41 9e 00 34 beq- cr7,ffc0bda0 <_Thread_Dispatch+0x190> heir = _Thread_Heir; ffc0bd70: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_disable_level = 1; ffc0bd74: 92 d9 27 8c stw r22,10124(r25) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0bd78: 7f 9e f8 00 cmpw cr7,r30,r31 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; ffc0bd7c: 9a fd 00 18 stb r23,24(r29) _Thread_Executing = heir; ffc0bd80: 93 dd 00 0c stw r30,12(r29) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0bd84: 41 9e 00 1c beq- cr7,ffc0bda0 <_Thread_Dispatch+0x190> <== NEVER TAKEN */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) ffc0bd88: 81 3e 00 7c lwz r9,124(r30) ffc0bd8c: 2f 89 00 01 cmpwi cr7,r9,1 ffc0bd90: 40 9e ff 2c bne+ cr7,ffc0bcbc <_Thread_Dispatch+0xac> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0bd94: 81 35 27 88 lwz r9,10120(r21) ffc0bd98: 91 3e 00 78 stw r9,120(r30) ffc0bd9c: 4b ff ff 20 b ffc0bcbc <_Thread_Dispatch+0xac> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; ffc0bda0: 39 20 00 00 li r9,0 ffc0bda4: 91 39 27 8c stw r9,10124(r25) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bda8: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _API_extensions_Run_postswitch(); ffc0bdac: 4b ff dd 49 bl ffc09af4 <_API_extensions_Run_postswitch> } ffc0bdb0: 80 01 00 4c lwz r0,76(r1) ffc0bdb4: 82 a1 00 1c lwz r21,28(r1) ffc0bdb8: 7c 08 03 a6 mtlr r0 ffc0bdbc: 82 c1 00 20 lwz r22,32(r1) ffc0bdc0: 82 e1 00 24 lwz r23,36(r1) ffc0bdc4: 83 01 00 28 lwz r24,40(r1) ffc0bdc8: 83 21 00 2c lwz r25,44(r1) ffc0bdcc: 83 41 00 30 lwz r26,48(r1) ffc0bdd0: 83 61 00 34 lwz r27,52(r1) ffc0bdd4: 83 81 00 38 lwz r28,56(r1) ffc0bdd8: 83 a1 00 3c lwz r29,60(r1) ffc0bddc: 83 c1 00 40 lwz r30,64(r1) ffc0bde0: 83 e1 00 44 lwz r31,68(r1) ffc0bde4: 38 21 00 48 addi r1,r1,72 ffc0bde8: 4e 80 00 20 blr =============================================================================== ffc13398 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc13398: 94 21 ff f0 stwu r1,-16(r1) ffc1339c: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc133a0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc133a4: 90 01 00 14 stw r0,20(r1) ffc133a8: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc133ac: 83 e9 30 f0 lwz r31,12528(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc133b0: 93 c1 00 08 stw r30,8(r1) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc133b4: 81 3f 00 ac lwz r9,172(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc133b8: 38 00 00 00 li r0,0 ffc133bc: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc133c0: 71 2b 00 01 andi. r11,r9,1 ffc133c4: 40 82 00 60 bne- ffc13424 <_Thread_Handler+0x8c> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc133c8: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc133cc: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc133d0: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc133d4: 3d 20 00 00 lis r9,0 ffc133d8: 8b c9 29 74 lbz r30,10612(r9) doneConstructors = 1; ffc133dc: 38 00 00 01 li r0,1 /* * 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 ); ffc133e0: 7f e3 fb 78 mr r3,r31 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; ffc133e4: 98 09 29 74 stb r0,10612(r9) /* * 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 ); ffc133e8: 4b ff 9b 8d bl ffc0cf74 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc133ec: 4b ff 8a 01 bl ffc0bdec <_Thread_Enable_dispatch> /* * _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) */ { ffc133f0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc133f4: 41 9e 00 60 beq- cr7,ffc13454 <_Thread_Handler+0xbc> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc133f8: 80 1f 00 94 lwz r0,148(r31) ffc133fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc13400: 41 9e 00 64 beq- cr7,ffc13464 <_Thread_Handler+0xcc> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { ffc13404: 2f 80 00 01 cmpwi cr7,r0,1 ffc13408: 41 9e 00 74 beq- cr7,ffc1347c <_Thread_Handler+0xe4> <== ALWAYS TAKEN * 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 ); ffc1340c: 7f e3 fb 78 mr r3,r31 ffc13410: 4b ff 9b d9 bl ffc0cfe8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc13414: 38 60 00 00 li r3,0 ffc13418: 38 80 00 01 li r4,1 ffc1341c: 38 a0 00 05 li r5,5 ffc13420: 4b ff 74 55 bl ffc0a874 <_Internal_error_Occurred> ffc13424: 7d 30 42 a6 mfsprg r9,0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc13428: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc1342c: 7c 00 01 24 mtmsr r0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc13430: 3d 20 00 00 lis r9,0 ffc13434: 8b c9 29 74 lbz r30,10612(r9) doneConstructors = 1; ffc13438: 38 00 00 01 li r0,1 /* * 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 ); ffc1343c: 7f e3 fb 78 mr r3,r31 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; ffc13440: 98 09 29 74 stb r0,10612(r9) /* * 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 ); ffc13444: 4b ff 9b 31 bl ffc0cf74 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc13448: 4b ff 89 a5 bl ffc0bdec <_Thread_Enable_dispatch> /* * _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) */ { ffc1344c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc13450: 40 9e ff a8 bne+ cr7,ffc133f8 <_Thread_Handler+0x60> <== ALWAYS TAKEN INIT_NAME (); ffc13454: 48 00 61 69 bl ffc195bc <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc13458: 80 1f 00 94 lwz r0,148(r31) ffc1345c: 2f 80 00 00 cmpwi cr7,r0,0 ffc13460: 40 9e ff a4 bne+ cr7,ffc13404 <_Thread_Handler+0x6c> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc13464: 80 1f 00 90 lwz r0,144(r31) ffc13468: 80 7f 00 9c lwz r3,156(r31) ffc1346c: 7c 09 03 a6 mtctr r0 ffc13470: 4e 80 04 21 bctrl INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc13474: 90 7f 00 28 stw r3,40(r31) ffc13478: 4b ff ff 94 b ffc1340c <_Thread_Handler+0x74> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( ffc1347c: 80 1f 00 90 lwz r0,144(r31) ffc13480: 80 7f 00 98 lwz r3,152(r31) ffc13484: 7c 09 03 a6 mtctr r0 ffc13488: 4e 80 04 21 bctrl executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = ffc1348c: 90 7f 00 28 stw r3,40(r31) ffc13490: 4b ff ff 7c b ffc1340c <_Thread_Handler+0x74> =============================================================================== ffc0bec4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0bec4: 94 21 ff c8 stwu r1,-56(r1) ffc0bec8: 7d 80 00 26 mfcr r12 ffc0becc: 7c 08 02 a6 mflr r0 ffc0bed0: 93 c1 00 30 stw r30,48(r1) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0bed4: 7c be 2b 79 mr. r30,r5 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0bed8: 90 01 00 3c stw r0,60(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0bedc: 38 00 00 00 li r0,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0bee0: 93 61 00 24 stw r27,36(r1) ffc0bee4: 7d 3b 4b 78 mr r27,r9 ffc0bee8: 81 21 00 48 lwz r9,72(r1) ffc0beec: 93 01 00 18 stw r24,24(r1) ffc0bef0: 93 41 00 20 stw r26,32(r1) ffc0bef4: 7d 5a 53 78 mr r26,r10 ffc0bef8: 93 81 00 28 stw r28,40(r1) ffc0befc: 7d 1c 43 78 mr r28,r8 ffc0bf00: 93 a1 00 2c stw r29,44(r1) ffc0bf04: 7c 7d 1b 78 mr r29,r3 ffc0bf08: 93 e1 00 34 stw r31,52(r1) ffc0bf0c: 7c 9f 23 78 mr r31,r4 ffc0bf10: 92 e1 00 14 stw r23,20(r1) ffc0bf14: 93 21 00 1c stw r25,28(r1) ffc0bf18: 91 81 00 10 stw r12,16(r1) ffc0bf1c: 83 09 00 00 lwz r24,0(r9) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0bf20: 90 04 01 30 stw r0,304(r4) ffc0bf24: 90 04 01 34 stw r0,308(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0bf28: 90 04 01 2c stw r0,300(r4) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0bf2c: 41 82 02 34 beq- ffc0c160 <_Thread_Initialize+0x29c> 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; ffc0bf30: 98 04 00 b4 stb r0,180(r4) ffc0bf34: 7c c0 33 78 mr r0,r6 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0bf38: 2f 87 00 00 cmpwi cr7,r7,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0bf3c: 93 df 00 bc stw r30,188(r31) ffc0bf40: 39 20 00 00 li r9,0 the_stack->size = size; ffc0bf44: 90 1f 00 b8 stw r0,184(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0bf48: 3b 20 00 00 li r25,0 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0bf4c: 40 9e 01 88 bne- cr7,ffc0c0d4 <_Thread_Initialize+0x210> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0bf50: 3e e0 00 00 lis r23,0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; ffc0bf54: 91 3f 01 28 stw r9,296(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0bf58: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0bf5c: 81 77 27 ac lwz r11,10156(r23) if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; ffc0bf60: 91 3f 00 c0 stw r9,192(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0bf64: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0bf68: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0bf6c: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0bf70: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0bf74: 90 1f 00 6c stw r0,108(r31) ffc0bf78: 40 9e 01 a0 bne- cr7,ffc0c118 <_Thread_Initialize+0x254> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0bf7c: 91 7f 01 38 stw r11,312(r31) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0bf80: 3b c0 00 00 li r30,0 the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0bf84: 2f 9a 00 02 cmpwi cr7,r26,2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0bf88: 80 01 00 40 lwz r0,64(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0bf8c: 9b 7f 00 a0 stb r27,160(r31) the_thread->Start.budget_algorithm = budget_algorithm; ffc0bf90: 93 5f 00 a4 stw r26,164(r31) the_thread->Start.budget_callout = budget_callout; ffc0bf94: 90 1f 00 a8 stw r0,168(r31) switch ( budget_algorithm ) { ffc0bf98: 40 be 00 10 bne+ cr7,ffc0bfa8 <_Thread_Initialize+0xe4> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0bf9c: 3d 20 00 00 lis r9,0 ffc0bfa0: 80 09 27 88 lwz r0,10120(r9) ffc0bfa4: 90 1f 00 78 stw r0,120(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0bfa8: 80 01 00 44 lwz r0,68(r1) Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread ); ffc0bfac: 3d 20 00 00 lis r9,0 ffc0bfb0: 39 29 2c c0 addi r9,r9,11456 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; ffc0bfb4: 93 9f 00 18 stw r28,24(r31) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0bfb8: 3b 60 00 00 li r27,0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0bfbc: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0bfc0: 38 00 00 01 li r0,1 RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return ffc0bfc4: 7d 23 4b 78 mr r3,r9 ffc0bfc8: 90 1f 00 10 stw r0,16(r31) ffc0bfcc: 7f e4 fb 78 mr r4,r31 ffc0bfd0: 80 09 00 14 lwz r0,20(r9) the_thread->Wait.queue = NULL; ffc0bfd4: 93 7f 00 44 stw r27,68(r31) ffc0bfd8: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0bfdc: 93 7f 00 1c stw r27,28(r31) the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; ffc0bfe0: 93 9f 00 b0 stw r28,176(r31) ffc0bfe4: 4e 80 04 21 bctrl sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread ); if ( !sched ) ffc0bfe8: 2e 03 00 00 cmpwi cr4,r3,0 ffc0bfec: 7c 7a 1b 78 mr r26,r3 ffc0bff0: 41 92 00 40 beq- cr4,ffc0c030 <_Thread_Initialize+0x16c> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0bff4: 7f e3 fb 78 mr r3,r31 ffc0bff8: 7f 84 e3 78 mr r4,r28 ffc0bffc: 48 00 09 35 bl ffc0c930 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0c000: a0 1f 00 0a lhz r0,10(r31) _Thread_Stack_Free( the_thread ); return false; } ffc0c004: 81 3d 00 1c lwz r9,28(r29) * 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 ); ffc0c008: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0c00c: 54 00 10 3a rlwinm r0,r0,2,0,29 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); ffc0c010: 93 7f 00 84 stw r27,132(r31) ffc0c014: 93 7f 00 88 stw r27,136(r31) ffc0c018: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0c01c: 93 1f 00 0c stw r24,12(r31) * 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 ); ffc0c020: 48 00 10 c9 bl ffc0d0e8 <_User_extensions_Thread_create> if ( extension_status ) ffc0c024: 2f 83 00 00 cmpwi cr7,r3,0 return true; ffc0c028: 38 60 00 01 li r3,1 * 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 ); if ( extension_status ) ffc0c02c: 40 9e 00 6c bne- cr7,ffc0c098 <_Thread_Initialize+0x1d4> ffc0c030: 2d 99 00 00 cmpwi cr3,r25,0 ffc0c034: 2d 1e 00 00 cmpwi cr2,r30,0 return true; failed: if ( the_thread->libc_reent ) ffc0c038: 80 7f 01 2c lwz r3,300(r31) ffc0c03c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c040: 41 9e 00 08 beq- cr7,ffc0c048 <_Thread_Initialize+0x184> _Workspace_Free( the_thread->libc_reent ); ffc0c044: 48 00 17 15 bl ffc0d758 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0c048: 80 7f 01 30 lwz r3,304(r31) ffc0c04c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c050: 41 9e 00 08 beq- cr7,ffc0c058 <_Thread_Initialize+0x194> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c054: 48 00 17 05 bl ffc0d758 <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0c058: 80 7f 01 34 lwz r3,308(r31) ffc0c05c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c060: 41 9e 00 08 beq- cr7,ffc0c068 <_Thread_Initialize+0x1a4> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c064: 48 00 16 f5 bl ffc0d758 <_Workspace_Free> if ( extensions_area ) ffc0c068: 41 8a 00 0c beq- cr2,ffc0c074 <_Thread_Initialize+0x1b0> (void) _Workspace_Free( extensions_area ); ffc0c06c: 7f c3 f3 78 mr r3,r30 ffc0c070: 48 00 16 e9 bl ffc0d758 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0c074: 41 8e 00 0c beq- cr3,ffc0c080 <_Thread_Initialize+0x1bc> (void) _Workspace_Free( fp_area ); ffc0c078: 7f 23 cb 78 mr r3,r25 ffc0c07c: 48 00 16 dd bl ffc0d758 <_Workspace_Free> #endif if ( sched ) ffc0c080: 41 92 00 0c beq- cr4,ffc0c08c <_Thread_Initialize+0x1c8> (void) _Workspace_Free( sched ); ffc0c084: 7f 43 d3 78 mr r3,r26 ffc0c088: 48 00 16 d1 bl ffc0d758 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0c08c: 7f e3 fb 78 mr r3,r31 ffc0c090: 48 00 0a ad bl ffc0cb3c <_Thread_Stack_Free> return false; ffc0c094: 38 60 00 00 li r3,0 } ffc0c098: 80 01 00 3c lwz r0,60(r1) ffc0c09c: 81 81 00 10 lwz r12,16(r1) ffc0c0a0: 7c 08 03 a6 mtlr r0 ffc0c0a4: 82 e1 00 14 lwz r23,20(r1) ffc0c0a8: 83 01 00 18 lwz r24,24(r1) ffc0c0ac: 7d 83 81 20 mtcrf 56,r12 ffc0c0b0: 83 21 00 1c lwz r25,28(r1) ffc0c0b4: 83 41 00 20 lwz r26,32(r1) ffc0c0b8: 83 61 00 24 lwz r27,36(r1) ffc0c0bc: 83 81 00 28 lwz r28,40(r1) ffc0c0c0: 83 a1 00 2c lwz r29,44(r1) ffc0c0c4: 83 c1 00 30 lwz r30,48(r1) ffc0c0c8: 83 e1 00 34 lwz r31,52(r1) ffc0c0cc: 38 21 00 38 addi r1,r1,56 ffc0c0d0: 4e 80 00 20 blr /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0c0d4: 38 60 01 08 li r3,264 ffc0c0d8: 48 00 16 4d bl ffc0d724 <_Workspace_Allocate> if ( !fp_area ) ffc0c0dc: 2d 83 00 00 cmpwi cr3,r3,0 ffc0c0e0: 7c 79 1b 78 mr r25,r3 ffc0c0e4: 41 8e 00 c0 beq- cr3,ffc0c1a4 <_Thread_Initialize+0x2e0> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c0e8: 3e e0 00 00 lis r23,0 ffc0c0ec: 81 77 27 ac lwz r11,10156(r23) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0c0f0: 38 00 00 00 li r0,0 * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) ffc0c0f4: 7c 69 1b 78 mr r9,r3 ffc0c0f8: 90 1f 00 50 stw r0,80(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c0fc: 2f 8b 00 00 cmpwi cr7,r11,0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; ffc0c100: 91 3f 01 28 stw r9,296(r31) the_thread->Start.fp_context = fp_area; ffc0c104: 91 3f 00 c0 stw r9,192(r31) the_watchdog->routine = routine; ffc0c108: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0c10c: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0c110: 90 1f 00 6c stw r0,108(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c114: 41 9e fe 68 beq+ cr7,ffc0bf7c <_Thread_Initialize+0xb8> extensions_area = _Workspace_Allocate( ffc0c118: 39 6b 00 01 addi r11,r11,1 ffc0c11c: 55 63 10 3a rlwinm r3,r11,2,0,29 ffc0c120: 48 00 16 05 bl ffc0d724 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0c124: 2d 03 00 00 cmpwi cr2,r3,0 ffc0c128: 7c 7e 1b 78 mr r30,r3 ffc0c12c: 41 8a 00 8c beq- cr2,ffc0c1b8 <_Thread_Initialize+0x2f4> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c130: 90 7f 01 38 stw r3,312(r31) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c134: 38 00 00 00 li r0,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c138: 39 20 00 00 li r9,0 ffc0c13c: 81 57 27 ac lwz r10,10156(r23) * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; ffc0c140: 39 60 00 00 li r11,0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c144: 39 29 00 01 addi r9,r9,1 ffc0c148: 7f 8a 48 40 cmplw cr7,r10,r9 the_thread->extensions[i] = NULL; ffc0c14c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c150: 7d 7e 01 2e stwx r11,r30,r0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c154: 7d 20 4b 78 mr r0,r9 ffc0c158: 40 9c ff ec bge+ cr7,ffc0c144 <_Thread_Initialize+0x280> ffc0c15c: 4b ff fe 28 b ffc0bf84 <_Thread_Initialize+0xc0> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0c160: 7c 83 23 78 mr r3,r4 ffc0c164: 90 c1 00 08 stw r6,8(r1) ffc0c168: 7c c4 33 78 mr r4,r6 ffc0c16c: 90 e1 00 0c stw r7,12(r1) ffc0c170: 48 00 09 25 bl ffc0ca94 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c174: 7c 60 1b 79 mr. r0,r3 ffc0c178: 80 c1 00 08 lwz r6,8(r1) return false; /* stack allocation failed */ ffc0c17c: 38 60 00 00 li r3,0 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c180: 80 e1 00 0c lwz r7,12(r1) ffc0c184: 41 a2 ff 14 beq- ffc0c098 <_Thread_Initialize+0x1d4> ffc0c188: 7f 86 00 40 cmplw cr7,r6,r0 return false; /* stack allocation failed */ ffc0c18c: 7f c3 f3 78 mr r3,r30 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c190: 41 bd ff 08 bgt- cr7,ffc0c098 <_Thread_Initialize+0x1d4><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; ffc0c194: 39 20 00 01 li r9,1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; ffc0c198: 83 df 00 c4 lwz r30,196(r31) the_thread->Start.core_allocated_stack = true; ffc0c19c: 99 3f 00 b4 stb r9,180(r31) ffc0c1a0: 4b ff fd 98 b ffc0bf38 <_Thread_Initialize+0x74> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0c1a4: 3b c0 00 00 li r30,0 ffc0c1a8: 4d 0c 00 00 mcrf cr2,cr3 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0c1ac: 3b 40 00 00 li r26,0 ffc0c1b0: 4e 0c 00 00 mcrf cr4,cr3 ffc0c1b4: 4b ff fe 84 b ffc0c038 <_Thread_Initialize+0x174> ffc0c1b8: 2d 99 00 00 cmpwi cr3,r25,0 ffc0c1bc: 4e 08 00 00 mcrf cr4,cr2 ffc0c1c0: 3b 40 00 00 li r26,0 ffc0c1c4: 4b ff fe 74 b ffc0c038 <_Thread_Initialize+0x174> =============================================================================== ffc0d9e0 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d9e0: 94 21 ff e8 stwu r1,-24(r1) ffc0d9e4: 7c 08 02 a6 mflr r0 ffc0d9e8: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0d9ec: 80 03 00 10 lwz r0,16(r3) ffc0d9f0: 93 e1 00 14 stw r31,20(r1) ffc0d9f4: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0d9f8: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d9fc: 93 c1 00 10 stw r30,16(r1) _Thread_Restart_self(); return true; } return false; ffc0da00: 38 00 00 00 li r0,0 Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0da04: 41 82 00 20 beq- ffc0da24 <_Thread_Restart+0x44> return true; } return false; } ffc0da08: 7c 03 03 78 mr r3,r0 ffc0da0c: 80 01 00 1c lwz r0,28(r1) ffc0da10: 83 c1 00 10 lwz r30,16(r1) ffc0da14: 7c 08 03 a6 mtlr r0 ffc0da18: 83 e1 00 14 lwz r31,20(r1) ffc0da1c: 38 21 00 18 addi r1,r1,24 ffc0da20: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0da24: 90 81 00 08 stw r4,8(r1) RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0da28: 3f c0 00 00 lis r30,0 ffc0da2c: 3b de 31 44 addi r30,r30,12612 ffc0da30: 90 a1 00 0c stw r5,12(r1) ffc0da34: 48 00 01 25 bl ffc0db58 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0da38: 7f e3 fb 78 mr r3,r31 ffc0da3c: 80 81 00 08 lwz r4,8(r1) ffc0da40: 80 a1 00 0c lwz r5,12(r1) ffc0da44: 48 00 49 ed bl ffc12430 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0da48: 7f e3 fb 78 mr r3,r31 ffc0da4c: 48 00 46 21 bl ffc1206c <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0da50: 7f e3 fb 78 mr r3,r31 ffc0da54: 48 00 49 81 bl ffc123d4 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0da58: 7f e3 fb 78 mr r3,r31 ffc0da5c: 48 00 09 2d bl ffc0e388 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0da60: 81 3e 00 0c lwz r9,12(r30) _Thread_Restart_self(); return true; ffc0da64: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0da68: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0da6c: 40 9e ff 9c bne+ cr7,ffc0da08 <_Thread_Restart+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0da70: 80 1f 01 28 lwz r0,296(r31) ffc0da74: 2f 80 00 00 cmpwi cr7,r0,0 ffc0da78: 41 9e 00 0c beq- cr7,ffc0da84 <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0da7c: 38 7f 01 28 addi r3,r31,296 ffc0da80: 48 01 13 c1 bl ffc1ee40 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0da84: 80 7e 00 0c lwz r3,12(r30) ffc0da88: 38 63 00 c8 addi r3,r3,200 ffc0da8c: 48 01 15 75 bl ffc1f000 <_CPU_Context_restore> =============================================================================== ffc10ad0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { ffc10ad0: 94 21 ff f0 stwu r1,-16(r1) ffc10ad4: 7c 08 02 a6 mflr r0 ffc10ad8: 7c 64 1b 78 mr r4,r3 ffc10adc: 90 01 00 14 stw r0,20(r1) ffc10ae0: 93 e1 00 0c stw r31,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc10ae4: 7f e0 00 a6 mfmsr r31 ffc10ae8: 7c 10 42 a6 mfsprg r0,0 ffc10aec: 7f e0 00 78 andc r0,r31,r0 ffc10af0: 7c 00 01 24 mtmsr r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc10af4: 80 03 00 10 lwz r0,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc10af8: 70 09 00 02 andi. r9,r0,2 ffc10afc: 41 82 00 14 beq- ffc10b10 <_Thread_Resume+0x40> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc10b00: 54 00 07 fa rlwinm r0,r0,0,31,29 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc10b04: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); ffc10b08: 90 03 00 10 stw r0,16(r3) if ( _States_Is_ready( current_state ) ) { ffc10b0c: 41 9e 00 1c beq- cr7,ffc10b28 <_Thread_Resume+0x58> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc10b10: 7f e0 01 24 mtmsr r31 _Scheduler_Unblock( &_Scheduler, the_thread ); } } _ISR_Enable( level ); } ffc10b14: 80 01 00 14 lwz r0,20(r1) ffc10b18: 83 e1 00 0c lwz r31,12(r1) ffc10b1c: 38 21 00 10 addi r1,r1,16 ffc10b20: 7c 08 03 a6 mtlr r0 ffc10b24: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { the_scheduler->Operations.unblock( the_scheduler, the_thread ); ffc10b28: 3c 60 00 00 lis r3,0 ffc10b2c: 38 63 2d 80 addi r3,r3,11648 ffc10b30: 80 03 00 10 lwz r0,16(r3) ffc10b34: 7c 09 03 a6 mtctr r0 ffc10b38: 4e 80 04 21 bctrl ffc10b3c: 7f e0 01 24 mtmsr r31 ffc10b40: 80 01 00 14 lwz r0,20(r1) ffc10b44: 83 e1 00 0c lwz r31,12(r1) ffc10b48: 38 21 00 10 addi r1,r1,16 ffc10b4c: 7c 08 03 a6 mtlr r0 ffc10b50: 4e 80 00 20 blr =============================================================================== ffc0ccf4 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0ccf4: 94 21 ff f0 stwu r1,-16(r1) ffc0ccf8: 7c 08 02 a6 mflr r0 Thread_Control *executing; executing = _Thread_Executing; ffc0ccfc: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0cd00: 90 01 00 14 stw r0,20(r1) ffc0cd04: 93 e1 00 0c stw r31,12(r1) Thread_Control *executing; executing = _Thread_Executing; ffc0cd08: 83 e9 30 f0 lwz r31,12528(r9) /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) ffc0cd0c: 88 1f 00 74 lbz r0,116(r31) ffc0cd10: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd14: 41 9e 00 2c beq- cr7,ffc0cd40 <_Thread_Tickle_timeslice+0x4c> return; if ( !_States_Is_ready( executing->current_state ) ) ffc0cd18: 80 1f 00 10 lwz r0,16(r31) ffc0cd1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd20: 40 9e 00 20 bne- cr7,ffc0cd40 <_Thread_Tickle_timeslice+0x4c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { ffc0cd24: 80 1f 00 7c lwz r0,124(r31) ffc0cd28: 2b 80 00 01 cmplwi cr7,r0,1 ffc0cd2c: 41 9c 00 14 blt- cr7,ffc0cd40 <_Thread_Tickle_timeslice+0x4c> ffc0cd30: 2b 80 00 02 cmplwi cr7,r0,2 ffc0cd34: 40 9d 00 48 ble- cr7,ffc0cd7c <_Thread_Tickle_timeslice+0x88> ffc0cd38: 2f 80 00 03 cmpwi cr7,r0,3 ffc0cd3c: 41 9e 00 18 beq- cr7,ffc0cd54 <_Thread_Tickle_timeslice+0x60><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } ffc0cd40: 80 01 00 14 lwz r0,20(r1) ffc0cd44: 83 e1 00 0c lwz r31,12(r1) ffc0cd48: 38 21 00 10 addi r1,r1,16 ffc0cd4c: 7c 08 03 a6 mtlr r0 ffc0cd50: 4e 80 00 20 blr } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) ffc0cd54: 81 3f 00 78 lwz r9,120(r31) ffc0cd58: 38 09 ff ff addi r0,r9,-1 ffc0cd5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd60: 90 1f 00 78 stw r0,120(r31) ffc0cd64: 40 9e ff dc bne+ cr7,ffc0cd40 <_Thread_Tickle_timeslice+0x4c> (*executing->budget_callout)( executing ); ffc0cd68: 80 1f 00 80 lwz r0,128(r31) ffc0cd6c: 7f e3 fb 78 mr r3,r31 ffc0cd70: 7c 09 03 a6 mtctr r0 ffc0cd74: 4e 80 04 21 bctrl ffc0cd78: 4b ff ff c8 b ffc0cd40 <_Thread_Tickle_timeslice+0x4c> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { ffc0cd7c: 81 3f 00 78 lwz r9,120(r31) ffc0cd80: 38 09 ff ff addi r0,r9,-1 ffc0cd84: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd88: 90 1f 00 78 stw r0,120(r31) ffc0cd8c: 41 9d ff b4 bgt+ cr7,ffc0cd40 <_Thread_Tickle_timeslice+0x4c> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield( &_Scheduler ); ffc0cd90: 3c 60 00 00 lis r3,0 ffc0cd94: 38 63 2c c0 addi r3,r3,11456 ffc0cd98: 80 03 00 08 lwz r0,8(r3) ffc0cd9c: 7c 09 03 a6 mtctr r0 ffc0cda0: 4e 80 04 21 bctrl * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield( ); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0cda4: 3d 20 00 00 lis r9,0 ffc0cda8: 80 09 27 88 lwz r0,10120(r9) ffc0cdac: 90 1f 00 78 stw r0,120(r31) ffc0cdb0: 4b ff ff 90 b ffc0cd40 <_Thread_Tickle_timeslice+0x4c> =============================================================================== ffc11058 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ffc11058: 7c 08 02 a6 mflr r0 ffc1105c: 94 21 ff f8 stwu r1,-8(r1) ffc11060: 7c 64 1b 78 mr r4,r3 ffc11064: 90 01 00 0c stw r0,12(r1) Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ffc11068: 80 63 00 44 lwz r3,68(r3) * 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 && ffc1106c: 80 03 00 30 lwz r0,48(r3) ffc11070: 2f 80 00 00 cmpwi cr7,r0,0 ffc11074: 41 9e 00 14 beq- cr7,ffc11088 <_Thread_queue_Process_timeout+0x30> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc11078: 3d 20 00 00 lis r9,0 ffc1107c: 81 29 30 f0 lwz r9,12528(r9) ffc11080: 7f 84 48 00 cmpw cr7,r4,r9 ffc11084: 41 9e 00 20 beq- cr7,ffc110a4 <_Thread_queue_Process_timeout+0x4c><== ALWAYS TAKEN 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; ffc11088: 80 03 00 3c lwz r0,60(r3) ffc1108c: 90 04 00 34 stw r0,52(r4) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc11090: 4b ff fe 71 bl ffc10f00 <_Thread_queue_Extract> } } ffc11094: 80 01 00 0c lwz r0,12(r1) ffc11098: 38 21 00 08 addi r1,r1,8 ffc1109c: 7c 08 03 a6 mtlr r0 ffc110a0: 4e 80 00 20 blr * 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 ) { ffc110a4: 2f 80 00 03 cmpwi cr7,r0,3 ffc110a8: 41 be ff ec beq- cr7,ffc11094 <_Thread_queue_Process_timeout+0x3c> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc110ac: 80 03 00 3c lwz r0,60(r3) ffc110b0: 90 04 00 34 stw r0,52(r4) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc110b4: 38 00 00 02 li r0,2 ffc110b8: 90 03 00 30 stw r0,48(r3) ffc110bc: 4b ff ff d8 b ffc11094 <_Thread_queue_Process_timeout+0x3c> =============================================================================== ffc0c838 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0c838: 94 21 ff d8 stwu r1,-40(r1) ffc0c83c: 7c 08 02 a6 mflr r0 ffc0c840: 93 e1 00 24 stw r31,36(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0c844: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0c848: 93 c1 00 20 stw r30,32(r1) ffc0c84c: 7c 9e 23 78 mr r30,r4 ffc0c850: 90 01 00 2c stw r0,44(r1) ffc0c854: 93 a1 00 1c stw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0c858: 41 82 00 10 beq- ffc0c868 <_Thread_queue_Requeue+0x30> <== NEVER TAKEN /* * 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 ) { ffc0c85c: 80 1f 00 34 lwz r0,52(r31) ffc0c860: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c864: 41 9e 00 20 beq- cr7,ffc0c884 <_Thread_queue_Requeue+0x4c><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0c868: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0c86c: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0c870: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c874: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0c878: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0c87c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0c880: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c884: 7f a0 00 a6 mfmsr r29 ffc0c888: 7d 30 42 a6 mfsprg r9,0 ffc0c88c: 7f a9 48 78 andc r9,r29,r9 ffc0c890: 7d 20 01 24 mtmsr r9 ffc0c894: 3d 60 00 03 lis r11,3 ffc0c898: 81 24 00 10 lwz r9,16(r4) ffc0c89c: 61 6b be e0 ori r11,r11,48864 Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0c8a0: 7d 6a 48 39 and. r10,r11,r9 ffc0c8a4: 40 82 00 24 bne- ffc0c8c8 <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c8a8: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0c8ac: 80 01 00 2c lwz r0,44(r1) ffc0c8b0: 83 a1 00 1c lwz r29,28(r1) ffc0c8b4: 7c 08 03 a6 mtlr r0 ffc0c8b8: 83 c1 00 20 lwz r30,32(r1) ffc0c8bc: 83 e1 00 24 lwz r31,36(r1) ffc0c8c0: 38 21 00 28 addi r1,r1,40 ffc0c8c4: 4e 80 00 20 blr 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; ffc0c8c8: 90 1f 00 30 stw r0,48(r31) 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 ); ffc0c8cc: 38 a0 00 01 li r5,1 ffc0c8d0: 48 00 46 75 bl ffc10f44 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0c8d4: 7f e3 fb 78 mr r3,r31 ffc0c8d8: 7f c4 f3 78 mr r4,r30 ffc0c8dc: 38 a1 00 08 addi r5,r1,8 ffc0c8e0: 4b ff fc 71 bl ffc0c550 <_Thread_queue_Enqueue_priority> ffc0c8e4: 7f a0 01 24 mtmsr r29 ffc0c8e8: 4b ff ff c4 b ffc0c8ac <_Thread_queue_Requeue+0x74> =============================================================================== ffc0c8ec <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c8ec: 94 21 ff e8 stwu r1,-24(r1) ffc0c8f0: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c8f4: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c8f8: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c8fc: 4b ff f5 11 bl ffc0be0c <_Thread_Get> switch ( location ) { ffc0c900: 80 01 00 08 lwz r0,8(r1) ffc0c904: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c908: 40 9e 00 18 bne- cr7,ffc0c920 <_Thread_queue_Timeout+0x34><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0c90c: 48 00 47 4d bl ffc11058 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0c910: 3d 20 00 00 lis r9,0 ffc0c914: 81 69 27 8c lwz r11,10124(r9) ffc0c918: 38 0b ff ff addi r0,r11,-1 ffc0c91c: 90 09 27 8c stw r0,10124(r9) _Thread_Unnest_dispatch(); break; } } ffc0c920: 80 01 00 1c lwz r0,28(r1) ffc0c924: 38 21 00 18 addi r1,r1,24 ffc0c928: 7c 08 03 a6 mtlr r0 ffc0c92c: 4e 80 00 20 blr =============================================================================== ffc1babc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1babc: 94 21 ff 98 stwu r1,-104(r1) ffc1bac0: 7c 08 02 a6 mflr r0 ffc1bac4: 92 a1 00 3c stw r21,60(r1) Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; ffc1bac8: 3a a1 00 08 addi r21,r1,8 ffc1bacc: 90 01 00 6c stw r0,108(r1) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc1bad0: 38 00 00 00 li r0,0 ffc1bad4: 93 21 00 4c stw r25,76(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1bad8: 3b 21 00 0c addi r25,r1,12 ffc1badc: 93 41 00 50 stw r26,80(r1) ffc1bae0: 3b 41 00 18 addi r26,r1,24 ffc1bae4: 93 81 00 58 stw r28,88(r1) ffc1bae8: 3b 81 00 14 addi r28,r1,20 ffc1baec: 92 81 00 38 stw r20,56(r1) ffc1baf0: 3e 80 00 00 lis r20,0 ffc1baf4: 3a 94 28 84 addi r20,r20,10372 ffc1baf8: 92 e1 00 44 stw r23,68(r1) ffc1bafc: 3e e0 00 00 lis r23,0 ffc1bb00: 3a f7 28 c0 addi r23,r23,10432 ffc1bb04: 93 01 00 48 stw r24,72(r1) ffc1bb08: 3f 00 00 00 lis r24,0 ffc1bb0c: 3b 18 28 9c addi r24,r24,10396 ffc1bb10: 93 c1 00 60 stw r30,96(r1) ffc1bb14: 93 21 00 08 stw r25,8(r1) head->previous = NULL; ffc1bb18: 90 01 00 0c stw r0,12(r1) tail->previous = head; ffc1bb1c: 92 a1 00 10 stw r21,16(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1bb20: 93 41 00 14 stw r26,20(r1) head->previous = NULL; ffc1bb24: 90 01 00 18 stw r0,24(r1) tail->previous = head; ffc1bb28: 93 81 00 1c stw r28,28(r1) ffc1bb2c: 92 21 00 2c stw r17,44(r1) ffc1bb30: 3a 23 00 08 addi r17,r3,8 ffc1bb34: 92 41 00 30 stw r18,48(r1) ffc1bb38: 3a 43 00 40 addi r18,r3,64 ffc1bb3c: 92 61 00 34 stw r19,52(r1) _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; ffc1bb40: 3a 60 00 01 li r19,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb44: 92 c1 00 40 stw r22,64(r1) _ISR_Disable( level ); tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; do_loop = false; ffc1bb48: 3a c0 00 00 li r22,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb4c: 93 61 00 54 stw r27,84(r1) ffc1bb50: 3b 63 00 68 addi r27,r3,104 ffc1bb54: 93 a1 00 5c stw r29,92(r1) ffc1bb58: 3b a3 00 30 addi r29,r3,48 ffc1bb5c: 93 e1 00 64 stw r31,100(r1) ffc1bb60: 7c 7f 1b 78 mr r31,r3 Chain_Control *tmp; /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; ffc1bb64: 92 bf 00 78 stw r21,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1bb68: 80 17 00 00 lwz r0,0(r23) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bb6c: 7f 85 e3 78 mr r5,r28 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1bb70: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bb74: 7f a3 eb 78 mr r3,r29 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1bb78: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bb7c: 7c 84 00 50 subf r4,r4,r0 ffc1bb80: 48 00 59 f1 bl ffc21570 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1bb84: 83 d8 00 00 lwz r30,0(r24) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1bb88: 80 bf 00 74 lwz r5,116(r31) /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { ffc1bb8c: 7f 9e 28 40 cmplw cr7,r30,r5 ffc1bb90: 41 9d 00 fc bgt- cr7,ffc1bc8c <_Timer_server_Body+0x1d0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1bb94: 41 9c 00 d4 blt- cr7,ffc1bc68 <_Timer_server_Body+0x1ac> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1bb98: 93 df 00 74 stw r30,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1bb9c: 80 7f 00 78 lwz r3,120(r31) ffc1bba0: 48 00 0d bd bl ffc1c95c <_Chain_Get> if ( timer == NULL ) { ffc1bba4: 7c 64 1b 79 mr. r4,r3 ffc1bba8: 41 82 00 34 beq- ffc1bbdc <_Timer_server_Body+0x120> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1bbac: 80 04 00 38 lwz r0,56(r4) ffc1bbb0: 2f 80 00 01 cmpwi cr7,r0,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1bbb4: 2f 00 00 03 cmpwi cr6,r0,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1bbb8: 41 9e 00 c4 beq- cr7,ffc1bc7c <_Timer_server_Body+0x1c0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1bbbc: 40 9a ff e0 bne+ cr6,ffc1bb9c <_Timer_server_Body+0xe0> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1bbc0: 38 84 00 10 addi r4,r4,16 ffc1bbc4: 7f 63 db 78 mr r3,r27 ffc1bbc8: 48 00 5a 61 bl ffc21628 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1bbcc: 80 7f 00 78 lwz r3,120(r31) ffc1bbd0: 48 00 0d 8d bl ffc1c95c <_Chain_Get> if ( timer == NULL ) { ffc1bbd4: 7c 64 1b 79 mr. r4,r3 ffc1bbd8: 40 82 ff d4 bne+ ffc1bbac <_Timer_server_Body+0xf0> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bbdc: 7d 20 00 a6 mfmsr r9 ffc1bbe0: 7c 10 42 a6 mfsprg r0,0 ffc1bbe4: 7d 20 00 78 andc r0,r9,r0 ffc1bbe8: 7c 00 01 24 mtmsr r0 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); tmp = ts->insert_chain; ffc1bbec: 80 1f 00 78 lwz r0,120(r31) if ( _Chain_Is_empty( insert_chain ) ) { ffc1bbf0: 80 01 00 08 lwz r0,8(r1) ffc1bbf4: 7f 80 c8 00 cmpw cr7,r0,r25 ffc1bbf8: 38 00 00 01 li r0,1 ffc1bbfc: 41 9e 00 a4 beq- cr7,ffc1bca0 <_Timer_server_Body+0x1e4><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bc00: 7d 20 01 24 mtmsr r9 * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; while ( do_loop ) { ffc1bc04: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bc08: 40 9e ff 60 bne+ cr7,ffc1bb68 <_Timer_server_Body+0xac> <== NEVER TAKEN _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { ffc1bc0c: 81 21 00 14 lwz r9,20(r1) ffc1bc10: 7f 89 d0 00 cmpw cr7,r9,r26 ffc1bc14: 40 be 00 30 bne+ cr7,ffc1bc44 <_Timer_server_Body+0x188> ffc1bc18: 48 00 00 94 b ffc1bcac <_Timer_server_Body+0x1f0> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc1bc1c: 81 69 00 00 lwz r11,0(r9) head->next = new_first; new_first->previous = head; ffc1bc20: 93 8b 00 04 stw r28,4(r11) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; ffc1bc24: 91 61 00 14 stw r11,20(r1) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc1bc28: 92 c9 00 08 stw r22,8(r9) ffc1bc2c: 7c 00 01 24 mtmsr r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); ffc1bc30: 80 09 00 1c lwz r0,28(r9) ffc1bc34: 80 69 00 20 lwz r3,32(r9) ffc1bc38: 80 89 00 24 lwz r4,36(r9) ffc1bc3c: 7c 09 03 a6 mtctr r0 ffc1bc40: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bc44: 7c 00 00 a6 mfmsr r0 ffc1bc48: 7d 30 42 a6 mfsprg r9,0 ffc1bc4c: 7c 09 48 78 andc r9,r0,r9 ffc1bc50: 7d 20 01 24 mtmsr r9 initialized = false; } #endif return status; } ffc1bc54: 81 21 00 14 lwz r9,20(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc1bc58: 7f 89 d0 00 cmpw cr7,r9,r26 ffc1bc5c: 40 9e ff c0 bne+ cr7,ffc1bc1c <_Timer_server_Body+0x160> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bc60: 7c 00 01 24 mtmsr r0 ffc1bc64: 4b ff ff 00 b ffc1bb64 <_Timer_server_Body+0xa8> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); ffc1bc68: 7f 63 db 78 mr r3,r27 ffc1bc6c: 38 80 00 01 li r4,1 ffc1bc70: 7c be 28 50 subf r5,r30,r5 ffc1bc74: 48 00 57 dd bl ffc21450 <_Watchdog_Adjust> ffc1bc78: 4b ff ff 20 b ffc1bb98 <_Timer_server_Body+0xdc> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1bc7c: 7f a3 eb 78 mr r3,r29 ffc1bc80: 38 84 00 10 addi r4,r4,16 ffc1bc84: 48 00 59 a5 bl ffc21628 <_Watchdog_Insert> ffc1bc88: 4b ff ff 14 b ffc1bb9c <_Timer_server_Body+0xe0> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bc8c: 7c 85 f0 50 subf r4,r5,r30 ffc1bc90: 7f 63 db 78 mr r3,r27 ffc1bc94: 7f 85 e3 78 mr r5,r28 ffc1bc98: 48 00 58 d9 bl ffc21570 <_Watchdog_Adjust_to_chain> ffc1bc9c: 4b ff fe fc b ffc1bb98 <_Timer_server_Body+0xdc> _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1bca0: 90 9f 00 78 stw r4,120(r31) do_loop = false; ffc1bca4: 38 00 00 00 li r0,0 ffc1bca8: 4b ff ff 58 b ffc1bc00 <_Timer_server_Body+0x144> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1bcac: 98 1f 00 7c stb r0,124(r31) ffc1bcb0: 80 14 00 00 lwz r0,0(r20) ffc1bcb4: 30 00 00 01 addic r0,r0,1 ffc1bcb8: 90 14 00 00 stw r0,0(r20) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1bcbc: 80 7f 00 00 lwz r3,0(r31) ffc1bcc0: 38 80 00 08 li r4,8 ffc1bcc4: 48 00 4c d1 bl ffc20994 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1bcc8: 7f e3 fb 78 mr r3,r31 ffc1bccc: 4b ff fc c9 bl ffc1b994 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1bcd0: 7f e3 fb 78 mr r3,r31 ffc1bcd4: 4b ff fd 55 bl ffc1ba28 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1bcd8: 48 00 40 05 bl ffc1fcdc <_Thread_Enable_dispatch> ts->active = true; ffc1bcdc: 9a 7f 00 7c stb r19,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1bce0: 7e 23 8b 78 mr r3,r17 ffc1bce4: 48 00 5b 0d bl ffc217f0 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1bce8: 7e 43 93 78 mr r3,r18 ffc1bcec: 48 00 5b 05 bl ffc217f0 <_Watchdog_Remove> ffc1bcf0: 4b ff fe 74 b ffc1bb64 <_Timer_server_Body+0xa8> =============================================================================== ffc1bcf4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1bcf4: 94 21 ff f0 stwu r1,-16(r1) ffc1bcf8: 7c 08 02 a6 mflr r0 ffc1bcfc: 7c 89 23 78 mr r9,r4 ffc1bd00: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc1bd04: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1bd08: 93 e1 00 0c stw r31,12(r1) ffc1bd0c: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1bd10: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bd14: 41 9e 00 20 beq- cr7,ffc1bd34 <_Timer_server_Schedule_operation_method+0x40> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); ffc1bd18: 80 63 00 78 lwz r3,120(r3) ffc1bd1c: 48 00 0b e9 bl ffc1c904 <_Chain_Append> } } ffc1bd20: 80 01 00 14 lwz r0,20(r1) ffc1bd24: 83 e1 00 0c lwz r31,12(r1) ffc1bd28: 38 21 00 10 addi r1,r1,16 ffc1bd2c: 7c 08 03 a6 mtlr r0 ffc1bd30: 4e 80 00 20 blr ffc1bd34: 3d 60 00 00 lis r11,0 ffc1bd38: 81 4b 28 84 lwz r10,10372(r11) ffc1bd3c: 38 0a 00 01 addi r0,r10,1 ffc1bd40: 90 0b 28 84 stw r0,10372(r11) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1bd44: 80 04 00 38 lwz r0,56(r4) ffc1bd48: 2f 80 00 01 cmpwi cr7,r0,1 ffc1bd4c: 41 9e 00 ac beq- cr7,ffc1bdf8 <_Timer_server_Schedule_operation_method+0x104> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1bd50: 2f 80 00 03 cmpwi cr7,r0,3 ffc1bd54: 41 9e 00 1c beq- cr7,ffc1bd70 <_Timer_server_Schedule_operation_method+0x7c> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1bd58: 48 00 3f 85 bl ffc1fcdc <_Thread_Enable_dispatch> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } ffc1bd5c: 80 01 00 14 lwz r0,20(r1) ffc1bd60: 83 e1 00 0c lwz r31,12(r1) ffc1bd64: 38 21 00 10 addi r1,r1,16 ffc1bd68: 7c 08 03 a6 mtlr r0 ffc1bd6c: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bd70: 7c c0 00 a6 mfmsr r6 ffc1bd74: 7c 10 42 a6 mfsprg r0,0 ffc1bd78: 7c c0 00 78 andc r0,r6,r0 ffc1bd7c: 7c 00 01 24 mtmsr r0 initialized = false; } #endif return status; } ffc1bd80: 81 63 00 68 lwz r11,104(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1bd84: 38 03 00 6c addi r0,r3,108 /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1bd88: 3d 40 00 00 lis r10,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1bd8c: 7f 8b 00 00 cmpw cr7,r11,r0 /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1bd90: 80 0a 28 9c lwz r0,10396(r10) last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1bd94: 81 43 00 74 lwz r10,116(r3) if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1bd98: 41 9e 00 30 beq- cr7,ffc1bdc8 <_Timer_server_Schedule_operation_method+0xd4> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1bd9c: 7f 80 50 40 cmplw cr7,r0,r10 _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; ffc1bda0: 80 eb 00 10 lwz r7,16(r11) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1bda4: 7d 07 52 14 add r8,r7,r10 delta_interval += delta; ffc1bda8: 7d 00 40 50 subf r8,r0,r8 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1bdac: 40 9d 00 18 ble- cr7,ffc1bdc4 <_Timer_server_Schedule_operation_method+0xd0> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1bdb0: 7d 4a 00 50 subf r10,r10,r0 if (delta_interval > delta) { ffc1bdb4: 7f 87 50 40 cmplw cr7,r7,r10 delta_interval -= delta; } else { delta_interval = 0; ffc1bdb8: 39 00 00 00 li r8,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1bdbc: 40 9d 00 08 ble- cr7,ffc1bdc4 <_Timer_server_Schedule_operation_method+0xd0><== NEVER TAKEN delta_interval -= delta; ffc1bdc0: 7d 0a 38 50 subf r8,r10,r7 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc1bdc4: 91 0b 00 10 stw r8,16(r11) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1bdc8: 90 1f 00 74 stw r0,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bdcc: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1bdd0: 38 7f 00 68 addi r3,r31,104 ffc1bdd4: 38 89 00 10 addi r4,r9,16 ffc1bdd8: 48 00 58 51 bl ffc21628 <_Watchdog_Insert> if ( !ts->active ) { ffc1bddc: 88 1f 00 7c lbz r0,124(r31) ffc1bde0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bde4: 40 9e ff 74 bne+ cr7,ffc1bd58 <_Timer_server_Schedule_operation_method+0x64> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1bde8: 7f e3 fb 78 mr r3,r31 ffc1bdec: 4b ff fc 3d bl ffc1ba28 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc1bdf0: 48 00 3e ed bl ffc1fcdc <_Thread_Enable_dispatch> ffc1bdf4: 4b ff ff 68 b ffc1bd5c <_Timer_server_Schedule_operation_method+0x68> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bdf8: 7c c0 00 a6 mfmsr r6 ffc1bdfc: 7c 10 42 a6 mfsprg r0,0 ffc1be00: 7c c0 00 78 andc r0,r6,r0 ffc1be04: 7c 00 01 24 mtmsr r0 initialized = false; } #endif return status; } ffc1be08: 81 63 00 30 lwz r11,48(r3) ffc1be0c: 38 03 00 34 addi r0,r3,52 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; ffc1be10: 3d 40 00 00 lis r10,0 last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1be14: 7f 8b 00 00 cmpw cr7,r11,r0 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; ffc1be18: 80 0a 28 c0 lwz r0,10432(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1be1c: 81 03 00 3c lwz r8,60(r3) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1be20: 41 9e 00 20 beq- cr7,ffc1be40 <_Timer_server_Schedule_operation_method+0x14c> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1be24: 80 eb 00 10 lwz r7,16(r11) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc1be28: 7d 08 00 50 subf r8,r8,r0 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc1be2c: 39 40 00 00 li r10,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc1be30: 7f 88 38 40 cmplw cr7,r8,r7 ffc1be34: 40 9c 00 08 bge- cr7,ffc1be3c <_Timer_server_Schedule_operation_method+0x148> delta_interval -= delta; ffc1be38: 7d 48 38 50 subf r10,r8,r7 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1be3c: 91 4b 00 10 stw r10,16(r11) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1be40: 90 1f 00 3c stw r0,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1be44: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1be48: 38 7f 00 30 addi r3,r31,48 ffc1be4c: 38 89 00 10 addi r4,r9,16 ffc1be50: 48 00 57 d9 bl ffc21628 <_Watchdog_Insert> if ( !ts->active ) { ffc1be54: 88 1f 00 7c lbz r0,124(r31) ffc1be58: 2f 80 00 00 cmpwi cr7,r0,0 ffc1be5c: 40 9e fe fc bne+ cr7,ffc1bd58 <_Timer_server_Schedule_operation_method+0x64> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1be60: 7f e3 fb 78 mr r3,r31 ffc1be64: 4b ff fb 31 bl ffc1b994 <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1be68: 48 00 3e 75 bl ffc1fcdc <_Thread_Enable_dispatch> ffc1be6c: 4b ff fe f0 b ffc1bd5c <_Timer_server_Schedule_operation_method+0x68> =============================================================================== ffc0d058 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d058: 94 21 ff e0 stwu r1,-32(r1) ffc0d05c: 7c 08 02 a6 mflr r0 ffc0d060: 93 c1 00 18 stw r30,24(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0d064: 3f c0 00 00 lis r30,0 ffc0d068: 3b de 2d 94 addi r30,r30,11668 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d06c: 93 e1 00 1c stw r31,28(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0d070: 83 fe 00 08 lwz r31,8(r30) void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d074: 93 61 00 0c stw r27,12(r1) ffc0d078: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d07c: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d080: 93 81 00 10 stw r28,16(r1) ffc0d084: 7c 9c 23 78 mr r28,r4 ffc0d088: 93 a1 00 14 stw r29,20(r1) ffc0d08c: 7c bd 2b 78 mr r29,r5 ffc0d090: 90 01 00 24 stw r0,36(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d094: 41 9e 00 30 beq- cr7,ffc0d0c4 <_User_extensions_Fatal+0x6c><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0d098: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d09c: 7f 63 db 78 mr r3,r27 ffc0d0a0: 7f 84 e3 78 mr r4,r28 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0d0a4: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d0a8: 7f a5 eb 78 mr r5,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0d0ac: 41 9e 00 0c beq- cr7,ffc0d0b8 <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d0b0: 7c 09 03 a6 mtctr r0 ffc0d0b4: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d0b8: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d0bc: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d0c0: 40 9e ff d8 bne+ cr7,ffc0d098 <_User_extensions_Fatal+0x40> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0d0c4: 80 01 00 24 lwz r0,36(r1) ffc0d0c8: 83 61 00 0c lwz r27,12(r1) ffc0d0cc: 7c 08 03 a6 mtlr r0 ffc0d0d0: 83 81 00 10 lwz r28,16(r1) ffc0d0d4: 83 a1 00 14 lwz r29,20(r1) ffc0d0d8: 83 c1 00 18 lwz r30,24(r1) ffc0d0dc: 83 e1 00 1c lwz r31,28(r1) ffc0d0e0: 38 21 00 20 addi r1,r1,32 ffc0d0e4: 4e 80 00 20 blr =============================================================================== ffc0ce64 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ce64: 94 21 ff e8 stwu r1,-24(r1) ffc0ce68: 7c 08 02 a6 mflr r0 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0ce6c: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ce70: 90 01 00 1c stw r0,28(r1) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0ce74: 38 e7 20 a0 addi r7,r7,8352 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0ce78: 3d 00 00 00 lis r8,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ce7c: 93 a1 00 0c stw r29,12(r1) ffc0ce80: 3d 40 00 00 lis r10,0 ffc0ce84: 39 68 2d 94 addi r11,r8,11668 uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; initial_extensions = Configuration.User_extension_table; ffc0ce88: 83 a7 00 40 lwz r29,64(r7) ffc0ce8c: 39 2a 2c 50 addi r9,r10,11344 head->previous = NULL; ffc0ce90: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ce94: 93 c1 00 10 stw r30,16(r1) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0ce98: 2f 9d 00 00 cmpwi cr7,r29,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0ce9c: 38 ab 00 04 addi r5,r11,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0cea0: 93 81 00 08 stw r28,8(r1) ffc0cea4: 38 c9 00 04 addi r6,r9,4 ffc0cea8: 93 e1 00 14 stw r31,20(r1) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0ceac: 83 c7 00 3c lwz r30,60(r7) ffc0ceb0: 90 a8 2d 94 stw r5,11668(r8) head->previous = NULL; ffc0ceb4: 90 0b 00 04 stw r0,4(r11) tail->previous = head; ffc0ceb8: 91 6b 00 08 stw r11,8(r11) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0cebc: 90 ca 2c 50 stw r6,11344(r10) head->previous = NULL; ffc0cec0: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0cec4: 91 29 00 08 stw r9,8(r9) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0cec8: 41 9e 00 8c beq- cr7,ffc0cf54 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0cecc: 1f 9e 00 34 mulli r28,r30,52 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( ffc0ced0: 7f 83 e3 78 mr r3,r28 ffc0ced4: 48 00 08 b1 bl ffc0d784 <_Workspace_Allocate_or_fatal_error> number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0ced8: 38 80 00 00 li r4,0 ffc0cedc: 7f 85 e3 78 mr r5,r28 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( ffc0cee0: 7c 7f 1b 78 mr r31,r3 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0cee4: 48 00 74 69 bl ffc1434c extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0cee8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ceec: 41 9e 00 68 beq- cr7,ffc0cf54 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN ffc0cef0: 3b 80 00 00 li r28,0 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0cef4: 7f a9 eb 78 mr r9,r29 #include #include #include #include void _User_extensions_Handler_initialization(void) ffc0cef8: 57 80 28 34 rlwinm r0,r28,5,0,26 ffc0cefc: 7d 09 00 6e lwzux r8,r9,r0 _User_extensions_Add_set( extension ); ffc0cf00: 7f e3 fb 78 mr r3,r31 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0cf04: 3b 9c 00 01 addi r28,r28,1 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0cf08: 81 49 00 04 lwz r10,4(r9) ffc0cf0c: 81 69 00 08 lwz r11,8(r9) ffc0cf10: 80 09 00 0c lwz r0,12(r9) ffc0cf14: 91 1f 00 14 stw r8,20(r31) ffc0cf18: 91 5f 00 18 stw r10,24(r31) ffc0cf1c: 91 7f 00 1c stw r11,28(r31) ffc0cf20: 90 1f 00 20 stw r0,32(r31) ffc0cf24: 81 09 00 10 lwz r8,16(r9) ffc0cf28: 81 49 00 14 lwz r10,20(r9) ffc0cf2c: 81 69 00 18 lwz r11,24(r9) ffc0cf30: 80 09 00 1c lwz r0,28(r9) ffc0cf34: 91 1f 00 24 stw r8,36(r31) ffc0cf38: 91 5f 00 28 stw r10,40(r31) ffc0cf3c: 91 7f 00 2c stw r11,44(r31) ffc0cf40: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0cf44: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0cf48: 48 00 42 61 bl ffc111a8 <_User_extensions_Add_set> extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0cf4c: 7f 9e e0 40 cmplw cr7,r30,r28 ffc0cf50: 41 9d ff a4 bgt+ cr7,ffc0cef4 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0cf54: 80 01 00 1c lwz r0,28(r1) ffc0cf58: 83 81 00 08 lwz r28,8(r1) ffc0cf5c: 7c 08 03 a6 mtlr r0 ffc0cf60: 83 a1 00 0c lwz r29,12(r1) ffc0cf64: 83 c1 00 10 lwz r30,16(r1) ffc0cf68: 83 e1 00 14 lwz r31,20(r1) ffc0cf6c: 38 21 00 18 addi r1,r1,24 ffc0cf70: 4e 80 00 20 blr =============================================================================== ffc0cf74 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0cf74: 94 21 ff e8 stwu r1,-24(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0cf78: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0cf7c: 7c 08 02 a6 mflr r0 ffc0cf80: 93 c1 00 10 stw r30,16(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0cf84: 3b c9 2d 94 addi r30,r9,11668 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0cf88: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0cf8c: 93 e1 00 14 stw r31,20(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0cf90: 83 e9 2d 94 lwz r31,11668(r9) #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0cf94: 93 a1 00 0c stw r29,12(r1) ffc0cf98: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0cf9c: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0cfa0: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0cfa4: 41 9e 00 28 beq- cr7,ffc0cfcc <_User_extensions_Thread_begin+0x58><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) ffc0cfa8: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0cfac: 7f a3 eb 78 mr r3,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) ffc0cfb0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cfb4: 41 9e 00 0c beq- cr7,ffc0cfc0 <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0cfb8: 7c 09 03 a6 mtctr r0 ffc0cfbc: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0cfc0: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0cfc4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0cfc8: 40 9e ff e0 bne+ cr7,ffc0cfa8 <_User_extensions_Thread_begin+0x34> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } ffc0cfcc: 80 01 00 1c lwz r0,28(r1) ffc0cfd0: 83 a1 00 0c lwz r29,12(r1) ffc0cfd4: 7c 08 03 a6 mtlr r0 ffc0cfd8: 83 c1 00 10 lwz r30,16(r1) ffc0cfdc: 83 e1 00 14 lwz r31,20(r1) ffc0cfe0: 38 21 00 18 addi r1,r1,24 ffc0cfe4: 4e 80 00 20 blr =============================================================================== ffc0d0e8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d0e8: 94 21 ff e8 stwu r1,-24(r1) return false; } } return true; } ffc0d0ec: 3d 20 00 00 lis r9,0 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d0f0: 7c 08 02 a6 mflr r0 ffc0d0f4: 93 c1 00 10 stw r30,16(r1) return false; } } return true; } ffc0d0f8: 3b c9 2d 94 addi r30,r9,11668 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d0fc: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d100: 93 e1 00 14 stw r31,20(r1) return false; } } return true; } ffc0d104: 83 e9 2d 94 lwz r31,11668(r9) #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d108: 93 a1 00 0c stw r29,12(r1) ffc0d10c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d110: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d114: 90 01 00 1c stw r0,28(r1) if ( !status ) return false; } } return true; ffc0d118: 38 60 00 01 li r3,1 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d11c: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d120: 41 9e 00 40 beq- cr7,ffc0d160 <_User_extensions_Thread_create+0x78><== NEVER TAKEN 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)( ffc0d124: 3f 80 00 00 lis r28,0 !_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 ) { ffc0d128: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0d12c: 39 3c 30 e4 addi r9,r28,12516 ffc0d130: 7f a4 eb 78 mr r4,r29 !_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 ) { ffc0d134: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d138: 41 9e 00 18 beq- cr7,ffc0d150 <_User_extensions_Thread_create+0x68> status = (*the_extension->Callouts.thread_create)( ffc0d13c: 80 69 00 0c lwz r3,12(r9) ffc0d140: 7c 09 03 a6 mtctr r0 ffc0d144: 4e 80 04 21 bctrl _Thread_Executing, the_thread ); if ( !status ) ffc0d148: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d14c: 41 9e 00 34 beq- cr7,ffc0d180 <_User_extensions_Thread_create+0x98> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d150: 83 ff 00 00 lwz r31,0(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d154: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d158: 40 9e ff d0 bne+ cr7,ffc0d128 <_User_extensions_Thread_create+0x40> if ( !status ) return false; } } return true; ffc0d15c: 38 60 00 01 li r3,1 } ffc0d160: 80 01 00 1c lwz r0,28(r1) ffc0d164: 83 81 00 08 lwz r28,8(r1) ffc0d168: 7c 08 03 a6 mtlr r0 ffc0d16c: 83 a1 00 0c lwz r29,12(r1) ffc0d170: 83 c1 00 10 lwz r30,16(r1) ffc0d174: 83 e1 00 14 lwz r31,20(r1) ffc0d178: 38 21 00 18 addi r1,r1,24 ffc0d17c: 4e 80 00 20 blr ffc0d180: 80 01 00 1c lwz r0,28(r1) status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; ffc0d184: 38 60 00 00 li r3,0 } } return true; } ffc0d188: 83 81 00 08 lwz r28,8(r1) ffc0d18c: 7c 08 03 a6 mtlr r0 ffc0d190: 83 a1 00 0c lwz r29,12(r1) ffc0d194: 83 c1 00 10 lwz r30,16(r1) ffc0d198: 83 e1 00 14 lwz r31,20(r1) ffc0d19c: 38 21 00 18 addi r1,r1,24 ffc0d1a0: 4e 80 00 20 blr =============================================================================== ffc0d1a4 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d1a4: 94 21 ff e8 stwu r1,-24(r1) ffc0d1a8: 7c 08 02 a6 mflr r0 ffc0d1ac: 93 c1 00 10 stw r30,16(r1) (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d1b0: 3f c0 00 00 lis r30,0 ffc0d1b4: 3b de 2d 94 addi r30,r30,11668 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d1b8: 93 e1 00 14 stw r31,20(r1) (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d1bc: 83 fe 00 08 lwz r31,8(r30) #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d1c0: 93 a1 00 0c stw r29,12(r1) ffc0d1c4: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d1c8: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d1cc: 90 01 00 1c stw r0,28(r1) ffc0d1d0: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d1d4: 41 9e 00 34 beq- cr7,ffc0d208 <_User_extensions_Thread_delete+0x64><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( ffc0d1d8: 3f 80 00 00 lis r28,0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) ffc0d1dc: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0d1e0: 39 3c 30 e4 addi r9,r28,12516 ffc0d1e4: 7f a4 eb 78 mr r4,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) ffc0d1e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d1ec: 41 9e 00 10 beq- cr7,ffc0d1fc <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0d1f0: 80 69 00 0c lwz r3,12(r9) ffc0d1f4: 7c 09 03 a6 mtctr r0 ffc0d1f8: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d1fc: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d200: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d204: 40 9e ff d8 bne+ cr7,ffc0d1dc <_User_extensions_Thread_delete+0x38> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d208: 80 01 00 1c lwz r0,28(r1) ffc0d20c: 83 81 00 08 lwz r28,8(r1) ffc0d210: 7c 08 03 a6 mtlr r0 ffc0d214: 83 a1 00 0c lwz r29,12(r1) ffc0d218: 83 c1 00 10 lwz r30,16(r1) ffc0d21c: 83 e1 00 14 lwz r31,20(r1) ffc0d220: 38 21 00 18 addi r1,r1,24 ffc0d224: 4e 80 00 20 blr =============================================================================== ffc0cfe8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0cfe8: 94 21 ff e8 stwu r1,-24(r1) ffc0cfec: 7c 08 02 a6 mflr r0 ffc0cff0: 93 c1 00 10 stw r30,16(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0cff4: 3f c0 00 00 lis r30,0 ffc0cff8: 3b de 2d 94 addi r30,r30,11668 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0cffc: 93 e1 00 14 stw r31,20(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0d000: 83 fe 00 08 lwz r31,8(r30) } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d004: 93 a1 00 0c stw r29,12(r1) ffc0d008: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d00c: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d010: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d014: 41 9e 00 28 beq- cr7,ffc0d03c <_User_extensions_Thread_exitted+0x54><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) ffc0d018: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0d01c: 7f a3 eb 78 mr r3,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) ffc0d020: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d024: 41 9e 00 0c beq- cr7,ffc0d030 <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0d028: 7c 09 03 a6 mtctr r0 ffc0d02c: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d030: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d034: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d038: 40 9e ff e0 bne+ cr7,ffc0d018 <_User_extensions_Thread_exitted+0x30> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } ffc0d03c: 80 01 00 1c lwz r0,28(r1) ffc0d040: 83 a1 00 0c lwz r29,12(r1) ffc0d044: 7c 08 03 a6 mtlr r0 ffc0d048: 83 c1 00 10 lwz r30,16(r1) ffc0d04c: 83 e1 00 14 lwz r31,20(r1) ffc0d050: 38 21 00 18 addi r1,r1,24 ffc0d054: 4e 80 00 20 blr =============================================================================== ffc0e388 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e388: 94 21 ff e8 stwu r1,-24(r1) (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e38c: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e390: 7c 08 02 a6 mflr r0 ffc0e394: 93 c1 00 10 stw r30,16(r1) (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e398: 3b c9 2d f4 addi r30,r9,11764 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e39c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e3a0: 93 e1 00 14 stw r31,20(r1) (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e3a4: 83 e9 2d f4 lwz r31,11764(r9) #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e3a8: 93 a1 00 0c stw r29,12(r1) ffc0e3ac: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e3b0: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e3b4: 90 01 00 1c stw r0,28(r1) ffc0e3b8: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e3bc: 41 9e 00 34 beq- cr7,ffc0e3f0 <_User_extensions_Thread_restart+0x68><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( ffc0e3c0: 3f 80 00 00 lis r28,0 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) ffc0e3c4: 80 1f 00 1c lwz r0,28(r31) (*the_extension->Callouts.thread_restart)( ffc0e3c8: 39 3c 31 44 addi r9,r28,12612 ffc0e3cc: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) ffc0e3d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e3d4: 41 9e 00 10 beq- cr7,ffc0e3e4 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0e3d8: 80 69 00 0c lwz r3,12(r9) ffc0e3dc: 7c 09 03 a6 mtctr r0 ffc0e3e0: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0e3e4: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e3e8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0e3ec: 40 9e ff d8 bne+ cr7,ffc0e3c4 <_User_extensions_Thread_restart+0x3c> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e3f0: 80 01 00 1c lwz r0,28(r1) ffc0e3f4: 83 81 00 08 lwz r28,8(r1) ffc0e3f8: 7c 08 03 a6 mtlr r0 ffc0e3fc: 83 a1 00 0c lwz r29,12(r1) ffc0e400: 83 c1 00 10 lwz r30,16(r1) ffc0e404: 83 e1 00 14 lwz r31,20(r1) ffc0e408: 38 21 00 18 addi r1,r1,24 ffc0e40c: 4e 80 00 20 blr =============================================================================== ffc0d228 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d228: 94 21 ff e8 stwu r1,-24(r1) (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d22c: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d230: 7c 08 02 a6 mflr r0 ffc0d234: 93 c1 00 10 stw r30,16(r1) (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d238: 3b c9 2d 94 addi r30,r9,11668 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d23c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d240: 93 e1 00 14 stw r31,20(r1) (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d244: 83 e9 2d 94 lwz r31,11668(r9) #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d248: 93 a1 00 0c stw r29,12(r1) ffc0d24c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d250: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d254: 90 01 00 1c stw r0,28(r1) ffc0d258: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d25c: 41 9e 00 34 beq- cr7,ffc0d290 <_User_extensions_Thread_start+0x68><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( ffc0d260: 3f 80 00 00 lis r28,0 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) ffc0d264: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0d268: 39 3c 30 e4 addi r9,r28,12516 ffc0d26c: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) ffc0d270: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d274: 41 9e 00 10 beq- cr7,ffc0d284 <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0d278: 80 69 00 0c lwz r3,12(r9) ffc0d27c: 7c 09 03 a6 mtctr r0 ffc0d280: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d284: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d288: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d28c: 40 9e ff d8 bne+ cr7,ffc0d264 <_User_extensions_Thread_start+0x3c> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d290: 80 01 00 1c lwz r0,28(r1) ffc0d294: 83 81 00 08 lwz r28,8(r1) ffc0d298: 7c 08 03 a6 mtlr r0 ffc0d29c: 83 a1 00 0c lwz r29,12(r1) ffc0d2a0: 83 c1 00 10 lwz r30,16(r1) ffc0d2a4: 83 e1 00 14 lwz r31,20(r1) ffc0d2a8: 38 21 00 18 addi r1,r1,24 ffc0d2ac: 4e 80 00 20 blr =============================================================================== ffc0d2b0 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d2b0: 94 21 ff e8 stwu r1,-24(r1) the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d2b4: 3d 20 00 00 lis r9,0 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d2b8: 7c 08 02 a6 mflr r0 ffc0d2bc: 93 c1 00 10 stw r30,16(r1) the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d2c0: 3b c9 2c 50 addi r30,r9,11344 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d2c4: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d2c8: 93 e1 00 14 stw r31,20(r1) the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d2cc: 83 e9 2c 50 lwz r31,11344(r9) void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d2d0: 93 81 00 08 stw r28,8(r1) ffc0d2d4: 7c 7c 1b 78 mr r28,r3 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d2d8: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d2dc: 93 a1 00 0c stw r29,12(r1) ffc0d2e0: 7c 9d 23 78 mr r29,r4 ffc0d2e4: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d2e8: 41 9e 00 24 beq- cr7,ffc0d30c <_User_extensions_Thread_switch+0x5c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); ffc0d2ec: 80 1f 00 08 lwz r0,8(r31) ffc0d2f0: 7f 83 e3 78 mr r3,r28 ffc0d2f4: 7f a4 eb 78 mr r4,r29 ffc0d2f8: 7c 09 03 a6 mtctr r0 ffc0d2fc: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { ffc0d300: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d304: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d308: 40 9e ff e4 bne+ cr7,ffc0d2ec <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d30c: 80 01 00 1c lwz r0,28(r1) ffc0d310: 83 81 00 08 lwz r28,8(r1) ffc0d314: 7c 08 03 a6 mtlr r0 ffc0d318: 83 a1 00 0c lwz r29,12(r1) ffc0d31c: 83 c1 00 10 lwz r30,16(r1) ffc0d320: 83 e1 00 14 lwz r31,20(r1) ffc0d324: 38 21 00 18 addi r1,r1,24 ffc0d328: 4e 80 00 20 blr =============================================================================== ffc0f828 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f828: 94 21 ff e0 stwu r1,-32(r1) ffc0f82c: 7c 08 02 a6 mflr r0 ffc0f830: 93 c1 00 18 stw r30,24(r1) ffc0f834: 7c be 2b 78 mr r30,r5 ffc0f838: 93 e1 00 1c stw r31,28(r1) ffc0f83c: 7c 7f 1b 78 mr r31,r3 ffc0f840: 90 01 00 24 stw r0,36(r1) ffc0f844: 93 61 00 0c stw r27,12(r1) ffc0f848: 93 81 00 10 stw r28,16(r1) ffc0f84c: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f850: 7c 00 00 a6 mfmsr r0 ffc0f854: 7d 30 42 a6 mfsprg r9,0 ffc0f858: 7c 09 48 78 andc r9,r0,r9 ffc0f85c: 7d 20 01 24 mtmsr r9 } } _ISR_Enable( level ); } ffc0f860: 81 23 00 00 lwz r9,0(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0f864: 3b 83 00 04 addi r28,r3,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ffc0f868: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0f86c: 41 9e 00 6c beq- cr7,ffc0f8d8 <_Watchdog_Adjust+0xb0> switch ( direction ) { ffc0f870: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f874: 40 9e 00 8c bne- cr7,ffc0f900 <_Watchdog_Adjust+0xd8> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f878: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f87c: 41 9e 00 5c beq- cr7,ffc0f8d8 <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f880: 83 a9 00 10 lwz r29,16(r9) _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f884: 3b 60 00 01 li r27,1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f888: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0f88c: 40 bc 00 18 bge+ cr7,ffc0f8a4 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0f890: 48 00 00 ac b ffc0f93c <_Watchdog_Adjust+0x114> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f894: 41 82 00 44 beq- ffc0f8d8 <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f898: 83 a9 00 10 lwz r29,16(r9) ffc0f89c: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0f8a0: 41 9d 00 9c bgt- cr7,ffc0f93c <_Watchdog_Adjust+0x114> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f8a4: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f8a8: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f8ac: 7f e3 fb 78 mr r3,r31 ffc0f8b0: 48 00 03 31 bl ffc0fbe0 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f8b4: 7c 00 00 a6 mfmsr r0 ffc0f8b8: 7d 30 42 a6 mfsprg r9,0 ffc0f8bc: 7c 09 48 78 andc r9,r0,r9 ffc0f8c0: 7d 20 01 24 mtmsr r9 } } _ISR_Enable( level ); } ffc0f8c4: 81 7f 00 00 lwz r11,0(r31) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f8c8: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0f8cc: 7f 9c 58 00 cmpw cr7,r28,r11 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ffc0f8d0: 7d 69 5b 78 mr r9,r11 ffc0f8d4: 40 9e ff c0 bne+ cr7,ffc0f894 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f8d8: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f8dc: 80 01 00 24 lwz r0,36(r1) ffc0f8e0: 83 61 00 0c lwz r27,12(r1) ffc0f8e4: 7c 08 03 a6 mtlr r0 ffc0f8e8: 83 81 00 10 lwz r28,16(r1) ffc0f8ec: 83 a1 00 14 lwz r29,20(r1) ffc0f8f0: 83 c1 00 18 lwz r30,24(r1) ffc0f8f4: 83 e1 00 1c lwz r31,28(r1) ffc0f8f8: 38 21 00 20 addi r1,r1,32 ffc0f8fc: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0f900: 2f 84 00 01 cmpwi cr7,r4,1 ffc0f904: 40 9e ff d4 bne+ cr7,ffc0f8d8 <_Watchdog_Adjust+0xb0> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0f908: 81 69 00 10 lwz r11,16(r9) ffc0f90c: 7f cb 2a 14 add r30,r11,r5 ffc0f910: 93 c9 00 10 stw r30,16(r9) ffc0f914: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f918: 80 01 00 24 lwz r0,36(r1) ffc0f91c: 83 61 00 0c lwz r27,12(r1) ffc0f920: 7c 08 03 a6 mtlr r0 ffc0f924: 83 81 00 10 lwz r28,16(r1) ffc0f928: 83 a1 00 14 lwz r29,20(r1) ffc0f92c: 83 c1 00 18 lwz r30,24(r1) ffc0f930: 83 e1 00 1c lwz r31,28(r1) ffc0f934: 38 21 00 20 addi r1,r1,32 ffc0f938: 4e 80 00 20 blr _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; ffc0f93c: 7f de e8 50 subf r30,r30,r29 ffc0f940: 93 c9 00 10 stw r30,16(r9) break; ffc0f944: 4b ff ff 94 b ffc0f8d8 <_Watchdog_Adjust+0xb0> =============================================================================== ffc21570 <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc21570: 2c 04 00 00 cmpwi r4,0 Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { ffc21574: 94 21 ff f0 stwu r1,-16(r1) ffc21578: 93 e1 00 0c stw r31,12(r1) Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc2157c: 41 82 00 94 beq- ffc21610 <_Watchdog_Adjust_to_chain+0xa0> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc21580: 7c c0 00 a6 mfmsr r6 ffc21584: 7c 10 42 a6 mfsprg r0,0 ffc21588: 7c c0 00 78 andc r0,r6,r0 ffc2158c: 7c 00 01 24 mtmsr r0 return; } _ISR_Disable( level ); ffc21590: 81 23 00 00 lwz r9,0(r3) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc21594: 3b e0 00 00 li r31,0 ffc21598: 38 e3 00 04 addi r7,r3,4 ffc2159c: 39 85 00 04 addi r12,r5,4 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { ffc215a0: 7f 89 38 00 cmpw cr7,r9,r7 ffc215a4: 41 9e 00 68 beq- cr7,ffc2160c <_Watchdog_Adjust_to_chain+0x9c> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc215a8: 80 09 00 10 lwz r0,16(r9) ffc215ac: 7f 80 20 40 cmplw cr7,r0,r4 ffc215b0: 41 9d 00 6c bgt- cr7,ffc2161c <_Watchdog_Adjust_to_chain+0xac> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc215b4: 93 e9 00 10 stw r31,16(r9) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; ffc215b8: 7c 80 20 50 subf r4,r0,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc215bc: 81 09 00 00 lwz r8,0(r9) previous = the_node->previous; ffc215c0: 81 49 00 04 lwz r10,4(r9) next->previous = previous; ffc215c4: 91 48 00 04 stw r10,4(r8) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc215c8: 81 65 00 08 lwz r11,8(r5) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc215cc: 91 0a 00 00 stw r8,0(r10) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc215d0: 91 89 00 00 stw r12,0(r9) tail->previous = the_node; old_last->next = the_node; ffc215d4: 91 2b 00 00 stw r9,0(r11) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc215d8: 91 25 00 08 stw r9,8(r5) old_last->next = the_node; the_node->previous = old_last; ffc215dc: 91 69 00 04 stw r11,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc215e0: 7c 00 00 a6 mfmsr r0 ffc215e4: 7c c0 01 24 mtmsr r6 ffc215e8: 7c 00 01 24 mtmsr r0 break; } } _ISR_Enable( level ); } ffc215ec: 81 23 00 00 lwz r9,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc215f0: 7f 87 48 00 cmpw cr7,r7,r9 ffc215f4: 41 9e 00 10 beq- cr7,ffc21604 <_Watchdog_Adjust_to_chain+0x94> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc215f8: 80 09 00 10 lwz r0,16(r9) ffc215fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc21600: 41 9e ff bc beq+ cr7,ffc215bc <_Watchdog_Adjust_to_chain+0x4c><== NEVER TAKEN } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { ffc21604: 2f 84 00 00 cmpwi cr7,r4,0 ffc21608: 40 9e ff 98 bne+ cr7,ffc215a0 <_Watchdog_Adjust_to_chain+0x30> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc2160c: 7c c0 01 24 mtmsr r6 break; } } _ISR_Enable( level ); } ffc21610: 83 e1 00 0c lwz r31,12(r1) ffc21614: 38 21 00 10 addi r1,r1,16 ffc21618: 4e 80 00 20 blr /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; ffc2161c: 7c 04 00 50 subf r0,r4,r0 ffc21620: 90 09 00 10 stw r0,16(r9) break; ffc21624: 4b ff ff e8 b ffc2160c <_Watchdog_Adjust_to_chain+0x9c> =============================================================================== ffc0d32c <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0d32c: 3d 20 00 00 lis r9,0 ffc0d330: 80 09 30 ec lwz r0,12524(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d334: 7c e0 00 a6 mfmsr r7 ffc0d338: 7d 30 42 a6 mfsprg r9,0 ffc0d33c: 7c e9 48 78 andc r9,r7,r9 ffc0d340: 7d 20 01 24 mtmsr r9 /* * 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 ) { ffc0d344: 81 24 00 08 lwz r9,8(r4) ffc0d348: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d34c: 40 9e 01 0c bne- cr7,ffc0d458 <_Watchdog_Insert+0x12c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0d350: 3c a0 00 00 lis r5,0 ffc0d354: 81 25 27 c4 lwz r9,10180(r5) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0d358: 39 60 00 01 li r11,1 ffc0d35c: 91 64 00 08 stw r11,8(r4) ffc0d360: 3d 80 00 00 lis r12,0 _Watchdog_Sync_count++; ffc0d364: 39 29 00 01 addi r9,r9,1 ffc0d368: 91 25 27 c4 stw r9,10180(r5) restart: delta_interval = the_watchdog->initial; ffc0d36c: 81 24 00 0c lwz r9,12(r4) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ffc0d370: 81 63 00 00 lwz r11,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d374: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d378: 41 9e 00 98 beq- cr7,ffc0d410 <_Watchdog_Insert+0xe4> ffc0d37c: 81 4b 00 00 lwz r10,0(r11) ffc0d380: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d384: 41 9e 00 8c beq- cr7,ffc0d410 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d388: 81 4b 00 10 lwz r10,16(r11) ffc0d38c: 7f 89 50 40 cmplw cr7,r9,r10 ffc0d390: 41 9c 00 d0 blt- cr7,ffc0d460 <_Watchdog_Insert+0x134> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0d394: 7d 00 00 a6 mfmsr r8 ffc0d398: 7c e0 01 24 mtmsr r7 ffc0d39c: 7d 00 01 24 mtmsr r8 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d3a0: 81 04 00 08 lwz r8,8(r4) ffc0d3a4: 2f 88 00 01 cmpwi cr7,r8,1 ffc0d3a8: 40 9e 00 98 bne- cr7,ffc0d440 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d3ac: 81 0c 27 b4 lwz r8,10164(r12) ffc0d3b0: 38 cc 27 b4 addi r6,r12,10164 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d3b4: 7d 2a 48 50 subf r9,r10,r9 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d3b8: 7f 80 40 40 cmplw cr7,r0,r8 ffc0d3bc: 40 bc 00 48 bge+ cr7,ffc0d404 <_Watchdog_Insert+0xd8> ffc0d3c0: 48 00 00 dc b ffc0d49c <_Watchdog_Insert+0x170> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d3c4: 81 4b 00 00 lwz r10,0(r11) ffc0d3c8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d3cc: 41 9e 00 44 beq- cr7,ffc0d410 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d3d0: 81 4b 00 10 lwz r10,16(r11) ffc0d3d4: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0d3d8: 41 9d 00 88 bgt- cr7,ffc0d460 <_Watchdog_Insert+0x134> ffc0d3dc: 7d 00 00 a6 mfmsr r8 ffc0d3e0: 7c e0 01 24 mtmsr r7 ffc0d3e4: 7d 00 01 24 mtmsr r8 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d3e8: 81 04 00 08 lwz r8,8(r4) if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d3ec: 7d 2a 48 50 subf r9,r10,r9 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d3f0: 2f 88 00 01 cmpwi cr7,r8,1 ffc0d3f4: 40 9e 00 4c bne- cr7,ffc0d440 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d3f8: 81 46 00 00 lwz r10,0(r6) ffc0d3fc: 7f 80 50 40 cmplw cr7,r0,r10 ffc0d400: 41 9c 00 9c blt- cr7,ffc0d49c <_Watchdog_Insert+0x170> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d404: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0d408: 81 6b 00 00 lwz r11,0(r11) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d40c: 40 9e ff b8 bne+ cr7,ffc0d3c4 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d410: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d414: 3d 00 00 00 lis r8,0 ffc0d418: 81 08 27 c8 lwz r8,10184(r8) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0d41c: 38 c0 00 02 li r6,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d420: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d424: 91 64 00 04 stw r11,4(r4) ffc0d428: 90 c4 00 08 stw r6,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d42c: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d430: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d434: 90 8a 00 04 stw r4,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0d438: 91 44 00 00 stw r10,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d43c: 91 04 00 14 stw r8,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0d440: 90 0c 27 b4 stw r0,10164(r12) _Watchdog_Sync_count--; ffc0d444: 81 25 27 c4 lwz r9,10180(r5) ffc0d448: 38 09 ff ff addi r0,r9,-1 ffc0d44c: 90 05 27 c4 stw r0,10180(r5) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d450: 7c e0 01 24 mtmsr r7 ffc0d454: 4e 80 00 20 blr ffc0d458: 7c e0 01 24 mtmsr r7 ffc0d45c: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0d460: 7d 49 50 50 subf r10,r9,r10 ffc0d464: 91 4b 00 10 stw r10,16(r11) the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d468: 3d 00 00 00 lis r8,0 ffc0d46c: 38 c0 00 02 li r6,2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d470: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d474: 81 08 27 c8 lwz r8,10184(r8) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d478: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d47c: 91 64 00 04 stw r11,4(r4) ffc0d480: 90 c4 00 08 stw r6,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d484: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d488: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d48c: 90 8a 00 04 stw r4,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0d490: 91 44 00 00 stw r10,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d494: 91 04 00 14 stw r8,20(r4) ffc0d498: 4b ff ff a8 b ffc0d440 <_Watchdog_Insert+0x114> 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; ffc0d49c: 90 0c 27 b4 stw r0,10164(r12) goto restart; ffc0d4a0: 4b ff fe cc b ffc0d36c <_Watchdog_Insert+0x40> =============================================================================== ffc0d4f4 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d4f4: 7d 20 00 a6 mfmsr r9 ffc0d4f8: 7c 10 42 a6 mfsprg r0,0 ffc0d4fc: 7d 20 00 78 andc r0,r9,r0 ffc0d500: 7c 00 01 24 mtmsr r0 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0d504: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0d508: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d50c: 41 9e 00 98 beq- cr7,ffc0d5a4 <_Watchdog_Remove+0xb0> ffc0d510: 2b 80 00 01 cmplwi cr7,r0,1 ffc0d514: 40 9c 00 1c bge- cr7,ffc0d530 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d518: 3d 60 00 00 lis r11,0 ffc0d51c: 81 6b 27 c8 lwz r11,10184(r11) ffc0d520: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d524: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d528: 7c 03 03 78 mr r3,r0 ffc0d52c: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0d530: 2b 80 00 03 cmplwi cr7,r0,3 ffc0d534: 41 bd ff e4 bgt- cr7,ffc0d518 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0d538: 81 63 00 00 lwz r11,0(r3) break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0d53c: 39 00 00 00 li r8,0 ffc0d540: 91 03 00 08 stw r8,8(r3) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0d544: 81 4b 00 00 lwz r10,0(r11) ffc0d548: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d54c: 41 9e 00 14 beq- cr7,ffc0d560 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0d550: 81 0b 00 10 lwz r8,16(r11) ffc0d554: 81 43 00 10 lwz r10,16(r3) ffc0d558: 7d 48 52 14 add r10,r8,r10 ffc0d55c: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0d560: 3d 40 00 00 lis r10,0 ffc0d564: 81 4a 27 c4 lwz r10,10180(r10) ffc0d568: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d56c: 41 9e 00 14 beq- cr7,ffc0d580 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0d570: 3d 40 00 00 lis r10,0 ffc0d574: 81 0a 30 ec lwz r8,12524(r10) ffc0d578: 3d 40 00 00 lis r10,0 ffc0d57c: 91 0a 27 b4 stw r8,10164(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0d580: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0d584: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0d588: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d58c: 3d 60 00 00 lis r11,0 ffc0d590: 81 6b 27 c8 lwz r11,10184(r11) ffc0d594: 91 63 00 18 stw r11,24(r3) ffc0d598: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d59c: 7c 03 03 78 mr r3,r0 ffc0d5a0: 4e 80 00 20 blr /* * 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; ffc0d5a4: 39 60 00 00 li r11,0 ffc0d5a8: 91 63 00 08 stw r11,8(r3) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d5ac: 3d 60 00 00 lis r11,0 ffc0d5b0: 81 6b 27 c8 lwz r11,10184(r11) ffc0d5b4: 91 63 00 18 stw r11,24(r3) ffc0d5b8: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d5bc: 7c 03 03 78 mr r3,r0 ffc0d5c0: 4e 80 00 20 blr =============================================================================== ffc0ef68 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0ef68: 94 21 ff e8 stwu r1,-24(r1) ffc0ef6c: 7c 08 02 a6 mflr r0 ffc0ef70: 93 c1 00 10 stw r30,16(r1) ffc0ef74: 7c 7e 1b 78 mr r30,r3 ffc0ef78: 93 e1 00 14 stw r31,20(r1) ffc0ef7c: 7c 9f 23 78 mr r31,r4 ffc0ef80: 90 01 00 1c stw r0,28(r1) ffc0ef84: 93 81 00 08 stw r28,8(r1) ffc0ef88: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ef8c: 7f a0 00 a6 mfmsr r29 ffc0ef90: 7c 10 42 a6 mfsprg r0,0 ffc0ef94: 7f a0 00 78 andc r0,r29,r0 ffc0ef98: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0ef9c: 3c 60 ff c2 lis r3,-62 ffc0efa0: 7f e5 fb 78 mr r5,r31 ffc0efa4: 38 63 29 2c addi r3,r3,10540 ffc0efa8: 7f c4 f3 78 mr r4,r30 ffc0efac: 4c c6 31 82 crclr 4*cr1+eq ffc0efb0: 4b ff 7e 31 bl ffc06de0 printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0efb4: 83 9f 00 00 lwz r28,0(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0efb8: 3b ff 00 04 addi r31,r31,4 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { ffc0efbc: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0efc0: 41 9e 00 54 beq- cr7,ffc0f014 <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0efc4: 7f 84 e3 78 mr r4,r28 ffc0efc8: 38 60 00 00 li r3,0 ffc0efcc: 48 00 00 5d bl ffc0f028 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) ffc0efd0: 83 9c 00 00 lwz r28,0(r28) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; ffc0efd4: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0efd8: 40 9e ff ec bne+ cr7,ffc0efc4 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0efdc: 3c 60 ff c2 lis r3,-62 ffc0efe0: 38 63 29 44 addi r3,r3,10564 ffc0efe4: 7f c4 f3 78 mr r4,r30 ffc0efe8: 4c c6 31 82 crclr 4*cr1+eq ffc0efec: 4b ff 7d f5 bl ffc06de0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0eff0: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0eff4: 80 01 00 1c lwz r0,28(r1) ffc0eff8: 83 81 00 08 lwz r28,8(r1) ffc0effc: 7c 08 03 a6 mtlr r0 ffc0f000: 83 a1 00 0c lwz r29,12(r1) ffc0f004: 83 c1 00 10 lwz r30,16(r1) ffc0f008: 83 e1 00 14 lwz r31,20(r1) ffc0f00c: 38 21 00 18 addi r1,r1,24 ffc0f010: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0f014: 3c 60 ff c2 lis r3,-62 ffc0f018: 38 63 29 54 addi r3,r3,10580 ffc0f01c: 4c c6 31 82 crclr 4*cr1+eq ffc0f020: 4b ff 7d c1 bl ffc06de0 ffc0f024: 4b ff ff cc b ffc0eff0 <_Watchdog_Report_chain+0x88> =============================================================================== ffc0d5c4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { ffc0d5c4: 94 21 ff e8 stwu r1,-24(r1) ffc0d5c8: 7c 08 02 a6 mflr r0 ffc0d5cc: 93 e1 00 14 stw r31,20(r1) ffc0d5d0: 7c 7f 1b 78 mr r31,r3 ffc0d5d4: 90 01 00 1c stw r0,28(r1) ffc0d5d8: 93 81 00 08 stw r28,8(r1) ffc0d5dc: 93 a1 00 0c stw r29,12(r1) ffc0d5e0: 93 c1 00 10 stw r30,16(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d5e4: 7f 80 00 a6 mfmsr r28 ffc0d5e8: 7c 10 42 a6 mfsprg r0,0 ffc0d5ec: 7f 80 00 78 andc r0,r28,r0 ffc0d5f0: 7c 00 01 24 mtmsr r0 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } ffc0d5f4: 83 a3 00 00 lwz r29,0(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0d5f8: 3b c3 00 04 addi r30,r3,4 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0d5fc: 7f 9d f0 00 cmpw cr7,r29,r30 ffc0d600: 41 9e 00 20 beq- cr7,ffc0d620 <_Watchdog_Tickle+0x5c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { ffc0d604: 81 3d 00 10 lwz r9,16(r29) ffc0d608: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d60c: 41 9e 00 78 beq- cr7,ffc0d684 <_Watchdog_Tickle+0xc0> the_watchdog->delta_interval--; ffc0d610: 39 29 ff ff addi r9,r9,-1 if ( the_watchdog->delta_interval != 0 ) ffc0d614: 2f 89 00 00 cmpwi cr7,r9,0 * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; ffc0d618: 91 3d 00 10 stw r9,16(r29) if ( the_watchdog->delta_interval != 0 ) ffc0d61c: 41 be 00 68 beq+ cr7,ffc0d684 <_Watchdog_Tickle+0xc0> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d620: 7f 80 01 24 mtmsr r28 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } ffc0d624: 80 01 00 1c lwz r0,28(r1) ffc0d628: 83 81 00 08 lwz r28,8(r1) ffc0d62c: 7c 08 03 a6 mtlr r0 ffc0d630: 83 a1 00 0c lwz r29,12(r1) ffc0d634: 83 c1 00 10 lwz r30,16(r1) ffc0d638: 83 e1 00 14 lwz r31,20(r1) ffc0d63c: 38 21 00 18 addi r1,r1,24 ffc0d640: 4e 80 00 20 blr _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( ffc0d644: 80 1d 00 1c lwz r0,28(r29) ffc0d648: 80 7d 00 20 lwz r3,32(r29) ffc0d64c: 80 9d 00 24 lwz r4,36(r29) ffc0d650: 7c 09 03 a6 mtctr r0 ffc0d654: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d658: 7f 80 00 a6 mfmsr r28 ffc0d65c: 7c 10 42 a6 mfsprg r0,0 ffc0d660: 7f 80 00 78 andc r0,r28,r0 ffc0d664: 7c 00 01 24 mtmsr r0 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } ffc0d668: 80 1f 00 00 lwz r0,0(r31) _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); ffc0d66c: 7f 80 f0 00 cmpw cr7,r0,r30 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ffc0d670: 7c 1d 03 78 mr r29,r0 ffc0d674: 41 be ff ac beq- cr7,ffc0d620 <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && ffc0d678: 80 1d 00 10 lwz r0,16(r29) ffc0d67c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d680: 40 be ff a0 bne- cr7,ffc0d620 <_Watchdog_Tickle+0x5c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); ffc0d684: 7f a3 eb 78 mr r3,r29 ffc0d688: 4b ff fe 6d bl ffc0d4f4 <_Watchdog_Remove> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d68c: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); switch( watchdog_state ) { ffc0d690: 2f 83 00 02 cmpwi cr7,r3,2 ffc0d694: 40 9e ff c4 bne+ cr7,ffc0d658 <_Watchdog_Tickle+0x94> <== NEVER TAKEN ffc0d698: 4b ff ff ac b ffc0d644 <_Watchdog_Tickle+0x80> =============================================================================== ffc08f70 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc08f70: 94 21 ff d8 stwu r1,-40(r1) ffc08f74: 7d 80 00 26 mfcr r12 ffc08f78: 7c 08 02 a6 mflr r0 ffc08f7c: 93 e1 00 24 stw r31,36(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc08f80: 7c 7f 1b 79 mr. r31,r3 int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc08f84: 93 c1 00 20 stw r30,32(r1) ffc08f88: 7c 9e 23 78 mr r30,r4 ffc08f8c: 90 01 00 2c stw r0,44(r1) ffc08f90: 93 a1 00 1c stw r29,28(r1) ffc08f94: 91 81 00 18 stw r12,24(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc08f98: 41 82 01 78 beq- ffc09110 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) ffc08f9c: 81 3f 00 04 lwz r9,4(r31) ffc08fa0: 3c 00 00 0f lis r0,15 ffc08fa4: 60 00 42 3f ori r0,r0,16959 ffc08fa8: 7f 89 00 40 cmplw cr7,r9,r0 ffc08fac: 41 9d 01 64 bgt- cr7,ffc09110 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { ffc08fb0: 2e 04 00 00 cmpwi cr4,r4,0 ffc08fb4: 41 92 00 14 beq- cr4,ffc08fc8 olddelta->tv_sec = 0; ffc08fb8: 38 00 00 00 li r0,0 olddelta->tv_usec = 0; ffc08fbc: 90 04 00 04 stw r0,4(r4) if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; ffc08fc0: 90 04 00 00 stw r0,0(r4) olddelta->tv_usec = 0; ffc08fc4: 81 3f 00 04 lwz r9,4(r31) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08fc8: 80 1f 00 00 lwz r0,0(r31) adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) return 0; ffc08fcc: 38 60 00 00 li r3,0 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08fd0: 54 0a 40 2e rlwinm r10,r0,8,0,23 ffc08fd4: 54 0b 18 38 rlwinm r11,r0,3,0,28 ffc08fd8: 7d 6b 50 50 subf r11,r11,r10 ffc08fdc: 55 6a 30 32 rlwinm r10,r11,6,0,25 ffc08fe0: 7d 6b 50 50 subf r11,r11,r10 ffc08fe4: 7c 0b 02 14 add r0,r11,r0 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc08fe8: 3d 60 00 00 lis r11,0 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08fec: 54 00 30 32 rlwinm r0,r0,6,0,25 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc08ff0: 81 4b 20 ac lwz r10,8364(r11) olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); adjustment += delta->tv_usec; ffc08ff4: 7d 29 02 14 add r9,r9,r0 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc08ff8: 7f 89 50 40 cmplw cr7,r9,r10 ffc08ffc: 40 9c 00 28 bge- cr7,ffc09024 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } ffc09000: 80 01 00 2c lwz r0,44(r1) ffc09004: 81 81 00 18 lwz r12,24(r1) ffc09008: 7c 08 03 a6 mtlr r0 ffc0900c: 83 a1 00 1c lwz r29,28(r1) ffc09010: 83 c1 00 20 lwz r30,32(r1) ffc09014: 7d 80 81 20 mtcrf 8,r12 ffc09018: 83 e1 00 24 lwz r31,36(r1) ffc0901c: 38 21 00 28 addi r1,r1,40 ffc09020: 4e 80 00 20 blr rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09024: 3d 20 00 00 lis r9,0 ffc09028: 81 69 28 cc lwz r11,10444(r9) ffc0902c: 38 0b 00 01 addi r0,r11,1 ffc09030: 90 09 28 cc stw r0,10444(r9) * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); ffc09034: 3b a1 00 08 addi r29,r1,8 ffc09038: 7f a3 eb 78 mr r3,r29 ffc0903c: 48 00 1f f9 bl ffc0b034 <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc09040: 81 3f 00 04 lwz r9,4(r31) ffc09044: 80 01 00 0c lwz r0,12(r1) ffc09048: 1d 29 03 e8 mulli r9,r9,1000 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ffc0904c: 81 41 00 08 lwz r10,8(r1) ffc09050: 81 7f 00 00 lwz r11,0(r31) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc09054: 7d 29 02 14 add r9,r9,r0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09058: 3c 00 3b 9a lis r0,15258 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc0905c: 91 21 00 0c stw r9,12(r1) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09060: 60 00 c9 ff ori r0,r0,51711 ffc09064: 7f 89 00 40 cmplw cr7,r9,r0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ffc09068: 7d 6a 5a 14 add r11,r10,r11 ffc0906c: 91 61 00 08 stw r11,8(r1) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09070: 40 9d 00 20 ble- cr7,ffc09090 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc09074: 3d 29 c4 65 addis r9,r9,-15259 ffc09078: 39 29 36 00 addi r9,r9,13824 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0907c: 7f 89 00 40 cmplw cr7,r9,r0 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( ffc09080: 39 6b 00 01 addi r11,r11,1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09084: 41 9d ff f0 bgt+ cr7,ffc09074 <== NEVER TAKEN ffc09088: 91 21 00 0c stw r9,12(r1) ffc0908c: 91 61 00 08 stw r11,8(r1) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc09090: 3c 00 c4 65 lis r0,-15259 ffc09094: 60 00 36 00 ori r0,r0,13824 ffc09098: 7f 89 00 40 cmplw cr7,r9,r0 ffc0909c: 41 9d 00 24 bgt- cr7,ffc090c0 <== NEVER TAKEN ffc090a0: 81 61 00 08 lwz r11,8(r1) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ffc090a4: 3d 29 3b 9b addis r9,r9,15259 ffc090a8: 39 29 ca 00 addi r9,r9,-13824 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc090ac: 7f 89 00 40 cmplw cr7,r9,r0 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( ffc090b0: 39 6b ff ff addi r11,r11,-1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc090b4: 40 9d ff f0 ble+ cr7,ffc090a4 ffc090b8: 91 21 00 0c stw r9,12(r1) ffc090bc: 91 61 00 08 stw r11,8(r1) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); ffc090c0: 7f a3 eb 78 mr r3,r29 ffc090c4: 48 00 20 4d bl ffc0b110 <_TOD_Set> _Thread_Enable_dispatch(); ffc090c8: 48 00 3b c1 bl ffc0cc88 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) ffc090cc: 41 92 00 3c beq- cr4,ffc09108 *olddelta = *delta; return 0; } ffc090d0: 80 01 00 2c lwz r0,44(r1) /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; ffc090d4: 38 60 00 00 li r3,0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc090d8: 81 3f 00 00 lwz r9,0(r31) return 0; } ffc090dc: 7c 08 03 a6 mtlr r0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc090e0: 81 5f 00 04 lwz r10,4(r31) return 0; } ffc090e4: 81 81 00 18 lwz r12,24(r1) _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc090e8: 91 3e 00 00 stw r9,0(r30) return 0; } ffc090ec: 7d 80 81 20 mtcrf 8,r12 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc090f0: 91 5e 00 04 stw r10,4(r30) return 0; } ffc090f4: 83 a1 00 1c lwz r29,28(r1) ffc090f8: 83 c1 00 20 lwz r30,32(r1) ffc090fc: 83 e1 00 24 lwz r31,36(r1) ffc09100: 38 21 00 28 addi r1,r1,40 ffc09104: 4e 80 00 20 blr /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; ffc09108: 38 60 00 00 li r3,0 ffc0910c: 4b ff fe f4 b ffc09000 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09110: 48 00 b5 89 bl ffc14698 <__errno> ffc09114: 38 00 00 16 li r0,22 ffc09118: 90 03 00 00 stw r0,0(r3) ffc0911c: 38 60 ff ff li r3,-1 ffc09120: 4b ff fe e0 b ffc09000 =============================================================================== ffc09a04 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc09a04: 94 21 ff e8 stwu r1,-24(r1) ffc09a08: 7c 08 02 a6 mflr r0 ffc09a0c: 93 e1 00 14 stw r31,20(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc09a10: 3f e0 00 00 lis r31,0 ffc09a14: 3b ff 2c 08 addi r31,r31,11272 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc09a18: 93 81 00 08 stw r28,8(r1) ffc09a1c: 7c 7c 1b 78 mr r28,r3 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc09a20: 7f e3 fb 78 mr r3,r31 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc09a24: 93 c1 00 10 stw r30,16(r1) ffc09a28: 7c 9e 23 78 mr r30,r4 ffc09a2c: 90 01 00 1c stw r0,28(r1) ffc09a30: 93 a1 00 0c stw r29,12(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc09a34: 48 00 16 15 bl ffc0b048 if (aiocbp == NULL) ffc09a38: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09a3c: 41 9e 00 f4 beq- cr7,ffc09b30 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { if (aiocbp->aio_fildes != fildes) { ffc09a40: 83 be 00 00 lwz r29,0(r30) ffc09a44: 7f 9d e0 00 cmpw cr7,r29,r28 ffc09a48: 40 9e 00 cc bne- cr7,ffc09b14 <== ALWAYS TAKEN pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ffc09a4c: 38 7f 00 48 addi r3,r31,72 <== NOT EXECUTED ffc09a50: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED ffc09a54: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc09a58: 48 00 03 d5 bl ffc09e2c <== NOT EXECUTED fildes, 0); if (r_chain == NULL) ffc09a5c: 7c 7c 1b 79 mr. r28,r3 <== NOT EXECUTED ffc09a60: 41 82 00 54 beq- ffc09ab4 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return result; } pthread_mutex_lock (&r_chain->mutex); ffc09a64: 3b bc 00 1c addi r29,r28,28 <== NOT EXECUTED ffc09a68: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09a6c: 48 00 15 dd bl ffc0b048 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); ffc09a70: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc09a74: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc09a78: 48 00 08 b1 bl ffc0a328 <== NOT EXECUTED ffc09a7c: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); ffc09a80: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09a84: 48 00 16 91 bl ffc0b114 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); ffc09a88: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09a8c: 48 00 16 89 bl ffc0b114 <== NOT EXECUTED return result; } return AIO_ALLDONE; } ffc09a90: 80 01 00 1c lwz r0,28(r1) ffc09a94: 7f c3 f3 78 mr r3,r30 ffc09a98: 83 81 00 08 lwz r28,8(r1) ffc09a9c: 7c 08 03 a6 mtlr r0 ffc09aa0: 83 a1 00 0c lwz r29,12(r1) ffc09aa4: 83 c1 00 10 lwz r30,16(r1) ffc09aa8: 83 e1 00 14 lwz r31,20(r1) ffc09aac: 38 21 00 18 addi r1,r1,24 ffc09ab0: 4e 80 00 20 blr r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) ffc09ab4: 81 3f 00 54 lwz r9,84(r31) <== NOT EXECUTED ffc09ab8: 38 1f 00 58 addi r0,r31,88 <== NOT EXECUTED ffc09abc: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc09ac0: 41 be ff a4 beq- cr7,ffc09a64 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, ffc09ac4: 38 7f 00 54 addi r3,r31,84 <== NOT EXECUTED ffc09ac8: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED ffc09acc: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc09ad0: 48 00 03 5d bl ffc09e2c <== NOT EXECUTED fildes, 0); if (r_chain == NULL) ffc09ad4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc09ad8: 41 9e 00 3c beq- cr7,ffc09b14 <== NOT EXECUTED { pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); ffc09adc: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc09ae0: 48 00 08 49 bl ffc0a328 <== NOT EXECUTED ffc09ae4: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); ffc09ae8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09aec: 48 00 16 29 bl ffc0b114 <== NOT EXECUTED return result; } return AIO_ALLDONE; } ffc09af0: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc09af4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09af8: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc09afc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc09b00: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc09b04: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc09b08: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc09b0c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc09b10: 4e 80 00 20 blr <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); ffc09b14: 7f e3 fb 78 mr r3,r31 ffc09b18: 48 00 15 fd bl ffc0b114 rtems_set_errno_and_return_minus_one (EINVAL); ffc09b1c: 3b c0 ff ff li r30,-1 ffc09b20: 48 00 d2 b9 bl ffc16dd8 <__errno> ffc09b24: 38 00 00 16 li r0,22 ffc09b28: 90 03 00 00 stw r0,0(r3) ffc09b2c: 4b ff ff 64 b ffc09a90 pthread_mutex_lock (&aio_request_queue.mutex); if (aiocbp == NULL) { if (fcntl (fildes, F_GETFL) < 0) { ffc09b30: 7f 83 e3 78 mr r3,r28 ffc09b34: 38 80 00 03 li r4,3 ffc09b38: 4c c6 31 82 crclr 4*cr1+eq ffc09b3c: 48 00 8d 79 bl ffc128b4 ffc09b40: 2f 83 00 00 cmpwi cr7,r3,0 ffc09b44: 41 9c 00 c0 blt- cr7,ffc09c04 <== ALWAYS TAKEN pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ffc09b48: 38 7f 00 48 addi r3,r31,72 <== NOT EXECUTED ffc09b4c: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc09b50: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc09b54: 48 00 02 d9 bl ffc09e2c <== NOT EXECUTED fildes, 0); if (r_chain == NULL) ffc09b58: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc09b5c: 41 82 00 38 beq- ffc09b94 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_ALLDONE; } pthread_mutex_lock (&r_chain->mutex); ffc09b60: 3b be 00 1c addi r29,r30,28 <== NOT EXECUTED ffc09b64: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09b68: 48 00 14 e1 bl ffc0b048 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc09b6c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09b70: 48 00 38 51 bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc09b74: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09b78: 48 00 07 21 bl ffc0a298 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); ffc09b7c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09b80: 48 00 15 95 bl ffc0b114 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); ffc09b84: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09b88: 48 00 15 8d bl ffc0b114 <== NOT EXECUTED return AIO_CANCELED; ffc09b8c: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc09b90: 4b ff ff 00 b ffc09a90 <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) ffc09b94: 81 3f 00 54 lwz r9,84(r31) <== NOT EXECUTED ffc09b98: 38 1f 00 58 addi r0,r31,88 <== NOT EXECUTED ffc09b9c: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc09ba0: 41 9e 00 54 beq- cr7,ffc09bf4 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, ffc09ba4: 38 7f 00 54 addi r3,r31,84 <== NOT EXECUTED ffc09ba8: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc09bac: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc09bb0: 48 00 02 7d bl ffc09e2c <== NOT EXECUTED fildes, 0); if (r_chain == NULL) { ffc09bb4: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc09bb8: 41 82 00 3c beq- ffc09bf4 <== NOT EXECUTED return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); ffc09bbc: 3b be 00 1c addi r29,r30,28 <== NOT EXECUTED ffc09bc0: 48 00 38 01 bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED pthread_mutex_unlock(&aio_request_queue.mutex); return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc09bc4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09bc8: 48 00 06 d1 bl ffc0a298 <== NOT EXECUTED pthread_mutex_destroy (&r_chain->mutex); ffc09bcc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09bd0: 48 00 11 25 bl ffc0acf4 <== NOT EXECUTED pthread_cond_destroy (&r_chain->mutex); ffc09bd4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09bd8: 48 00 0c 31 bl ffc0a808 <== NOT EXECUTED free (r_chain); ffc09bdc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09be0: 4b ff bf 41 bl ffc05b20 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); ffc09be4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09be8: 48 00 15 2d bl ffc0b114 <== NOT EXECUTED return AIO_CANCELED; ffc09bec: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc09bf0: 4b ff fe a0 b ffc09a90 <== NOT EXECUTED } pthread_mutex_unlock (&aio_request_queue.mutex); ffc09bf4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09bf8: 48 00 15 1d bl ffc0b114 <== NOT EXECUTED return AIO_ALLDONE; ffc09bfc: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc09c00: 4b ff fe 90 b ffc09a90 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); if (aiocbp == NULL) { if (fcntl (fildes, F_GETFL) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); ffc09c04: 7f e3 fb 78 mr r3,r31 ffc09c08: 48 00 15 0d bl ffc0b114 rtems_set_errno_and_return_minus_one (EBADF); ffc09c0c: 3b c0 ff ff li r30,-1 ffc09c10: 48 00 d1 c9 bl ffc16dd8 <__errno> ffc09c14: 38 00 00 09 li r0,9 ffc09c18: 90 03 00 00 stw r0,0(r3) ffc09c1c: 4b ff fe 74 b ffc09a90 =============================================================================== ffc09c28 : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) ffc09c28: 2f 83 20 00 cmpwi cr7,r3,8192 int aio_fsync( int op, struct aiocb *aiocbp ) { ffc09c2c: 94 21 ff f0 stwu r1,-16(r1) ffc09c30: 7c 08 02 a6 mflr r0 ffc09c34: 93 e1 00 0c stw r31,12(r1) ffc09c38: 7c 9f 23 78 mr r31,r4 ffc09c3c: 90 01 00 14 stw r0,20(r1) ffc09c40: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; if (op != O_SYNC) ffc09c44: 40 9e 00 94 bne- cr7,ffc09cd8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc09c48: 80 64 00 00 lwz r3,0(r4) ffc09c4c: 38 80 00 03 li r4,3 ffc09c50: 4c c6 31 82 crclr 4*cr1+eq ffc09c54: 48 00 8c 61 bl ffc128b4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc09c58: 54 63 07 be clrlwi r3,r3,30 ffc09c5c: 38 63 ff ff addi r3,r3,-1 ffc09c60: 2b 83 00 01 cmplwi cr7,r3,1 ffc09c64: 41 9d 00 40 bgt- cr7,ffc09ca4 <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc09c68: 38 60 00 18 li r3,24 <== NOT EXECUTED ffc09c6c: 4b ff c6 65 bl ffc062d0 <== NOT EXECUTED if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc09c70: 3b c0 00 0b li r30,11 <== NOT EXECUTED mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc09c74: 7c 69 1b 79 mr. r9,r3 <== NOT EXECUTED ffc09c78: 41 82 00 30 beq- ffc09ca8 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc09c7c: 38 00 00 03 li r0,3 <== NOT EXECUTED req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc09c80: 93 e9 00 14 stw r31,20(r9) <== NOT EXECUTED req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc09c84: 90 1f 00 30 stw r0,48(r31) <== NOT EXECUTED return rtems_aio_enqueue (req); ffc09c88: 48 00 07 35 bl ffc0a3bc <== NOT EXECUTED } ffc09c8c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc09c90: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc09c94: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc09c98: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc09c9c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc09ca0: 4e 80 00 20 blr <== NOT EXECUTED if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc09ca4: 3b c0 00 09 li r30,9 ffc09ca8: 38 00 ff ff li r0,-1 ffc09cac: 93 df 00 34 stw r30,52(r31) ffc09cb0: 90 1f 00 38 stw r0,56(r31) ffc09cb4: 48 00 d1 25 bl ffc16dd8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } ffc09cb8: 80 01 00 14 lwz r0,20(r1) if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc09cbc: 93 c3 00 00 stw r30,0(r3) ffc09cc0: 38 60 ff ff li r3,-1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } ffc09cc4: 7c 08 03 a6 mtlr r0 ffc09cc8: 83 c1 00 08 lwz r30,8(r1) ffc09ccc: 83 e1 00 0c lwz r31,12(r1) ffc09cd0: 38 21 00 10 addi r1,r1,16 ffc09cd4: 4e 80 00 20 blr { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc09cd8: 3b c0 00 16 li r30,22 ffc09cdc: 4b ff ff cc b ffc09ca8 =============================================================================== ffc0a600 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a600: 94 21 ff f0 stwu r1,-16(r1) ffc0a604: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a608: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a60c: 90 01 00 14 stw r0,20(r1) ffc0a610: 93 e1 00 0c stw r31,12(r1) ffc0a614: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a618: 80 63 00 00 lwz r3,0(r3) * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a61c: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a620: 4c c6 31 82 crclr 4*cr1+eq ffc0a624: 48 00 82 91 bl ffc128b4 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a628: 70 63 00 03 andi. r3,r3,3 ffc0a62c: 41 82 00 10 beq- ffc0a63c <== NEVER TAKEN ffc0a630: 2f 83 00 02 cmpwi cr7,r3,2 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc0a634: 3b c0 00 09 li r30,9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a638: 40 9e 00 5c bne- cr7,ffc0a694 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc0a63c: 80 1f 00 18 lwz r0,24(r31) ffc0a640: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a644: 40 9e 00 4c bne- cr7,ffc0a690 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) ffc0a648: 80 1f 00 08 lwz r0,8(r31) ffc0a64c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a650: 41 9c 00 40 blt- cr7,ffc0a690 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc0a654: 38 60 00 18 li r3,24 ffc0a658: 4b ff bc 79 bl ffc062d0 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a65c: 3b c0 00 0b li r30,11 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc0a660: 7c 69 1b 79 mr. r9,r3 ffc0a664: 41 82 00 30 beq- ffc0a694 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; ffc0a668: 38 00 00 01 li r0,1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc0a66c: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_READ; ffc0a670: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc0a674: 4b ff fd 49 bl ffc0a3bc } ffc0a678: 80 01 00 14 lwz r0,20(r1) ffc0a67c: 83 c1 00 08 lwz r30,8(r1) ffc0a680: 7c 08 03 a6 mtlr r0 ffc0a684: 83 e1 00 0c lwz r31,12(r1) ffc0a688: 38 21 00 10 addi r1,r1,16 ffc0a68c: 4e 80 00 20 blr mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc0a690: 3b c0 00 16 li r30,22 ffc0a694: 38 00 ff ff li r0,-1 ffc0a698: 93 df 00 34 stw r30,52(r31) ffc0a69c: 90 1f 00 38 stw r0,56(r31) ffc0a6a0: 48 00 c7 39 bl ffc16dd8 <__errno> ffc0a6a4: 93 c3 00 00 stw r30,0(r3) ffc0a6a8: 38 60 ff ff li r3,-1 ffc0a6ac: 4b ff ff cc b ffc0a678 =============================================================================== ffc0a6b8 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a6b8: 94 21 ff f0 stwu r1,-16(r1) ffc0a6bc: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a6c0: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a6c4: 90 01 00 14 stw r0,20(r1) ffc0a6c8: 93 e1 00 0c stw r31,12(r1) ffc0a6cc: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a6d0: 80 63 00 00 lwz r3,0(r3) * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a6d4: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc0a6d8: 3b c0 00 09 li r30,9 aio_write (struct aiocb *aiocbp) { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a6dc: 4c c6 31 82 crclr 4*cr1+eq ffc0a6e0: 48 00 81 d5 bl ffc128b4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a6e4: 54 63 07 be clrlwi r3,r3,30 ffc0a6e8: 38 63 ff ff addi r3,r3,-1 ffc0a6ec: 2b 83 00 01 cmplwi cr7,r3,1 ffc0a6f0: 41 9d 00 5c bgt- cr7,ffc0a74c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc0a6f4: 80 1f 00 18 lwz r0,24(r31) ffc0a6f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a6fc: 40 9e 00 4c bne- cr7,ffc0a748 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) ffc0a700: 80 1f 00 08 lwz r0,8(r31) ffc0a704: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a708: 41 9c 00 40 blt- cr7,ffc0a748 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc0a70c: 38 60 00 18 li r3,24 ffc0a710: 4b ff bb c1 bl ffc062d0 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a714: 3b c0 00 0b li r30,11 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc0a718: 7c 69 1b 79 mr. r9,r3 ffc0a71c: 41 82 00 30 beq- ffc0a74c <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc0a720: 38 00 00 02 li r0,2 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc0a724: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc0a728: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc0a72c: 4b ff fc 91 bl ffc0a3bc } ffc0a730: 80 01 00 14 lwz r0,20(r1) ffc0a734: 83 c1 00 08 lwz r30,8(r1) ffc0a738: 7c 08 03 a6 mtlr r0 ffc0a73c: 83 e1 00 0c lwz r31,12(r1) ffc0a740: 38 21 00 10 addi r1,r1,16 ffc0a744: 4e 80 00 20 blr mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc0a748: 3b c0 00 16 li r30,22 ffc0a74c: 38 00 ff ff li r0,-1 ffc0a750: 93 df 00 34 stw r30,52(r31) ffc0a754: 90 1f 00 38 stw r0,56(r31) ffc0a758: 48 00 c6 81 bl ffc16dd8 <__errno> ffc0a75c: 93 c3 00 00 stw r30,0(r3) ffc0a760: 38 60 ff ff li r3,-1 ffc0a764: 4b ff ff cc b ffc0a730 =============================================================================== ffc08d70 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { if ( !tp ) ffc08d70: 2c 04 00 00 cmpwi r4,0 int clock_gettime( clockid_t clock_id, struct timespec *tp ) { ffc08d74: 94 21 ff f8 stwu r1,-8(r1) ffc08d78: 7c 08 02 a6 mflr r0 ffc08d7c: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc08d80: 41 82 00 24 beq- ffc08da4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc08d84: 2f 83 00 01 cmpwi cr7,r3,1 ffc08d88: 41 9e 00 78 beq- cr7,ffc08e00 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { ffc08d8c: 2f 83 00 04 cmpwi cr7,r3,4 ffc08d90: 41 9e 00 54 beq- cr7,ffc08de4 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { ffc08d94: 2f 83 00 02 cmpwi cr7,r3,2 ffc08d98: 41 9e 00 4c beq- cr7,ffc08de4 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc08d9c: 2f 83 00 03 cmpwi cr7,r3,3 ffc08da0: 41 9e 00 24 beq- cr7,ffc08dc4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); ffc08da4: 48 00 c0 65 bl ffc14e08 <__errno> ffc08da8: 38 00 00 16 li r0,22 ffc08dac: 90 03 00 00 stw r0,0(r3) ffc08db0: 38 60 ff ff li r3,-1 return 0; } ffc08db4: 80 01 00 0c lwz r0,12(r1) ffc08db8: 38 21 00 08 addi r1,r1,8 ffc08dbc: 7c 08 03 a6 mtlr r0 ffc08dc0: 4e 80 00 20 blr } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc08dc4: 48 00 c0 45 bl ffc14e08 <__errno> ffc08dc8: 38 00 00 58 li r0,88 ffc08dcc: 90 03 00 00 stw r0,0(r3) ffc08dd0: 38 60 ff ff li r3,-1 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08dd4: 80 01 00 0c lwz r0,12(r1) ffc08dd8: 38 21 00 08 addi r1,r1,8 ffc08ddc: 7c 08 03 a6 mtlr r0 ffc08de0: 4e 80 00 20 blr } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); ffc08de4: 7c 83 23 78 mr r3,r4 ffc08de8: 48 00 2a 05 bl ffc0b7ec <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08dec: 80 01 00 0c lwz r0,12(r1) #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); return 0; ffc08df0: 38 60 00 00 li r3,0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08df4: 7c 08 03 a6 mtlr r0 ffc08df8: 38 21 00 08 addi r1,r1,8 ffc08dfc: 4e 80 00 20 blr { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); ffc08e00: 7c 83 23 78 mr r3,r4 ffc08e04: 48 00 29 45 bl ffc0b748 <_TOD_Get> return 0; ffc08e08: 38 60 00 00 li r3,0 ffc08e0c: 4b ff ff a8 b ffc08db4 =============================================================================== ffc08e10 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { if ( !tp ) ffc08e10: 2c 04 00 00 cmpwi r4,0 int clock_settime( clockid_t clock_id, const struct timespec *tp ) { ffc08e14: 94 21 ff f8 stwu r1,-8(r1) ffc08e18: 7c 08 02 a6 mflr r0 ffc08e1c: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc08e20: 41 82 00 1c beq- ffc08e3c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc08e24: 2f 83 00 01 cmpwi cr7,r3,1 ffc08e28: 41 9e 00 34 beq- cr7,ffc08e5c _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) ffc08e2c: 2f 83 00 02 cmpwi cr7,r3,2 ffc08e30: 41 9e 00 70 beq- cr7,ffc08ea0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc08e34: 2f 83 00 03 cmpwi cr7,r3,3 ffc08e38: 41 9e 00 68 beq- cr7,ffc08ea0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc08e3c: 48 00 bf cd bl ffc14e08 <__errno> ffc08e40: 38 00 00 16 li r0,22 ffc08e44: 90 03 00 00 stw r0,0(r3) ffc08e48: 38 60 ff ff li r3,-1 return 0; } ffc08e4c: 80 01 00 0c lwz r0,12(r1) ffc08e50: 38 21 00 08 addi r1,r1,8 ffc08e54: 7c 08 03 a6 mtlr r0 ffc08e58: 4e 80 00 20 blr { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) ffc08e5c: 81 24 00 00 lwz r9,0(r4) ffc08e60: 3c 00 21 da lis r0,8666 ffc08e64: 60 00 e4 ff ori r0,r0,58623 ffc08e68: 7f 89 00 40 cmplw cr7,r9,r0 ffc08e6c: 40 bd ff d0 ble- cr7,ffc08e3c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08e70: 3d 20 00 00 lis r9,0 ffc08e74: 81 69 27 fc lwz r11,10236(r9) ffc08e78: 38 0b 00 01 addi r0,r11,1 ffc08e7c: 90 09 27 fc stw r0,10236(r9) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); ffc08e80: 7c 83 23 78 mr r3,r4 ffc08e84: 48 00 29 e1 bl ffc0b864 <_TOD_Set> _Thread_Enable_dispatch(); ffc08e88: 48 00 45 55 bl ffc0d3dc <_Thread_Enable_dispatch> #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08e8c: 80 01 00 0c lwz r0,12(r1) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; ffc08e90: 38 60 00 00 li r3,0 } ffc08e94: 7c 08 03 a6 mtlr r0 ffc08e98: 38 21 00 08 addi r1,r1,8 ffc08e9c: 4e 80 00 20 blr else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc08ea0: 48 00 bf 69 bl ffc14e08 <__errno> ffc08ea4: 38 00 00 58 li r0,88 ffc08ea8: 90 03 00 00 stw r0,0(r3) ffc08eac: 38 60 ff ff li r3,-1 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08eb0: 80 01 00 0c lwz r0,12(r1) ffc08eb4: 38 21 00 08 addi r1,r1,8 ffc08eb8: 7c 08 03 a6 mtlr r0 ffc08ebc: 4e 80 00 20 blr =============================================================================== ffc294b4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { ffc294b4: 94 21 ff d0 stwu r1,-48(r1) ffc294b8: 7c 08 02 a6 mflr r0 ffc294bc: 93 61 00 1c stw r27,28(r1) ffc294c0: 7c bb 2b 78 mr r27,r5 ffc294c4: 93 81 00 20 stw r28,32(r1) ffc294c8: 7c 9c 23 78 mr r28,r4 ffc294cc: 93 e1 00 2c stw r31,44(r1) ffc294d0: 7c 7f 1b 78 mr r31,r3 ffc294d4: 90 01 00 34 stw r0,52(r1) ffc294d8: 93 41 00 18 stw r26,24(r1) ffc294dc: 93 a1 00 24 stw r29,36(r1) ffc294e0: 93 c1 00 28 stw r30,40(r1) POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) ffc294e4: 4b ff fb b9 bl ffc2909c ffc294e8: 7f 83 f8 00 cmpw cr7,r3,r31 ffc294ec: 40 9e 02 9c bne- cr7,ffc29788 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) ffc294f0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc294f4: 41 9e 02 a8 beq- cr7,ffc2979c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc294f8: 3b fc ff ff addi r31,r28,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc294fc: 2b 9f 00 1f cmplwi cr7,r31,31 ffc29500: 41 9d 02 9c bgt- cr7,ffc2979c rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc29504: 1f dc 00 0c mulli r30,r28,12 ffc29508: 3f a0 00 00 lis r29,0 ffc2950c: 3b bd 32 c0 addi r29,r29,12992 ffc29510: 7d 3d f2 14 add r9,r29,r30 ffc29514: 80 09 00 08 lwz r0,8(r9) return 0; ffc29518: 38 60 00 00 li r3,0 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc2951c: 2f 80 00 01 cmpwi cr7,r0,1 ffc29520: 41 9e 01 ac beq- cr7,ffc296cc /* * 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 ) ) ffc29524: 2f 9c 00 08 cmpwi cr7,r28,8 ffc29528: 41 9e 01 cc beq- cr7,ffc296f4 ffc2952c: 2f 9c 00 04 cmpwi cr7,r28,4 ffc29530: 41 9e 01 c4 beq- cr7,ffc296f4 ffc29534: 2f 9c 00 0b cmpwi cr7,r28,11 ffc29538: 41 9e 01 bc beq- cr7,ffc296f4 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { ffc2953c: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; ffc29540: 93 81 00 08 stw r28,8(r1) static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); ffc29544: 38 00 00 01 li r0,1 ffc29548: 7c 1f f8 30 slw r31,r0,r31 siginfo->si_code = SI_USER; ffc2954c: 90 01 00 0c stw r0,12(r1) if ( !value ) { ffc29550: 41 9e 02 1c beq- cr7,ffc2976c siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; ffc29554: 80 1b 00 00 lwz r0,0(r27) ffc29558: 90 01 00 10 stw r0,16(r1) ffc2955c: 3d 20 00 00 lis r9,0 ffc29560: 81 69 27 f0 lwz r11,10224(r9) ffc29564: 38 0b 00 01 addi r0,r11,1 ffc29568: 90 09 27 f0 stw r0,10224(r9) /* * 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; ffc2956c: 3d 20 00 00 lis r9,0 ffc29570: 80 69 32 70 lwz r3,12912(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { ffc29574: 81 23 01 34 lwz r9,308(r3) ffc29578: 80 09 00 d0 lwz r0,208(r9) ffc2957c: 7f e6 00 79 andc. r6,r31,r0 ffc29580: 40 82 01 1c bne- ffc2969c } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc29584: 3d 20 00 00 lis r9,0 ffc29588: 39 49 34 4c addi r10,r9,13388 ffc2958c: 81 29 34 4c lwz r9,13388(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc29590: 39 4a 00 04 addi r10,r10,4 ffc29594: 7f 89 50 00 cmpw cr7,r9,r10 ffc29598: 41 9e 00 54 beq- cr7,ffc295ec #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc2959c: 80 09 00 30 lwz r0,48(r9) for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; ffc295a0: 7d 23 4b 78 mr r3,r9 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc295a4: 81 69 01 34 lwz r11,308(r9) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc295a8: 7f e8 00 39 and. r8,r31,r0 ffc295ac: 40 82 00 f0 bne- ffc2969c /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc295b0: 80 0b 00 d0 lwz r0,208(r11) ffc295b4: 7f eb 00 79 andc. r11,r31,r0 ffc295b8: 41 a2 00 24 beq+ ffc295dc ffc295bc: 48 00 00 e0 b ffc2969c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc295c0: 80 09 00 30 lwz r0,48(r9) <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_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 ]; ffc295c4: 81 69 01 34 lwz r11,308(r9) <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc295c8: 7f fa 00 39 and. r26,r31,r0 <== NOT EXECUTED ffc295cc: 40 82 00 d0 bne- ffc2969c <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc295d0: 80 0b 00 d0 lwz r0,208(r11) <== NOT EXECUTED ffc295d4: 7f fb 00 79 andc. r27,r31,r0 <== NOT EXECUTED ffc295d8: 40 82 00 c4 bne- ffc2969c <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { ffc295dc: 81 29 00 00 lwz r9,0(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc295e0: 7f 89 50 00 cmpw cr7,r9,r10 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; ffc295e4: 7d 23 4b 78 mr r3,r9 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc295e8: 40 9e ff d8 bne+ cr7,ffc295c0 <== NEVER TAKEN * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; ffc295ec: 3d 20 00 00 lis r9,0 ffc295f0: 88 e9 27 2c lbz r7,10028(r9) ffc295f4: 3c a0 00 00 lis r5,0 ffc295f8: 38 a5 2d 64 addi r5,r5,11620 ffc295fc: 38 e7 00 01 addi r7,r7,1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( ffc29600: 38 85 00 08 addi r4,r5,8 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; ffc29604: 38 60 00 00 li r3,0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) ffc29608: 85 25 00 04 lwzu r9,4(r5) ffc2960c: 2f 89 00 00 cmpwi cr7,r9,0 ffc29610: 41 9e 00 7c beq- cr7,ffc2968c <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; ffc29614: 81 29 00 04 lwz r9,4(r9) */ if ( !the_info ) continue; #endif maximum = the_info->maximum; ffc29618: a1 09 00 10 lhz r8,16(r9) object_table = the_info->local_table; ffc2961c: 81 49 00 1c lwz r10,28(r9) for ( index = 1 ; index <= maximum ; index++ ) { ffc29620: 2f 88 00 00 cmpwi cr7,r8,0 ffc29624: 41 9e 00 68 beq- cr7,ffc2968c ffc29628: 39 60 00 01 li r11,1 the_thread = (Thread_Control *) object_table[ index ]; ffc2962c: 85 2a 00 04 lwzu r9,4(r10) if ( !the_thread ) ffc29630: 2f 89 00 00 cmpwi cr7,r9,0 ffc29634: 41 9e 00 4c beq- cr7,ffc29680 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) ffc29638: 80 09 00 14 lwz r0,20(r9) ffc2963c: 7f 80 38 40 cmplw cr7,r0,r7 ffc29640: 41 9d 00 40 bgt- cr7,ffc29680 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) ffc29644: 80 c9 01 34 lwz r6,308(r9) ffc29648: 80 c6 00 d0 lwz r6,208(r6) ffc2964c: 7f fa 30 79 andc. r26,r31,r6 ffc29650: 41 82 00 30 beq- ffc29680 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { ffc29654: 41 9c 00 24 blt- cr7,ffc29678 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { ffc29658: 2f 83 00 00 cmpwi cr7,r3,0 ffc2965c: 41 9e 00 24 beq- cr7,ffc29680 <== NEVER TAKEN ffc29660: 80 c3 00 10 lwz r6,16(r3) ffc29664: 2f 86 00 00 cmpwi cr7,r6,0 ffc29668: 41 9e 00 18 beq- cr7,ffc29680 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc2966c: 83 69 00 10 lwz r27,16(r9) ffc29670: 2f 9b 00 00 cmpwi cr7,r27,0 ffc29674: 40 9e 01 00 bne- cr7,ffc29774 ffc29678: 7c 07 03 78 mr r7,r0 ffc2967c: 7d 23 4b 78 mr r3,r9 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc29680: 39 6b 00 01 addi r11,r11,1 ffc29684: 7f 88 58 40 cmplw cr7,r8,r11 ffc29688: 40 9c ff a4 bge+ cr7,ffc2962c * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { ffc2968c: 7f 85 20 00 cmpw cr7,r5,r4 ffc29690: 40 be ff 78 bne- cr7,ffc29608 } } } } if ( interested ) { ffc29694: 2f 83 00 00 cmpwi cr7,r3,0 ffc29698: 41 9e 00 18 beq- cr7,ffc296b0 /* * 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 ) ) { ffc2969c: 7f 84 e3 78 mr r4,r28 ffc296a0: 38 a1 00 08 addi r5,r1,8 ffc296a4: 48 00 01 4d bl ffc297f0 <_POSIX_signals_Unblock_thread> ffc296a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc296ac: 40 9e 00 18 bne- cr7,ffc296c4 /* * 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 ); ffc296b0: 7f e3 fb 78 mr r3,r31 ffc296b4: 48 00 01 15 bl ffc297c8 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { ffc296b8: 7c 1d f0 2e lwzx r0,r29,r30 ffc296bc: 2f 80 00 02 cmpwi cr7,r0,2 ffc296c0: 41 9e 00 68 beq- cr7,ffc29728 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); ffc296c4: 4b fe 98 61 bl ffc12f24 <_Thread_Enable_dispatch> return 0; ffc296c8: 38 60 00 00 li r3,0 } ffc296cc: 80 01 00 34 lwz r0,52(r1) ffc296d0: 83 41 00 18 lwz r26,24(r1) ffc296d4: 7c 08 03 a6 mtlr r0 ffc296d8: 83 61 00 1c lwz r27,28(r1) ffc296dc: 83 81 00 20 lwz r28,32(r1) ffc296e0: 83 a1 00 24 lwz r29,36(r1) ffc296e4: 83 c1 00 28 lwz r30,40(r1) ffc296e8: 83 e1 00 2c lwz r31,44(r1) ffc296ec: 38 21 00 30 addi r1,r1,48 ffc296f0: 4e 80 00 20 blr * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); ffc296f4: 48 00 03 75 bl ffc29a68 ffc296f8: 7f 84 e3 78 mr r4,r28 ffc296fc: 48 00 02 61 bl ffc2995c } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc29700: 80 01 00 34 lwz r0,52(r1) ffc29704: 83 41 00 18 lwz r26,24(r1) ffc29708: 7c 08 03 a6 mtlr r0 ffc2970c: 83 61 00 1c lwz r27,28(r1) ffc29710: 83 81 00 20 lwz r28,32(r1) ffc29714: 83 a1 00 24 lwz r29,36(r1) ffc29718: 83 c1 00 28 lwz r30,40(r1) ffc2971c: 83 e1 00 2c lwz r31,44(r1) ffc29720: 38 21 00 30 addi r1,r1,48 ffc29724: 4e 80 00 20 blr _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); ffc29728: 3c 60 00 00 lis r3,0 ffc2972c: 38 63 34 40 addi r3,r3,13376 ffc29730: 4b fe 76 15 bl ffc10d44 <_Chain_Get> if ( !psiginfo ) { ffc29734: 7c 69 1b 79 mr. r9,r3 ffc29738: 41 82 00 78 beq- ffc297b0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc2973c: 80 01 00 08 lwz r0,8(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc29740: 3c 60 00 00 lis r3,0 ffc29744: 38 63 34 b4 addi r3,r3,13492 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc29748: 90 09 00 08 stw r0,8(r9) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc2974c: 7c 63 f2 14 add r3,r3,r30 ffc29750: 7d 24 4b 78 mr r4,r9 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc29754: 80 01 00 0c lwz r0,12(r1) ffc29758: 90 09 00 0c stw r0,12(r9) ffc2975c: 80 01 00 10 lwz r0,16(r1) ffc29760: 90 09 00 10 stw r0,16(r9) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc29764: 4b fe 75 89 bl ffc10cec <_Chain_Append> ffc29768: 4b ff ff 5c b ffc296c4 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; ffc2976c: 93 61 00 10 stw r27,16(r1) ffc29770: 4b ff fd ec b ffc2955c continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc29774: 74 da 10 00 andis. r26,r6,4096 ffc29778: 40 a2 ff 08 bne- ffc29680 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { ffc2977c: 77 66 10 00 andis. r6,r27,4096 ffc29780: 41 a2 ff 00 beq- ffc29680 ffc29784: 4b ff fe f4 b ffc29678 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); ffc29788: 4b ff 10 bd bl ffc1a844 <__errno> ffc2978c: 38 00 00 03 li r0,3 ffc29790: 90 03 00 00 stw r0,0(r3) ffc29794: 38 60 ff ff li r3,-1 ffc29798: 4b ff ff 34 b ffc296cc */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc2979c: 4b ff 10 a9 bl ffc1a844 <__errno> ffc297a0: 38 00 00 16 li r0,22 ffc297a4: 90 03 00 00 stw r0,0(r3) ffc297a8: 38 60 ff ff li r3,-1 ffc297ac: 4b ff ff 20 b ffc296cc if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); ffc297b0: 4b fe 97 75 bl ffc12f24 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc297b4: 4b ff 10 91 bl ffc1a844 <__errno> ffc297b8: 38 00 00 0b li r0,11 ffc297bc: 90 03 00 00 stw r0,0(r3) ffc297c0: 38 60 ff ff li r3,-1 ffc297c4: 4b ff ff 08 b ffc296cc =============================================================================== ffc0ea10 : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ea10: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { ffc0ea14: 94 21 ff b0 stwu r1,-80(r1) ffc0ea18: 7c 08 02 a6 mflr r0 ffc0ea1c: 81 69 2a 14 lwz r11,10772(r9) ffc0ea20: 7d 80 00 26 mfcr r12 ffc0ea24: 93 81 00 40 stw r28,64(r1) ffc0ea28: 7c 9c 23 78 mr r28,r4 ffc0ea2c: 39 6b 00 01 addi r11,r11,1 ffc0ea30: 93 a1 00 44 stw r29,68(r1) ffc0ea34: 7c 7d 1b 78 mr r29,r3 ffc0ea38: 90 01 00 54 stw r0,84(r1) ffc0ea3c: 93 41 00 38 stw r26,56(r1) ffc0ea40: 93 61 00 3c stw r27,60(r1) ffc0ea44: 93 c1 00 48 stw r30,72(r1) ffc0ea48: 93 e1 00 4c stw r31,76(r1) ffc0ea4c: 91 81 00 34 stw r12,52(r1) ffc0ea50: 90 a1 00 28 stw r5,40(r1) ffc0ea54: 90 c1 00 2c stw r6,44(r1) ffc0ea58: 91 69 2a 14 stw r11,10772(r9) POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0ea5c: 54 80 bf fe rlwinm r0,r4,23,31,31 ffc0ea60: 2e 00 00 00 cmpwi cr4,r0,0 ffc0ea64: 40 92 01 10 bne- cr4,ffc0eb74 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) _Objects_Allocate( &_POSIX_Message_queue_Information_fds ); ffc0ea68: 3f c0 00 00 lis r30,0 ffc0ea6c: 3b de 35 f8 addi r30,r30,13816 ffc0ea70: 7f c3 f3 78 mr r3,r30 ffc0ea74: 48 00 3e 71 bl ffc128e4 <_Objects_Allocate> /* struct mq_attr attr */ ) { va_list arg; mode_t mode; struct mq_attr *attr = NULL; ffc0ea78: 3b 40 00 00 li r26,0 attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc0ea7c: 7c 7f 1b 79 mr. r31,r3 ffc0ea80: 41 82 01 28 beq- ffc0eba8 <== NEVER TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; ffc0ea84: 93 9f 00 14 stw r28,20(r31) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); ffc0ea88: 7f a3 eb 78 mr r3,r29 ffc0ea8c: 38 81 00 08 addi r4,r1,8 ffc0ea90: 48 00 90 d1 bl ffc17b60 <_POSIX_Message_queue_Name_to_id> * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { ffc0ea94: 7c 7b 1b 79 mr. r27,r3 ffc0ea98: 40 82 00 88 bne- ffc0eb20 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc0ea9c: 73 9c 0a 00 andi. r28,r28,2560 ffc0eaa0: 2f 9c 0a 00 cmpwi cr7,r28,2560 ffc0eaa4: 41 9e 01 48 beq- cr7,ffc0ebec Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) _Objects_Get( &_POSIX_Message_queue_Information, id, location ); ffc0eaa8: 80 81 00 08 lwz r4,8(r1) ffc0eaac: 3c 60 00 00 lis r3,0 ffc0eab0: 38 a1 00 10 addi r5,r1,16 ffc0eab4: 38 63 34 6c addi r3,r3,13420 ffc0eab8: 48 00 44 49 bl ffc12f00 <_Objects_Get> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( ffc0eabc: a0 1f 00 0a lhz r0,10(r31) /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; ffc0eac0: 81 63 00 18 lwz r11,24(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0eac4: 81 3e 00 1c lwz r9,28(r30) ffc0eac8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0eacc: 39 6b 00 01 addi r11,r11,1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); ffc0ead0: 90 61 00 0c stw r3,12(r1) the_mq->open_count += 1; ffc0ead4: 91 63 00 18 stw r11,24(r3) the_mq_fd->Queue = the_mq; ffc0ead8: 90 7f 00 10 stw r3,16(r31) ffc0eadc: 7f e9 01 2e stwx r31,r9,r0 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc0eae0: 93 7f 00 0c stw r27,12(r31) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc0eae4: 48 00 53 e1 bl ffc13ec4 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc0eae8: 48 00 53 dd bl ffc13ec4 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; ffc0eaec: 80 7f 00 08 lwz r3,8(r31) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0eaf0: 80 01 00 54 lwz r0,84(r1) ffc0eaf4: 81 81 00 34 lwz r12,52(r1) ffc0eaf8: 7c 08 03 a6 mtlr r0 ffc0eafc: 83 41 00 38 lwz r26,56(r1) ffc0eb00: 83 61 00 3c lwz r27,60(r1) ffc0eb04: 7d 80 81 20 mtcrf 8,r12 ffc0eb08: 83 81 00 40 lwz r28,64(r1) ffc0eb0c: 83 a1 00 44 lwz r29,68(r1) ffc0eb10: 83 c1 00 48 lwz r30,72(r1) ffc0eb14: 83 e1 00 4c lwz r31,76(r1) ffc0eb18: 38 21 00 50 addi r1,r1,80 ffc0eb1c: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0eb20: 2f 9b 00 02 cmpwi cr7,r27,2 ffc0eb24: 41 9e 01 18 beq- cr7,ffc0ec3c RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc0eb28: 7f c3 f3 78 mr r3,r30 ffc0eb2c: 7f e4 fb 78 mr r4,r31 ffc0eb30: 48 00 41 dd bl ffc12d0c <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0eb34: 48 00 53 91 bl ffc13ec4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0eb38: 48 00 d6 15 bl ffc1c14c <__errno> ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0eb3c: 80 01 00 54 lwz r0,84(r1) ffc0eb40: 81 81 00 34 lwz r12,52(r1) ffc0eb44: 7c 08 03 a6 mtlr r0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0eb48: 93 63 00 00 stw r27,0(r3) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0eb4c: 7d 80 81 20 mtcrf 8,r12 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0eb50: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0eb54: 83 41 00 38 lwz r26,56(r1) ffc0eb58: 83 61 00 3c lwz r27,60(r1) ffc0eb5c: 83 81 00 40 lwz r28,64(r1) ffc0eb60: 83 a1 00 44 lwz r29,68(r1) ffc0eb64: 83 c1 00 48 lwz r30,72(r1) ffc0eb68: 83 e1 00 4c lwz r31,76(r1) ffc0eb6c: 38 21 00 50 addi r1,r1,80 ffc0eb70: 4e 80 00 20 blr Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0eb74: 38 01 00 58 addi r0,r1,88 mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); ffc0eb78: 83 41 00 2c lwz r26,44(r1) RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) _Objects_Allocate( &_POSIX_Message_queue_Information_fds ); ffc0eb7c: 3f c0 00 00 lis r30,0 Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0eb80: 90 01 00 18 stw r0,24(r1) ffc0eb84: 3b de 35 f8 addi r30,r30,13816 ffc0eb88: 38 01 00 20 addi r0,r1,32 ffc0eb8c: 90 01 00 1c stw r0,28(r1) ffc0eb90: 7f c3 f3 78 mr r3,r30 mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); ffc0eb94: 38 00 00 04 li r0,4 ffc0eb98: 98 01 00 14 stb r0,20(r1) ffc0eb9c: 48 00 3d 49 bl ffc128e4 <_Objects_Allocate> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc0eba0: 7c 7f 1b 79 mr. r31,r3 ffc0eba4: 40 82 fe e0 bne+ ffc0ea84 _Thread_Enable_dispatch(); ffc0eba8: 48 00 53 1d bl ffc13ec4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); ffc0ebac: 48 00 d5 a1 bl ffc1c14c <__errno> ffc0ebb0: 38 00 00 17 li r0,23 ffc0ebb4: 90 03 00 00 stw r0,0(r3) ffc0ebb8: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0ebbc: 80 01 00 54 lwz r0,84(r1) ffc0ebc0: 81 81 00 34 lwz r12,52(r1) ffc0ebc4: 7c 08 03 a6 mtlr r0 ffc0ebc8: 83 41 00 38 lwz r26,56(r1) ffc0ebcc: 83 61 00 3c lwz r27,60(r1) ffc0ebd0: 7d 80 81 20 mtcrf 8,r12 ffc0ebd4: 83 81 00 40 lwz r28,64(r1) ffc0ebd8: 83 a1 00 44 lwz r29,68(r1) ffc0ebdc: 83 c1 00 48 lwz r30,72(r1) ffc0ebe0: 83 e1 00 4c lwz r31,76(r1) ffc0ebe4: 38 21 00 50 addi r1,r1,80 ffc0ebe8: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc0ebec: 7f c3 f3 78 mr r3,r30 ffc0ebf0: 7f e4 fb 78 mr r4,r31 ffc0ebf4: 48 00 41 19 bl ffc12d0c <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0ebf8: 48 00 52 cd bl ffc13ec4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); ffc0ebfc: 48 00 d5 51 bl ffc1c14c <__errno> ffc0ec00: 38 00 00 11 li r0,17 ffc0ec04: 90 03 00 00 stw r0,0(r3) ffc0ec08: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0ec0c: 80 01 00 54 lwz r0,84(r1) ffc0ec10: 81 81 00 34 lwz r12,52(r1) ffc0ec14: 7c 08 03 a6 mtlr r0 ffc0ec18: 83 41 00 38 lwz r26,56(r1) ffc0ec1c: 83 61 00 3c lwz r27,60(r1) ffc0ec20: 7d 80 81 20 mtcrf 8,r12 ffc0ec24: 83 81 00 40 lwz r28,64(r1) ffc0ec28: 83 a1 00 44 lwz r29,68(r1) ffc0ec2c: 83 c1 00 48 lwz r30,72(r1) ffc0ec30: 83 e1 00 4c lwz r31,76(r1) ffc0ec34: 38 21 00 50 addi r1,r1,80 ffc0ec38: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0ec3c: 41 92 fe ec beq+ cr4,ffc0eb28 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( ffc0ec40: 7f a3 eb 78 mr r3,r29 ffc0ec44: 38 80 00 01 li r4,1 ffc0ec48: 7f 45 d3 78 mr r5,r26 ffc0ec4c: 38 c1 00 0c addi r6,r1,12 ffc0ec50: 48 00 8d 49 bl ffc17998 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { ffc0ec54: 2f 83 ff ff cmpwi cr7,r3,-1 ffc0ec58: 41 9e 00 30 beq- cr7,ffc0ec88 Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( ffc0ec5c: a0 1f 00 0a lhz r0,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0ec60: 81 3e 00 1c lwz r9,28(r30) _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; ffc0ec64: 81 61 00 0c lwz r11,12(r1) ffc0ec68: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ec6c: 91 7f 00 10 stw r11,16(r31) ffc0ec70: 7f e9 01 2e stwx r31,r9,r0 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc0ec74: 38 00 00 00 li r0,0 ffc0ec78: 90 1f 00 0c stw r0,12(r31) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc0ec7c: 48 00 52 49 bl ffc13ec4 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; ffc0ec80: 80 7f 00 08 lwz r3,8(r31) ffc0ec84: 4b ff fe 6c b ffc0eaf0 ffc0ec88: 7f c3 f3 78 mr r3,r30 ffc0ec8c: 7f e4 fb 78 mr r4,r31 ffc0ec90: 48 00 40 7d bl ffc12d0c <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0ec94: 48 00 52 31 bl ffc13ec4 <_Thread_Enable_dispatch> return (mqd_t) -1; ffc0ec98: 38 60 ff ff li r3,-1 ffc0ec9c: 4b ff fe 54 b ffc0eaf0 =============================================================================== ffc0ea3c : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) ffc0ea3c: 7c 69 1b 79 mr. r9,r3 return EINVAL; ffc0ea40: 38 60 00 16 li r3,22 int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) ffc0ea44: 4d 82 00 20 beqlr ffc0ea48: 80 09 00 00 lwz r0,0(r9) ffc0ea4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ea50: 4d 9e 00 20 beqlr cr7 return EINVAL; switch ( policy ) { ffc0ea54: 2b 84 00 04 cmplwi cr7,r4,4 ffc0ea58: 40 9d 00 0c ble- cr7,ffc0ea64 case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; ffc0ea5c: 38 60 00 86 li r3,134 } } ffc0ea60: 4e 80 00 20 blr ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { ffc0ea64: 38 00 00 01 li r0,1 ffc0ea68: 7c 00 20 30 slw r0,r0,r4 ffc0ea6c: 70 0b 00 17 andi. r11,r0,23 ffc0ea70: 41 a2 ff ec beq- ffc0ea5c <== NEVER TAKEN case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; ffc0ea74: 90 89 00 14 stw r4,20(r9) return 0; ffc0ea78: 38 60 00 00 li r3,0 ffc0ea7c: 4e 80 00 20 blr =============================================================================== ffc09474 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc09474: 94 21 ff d0 stwu r1,-48(r1) ffc09478: 7c 08 02 a6 mflr r0 ffc0947c: 93 e1 00 2c stw r31,44(r1) const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc09480: 7c 7f 1b 79 mr. r31,r3 return EINVAL; ffc09484: 38 60 00 16 li r3,22 int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc09488: 90 01 00 34 stw r0,52(r1) ffc0948c: 93 81 00 20 stw r28,32(r1) ffc09490: 93 a1 00 24 stw r29,36(r1) ffc09494: 93 c1 00 28 stw r30,40(r1) const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc09498: 41 82 00 8c beq- ffc09524 return EINVAL; if ( count == 0 ) ffc0949c: 2f 85 00 00 cmpwi cr7,r5,0 ffc094a0: 41 9e 00 84 beq- cr7,ffc09524 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc094a4: 2f 84 00 00 cmpwi cr7,r4,0 ffc094a8: 41 9e 00 a8 beq- cr7,ffc09550 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc094ac: 80 04 00 00 lwz r0,0(r4) return EINVAL; ffc094b0: 38 60 00 16 li r3,22 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc094b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc094b8: 41 9e 00 6c beq- cr7,ffc09524 return EINVAL; switch ( the_attr->process_shared ) { ffc094bc: 83 c4 00 04 lwz r30,4(r4) ffc094c0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc094c4: 40 9e 00 60 bne- cr7,ffc09524 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc094c8: 3d 20 00 00 lis r9,0 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc094cc: 93 c1 00 08 stw r30,8(r1) ffc094d0: 81 69 27 b8 lwz r11,10168(r9) the_attributes.maximum_count = count; ffc094d4: 90 a1 00 0c stw r5,12(r1) ffc094d8: 38 0b 00 01 addi r0,r11,1 ffc094dc: 90 09 27 b8 stw r0,10168(r9) * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) _Objects_Allocate( &_POSIX_Barrier_Information ); ffc094e0: 3f 80 00 00 lis r28,0 ffc094e4: 3b 9c 2f 6c addi r28,r28,12140 ffc094e8: 7f 83 e3 78 mr r3,r28 ffc094ec: 48 00 2b c1 bl ffc0c0ac <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { ffc094f0: 7c 7d 1b 79 mr. r29,r3 ffc094f4: 41 82 00 50 beq- ffc09544 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc094f8: 38 7d 00 10 addi r3,r29,16 ffc094fc: 38 81 00 08 addi r4,r1,8 ffc09500: 48 00 1f 61 bl ffc0b460 <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc09504: 80 1d 00 08 lwz r0,8(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09508: 81 7c 00 1c lwz r11,28(r28) ffc0950c: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc09510: 7f ab 49 2e stwx r29,r11,r9 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc09514: 93 dd 00 0c stw r30,12(r29) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; ffc09518: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc0951c: 48 00 40 b1 bl ffc0d5cc <_Thread_Enable_dispatch> return 0; ffc09520: 38 60 00 00 li r3,0 } ffc09524: 80 01 00 34 lwz r0,52(r1) ffc09528: 83 81 00 20 lwz r28,32(r1) ffc0952c: 7c 08 03 a6 mtlr r0 ffc09530: 83 a1 00 24 lwz r29,36(r1) ffc09534: 83 c1 00 28 lwz r30,40(r1) ffc09538: 83 e1 00 2c lwz r31,44(r1) ffc0953c: 38 21 00 30 addi r1,r1,48 ffc09540: 4e 80 00 20 blr _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); ffc09544: 48 00 40 89 bl ffc0d5cc <_Thread_Enable_dispatch> return EAGAIN; ffc09548: 38 60 00 0b li r3,11 ffc0954c: 4b ff ff d8 b ffc09524 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); ffc09550: 3b c1 00 10 addi r30,r1,16 ffc09554: 90 a1 00 18 stw r5,24(r1) ffc09558: 7f c3 f3 78 mr r3,r30 ffc0955c: 4b ff fe 09 bl ffc09364 the_attr = &my_attr; ffc09560: 7f c4 f3 78 mr r4,r30 ffc09564: 80 a1 00 18 lwz r5,24(r1) ffc09568: 4b ff ff 44 b ffc094ac =============================================================================== ffc08b0c : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc08b0c: 94 21 ff f0 stwu r1,-16(r1) ffc08b10: 7c 08 02 a6 mflr r0 ffc08b14: 93 c1 00 08 stw r30,8(r1) /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) ffc08b18: 7c 7e 1b 79 mr. r30,r3 void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc08b1c: 93 e1 00 0c stw r31,12(r1) ffc08b20: 7c 9f 23 78 mr r31,r4 ffc08b24: 90 01 00 14 stw r0,20(r1) /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) ffc08b28: 41 82 00 48 beq- ffc08b70 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08b2c: 3d 20 00 00 lis r9,0 ffc08b30: 81 69 27 b0 lwz r11,10160(r9) ffc08b34: 38 0b 00 01 addi r0,r11,1 ffc08b38: 90 09 27 b0 stw r0,10160(r9) return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); ffc08b3c: 38 60 00 10 li r3,16 ffc08b40: 48 00 5b fd bl ffc0e73c <_Workspace_Allocate> if ( handler ) { ffc08b44: 7c 69 1b 79 mr. r9,r3 ffc08b48: 41 82 00 24 beq- ffc08b6c <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc08b4c: 3d 60 00 00 lis r11,0 ffc08b50: 81 6b 30 f0 lwz r11,12528(r11) handler_stack = &thread_support->Cancellation_Handlers; handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); ffc08b54: 7d 24 4b 78 mr r4,r9 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc08b58: 80 6b 01 34 lwz r3,308(r11) handler->routine = routine; ffc08b5c: 93 c9 00 08 stw r30,8(r9) handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); ffc08b60: 38 63 00 e4 addi r3,r3,228 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; handler->routine = routine; handler->arg = arg; ffc08b64: 93 e9 00 0c stw r31,12(r9) _Chain_Append( handler_stack, &handler->Node ); ffc08b68: 48 00 20 91 bl ffc0abf8 <_Chain_Append> } _Thread_Enable_dispatch(); ffc08b6c: 48 00 41 b5 bl ffc0cd20 <_Thread_Enable_dispatch> } ffc08b70: 80 01 00 14 lwz r0,20(r1) ffc08b74: 83 c1 00 08 lwz r30,8(r1) ffc08b78: 7c 08 03 a6 mtlr r0 ffc08b7c: 83 e1 00 0c lwz r31,12(r1) ffc08b80: 38 21 00 10 addi r1,r1,16 ffc08b84: 4e 80 00 20 blr =============================================================================== ffc09e38 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc09e38: 94 21 ff e8 stwu r1,-24(r1) ffc09e3c: 7c 08 02 a6 mflr r0 ffc09e40: 93 81 00 08 stw r28,8(r1) POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc09e44: 7c 9c 23 79 mr. r28,r4 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc09e48: 93 c1 00 10 stw r30,16(r1) ffc09e4c: 7c 7e 1b 78 mr r30,r3 ffc09e50: 90 01 00 1c stw r0,28(r1) ffc09e54: 93 a1 00 0c stw r29,12(r1) ffc09e58: 93 e1 00 14 stw r31,20(r1) POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc09e5c: 41 82 00 d0 beq- ffc09f2c else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) ffc09e60: 80 1c 00 04 lwz r0,4(r28) return EINVAL; ffc09e64: 38 60 00 16 li r3,22 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) ffc09e68: 2f 80 00 01 cmpwi cr7,r0,1 ffc09e6c: 41 9e 00 10 beq- cr7,ffc09e7c <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) ffc09e70: 80 1c 00 00 lwz r0,0(r28) ffc09e74: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e78: 40 9e 00 24 bne- cr7,ffc09e9c *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } ffc09e7c: 80 01 00 1c lwz r0,28(r1) ffc09e80: 83 81 00 08 lwz r28,8(r1) ffc09e84: 7c 08 03 a6 mtlr r0 ffc09e88: 83 a1 00 0c lwz r29,12(r1) ffc09e8c: 83 c1 00 10 lwz r30,16(r1) ffc09e90: 83 e1 00 14 lwz r31,20(r1) ffc09e94: 38 21 00 18 addi r1,r1,24 ffc09e98: 4e 80 00 20 blr rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09e9c: 3d 20 00 00 lis r9,0 ffc09ea0: 81 69 27 c4 lwz r11,10180(r9) ffc09ea4: 38 0b 00 01 addi r0,r11,1 ffc09ea8: 90 09 27 c4 stw r0,10180(r9) RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); ffc09eac: 3f a0 00 00 lis r29,0 ffc09eb0: 3b bd 30 04 addi r29,r29,12292 ffc09eb4: 7f a3 eb 78 mr r3,r29 ffc09eb8: 48 00 33 c1 bl ffc0d278 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { ffc09ebc: 7c 7f 1b 79 mr. r31,r3 ffc09ec0: 41 82 00 78 beq- ffc09f38 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; ffc09ec4: 80 1c 00 04 lwz r0,4(r28) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; ffc09ec8: 3b 80 00 00 li r28,0 ffc09ecc: 93 9f 00 14 stw r28,20(r31) _Thread_queue_Initialize( ffc09ed0: 3c a0 10 00 lis r5,4096 ffc09ed4: 38 7f 00 18 addi r3,r31,24 if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; ffc09ed8: 90 1f 00 10 stw r0,16(r31) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; _Thread_queue_Initialize( ffc09edc: 38 80 00 00 li r4,0 ffc09ee0: 60 a5 08 00 ori r5,r5,2048 ffc09ee4: 38 c0 00 74 li r6,116 ffc09ee8: 48 00 53 2d bl ffc0f214 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc09eec: 80 1f 00 08 lwz r0,8(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09ef0: 81 7d 00 1c lwz r11,28(r29) ffc09ef4: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc09ef8: 7f eb 49 2e stwx r31,r11,r9 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc09efc: 93 9f 00 0c stw r28,12(r31) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; ffc09f00: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc09f04: 48 00 48 95 bl ffc0e798 <_Thread_Enable_dispatch> return 0; } ffc09f08: 80 01 00 1c lwz r0,28(r1) *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; ffc09f0c: 38 60 00 00 li r3,0 } ffc09f10: 83 81 00 08 lwz r28,8(r1) ffc09f14: 7c 08 03 a6 mtlr r0 ffc09f18: 83 a1 00 0c lwz r29,12(r1) ffc09f1c: 83 c1 00 10 lwz r30,16(r1) ffc09f20: 83 e1 00 14 lwz r31,20(r1) ffc09f24: 38 21 00 18 addi r1,r1,24 ffc09f28: 4e 80 00 20 blr { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Condition_variables_Default_attributes; ffc09f2c: 3f 80 00 00 lis r28,0 ffc09f30: 3b 9c 27 10 addi r28,r28,10000 ffc09f34: 4b ff ff 2c b ffc09e60 _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); ffc09f38: 48 00 48 61 bl ffc0e798 <_Thread_Enable_dispatch> return ENOMEM; ffc09f3c: 38 60 00 0c li r3,12 ffc09f40: 4b ff ff 3c b ffc09e7c =============================================================================== ffc090d0 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc090d0: 94 21 ff 80 stwu r1,-128(r1) ffc090d4: 7c 08 02 a6 mflr r0 ffc090d8: 93 61 00 6c stw r27,108(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc090dc: 7c bb 2b 79 mr. r27,r5 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc090e0: 93 81 00 70 stw r28,112(r1) ffc090e4: 7c dc 33 78 mr r28,r6 ffc090e8: 93 a1 00 74 stw r29,116(r1) ffc090ec: 7c 7d 1b 78 mr r29,r3 ffc090f0: 93 c1 00 78 stw r30,120(r1) struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; ffc090f4: 3b c0 00 0e li r30,14 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc090f8: 90 01 00 84 stw r0,132(r1) ffc090fc: 92 a1 00 54 stw r21,84(r1) ffc09100: 92 c1 00 58 stw r22,88(r1) ffc09104: 92 e1 00 5c stw r23,92(r1) ffc09108: 93 01 00 60 stw r24,96(r1) ffc0910c: 93 21 00 64 stw r25,100(r1) ffc09110: 93 41 00 68 stw r26,104(r1) ffc09114: 93 e1 00 7c stw r31,124(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc09118: 41 82 00 58 beq- ffc09170 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; ffc0911c: 2f 84 00 00 cmpwi cr7,r4,0 ffc09120: 7c 9f 23 78 mr r31,r4 ffc09124: 41 9e 01 b4 beq- cr7,ffc092d8 if ( !the_attr->is_initialized ) ffc09128: 80 1f 00 00 lwz r0,0(r31) return EINVAL; ffc0912c: 3b c0 00 16 li r30,22 if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; if ( !the_attr->is_initialized ) ffc09130: 2f 80 00 00 cmpwi cr7,r0,0 ffc09134: 41 9e 00 3c beq- cr7,ffc09170 * 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) ) ffc09138: 80 1f 00 04 lwz r0,4(r31) ffc0913c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09140: 41 9e 00 18 beq- cr7,ffc09158 ffc09144: 3d 60 00 00 lis r11,0 ffc09148: 81 3f 00 08 lwz r9,8(r31) ffc0914c: 80 0b 26 d0 lwz r0,9936(r11) ffc09150: 7f 89 00 40 cmplw cr7,r9,r0 ffc09154: 41 9c 00 1c blt- cr7,ffc09170 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { ffc09158: 80 1f 00 10 lwz r0,16(r31) ffc0915c: 2f 80 00 01 cmpwi cr7,r0,1 ffc09160: 41 9e 01 84 beq- cr7,ffc092e4 ffc09164: 2f 80 00 02 cmpwi cr7,r0,2 schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; break; default: return EINVAL; ffc09168: 3b c0 00 16 li r30,22 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { ffc0916c: 41 9e 00 44 beq- cr7,ffc091b0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } ffc09170: 80 01 00 84 lwz r0,132(r1) ffc09174: 7f c3 f3 78 mr r3,r30 ffc09178: 82 a1 00 54 lwz r21,84(r1) ffc0917c: 7c 08 03 a6 mtlr r0 ffc09180: 82 c1 00 58 lwz r22,88(r1) ffc09184: 82 e1 00 5c lwz r23,92(r1) ffc09188: 83 01 00 60 lwz r24,96(r1) ffc0918c: 83 21 00 64 lwz r25,100(r1) ffc09190: 83 41 00 68 lwz r26,104(r1) ffc09194: 83 61 00 6c lwz r27,108(r1) ffc09198: 83 81 00 70 lwz r28,112(r1) ffc0919c: 83 a1 00 74 lwz r29,116(r1) ffc091a0: 83 c1 00 78 lwz r30,120(r1) ffc091a4: 83 e1 00 7c lwz r31,124(r1) ffc091a8: 38 21 00 80 addi r1,r1,128 ffc091ac: 4e 80 00 20 blr schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; ffc091b0: 80 df 00 18 lwz r6,24(r31) ffc091b4: 80 ff 00 1c lwz r7,28(r31) ffc091b8: 81 1f 00 20 lwz r8,32(r31) ffc091bc: 81 5f 00 24 lwz r10,36(r31) ffc091c0: 81 7f 00 28 lwz r11,40(r31) ffc091c4: 81 3f 00 2c lwz r9,44(r31) ffc091c8: 80 1f 00 30 lwz r0,48(r31) schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; ffc091cc: 83 5f 00 14 lwz r26,20(r31) schedparam = the_attr->schedparam; ffc091d0: 90 c1 00 20 stw r6,32(r1) ffc091d4: 90 e1 00 24 stw r7,36(r1) ffc091d8: 91 01 00 28 stw r8,40(r1) ffc091dc: 91 41 00 2c stw r10,44(r1) ffc091e0: 91 61 00 30 stw r11,48(r1) ffc091e4: 91 21 00 34 stw r9,52(r1) ffc091e8: 90 01 00 38 stw r0,56(r1) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) ffc091ec: 80 1f 00 0c lwz r0,12(r31) return ENOTSUP; ffc091f0: 3b c0 00 86 li r30,134 /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) ffc091f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc091f8: 40 be ff 78 bne- cr7,ffc09170 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) ffc091fc: 80 61 00 20 lwz r3,32(r1) return EINVAL; ffc09200: 3b c0 00 16 li r30,22 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) ffc09204: 48 00 82 79 bl ffc1147c <_POSIX_Priority_Is_valid> ffc09208: 2f 83 00 00 cmpwi cr7,r3,0 ffc0920c: 41 9e ff 64 beq+ cr7,ffc09170 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); ffc09210: 7c 24 0b 78 mr r4,r1 ffc09214: 86 c4 00 20 lwzu r22,32(r4) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc09218: 3d 20 00 00 lis r9,0 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( ffc0921c: 7f 43 d3 78 mr r3,r26 ffc09220: 8a a9 26 d4 lbz r21,9940(r9) ffc09224: 38 a1 00 18 addi r5,r1,24 ffc09228: 38 c1 00 1c addi r6,r1,28 ffc0922c: 48 00 82 75 bl ffc114a0 <_POSIX_Thread_Translate_sched_param> schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) ffc09230: 7c 7e 1b 79 mr. r30,r3 ffc09234: 40 82 ff 3c bne+ ffc09170 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); ffc09238: 3e e0 00 00 lis r23,0 ffc0923c: 80 77 27 d8 lwz r3,10200(r23) * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); ffc09240: 3f 20 00 00 lis r25,0 ffc09244: 3b 39 2d ec addi r25,r25,11756 ffc09248: 48 00 20 c5 bl ffc0b30c <_API_Mutex_Lock> ffc0924c: 7f 23 cb 78 mr r3,r25 ffc09250: 48 00 2d 85 bl ffc0bfd4 <_Objects_Allocate> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { ffc09254: 7c 78 1b 79 mr. r24,r3 ffc09258: 41 82 00 70 beq- ffc092c8 static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) ffc0925c: 3d 20 00 00 lis r9,0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc09260: 80 1f 00 08 lwz r0,8(r31) static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) ffc09264: 80 c9 26 d0 lwz r6,9936(r9) /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc09268: 80 bf 00 04 lwz r5,4(r31) static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) ffc0926c: 54 c6 08 3c rlwinm r6,r6,1,0,30 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc09270: 7f 86 00 40 cmplw cr7,r6,r0 ffc09274: 40 9c 00 08 bge- cr7,ffc0927c ffc09278: 7c 06 03 78 mr r6,r0 ffc0927c: 38 00 00 00 li r0,0 ffc09280: 81 81 00 1c lwz r12,28(r1) ffc09284: 7c 2b 0b 78 mr r11,r1 ffc09288: 81 41 00 18 lwz r10,24(r1) ffc0928c: 94 0b 00 48 stwu r0,72(r11) ffc09290: 7f 23 cb 78 mr r3,r25 ffc09294: 7f 04 c3 78 mr r4,r24 ffc09298: 38 e0 00 01 li r7,1 ffc0929c: 91 81 00 08 stw r12,8(r1) ffc092a0: 7d 16 a8 50 subf r8,r22,r21 ffc092a4: 39 20 00 01 li r9,1 ffc092a8: 90 01 00 0c stw r0,12(r1) ffc092ac: 91 61 00 10 stw r11,16(r1) ffc092b0: 48 00 43 1d bl ffc0d5cc <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { ffc092b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc092b8: 40 9e 00 78 bne- cr7,ffc09330 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); ffc092bc: 7f 23 cb 78 mr r3,r25 ffc092c0: 7f 04 c3 78 mr r4,r24 ffc092c4: 48 00 31 39 bl ffc0c3fc <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc092c8: 80 77 27 d8 lwz r3,10200(r23) return EAGAIN; ffc092cc: 3b c0 00 0b li r30,11 name /* posix threads don't have a name */ ); if ( !status ) { _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc092d0: 48 00 20 bd bl ffc0b38c <_API_Mutex_Unlock> return EAGAIN; ffc092d4: 4b ff fe 9c b ffc09170 int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; ffc092d8: 3f e0 ff c2 lis r31,-62 ffc092dc: 3b ff 1f e0 addi r31,r31,8160 ffc092e0: 4b ff fe 48 b ffc09128 * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc092e4: 3d 20 00 00 lis r9,0 ffc092e8: 81 29 30 f0 lwz r9,12528(r9) ffc092ec: 81 29 01 34 lwz r9,308(r9) schedpolicy = api->schedpolicy; schedparam = api->schedparam; ffc092f0: 80 a9 00 88 lwz r5,136(r9) ffc092f4: 80 c9 00 8c lwz r6,140(r9) ffc092f8: 80 e9 00 90 lwz r7,144(r9) ffc092fc: 81 09 00 94 lwz r8,148(r9) ffc09300: 81 49 00 98 lwz r10,152(r9) ffc09304: 81 69 00 9c lwz r11,156(r9) ffc09308: 80 09 00 a0 lwz r0,160(r9) * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; ffc0930c: 83 49 00 84 lwz r26,132(r9) schedparam = api->schedparam; ffc09310: 90 a1 00 20 stw r5,32(r1) ffc09314: 90 c1 00 24 stw r6,36(r1) ffc09318: 90 e1 00 28 stw r7,40(r1) ffc0931c: 91 01 00 2c stw r8,44(r1) ffc09320: 91 41 00 30 stw r10,48(r1) ffc09324: 91 61 00 34 stw r11,52(r1) ffc09328: 90 01 00 38 stw r0,56(r1) break; ffc0932c: 4b ff fe c0 b ffc091ec } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc09330: 83 38 01 34 lwz r25,308(r24) api->Attributes = *the_attr; ffc09334: 7f e4 fb 78 mr r4,r31 ffc09338: 38 a0 00 40 li r5,64 ffc0933c: 7f 23 cb 78 mr r3,r25 ffc09340: 48 00 c1 c9 bl ffc15508 api->detachstate = the_attr->detachstate; ffc09344: 80 1f 00 3c lwz r0,60(r31) api->schedpolicy = schedpolicy; ffc09348: 93 59 00 84 stw r26,132(r25) api->schedparam = schedparam; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc0934c: 7f 03 c3 78 mr r3,r24 ffc09350: 38 80 00 01 li r4,1 * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; ffc09354: 90 19 00 40 stw r0,64(r25) api->schedparam = schedparam; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc09358: 7f 65 db 78 mr r5,r27 ffc0935c: 7f 86 e3 78 mr r6,r28 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc09360: 80 01 00 20 lwz r0,32(r1) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc09364: 38 e0 00 00 li r7,0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc09368: 90 19 00 88 stw r0,136(r25) ffc0936c: 80 01 00 24 lwz r0,36(r1) ffc09370: 90 19 00 8c stw r0,140(r25) ffc09374: 80 01 00 28 lwz r0,40(r1) ffc09378: 90 19 00 90 stw r0,144(r25) ffc0937c: 80 01 00 2c lwz r0,44(r1) ffc09380: 90 19 00 94 stw r0,148(r25) ffc09384: 80 01 00 30 lwz r0,48(r1) ffc09388: 90 19 00 98 stw r0,152(r25) ffc0938c: 80 01 00 34 lwz r0,52(r1) ffc09390: 90 19 00 9c stw r0,156(r25) ffc09394: 80 01 00 38 lwz r0,56(r1) ffc09398: 90 19 00 a0 stw r0,160(r25) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc0939c: 48 00 4f 75 bl ffc0e310 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { ffc093a0: 2f 9a 00 04 cmpwi cr7,r26,4 ffc093a4: 41 9e 00 18 beq- cr7,ffc093bc } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc093a8: 80 18 00 08 lwz r0,8(r24) _RTEMS_Unlock_allocator(); ffc093ac: 80 77 27 d8 lwz r3,10200(r23) } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc093b0: 90 1d 00 00 stw r0,0(r29) _RTEMS_Unlock_allocator(); ffc093b4: 48 00 1f d9 bl ffc0b38c <_API_Mutex_Unlock> return 0; ffc093b8: 4b ff fd b8 b ffc09170 return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( ffc093bc: 38 79 00 90 addi r3,r25,144 ffc093c0: 48 00 51 f9 bl ffc0e5b8 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc093c4: 38 99 00 a8 addi r4,r25,168 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc093c8: 90 79 00 b4 stw r3,180(r25) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc093cc: 3c 60 00 00 lis r3,0 ffc093d0: 38 63 2d 08 addi r3,r3,11528 ffc093d4: 48 00 57 91 bl ffc0eb64 <_Watchdog_Insert> ffc093d8: 4b ff ff d0 b ffc093a8 =============================================================================== ffc0b764 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { ffc0b764: 94 21 ff e0 stwu r1,-32(r1) ffc0b768: 7c 08 02 a6 mflr r0 ffc0b76c: 93 c1 00 18 stw r30,24(r1) ffc0b770: 7c 7e 1b 78 mr r30,r3 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0b774: 7c 83 23 78 mr r3,r4 ffc0b778: 38 81 00 08 addi r4,r1,8 int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { ffc0b77c: 93 e1 00 1c stw r31,28(r1) ffc0b780: 90 01 00 24 stw r0,36(r1) * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0b784: 48 00 01 2d bl ffc0b8b0 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) ffc0b788: 2f 83 00 03 cmpwi cr7,r3,3 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0b78c: 7c 7f 1b 78 mr r31,r3 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) ffc0b790: 41 9e 00 50 beq- cr7,ffc0b7e0 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); ffc0b794: 80 a1 00 08 lwz r5,8(r1) ffc0b798: 7f c3 f3 78 mr r3,r30 ffc0b79c: 38 80 00 00 li r4,0 ffc0b7a0: 4b ff fe 3d bl ffc0b5dc <_POSIX_Mutex_Lock_support> * This service only gives us the option to block. We used a polling * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { ffc0b7a4: 2f 83 00 10 cmpwi cr7,r3,16 ffc0b7a8: 41 9e 00 1c beq- cr7,ffc0b7c4 <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } ffc0b7ac: 80 01 00 24 lwz r0,36(r1) ffc0b7b0: 83 c1 00 18 lwz r30,24(r1) ffc0b7b4: 7c 08 03 a6 mtlr r0 ffc0b7b8: 83 e1 00 1c lwz r31,28(r1) ffc0b7bc: 38 21 00 20 addi r1,r1,32 ffc0b7c0: 4e 80 00 20 blr * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) ffc0b7c4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b7c8: 41 9e 00 40 beq- cr7,ffc0b808 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc0b7cc: 3b ff ff ff addi r31,r31,-1 ffc0b7d0: 2b 9f 00 01 cmplwi cr7,r31,1 ffc0b7d4: 41 9d ff d8 bgt+ cr7,ffc0b7ac <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; ffc0b7d8: 38 60 00 74 li r3,116 ffc0b7dc: 4b ff ff d0 b ffc0b7ac */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); ffc0b7e0: 80 a1 00 08 lwz r5,8(r1) ffc0b7e4: 7f c3 f3 78 mr r3,r30 ffc0b7e8: 38 80 00 01 li r4,1 ffc0b7ec: 4b ff fd f1 bl ffc0b5dc <_POSIX_Mutex_Lock_support> status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } ffc0b7f0: 80 01 00 24 lwz r0,36(r1) ffc0b7f4: 83 c1 00 18 lwz r30,24(r1) ffc0b7f8: 7c 08 03 a6 mtlr r0 ffc0b7fc: 83 e1 00 1c lwz r31,28(r1) ffc0b800: 38 21 00 20 addi r1,r1,32 ffc0b804: 4e 80 00 20 blr * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; ffc0b808: 38 60 00 16 li r3,22 <== NOT EXECUTED ffc0b80c: 4b ff ff a0 b ffc0b7ac <== NOT EXECUTED =============================================================================== ffc09998 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc09998: 94 21 ff d8 stwu r1,-40(r1) ffc0999c: 7c 08 02 a6 mflr r0 ffc099a0: 93 e1 00 24 stw r31,36(r1) if ( !once_control || !init_routine ) ffc099a4: 7c 7f 1b 79 mr. r31,r3 return EINVAL; ffc099a8: 38 60 00 16 li r3,22 int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc099ac: 93 c1 00 20 stw r30,32(r1) ffc099b0: 7c 9e 23 78 mr r30,r4 ffc099b4: 90 01 00 2c stw r0,44(r1) ffc099b8: 93 a1 00 1c stw r29,28(r1) if ( !once_control || !init_routine ) ffc099bc: 41 82 00 1c beq- ffc099d8 ffc099c0: 2f 84 00 00 cmpwi cr7,r4,0 ffc099c4: 41 9e 00 14 beq- cr7,ffc099d8 return EINVAL; if ( !once_control->init_executed ) { ffc099c8: 80 1f 00 04 lwz r0,4(r31) once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; ffc099cc: 38 60 00 00 li r3,0 ) { if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { ffc099d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc099d4: 41 9e 00 20 beq- cr7,ffc099f4 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } ffc099d8: 80 01 00 2c lwz r0,44(r1) ffc099dc: 83 a1 00 1c lwz r29,28(r1) ffc099e0: 7c 08 03 a6 mtlr r0 ffc099e4: 83 c1 00 20 lwz r30,32(r1) ffc099e8: 83 e1 00 24 lwz r31,36(r1) ffc099ec: 38 21 00 28 addi r1,r1,40 ffc099f0: 4e 80 00 20 blr if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); ffc099f4: 3b a1 00 08 addi r29,r1,8 ffc099f8: 38 60 01 00 li r3,256 ffc099fc: 38 80 01 00 li r4,256 ffc09a00: 7f a5 eb 78 mr r5,r29 ffc09a04: 48 00 0f 9d bl ffc0a9a0 if ( !once_control->init_executed ) { ffc09a08: 80 1f 00 04 lwz r0,4(r31) ffc09a0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09a10: 41 9e 00 34 beq- cr7,ffc09a44 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc09a14: 80 61 00 08 lwz r3,8(r1) ffc09a18: 7f a5 eb 78 mr r5,r29 ffc09a1c: 38 80 01 00 li r4,256 ffc09a20: 48 00 0f 81 bl ffc0a9a0 } return 0; } ffc09a24: 80 01 00 2c lwz r0,44(r1) once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; ffc09a28: 38 60 00 00 li r3,0 } ffc09a2c: 83 a1 00 1c lwz r29,28(r1) ffc09a30: 7c 08 03 a6 mtlr r0 ffc09a34: 83 c1 00 20 lwz r30,32(r1) ffc09a38: 83 e1 00 24 lwz r31,36(r1) ffc09a3c: 38 21 00 28 addi r1,r1,40 ffc09a40: 4e 80 00 20 blr 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; ffc09a44: 38 00 00 01 li r0,1 once_control->init_executed = true; (*init_routine)(); ffc09a48: 7f c9 03 a6 mtctr r30 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; ffc09a4c: 90 1f 00 00 stw r0,0(r31) once_control->init_executed = true; ffc09a50: 90 1f 00 04 stw r0,4(r31) (*init_routine)(); ffc09a54: 4e 80 04 21 bctrl ffc09a58: 4b ff ff bc b ffc09a14 =============================================================================== ffc0a310 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc0a310: 94 21 ff d8 stwu r1,-40(r1) ffc0a314: 7c 08 02 a6 mflr r0 ffc0a318: 93 c1 00 20 stw r30,32(r1) const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc0a31c: 7c 7e 1b 79 mr. r30,r3 return EINVAL; ffc0a320: 38 60 00 16 li r3,22 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc0a324: 90 01 00 2c stw r0,44(r1) ffc0a328: 93 81 00 18 stw r28,24(r1) ffc0a32c: 93 a1 00 1c stw r29,28(r1) ffc0a330: 93 e1 00 24 stw r31,36(r1) const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc0a334: 41 82 00 80 beq- ffc0a3b4 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc0a338: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a33c: 41 9e 00 a4 beq- cr7,ffc0a3e0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc0a340: 80 04 00 00 lwz r0,0(r4) return EINVAL; ffc0a344: 38 60 00 16 li r3,22 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc0a348: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a34c: 41 9e 00 68 beq- cr7,ffc0a3b4 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { ffc0a350: 83 e4 00 04 lwz r31,4(r4) ffc0a354: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a358: 40 9e 00 5c bne- cr7,ffc0a3b4 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0a35c: 3d 20 00 00 lis r9,0 */ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes( CORE_RWLock_Attributes *the_attributes ) { the_attributes->XXX = 0; ffc0a360: 93 e1 00 08 stw r31,8(r1) ffc0a364: 81 69 27 b8 lwz r11,10168(r9) ffc0a368: 38 0b 00 01 addi r0,r11,1 ffc0a36c: 90 09 27 b8 stw r0,10168(r9) * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) _Objects_Allocate( &_POSIX_RWLock_Information ); ffc0a370: 3f 80 00 00 lis r28,0 ffc0a374: 3b 9c 2d ac addi r28,r28,11692 ffc0a378: 7f 83 e3 78 mr r3,r28 ffc0a37c: 48 00 33 81 bl ffc0d6fc <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { ffc0a380: 7c 7d 1b 79 mr. r29,r3 ffc0a384: 41 82 00 50 beq- ffc0a3d4 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); ffc0a388: 38 7d 00 10 addi r3,r29,16 ffc0a38c: 38 81 00 08 addi r4,r1,8 ffc0a390: 48 00 28 39 bl ffc0cbc8 <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc0a394: 80 1d 00 08 lwz r0,8(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0a398: 81 7c 00 1c lwz r11,28(r28) ffc0a39c: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc0a3a0: 7f ab 49 2e stwx r29,r11,r9 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc0a3a4: 93 fd 00 0c stw r31,12(r29) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; ffc0a3a8: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0a3ac: 48 00 48 71 bl ffc0ec1c <_Thread_Enable_dispatch> return 0; ffc0a3b0: 38 60 00 00 li r3,0 } ffc0a3b4: 80 01 00 2c lwz r0,44(r1) ffc0a3b8: 83 81 00 18 lwz r28,24(r1) ffc0a3bc: 7c 08 03 a6 mtlr r0 ffc0a3c0: 83 a1 00 1c lwz r29,28(r1) ffc0a3c4: 83 c1 00 20 lwz r30,32(r1) ffc0a3c8: 83 e1 00 24 lwz r31,36(r1) ffc0a3cc: 38 21 00 28 addi r1,r1,40 ffc0a3d0: 4e 80 00 20 blr _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); ffc0a3d4: 48 00 48 49 bl ffc0ec1c <_Thread_Enable_dispatch> return EAGAIN; ffc0a3d8: 38 60 00 0b li r3,11 ffc0a3dc: 4b ff ff d8 b ffc0a3b4 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); ffc0a3e0: 3b e1 00 0c addi r31,r1,12 ffc0a3e4: 7f e3 fb 78 mr r3,r31 ffc0a3e8: 48 00 0c 41 bl ffc0b028 the_attr = &default_attr; ffc0a3ec: 7f e4 fb 78 mr r4,r31 ffc0a3f0: 4b ff ff 50 b ffc0a340 =============================================================================== ffc0a480 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a480: 94 21 ff d8 stwu r1,-40(r1) ffc0a484: 7c 08 02 a6 mflr r0 ffc0a488: 93 81 00 18 stw r28,24(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a48c: 7c 7c 1b 79 mr. r28,r3 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a490: 7c 83 23 78 mr r3,r4 ffc0a494: 93 e1 00 24 stw r31,36(r1) Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) return EINVAL; ffc0a498: 3b e0 00 16 li r31,22 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a49c: 90 01 00 2c stw r0,44(r1) ffc0a4a0: 93 a1 00 1c stw r29,28(r1) ffc0a4a4: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a4a8: 41 82 00 7c beq- ffc0a524 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0a4ac: 38 81 00 0c addi r4,r1,12 ffc0a4b0: 48 00 85 2d bl ffc129dc <_POSIX_Absolute_timeout_to_ticks> ffc0a4b4: 80 9c 00 00 lwz r4,0(r28) ffc0a4b8: 7c 7d 1b 78 mr r29,r3 ffc0a4bc: 3c 60 00 00 lis r3,0 ffc0a4c0: 38 63 2d ac addi r3,r3,11692 ffc0a4c4: 38 a1 00 08 addi r5,r1,8 ffc0a4c8: 48 00 38 51 bl ffc0dd18 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc0a4cc: 80 01 00 08 lwz r0,8(r1) ffc0a4d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a4d4: 40 9e 00 50 bne- cr7,ffc0a524 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, ffc0a4d8: 6b be 00 03 xori r30,r29,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( ffc0a4dc: 80 9c 00 00 lwz r4,0(r28) ffc0a4e0: 7f de 00 34 cntlzw r30,r30 ffc0a4e4: 80 c1 00 0c lwz r6,12(r1) ffc0a4e8: 57 de d9 7e rlwinm r30,r30,27,5,31 ffc0a4ec: 38 63 00 10 addi r3,r3,16 ffc0a4f0: 7f c5 f3 78 mr r5,r30 ffc0a4f4: 38 e0 00 00 li r7,0 ffc0a4f8: 48 00 27 11 bl ffc0cc08 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc0a4fc: 48 00 47 21 bl ffc0ec1c <_Thread_Enable_dispatch> if ( !do_wait ) { ffc0a500: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a504: 40 9e 00 60 bne- cr7,ffc0a564 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { ffc0a508: 3d 20 00 00 lis r9,0 ffc0a50c: 81 29 30 f0 lwz r9,12528(r9) ffc0a510: 80 69 00 34 lwz r3,52(r9) ffc0a514: 2f 83 00 02 cmpwi cr7,r3,2 ffc0a518: 41 9e 00 30 beq- cr7,ffc0a548 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a51c: 48 00 01 4d bl ffc0a668 <_POSIX_RWLock_Translate_core_RWLock_return_code> ffc0a520: 7c 7f 1b 78 mr r31,r3 case OBJECTS_ERROR: break; } return EINVAL; } ffc0a524: 80 01 00 2c lwz r0,44(r1) ffc0a528: 7f e3 fb 78 mr r3,r31 ffc0a52c: 83 81 00 18 lwz r28,24(r1) ffc0a530: 7c 08 03 a6 mtlr r0 ffc0a534: 83 a1 00 1c lwz r29,28(r1) ffc0a538: 83 c1 00 20 lwz r30,32(r1) ffc0a53c: 83 e1 00 24 lwz r31,36(r1) ffc0a540: 38 21 00 28 addi r1,r1,40 ffc0a544: 4e 80 00 20 blr ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) ffc0a548: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a54c: 41 be ff d8 beq- cr7,ffc0a524 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc0a550: 3b bd ff ff addi r29,r29,-1 ffc0a554: 2b 9d 00 01 cmplwi cr7,r29,1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; ffc0a558: 3b e0 00 74 li r31,116 _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc0a55c: 41 9d ff c0 bgt+ cr7,ffc0a51c <== NEVER TAKEN ffc0a560: 4b ff ff c4 b ffc0a524 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { ffc0a564: 3d 20 00 00 lis r9,0 ffc0a568: 81 29 30 f0 lwz r9,12528(r9) ffc0a56c: 80 69 00 34 lwz r3,52(r9) ffc0a570: 4b ff ff ac b ffc0a51c =============================================================================== ffc0a574 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a574: 94 21 ff d8 stwu r1,-40(r1) ffc0a578: 7c 08 02 a6 mflr r0 ffc0a57c: 93 81 00 18 stw r28,24(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a580: 7c 7c 1b 79 mr. r28,r3 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a584: 7c 83 23 78 mr r3,r4 ffc0a588: 93 e1 00 24 stw r31,36(r1) Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) return EINVAL; ffc0a58c: 3b e0 00 16 li r31,22 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a590: 90 01 00 2c stw r0,44(r1) ffc0a594: 93 a1 00 1c stw r29,28(r1) ffc0a598: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a59c: 41 82 00 7c beq- ffc0a618 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0a5a0: 38 81 00 0c addi r4,r1,12 ffc0a5a4: 48 00 84 39 bl ffc129dc <_POSIX_Absolute_timeout_to_ticks> ffc0a5a8: 80 9c 00 00 lwz r4,0(r28) ffc0a5ac: 7c 7d 1b 78 mr r29,r3 ffc0a5b0: 3c 60 00 00 lis r3,0 ffc0a5b4: 38 63 2d ac addi r3,r3,11692 ffc0a5b8: 38 a1 00 08 addi r5,r1,8 ffc0a5bc: 48 00 37 5d bl ffc0dd18 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc0a5c0: 80 01 00 08 lwz r0,8(r1) ffc0a5c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a5c8: 40 9e 00 50 bne- cr7,ffc0a618 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, ffc0a5cc: 6b be 00 03 xori r30,r29,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( ffc0a5d0: 80 9c 00 00 lwz r4,0(r28) ffc0a5d4: 7f de 00 34 cntlzw r30,r30 ffc0a5d8: 80 c1 00 0c lwz r6,12(r1) ffc0a5dc: 57 de d9 7e rlwinm r30,r30,27,5,31 ffc0a5e0: 38 63 00 10 addi r3,r3,16 ffc0a5e4: 7f c5 f3 78 mr r5,r30 ffc0a5e8: 38 e0 00 00 li r7,0 ffc0a5ec: 48 00 27 61 bl ffc0cd4c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc0a5f0: 48 00 46 2d bl ffc0ec1c <_Thread_Enable_dispatch> if ( !do_wait && ffc0a5f4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a5f8: 40 9e 00 60 bne- cr7,ffc0a658 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { ffc0a5fc: 3d 20 00 00 lis r9,0 ffc0a600: 81 29 30 f0 lwz r9,12528(r9) ffc0a604: 80 69 00 34 lwz r3,52(r9) ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && ffc0a608: 2f 83 00 02 cmpwi cr7,r3,2 ffc0a60c: 41 9e 00 30 beq- cr7,ffc0a63c if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a610: 48 00 00 59 bl ffc0a668 <_POSIX_RWLock_Translate_core_RWLock_return_code> ffc0a614: 7c 7f 1b 78 mr r31,r3 case OBJECTS_ERROR: break; } return EINVAL; } ffc0a618: 80 01 00 2c lwz r0,44(r1) ffc0a61c: 7f e3 fb 78 mr r3,r31 ffc0a620: 83 81 00 18 lwz r28,24(r1) ffc0a624: 7c 08 03 a6 mtlr r0 ffc0a628: 83 a1 00 1c lwz r29,28(r1) ffc0a62c: 83 c1 00 20 lwz r30,32(r1) ffc0a630: 83 e1 00 24 lwz r31,36(r1) ffc0a634: 38 21 00 28 addi r1,r1,40 ffc0a638: 4e 80 00 20 blr ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) ffc0a63c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a640: 41 be ff d8 beq- cr7,ffc0a618 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc0a644: 3b bd ff ff addi r29,r29,-1 ffc0a648: 2b 9d 00 01 cmplwi cr7,r29,1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; ffc0a64c: 3b e0 00 74 li r31,116 _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc0a650: 41 9d ff c0 bgt+ cr7,ffc0a610 <== NEVER TAKEN ffc0a654: 4b ff ff c4 b ffc0a618 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && ffc0a658: 3d 20 00 00 lis r9,0 ffc0a65c: 81 29 30 f0 lwz r9,12528(r9) ffc0a660: 80 69 00 34 lwz r3,52(r9) ffc0a664: 4b ff ff ac b ffc0a610 =============================================================================== ffc0c330 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0c330: 94 21 ff d0 stwu r1,-48(r1) ffc0c334: 7c 08 02 a6 mflr r0 ffc0c338: 93 e1 00 2c stw r31,44(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0c33c: 7c bf 2b 79 mr. r31,r5 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0c340: 93 81 00 20 stw r28,32(r1) /* * Check all the parameters */ if ( !param ) return EINVAL; ffc0c344: 3b 80 00 16 li r28,22 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0c348: 93 a1 00 24 stw r29,36(r1) ffc0c34c: 7c 7d 1b 78 mr r29,r3 ffc0c350: 93 c1 00 28 stw r30,40(r1) ffc0c354: 7c 9e 23 78 mr r30,r4 ffc0c358: 90 01 00 34 stw r0,52(r1) ffc0c35c: 93 61 00 1c stw r27,28(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0c360: 41 82 00 20 beq- ffc0c380 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( ffc0c364: 7c 83 23 78 mr r3,r4 ffc0c368: 38 a1 00 08 addi r5,r1,8 ffc0c36c: 7f e4 fb 78 mr r4,r31 ffc0c370: 38 c1 00 0c addi r6,r1,12 ffc0c374: 48 00 7a 81 bl ffc13df4 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) ffc0c378: 7c 7c 1b 79 mr. r28,r3 ffc0c37c: 41 82 00 2c beq- ffc0c3a8 case OBJECTS_ERROR: break; } return ESRCH; } ffc0c380: 80 01 00 34 lwz r0,52(r1) ffc0c384: 7f 83 e3 78 mr r3,r28 ffc0c388: 83 61 00 1c lwz r27,28(r1) ffc0c38c: 7c 08 03 a6 mtlr r0 ffc0c390: 83 81 00 20 lwz r28,32(r1) ffc0c394: 83 a1 00 24 lwz r29,36(r1) ffc0c398: 83 c1 00 28 lwz r30,40(r1) ffc0c39c: 83 e1 00 2c lwz r31,44(r1) ffc0c3a0: 38 21 00 30 addi r1,r1,48 ffc0c3a4: 4e 80 00 20 blr ffc0c3a8: 3c 60 00 00 lis r3,0 ffc0c3ac: 38 63 2e 4c addi r3,r3,11852 ffc0c3b0: 7f a4 eb 78 mr r4,r29 ffc0c3b4: 38 a1 00 10 addi r5,r1,16 ffc0c3b8: 48 00 2a 65 bl ffc0ee1c <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { ffc0c3bc: 80 01 00 10 lwz r0,16(r1) ffc0c3c0: 7c 7b 1b 78 mr r27,r3 ffc0c3c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c3c8: 40 9e 00 c4 bne- cr7,ffc0c48c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0c3cc: 83 a3 01 34 lwz r29,308(r3) if ( api->schedpolicy == SCHED_SPORADIC ) ffc0c3d0: 80 1d 00 84 lwz r0,132(r29) ffc0c3d4: 2f 80 00 04 cmpwi cr7,r0,4 ffc0c3d8: 41 9e 01 08 beq- cr7,ffc0c4e0 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; ffc0c3dc: 93 dd 00 84 stw r30,132(r29) api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { ffc0c3e0: 2f 9e 00 00 cmpwi cr7,r30,0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; ffc0c3e4: 81 5f 00 04 lwz r10,4(r31) ffc0c3e8: 81 7f 00 08 lwz r11,8(r31) ffc0c3ec: 81 3f 00 0c lwz r9,12(r31) ffc0c3f0: 80 1f 00 00 lwz r0,0(r31) ffc0c3f4: 91 5d 00 8c stw r10,140(r29) ffc0c3f8: 90 1d 00 88 stw r0,136(r29) ffc0c3fc: 91 7d 00 90 stw r11,144(r29) ffc0c400: 91 3d 00 94 stw r9,148(r29) ffc0c404: 81 3f 00 18 lwz r9,24(r31) ffc0c408: 81 5f 00 10 lwz r10,16(r31) ffc0c40c: 81 7f 00 14 lwz r11,20(r31) ffc0c410: 91 3d 00 a0 stw r9,160(r29) the_thread->budget_algorithm = budget_algorithm; ffc0c414: 81 21 00 08 lwz r9,8(r1) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; ffc0c418: 91 5d 00 98 stw r10,152(r29) ffc0c41c: 91 7d 00 9c stw r11,156(r29) the_thread->budget_algorithm = budget_algorithm; ffc0c420: 91 3b 00 7c stw r9,124(r27) the_thread->budget_callout = budget_callout; ffc0c424: 81 21 00 0c lwz r9,12(r1) ffc0c428: 91 3b 00 80 stw r9,128(r27) switch ( api->schedpolicy ) { ffc0c42c: 41 9c 00 34 blt- cr7,ffc0c460 <== NEVER TAKEN ffc0c430: 2f 9e 00 02 cmpwi cr7,r30,2 ffc0c434: 41 9d 00 84 bgt- cr7,ffc0c4b8 ffc0c438: 3d 20 00 00 lis r9,0 ffc0c43c: 88 89 27 14 lbz r4,10004(r9) case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c440: 3d 20 00 00 lis r9,0 ffc0c444: 81 29 28 08 lwz r9,10248(r9) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0c448: 7f 63 db 78 mr r3,r27 ffc0c44c: 7c 80 20 50 subf r4,r0,r4 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c450: 91 3b 00 78 stw r9,120(r27) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0c454: 38 a0 00 01 li r5,1 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; the_thread->real_priority = ffc0c458: 90 9b 00 18 stw r4,24(r27) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0c45c: 48 00 32 09 bl ffc0f664 <_Thread_Change_priority> _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); ffc0c460: 48 00 38 c1 bl ffc0fd20 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } ffc0c464: 80 01 00 34 lwz r0,52(r1) ffc0c468: 7f 83 e3 78 mr r3,r28 ffc0c46c: 83 61 00 1c lwz r27,28(r1) ffc0c470: 7c 08 03 a6 mtlr r0 ffc0c474: 83 81 00 20 lwz r28,32(r1) ffc0c478: 83 a1 00 24 lwz r29,36(r1) ffc0c47c: 83 c1 00 28 lwz r30,40(r1) ffc0c480: 83 e1 00 2c lwz r31,44(r1) ffc0c484: 38 21 00 30 addi r1,r1,48 ffc0c488: 4e 80 00 20 blr ffc0c48c: 80 01 00 34 lwz r0,52(r1) #endif case OBJECTS_ERROR: break; } return ESRCH; ffc0c490: 3b 80 00 03 li r28,3 } ffc0c494: 7f 83 e3 78 mr r3,r28 ffc0c498: 83 61 00 1c lwz r27,28(r1) ffc0c49c: 7c 08 03 a6 mtlr r0 ffc0c4a0: 83 81 00 20 lwz r28,32(r1) ffc0c4a4: 83 a1 00 24 lwz r29,36(r1) ffc0c4a8: 83 c1 00 28 lwz r30,40(r1) ffc0c4ac: 83 e1 00 2c lwz r31,44(r1) ffc0c4b0: 38 21 00 30 addi r1,r1,48 ffc0c4b4: 4e 80 00 20 blr api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { ffc0c4b8: 2f 9e 00 04 cmpwi cr7,r30,4 ffc0c4bc: 40 9e ff a4 bne+ cr7,ffc0c460 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; ffc0c4c0: 90 1d 00 a4 stw r0,164(r29) _Watchdog_Remove( &api->Sporadic_timer ); ffc0c4c4: 38 7d 00 a8 addi r3,r29,168 ffc0c4c8: 48 00 51 dd bl ffc116a4 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); ffc0c4cc: 38 60 00 00 li r3,0 ffc0c4d0: 7f 64 db 78 mr r4,r27 ffc0c4d4: 4b ff fc b5 bl ffc0c188 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); ffc0c4d8: 48 00 38 49 bl ffc0fd20 <_Thread_Enable_dispatch> ffc0c4dc: 4b ff ff 88 b ffc0c464 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); ffc0c4e0: 38 7d 00 a8 addi r3,r29,168 ffc0c4e4: 48 00 51 c1 bl ffc116a4 <_Watchdog_Remove> ffc0c4e8: 4b ff fe f4 b ffc0c3dc =============================================================================== ffc1197c : sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) ffc1197c: 2c 04 00 00 cmpwi r4,0 int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { ffc11980: 94 21 ff f0 stwu r1,-16(r1) ffc11984: 7c 08 02 a6 mflr r0 ffc11988: 90 01 00 14 stw r0,20(r1) POSIX_API_Control *api; if ( !set && !oset ) ffc1198c: 41 82 00 c4 beq- ffc11a50 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; if ( oset ) ffc11990: 2f 85 00 00 cmpwi cr7,r5,0 POSIX_API_Control *api; if ( !set && !oset ) rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc11994: 3d 20 00 00 lis r9,0 ffc11998: 81 29 31 30 lwz r9,12592(r9) ffc1199c: 81 29 01 34 lwz r9,308(r9) if ( oset ) ffc119a0: 41 9e 00 10 beq- cr7,ffc119b0 *oset = api->signals_blocked; ffc119a4: 80 09 00 d0 lwz r0,208(r9) ffc119a8: 90 05 00 00 stw r0,0(r5) if ( !set ) ffc119ac: 41 82 00 c4 beq- ffc11a70 <== NEVER TAKEN return 0; switch ( how ) { ffc119b0: 2f 83 00 01 cmpwi cr7,r3,1 ffc119b4: 41 9e 00 88 beq- cr7,ffc11a3c ffc119b8: 2f 83 00 02 cmpwi cr7,r3,2 ffc119bc: 41 9e 00 4c beq- cr7,ffc11a08 ffc119c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc119c4: 40 9e 00 58 bne- cr7,ffc11a1c break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; ffc119c8: 80 04 00 00 lwz r0,0(r4) ffc119cc: 90 09 00 d0 stw r0,208(r9) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { ffc119d0: 3d 60 00 00 lis r11,0 ffc119d4: 81 29 00 d4 lwz r9,212(r9) ffc119d8: 81 6b 28 4c lwz r11,10316(r11) _Thread_Dispatch(); } return 0; ffc119dc: 38 60 00 00 li r3,0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { ffc119e0: 7d 69 4b 78 or r9,r11,r9 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & ffc119e4: 7d 2b 00 79 andc. r11,r9,r0 ffc119e8: 41 a2 00 10 beq+ ffc119f8 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); ffc119ec: 90 61 00 08 stw r3,8(r1) ffc119f0: 4b ff b8 11 bl ffc0d200 <_Thread_Dispatch> ffc119f4: 80 61 00 08 lwz r3,8(r1) } return 0; } ffc119f8: 80 01 00 14 lwz r0,20(r1) ffc119fc: 38 21 00 10 addi r1,r1,16 ffc11a00: 7c 08 03 a6 mtlr r0 ffc11a04: 4e 80 00 20 blr switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; ffc11a08: 81 64 00 00 lwz r11,0(r4) ffc11a0c: 80 09 00 d0 lwz r0,208(r9) ffc11a10: 7c 00 58 78 andc r0,r0,r11 ffc11a14: 90 09 00 d0 stw r0,208(r9) break; ffc11a18: 4b ff ff b8 b ffc119d0 case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc11a1c: 48 00 33 ed bl ffc14e08 <__errno> ffc11a20: 38 00 00 16 li r0,22 ffc11a24: 90 03 00 00 stw r0,0(r3) ffc11a28: 38 60 ff ff li r3,-1 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } ffc11a2c: 80 01 00 14 lwz r0,20(r1) ffc11a30: 38 21 00 10 addi r1,r1,16 ffc11a34: 7c 08 03 a6 mtlr r0 ffc11a38: 4e 80 00 20 blr if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; ffc11a3c: 80 09 00 d0 lwz r0,208(r9) ffc11a40: 81 64 00 00 lwz r11,0(r4) ffc11a44: 7c 00 5b 78 or r0,r0,r11 ffc11a48: 90 09 00 d0 stw r0,208(r9) break; ffc11a4c: 4b ff ff 84 b ffc119d0 sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) ffc11a50: 2f 85 00 00 cmpwi cr7,r5,0 ffc11a54: 41 be ff c8 beq- cr7,ffc11a1c rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc11a58: 3d 20 00 00 lis r9,0 ffc11a5c: 81 29 31 30 lwz r9,12592(r9) ffc11a60: 81 29 01 34 lwz r9,308(r9) if ( oset ) *oset = api->signals_blocked; ffc11a64: 80 09 00 d0 lwz r0,208(r9) ffc11a68: 90 05 00 00 stw r0,0(r5) if ( !set ) ffc11a6c: 40 82 ff 44 bne+ ffc119b0 <== NEVER TAKEN (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } ffc11a70: 80 01 00 14 lwz r0,20(r1) if ( oset ) *oset = api->signals_blocked; if ( !set ) return 0; ffc11a74: 38 60 00 00 li r3,0 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } ffc11a78: 38 21 00 10 addi r1,r1,16 ffc11a7c: 7c 08 03 a6 mtlr r0 ffc11a80: 4e 80 00 20 blr =============================================================================== ffc09598 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc09598: 94 21 ff f0 stwu r1,-16(r1) ffc0959c: 7c 08 02 a6 mflr r0 ffc095a0: 93 e1 00 0c stw r31,12(r1) * 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() ) ffc095a4: 3f e0 00 00 lis r31,0 ffc095a8: 3b ff 30 e4 addi r31,r31,12516 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc095ac: 90 01 00 14 stw r0,20(r1) * 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() ) ffc095b0: 80 1f 00 08 lwz r0,8(r31) ffc095b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc095b8: 40 9e 00 44 bne- cr7,ffc095fc <== NEVER TAKEN ffc095bc: 3d 20 00 00 lis r9,0 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc095c0: 81 7f 00 0c lwz r11,12(r31) ffc095c4: 81 49 27 b0 lwz r10,10160(r9) ffc095c8: 81 6b 01 34 lwz r11,308(r11) ffc095cc: 38 0a 00 01 addi r0,r10,1 ffc095d0: 90 09 27 b0 stw r0,10160(r9) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc095d4: 80 0b 00 d8 lwz r0,216(r11) ffc095d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc095dc: 40 9e 00 34 bne- cr7,ffc09610 <== NEVER TAKEN ffc095e0: 80 0b 00 e0 lwz r0,224(r11) ffc095e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc095e8: 41 9e 00 28 beq- cr7,ffc09610 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); ffc095ec: 48 00 37 35 bl ffc0cd20 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); ffc095f0: 80 7f 00 0c lwz r3,12(r31) ffc095f4: 38 80 ff ff li r4,-1 ffc095f8: 48 00 79 01 bl ffc10ef8 <_POSIX_Thread_Exit> } ffc095fc: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc09600: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc09604: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc09608: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0960c: 4e 80 00 20 blr <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); ffc09610: 48 00 37 11 bl ffc0cd20 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); } ffc09614: 80 01 00 14 lwz r0,20(r1) ffc09618: 83 e1 00 0c lwz r31,12(r1) ffc0961c: 38 21 00 10 addi r1,r1,16 ffc09620: 7c 08 03 a6 mtlr r0 ffc09624: 4e 80 00 20 blr =============================================================================== ffc0a3bc : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { ffc0a3bc: 94 21 ff b0 stwu r1,-80(r1) ffc0a3c0: 7c 08 02 a6 mflr r0 ffc0a3c4: 93 e1 00 4c stw r31,76(r1) struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); ffc0a3c8: 3f e0 00 00 lis r31,0 ffc0a3cc: 3b ff 2c 08 addi r31,r31,11272 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { ffc0a3d0: 93 a1 00 44 stw r29,68(r1) ffc0a3d4: 7c 7d 1b 78 mr r29,r3 struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); ffc0a3d8: 7f e3 fb 78 mr r3,r31 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { ffc0a3dc: 93 c1 00 48 stw r30,72(r1) ffc0a3e0: 90 01 00 54 stw r0,84(r1) ffc0a3e4: 93 41 00 38 stw r26,56(r1) ffc0a3e8: 93 61 00 3c stw r27,60(r1) ffc0a3ec: 93 81 00 40 stw r28,64(r1) struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); ffc0a3f0: 48 00 0c 59 bl ffc0b048 if (result != 0) { ffc0a3f4: 7c 7e 1b 79 mr. r30,r3 ffc0a3f8: 40 82 00 d8 bne- ffc0a4d0 <== NEVER TAKEN return result; } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); ffc0a3fc: 48 00 17 d9 bl ffc0bbd4 ffc0a400: 38 81 00 0c addi r4,r1,12 ffc0a404: 38 a1 00 10 addi r5,r1,16 ffc0a408: 48 00 11 e9 bl ffc0b5f0 req->caller_thread = pthread_self (); ffc0a40c: 48 00 17 c9 bl ffc0bbd4 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && ffc0a410: 80 1f 00 68 lwz r0,104(r31) /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; ffc0a414: 81 3d 00 14 lwz r9,20(r29) req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && ffc0a418: 2f 80 00 00 cmpwi cr7,r0,0 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; ffc0a41c: 81 61 00 10 lwz r11,16(r1) ffc0a420: 80 09 00 18 lwz r0,24(r9) /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); ffc0a424: 90 7d 00 10 stw r3,16(r29) req->priority = param.sched_priority - req->aiocbp->aio_reqprio; ffc0a428: 7c 00 58 50 subf r0,r0,r11 ffc0a42c: 90 1d 00 0c stw r0,12(r29) req->policy = policy; ffc0a430: 80 01 00 0c lwz r0,12(r1) ffc0a434: 90 1d 00 08 stw r0,8(r29) req->aiocbp->error_code = EINPROGRESS; ffc0a438: 38 00 00 77 li r0,119 ffc0a43c: 90 09 00 34 stw r0,52(r9) req->aiocbp->return_value = 0; ffc0a440: 93 c9 00 38 stw r30,56(r9) if ((aio_request_queue.idle_threads == 0) && ffc0a444: 40 9e 00 10 bne- cr7,ffc0a454 ffc0a448: 80 1f 00 64 lwz r0,100(r31) ffc0a44c: 2f 80 00 04 cmpwi cr7,r0,4 ffc0a450: 40 9d 00 b4 ble- cr7,ffc0a504 else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ffc0a454: 3f 60 00 00 lis r27,0 ffc0a458: 80 89 00 00 lwz r4,0(r9) ffc0a45c: 3b 7b 2c 50 addi r27,r27,11344 ffc0a460: 7f 63 db 78 mr r3,r27 ffc0a464: 38 a0 00 00 li r5,0 ffc0a468: 4b ff f9 c5 bl ffc09e2c req->aiocbp->aio_fildes, 0); if (r_chain != NULL) ffc0a46c: 7c 7c 1b 79 mr. r28,r3 ffc0a470: 41 82 01 0c beq- ffc0a57c <== ALWAYS TAKEN { pthread_mutex_lock (&r_chain->mutex); ffc0a474: 3b 7c 00 1c addi r27,r28,28 ffc0a478: 7f 63 db 78 mr r3,r27 ffc0a47c: 48 00 0b cd bl ffc0b048 rtems_aio_insert_prio (&r_chain->perfd, req); ffc0a480: 38 7c 00 08 addi r3,r28,8 ffc0a484: 7f a4 eb 78 mr r4,r29 ffc0a488: 4b ff fd 9d bl ffc0a224 pthread_cond_signal (&r_chain->cond); ffc0a48c: 38 7c 00 20 addi r3,r28,32 ffc0a490: 48 00 05 95 bl ffc0aa24 pthread_mutex_unlock (&r_chain->mutex); ffc0a494: 7f 63 db 78 mr r3,r27 ffc0a498: 48 00 0c 7d bl ffc0b114 /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); } } pthread_mutex_unlock (&aio_request_queue.mutex); ffc0a49c: 7f e3 fb 78 mr r3,r31 ffc0a4a0: 48 00 0c 75 bl ffc0b114 return 0; } ffc0a4a4: 80 01 00 54 lwz r0,84(r1) ffc0a4a8: 7f c3 f3 78 mr r3,r30 ffc0a4ac: 83 41 00 38 lwz r26,56(r1) ffc0a4b0: 7c 08 03 a6 mtlr r0 ffc0a4b4: 83 61 00 3c lwz r27,60(r1) ffc0a4b8: 83 81 00 40 lwz r28,64(r1) ffc0a4bc: 83 a1 00 44 lwz r29,68(r1) ffc0a4c0: 83 c1 00 48 lwz r30,72(r1) ffc0a4c4: 83 e1 00 4c lwz r31,76(r1) ffc0a4c8: 38 21 00 50 addi r1,r1,80 ffc0a4cc: 4e 80 00 20 blr /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); if (result != 0) { free (req); ffc0a4d0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0a4d4: 4b ff b6 4d bl ffc05b20 <== NOT EXECUTED } } pthread_mutex_unlock (&aio_request_queue.mutex); return 0; } ffc0a4d8: 80 01 00 54 lwz r0,84(r1) <== NOT EXECUTED ffc0a4dc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0a4e0: 83 41 00 38 lwz r26,56(r1) <== NOT EXECUTED ffc0a4e4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a4e8: 83 61 00 3c lwz r27,60(r1) <== NOT EXECUTED ffc0a4ec: 83 81 00 40 lwz r28,64(r1) <== NOT EXECUTED ffc0a4f0: 83 a1 00 44 lwz r29,68(r1) <== NOT EXECUTED ffc0a4f4: 83 c1 00 48 lwz r30,72(r1) <== NOT EXECUTED ffc0a4f8: 83 e1 00 4c lwz r31,76(r1) <== NOT EXECUTED ffc0a4fc: 38 21 00 50 addi r1,r1,80 <== NOT EXECUTED ffc0a500: 4e 80 00 20 blr <== NOT EXECUTED if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc0a504: 80 89 00 00 lwz r4,0(r9) ffc0a508: 38 7f 00 48 addi r3,r31,72 ffc0a50c: 38 a0 00 01 li r5,1 ffc0a510: 4b ff f9 1d bl ffc09e2c if (r_chain->new_fd == 1) { ffc0a514: 80 03 00 18 lwz r0,24(r3) if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc0a518: 7c 7c 1b 78 mr r28,r3 if (r_chain->new_fd == 1) { ffc0a51c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a520: 40 9e ff 54 bne+ cr7,ffc0a474 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); ffc0a524: 7f a4 eb 78 mr r4,r29 ffc0a528: 38 63 00 08 addi r3,r3,8 ffc0a52c: 48 00 2f 01 bl ffc0d42c <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; ffc0a530: 93 dc 00 18 stw r30,24(r28) pthread_mutex_init (&r_chain->mutex, NULL); ffc0a534: 38 80 00 00 li r4,0 ffc0a538: 38 7c 00 1c addi r3,r28,28 ffc0a53c: 48 00 09 7d bl ffc0aeb8 pthread_cond_init (&r_chain->cond, NULL); ffc0a540: 38 80 00 00 li r4,0 ffc0a544: 38 7c 00 20 addi r3,r28,32 ffc0a548: 48 00 03 d1 bl ffc0a918 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, ffc0a54c: 3c a0 ff c1 lis r5,-63 ffc0a550: 38 61 00 08 addi r3,r1,8 ffc0a554: 38 9f 00 08 addi r4,r31,8 ffc0a558: 38 a5 9f 3c addi r5,r5,-24772 ffc0a55c: 7f 86 e3 78 mr r6,r28 ffc0a560: 48 00 0d 85 bl ffc0b2e4 rtems_aio_handle, (void *) r_chain); if (result != 0) { ffc0a564: 7c 7d 1b 79 mr. r29,r3 ffc0a568: 40 82 00 88 bne- ffc0a5f0 <== NEVER TAKEN pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; ffc0a56c: 81 3f 00 64 lwz r9,100(r31) ffc0a570: 38 09 00 01 addi r0,r9,1 ffc0a574: 90 1f 00 64 stw r0,100(r31) ffc0a578: 4b ff ff 24 b ffc0a49c } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc0a57c: 81 3d 00 14 lwz r9,20(r29) ffc0a580: 38 7b 00 0c addi r3,r27,12 ffc0a584: 38 a0 00 01 li r5,1 ffc0a588: 80 89 00 00 lwz r4,0(r9) ffc0a58c: 4b ff f8 a1 bl ffc09e2c if (r_chain->new_fd == 1) { ffc0a590: 80 03 00 18 lwz r0,24(r3) } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc0a594: 7c 7a 1b 78 mr r26,r3 if (r_chain->new_fd == 1) { ffc0a598: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a59c: 41 9e 00 14 beq- cr7,ffc0a5b0 pthread_cond_init (&r_chain->cond, NULL); pthread_cond_signal (&aio_request_queue.new_req); ++aio_request_queue.idle_threads; } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); ffc0a5a0: 38 63 00 08 addi r3,r3,8 ffc0a5a4: 7f a4 eb 78 mr r4,r29 ffc0a5a8: 4b ff fc 7d bl ffc0a224 ffc0a5ac: 4b ff fe f0 b ffc0a49c ffc0a5b0: 38 63 00 08 addi r3,r3,8 ffc0a5b4: 7f a4 eb 78 mr r4,r29 ffc0a5b8: 48 00 2e 75 bl ffc0d42c <_Chain_Insert> if (r_chain->new_fd == 1) { /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; ffc0a5bc: 93 9a 00 18 stw r28,24(r26) pthread_mutex_init (&r_chain->mutex, NULL); ffc0a5c0: 38 80 00 00 li r4,0 ffc0a5c4: 38 7a 00 1c addi r3,r26,28 ffc0a5c8: 48 00 08 f1 bl ffc0aeb8 pthread_cond_init (&r_chain->cond, NULL); ffc0a5cc: 38 80 00 00 li r4,0 ffc0a5d0: 38 7a 00 20 addi r3,r26,32 ffc0a5d4: 48 00 03 45 bl ffc0a918 pthread_cond_signal (&aio_request_queue.new_req); ffc0a5d8: 38 7b ff bc addi r3,r27,-68 ffc0a5dc: 48 00 04 49 bl ffc0aa24 ++aio_request_queue.idle_threads; ffc0a5e0: 81 3f 00 68 lwz r9,104(r31) ffc0a5e4: 38 09 00 01 addi r0,r9,1 ffc0a5e8: 90 1f 00 68 stw r0,104(r31) ffc0a5ec: 4b ff fe b0 b ffc0a49c AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); ffc0a5f0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0a5f4: 48 00 0b 21 bl ffc0b114 <== NOT EXECUTED return result; ffc0a5f8: 7f be eb 78 mr r30,r29 <== NOT EXECUTED ffc0a5fc: 4b ff fe a8 b ffc0a4a4 <== NOT EXECUTED =============================================================================== ffc09f3c : * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f3c: 94 21 ff 98 stwu r1,-104(r1) <== NOT EXECUTED ffc09f40: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc09f44: 93 41 00 50 stw r26,80(r1) <== NOT EXECUTED The fd chain is already unlocked */ struct timespec timeout; pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); ffc09f48: 3f 40 00 00 lis r26,0 <== NOT EXECUTED ffc09f4c: 3b 5a 2c 08 addi r26,r26,11272 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f50: 90 01 00 6c stw r0,108(r1) <== NOT EXECUTED ffc09f54: 92 81 00 38 stw r20,56(r1) <== NOT EXECUTED ffc09f58: 93 e1 00 64 stw r31,100(r1) <== NOT EXECUTED ffc09f5c: 92 a1 00 3c stw r21,60(r1) <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc09f60: 3a ba 00 58 addi r21,r26,88 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f64: 92 c1 00 40 stw r22,64(r1) <== NOT EXECUTED if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc09f68: 3a da 00 04 addi r22,r26,4 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f6c: 92 e1 00 44 stw r23,68(r1) <== NOT EXECUTED /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ffc09f70: 3a fa 00 48 addi r23,r26,72 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f74: 93 01 00 48 stw r24,72(r1) <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); ffc09f78: 3b 01 00 0c addi r24,r1,12 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f7c: 93 21 00 4c stw r25,76(r1) <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; ffc09f80: 3b 20 ff ff li r25,-1 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f84: 93 61 00 54 stw r27,84(r1) <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); ffc09f88: 3b 61 00 08 addi r27,r1,8 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f8c: 93 81 00 58 stw r28,88(r1) <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); ffc09f90: 3b 81 00 14 addi r28,r1,20 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc09f94: 93 a1 00 5c stw r29,92(r1) <== NOT EXECUTED ffc09f98: 3b a3 00 1c addi r29,r3,28 <== NOT EXECUTED ffc09f9c: 93 c1 00 60 stw r30,96(r1) <== NOT EXECUTED ffc09fa0: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); ffc09fa4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09fa8: 48 00 10 a1 bl ffc0b048 <== NOT EXECUTED if (result != 0) ffc09fac: 7c 74 1b 79 mr. r20,r3 <== NOT EXECUTED ffc09fb0: 40 82 00 8c bne- ffc0a03c <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } ffc09fb4: 83 fe 00 08 lwz r31,8(r30) <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc09fb8: 38 1e 00 0c addi r0,r30,12 <== NOT EXECUTED /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { ffc09fbc: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED ffc09fc0: 41 9e 01 1c beq- cr7,ffc0a0dc <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); ffc09fc4: 48 00 1c 11 bl ffc0bbd4 <== NOT EXECUTED ffc09fc8: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED ffc09fcc: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED ffc09fd0: 48 00 16 21 bl ffc0b5f0 <== NOT EXECUTED param.sched_priority = req->priority; ffc09fd4: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED ffc09fd8: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); ffc09fdc: 48 00 1b f9 bl ffc0bbd4 <== NOT EXECUTED ffc09fe0: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED ffc09fe4: 80 9f 00 08 lwz r4,8(r31) <== NOT EXECUTED ffc09fe8: 48 00 1b fd bl ffc0bbe4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc09fec: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09ff0: 48 00 33 d1 bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); ffc09ff4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09ff8: 48 00 11 1d bl ffc0b114 <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { ffc09ffc: 82 9f 00 14 lwz r20,20(r31) <== NOT EXECUTED ffc0a000: 80 14 00 30 lwz r0,48(r20) <== NOT EXECUTED ffc0a004: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc0a008: 41 9e 00 b8 beq- cr7,ffc0a0c0 <== NOT EXECUTED ffc0a00c: 2f 80 00 03 cmpwi cr7,r0,3 <== NOT EXECUTED ffc0a010: 41 9e 00 a4 beq- cr7,ffc0a0b4 <== NOT EXECUTED ffc0a014: 2f 80 00 01 cmpwi cr7,r0,1 <== NOT EXECUTED ffc0a018: 41 9e 00 68 beq- cr7,ffc0a080 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; ffc0a01c: 93 34 00 38 stw r25,56(r20) <== NOT EXECUTED req->aiocbp->error_code = errno; ffc0a020: 48 00 cd b9 bl ffc16dd8 <__errno> <== NOT EXECUTED ffc0a024: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); ffc0a028: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; ffc0a02c: 90 14 00 34 stw r0,52(r20) <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); ffc0a030: 48 00 10 19 bl ffc0b048 <== NOT EXECUTED if (result != 0) ffc0a034: 7c 74 1b 79 mr. r20,r3 <== NOT EXECUTED ffc0a038: 41 82 ff 7c beq+ ffc09fb4 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } ffc0a03c: 80 01 00 6c lwz r0,108(r1) <== NOT EXECUTED ffc0a040: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0a044: 82 81 00 38 lwz r20,56(r1) <== NOT EXECUTED ffc0a048: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a04c: 82 a1 00 3c lwz r21,60(r1) <== NOT EXECUTED ffc0a050: 82 c1 00 40 lwz r22,64(r1) <== NOT EXECUTED ffc0a054: 82 e1 00 44 lwz r23,68(r1) <== NOT EXECUTED ffc0a058: 83 01 00 48 lwz r24,72(r1) <== NOT EXECUTED ffc0a05c: 83 21 00 4c lwz r25,76(r1) <== NOT EXECUTED ffc0a060: 83 41 00 50 lwz r26,80(r1) <== NOT EXECUTED ffc0a064: 83 61 00 54 lwz r27,84(r1) <== NOT EXECUTED ffc0a068: 83 81 00 58 lwz r28,88(r1) <== NOT EXECUTED ffc0a06c: 83 a1 00 5c lwz r29,92(r1) <== NOT EXECUTED ffc0a070: 83 c1 00 60 lwz r30,96(r1) <== NOT EXECUTED ffc0a074: 83 e1 00 64 lwz r31,100(r1) <== NOT EXECUTED ffc0a078: 38 21 00 68 addi r1,r1,104 <== NOT EXECUTED ffc0a07c: 4e 80 00 20 blr <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); switch (req->aiocbp->aio_lio_opcode) { case LIO_READ: result = pread (req->aiocbp->aio_fildes, ffc0a080: 80 74 00 00 lwz r3,0(r20) <== NOT EXECUTED ffc0a084: 80 94 00 10 lwz r4,16(r20) <== NOT EXECUTED ffc0a088: 80 b4 00 14 lwz r5,20(r20) <== NOT EXECUTED ffc0a08c: 80 f4 00 08 lwz r7,8(r20) <== NOT EXECUTED ffc0a090: 81 14 00 0c lwz r8,12(r20) <== NOT EXECUTED ffc0a094: 48 00 dc a1 bl ffc17d34 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { ffc0a098: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED ffc0a09c: 41 9e 01 74 beq- cr7,ffc0a210 <== NOT EXECUTED req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; ffc0a0a0: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED req->aiocbp->error_code = 0; ffc0a0a4: 38 00 00 00 li r0,0 <== NOT EXECUTED } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; ffc0a0a8: 90 69 00 38 stw r3,56(r9) <== NOT EXECUTED req->aiocbp->error_code = 0; ffc0a0ac: 90 09 00 34 stw r0,52(r9) <== NOT EXECUTED ffc0a0b0: 4b ff fe f4 b ffc09fa4 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_SYNC: result = fsync (req->aiocbp->aio_fildes); ffc0a0b4: 80 74 00 00 lwz r3,0(r20) <== NOT EXECUTED ffc0a0b8: 48 00 8a a5 bl ffc12b5c <== NOT EXECUTED break; ffc0a0bc: 4b ff ff dc b ffc0a098 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_WRITE: result = pwrite (req->aiocbp->aio_fildes, ffc0a0c0: 80 74 00 00 lwz r3,0(r20) <== NOT EXECUTED ffc0a0c4: 80 94 00 10 lwz r4,16(r20) <== NOT EXECUTED ffc0a0c8: 80 b4 00 14 lwz r5,20(r20) <== NOT EXECUTED ffc0a0cc: 80 f4 00 08 lwz r7,8(r20) <== NOT EXECUTED ffc0a0d0: 81 14 00 0c lwz r8,12(r20) <== NOT EXECUTED ffc0a0d4: 48 00 dd 91 bl ffc17e64 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; ffc0a0d8: 4b ff ff c0 b ffc0a098 <== NOT EXECUTED wait for a signal on chain, this will unlock the queue. The fd chain is already unlocked */ struct timespec timeout; pthread_mutex_unlock (&r_chain->mutex); ffc0a0dc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0a0e0: 48 00 10 35 bl ffc0b114 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); ffc0a0e4: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc0a0e8: 48 00 0f 61 bl ffc0b048 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) ffc0a0ec: 80 1e 00 08 lwz r0,8(r30) <== NOT EXECUTED ffc0a0f0: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED ffc0a0f4: 40 9e fe b0 bne+ cr7,ffc09fa4 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); ffc0a0f8: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc0a0fc: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc0a100: 48 00 06 69 bl ffc0a768 <== NOT EXECUTED timeout.tv_sec += 3; ffc0a104: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, ffc0a108: 3b fe 00 20 addi r31,r30,32 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; ffc0a10c: 92 81 00 10 stw r20,16(r1) <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc0a110: 38 09 00 03 addi r0,r9,3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, ffc0a114: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc0a118: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, ffc0a11c: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc0a120: 7f 05 c3 78 mr r5,r24 <== NOT EXECUTED ffc0a124: 48 00 09 dd bl ffc0ab00 <== NOT EXECUTED &aio_request_queue.mutex, &timeout); /* If no requests were added to the chain we delete the fd chain from the queue and start working with idle fd chains */ if (result == ETIMEDOUT) { ffc0a128: 2f 83 00 74 cmpwi cr7,r3,116 <== NOT EXECUTED ffc0a12c: 40 9e fe 78 bne+ cr7,ffc09fa4 <== NOT EXECUTED ffc0a130: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0a134: 48 00 32 8d bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); ffc0a138: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0a13c: 48 00 0b b9 bl ffc0acf4 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); ffc0a140: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0a144: 48 00 06 c5 bl ffc0a808 <== NOT EXECUTED free (r_chain); ffc0a148: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0a14c: 4b ff b9 d5 bl ffc05b20 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc0a150: 80 1a 00 54 lwz r0,84(r26) <== NOT EXECUTED ffc0a154: 7f 80 a8 00 cmpw cr7,r0,r21 <== NOT EXECUTED ffc0a158: 41 9e 00 10 beq- cr7,ffc0a168 <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; } else /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); ffc0a15c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc0a160: 48 00 0f b5 bl ffc0b114 <== NOT EXECUTED ffc0a164: 4b ff fe 40 b ffc09fa4 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; ffc0a168: 80 1a 00 68 lwz r0,104(r26) <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); ffc0a16c: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc0a170: 38 60 00 01 li r3,1 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; ffc0a174: 30 00 00 01 addic r0,r0,1 <== NOT EXECUTED ffc0a178: 90 1a 00 68 stw r0,104(r26) <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); ffc0a17c: 48 00 05 ed bl ffc0a768 <== NOT EXECUTED timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc0a180: 7e c3 b3 78 mr r3,r22 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc0a184: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc0a188: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc0a18c: 7f 05 c3 78 mr r5,r24 <== NOT EXECUTED signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; ffc0a190: 92 81 00 10 stw r20,16(r1) <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc0a194: 30 00 00 03 addic r0,r0,3 <== NOT EXECUTED ffc0a198: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc0a19c: 48 00 09 65 bl ffc0ab00 <== NOT EXECUTED &aio_request_queue.mutex, &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { ffc0a1a0: 2f 83 00 74 cmpwi cr7,r3,116 <== NOT EXECUTED ffc0a1a4: 41 9e 00 74 beq- cr7,ffc0a218 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } ffc0a1a8: 83 fa 00 54 lwz r31,84(r26) <== NOT EXECUTED return NULL; } /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; ffc0a1ac: 80 1a 00 68 lwz r0,104(r26) <== NOT EXECUTED ffc0a1b0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0a1b4: 30 00 ff ff addic r0,r0,-1 <== NOT EXECUTED ffc0a1b8: 90 1a 00 68 stw r0,104(r26) <== NOT EXECUTED ffc0a1bc: 48 00 32 05 bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ffc0a1c0: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc0a1c4: 80 9f 00 14 lwz r4,20(r31) <== NOT EXECUTED ffc0a1c8: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc0a1cc: 4b ff fc 61 bl ffc09e2c <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); ffc0a1d0: 38 80 00 00 li r4,0 <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; ffc0a1d4: 92 83 00 18 stw r20,24(r3) <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); ffc0a1d8: 3b a3 00 1c addi r29,r3,28 <== NOT EXECUTED /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ffc0a1dc: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); ffc0a1e0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0a1e4: 48 00 0c d5 bl ffc0aeb8 <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); ffc0a1e8: 38 7e 00 20 addi r3,r30,32 <== NOT EXECUTED ffc0a1ec: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0a1f0: 48 00 07 29 bl ffc0a918 <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; ffc0a1f4: 81 7f 00 08 lwz r11,8(r31) <== NOT EXECUTED ffc0a1f8: 81 3f 00 0c lwz r9,12(r31) <== NOT EXECUTED ffc0a1fc: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc0a200: 91 7e 00 08 stw r11,8(r30) <== NOT EXECUTED ffc0a204: 91 3e 00 0c stw r9,12(r30) <== NOT EXECUTED ffc0a208: 90 1e 00 10 stw r0,16(r30) <== NOT EXECUTED ffc0a20c: 4b ff fd 98 b ffc09fa4 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { ffc0a210: 82 9f 00 14 lwz r20,20(r31) <== NOT EXECUTED ffc0a214: 4b ff fe 08 b ffc0a01c <== NOT EXECUTED &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { pthread_mutex_unlock (&aio_request_queue.mutex); ffc0a218: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc0a21c: 48 00 0e f9 bl ffc0b114 <== NOT EXECUTED return NULL; ffc0a220: 4b ff fe 1c b ffc0a03c <== NOT EXECUTED =============================================================================== ffc09ce0 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { ffc09ce0: 94 21 ff e8 stwu r1,-24(r1) ffc09ce4: 7c 08 02 a6 mflr r0 ffc09ce8: 93 c1 00 10 stw r30,16(r1) int result = 0; result = pthread_attr_init (&aio_request_queue.attr); ffc09cec: 3f c0 00 00 lis r30,0 ffc09cf0: 3b de 2c 10 addi r30,r30,11280 ffc09cf4: 7f c3 f3 78 mr r3,r30 * 0 - if initialization succeeded */ int rtems_aio_init (void) { ffc09cf8: 93 a1 00 0c stw r29,12(r1) ffc09cfc: 90 01 00 1c stw r0,28(r1) ffc09d00: 93 e1 00 14 stw r31,20(r1) int result = 0; result = pthread_attr_init (&aio_request_queue.attr); ffc09d04: 48 00 15 75 bl ffc0b278 if (result != 0) ffc09d08: 7c 7d 1b 79 mr. r29,r3 ffc09d0c: 41 82 00 24 beq- ffc09d30 <== ALWAYS TAKEN aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } ffc09d10: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc09d14: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc09d18: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc09d1c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc09d20: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc09d24: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc09d28: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc09d2c: 4e 80 00 20 blr <== NOT EXECUTED result = pthread_attr_init (&aio_request_queue.attr); if (result != 0) return result; result = ffc09d30: 7f c3 f3 78 mr r3,r30 ffc09d34: 38 80 00 00 li r4,0 ffc09d38: 48 00 15 81 bl ffc0b2b8 pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) ffc09d3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09d40: 40 9e 00 94 bne- cr7,ffc09dd4 <== NEVER TAKEN pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); ffc09d44: 3f e0 00 00 lis r31,0 ffc09d48: 3b ff 2c 08 addi r31,r31,11272 ffc09d4c: 7f e3 fb 78 mr r3,r31 ffc09d50: 38 80 00 00 li r4,0 ffc09d54: 48 00 11 65 bl ffc0aeb8 if (result != 0) ffc09d58: 2f 83 00 00 cmpwi cr7,r3,0 ffc09d5c: 40 9e 00 9c bne- cr7,ffc09df8 <== NEVER TAKEN pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); ffc09d60: 3c 60 00 00 lis r3,0 ffc09d64: 38 63 2c 0c addi r3,r3,11276 ffc09d68: 38 80 00 00 li r4,0 ffc09d6c: 48 00 0b ad bl ffc0a918 if (result != 0) { ffc09d70: 7c 7d 1b 79 mr. r29,r3 ffc09d74: 40 82 00 a4 bne- ffc09e18 <== NEVER TAKEN { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc09d78: 38 00 00 00 li r0,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc09d7c: 39 1f 00 4c addi r8,r31,76 head->previous = NULL; ffc09d80: 90 1f 00 4c stw r0,76(r31) tail->previous = head; ffc09d84: 39 5f 00 48 addi r10,r31,72 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc09d88: 39 7f 00 58 addi r11,r31,88 head->previous = NULL; ffc09d8c: 90 1f 00 58 stw r0,88(r31) tail->previous = head; ffc09d90: 39 3f 00 54 addi r9,r31,84 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc09d94: 91 1f 00 48 stw r8,72(r31) aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } ffc09d98: 7f a3 eb 78 mr r3,r29 head->previous = NULL; tail->previous = head; ffc09d9c: 91 5f 00 50 stw r10,80(r31) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc09da0: 91 7f 00 54 stw r11,84(r31) head->previous = NULL; tail->previous = head; ffc09da4: 91 3f 00 5c stw r9,92(r31) } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; ffc09da8: 90 1f 00 64 stw r0,100(r31) aio_request_queue.idle_threads = 0; ffc09dac: 90 1f 00 68 stw r0,104(r31) aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; ffc09db0: 60 00 b0 0b ori r0,r0,45067 ffc09db4: 90 1f 00 60 stw r0,96(r31) return result; } ffc09db8: 80 01 00 1c lwz r0,28(r1) ffc09dbc: 83 a1 00 0c lwz r29,12(r1) ffc09dc0: 7c 08 03 a6 mtlr r0 ffc09dc4: 83 c1 00 10 lwz r30,16(r1) ffc09dc8: 83 e1 00 14 lwz r31,20(r1) ffc09dcc: 38 21 00 18 addi r1,r1,24 ffc09dd0: 4e 80 00 20 blr PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); ffc09dd4: 3f e0 00 00 lis r31,0 <== NOT EXECUTED result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); ffc09dd8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); ffc09ddc: 3b ff 2c 08 addi r31,r31,11272 <== NOT EXECUTED result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); ffc09de0: 48 00 14 71 bl ffc0b250 <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); ffc09de4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09de8: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc09dec: 48 00 10 cd bl ffc0aeb8 <== NOT EXECUTED if (result != 0) ffc09df0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc09df4: 41 9e ff 6c beq+ cr7,ffc09d60 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); ffc09df8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09dfc: 48 00 14 55 bl ffc0b250 <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); ffc09e00: 3c 60 00 00 lis r3,0 <== NOT EXECUTED ffc09e04: 38 63 2c 0c addi r3,r3,11276 <== NOT EXECUTED ffc09e08: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc09e0c: 48 00 0b 0d bl ffc0a918 <== NOT EXECUTED if (result != 0) { ffc09e10: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED ffc09e14: 41 82 ff 64 beq+ ffc09d78 <== NOT EXECUTED pthread_mutex_destroy (&aio_request_queue.mutex); ffc09e18: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09e1c: 48 00 0e d9 bl ffc0acf4 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); ffc09e20: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09e24: 48 00 14 2d bl ffc0b250 <== NOT EXECUTED ffc09e28: 4b ff ff 50 b ffc09d78 <== NOT EXECUTED =============================================================================== ffc0a224 : * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { ffc0a224: 94 21 ff f8 stwu r1,-8(r1) ffc0a228: 7c 08 02 a6 mflr r0 ffc0a22c: 7c 8b 23 78 mr r11,r4 ffc0a230: 90 01 00 0c stw r0,12(r1) ffc0a234: 38 03 00 04 addi r0,r3,4 } AIO_printf ("Thread finished\n"); return NULL; } ffc0a238: 81 23 00 00 lwz r9,0(r3) rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { ffc0a23c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a240: 41 9e 00 44 beq- cr7,ffc0a284 <== NEVER TAKEN rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && ffc0a244: 81 04 00 14 lwz r8,20(r4) if (rtems_chain_is_empty (chain)) { AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; ffc0a248: 81 49 00 14 lwz r10,20(r9) while (req->aiocbp->aio_reqprio > prio && ffc0a24c: 81 08 00 18 lwz r8,24(r8) ffc0a250: 81 4a 00 18 lwz r10,24(r10) ffc0a254: 7f 8a 40 00 cmpw cr7,r10,r8 ffc0a258: 41 bc 00 0c blt+ cr7,ffc0a264 <== NEVER TAKEN ffc0a25c: 48 00 00 20 b ffc0a27c ffc0a260: 41 9a 00 1c beq- cr6,ffc0a27c <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } ffc0a264: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; ffc0a268: 81 49 00 14 lwz r10,20(r9) <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && ffc0a26c: 7f 09 00 00 cmpw cr6,r9,r0 <== NOT EXECUTED ffc0a270: 81 4a 00 18 lwz r10,24(r10) <== NOT EXECUTED ffc0a274: 7f 8a 40 00 cmpw cr7,r10,r8 <== NOT EXECUTED ffc0a278: 41 9c ff e8 blt+ cr7,ffc0a260 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); ffc0a27c: 80 69 00 04 lwz r3,4(r9) ffc0a280: 7d 64 5b 78 mr r4,r11 ffc0a284: 48 00 31 a9 bl ffc0d42c <_Chain_Insert> } rtems_chain_insert (node->previous, &req->next_prio); } } ffc0a288: 80 01 00 0c lwz r0,12(r1) ffc0a28c: 38 21 00 08 addi r1,r1,8 ffc0a290: 7c 08 03 a6 mtlr r0 ffc0a294: 4e 80 00 20 blr =============================================================================== ffc0a298 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { ffc0a298: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc0a29c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0a2a0: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED ffc0a2a4: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc0a2a8: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED ffc0a2ac: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } ffc0a2b0: 83 e3 00 08 lwz r31,8(r3) <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0a2b4: 38 63 00 0c addi r3,r3,12 <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) ffc0a2b8: 7f 9f 18 00 cmpw cr7,r31,r3 <== NOT EXECUTED ffc0a2bc: 41 9e 00 50 beq- cr7,ffc0a30c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc0a2c0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0a2c4: 48 00 30 fd bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; ffc0a2c8: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED ffc0a2cc: 38 00 00 8c li r0,140 <== NOT EXECUTED ffc0a2d0: 90 09 00 34 stw r0,52(r9) <== NOT EXECUTED req->aiocbp->return_value = -1; ffc0a2d4: 38 00 ff ff li r0,-1 <== NOT EXECUTED free (req); ffc0a2d8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; ffc0a2dc: 90 09 00 38 stw r0,56(r9) <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; ffc0a2e0: 3b a0 00 8c li r29,140 <== NOT EXECUTED req->aiocbp->return_value = -1; ffc0a2e4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED free (req); ffc0a2e8: 4b ff b8 39 bl ffc05b20 <== NOT EXECUTED ffc0a2ec: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0a2f0: 48 00 30 d1 bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; ffc0a2f4: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED req->aiocbp->return_value = -1; free (req); ffc0a2f8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; ffc0a2fc: 93 a9 00 34 stw r29,52(r9) <== NOT EXECUTED req->aiocbp->return_value = -1; ffc0a300: 93 c9 00 38 stw r30,56(r9) <== NOT EXECUTED free (req); ffc0a304: 4b ff b8 1d bl ffc05b20 <== NOT EXECUTED ffc0a308: 4b ff ff e4 b ffc0a2ec <== NOT EXECUTED } } ffc0a30c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc0a310: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc0a314: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a318: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0a31c: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0a320: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0a324: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0a328 : * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { ffc0a328: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc0a32c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0a330: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc0a334: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED ffc0a338: 38 03 00 04 addi r0,r3,4 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } ffc0a33c: 83 e3 00 00 lwz r31,0(r3) <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; ffc0a340: 38 60 00 01 li r3,1 <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { ffc0a344: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED ffc0a348: 40 be 00 14 bne+ cr7,ffc0a35c <== NOT EXECUTED ffc0a34c: 48 00 00 44 b ffc0a390 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } ffc0a350: 83 ff 00 00 lwz r31,0(r31) <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { ffc0a354: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED ffc0a358: 41 9e 00 4c beq- cr7,ffc0a3a4 <== NOT EXECUTED ffc0a35c: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED ffc0a360: 7f 89 20 00 cmpw cr7,r9,r4 <== NOT EXECUTED ffc0a364: 40 9e ff ec bne+ cr7,ffc0a350 <== NOT EXECUTED ffc0a368: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0a36c: 48 00 30 55 bl ffc0d3c0 <_Chain_Extract> <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; ffc0a370: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED ffc0a374: 38 00 00 8c li r0,140 <== NOT EXECUTED ffc0a378: 90 09 00 34 stw r0,52(r9) <== NOT EXECUTED current->aiocbp->return_value = -1; ffc0a37c: 38 00 ff ff li r0,-1 <== NOT EXECUTED free (current); ffc0a380: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; ffc0a384: 90 09 00 38 stw r0,56(r9) <== NOT EXECUTED free (current); ffc0a388: 4b ff b7 99 bl ffc05b20 <== NOT EXECUTED } return AIO_CANCELED; ffc0a38c: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc0a390: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0a394: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0a398: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0a39c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a3a0: 4e 80 00 20 blr <== NOT EXECUTED ffc0a3a4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; ffc0a3a8: 38 60 00 01 li r3,1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } ffc0a3ac: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0a3b0: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0a3b4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a3b8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc13b5c : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc13b5c: 94 21 ff d0 stwu r1,-48(r1) ffc13b60: 7c 08 02 a6 mflr r0 ffc13b64: 93 e1 00 2c stw r31,44(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc13b68: 7c 7f 1b 79 mr. r31,r3 return RTEMS_INVALID_NAME; ffc13b6c: 38 60 00 03 li r3,3 rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc13b70: 93 a1 00 24 stw r29,36(r1) ffc13b74: 7c dd 33 78 mr r29,r6 ffc13b78: 90 01 00 34 stw r0,52(r1) ffc13b7c: 93 81 00 20 stw r28,32(r1) ffc13b80: 93 c1 00 28 stw r30,40(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc13b84: 41 82 00 90 beq- ffc13c14 return RTEMS_INVALID_NAME; if ( !id ) ffc13b88: 2f 86 00 00 cmpwi cr7,r6,0 return RTEMS_INVALID_ADDRESS; ffc13b8c: 38 60 00 09 li r3,9 CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) ffc13b90: 41 9e 00 84 beq- cr7,ffc13c14 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { ffc13b94: 70 80 00 10 andi. r0,r4,16 ffc13b98: 41 82 00 9c beq- ffc13c34 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) ffc13b9c: 2f 85 00 00 cmpwi cr7,r5,0 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc13ba0: 38 00 00 00 li r0,0 ffc13ba4: 90 01 00 08 stw r0,8(r1) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; ffc13ba8: 38 60 00 0a li r3,10 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) ffc13bac: 41 9e 00 68 beq- cr7,ffc13c14 ffc13bb0: 3d 20 00 00 lis r9,0 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; ffc13bb4: 90 a1 00 0c stw r5,12(r1) ffc13bb8: 81 69 27 8c lwz r11,10124(r9) ffc13bbc: 38 0b 00 01 addi r0,r11,1 ffc13bc0: 90 09 27 8c stw r0,10124(r9) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); ffc13bc4: 3f 80 00 00 lis r28,0 ffc13bc8: 90 81 00 18 stw r4,24(r1) ffc13bcc: 3b 9c 34 dc addi r28,r28,13532 ffc13bd0: 7f 83 e3 78 mr r3,r28 ffc13bd4: 4b ff 97 fd bl ffc0d3d0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc13bd8: 80 81 00 18 lwz r4,24(r1) ffc13bdc: 7c 7e 1b 79 mr. r30,r3 ffc13be0: 41 82 00 90 beq- ffc13c70 <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; ffc13be4: 90 9e 00 10 stw r4,16(r30) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc13be8: 38 7e 00 14 addi r3,r30,20 ffc13bec: 38 81 00 08 addi r4,r1,8 ffc13bf0: 48 00 0a d1 bl ffc146c0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc13bf4: 80 1e 00 08 lwz r0,8(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc13bf8: 81 7c 00 1c lwz r11,28(r28) ffc13bfc: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc13c00: 7f cb 49 2e stwx r30,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc13c04: 93 fe 00 0c stw r31,12(r30) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; ffc13c08: 90 1d 00 00 stw r0,0(r29) _Thread_Enable_dispatch(); ffc13c0c: 4b ff ad 3d bl ffc0e948 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc13c10: 38 60 00 00 li r3,0 } ffc13c14: 80 01 00 34 lwz r0,52(r1) ffc13c18: 83 81 00 20 lwz r28,32(r1) ffc13c1c: 7c 08 03 a6 mtlr r0 ffc13c20: 83 a1 00 24 lwz r29,36(r1) ffc13c24: 83 c1 00 28 lwz r30,40(r1) ffc13c28: 83 e1 00 2c lwz r31,44(r1) ffc13c2c: 38 21 00 30 addi r1,r1,48 ffc13c30: 4e 80 00 20 blr ffc13c34: 3d 20 00 00 lis r9,0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; ffc13c38: 90 a1 00 0c stw r5,12(r1) if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; ffc13c3c: 38 00 00 01 li r0,1 ffc13c40: 81 69 27 8c lwz r11,10124(r9) ffc13c44: 90 01 00 08 stw r0,8(r1) ffc13c48: 38 0b 00 01 addi r0,r11,1 ffc13c4c: 90 09 27 8c stw r0,10124(r9) ffc13c50: 3f 80 00 00 lis r28,0 ffc13c54: 90 81 00 18 stw r4,24(r1) ffc13c58: 3b 9c 34 dc addi r28,r28,13532 ffc13c5c: 7f 83 e3 78 mr r3,r28 ffc13c60: 4b ff 97 71 bl ffc0d3d0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc13c64: 80 81 00 18 lwz r4,24(r1) ffc13c68: 7c 7e 1b 79 mr. r30,r3 ffc13c6c: 40 82 ff 78 bne+ ffc13be4 _Thread_Enable_dispatch(); ffc13c70: 4b ff ac d9 bl ffc0e948 <_Thread_Enable_dispatch> *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc13c74: 80 01 00 34 lwz r0,52(r1) the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; ffc13c78: 38 60 00 05 li r3,5 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc13c7c: 83 81 00 20 lwz r28,32(r1) ffc13c80: 7c 08 03 a6 mtlr r0 ffc13c84: 83 a1 00 24 lwz r29,36(r1) ffc13c88: 83 c1 00 28 lwz r30,40(r1) ffc13c8c: 83 e1 00 2c lwz r31,44(r1) ffc13c90: 38 21 00 30 addi r1,r1,48 ffc13c94: 4e 80 00 20 blr =============================================================================== ffc09f04 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc09f04: 94 21 ff f0 stwu r1,-16(r1) ffc09f08: 7c 08 02 a6 mflr r0 ffc09f0c: 93 c1 00 08 stw r30,8(r1) ffc09f10: 7c de 33 78 mr r30,r6 ffc09f14: 93 e1 00 0c stw r31,12(r1) ffc09f18: 7c bf 2b 78 mr r31,r5 ffc09f1c: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); ffc09f20: 48 00 07 b9 bl ffc0a6d8 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc09f24: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc09f28: 38 60 00 00 li r3,0 bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc09f2c: 41 be 00 10 beq+ cr7,ffc09f3c <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc09f30: 7f e3 fb 78 mr r3,r31 ffc09f34: 7f c4 f3 78 mr r4,r30 ffc09f38: 4b ff f2 01 bl ffc09138 } return sc; } ffc09f3c: 80 01 00 14 lwz r0,20(r1) ffc09f40: 83 c1 00 08 lwz r30,8(r1) ffc09f44: 7c 08 03 a6 mtlr r0 ffc09f48: 83 e1 00 0c lwz r31,12(r1) ffc09f4c: 38 21 00 10 addi r1,r1,16 ffc09f50: 4e 80 00 20 blr =============================================================================== ffc09fa8 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { ffc09fa8: 94 21 ff d0 stwu r1,-48(r1) ffc09fac: 7c 08 02 a6 mflr r0 ffc09fb0: 93 e1 00 2c stw r31,44(r1) ffc09fb4: 90 01 00 34 stw r0,52(r1) ffc09fb8: 93 41 00 18 stw r26,24(r1) ffc09fbc: 7c da 33 78 mr r26,r6 ffc09fc0: 93 61 00 1c stw r27,28(r1) ffc09fc4: 7c 7b 1b 78 mr r27,r3 ffc09fc8: 93 81 00 20 stw r28,32(r1) ffc09fcc: 7c 9c 23 78 mr r28,r4 ffc09fd0: 93 a1 00 24 stw r29,36(r1) ffc09fd4: 7c bd 2b 78 mr r29,r5 ffc09fd8: 93 c1 00 28 stw r30,40(r1) while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( ffc09fdc: 3b c1 00 08 addi r30,r1,8 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc09fe0: 7f 63 db 78 mr r3,r27 ffc09fe4: 48 00 07 ed bl ffc0a7d0 <_Chain_Get> ffc09fe8: 38 80 00 00 li r4,0 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc09fec: 7c 7f 1b 79 mr. r31,r3 ) { rtems_event_set out; sc = rtems_event_receive( ffc09ff0: 7f a5 eb 78 mr r5,r29 ffc09ff4: 7f c6 f3 78 mr r6,r30 ffc09ff8: 7f 83 e3 78 mr r3,r28 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc09ffc: 40 82 00 3c bne- ffc0a038 ) { rtems_event_set out; sc = rtems_event_receive( ffc0a000: 4b ff ef 35 bl ffc08f34 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( ffc0a004: 2c 03 00 00 cmpwi r3,0 ffc0a008: 41 82 ff d8 beq+ ffc09fe0 <== NEVER TAKEN } *node_ptr = node; return sc; } ffc0a00c: 80 01 00 34 lwz r0,52(r1) timeout, &out ); } *node_ptr = node; ffc0a010: 93 fa 00 00 stw r31,0(r26) return sc; } ffc0a014: 7c 08 03 a6 mtlr r0 ffc0a018: 83 41 00 18 lwz r26,24(r1) ffc0a01c: 83 61 00 1c lwz r27,28(r1) ffc0a020: 83 81 00 20 lwz r28,32(r1) ffc0a024: 83 a1 00 24 lwz r29,36(r1) ffc0a028: 83 c1 00 28 lwz r30,40(r1) ffc0a02c: 83 e1 00 2c lwz r31,44(r1) ffc0a030: 38 21 00 30 addi r1,r1,48 ffc0a034: 4e 80 00 20 blr ffc0a038: 80 01 00 34 lwz r0,52(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc0a03c: 38 60 00 00 li r3,0 timeout, &out ); } *node_ptr = node; ffc0a040: 93 fa 00 00 stw r31,0(r26) return sc; } ffc0a044: 7c 08 03 a6 mtlr r0 ffc0a048: 83 41 00 18 lwz r26,24(r1) ffc0a04c: 83 61 00 1c lwz r27,28(r1) ffc0a050: 83 81 00 20 lwz r28,32(r1) ffc0a054: 83 a1 00 24 lwz r29,36(r1) ffc0a058: 83 c1 00 28 lwz r30,40(r1) ffc0a05c: 83 e1 00 2c lwz r31,44(r1) ffc0a060: 38 21 00 30 addi r1,r1,48 ffc0a064: 4e 80 00 20 blr =============================================================================== ffc0a068 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc0a068: 94 21 ff f0 stwu r1,-16(r1) ffc0a06c: 7c 08 02 a6 mflr r0 ffc0a070: 93 c1 00 08 stw r30,8(r1) ffc0a074: 7c de 33 78 mr r30,r6 ffc0a078: 93 e1 00 0c stw r31,12(r1) ffc0a07c: 7c bf 2b 78 mr r31,r5 ffc0a080: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); ffc0a084: 48 00 07 bd bl ffc0a840 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc0a088: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc0a08c: 38 60 00 00 li r3,0 bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc0a090: 41 be 00 10 beq+ cr7,ffc0a0a0 <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc0a094: 7f e3 fb 78 mr r3,r31 ffc0a098: 7f c4 f3 78 mr r4,r30 ffc0a09c: 4b ff f0 9d bl ffc09138 } return sc; } ffc0a0a0: 80 01 00 14 lwz r0,20(r1) ffc0a0a4: 83 c1 00 08 lwz r30,8(r1) ffc0a0a8: 7c 08 03 a6 mtlr r0 ffc0a0ac: 83 e1 00 0c lwz r31,12(r1) ffc0a0b0: 38 21 00 10 addi r1,r1,16 ffc0a0b4: 4e 80 00 20 blr =============================================================================== ffc0ae6c : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0ae6c: 94 21 ff f0 stwu r1,-16(r1) ffc0ae70: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0ae74: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0ae78: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0ae7c: 80 09 31 8c lwz r0,12684(r9) rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc0ae80: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0ae84: 93 e1 00 0c stw r31,12(r1) ffc0ae88: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0ae8c: 2f 80 00 00 cmpwi cr7,r0,0 return RTEMS_CALLED_FROM_ISR; ffc0ae90: 38 60 00 12 li r3,18 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc0ae94: 80 09 27 e0 lwz r0,10208(r9) if ( rtems_interrupt_is_in_progress() ) ffc0ae98: 40 9e 00 ec bne- cr7,ffc0af84 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0ae9c: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0aea0: 38 60 00 09 li r3,9 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0aea4: 41 9e 00 e0 beq- cr7,ffc0af84 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0aea8: 2f 84 00 00 cmpwi cr7,r4,0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; ffc0aeac: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0aeb0: 41 9e 00 d4 beq- cr7,ffc0af84 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0aeb4: 81 64 00 00 lwz r11,0(r4) ffc0aeb8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0aebc: 41 9e 01 14 beq- cr7,ffc0afd0 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0aec0: 7f 80 f8 40 cmplw cr7,r0,r31 return RTEMS_INVALID_NUMBER; ffc0aec4: 38 60 00 0a li r3,10 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0aec8: 40 9d 00 bc ble- cr7,ffc0af84 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0aecc: 3d 60 00 00 lis r11,0 ffc0aed0: 81 4b 27 88 lwz r10,10120(r11) ffc0aed4: 38 0a 00 01 addi r0,r10,1 ffc0aed8: 90 0b 27 88 stw r0,10120(r11) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0aedc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0aee0: 40 9e 00 b8 bne- cr7,ffc0af98 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0aee4: 81 49 27 e0 lwz r10,10208(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0aee8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0aeec: 41 9e 00 f4 beq- cr7,ffc0afe0 <== NEVER TAKEN ffc0aef0: 3d 60 00 00 lis r11,0 ffc0aef4: 7d 49 03 a6 mtctr r10 ffc0aef8: 81 2b 27 e4 lwz r9,10212(r11) ffc0aefc: 40 be 00 14 bne+ cr7,ffc0af10 <== ALWAYS TAKEN ffc0af00: 48 00 01 04 b ffc0b004 <== NOT EXECUTED ffc0af04: 3b ff 00 01 addi r31,r31,1 ffc0af08: 39 29 00 18 addi r9,r9,24 ffc0af0c: 42 40 00 1c bdz- ffc0af28 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0af10: 80 09 00 00 lwz r0,0(r9) ffc0af14: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af18: 40 9e ff ec bne+ cr7,ffc0af04 ffc0af1c: 80 09 00 04 lwz r0,4(r9) ffc0af20: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af24: 40 9e ff e0 bne+ cr7,ffc0af04 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0af28: 7f 8a f8 00 cmpw cr7,r10,r31 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0af2c: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc0af30: 1c 1f 00 18 mulli r0,r31,24 ffc0af34: 41 9e 00 b0 beq- cr7,ffc0afe4 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0af38: 81 6b 27 e4 lwz r11,10212(r11) ffc0af3c: 80 c4 00 00 lwz r6,0(r4) ffc0af40: 80 e4 00 04 lwz r7,4(r4) ffc0af44: 7d 2b 02 14 add r9,r11,r0 ffc0af48: 81 04 00 08 lwz r8,8(r4) ffc0af4c: 81 44 00 0c lwz r10,12(r4) ffc0af50: 7c cb 01 2e stwx r6,r11,r0 ffc0af54: 90 e9 00 04 stw r7,4(r9) ffc0af58: 91 09 00 08 stw r8,8(r9) ffc0af5c: 91 49 00 0c stw r10,12(r9) ffc0af60: 81 64 00 10 lwz r11,16(r4) ffc0af64: 80 04 00 14 lwz r0,20(r4) ffc0af68: 91 69 00 10 stw r11,16(r9) ffc0af6c: 90 09 00 14 stw r0,20(r9) _Thread_Enable_dispatch(); ffc0af70: 48 00 25 c5 bl ffc0d534 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0af74: 7f e3 fb 78 mr r3,r31 ffc0af78: 38 80 00 00 li r4,0 ffc0af7c: 38 a0 00 00 li r5,0 ffc0af80: 48 00 a6 71 bl ffc155f0 } ffc0af84: 80 01 00 14 lwz r0,20(r1) ffc0af88: 83 e1 00 0c lwz r31,12(r1) ffc0af8c: 38 21 00 10 addi r1,r1,16 ffc0af90: 7c 08 03 a6 mtlr r0 ffc0af94: 4e 80 00 20 blr _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0af98: 3d 60 00 00 lis r11,0 ffc0af9c: 1c 1f 00 18 mulli r0,r31,24 ffc0afa0: 81 2b 27 e4 lwz r9,10212(r11) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0afa4: 7d 49 00 2e lwzx r10,r9,r0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0afa8: 7d 29 02 14 add r9,r9,r0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0afac: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0afb0: 41 9e 00 40 beq- cr7,ffc0aff0 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); ffc0afb4: 48 00 25 81 bl ffc0d534 <_Thread_Enable_dispatch> _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0afb8: 80 01 00 14 lwz r0,20(r1) } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; ffc0afbc: 38 60 00 0c li r3,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0afc0: 83 e1 00 0c lwz r31,12(r1) ffc0afc4: 7c 08 03 a6 mtlr r0 ffc0afc8: 38 21 00 10 addi r1,r1,16 ffc0afcc: 4e 80 00 20 blr static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0afd0: 81 64 00 04 lwz r11,4(r4) ffc0afd4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0afd8: 40 9e fe e8 bne+ cr7,ffc0aec0 ffc0afdc: 4b ff ff a8 b ffc0af84 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0afe0: 93 e5 00 00 stw r31,0(r5) <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0afe4: 48 00 25 51 bl ffc0d534 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; ffc0afe8: 38 60 00 05 li r3,5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; ffc0afec: 4b ff ff 98 b ffc0af84 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0aff0: 81 29 00 04 lwz r9,4(r9) ffc0aff4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0aff8: 40 9e ff bc bne+ cr7,ffc0afb4 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0affc: 93 e5 00 00 stw r31,0(r5) ffc0b000: 4b ff ff 38 b ffc0af38 ffc0b004: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b008: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b00c: 4b ff ff 04 b ffc0af10 <== NOT EXECUTED =============================================================================== ffc0c9e0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c9e0: 94 21 ff e0 stwu r1,-32(r1) ffc0c9e4: 7c 08 02 a6 mflr r0 ffc0c9e8: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c9ec: 7c 60 1b 79 mr. r0,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c9f0: 93 81 00 10 stw r28,16(r1) ffc0c9f4: 93 a1 00 14 stw r29,20(r1) ffc0c9f8: 93 c1 00 18 stw r30,24(r1) ffc0c9fc: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0ca00: 90 01 00 08 stw r0,8(r1) ffc0ca04: 41 82 00 6c beq- ffc0ca70 <== NEVER TAKEN ffc0ca08: 3f a0 00 01 lis r29,1 ffc0ca0c: 3b bd aa 00 addi r29,r29,-22016 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0ca10: 3b 9d 00 0c addi r28,r29,12 #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0ca14: 85 3d 00 04 lwzu r9,4(r29) ffc0ca18: 83 c9 00 04 lwz r30,4(r9) if ( !information ) ffc0ca1c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ca20: 41 9e 00 48 beq- cr7,ffc0ca68 continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0ca24: a0 1e 00 10 lhz r0,16(r30) ffc0ca28: 70 09 ff ff andi. r9,r0,65535 ffc0ca2c: 41 82 00 3c beq- ffc0ca68 ffc0ca30: 3b e0 00 01 li r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0ca34: 81 7e 00 1c lwz r11,28(r30) ffc0ca38: 57 e9 10 3a rlwinm r9,r31,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0ca3c: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0ca40: 7c 6b 48 2e lwzx r3,r11,r9 if ( !the_thread ) ffc0ca44: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ca48: 41 9e 00 14 beq- cr7,ffc0ca5c continue; (*routine)(the_thread); ffc0ca4c: 80 01 00 08 lwz r0,8(r1) ffc0ca50: 7c 09 03 a6 mtctr r0 ffc0ca54: 4e 80 04 21 bctrl ffc0ca58: a0 1e 00 10 lhz r0,16(r30) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0ca5c: 54 09 04 3e clrlwi r9,r0,16 ffc0ca60: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0ca64: 40 9c ff d0 bge+ cr7,ffc0ca34 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0ca68: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0ca6c: 40 9e ff a8 bne+ cr7,ffc0ca14 (*routine)(the_thread); } } } ffc0ca70: 80 01 00 24 lwz r0,36(r1) ffc0ca74: 83 81 00 10 lwz r28,16(r1) ffc0ca78: 7c 08 03 a6 mtlr r0 ffc0ca7c: 83 a1 00 14 lwz r29,20(r1) ffc0ca80: 83 c1 00 18 lwz r30,24(r1) ffc0ca84: 83 e1 00 1c lwz r31,28(r1) ffc0ca88: 38 21 00 20 addi r1,r1,32 ffc0ca8c: 4e 80 00 20 blr =============================================================================== ffc0af6c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0af6c: 94 21 ff f0 stwu r1,-16(r1) ffc0af70: 7c 08 02 a6 mflr r0 ffc0af74: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0af78: 7c bf 2b 79 mr. r31,r5 rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0af7c: 90 01 00 14 stw r0,20(r1) /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; ffc0af80: 38 00 00 09 li r0,9 int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0af84: 41 82 00 7c beq- ffc0b000 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc0af88: 54 84 04 3e clrlwi r4,r4,16 ffc0af8c: 48 00 25 51 bl ffc0d4dc <_Objects_Get_information> if ( !obj_info ) return RTEMS_INVALID_NUMBER; ffc0af90: 38 00 00 0a li r0,10 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) ffc0af94: 2c 03 00 00 cmpwi r3,0 ffc0af98: 41 82 00 68 beq- ffc0b000 * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc0af9c: a1 03 00 10 lhz r8,16(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0afa0: 80 03 00 08 lwz r0,8(r3) info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0afa4: 2f 88 00 00 cmpwi cr7,r8,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0afa8: 81 63 00 0c lwz r11,12(r3) info->auto_extend = obj_info->auto_extend; ffc0afac: 89 23 00 12 lbz r9,18(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0afb0: 90 1f 00 00 stw r0,0(r31) info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0afb4: 38 00 00 00 li r0,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0afb8: 91 7f 00 04 stw r11,4(r31) info->auto_extend = obj_info->auto_extend; ffc0afbc: 99 3f 00 0c stb r9,12(r31) info->maximum = obj_info->maximum; ffc0afc0: 91 1f 00 08 stw r8,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0afc4: 41 9e 00 34 beq- cr7,ffc0aff8 <== NEVER TAKEN ffc0afc8: 80 e3 00 1c lwz r7,28(r3) ffc0afcc: 39 60 00 01 li r11,1 ffc0afd0: 39 20 00 01 li r9,1 ffc0afd4: 39 29 00 01 addi r9,r9,1 ffc0afd8: 7f 88 48 40 cmplw cr7,r8,r9 if ( !obj_info->local_table[i] ) ffc0afdc: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0afe0: 7d 47 58 2e lwzx r10,r7,r11 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0afe4: 7d 2b 4b 78 mr r11,r9 if ( !obj_info->local_table[i] ) unallocated++; ffc0afe8: 20 ca 00 00 subfic r6,r10,0 ffc0afec: 7c c0 01 94 addze r6,r0 ffc0aff0: 7c c0 33 78 mr r0,r6 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0aff4: 40 9c ff e0 bge+ cr7,ffc0afd4 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc0aff8: 90 1f 00 10 stw r0,16(r31) return RTEMS_SUCCESSFUL; ffc0affc: 38 00 00 00 li r0,0 } ffc0b000: 7c 03 03 78 mr r3,r0 ffc0b004: 80 01 00 14 lwz r0,20(r1) ffc0b008: 83 e1 00 0c lwz r31,12(r1) ffc0b00c: 38 21 00 10 addi r1,r1,16 ffc0b010: 7c 08 03 a6 mtlr r0 ffc0b014: 4e 80 00 20 blr =============================================================================== ffc18650 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc18650: 94 21 ff d0 stwu r1,-48(r1) ffc18654: 7c 08 02 a6 mflr r0 ffc18658: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc1865c: 7c 7f 1b 79 mr. r31,r3 return RTEMS_INVALID_NAME; ffc18660: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc18664: 93 c1 00 28 stw r30,40(r1) ffc18668: 7c be 2b 78 mr r30,r5 ffc1866c: 90 01 00 34 stw r0,52(r1) ffc18670: 93 61 00 1c stw r27,28(r1) ffc18674: 93 81 00 20 stw r28,32(r1) ffc18678: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc1867c: 41 82 00 48 beq- ffc186c4 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc18680: 2f 84 00 00 cmpwi cr7,r4,0 return RTEMS_INVALID_ADDRESS; ffc18684: 38 60 00 09 li r3,9 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc18688: 41 9e 00 3c beq- cr7,ffc186c4 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc1868c: 2f 88 00 00 cmpwi cr7,r8,0 ffc18690: 41 9e 00 34 beq- cr7,ffc186c4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc18694: 2f 85 00 00 cmpwi cr7,r5,0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; ffc18698: 38 60 00 08 li r3,8 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc1869c: 41 9e 00 28 beq- cr7,ffc186c4 ffc186a0: 2f 86 00 00 cmpwi cr7,r6,0 ffc186a4: 41 9e 00 20 beq- cr7,ffc186c4 ffc186a8: 7f 85 30 40 cmplw cr7,r5,r6 ffc186ac: 41 9c 00 18 blt- cr7,ffc186c4 ffc186b0: 70 c0 00 07 andi. r0,r6,7 ffc186b4: 40 82 00 10 bne- ffc186c4 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc186b8: 70 9b 00 07 andi. r27,r4,7 return RTEMS_INVALID_ADDRESS; ffc186bc: 38 60 00 09 li r3,9 if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc186c0: 41 82 00 28 beq- ffc186e8 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc186c4: 80 01 00 34 lwz r0,52(r1) ffc186c8: 83 61 00 1c lwz r27,28(r1) ffc186cc: 7c 08 03 a6 mtlr r0 ffc186d0: 83 81 00 20 lwz r28,32(r1) ffc186d4: 83 a1 00 24 lwz r29,36(r1) ffc186d8: 83 c1 00 28 lwz r30,40(r1) ffc186dc: 83 e1 00 2c lwz r31,44(r1) ffc186e0: 38 21 00 30 addi r1,r1,48 ffc186e4: 4e 80 00 20 blr ffc186e8: 3d 20 00 00 lis r9,0 ffc186ec: 81 69 28 84 lwz r11,10372(r9) ffc186f0: 38 0b 00 01 addi r0,r11,1 ffc186f4: 90 09 28 84 stw r0,10372(r9) * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); ffc186f8: 3f 80 00 00 lis r28,0 ffc186fc: 90 81 00 08 stw r4,8(r1) ffc18700: 3b 9c 6e c0 addi r28,r28,28352 ffc18704: 7f 83 e3 78 mr r3,r28 ffc18708: 90 c1 00 0c stw r6,12(r1) ffc1870c: 90 e1 00 10 stw r7,16(r1) ffc18710: 91 01 00 14 stw r8,20(r1) ffc18714: 48 00 60 61 bl ffc1e774 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc18718: 7c 7d 1b 79 mr. r29,r3 ffc1871c: 80 81 00 08 lwz r4,8(r1) ffc18720: 80 c1 00 0c lwz r6,12(r1) ffc18724: 80 e1 00 10 lwz r7,16(r1) ffc18728: 81 01 00 14 lwz r8,20(r1) ffc1872c: 41 82 00 50 beq- ffc1877c the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, ffc18730: 7c be 33 96 divwu r5,r30,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc18734: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc18738: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; ffc1873c: 90 fd 00 1c stw r7,28(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc18740: 93 dd 00 14 stw r30,20(r29) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; ffc18744: 93 7d 00 20 stw r27,32(r29) _Chain_Initialize( &the_partition->Memory, starting_address, ffc18748: 91 01 00 14 stw r8,20(r1) ffc1874c: 38 7d 00 24 addi r3,r29,36 ffc18750: 48 00 42 51 bl ffc1c9a0 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc18754: 80 1d 00 08 lwz r0,8(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc18758: 81 7c 00 1c lwz r11,28(r28) ffc1875c: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc18760: 7f ab 49 2e stwx r29,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc18764: 93 fd 00 0c stw r31,12(r29) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc18768: 81 01 00 14 lwz r8,20(r1) ffc1876c: 90 08 00 00 stw r0,0(r8) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc18770: 48 00 75 6d bl ffc1fcdc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc18774: 38 60 00 00 li r3,0 ffc18778: 4b ff ff 4c b ffc186c4 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); ffc1877c: 48 00 75 61 bl ffc1fcdc <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; ffc18780: 38 60 00 05 li r3,5 ffc18784: 4b ff ff 40 b ffc186c4 =============================================================================== ffc18914 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc18914: 94 21 ff e0 stwu r1,-32(r1) ffc18918: 7c 08 02 a6 mflr r0 ffc1891c: 90 01 00 24 stw r0,36(r1) ffc18920: 7c 60 1b 78 mr r0,r3 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); ffc18924: 3c 60 00 00 lis r3,0 ffc18928: 93 e1 00 1c stw r31,28(r1) ffc1892c: 38 63 6e c0 addi r3,r3,28352 ffc18930: 7c 9f 23 78 mr r31,r4 ffc18934: 38 a1 00 08 addi r5,r1,8 ffc18938: 93 c1 00 18 stw r30,24(r1) ffc1893c: 7c 04 03 78 mr r4,r0 ffc18940: 48 00 64 99 bl ffc1edd8 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc18944: 80 01 00 08 lwz r0,8(r1) ffc18948: 7c 7e 1b 78 mr r30,r3 ffc1894c: 2f 80 00 00 cmpwi cr7,r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc18950: 38 60 00 04 li r3,4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc18954: 40 9e 00 58 bne- cr7,ffc189ac ) { void *starting; void *ending; starting = the_partition->starting_address; ffc18958: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc1895c: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc18960: 7f 9f 00 40 cmplw cr7,r31,r0 ffc18964: 41 9c 00 60 blt- cr7,ffc189c4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc18968: 7d 20 4a 14 add r9,r0,r9 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc1896c: 7f 9f 48 40 cmplw cr7,r31,r9 ffc18970: 41 9d 00 54 bgt- cr7,ffc189c4 <== NEVER TAKEN offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); ffc18974: 81 3e 00 18 lwz r9,24(r30) RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); ffc18978: 7c 00 f8 50 subf r0,r0,r31 ffc1897c: 7d 60 4b 96 divwu r11,r0,r9 ffc18980: 7d 2b 49 d6 mullw r9,r11,r9 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && ffc18984: 7f 80 48 00 cmpw cr7,r0,r9 ffc18988: 40 9e 00 3c bne- cr7,ffc189c4 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc1898c: 38 7e 00 24 addi r3,r30,36 ffc18990: 7f e4 fb 78 mr r4,r31 ffc18994: 48 00 3f 71 bl ffc1c904 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; ffc18998: 81 3e 00 20 lwz r9,32(r30) ffc1899c: 38 09 ff ff addi r0,r9,-1 ffc189a0: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc189a4: 48 00 73 39 bl ffc1fcdc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc189a8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc189ac: 80 01 00 24 lwz r0,36(r1) ffc189b0: 83 c1 00 18 lwz r30,24(r1) ffc189b4: 7c 08 03 a6 mtlr r0 ffc189b8: 83 e1 00 1c lwz r31,28(r1) ffc189bc: 38 21 00 20 addi r1,r1,32 ffc189c0: 4e 80 00 20 blr _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc189c4: 48 00 73 19 bl ffc1fcdc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc189c8: 80 01 00 24 lwz r0,36(r1) the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; ffc189cc: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc189d0: 83 c1 00 18 lwz r30,24(r1) ffc189d4: 7c 08 03 a6 mtlr r0 ffc189d8: 83 e1 00 1c lwz r31,28(r1) ffc189dc: 38 21 00 20 addi r1,r1,32 ffc189e0: 4e 80 00 20 blr =============================================================================== ffc0a3a4 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc0a3a4: 94 21 ff d0 stwu r1,-48(r1) ffc0a3a8: 7c 08 02 a6 mflr r0 ffc0a3ac: 93 e1 00 2c stw r31,44(r1) ffc0a3b0: 7c 7f 1b 78 mr r31,r3 Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); ffc0a3b4: 3c 60 00 00 lis r3,0 ffc0a3b8: 93 c1 00 28 stw r30,40(r1) ffc0a3bc: 38 63 2c 38 addi r3,r3,11320 ffc0a3c0: 7c 9e 23 78 mr r30,r4 ffc0a3c4: 38 a1 00 08 addi r5,r1,8 ffc0a3c8: 90 01 00 34 stw r0,52(r1) ffc0a3cc: 7f e4 fb 78 mr r4,r31 ffc0a3d0: 93 a1 00 24 stw r29,36(r1) ffc0a3d4: 93 61 00 1c stw r27,28(r1) ffc0a3d8: 93 81 00 20 stw r28,32(r1) ffc0a3dc: 48 00 2e 6d bl ffc0d248 <_Objects_Get> ffc0a3e0: 7c 7d 1b 78 mr r29,r3 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc0a3e4: 80 01 00 08 lwz r0,8(r1) ffc0a3e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a3ec: 41 9e 00 30 beq- cr7,ffc0a41c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a3f0: 3b e0 00 04 li r31,4 } ffc0a3f4: 80 01 00 34 lwz r0,52(r1) ffc0a3f8: 7f e3 fb 78 mr r3,r31 ffc0a3fc: 83 61 00 1c lwz r27,28(r1) ffc0a400: 7c 08 03 a6 mtlr r0 ffc0a404: 83 81 00 20 lwz r28,32(r1) ffc0a408: 83 a1 00 24 lwz r29,36(r1) ffc0a40c: 83 c1 00 28 lwz r30,40(r1) ffc0a410: 83 e1 00 2c lwz r31,44(r1) ffc0a414: 38 21 00 30 addi r1,r1,48 ffc0a418: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0a41c: 3f 80 00 00 lis r28,0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc0a420: 81 23 00 40 lwz r9,64(r3) ffc0a424: 3b 9c 32 04 addi r28,r28,12804 ffc0a428: 80 1c 00 0c lwz r0,12(r28) ffc0a42c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a430: 41 9e 00 34 beq- cr7,ffc0a464 _Thread_Enable_dispatch(); ffc0a434: 48 00 3d 19 bl ffc0e14c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a438: 80 01 00 34 lwz r0,52(r1) switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; ffc0a43c: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a440: 83 61 00 1c lwz r27,28(r1) ffc0a444: 7c 08 03 a6 mtlr r0 ffc0a448: 7f e3 fb 78 mr r3,r31 ffc0a44c: 83 81 00 20 lwz r28,32(r1) ffc0a450: 83 a1 00 24 lwz r29,36(r1) ffc0a454: 83 c1 00 28 lwz r30,40(r1) ffc0a458: 83 e1 00 2c lwz r31,44(r1) ffc0a45c: 38 21 00 30 addi r1,r1,48 ffc0a460: 4e 80 00 20 blr if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { ffc0a464: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a468: 40 9e 00 1c bne- cr7,ffc0a484 switch ( the_period->state ) { ffc0a46c: 80 03 00 38 lwz r0,56(r3) ffc0a470: 3b e0 00 00 li r31,0 ffc0a474: 2b 80 00 04 cmplwi cr7,r0,4 ffc0a478: 40 9d 00 70 ble- cr7,ffc0a4e8 <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc0a47c: 48 00 3c d1 bl ffc0e14c <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); ffc0a480: 4b ff ff 74 b ffc0a3f4 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a484: 7f 60 00 a6 mfmsr r27 ffc0a488: 7c 10 42 a6 mfsprg r0,0 ffc0a48c: 7f 60 00 78 andc r0,r27,r0 ffc0a490: 7c 00 01 24 mtmsr r0 } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { ffc0a494: 80 03 00 38 lwz r0,56(r3) ffc0a498: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a49c: 41 9e 00 64 beq- cr7,ffc0a500 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { ffc0a4a0: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a4a4: 41 9e 00 ac beq- cr7,ffc0a550 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a4a8: 2f 80 00 04 cmpwi cr7,r0,4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a4ac: 3b e0 00 04 li r31,4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a4b0: 40 9e ff 44 bne+ cr7,ffc0a3f4 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc0a4b4: 4b ff fd a9 bl ffc0a25c <_Rate_monotonic_Update_statistics> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a4b8: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a4bc: 38 00 00 02 li r0,2 the_period->next_length = length; ffc0a4c0: 93 dd 00 3c stw r30,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a4c4: 3c 60 00 00 lis r3,0 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a4c8: 90 1d 00 38 stw r0,56(r29) ffc0a4cc: 38 63 2e 28 addi r3,r3,11816 ffc0a4d0: 38 9d 00 10 addi r4,r29,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a4d4: 93 dd 00 1c stw r30,28(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc0a4d8: 3b e0 00 06 li r31,6 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a4dc: 48 00 52 d5 bl ffc0f7b0 <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a4e0: 48 00 3c 6d bl ffc0e14c <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc0a4e4: 4b ff ff 10 b ffc0a3f4 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc0a4e8: 3d 20 ff c2 lis r9,-62 ffc0a4ec: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a4f0: 39 29 27 84 addi r9,r9,10116 ffc0a4f4: 7f e9 00 2e lwzx r31,r9,r0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc0a4f8: 48 00 3c 55 bl ffc0e14c <_Thread_Enable_dispatch> ffc0a4fc: 4b ff fe f8 b ffc0a3f4 ffc0a500: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc0a504: 4b ff fc a1 bl ffc0a1a4 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a508: 39 20 00 02 li r9,2 ffc0a50c: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a510: 3d 20 ff c1 lis r9,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a514: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc0a518: 39 29 a9 b8 addi r9,r9,-22088 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a51c: 90 1d 00 18 stw r0,24(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a520: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a524: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a528: 38 63 2e 28 addi r3,r3,11816 ffc0a52c: 38 9d 00 10 addi r4,r29,16 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc0a530: 93 fd 00 30 stw r31,48(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc0a534: 3b e0 00 00 li r31,0 the_watchdog->user_data = user_data; ffc0a538: 90 1d 00 34 stw r0,52(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc0a53c: 93 dd 00 3c stw r30,60(r29) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a540: 93 dd 00 1c stw r30,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a544: 48 00 52 6d bl ffc0f7b0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a548: 48 00 3c 05 bl ffc0e14c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a54c: 4b ff fe a8 b ffc0a3f4 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc0a550: 4b ff fd 0d bl ffc0a25c <_Rate_monotonic_Update_statistics> /* * 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; ffc0a554: 38 00 00 01 li r0,1 ffc0a558: 90 1d 00 38 stw r0,56(r29) the_period->next_length = length; ffc0a55c: 93 dd 00 3c stw r30,60(r29) ffc0a560: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a564: 81 3c 00 0c lwz r9,12(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a568: 38 80 40 00 li r4,16384 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a56c: 80 1d 00 08 lwz r0,8(r29) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a570: 7d 23 4b 78 mr r3,r9 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a574: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a578: 48 00 47 59 bl ffc0ecd0 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a57c: 7d 20 00 a6 mfmsr r9 ffc0a580: 7c 10 42 a6 mfsprg r0,0 ffc0a584: 7d 20 00 78 andc r0,r9,r0 ffc0a588: 7c 00 01 24 mtmsr r0 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a58c: 39 60 00 02 li r11,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; ffc0a590: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a594: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a598: 7d 20 01 24 mtmsr r9 /* * 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 ) ffc0a59c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0a5a0: 41 9e 00 10 beq- cr7,ffc0a5b0 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc0a5a4: 48 00 3b a9 bl ffc0e14c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a5a8: 3b e0 00 00 li r31,0 ffc0a5ac: 4b ff fe 48 b ffc0a3f4 /* * 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 ); ffc0a5b0: 80 7c 00 0c lwz r3,12(r28) <== NOT EXECUTED ffc0a5b4: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc0a5b8: 48 00 36 dd bl ffc0dc94 <_Thread_Clear_state> <== NOT EXECUTED ffc0a5bc: 4b ff ff e8 b ffc0a5a4 <== NOT EXECUTED =============================================================================== ffc0a5c0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a5c0: 94 21 ff 58 stwu r1,-168(r1) ffc0a5c4: 7c 08 02 a6 mflr r0 ffc0a5c8: 90 01 00 ac stw r0,172(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc0a5cc: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a5d0: 93 a1 00 9c stw r29,156(r1) ffc0a5d4: 7c 7d 1b 78 mr r29,r3 ffc0a5d8: 92 41 00 70 stw r18,112(r1) ffc0a5dc: 92 61 00 74 stw r19,116(r1) ffc0a5e0: 92 81 00 78 stw r20,120(r1) ffc0a5e4: 92 a1 00 7c stw r21,124(r1) ffc0a5e8: 92 c1 00 80 stw r22,128(r1) ffc0a5ec: 92 e1 00 84 stw r23,132(r1) ffc0a5f0: 93 01 00 88 stw r24,136(r1) ffc0a5f4: 93 21 00 8c stw r25,140(r1) ffc0a5f8: 93 41 00 90 stw r26,144(r1) ffc0a5fc: 93 61 00 94 stw r27,148(r1) ffc0a600: 93 81 00 98 stw r28,152(r1) ffc0a604: 93 c1 00 a0 stw r30,160(r1) ffc0a608: 93 e1 00 a4 stw r31,164(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc0a60c: 90 01 00 68 stw r0,104(r1) ffc0a610: 41 82 01 88 beq- ffc0a798 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc0a614: 3c 80 ff c2 lis r4,-62 ffc0a618: 7c 09 03 a6 mtctr r0 ffc0a61c: 38 84 27 98 addi r4,r4,10136 /* * 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 ; ffc0a620: 3f c0 00 00 lis r30,0 ffc0a624: 3b de 2c 38 addi r30,r30,11320 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc0a628: 4c c6 31 82 crclr 4*cr1+eq ffc0a62c: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc0a630: 80 01 00 68 lwz r0,104(r1) ffc0a634: 3c 80 ff c2 lis r4,-62 ffc0a638: 7c 09 03 a6 mtctr r0 ffc0a63c: 38 84 27 b8 addi r4,r4,10168 ffc0a640: 7f a3 eb 78 mr r3,r29 ffc0a644: 4c c6 31 82 crclr 4*cr1+eq ffc0a648: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc0a64c: 80 01 00 68 lwz r0,104(r1) ffc0a650: 3c 80 ff c2 lis r4,-62 ffc0a654: 7c 09 03 a6 mtctr r0 ffc0a658: 38 84 27 dc addi r4,r4,10204 ffc0a65c: 7f a3 eb 78 mr r3,r29 ffc0a660: 4c c6 31 82 crclr 4*cr1+eq ffc0a664: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc0a668: 80 01 00 68 lwz r0,104(r1) ffc0a66c: 3c 80 ff c2 lis r4,-62 ffc0a670: 7c 09 03 a6 mtctr r0 ffc0a674: 38 84 28 00 addi r4,r4,10240 ffc0a678: 7f a3 eb 78 mr r3,r29 ffc0a67c: 4c c6 31 82 crclr 4*cr1+eq ffc0a680: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc0a684: 80 01 00 68 lwz r0,104(r1) ffc0a688: 3c 80 ff c2 lis r4,-62 ffc0a68c: 7c 09 03 a6 mtctr r0 ffc0a690: 7f a3 eb 78 mr r3,r29 ffc0a694: 38 84 28 4c addi r4,r4,10316 ffc0a698: 4c c6 31 82 crclr 4*cr1+eq ffc0a69c: 4e 80 04 21 bctrl /* * 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 ; ffc0a6a0: 83 fe 00 08 lwz r31,8(r30) ffc0a6a4: 80 1e 00 0c lwz r0,12(r30) ffc0a6a8: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a6ac: 41 9d 00 ec bgt- cr7,ffc0a798 <== NEVER TAKEN rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a6b0: 3e c0 ff c2 lis r22,-62 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc0a6b4: 3e 60 ff c2 lis r19,-62 ffc0a6b8: 3f 60 10 62 lis r27,4194 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc0a6bc: 3e 40 ff c2 lis r18,-62 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a6c0: 3f 00 ff c2 lis r24,-62 ffc0a6c4: 3b 81 00 30 addi r28,r1,48 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc0a6c8: 3a a1 00 18 addi r21,r1,24 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc0a6cc: 3b 41 00 08 addi r26,r1,8 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a6d0: 3a d6 28 98 addi r22,r22,10392 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; ffc0a6d4: 3a e1 00 48 addi r23,r1,72 _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc0a6d8: 3b 21 00 10 addi r25,r1,16 (*print)( context, ffc0a6dc: 3a 73 28 b0 addi r19,r19,10416 ffc0a6e0: 63 7b 4d d3 ori r27,r27,19923 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; ffc0a6e4: 3a 81 00 60 addi r20,r1,96 _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc0a6e8: 3a 52 28 d0 addi r18,r18,10448 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a6ec: 3b 18 14 a0 addi r24,r24,5280 ffc0a6f0: 48 00 00 14 b ffc0a704 /* * 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 ; ffc0a6f4: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a6f8: 3b ff 00 01 addi r31,r31,1 /* * 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 ; ffc0a6fc: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a700: 41 9c 00 98 blt- cr7,ffc0a798 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc0a704: 7f e3 fb 78 mr r3,r31 ffc0a708: 7f 84 e3 78 mr r4,r28 ffc0a70c: 48 00 80 21 bl ffc1272c if ( status != RTEMS_SUCCESSFUL ) ffc0a710: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a714: 40 9e ff e0 bne+ cr7,ffc0a6f4 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc0a718: 7e a4 ab 78 mr r4,r21 ffc0a71c: 7f e3 fb 78 mr r3,r31 ffc0a720: 48 00 81 1d bl ffc1283c #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc0a724: 80 61 00 18 lwz r3,24(r1) ffc0a728: 7f 45 d3 78 mr r5,r26 ffc0a72c: 38 80 00 05 li r4,5 ffc0a730: 48 00 03 51 bl ffc0aa80 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a734: 80 01 00 68 lwz r0,104(r1) ffc0a738: 7e c4 b3 78 mr r4,r22 ffc0a73c: 80 e1 00 30 lwz r7,48(r1) ffc0a740: 7f e5 fb 78 mr r5,r31 ffc0a744: 7c 09 03 a6 mtctr r0 ffc0a748: 7f a3 eb 78 mr r3,r29 ffc0a74c: 81 01 00 34 lwz r8,52(r1) ffc0a750: 7f 46 d3 78 mr r6,r26 ffc0a754: 4c c6 31 82 crclr 4*cr1+eq ffc0a758: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a75c: 80 01 00 30 lwz r0,48(r1) struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc0a760: 7e e3 bb 78 mr r3,r23 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a764: 2f 80 00 00 cmpwi cr7,r0,0 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc0a768: 7f 25 cb 78 mr r5,r25 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a76c: 7f 04 c3 78 mr r4,r24 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a770: 40 9e 00 70 bne- cr7,ffc0a7e0 (*print)( context, "\n" ); ffc0a774: 80 01 00 68 lwz r0,104(r1) ffc0a778: 7f a3 eb 78 mr r3,r29 * 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++ ) { ffc0a77c: 3b ff 00 01 addi r31,r31,1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a780: 7c 09 03 a6 mtctr r0 ffc0a784: 4c c6 31 82 crclr 4*cr1+eq ffc0a788: 4e 80 04 21 bctrl /* * 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 ; ffc0a78c: 80 1e 00 0c lwz r0,12(r30) ffc0a790: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a794: 40 9c ff 70 bge+ cr7,ffc0a704 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc0a798: 80 01 00 ac lwz r0,172(r1) ffc0a79c: 82 41 00 70 lwz r18,112(r1) ffc0a7a0: 7c 08 03 a6 mtlr r0 ffc0a7a4: 82 61 00 74 lwz r19,116(r1) ffc0a7a8: 82 81 00 78 lwz r20,120(r1) ffc0a7ac: 82 a1 00 7c lwz r21,124(r1) ffc0a7b0: 82 c1 00 80 lwz r22,128(r1) ffc0a7b4: 82 e1 00 84 lwz r23,132(r1) ffc0a7b8: 83 01 00 88 lwz r24,136(r1) ffc0a7bc: 83 21 00 8c lwz r25,140(r1) ffc0a7c0: 83 41 00 90 lwz r26,144(r1) ffc0a7c4: 83 61 00 94 lwz r27,148(r1) ffc0a7c8: 83 81 00 98 lwz r28,152(r1) ffc0a7cc: 83 a1 00 9c lwz r29,156(r1) ffc0a7d0: 83 c1 00 a0 lwz r30,160(r1) ffc0a7d4: 83 e1 00 a4 lwz r31,164(r1) ffc0a7d8: 38 21 00 a8 addi r1,r1,168 ffc0a7dc: 4e 80 00 20 blr struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc0a7e0: 7c 04 03 78 mr r4,r0 ffc0a7e4: 48 00 49 8d bl ffc0f170 <_Timespec_Divide_by_integer> (*print)( context, ffc0a7e8: 80 01 00 14 lwz r0,20(r1) ffc0a7ec: 80 81 00 3c lwz r4,60(r1) ffc0a7f0: 7f a3 eb 78 mr r3,r29 ffc0a7f4: 81 61 00 44 lwz r11,68(r1) ffc0a7f8: 7d 40 d8 96 mulhw r10,r0,r27 ffc0a7fc: 80 e1 00 40 lwz r7,64(r1) ffc0a800: 7c c4 d8 96 mulhw r6,r4,r27 ffc0a804: 81 21 00 10 lwz r9,16(r1) ffc0a808: 80 a1 00 38 lwz r5,56(r1) ffc0a80c: 7d 0b d8 96 mulhw r8,r11,r27 ffc0a810: 7c 00 fe 70 srawi r0,r0,31 ffc0a814: 7d 4a 36 70 srawi r10,r10,6 ffc0a818: 7d 40 50 50 subf r10,r0,r10 ffc0a81c: 80 01 00 68 lwz r0,104(r1) ffc0a820: 7d 6b fe 70 srawi r11,r11,31 ffc0a824: 7c 84 fe 70 srawi r4,r4,31 ffc0a828: 7c 09 03 a6 mtctr r0 ffc0a82c: 7c c6 36 70 srawi r6,r6,6 ffc0a830: 7d 08 36 70 srawi r8,r8,6 ffc0a834: 7c c4 30 50 subf r6,r4,r6 ffc0a838: 7d 0b 40 50 subf r8,r11,r8 ffc0a83c: 7e 64 9b 78 mr r4,r19 ffc0a840: 4c c6 31 82 crclr 4*cr1+eq ffc0a844: 4e 80 04 21 bctrl struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); ffc0a848: 80 81 00 30 lwz r4,48(r1) ffc0a84c: 7e 83 a3 78 mr r3,r20 ffc0a850: 7f 25 cb 78 mr r5,r25 ffc0a854: 48 00 49 1d bl ffc0f170 <_Timespec_Divide_by_integer> (*print)( context, ffc0a858: 80 01 00 14 lwz r0,20(r1) ffc0a85c: 80 c1 00 54 lwz r6,84(r1) ffc0a860: 7f a3 eb 78 mr r3,r29 ffc0a864: 81 61 00 5c lwz r11,92(r1) ffc0a868: 7d 40 d8 96 mulhw r10,r0,r27 ffc0a86c: 80 a1 00 50 lwz r5,80(r1) ffc0a870: 7d 86 d8 96 mulhw r12,r6,r27 ffc0a874: 80 e1 00 58 lwz r7,88(r1) ffc0a878: 81 21 00 10 lwz r9,16(r1) ffc0a87c: 7d 0b d8 96 mulhw r8,r11,r27 ffc0a880: 7c 00 fe 70 srawi r0,r0,31 ffc0a884: 7d 4a 36 70 srawi r10,r10,6 ffc0a888: 7d 40 50 50 subf r10,r0,r10 ffc0a88c: 80 01 00 68 lwz r0,104(r1) ffc0a890: 7d 8c 36 70 srawi r12,r12,6 ffc0a894: 7d 6b fe 70 srawi r11,r11,31 ffc0a898: 7c 09 03 a6 mtctr r0 ffc0a89c: 7c c6 fe 70 srawi r6,r6,31 ffc0a8a0: 7d 08 36 70 srawi r8,r8,6 ffc0a8a4: 7e 44 93 78 mr r4,r18 ffc0a8a8: 7c c6 60 50 subf r6,r6,r12 ffc0a8ac: 7d 0b 40 50 subf r8,r11,r8 ffc0a8b0: 4c c6 31 82 crclr 4*cr1+eq ffc0a8b4: 4e 80 04 21 bctrl ffc0a8b8: 4b ff fe 3c b ffc0a6f4 =============================================================================== ffc0a8cc : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0a8cc: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc0a8d0: 94 21 ff f0 stwu r1,-16(r1) ffc0a8d4: 7c 08 02 a6 mflr r0 ffc0a8d8: 81 69 27 f0 lwz r11,10224(r9) ffc0a8dc: 90 01 00 14 stw r0,20(r1) ffc0a8e0: 38 0b 00 01 addi r0,r11,1 ffc0a8e4: 93 c1 00 08 stw r30,8(r1) ffc0a8e8: 93 e1 00 0c stw r31,12(r1) ffc0a8ec: 90 09 27 f0 stw r0,10224(r9) /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc0a8f0: 3f c0 00 00 lis r30,0 ffc0a8f4: 3b de 2c 38 addi r30,r30,11320 ffc0a8f8: 83 fe 00 08 lwz r31,8(r30) ffc0a8fc: 80 1e 00 0c lwz r0,12(r30) ffc0a900: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a904: 41 9d 00 1c bgt- cr7,ffc0a920 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); ffc0a908: 7f e3 fb 78 mr r3,r31 ffc0a90c: 48 00 00 31 bl ffc0a93c /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc0a910: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a914: 3b ff 00 01 addi r31,r31,1 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc0a918: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a91c: 40 9c ff ec bge+ cr7,ffc0a908 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc0a920: 48 00 38 2d bl ffc0e14c <_Thread_Enable_dispatch> } ffc0a924: 80 01 00 14 lwz r0,20(r1) ffc0a928: 83 c1 00 08 lwz r30,8(r1) ffc0a92c: 7c 08 03 a6 mtlr r0 ffc0a930: 83 e1 00 0c lwz r31,12(r1) ffc0a934: 38 21 00 10 addi r1,r1,16 ffc0a938: 4e 80 00 20 blr =============================================================================== ffc1a370 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1a370: 94 21 ff e0 stwu r1,-32(r1) ffc1a374: 7c 08 02 a6 mflr r0 ffc1a378: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1a37c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1a380: 90 01 00 24 stw r0,36(r1) Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; ffc1a384: 38 00 00 0a li r0,10 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1a388: 40 82 00 1c bne- ffc1a3a4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a38c: 7c 03 03 78 mr r3,r0 ffc1a390: 80 01 00 24 lwz r0,36(r1) ffc1a394: 83 e1 00 1c lwz r31,28(r1) ffc1a398: 38 21 00 20 addi r1,r1,32 ffc1a39c: 7c 08 03 a6 mtlr r0 ffc1a3a0: 4e 80 00 20 blr ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc1a3a4: 38 81 00 08 addi r4,r1,8 ffc1a3a8: 48 00 59 55 bl ffc1fcfc <_Thread_Get> switch ( location ) { ffc1a3ac: 80 01 00 08 lwz r0,8(r1) ffc1a3b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a3b4: 41 9e 00 20 beq- cr7,ffc1a3d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1a3b8: 38 00 00 04 li r0,4 } ffc1a3bc: 83 e1 00 1c lwz r31,28(r1) ffc1a3c0: 7c 03 03 78 mr r3,r0 ffc1a3c4: 80 01 00 24 lwz r0,36(r1) ffc1a3c8: 38 21 00 20 addi r1,r1,32 ffc1a3cc: 7c 08 03 a6 mtlr r0 ffc1a3d0: 4e 80 00 20 blr the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc1a3d4: 81 23 01 30 lwz r9,304(r3) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { ffc1a3d8: 80 09 00 0c lwz r0,12(r9) ffc1a3dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a3e0: 41 9e 00 9c beq- cr7,ffc1a47c if ( asr->is_enabled ) { ffc1a3e4: 88 09 00 08 lbz r0,8(r9) ffc1a3e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a3ec: 41 9e 00 50 beq- cr7,ffc1a43c static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a3f0: 7c 00 00 a6 mfmsr r0 ffc1a3f4: 7d 70 42 a6 mfsprg r11,0 ffc1a3f8: 7c 0b 58 78 andc r11,r0,r11 ffc1a3fc: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc1a400: 81 69 00 14 lwz r11,20(r9) ffc1a404: 7d 7f fb 78 or r31,r11,r31 ffc1a408: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a40c: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1a410: 3d 20 00 00 lis r9,0 ffc1a414: 39 29 75 04 addi r9,r9,29956 ffc1a418: 80 09 00 08 lwz r0,8(r9) ffc1a41c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a420: 41 9e 00 3c beq- cr7,ffc1a45c ffc1a424: 80 09 00 0c lwz r0,12(r9) ffc1a428: 7f 83 00 00 cmpw cr7,r3,r0 ffc1a42c: 40 be 00 30 bne+ cr7,ffc1a45c <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc1a430: 38 00 00 01 li r0,1 ffc1a434: 98 09 00 18 stb r0,24(r9) ffc1a438: 48 00 00 24 b ffc1a45c static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a43c: 7c 00 00 a6 mfmsr r0 ffc1a440: 7d 70 42 a6 mfsprg r11,0 ffc1a444: 7c 0b 58 78 andc r11,r0,r11 ffc1a448: 7d 60 01 24 mtmsr r11 ffc1a44c: 81 69 00 18 lwz r11,24(r9) ffc1a450: 7d 7f fb 78 or r31,r11,r31 ffc1a454: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a458: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc1a45c: 48 00 58 81 bl ffc1fcdc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1a460: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a464: 7c 03 03 78 mr r3,r0 ffc1a468: 80 01 00 24 lwz r0,36(r1) ffc1a46c: 83 e1 00 1c lwz r31,28(r1) ffc1a470: 38 21 00 20 addi r1,r1,32 ffc1a474: 7c 08 03 a6 mtlr r0 ffc1a478: 4e 80 00 20 blr _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1a47c: 48 00 58 61 bl ffc1fcdc <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; ffc1a480: 38 00 00 0b li r0,11 ffc1a484: 4b ff ff 08 b ffc1a38c =============================================================================== ffc12f94 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc12f94: 2c 05 00 00 cmpwi r5,0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { ffc12f98: 7c 08 02 a6 mflr r0 ffc12f9c: 94 21 ff f8 stwu r1,-8(r1) ffc12fa0: 90 01 00 0c stw r0,12(r1) ffc12fa4: 7c 60 1b 78 mr r0,r3 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; ffc12fa8: 38 60 00 09 li r3,9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc12fac: 41 82 01 34 beq- ffc130e0 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc12fb0: 3c c0 00 00 lis r6,0 ffc12fb4: 38 c6 30 e4 addi r6,r6,12516 ffc12fb8: 81 26 00 0c lwz r9,12(r6) api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12fbc: 81 69 00 7c lwz r11,124(r9) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc12fc0: 89 09 00 74 lbz r8,116(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12fc4: 2f 8b 00 00 cmpwi cr7,r11,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc12fc8: 81 69 01 30 lwz r11,304(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc12fcc: 7d 08 00 34 cntlzw r8,r8 ffc12fd0: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc12fd4: 55 07 40 2e rlwinm r7,r8,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12fd8: 40 9e 01 18 bne- cr7,ffc130f0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc12fdc: 89 0b 00 08 lbz r8,8(r11) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc12fe0: 39 40 00 00 li r10,0 ffc12fe4: 7d 08 00 34 cntlzw r8,r8 ffc12fe8: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc12fec: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc12ff0: 7d 07 3b 78 or r7,r8,r7 ffc12ff4: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc12ff8: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc12ffc: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc13000: 70 8a 01 00 andi. r10,r4,256 ffc13004: 7d 40 00 26 mfcr r10 ffc13008: 55 4a ff fe rlwinm r10,r10,31,31,31 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); ffc1300c: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc13010: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc13014: 41 82 00 14 beq- ffc13028 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc13018: 70 08 01 00 andi. r8,r0,256 ffc1301c: 7d 40 00 26 mfcr r10 ffc13020: 55 4a 1f fe rlwinm r10,r10,3,31,31 ffc13024: 99 49 00 74 stb r10,116(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc13028: 70 8a 02 00 andi. r10,r4,512 ffc1302c: 41 82 00 20 beq- ffc1304c if ( _Modes_Is_timeslice(mode_set) ) { ffc13030: 70 0a 02 00 andi. r10,r0,512 ffc13034: 41 82 01 54 beq- ffc13188 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc13038: 3d 40 00 00 lis r10,0 ffc1303c: 81 4a 27 88 lwz r10,10120(r10) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc13040: 39 00 00 01 li r8,1 ffc13044: 91 09 00 7c stw r8,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc13048: 91 49 00 78 stw r10,120(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc1304c: 70 88 00 01 andi. r8,r4,1 ffc13050: 41 82 00 20 beq- ffc13070 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc13054: 39 20 00 00 li r9,0 ffc13058: 7d 20 00 a6 mfmsr r9 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc1305c: 70 0a 00 01 andi. r10,r0,1 ffc13060: 40 82 01 18 bne- ffc13178 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc13064: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc13068: 7d 49 4b 78 or r9,r10,r9 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc1306c: 7d 20 01 24 mtmsr r9 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc13070: 70 88 04 00 andi. r8,r4,1024 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc13074: 39 40 00 00 li r10,0 if ( mask & RTEMS_ASR_MASK ) { ffc13078: 41 82 00 54 beq- ffc130cc * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc1307c: 70 09 04 00 andi. r9,r0,1024 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc13080: 89 2b 00 08 lbz r9,8(r11) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc13084: 7c 00 00 26 mfcr r0 ffc13088: 54 00 1f fe rlwinm r0,r0,3,31,31 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc1308c: 7f 89 00 00 cmpw cr7,r9,r0 ffc13090: 41 9e 00 3c beq- cr7,ffc130cc asr->is_enabled = is_asr_enabled; ffc13094: 98 0b 00 08 stb r0,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc13098: 7c 00 00 a6 mfmsr r0 ffc1309c: 7d 30 42 a6 mfsprg r9,0 ffc130a0: 7c 09 48 78 andc r9,r0,r9 ffc130a4: 7d 20 01 24 mtmsr r9 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc130a8: 81 4b 00 18 lwz r10,24(r11) information->signals_pending = information->signals_posted; ffc130ac: 81 2b 00 14 lwz r9,20(r11) information->signals_posted = _signals; ffc130b0: 91 4b 00 14 stw r10,20(r11) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc130b4: 91 2b 00 18 stw r9,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc130b8: 7c 00 01 24 mtmsr r0 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc130bc: 80 0b 00 14 lwz r0,20(r11) needs_asr_dispatching = true; ffc130c0: 39 40 00 01 li r10,1 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc130c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc130c8: 41 9e 00 d0 beq- cr7,ffc13198 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc130cc: 3d 20 00 00 lis r9,0 ffc130d0: 80 09 27 d0 lwz r0,10192(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc130d4: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc130d8: 2f 80 00 03 cmpwi cr7,r0,3 ffc130dc: 41 9e 00 58 beq- cr7,ffc13134 <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } ffc130e0: 80 01 00 0c lwz r0,12(r1) ffc130e4: 38 21 00 08 addi r1,r1,8 ffc130e8: 7c 08 03 a6 mtlr r0 ffc130ec: 4e 80 00 20 blr if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc130f0: 89 0b 00 08 lbz r8,8(r11) old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; ffc130f4: 60 e7 02 00 ori r7,r7,512 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc130f8: 39 40 00 00 li r10,0 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc130fc: 7d 08 00 34 cntlzw r8,r8 ffc13100: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc13104: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc13108: 7d 07 3b 78 or r7,r8,r7 ffc1310c: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc13110: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc13114: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc13118: 70 8a 01 00 andi. r10,r4,256 ffc1311c: 7d 40 00 26 mfcr r10 ffc13120: 55 4a ff fe rlwinm r10,r10,31,31,31 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); ffc13124: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc13128: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc1312c: 41 a2 fe fc beq- ffc13028 ffc13130: 4b ff fe e8 b ffc13018 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || ffc13134: 2f 8a 00 00 cmpwi cr7,r10,0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; ffc13138: 81 26 00 0c lwz r9,12(r6) if ( are_signals_pending || ffc1313c: 40 9e 00 1c bne- cr7,ffc13158 ffc13140: 80 06 00 10 lwz r0,16(r6) ffc13144: 7f 89 00 00 cmpw cr7,r9,r0 ffc13148: 41 be ff 98 beq- cr7,ffc130e0 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { ffc1314c: 88 09 00 74 lbz r0,116(r9) ffc13150: 2f 80 00 00 cmpwi cr7,r0,0 ffc13154: 41 be ff 8c beq- cr7,ffc130e0 <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc13158: 38 00 00 01 li r0,1 ffc1315c: 98 06 00 18 stb r0,24(r6) } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); ffc13160: 4b ff 8a b1 bl ffc0bc10 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; } ffc13164: 80 01 00 0c lwz r0,12(r1) if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc13168: 38 60 00 00 li r3,0 } ffc1316c: 7c 08 03 a6 mtlr r0 ffc13170: 38 21 00 08 addi r1,r1,8 ffc13174: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc13178: 7d 50 42 a6 mfsprg r10,0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc1317c: 7d 29 50 78 andc r9,r9,r10 } _CPU_MSR_SET(msr); ffc13180: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); ffc13184: 4b ff fe ec b ffc13070 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc13188: 70 88 00 01 andi. r8,r4,1 if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc1318c: 91 49 00 7c stw r10,124(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc13190: 41 a2 fe e0 beq- ffc13070 ffc13194: 4b ff fe c0 b ffc13054 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc13198: 39 40 00 00 li r10,0 ffc1319c: 4b ff ff 30 b ffc130cc =============================================================================== ffc0eb24 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0eb24: 7d 80 00 26 mfcr r12 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb28: 2e 04 00 00 cmpwi cr4,r4,0 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0eb2c: 94 21 ff d8 stwu r1,-40(r1) ffc0eb30: 7c 08 02 a6 mflr r0 ffc0eb34: 93 c1 00 20 stw r30,32(r1) ffc0eb38: 7c be 2b 78 mr r30,r5 ffc0eb3c: 93 e1 00 24 stw r31,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb40: 7c 9f 23 78 mr r31,r4 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0eb44: 90 01 00 2c stw r0,44(r1) ffc0eb48: 91 81 00 1c stw r12,28(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb4c: 41 92 00 18 beq- cr4,ffc0eb64 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); ffc0eb50: 3d 20 00 00 lis r9,0 ffc0eb54: 89 29 26 ec lbz r9,9964(r9) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; ffc0eb58: 38 00 00 13 li r0,19 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc0eb5c: 7f 84 48 40 cmplw cr7,r4,r9 ffc0eb60: 41 9d 00 60 bgt- cr7,ffc0ebc0 if ( !old_priority ) ffc0eb64: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; ffc0eb68: 38 00 00 09 li r0,9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0eb6c: 41 9e 00 54 beq- cr7,ffc0ebc0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0eb70: 38 81 00 08 addi r4,r1,8 ffc0eb74: 48 00 2c a5 bl ffc11818 <_Thread_Get> switch ( location ) { ffc0eb78: 80 01 00 08 lwz r0,8(r1) ffc0eb7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eb80: 40 9e 00 64 bne- cr7,ffc0ebe4 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0eb84: 80 03 00 14 lwz r0,20(r3) ffc0eb88: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0eb8c: 41 92 00 2c beq- cr4,ffc0ebb8 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0eb90: 80 03 00 1c lwz r0,28(r3) case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority; ffc0eb94: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0eb98: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eb9c: 41 9e 00 10 beq- cr7,ffc0ebac ffc0eba0: 80 03 00 14 lwz r0,20(r3) ffc0eba4: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0eba8: 40 9c 00 10 bge- cr7,ffc0ebb8 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); ffc0ebac: 7f e4 fb 78 mr r4,r31 ffc0ebb0: 38 a0 00 00 li r5,0 ffc0ebb4: 48 00 25 89 bl ffc1113c <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0ebb8: 48 00 2c 41 bl ffc117f8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0ebbc: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0ebc0: 7c 03 03 78 mr r3,r0 ffc0ebc4: 80 01 00 2c lwz r0,44(r1) ffc0ebc8: 81 81 00 1c lwz r12,28(r1) ffc0ebcc: 7c 08 03 a6 mtlr r0 ffc0ebd0: 83 c1 00 20 lwz r30,32(r1) ffc0ebd4: 83 e1 00 24 lwz r31,36(r1) ffc0ebd8: 7d 80 81 20 mtcrf 8,r12 ffc0ebdc: 38 21 00 28 addi r1,r1,40 ffc0ebe0: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0ebe4: 38 00 00 04 li r0,4 } ffc0ebe8: 81 81 00 1c lwz r12,28(r1) ffc0ebec: 7c 03 03 78 mr r3,r0 ffc0ebf0: 80 01 00 2c lwz r0,44(r1) ffc0ebf4: 83 c1 00 20 lwz r30,32(r1) ffc0ebf8: 7d 80 81 20 mtcrf 8,r12 ffc0ebfc: 7c 08 03 a6 mtlr r0 ffc0ec00: 83 e1 00 24 lwz r31,36(r1) ffc0ec04: 38 21 00 28 addi r1,r1,40 ffc0ec08: 4e 80 00 20 blr =============================================================================== ffc0a820 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a820: 94 21 ff e0 stwu r1,-32(r1) ffc0a824: 7c 08 02 a6 mflr r0 ffc0a828: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a82c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a830: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0a834: 38 00 00 09 li r0,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a838: 41 82 00 58 beq- ffc0a890 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc0a83c: 38 81 00 08 addi r4,r1,8 ffc0a840: 48 00 2a 3d bl ffc0d27c <_Thread_Get> switch (location) { ffc0a844: 80 01 00 08 lwz r0,8(r1) ffc0a848: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a84c: 40 9e 00 5c bne- cr7,ffc0a8a8 case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc0a850: 81 23 01 3c lwz r9,316(r3) while (tvp) { ffc0a854: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a858: 41 9e 00 30 beq- cr7,ffc0a888 if (tvp->ptr == ptr) { ffc0a85c: 80 09 00 04 lwz r0,4(r9) ffc0a860: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a864: 40 be 00 18 bne+ cr7,ffc0a87c ffc0a868: 48 00 00 88 b ffc0a8f0 ffc0a86c: 80 04 00 04 lwz r0,4(r4) ffc0a870: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a874: 41 9e 00 50 beq- cr7,ffc0a8c4 ffc0a878: 7c 89 23 78 mr r9,r4 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; ffc0a87c: 80 89 00 00 lwz r4,0(r9) the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { ffc0a880: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a884: 40 9e ff e8 bne+ cr7,ffc0a86c <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a888: 48 00 29 d5 bl ffc0d25c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a88c: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a890: 7c 03 03 78 mr r3,r0 ffc0a894: 80 01 00 24 lwz r0,36(r1) ffc0a898: 83 e1 00 1c lwz r31,28(r1) ffc0a89c: 38 21 00 20 addi r1,r1,32 ffc0a8a0: 7c 08 03 a6 mtlr r0 ffc0a8a4: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a8a8: 38 00 00 04 li r0,4 } ffc0a8ac: 83 e1 00 1c lwz r31,28(r1) ffc0a8b0: 7c 03 03 78 mr r3,r0 ffc0a8b4: 80 01 00 24 lwz r0,36(r1) ffc0a8b8: 38 21 00 20 addi r1,r1,32 ffc0a8bc: 7c 08 03 a6 mtlr r0 ffc0a8c0: 4e 80 00 20 blr case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; ffc0a8c4: 80 04 00 00 lwz r0,0(r4) ffc0a8c8: 90 09 00 00 stw r0,0(r9) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); ffc0a8cc: 48 00 01 0d bl ffc0a9d8 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); ffc0a8d0: 48 00 29 8d bl ffc0d25c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a8d4: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a8d8: 7c 03 03 78 mr r3,r0 ffc0a8dc: 80 01 00 24 lwz r0,36(r1) ffc0a8e0: 83 e1 00 1c lwz r31,28(r1) ffc0a8e4: 38 21 00 20 addi r1,r1,32 ffc0a8e8: 7c 08 03 a6 mtlr r0 ffc0a8ec: 4e 80 00 20 blr while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc0a8f0: 80 09 00 00 lwz r0,0(r9) ffc0a8f4: 7d 24 4b 78 mr r4,r9 ffc0a8f8: 90 03 01 3c stw r0,316(r3) ffc0a8fc: 4b ff ff d0 b ffc0a8cc =============================================================================== ffc0a900 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a900: 94 21 ff e0 stwu r1,-32(r1) ffc0a904: 7c 08 02 a6 mflr r0 ffc0a908: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a90c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a910: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0a914: 38 00 00 09 li r0,9 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a918: 93 c1 00 18 stw r30,24(r1) ffc0a91c: 7c be 2b 78 mr r30,r5 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a920: 41 82 00 58 beq- ffc0a978 return RTEMS_INVALID_ADDRESS; if ( !result ) ffc0a924: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a928: 41 9e 00 50 beq- cr7,ffc0a978 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc0a92c: 38 81 00 08 addi r4,r1,8 ffc0a930: 48 00 29 4d bl ffc0d27c <_Thread_Get> switch (location) { ffc0a934: 80 01 00 08 lwz r0,8(r1) ffc0a938: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a93c: 40 9e 00 58 bne- cr7,ffc0a994 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc0a940: 81 23 01 3c lwz r9,316(r3) while (tvp) { ffc0a944: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a948: 40 be 00 14 bne+ cr7,ffc0a95c ffc0a94c: 48 00 00 68 b ffc0a9b4 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc0a950: 81 29 00 00 lwz r9,0(r9) case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { ffc0a954: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a958: 41 9e 00 5c beq- cr7,ffc0a9b4 <== NEVER TAKEN if (tvp->ptr == ptr) { ffc0a95c: 80 09 00 04 lwz r0,4(r9) ffc0a960: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a964: 40 9e ff ec bne+ cr7,ffc0a950 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc0a968: 80 09 00 0c lwz r0,12(r9) ffc0a96c: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0a970: 48 00 28 ed bl ffc0d25c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a974: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a978: 7c 03 03 78 mr r3,r0 ffc0a97c: 80 01 00 24 lwz r0,36(r1) ffc0a980: 83 c1 00 18 lwz r30,24(r1) ffc0a984: 7c 08 03 a6 mtlr r0 ffc0a988: 83 e1 00 1c lwz r31,28(r1) ffc0a98c: 38 21 00 20 addi r1,r1,32 ffc0a990: 4e 80 00 20 blr #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a994: 38 00 00 04 li r0,4 } ffc0a998: 83 c1 00 18 lwz r30,24(r1) ffc0a99c: 7c 03 03 78 mr r3,r0 ffc0a9a0: 80 01 00 24 lwz r0,36(r1) ffc0a9a4: 83 e1 00 1c lwz r31,28(r1) ffc0a9a8: 38 21 00 20 addi r1,r1,32 ffc0a9ac: 7c 08 03 a6 mtlr r0 ffc0a9b0: 4e 80 00 20 blr _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a9b4: 48 00 28 a9 bl ffc0d25c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a9b8: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a9bc: 7c 03 03 78 mr r3,r0 ffc0a9c0: 80 01 00 24 lwz r0,36(r1) ffc0a9c4: 83 c1 00 18 lwz r30,24(r1) ffc0a9c8: 7c 08 03 a6 mtlr r0 ffc0a9cc: 83 e1 00 1c lwz r31,28(r1) ffc0a9d0: 38 21 00 20 addi r1,r1,32 ffc0a9d4: 4e 80 00 20 blr =============================================================================== ffc1b17c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc1b17c: 94 21 ff e8 stwu r1,-24(r1) ffc1b180: 7c 08 02 a6 mflr r0 ffc1b184: 7c 64 1b 78 mr r4,r3 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); ffc1b188: 3c 60 00 00 lis r3,0 ffc1b18c: 90 01 00 1c stw r0,28(r1) ffc1b190: 38 63 79 3c addi r3,r3,31036 ffc1b194: 38 a1 00 08 addi r5,r1,8 ffc1b198: 48 00 3c 41 bl ffc1edd8 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1b19c: 80 01 00 08 lwz r0,8(r1) ffc1b1a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b1a4: 41 9e 00 18 beq- cr7,ffc1b1bc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b1a8: 80 01 00 1c lwz r0,28(r1) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1b1ac: 38 60 00 04 li r3,4 } ffc1b1b0: 38 21 00 18 addi r1,r1,24 ffc1b1b4: 7c 08 03 a6 mtlr r0 ffc1b1b8: 4e 80 00 20 blr the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc1b1bc: 80 03 00 38 lwz r0,56(r3) ffc1b1c0: 2f 80 00 04 cmpwi cr7,r0,4 ffc1b1c4: 41 9e 00 0c beq- cr7,ffc1b1d0 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1b1c8: 38 63 00 10 addi r3,r3,16 ffc1b1cc: 48 00 66 25 bl ffc217f0 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc1b1d0: 48 00 4b 0d bl ffc1fcdc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b1d4: 80 01 00 1c lwz r0,28(r1) case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) (void) _Watchdog_Remove( &the_timer->Ticker ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1b1d8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b1dc: 7c 08 03 a6 mtlr r0 ffc1b1e0: 38 21 00 18 addi r1,r1,24 ffc1b1e4: 4e 80 00 20 blr =============================================================================== ffc1b848 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b848: 94 21 ff c8 stwu r1,-56(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1b84c: 3d 20 00 00 lis r9,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b850: 7c 08 02 a6 mflr r0 ffc1b854: 93 e1 00 34 stw r31,52(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1b858: 83 e9 28 e4 lwz r31,10468(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b85c: 93 21 00 1c stw r25,28(r1) Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; ffc1b860: 3b 20 00 0e li r25,14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1b864: 2f 9f 00 00 cmpwi cr7,r31,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b868: 93 61 00 24 stw r27,36(r1) ffc1b86c: 7c db 33 78 mr r27,r6 ffc1b870: 93 81 00 28 stw r28,40(r1) ffc1b874: 7c 9c 23 78 mr r28,r4 ffc1b878: 93 a1 00 2c stw r29,44(r1) ffc1b87c: 7c 7d 1b 78 mr r29,r3 ffc1b880: 93 c1 00 30 stw r30,48(r1) ffc1b884: 7c be 2b 78 mr r30,r5 ffc1b888: 90 01 00 3c stw r0,60(r1) ffc1b88c: 93 01 00 18 stw r24,24(r1) ffc1b890: 93 41 00 20 stw r26,32(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1b894: 41 9e 00 38 beq- cr7,ffc1b8cc return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1b898: 3d 20 00 00 lis r9,0 ffc1b89c: 88 09 28 88 lbz r0,10376(r9) return RTEMS_NOT_DEFINED; ffc1b8a0: 3b 20 00 0b li r25,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1b8a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b8a8: 41 9e 00 24 beq- cr7,ffc1b8cc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc1b8ac: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc1b8b0: 3b 20 00 09 li r25,9 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1b8b4: 41 9e 00 18 beq- cr7,ffc1b8cc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1b8b8: 7c 83 23 78 mr r3,r4 ffc1b8bc: 4b ff bf 59 bl ffc17814 <_TOD_Validate> return RTEMS_INVALID_CLOCK; ffc1b8c0: 3b 20 00 14 li r25,20 return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1b8c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc1b8c8: 40 9e 00 38 bne- cr7,ffc1b900 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b8cc: 80 01 00 3c lwz r0,60(r1) ffc1b8d0: 7f 23 cb 78 mr r3,r25 ffc1b8d4: 83 01 00 18 lwz r24,24(r1) ffc1b8d8: 7c 08 03 a6 mtlr r0 ffc1b8dc: 83 21 00 1c lwz r25,28(r1) ffc1b8e0: 83 41 00 20 lwz r26,32(r1) ffc1b8e4: 83 61 00 24 lwz r27,36(r1) ffc1b8e8: 83 81 00 28 lwz r28,40(r1) ffc1b8ec: 83 a1 00 2c lwz r29,44(r1) ffc1b8f0: 83 c1 00 30 lwz r30,48(r1) ffc1b8f4: 83 e1 00 34 lwz r31,52(r1) ffc1b8f8: 38 21 00 38 addi r1,r1,56 ffc1b8fc: 4e 80 00 20 blr return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b900: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b904: 3f 40 00 00 lis r26,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b908: 4b ff be 69 bl ffc17770 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b90c: 80 1a 28 9c lwz r0,10396(r26) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b910: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b914: 7f 83 00 40 cmplw cr7,r3,r0 ffc1b918: 40 bd ff b4 ble- cr7,ffc1b8cc ffc1b91c: 3c 60 00 00 lis r3,0 ffc1b920: 38 63 79 3c addi r3,r3,31036 ffc1b924: 7f a4 eb 78 mr r4,r29 ffc1b928: 38 a1 00 08 addi r5,r1,8 ffc1b92c: 48 00 34 ad bl ffc1edd8 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1b930: 83 01 00 08 lwz r24,8(r1) ffc1b934: 7c 79 1b 78 mr r25,r3 ffc1b938: 2f 98 00 00 cmpwi cr7,r24,0 ffc1b93c: 40 9e 00 50 bne- cr7,ffc1b98c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1b940: 38 63 00 10 addi r3,r3,16 ffc1b944: 48 00 5e ad bl ffc217f0 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1b948: 80 1a 28 9c lwz r0,10396(r26) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1b94c: 39 20 00 03 li r9,3 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1b950: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1b954: 80 1f 00 04 lwz r0,4(r31) ffc1b958: 7f 24 cb 78 mr r4,r25 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1b95c: 91 39 00 38 stw r9,56(r25) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1b960: 7f e3 fb 78 mr r3,r31 ffc1b964: 7c 09 03 a6 mtctr r0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1b968: 93 19 00 18 stw r24,24(r25) the_watchdog->routine = routine; ffc1b96c: 93 d9 00 2c stw r30,44(r25) the_watchdog->id = id; ffc1b970: 93 b9 00 30 stw r29,48(r25) the_watchdog->user_data = user_data; ffc1b974: 93 79 00 34 stw r27,52(r25) case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1b978: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1b97c: 3b 20 00 00 li r25,0 (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1b980: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc1b984: 48 00 43 59 bl ffc1fcdc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1b988: 4b ff ff 44 b ffc1b8cc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1b98c: 3b 20 00 04 li r25,4 ffc1b990: 4b ff ff 3c b ffc1b8cc =============================================================================== ffc09a6c : int sched_get_priority_max( int policy ) { switch ( policy ) { ffc09a6c: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_max( int policy ) { ffc09a70: 94 21 ff f8 stwu r1,-8(r1) ffc09a74: 7c 08 02 a6 mflr r0 ffc09a78: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc09a7c: 40 9d 00 24 ble- cr7,ffc09aa0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc09a80: 48 00 ae 29 bl ffc148a8 <__errno> ffc09a84: 38 00 00 16 li r0,22 ffc09a88: 90 03 00 00 stw r0,0(r3) ffc09a8c: 38 60 ff ff li r3,-1 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } ffc09a90: 80 01 00 0c lwz r0,12(r1) ffc09a94: 38 21 00 08 addi r1,r1,8 ffc09a98: 7c 08 03 a6 mtlr r0 ffc09a9c: 4e 80 00 20 blr int sched_get_priority_max( int policy ) { switch ( policy ) { ffc09aa0: 38 00 00 01 li r0,1 ffc09aa4: 7c 03 18 30 slw r3,r0,r3 ffc09aa8: 70 60 00 17 andi. r0,r3,23 ffc09aac: 41 a2 ff d4 beq- ffc09a80 <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } ffc09ab0: 80 01 00 0c lwz r0,12(r1) default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; ffc09ab4: 3d 20 00 00 lis r9,0 ffc09ab8: 88 69 26 d4 lbz r3,9940(r9) } ffc09abc: 38 21 00 08 addi r1,r1,8 ffc09ac0: 7c 08 03 a6 mtlr r0 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; ffc09ac4: 38 63 ff ff addi r3,r3,-1 } ffc09ac8: 4e 80 00 20 blr =============================================================================== ffc09acc : int sched_get_priority_min( int policy ) { switch ( policy ) { ffc09acc: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_min( int policy ) { ffc09ad0: 94 21 ff f8 stwu r1,-8(r1) ffc09ad4: 7c 08 02 a6 mflr r0 ffc09ad8: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc09adc: 40 9d 00 24 ble- cr7,ffc09b00 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc09ae0: 48 00 ad c9 bl ffc148a8 <__errno> ffc09ae4: 38 00 00 16 li r0,22 ffc09ae8: 90 03 00 00 stw r0,0(r3) ffc09aec: 38 60 ff ff li r3,-1 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } ffc09af0: 80 01 00 0c lwz r0,12(r1) ffc09af4: 38 21 00 08 addi r1,r1,8 ffc09af8: 7c 08 03 a6 mtlr r0 ffc09afc: 4e 80 00 20 blr int sched_get_priority_min( int policy ) { switch ( policy ) { ffc09b00: 38 00 00 01 li r0,1 ffc09b04: 7c 03 18 30 slw r3,r0,r3 ffc09b08: 70 60 00 17 andi. r0,r3,23 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; ffc09b0c: 38 60 00 01 li r3,1 int sched_get_priority_min( int policy ) { switch ( policy ) { ffc09b10: 41 a2 ff d0 beq- ffc09ae0 <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } ffc09b14: 80 01 00 0c lwz r0,12(r1) ffc09b18: 38 21 00 08 addi r1,r1,8 ffc09b1c: 7c 08 03 a6 mtlr r0 ffc09b20: 4e 80 00 20 blr =============================================================================== ffc09b24 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc09b24: 94 21 ff e8 stwu r1,-24(r1) ffc09b28: 7c 08 02 a6 mflr r0 ffc09b2c: 93 e1 00 14 stw r31,20(r1) /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc09b30: 7c 7f 1b 79 mr. r31,r3 int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc09b34: 90 01 00 1c stw r0,28(r1) /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc09b38: 40 82 00 30 bne- ffc09b68 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) ffc09b3c: 2f 84 00 00 cmpwi cr7,r4,0 ffc09b40: 41 9e 00 50 beq- cr7,ffc09b90 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); ffc09b44: 3d 20 00 00 lis r9,0 ffc09b48: 80 69 27 b0 lwz r3,10160(r9) ffc09b4c: 48 00 49 cd bl ffc0e518 <_Timespec_From_ticks> return 0; ffc09b50: 38 60 00 00 li r3,0 } ffc09b54: 80 01 00 1c lwz r0,28(r1) ffc09b58: 83 e1 00 14 lwz r31,20(r1) ffc09b5c: 38 21 00 18 addi r1,r1,24 ffc09b60: 7c 08 03 a6 mtlr r0 ffc09b64: 4e 80 00 20 blr { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc09b68: 90 81 00 08 stw r4,8(r1) ffc09b6c: 4b ff bb a1 bl ffc0570c ffc09b70: 7f 83 f8 00 cmpw cr7,r3,r31 ffc09b74: 80 81 00 08 lwz r4,8(r1) ffc09b78: 41 9e ff c4 beq+ cr7,ffc09b3c rtems_set_errno_and_return_minus_one( ESRCH ); ffc09b7c: 48 00 ad 2d bl ffc148a8 <__errno> ffc09b80: 38 00 00 03 li r0,3 ffc09b84: 90 03 00 00 stw r0,0(r3) ffc09b88: 38 60 ff ff li r3,-1 ffc09b8c: 4b ff ff c8 b ffc09b54 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09b90: 48 00 ad 19 bl ffc148a8 <__errno> ffc09b94: 38 00 00 16 li r0,22 ffc09b98: 90 03 00 00 stw r0,0(r3) ffc09b9c: 38 60 ff ff li r3,-1 ffc09ba0: 4b ff ff b4 b ffc09b54 =============================================================================== ffc0c380 : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0c380: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { ffc0c384: 94 21 ff b8 stwu r1,-72(r1) ffc0c388: 7c 08 02 a6 mflr r0 ffc0c38c: 81 69 27 ac lwz r11,10156(r9) ffc0c390: 7d 80 00 26 mfcr r12 ffc0c394: 93 c1 00 40 stw r30,64(r1) ffc0c398: 7c 9e 23 78 mr r30,r4 ffc0c39c: 39 6b 00 01 addi r11,r11,1 ffc0c3a0: 93 e1 00 44 stw r31,68(r1) ffc0c3a4: 7c 7f 1b 78 mr r31,r3 ffc0c3a8: 90 01 00 4c stw r0,76(r1) ffc0c3ac: 93 81 00 38 stw r28,56(r1) ffc0c3b0: 93 a1 00 3c stw r29,60(r1) ffc0c3b4: 91 81 00 34 stw r12,52(r1) ffc0c3b8: 90 a1 00 28 stw r5,40(r1) ffc0c3bc: 90 c1 00 2c stw r6,44(r1) ffc0c3c0: 91 69 27 ac stw r11,10156(r9) POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0c3c4: 54 80 bf fe rlwinm r0,r4,23,31,31 ffc0c3c8: 2e 00 00 00 cmpwi cr4,r0,0 ffc0c3cc: 40 92 00 c8 bne- cr4,ffc0c494 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; ffc0c3d0: 3b a0 00 00 li r29,0 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); ffc0c3d4: 7f e3 fb 78 mr r3,r31 ffc0c3d8: 38 81 00 08 addi r4,r1,8 ffc0c3dc: 48 00 83 45 bl ffc14720 <_POSIX_Semaphore_Name_to_id> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { ffc0c3e0: 7c 7c 1b 79 mr. r28,r3 ffc0c3e4: 41 82 00 48 beq- ffc0c42c /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0c3e8: 2f 9c 00 02 cmpwi cr7,r28,2 ffc0c3ec: 40 9e 00 08 bne- cr7,ffc0c3f4 <== NEVER TAKEN ffc0c3f0: 40 92 00 c4 bne- cr4,ffc0c4b4 _Thread_Enable_dispatch(); ffc0c3f4: 48 00 3b 6d bl ffc0ff60 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0c3f8: 48 00 bf c1 bl ffc183b8 <__errno> id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } ffc0c3fc: 80 01 00 4c lwz r0,76(r1) ffc0c400: 81 81 00 34 lwz r12,52(r1) ffc0c404: 7c 08 03 a6 mtlr r0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0c408: 93 83 00 00 stw r28,0(r3) id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } ffc0c40c: 7d 80 81 20 mtcrf 8,r12 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0c410: 38 60 ff ff li r3,-1 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } ffc0c414: 83 81 00 38 lwz r28,56(r1) ffc0c418: 83 a1 00 3c lwz r29,60(r1) ffc0c41c: 83 c1 00 40 lwz r30,64(r1) ffc0c420: 83 e1 00 44 lwz r31,68(r1) ffc0c424: 38 21 00 48 addi r1,r1,72 ffc0c428: 4e 80 00 20 blr /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc0c42c: 73 de 0a 00 andi. r30,r30,2560 ffc0c430: 2f 9e 0a 00 cmpwi cr7,r30,2560 ffc0c434: 41 9e 00 ac beq- cr7,ffc0c4e0 ffc0c438: 80 81 00 08 lwz r4,8(r1) ffc0c43c: 3c 60 00 00 lis r3,0 ffc0c440: 38 a1 00 10 addi r5,r1,16 ffc0c444: 38 63 30 4c addi r3,r3,12364 ffc0c448: 48 00 2b 55 bl ffc0ef9c <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; ffc0c44c: 81 23 00 18 lwz r9,24(r3) if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); ffc0c450: 90 61 00 0c stw r3,12(r1) the_semaphore->open_count += 1; ffc0c454: 38 09 00 01 addi r0,r9,1 ffc0c458: 90 03 00 18 stw r0,24(r3) _Thread_Enable_dispatch(); ffc0c45c: 48 00 3b 05 bl ffc0ff60 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc0c460: 48 00 3b 01 bl ffc0ff60 <_Thread_Enable_dispatch> return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; ffc0c464: 80 61 00 0c lwz r3,12(r1) ffc0c468: 38 63 00 08 addi r3,r3,8 #endif return id; } ffc0c46c: 80 01 00 4c lwz r0,76(r1) ffc0c470: 81 81 00 34 lwz r12,52(r1) ffc0c474: 7c 08 03 a6 mtlr r0 ffc0c478: 83 81 00 38 lwz r28,56(r1) ffc0c47c: 83 a1 00 3c lwz r29,60(r1) ffc0c480: 7d 80 81 20 mtcrf 8,r12 ffc0c484: 83 c1 00 40 lwz r30,64(r1) ffc0c488: 83 e1 00 44 lwz r31,68(r1) ffc0c48c: 38 21 00 48 addi r1,r1,72 ffc0c490: 4e 80 00 20 blr Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0c494: 38 01 00 50 addi r0,r1,80 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0c498: 83 a1 00 2c lwz r29,44(r1) Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0c49c: 90 01 00 18 stw r0,24(r1) ffc0c4a0: 38 01 00 20 addi r0,r1,32 ffc0c4a4: 90 01 00 1c stw r0,28(r1) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0c4a8: 38 00 00 04 li r0,4 ffc0c4ac: 98 01 00 14 stb r0,20(r1) ffc0c4b0: 4b ff ff 24 b ffc0c3d4 /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( ffc0c4b4: 38 80 00 00 li r4,0 ffc0c4b8: 7f a5 eb 78 mr r5,r29 ffc0c4bc: 38 c1 00 0c addi r6,r1,12 ffc0c4c0: 7f e3 fb 78 mr r3,r31 ffc0c4c4: 48 00 80 75 bl ffc14538 <_POSIX_Semaphore_Create_support> ffc0c4c8: 7c 7f 1b 78 mr r31,r3 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); ffc0c4cc: 48 00 3a 95 bl ffc0ff60 <_Thread_Enable_dispatch> if ( status == -1 ) ffc0c4d0: 2f 9f ff ff cmpwi cr7,r31,-1 return SEM_FAILED; ffc0c4d4: 38 60 ff ff li r3,-1 * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) ffc0c4d8: 40 9e ff 8c bne+ cr7,ffc0c464 ffc0c4dc: 4b ff ff 90 b ffc0c46c /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); ffc0c4e0: 48 00 3a 81 bl ffc0ff60 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); ffc0c4e4: 48 00 be d5 bl ffc183b8 <__errno> ffc0c4e8: 38 00 00 11 li r0,17 ffc0c4ec: 90 03 00 00 stw r0,0(r3) ffc0c4f0: 38 60 ff ff li r3,-1 ffc0c4f4: 4b ff ff 78 b ffc0c46c =============================================================================== ffc0c56c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { ffc0c56c: 94 21 ff e0 stwu r1,-32(r1) ffc0c570: 7c 08 02 a6 mflr r0 ffc0c574: 93 e1 00 1c stw r31,28(r1) ffc0c578: 7c 7f 1b 78 mr r31,r3 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0c57c: 7c 83 23 78 mr r3,r4 ffc0c580: 38 81 00 08 addi r4,r1,8 int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { ffc0c584: 90 01 00 24 stw r0,36(r1) * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0c588: 48 00 72 e1 bl ffc13868 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) ffc0c58c: 2f 83 00 03 cmpwi cr7,r3,3 ffc0c590: 41 9e 00 28 beq- cr7,ffc0c5b8 <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); ffc0c594: 80 a1 00 08 lwz r5,8(r1) <== NOT EXECUTED ffc0c598: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0c59c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0c5a0: 48 00 82 45 bl ffc147e4 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } ffc0c5a4: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0c5a8: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0c5ac: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc0c5b0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c5b4: 4e 80 00 20 blr <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); ffc0c5b8: 80 a1 00 08 lwz r5,8(r1) ffc0c5bc: 7f e3 fb 78 mr r3,r31 ffc0c5c0: 38 80 00 01 li r4,1 ffc0c5c4: 48 00 82 21 bl ffc147e4 <_POSIX_Semaphore_Wait_support> lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } ffc0c5c8: 80 01 00 24 lwz r0,36(r1) ffc0c5cc: 83 e1 00 1c lwz r31,28(r1) ffc0c5d0: 38 21 00 20 addi r1,r1,32 ffc0c5d4: 7c 08 03 a6 mtlr r0 ffc0c5d8: 4e 80 00 20 blr =============================================================================== ffc09970 : struct sigaction *oact ) { ISR_Level level; if ( oact ) ffc09970: 2c 05 00 00 cmpwi r5,0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { ffc09974: 94 21 ff e8 stwu r1,-24(r1) ffc09978: 7c 08 02 a6 mflr r0 ffc0997c: 93 c1 00 10 stw r30,16(r1) ffc09980: 7c 9e 23 78 mr r30,r4 ffc09984: 93 e1 00 14 stw r31,20(r1) ffc09988: 7c 7f 1b 78 mr r31,r3 ffc0998c: 90 01 00 1c stw r0,28(r1) ffc09990: 93 a1 00 0c stw r29,12(r1) ISR_Level level; if ( oact ) ffc09994: 41 82 00 2c beq- ffc099c0 *oact = _POSIX_signals_Vectors[ sig ]; ffc09998: 1c 03 00 0c mulli r0,r3,12 ffc0999c: 3d 60 00 00 lis r11,0 ffc099a0: 39 6b 31 80 addi r11,r11,12672 ffc099a4: 7d 2b 02 14 add r9,r11,r0 ffc099a8: 7d 4b 00 2e lwzx r10,r11,r0 ffc099ac: 81 69 00 04 lwz r11,4(r9) ffc099b0: 80 09 00 08 lwz r0,8(r9) ffc099b4: 91 45 00 00 stw r10,0(r5) ffc099b8: 91 65 00 04 stw r11,4(r5) ffc099bc: 90 05 00 08 stw r0,8(r5) if ( !sig ) ffc099c0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc099c4: 41 9e 00 cc beq- cr7,ffc09a90 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc099c8: 38 1f ff ff addi r0,r31,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc099cc: 2b 80 00 1f cmplwi cr7,r0,31 ffc099d0: 41 9d 00 c0 bgt- cr7,ffc09a90 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) ffc099d4: 2f 9f 00 09 cmpwi cr7,r31,9 ffc099d8: 41 9e 00 b8 beq- cr7,ffc09a90 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { ffc099dc: 2f 9e 00 00 cmpwi cr7,r30,0 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; ffc099e0: 38 60 00 00 li r3,0 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { ffc099e4: 41 9e 00 58 beq- cr7,ffc09a3c <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc099e8: 7f a0 00 a6 mfmsr r29 ffc099ec: 7c 10 42 a6 mfsprg r0,0 ffc099f0: 7f a0 00 78 andc r0,r29,r0 ffc099f4: 7c 00 01 24 mtmsr r0 * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { ffc099f8: 80 1e 00 08 lwz r0,8(r30) ffc099fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc09a00: 41 9e 00 58 beq- cr7,ffc09a58 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); ffc09a04: 7f e3 fb 78 mr r3,r31 ffc09a08: 48 00 77 25 bl ffc1112c <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; ffc09a0c: 1f ff 00 0c mulli r31,r31,12 ffc09a10: 81 1e 00 00 lwz r8,0(r30) ffc09a14: 3d 60 00 00 lis r11,0 ffc09a18: 81 5e 00 04 lwz r10,4(r30) ffc09a1c: 80 1e 00 08 lwz r0,8(r30) ffc09a20: 39 6b 31 80 addi r11,r11,12672 ffc09a24: 7d 2b fa 14 add r9,r11,r31 ffc09a28: 7d 0b f9 2e stwx r8,r11,r31 ffc09a2c: 91 49 00 04 stw r10,4(r9) ffc09a30: 90 09 00 08 stw r0,8(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09a34: 7f a0 01 24 mtmsr r29 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; ffc09a38: 38 60 00 00 li r3,0 } ffc09a3c: 80 01 00 1c lwz r0,28(r1) ffc09a40: 83 a1 00 0c lwz r29,12(r1) ffc09a44: 7c 08 03 a6 mtlr r0 ffc09a48: 83 c1 00 10 lwz r30,16(r1) ffc09a4c: 83 e1 00 14 lwz r31,20(r1) ffc09a50: 38 21 00 18 addi r1,r1,24 ffc09a54: 4e 80 00 20 blr * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; ffc09a58: 1f ff 00 0c mulli r31,r31,12 ffc09a5c: 3d 40 ff c2 lis r10,-62 ffc09a60: 39 4a 34 c0 addi r10,r10,13504 ffc09a64: 7d 2a fa 14 add r9,r10,r31 ffc09a68: 7d 0a f8 2e lwzx r8,r10,r31 ffc09a6c: 3d 60 00 00 lis r11,0 ffc09a70: 81 49 00 04 lwz r10,4(r9) ffc09a74: 39 6b 31 80 addi r11,r11,12672 ffc09a78: 80 09 00 08 lwz r0,8(r9) ffc09a7c: 7d 2b fa 14 add r9,r11,r31 ffc09a80: 7d 0b f9 2e stwx r8,r11,r31 ffc09a84: 91 49 00 04 stw r10,4(r9) ffc09a88: 90 09 00 08 stw r0,8(r9) ffc09a8c: 4b ff ff a8 b ffc09a34 * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09a90: 48 00 b3 79 bl ffc14e08 <__errno> ffc09a94: 38 00 00 16 li r0,22 ffc09a98: 90 03 00 00 stw r0,0(r3) ffc09a9c: 38 60 ff ff li r3,-1 ffc09aa0: 4b ff ff 9c b ffc09a3c =============================================================================== ffc09f24 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc09f24: 94 21 ff d0 stwu r1,-48(r1) ffc09f28: 7c 08 02 a6 mflr r0 ffc09f2c: 93 a1 00 24 stw r29,36(r1) ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc09f30: 7c 7d 1b 79 mr. r29,r3 int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc09f34: 93 c1 00 28 stw r30,40(r1) ffc09f38: 7c be 2b 78 mr r30,r5 ffc09f3c: 93 e1 00 2c stw r31,44(r1) ffc09f40: 7c 9f 23 78 mr r31,r4 ffc09f44: 90 01 00 34 stw r0,52(r1) ffc09f48: 93 41 00 18 stw r26,24(r1) ffc09f4c: 93 61 00 1c stw r27,28(r1) ffc09f50: 93 81 00 20 stw r28,32(r1) ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc09f54: 41 82 02 48 beq- ffc0a19c /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { ffc09f58: 2f 85 00 00 cmpwi cr7,r5,0 ffc09f5c: 41 9e 01 9c beq- cr7,ffc0a0f8 if ( !_Timespec_Is_valid( timeout ) ) ffc09f60: 7c a3 2b 78 mr r3,r5 ffc09f64: 48 00 4a 9d bl ffc0ea00 <_Timespec_Is_valid> ffc09f68: 2f 83 00 00 cmpwi cr7,r3,0 ffc09f6c: 41 9e 02 30 beq- cr7,ffc0a19c rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); ffc09f70: 7f c3 f3 78 mr r3,r30 ffc09f74: 48 00 4b 1d bl ffc0ea90 <_Timespec_To_ticks> if ( !interval ) ffc09f78: 7c 64 1b 79 mr. r4,r3 ffc09f7c: 41 82 02 20 beq- ffc0a19c <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; ffc09f80: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09f84: 41 9e 01 80 beq- cr7,ffc0a104 <== NEVER TAKEN the_thread = _Thread_Executing; ffc09f88: 3f 80 00 00 lis r28,0 ffc09f8c: 3b 9c 31 24 addi r28,r28,12580 ffc09f90: 81 3c 00 0c lwz r9,12(r28) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc09f94: 83 49 01 34 lwz r26,308(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09f98: 7f 60 00 a6 mfmsr r27 ffc09f9c: 7c 10 42 a6 mfsprg r0,0 ffc09fa0: 7f 60 00 78 andc r0,r27,r0 ffc09fa4: 7c 00 01 24 mtmsr r0 */ /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { ffc09fa8: 80 1d 00 00 lwz r0,0(r29) ffc09fac: 80 7a 00 d4 lwz r3,212(r26) ffc09fb0: 7c 0b 18 39 and. r11,r0,r3 ffc09fb4: 40 82 01 84 bne- ffc0a138 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { ffc09fb8: 3d 60 00 00 lis r11,0 ffc09fbc: 80 6b 28 4c lwz r3,10316(r11) ffc09fc0: 7c 0b 18 39 and. r11,r0,r3 ffc09fc4: 40 82 00 d0 bne- ffc0a094 ffc09fc8: 3d 60 00 00 lis r11,0 ffc09fcc: 81 4b 27 fc lwz r10,10236(r11) ffc09fd0: 38 0a 00 01 addi r0,r10,1 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; ffc09fd4: 39 40 ff ff li r10,-1 ffc09fd8: 91 5f 00 00 stw r10,0(r31) ffc09fdc: 90 0b 27 fc stw r0,10236(r11) _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; ffc09fe0: 38 00 00 04 li r0,4 ffc09fe4: 90 09 00 34 stw r0,52(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc09fe8: 3d 60 00 00 lis r11,0 ffc09fec: 39 6b 33 0c addi r11,r11,13068 the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; ffc09ff0: 80 1d 00 00 lwz r0,0(r29) the_thread->Wait.return_argument = the_info; ffc09ff4: 93 e9 00 28 stw r31,40(r9) the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; ffc09ff8: 90 09 00 30 stw r0,48(r9) 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; ffc09ffc: 38 00 00 01 li r0,1 } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc0a000: 91 69 00 44 stw r11,68(r9) ffc0a004: 90 0b 00 30 stw r0,48(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a008: 7f 60 01 24 mtmsr r27 the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); ffc0a00c: 3c a0 ff c1 lis r5,-63 ffc0a010: 3c 60 00 00 lis r3,0 ffc0a014: 38 a5 e4 dc addi r5,r5,-6948 ffc0a018: 38 63 33 0c addi r3,r3,13068 ffc0a01c: 48 00 40 41 bl ffc0e05c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); ffc0a020: 48 00 39 bd bl ffc0d9dc <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); ffc0a024: 80 9f 00 00 lwz r4,0(r31) ffc0a028: 7f 43 d3 78 mr r3,r26 ffc0a02c: 7f e5 fb 78 mr r5,r31 ffc0a030: 38 c0 00 00 li r6,0 ffc0a034: 38 e0 00 00 li r7,0 ffc0a038: 48 00 7a 2d bl ffc11a64 <_POSIX_signals_Clear_signals> /* Set errno only if return code is not EINTR or * if EINTR was caused by a signal being caught, which * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) ffc0a03c: 81 3c 00 0c lwz r9,12(r28) ffc0a040: 80 09 00 34 lwz r0,52(r9) ffc0a044: 2f 80 00 04 cmpwi cr7,r0,4 ffc0a048: 40 9e 01 68 bne- cr7,ffc0a1b0 || !(*set & signo_to_mask( the_info->si_signo )) ) { ffc0a04c: 83 df 00 00 lwz r30,0(r31) ffc0a050: 39 60 00 01 li r11,1 ffc0a054: 80 1d 00 00 lwz r0,0(r29) ffc0a058: 39 3e ff ff addi r9,r30,-1 ffc0a05c: 7d 69 48 30 slw r9,r11,r9 ffc0a060: 7d 2b 00 39 and. r11,r9,r0 ffc0a064: 41 82 01 4c beq- ffc0a1b0 errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } ffc0a068: 80 01 00 34 lwz r0,52(r1) ffc0a06c: 7f c3 f3 78 mr r3,r30 ffc0a070: 83 41 00 18 lwz r26,24(r1) ffc0a074: 7c 08 03 a6 mtlr r0 ffc0a078: 83 61 00 1c lwz r27,28(r1) ffc0a07c: 83 81 00 20 lwz r28,32(r1) ffc0a080: 83 a1 00 24 lwz r29,36(r1) ffc0a084: 83 c1 00 28 lwz r30,40(r1) ffc0a088: 83 e1 00 2c lwz r31,44(r1) ffc0a08c: 38 21 00 30 addi r1,r1,48 ffc0a090: 4e 80 00 20 blr } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); ffc0a094: 4b ff fe 35 bl ffc09ec8 <_POSIX_signals_Get_lowest> _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc0a098: 7f e5 fb 78 mr r5,r31 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); ffc0a09c: 7c 7e 1b 78 mr r30,r3 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc0a0a0: 7f c4 f3 78 mr r4,r30 ffc0a0a4: 7f 43 d3 78 mr r3,r26 ffc0a0a8: 38 c0 00 01 li r6,1 ffc0a0ac: 38 e0 00 00 li r7,0 ffc0a0b0: 48 00 79 b5 bl ffc11a64 <_POSIX_signals_Clear_signals> ffc0a0b4: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; ffc0a0b8: 38 00 00 01 li r0,1 if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; ffc0a0bc: 93 df 00 00 stw r30,0(r31) errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } ffc0a0c0: 7f c3 f3 78 mr r3,r30 signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; ffc0a0c4: 90 1f 00 04 stw r0,4(r31) the_info->si_value.sival_int = 0; ffc0a0c8: 38 00 00 00 li r0,0 ffc0a0cc: 90 1f 00 08 stw r0,8(r31) errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } ffc0a0d0: 80 01 00 34 lwz r0,52(r1) ffc0a0d4: 83 41 00 18 lwz r26,24(r1) ffc0a0d8: 7c 08 03 a6 mtlr r0 ffc0a0dc: 83 61 00 1c lwz r27,28(r1) ffc0a0e0: 83 81 00 20 lwz r28,32(r1) ffc0a0e4: 83 a1 00 24 lwz r29,36(r1) ffc0a0e8: 83 c1 00 28 lwz r30,40(r1) ffc0a0ec: 83 e1 00 2c lwz r31,44(r1) ffc0a0f0: 38 21 00 30 addi r1,r1,48 ffc0a0f4: 4e 80 00 20 blr /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; ffc0a0f8: 2f 9f 00 00 cmpwi cr7,r31,0 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; ffc0a0fc: 38 80 00 00 li r4,0 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; ffc0a100: 40 9e fe 88 bne+ cr7,ffc09f88 the_thread = _Thread_Executing; ffc0a104: 3f 80 00 00 lis r28,0 ffc0a108: 3b 9c 31 24 addi r28,r28,12580 ffc0a10c: 81 3c 00 0c lwz r9,12(r28) /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; ffc0a110: 3b e1 00 08 addi r31,r1,8 the_thread = _Thread_Executing; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0a114: 83 49 01 34 lwz r26,308(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a118: 7f 60 00 a6 mfmsr r27 ffc0a11c: 7c 10 42 a6 mfsprg r0,0 ffc0a120: 7f 60 00 78 andc r0,r27,r0 ffc0a124: 7c 00 01 24 mtmsr r0 */ /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { ffc0a128: 80 1d 00 00 lwz r0,0(r29) ffc0a12c: 80 7a 00 d4 lwz r3,212(r26) ffc0a130: 7c 0b 18 39 and. r11,r0,r3 ffc0a134: 41 82 fe 84 beq+ ffc09fb8 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending ); ffc0a138: 4b ff fd 91 bl ffc09ec8 <_POSIX_signals_Get_lowest> _POSIX_signals_Clear_signals( ffc0a13c: 7f e5 fb 78 mr r5,r31 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending ); ffc0a140: 90 7f 00 00 stw r3,0(r31) ffc0a144: 7c 64 1b 78 mr r4,r3 _POSIX_signals_Clear_signals( ffc0a148: 38 c0 00 00 li r6,0 ffc0a14c: 7f 43 d3 78 mr r3,r26 ffc0a150: 38 e0 00 00 li r7,0 ffc0a154: 48 00 79 11 bl ffc11a64 <_POSIX_signals_Clear_signals> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a158: 7f 60 01 24 mtmsr r27 false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; ffc0a15c: 38 00 00 01 li r0,1 the_info->si_value.sival_int = 0; return the_info->si_signo; ffc0a160: 83 df 00 00 lwz r30,0(r31) false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; ffc0a164: 90 1f 00 04 stw r0,4(r31) the_info->si_value.sival_int = 0; ffc0a168: 38 00 00 00 li r0,0 errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } ffc0a16c: 7f c3 f3 78 mr r3,r30 false ); _ISR_Enable( level ); the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; ffc0a170: 90 1f 00 08 stw r0,8(r31) errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } ffc0a174: 80 01 00 34 lwz r0,52(r1) ffc0a178: 83 41 00 18 lwz r26,24(r1) ffc0a17c: 7c 08 03 a6 mtlr r0 ffc0a180: 83 61 00 1c lwz r27,28(r1) ffc0a184: 83 81 00 20 lwz r28,32(r1) ffc0a188: 83 a1 00 24 lwz r29,36(r1) ffc0a18c: 83 c1 00 28 lwz r30,40(r1) ffc0a190: 83 e1 00 2c lwz r31,44(r1) ffc0a194: 38 21 00 30 addi r1,r1,48 ffc0a198: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc0a19c: 48 00 b4 b5 bl ffc15650 <__errno> ffc0a1a0: 38 00 00 16 li r0,22 ffc0a1a4: 90 03 00 00 stw r0,0(r3) ffc0a1a8: 3b c0 ff ff li r30,-1 ffc0a1ac: 4b ff fe bc b ffc0a068 * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) || !(*set & signo_to_mask( the_info->si_signo )) ) { errno = _Thread_Executing->Wait.return_code; ffc0a1b0: 48 00 b4 a1 bl ffc15650 <__errno> ffc0a1b4: 81 3c 00 0c lwz r9,12(r28) return -1; ffc0a1b8: 3b c0 ff ff li r30,-1 * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) || !(*set & signo_to_mask( the_info->si_signo )) ) { errno = _Thread_Executing->Wait.return_code; ffc0a1bc: 80 09 00 34 lwz r0,52(r9) ffc0a1c0: 90 03 00 00 stw r0,0(r3) return -1; ffc0a1c4: 4b ff fe a4 b ffc0a068 =============================================================================== ffc0c500 : int sigwait( const sigset_t *set, int *sig ) { ffc0c500: 94 21 ff f0 stwu r1,-16(r1) ffc0c504: 7c 08 02 a6 mflr r0 int status; status = sigtimedwait( set, NULL, NULL ); ffc0c508: 38 a0 00 00 li r5,0 int sigwait( const sigset_t *set, int *sig ) { ffc0c50c: 93 e1 00 0c stw r31,12(r1) ffc0c510: 7c 9f 23 78 mr r31,r4 int status; status = sigtimedwait( set, NULL, NULL ); ffc0c514: 38 80 00 00 li r4,0 int sigwait( const sigset_t *set, int *sig ) { ffc0c518: 90 01 00 14 stw r0,20(r1) int status; status = sigtimedwait( set, NULL, NULL ); ffc0c51c: 4b ff fd 1d bl ffc0c238 if ( status != -1 ) { ffc0c520: 2f 83 ff ff cmpwi cr7,r3,-1 int *sig ) { int status; status = sigtimedwait( set, NULL, NULL ); ffc0c524: 7c 60 1b 78 mr r0,r3 if ( status != -1 ) { ffc0c528: 41 9e 00 28 beq- cr7,ffc0c550 if ( sig ) ffc0c52c: 2f 9f 00 00 cmpwi cr7,r31,0 *sig = status; return 0; ffc0c530: 38 60 00 00 li r3,0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) ffc0c534: 41 9e 00 08 beq- cr7,ffc0c53c <== NEVER TAKEN *sig = status; ffc0c538: 90 1f 00 00 stw r0,0(r31) return 0; } return errno; } ffc0c53c: 80 01 00 14 lwz r0,20(r1) ffc0c540: 83 e1 00 0c lwz r31,12(r1) ffc0c544: 38 21 00 10 addi r1,r1,16 ffc0c548: 7c 08 03 a6 mtlr r0 ffc0c54c: 4e 80 00 20 blr if ( sig ) *sig = status; return 0; } return errno; ffc0c550: 48 00 af d5 bl ffc17524 <__errno> } ffc0c554: 80 01 00 14 lwz r0,20(r1) if ( sig ) *sig = status; return 0; } return errno; ffc0c558: 80 63 00 00 lwz r3,0(r3) } ffc0c55c: 7c 08 03 a6 mtlr r0 ffc0c560: 83 e1 00 0c lwz r31,12(r1) ffc0c564: 38 21 00 10 addi r1,r1,16 ffc0c568: 4e 80 00 20 blr =============================================================================== ffc08e14 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { ffc08e14: 7d 80 00 26 mfcr r12 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc08e18: 2f 83 00 01 cmpwi cr7,r3,1 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { ffc08e1c: 94 21 ff e8 stwu r1,-24(r1) ffc08e20: 7c 08 02 a6 mflr r0 ffc08e24: 93 c1 00 10 stw r30,16(r1) ffc08e28: 7c be 2b 78 mr r30,r5 ffc08e2c: 93 e1 00 14 stw r31,20(r1) ffc08e30: 7c 9f 23 78 mr r31,r4 ffc08e34: 90 01 00 1c stw r0,28(r1) ffc08e38: 93 a1 00 0c stw r29,12(r1) ffc08e3c: 91 81 00 08 stw r12,8(r1) POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc08e40: 40 9e 01 04 bne- cr7,ffc08f44 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) ffc08e44: 2f 85 00 00 cmpwi cr7,r5,0 ffc08e48: 41 9e 00 fc beq- cr7,ffc08f44 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { ffc08e4c: 2e 04 00 00 cmpwi cr4,r4,0 ffc08e50: 41 92 00 2c beq- cr4,ffc08e7c /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && ffc08e54: 81 24 00 00 lwz r9,0(r4) ffc08e58: 38 09 ff ff addi r0,r9,-1 ffc08e5c: 2b 80 00 01 cmplwi cr7,r0,1 ffc08e60: 41 9d 00 e4 bgt- cr7,ffc08f44 <== NEVER TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) ffc08e64: 81 24 00 04 lwz r9,4(r4) ffc08e68: 2f 89 00 00 cmpwi cr7,r9,0 ffc08e6c: 41 9e 00 d8 beq- cr7,ffc08f44 <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc08e70: 39 29 ff ff addi r9,r9,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) ffc08e74: 2b 89 00 1f cmplwi cr7,r9,31 ffc08e78: 41 9d 00 cc bgt- cr7,ffc08f44 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08e7c: 3d 20 00 00 lis r9,0 ffc08e80: 81 69 27 f8 lwz r11,10232(r9) ffc08e84: 38 0b 00 01 addi r0,r11,1 ffc08e88: 90 09 27 f8 stw r0,10232(r9) * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); ffc08e8c: 3f a0 00 00 lis r29,0 ffc08e90: 3b bd 2f 0c addi r29,r29,12044 ffc08e94: 7f a3 eb 78 mr r3,r29 ffc08e98: 48 00 28 e5 bl ffc0b77c <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { ffc08e9c: 2c 03 00 00 cmpwi r3,0 ffc08ea0: 41 82 00 d8 beq- ffc08f78 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ffc08ea4: 38 00 00 02 li r0,2 ffc08ea8: 98 03 00 3c stb r0,60(r3) ptimer->thread_id = _Thread_Executing->Object.id; ffc08eac: 3d 20 00 00 lis r9,0 ffc08eb0: 81 29 31 50 lwz r9,12624(r9) ffc08eb4: 80 09 00 08 lwz r0,8(r9) ffc08eb8: 90 03 00 38 stw r0,56(r3) if ( evp != NULL ) { ffc08ebc: 41 92 00 1c beq- cr4,ffc08ed8 ptimer->inf.sigev_notify = evp->sigev_notify; ffc08ec0: 81 7f 00 00 lwz r11,0(r31) ptimer->inf.sigev_signo = evp->sigev_signo; ffc08ec4: 81 3f 00 04 lwz r9,4(r31) ptimer->inf.sigev_value = evp->sigev_value; ffc08ec8: 80 1f 00 08 lwz r0,8(r31) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ffc08ecc: 91 63 00 40 stw r11,64(r3) ptimer->inf.sigev_signo = evp->sigev_signo; ffc08ed0: 91 23 00 44 stw r9,68(r3) ptimer->inf.sigev_value = evp->sigev_value; ffc08ed4: 90 03 00 48 stw r0,72(r3) uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc08ed8: 81 23 00 08 lwz r9,8(r3) } ptimer->overrun = 0; ffc08edc: 38 00 00 00 li r0,0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc08ee0: 81 5d 00 1c lwz r10,28(r29) ffc08ee4: 55 2b 13 ba rlwinm r11,r9,2,14,29 ffc08ee8: 90 03 00 68 stw r0,104(r3) ptimer->timer_data.it_value.tv_sec = 0; ffc08eec: 90 03 00 5c stw r0,92(r3) ptimer->timer_data.it_value.tv_nsec = 0; ffc08ef0: 90 03 00 60 stw r0,96(r3) ptimer->timer_data.it_interval.tv_sec = 0; ffc08ef4: 90 03 00 54 stw r0,84(r3) ptimer->timer_data.it_interval.tv_nsec = 0; ffc08ef8: 90 03 00 58 stw r0,88(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08efc: 90 03 00 18 stw r0,24(r3) the_watchdog->routine = routine; ffc08f00: 90 03 00 2c stw r0,44(r3) the_watchdog->id = id; ffc08f04: 90 03 00 30 stw r0,48(r3) the_watchdog->user_data = user_data; ffc08f08: 90 03 00 34 stw r0,52(r3) ffc08f0c: 7c 6a 59 2e stwx r3,r10,r11 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc08f10: 90 03 00 0c stw r0,12(r3) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; ffc08f14: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc08f18: 48 00 3d 85 bl ffc0cc9c <_Thread_Enable_dispatch> return 0; ffc08f1c: 38 60 00 00 li r3,0 } ffc08f20: 80 01 00 1c lwz r0,28(r1) ffc08f24: 81 81 00 08 lwz r12,8(r1) ffc08f28: 7c 08 03 a6 mtlr r0 ffc08f2c: 83 a1 00 0c lwz r29,12(r1) ffc08f30: 83 c1 00 10 lwz r30,16(r1) ffc08f34: 7d 80 81 20 mtcrf 8,r12 ffc08f38: 83 e1 00 14 lwz r31,20(r1) ffc08f3c: 38 21 00 18 addi r1,r1,24 ffc08f40: 4e 80 00 20 blr if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc08f44: 48 00 ba 99 bl ffc149dc <__errno> ffc08f48: 38 00 00 16 li r0,22 ffc08f4c: 90 03 00 00 stw r0,0(r3) ffc08f50: 38 60 ff ff li r3,-1 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } ffc08f54: 80 01 00 1c lwz r0,28(r1) ffc08f58: 81 81 00 08 lwz r12,8(r1) ffc08f5c: 7c 08 03 a6 mtlr r0 ffc08f60: 83 a1 00 0c lwz r29,12(r1) ffc08f64: 83 c1 00 10 lwz r30,16(r1) ffc08f68: 7d 80 81 20 mtcrf 8,r12 ffc08f6c: 83 e1 00 14 lwz r31,20(r1) ffc08f70: 38 21 00 18 addi r1,r1,24 ffc08f74: 4e 80 00 20 blr /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); ffc08f78: 48 00 3d 25 bl ffc0cc9c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc08f7c: 48 00 ba 61 bl ffc149dc <__errno> ffc08f80: 38 00 00 0b li r0,11 ffc08f84: 90 03 00 00 stw r0,0(r3) ffc08f88: 38 60 ff ff li r3,-1 ffc08f8c: 4b ff ff 94 b ffc08f20 =============================================================================== ffc08f90 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc08f90: 94 21 ff c0 stwu r1,-64(r1) ffc08f94: 7c 08 02 a6 mflr r0 ffc08f98: 93 a1 00 34 stw r29,52(r1) Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc08f9c: 7c bd 2b 79 mr. r29,r5 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc08fa0: 93 81 00 30 stw r28,48(r1) ffc08fa4: 7c 9c 23 78 mr r28,r4 ffc08fa8: 93 c1 00 38 stw r30,56(r1) ffc08fac: 7c de 33 78 mr r30,r6 ffc08fb0: 93 e1 00 3c stw r31,60(r1) ffc08fb4: 7c 7f 1b 78 mr r31,r3 ffc08fb8: 90 01 00 44 stw r0,68(r1) ffc08fbc: 93 61 00 2c stw r27,44(r1) Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc08fc0: 41 82 01 c4 beq- ffc09184 <== NEVER TAKEN /* * First, it verifies if the structure "value" is correct * if the number of nanoseconds is not correct return EINVAL */ if ( !_Timespec_Is_valid( &(value->it_value) ) ) { ffc08fc4: 38 7d 00 08 addi r3,r29,8 ffc08fc8: 48 00 4d 35 bl ffc0dcfc <_Timespec_Is_valid> ffc08fcc: 2f 83 00 00 cmpwi cr7,r3,0 ffc08fd0: 41 9e 01 b4 beq- cr7,ffc09184 rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { ffc08fd4: 7f a3 eb 78 mr r3,r29 ffc08fd8: 48 00 4d 25 bl ffc0dcfc <_Timespec_Is_valid> ffc08fdc: 2f 83 00 00 cmpwi cr7,r3,0 ffc08fe0: 41 9e 01 a4 beq- cr7,ffc09184 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { ffc08fe4: 2f 9c 00 04 cmpwi cr7,r28,4 ffc08fe8: 41 9e 01 24 beq- cr7,ffc0910c ffc08fec: 2f 9c 00 00 cmpwi cr7,r28,0 ffc08ff0: 40 9e 01 94 bne- cr7,ffc09184 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc08ff4: 80 1d 00 0c lwz r0,12(r29) timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); ffc08ff8: 3c 60 00 00 lis r3,0 ffc08ffc: 81 5d 00 00 lwz r10,0(r29) ffc09000: 7f e4 fb 78 mr r4,r31 ffc09004: 81 7d 00 04 lwz r11,4(r29) ffc09008: 38 63 2f 0c addi r3,r3,12044 ffc0900c: 81 3d 00 08 lwz r9,8(r29) ffc09010: 38 a1 00 08 addi r5,r1,8 ffc09014: 90 01 00 20 stw r0,32(r1) ffc09018: 91 41 00 14 stw r10,20(r1) ffc0901c: 91 61 00 18 stw r11,24(r1) ffc09020: 91 21 00 1c stw r9,28(r1) ffc09024: 48 00 2d 75 bl ffc0bd98 <_Objects_Get> ffc09028: 7c 7f 1b 78 mr r31,r3 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { ffc0902c: 80 01 00 08 lwz r0,8(r1) ffc09030: 2f 80 00 00 cmpwi cr7,r0,0 ffc09034: 40 9e 01 50 bne- cr7,ffc09184 <== NEVER TAKEN 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 ) { ffc09038: 80 01 00 1c lwz r0,28(r1) ffc0903c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09040: 40 9e 00 10 bne- cr7,ffc09050 ffc09044: 80 01 00 20 lwz r0,32(r1) ffc09048: 2f 80 00 00 cmpwi cr7,r0,0 ffc0904c: 41 9e 01 4c beq- cr7,ffc09198 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); ffc09050: 7f a3 eb 78 mr r3,r29 ffc09054: 48 00 4d 39 bl ffc0dd8c <_Timespec_To_ticks> ffc09058: 90 7f 00 64 stw r3,100(r31) initial_period = _Timespec_To_ticks( &normalize.it_value ); ffc0905c: 38 61 00 1c addi r3,r1,28 ffc09060: 48 00 4d 2d bl ffc0dd8c <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( ffc09064: 80 bf 00 08 lwz r5,8(r31) ffc09068: 3c c0 ff c1 lis r6,-63 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 ); ffc0906c: 7c 64 1b 78 mr r4,r3 activated = _POSIX_Timer_Insert_helper( ffc09070: 38 c6 92 1c addi r6,r6,-28132 ffc09074: 38 7f 00 10 addi r3,r31,16 ffc09078: 7f e7 fb 78 mr r7,r31 ffc0907c: 48 00 81 45 bl ffc111c0 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { ffc09080: 2f 83 00 00 cmpwi cr7,r3,0 ffc09084: 41 9e 00 5c beq- cr7,ffc090e0 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) ffc09088: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0908c: 41 9e 00 24 beq- cr7,ffc090b0 *ovalue = ptimer->timer_data; ffc09090: 81 5f 00 54 lwz r10,84(r31) ffc09094: 81 7f 00 58 lwz r11,88(r31) ffc09098: 81 3f 00 5c lwz r9,92(r31) ffc0909c: 80 1f 00 60 lwz r0,96(r31) ffc090a0: 91 5e 00 00 stw r10,0(r30) ffc090a4: 91 7e 00 04 stw r11,4(r30) ffc090a8: 91 3e 00 08 stw r9,8(r30) ffc090ac: 90 1e 00 0c stw r0,12(r30) ptimer->timer_data = normalize; ffc090b0: 80 01 00 14 lwz r0,20(r1) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); ffc090b4: 38 7f 00 6c addi r3,r31,108 * 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; ffc090b8: 90 1f 00 54 stw r0,84(r31) ffc090bc: 80 01 00 18 lwz r0,24(r1) ffc090c0: 90 1f 00 58 stw r0,88(r31) ffc090c4: 80 01 00 1c lwz r0,28(r1) ffc090c8: 90 1f 00 5c stw r0,92(r31) ffc090cc: 80 01 00 20 lwz r0,32(r1) ffc090d0: 90 1f 00 60 stw r0,96(r31) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc090d4: 38 00 00 03 li r0,3 ffc090d8: 98 1f 00 3c stb r0,60(r31) _TOD_Get( &ptimer->time ); ffc090dc: 48 00 20 49 bl ffc0b124 <_TOD_Get> _Thread_Enable_dispatch(); ffc090e0: 48 00 3b bd bl ffc0cc9c <_Thread_Enable_dispatch> return 0; ffc090e4: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } ffc090e8: 80 01 00 44 lwz r0,68(r1) ffc090ec: 83 61 00 2c lwz r27,44(r1) ffc090f0: 7c 08 03 a6 mtlr r0 ffc090f4: 83 81 00 30 lwz r28,48(r1) ffc090f8: 83 a1 00 34 lwz r29,52(r1) ffc090fc: 83 c1 00 38 lwz r30,56(r1) ffc09100: 83 e1 00 3c lwz r31,60(r1) ffc09104: 38 21 00 40 addi r1,r1,64 ffc09108: 4e 80 00 20 blr if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc0910c: 81 5d 00 00 lwz r10,0(r29) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); ffc09110: 3b 81 00 0c addi r28,r1,12 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc09114: 81 7d 00 04 lwz r11,4(r29) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); ffc09118: 7f 83 e3 78 mr r3,r28 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc0911c: 81 3d 00 08 lwz r9,8(r29) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc09120: 3b 61 00 1c addi r27,r1,28 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc09124: 80 1d 00 0c lwz r0,12(r29) ffc09128: 91 41 00 14 stw r10,20(r1) ffc0912c: 91 61 00 18 stw r11,24(r1) ffc09130: 91 21 00 1c stw r9,28(r1) ffc09134: 90 01 00 20 stw r0,32(r1) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); ffc09138: 48 00 1f ed bl ffc0b124 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc0913c: 7f 83 e3 78 mr r3,r28 ffc09140: 7f 64 db 78 mr r4,r27 ffc09144: 48 00 4b 7d bl ffc0dcc0 <_Timespec_Greater_than> ffc09148: 2f 83 00 00 cmpwi cr7,r3,0 ffc0914c: 40 9e 00 38 bne- cr7,ffc09184 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); ffc09150: 7f 64 db 78 mr r4,r27 ffc09154: 7f 83 e3 78 mr r3,r28 ffc09158: 7f 65 db 78 mr r5,r27 ffc0915c: 48 00 4b dd bl ffc0dd38 <_Timespec_Subtract> ffc09160: 3c 60 00 00 lis r3,0 ffc09164: 7f e4 fb 78 mr r4,r31 ffc09168: 38 63 2f 0c addi r3,r3,12044 ffc0916c: 38 a1 00 08 addi r5,r1,8 ffc09170: 48 00 2c 29 bl ffc0bd98 <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { ffc09174: 80 01 00 08 lwz r0,8(r1) ffc09178: 7c 7f 1b 78 mr r31,r3 ffc0917c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09180: 41 be fe b8 beq- cr7,ffc09038 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); ffc09184: 48 00 b8 59 bl ffc149dc <__errno> ffc09188: 38 00 00 16 li r0,22 ffc0918c: 90 03 00 00 stw r0,0(r3) ffc09190: 38 60 ff ff li r3,-1 ffc09194: 4b ff ff 54 b ffc090e8 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 ); ffc09198: 38 63 00 10 addi r3,r3,16 ffc0919c: 48 00 53 0d bl ffc0e4a8 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) ffc091a0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc091a4: 41 9e 00 24 beq- cr7,ffc091c8 *ovalue = ptimer->timer_data; ffc091a8: 81 5f 00 54 lwz r10,84(r31) ffc091ac: 81 7f 00 58 lwz r11,88(r31) ffc091b0: 81 3f 00 5c lwz r9,92(r31) ffc091b4: 80 1f 00 60 lwz r0,96(r31) ffc091b8: 91 5e 00 00 stw r10,0(r30) ffc091bc: 91 7e 00 04 stw r11,4(r30) ffc091c0: 91 3e 00 08 stw r9,8(r30) ffc091c4: 90 1e 00 0c stw r0,12(r30) /* The new data are set */ ptimer->timer_data = normalize; ffc091c8: 80 01 00 14 lwz r0,20(r1) ffc091cc: 90 1f 00 54 stw r0,84(r31) ffc091d0: 80 01 00 18 lwz r0,24(r1) ffc091d4: 90 1f 00 58 stw r0,88(r31) ffc091d8: 80 01 00 1c lwz r0,28(r1) ffc091dc: 90 1f 00 5c stw r0,92(r31) ffc091e0: 80 01 00 20 lwz r0,32(r1) ffc091e4: 90 1f 00 60 stw r0,96(r31) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc091e8: 38 00 00 04 li r0,4 ffc091ec: 98 1f 00 3c stb r0,60(r31) /* Returns with success */ _Thread_Enable_dispatch(); ffc091f0: 48 00 3a ad bl ffc0cc9c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } ffc091f4: 80 01 00 44 lwz r0,68(r1) ptimer->timer_data = normalize; /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); return 0; ffc091f8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } ffc091fc: 83 61 00 2c lwz r27,44(r1) ffc09200: 7c 08 03 a6 mtlr r0 ffc09204: 83 81 00 30 lwz r28,48(r1) ffc09208: 83 a1 00 34 lwz r29,52(r1) ffc0920c: 83 c1 00 38 lwz r30,56(r1) ffc09210: 83 e1 00 3c lwz r31,60(r1) ffc09214: 38 21 00 40 addi r1,r1,64 ffc09218: 4e 80 00 20 blr =============================================================================== ffc08cc8 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc08cc8: 94 21 ff d8 stwu r1,-40(r1) ffc08ccc: 7c 08 02 a6 mflr r0 ffc08cd0: 93 e1 00 24 stw r31,36(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc08cd4: 3f e0 00 00 lis r31,0 ffc08cd8: 3b ff 35 14 addi r31,r31,13588 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc08cdc: 90 01 00 2c stw r0,44(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc08ce0: 80 1f 00 1c lwz r0,28(r31) useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc08ce4: 93 c1 00 20 stw r30,32(r1) ffc08ce8: 7c 7e 1b 78 mr r30,r3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc08cec: 2f 80 00 00 cmpwi cr7,r0,0 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc08cf0: 93 81 00 18 stw r28,24(r1) ffc08cf4: 93 a1 00 1c stw r29,28(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc08cf8: 41 9e 00 ac beq- cr7,ffc08da4 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); ffc08cfc: 7f e3 fb 78 mr r3,r31 ffc08d00: 48 00 51 f9 bl ffc0def8 <_Watchdog_Remove> useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; ffc08d04: 3b a0 00 00 li r29,0 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { ffc08d08: 38 63 ff fe addi r3,r3,-2 ffc08d0c: 2b 83 00 01 cmplwi cr7,r3,1 ffc08d10: 40 9d 00 b4 ble- cr7,ffc08dc4 <== ALWAYS TAKEN /* * 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 ) { ffc08d14: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08d18: 41 be 00 68 beq+ cr7,ffc08d80 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; ffc08d1c: 3c 00 43 1b lis r0,17179 ffc08d20: 60 00 de 83 ori r0,r0,56963 ffc08d24: 7c 1e 00 16 mulhwu r0,r30,r0 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); ffc08d28: 3b 81 00 08 addi r28,r1,8 * 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; ffc08d2c: 54 00 74 be rlwinm r0,r0,14,18,31 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc08d30: 54 0b 40 2e rlwinm r11,r0,8,0,23 * 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; ffc08d34: 90 01 00 08 stw r0,8(r1) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc08d38: 54 09 18 38 rlwinm r9,r0,3,0,28 ffc08d3c: 7d 29 58 50 subf r9,r9,r11 ffc08d40: 55 2b 30 32 rlwinm r11,r9,6,0,25 ffc08d44: 7d 29 58 50 subf r9,r9,r11 ffc08d48: 7d 29 02 14 add r9,r9,r0 ffc08d4c: 55 29 30 32 rlwinm r9,r9,6,0,25 ffc08d50: 7f c9 f0 50 subf r30,r9,r30 ffc08d54: 1f de 03 e8 mulli r30,r30,1000 ticks = _Timespec_To_ticks( &tp ); ffc08d58: 7f 83 e3 78 mr r3,r28 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc08d5c: 93 c1 00 0c stw r30,12(r1) ticks = _Timespec_To_ticks( &tp ); ffc08d60: 48 00 49 5d bl ffc0d6bc <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); ffc08d64: 7f 83 e3 78 mr r3,r28 ffc08d68: 48 00 49 55 bl ffc0d6bc <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08d6c: 7f e4 fb 78 mr r4,r31 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08d70: 90 7f 00 0c stw r3,12(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08d74: 3c 60 00 00 lis r3,0 ffc08d78: 38 63 2d 68 addi r3,r3,11624 ffc08d7c: 48 00 4f b5 bl ffc0dd30 <_Watchdog_Insert> } return remaining; } ffc08d80: 80 01 00 2c lwz r0,44(r1) ffc08d84: 7f a3 eb 78 mr r3,r29 ffc08d88: 83 81 00 18 lwz r28,24(r1) ffc08d8c: 7c 08 03 a6 mtlr r0 ffc08d90: 83 a1 00 1c lwz r29,28(r1) ffc08d94: 83 c1 00 20 lwz r30,32(r1) ffc08d98: 83 e1 00 24 lwz r31,36(r1) ffc08d9c: 38 21 00 28 addi r1,r1,40 ffc08da0: 4e 80 00 20 blr Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08da4: 3d 20 ff c1 lis r9,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08da8: 90 1f 00 08 stw r0,8(r31) the_watchdog->routine = routine; ffc08dac: 39 29 8c 78 addi r9,r9,-29576 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; ffc08db0: 3b a0 00 00 li r29,0 ffc08db4: 91 3f 00 1c stw r9,28(r31) the_watchdog->id = id; ffc08db8: 90 1f 00 20 stw r0,32(r31) the_watchdog->user_data = user_data; ffc08dbc: 90 1f 00 24 stw r0,36(r31) ffc08dc0: 4b ff ff 54 b ffc08d14 * 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); ffc08dc4: 81 3f 00 0c lwz r9,12(r31) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc08dc8: 38 81 00 08 addi r4,r1,8 * 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); ffc08dcc: 80 7f 00 14 lwz r3,20(r31) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; remaining += tp.tv_nsec / 1000; ffc08dd0: 3f a0 10 62 lis r29,4194 * 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); ffc08dd4: 80 1f 00 18 lwz r0,24(r31) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; remaining += tp.tv_nsec / 1000; ffc08dd8: 63 bd 4d d3 ori r29,r29,19923 * 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); ffc08ddc: 7c 63 4a 14 add r3,r3,r9 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc08de0: 7c 60 18 50 subf r3,r0,r3 ffc08de4: 48 00 48 39 bl ffc0d61c <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; ffc08de8: 80 01 00 08 lwz r0,8(r1) remaining += tp.tv_nsec / 1000; ffc08dec: 81 21 00 0c lwz r9,12(r1) 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; ffc08df0: 54 0a 40 2e rlwinm r10,r0,8,0,23 ffc08df4: 54 0b 18 38 rlwinm r11,r0,3,0,28 ffc08df8: 7d 6b 50 50 subf r11,r11,r10 remaining += tp.tv_nsec / 1000; ffc08dfc: 7f a9 e8 96 mulhw r29,r9,r29 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; ffc08e00: 55 6a 30 32 rlwinm r10,r11,6,0,25 ffc08e04: 7d 6b 50 50 subf r11,r11,r10 ffc08e08: 7c 0b 02 14 add r0,r11,r0 remaining += tp.tv_nsec / 1000; ffc08e0c: 7f bd 36 70 srawi r29,r29,6 ffc08e10: 7d 29 fe 70 srawi r9,r9,31 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; ffc08e14: 54 00 30 32 rlwinm r0,r0,6,0,25 remaining += tp.tv_nsec / 1000; ffc08e18: 7f a9 e8 50 subf r29,r9,r29 ffc08e1c: 7f bd 02 14 add r29,r29,r0 ffc08e20: 4b ff fe f4 b ffc08d14