ffc11264 : #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { ffc11264: 3d 20 00 00 lis r9,0 ffc11268: 80 09 20 c4 lwz r0,8388(r9) return (microseconds / rtems_configuration_get_microseconds_per_tick()); } ffc1126c: 7c 63 03 96 divwu r3,r3,r0 ffc11270: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a918 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { ffc0a918: 3d 20 00 00 lis r9,0 ffc0a91c: 81 29 20 ac lwz r9,8364(r9) ffc0a920: 3c 00 10 62 lis r0,4194 ffc0a924: 60 00 4d d3 ori r0,r0,19923 ffc0a928: 7c 09 00 16 mulhwu r0,r9,r0 ffc0a92c: 54 00 d1 be rlwinm r0,r0,26,6,31 return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); } ffc0a930: 7c 63 03 96 divwu r3,r3,r0 ffc0a934: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d5ac : #include #include #include uint32_t TOD_TICKS_PER_SECOND_method(void) { ffc2d5ac: 3d 20 00 00 lis r9,0 ffc2d5b0: 80 09 20 ac lwz r0,8364(r9) ffc2d5b4: 3c 60 00 0f lis r3,15 ffc2d5b8: 60 63 42 40 ori r3,r3,16960 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); } ffc2d5bc: 7c 63 03 96 divwu r3,r3,r0 ffc2d5c0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc091a8 <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc091a8: 94 21 ff d8 stwu r1,-40(r1) ffc091ac: 7c 08 02 a6 mflr r0 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc091b0: 3d 60 ff c2 lis r11,-62 #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc091b4: 93 c1 00 20 stw r30,32(r1) CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc091b8: 39 2b de 94 addi r9,r11,-8556 mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc091bc: 3f c0 00 00 lis r30,0 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc091c0: 81 4b de 94 lwz r10,-8556(r11) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc091c4: 3b de 2c b4 addi r30,r30,11444 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc091c8: 81 69 00 04 lwz r11,4(r9) #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc091cc: 90 01 00 2c stw r0,44(r1) CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc091d0: 80 09 00 0c lwz r0,12(r9) <== ALWAYS TAKEN ffc091d4: 81 29 00 08 lwz r9,8(r9) #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc091d8: 93 a1 00 1c stw r29,28(r1) ffc091dc: 7c 7d 1b 78 mr r29,r3 <== ALWAYS TAKEN false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc091e0: 7f c3 f3 78 mr r3,r30 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc091e4: 91 21 00 10 stw r9,16(r1) <== ALWAYS TAKEN ffc091e8: 90 01 00 14 stw r0,20(r1) #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc091ec: 93 e1 00 24 stw r31,36(r1) CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc091f0: 91 41 00 08 stw r10,8(r1) ffc091f4: 91 61 00 0c stw r11,12(r1) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc091f8: 48 00 0b f5 bl ffc09dec <_Objects_Allocate> <== ALWAYS TAKEN ffc091fc: 7c 7f 1b 78 mr r31,r3 _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); ffc09200: 38 81 00 08 addi r4,r1,8 ffc09204: 38 63 00 10 addi r3,r3,16 ffc09208: 38 a0 00 01 li r5,1 ffc0920c: 48 00 01 91 bl ffc0939c <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09210: a0 1f 00 0a lhz r0,10(r31) ffc09214: 81 3e 00 1c lwz r9,28(r30) ffc09218: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0921c: 7f e9 01 2e stwx r31,r9,r0 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc09220: 38 00 00 01 li r0,1 ffc09224: 90 1f 00 0c stw r0,12(r31) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; } ffc09228: 80 01 00 2c lwz r0,44(r1) _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; ffc0922c: 93 fd 00 00 stw r31,0(r29) } ffc09230: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc09234: 83 a1 00 1c lwz r29,28(r1) ffc09238: 83 c1 00 20 lwz r30,32(r1) ffc0923c: 83 e1 00 24 lwz r31,36(r1) ffc09240: 38 21 00 28 addi r1,r1,40 ffc09244: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09288 <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { ffc09288: 94 21 ff f8 stwu r1,-8(r1) ffc0928c: 7c 08 02 a6 mflr r0 ffc09290: 7c 66 1b 78 mr r6,r3 _Objects_Initialize_information( ffc09294: 3c 60 00 00 lis r3,0 <== ALWAYS TAKEN #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { ffc09298: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0929c: 38 63 2c b4 addi r3,r3,11444 ffc092a0: 38 80 00 01 li r4,1 ffc092a4: 38 a0 00 02 li r5,2 ffc092a8: 38 e0 00 74 li r7,116 ffc092ac: 39 00 00 00 li r8,0 ffc092b0: 39 20 00 00 li r9,0 ffc092b4: 48 00 11 d5 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc092b8: 80 01 00 0c lwz r0,12(r1) ffc092bc: 38 21 00 08 addi r1,r1,8 ffc092c0: 7c 08 03 a6 mtlr r0 ffc092c4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09248 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { ffc09248: 94 21 ff f8 stwu r1,-8(r1) ffc0924c: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc09250: 90 01 00 0c stw r0,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09254: 7c e0 00 a6 mfmsr r7 ffc09258: 7c 10 42 a6 mfsprg r0,0 <== ALWAYS TAKEN ffc0925c: 7c e0 00 78 andc r0,r7,r0 ffc09260: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _CORE_mutex_Seize( ffc09264: 80 83 00 08 lwz r4,8(r3) ffc09268: 38 a0 00 01 li r5,1 ffc0926c: 38 63 00 10 addi r3,r3,16 ffc09270: 38 c0 00 00 li r6,0 <== ALWAYS TAKEN ffc09274: 48 00 02 bd bl ffc09530 <_CORE_mutex_Seize> <== ALWAYS TAKEN the_mutex->Object.id, true, 0, level ); } ffc09278: 80 01 00 0c lwz r0,12(r1) ffc0927c: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc09280: 7c 08 03 a6 mtlr r0 ffc09284: 4e 80 00 20 blr <== ALWAYS TAKEN ffc092c8 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { ffc092c8: 94 21 ff f8 stwu r1,-8(r1) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc092cc: 3d 20 00 00 lis r9,0 ffc092d0: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc092d4: 81 69 27 2c lwz r11,10028(r9) ffc092d8: 90 01 00 0c stw r0,12(r1) ffc092dc: 39 6b 00 01 addi r11,r11,1 ffc092e0: 91 69 27 2c stw r11,10028(r9) _Thread_Disable_dispatch(); _CORE_mutex_Surrender( ffc092e4: 80 83 00 08 lwz r4,8(r3) ffc092e8: 38 a0 00 00 li r5,0 ffc092ec: 38 63 00 10 addi r3,r3,16 ffc092f0: 48 00 03 61 bl ffc09650 <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); ffc092f4: 48 00 1c 85 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc092f8: 80 01 00 0c lwz r0,12(r1) ffc092fc: 38 21 00 08 addi r1,r1,8 ffc09300: 7c 08 03 a6 mtlr r0 ffc09304: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0917c <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { ffc0917c: 94 21 ff f8 stwu r1,-8(r1) <== ALWAYS TAKEN ffc09180: 7c 08 02 a6 mflr r0 ffc09184: 7c 64 1b 78 mr r4,r3 _Chain_Append( &_API_extensions_List, &the_extension->Node ); ffc09188: 3c 60 00 00 lis r3,0 */ void _API_extensions_Add( API_extensions_Control *the_extension ) { ffc0918c: 90 01 00 0c stw r0,12(r1) _Chain_Append( &_API_extensions_List, &the_extension->Node ); ffc09190: 38 63 2d 8c addi r3,r3,11660 ffc09194: 48 00 01 75 bl ffc09308 <_Chain_Append> <== ALWAYS TAKEN } ffc09198: 80 01 00 0c lwz r0,12(r1) ffc0919c: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc091a0: 7c 08 03 a6 mtlr r0 ffc091a4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09090 <_API_extensions_Initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc09090: 3d 60 00 00 lis r11,0 ffc09094: 39 2b 2d 8c addi r9,r11,11660 <== ALWAYS TAKEN ffc09098: 38 09 00 04 addi r0,r9,4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0909c: 91 29 00 08 stw r9,8(r9) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc090a0: 90 0b 2d 8c stw r0,11660(r11) the_chain->permanent_null = NULL; ffc090a4: 38 00 00 00 li r0,0 ffc090a8: 90 09 00 04 stw r0,4(r9) */ void _API_extensions_Initialization( void ) { _Chain_Initialize_empty( &_API_extensions_List ); } ffc090ac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc090b0 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc090b0: 94 21 ff f0 stwu r1,-16(r1) ffc090b4: 7c 08 02 a6 mflr r0 ffc090b8: 93 c1 00 08 stw r30,8(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc090bc: 3f c0 00 00 lis r30,0 <== ALWAYS TAKEN * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc090c0: 93 e1 00 0c stw r31,12(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc090c4: 83 fe 2d 8c lwz r31,11660(r30) ffc090c8: 3b de 2d 8c addi r30,r30,11660 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc090cc: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc090d0: 90 01 00 14 stw r0,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc090d4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc090d8: 41 9e 00 1c beq- cr7,ffc090f4 <_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)(); ffc090dc: 80 1f 00 08 lwz r0,8(r31) ffc090e0: 7c 09 03 a6 mtctr r0 ffc090e4: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc090e8: 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 = _API_extensions_List.first ; ffc090ec: 7f 9f f0 00 cmpw cr7,r31,r30 ffc090f0: 40 9e ff ec bne+ cr7,ffc090dc <_API_extensions_Run_postdriver+0x2c> <== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc090f4: 80 01 00 14 lwz r0,20(r1) ffc090f8: 83 c1 00 08 lwz r30,8(r1) <== ALWAYS TAKEN ffc090fc: 7c 08 03 a6 mtlr r0 ffc09100: 83 e1 00 0c lwz r31,12(r1) ffc09104: 38 21 00 10 addi r1,r1,16 ffc09108: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0910c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc0910c: 94 21 ff e8 stwu r1,-24(r1) ffc09110: 7c 08 02 a6 mflr r0 ffc09114: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09118: 3f c0 00 00 lis r30,0 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc0911c: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09120: 83 fe 2d 8c lwz r31,11660(r30) ffc09124: 3b de 2d 8c addi r30,r30,11660 ffc09128: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc0912c: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09130: 7f 9f f0 00 cmpw cr7,r31,r30 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09134: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09138: 41 9e 00 28 beq- cr7,ffc09160 <_API_extensions_Run_postswitch+0x54> <== NEVER TAKEN ffc0913c: 3f a0 00 00 lis r29,0 ffc09140: 3b bd 27 6c addi r29,r29,10092 * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); ffc09144: 80 1f 00 0c lwz r0,12(r31) ffc09148: 80 7d 00 00 lwz r3,0(r29) ffc0914c: 7c 09 03 a6 mtctr r0 ffc09150: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc09154: 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 = _API_extensions_List.first ; ffc09158: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0915c: 40 9e ff e8 bne+ cr7,ffc09144 <_API_extensions_Run_postswitch+0x38> <== NEVER TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09160: 80 01 00 1c lwz r0,28(r1) ffc09164: 83 a1 00 0c lwz r29,12(r1) ffc09168: 7c 08 03 a6 mtlr r0 ffc0916c: 83 c1 00 10 lwz r30,16(r1) ffc09170: 83 e1 00 14 lwz r31,20(r1) ffc09174: 38 21 00 18 addi r1,r1,24 ffc09178: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e53c <_Barrier_Manager_initialization>: * Output parameters: NONE */ void _Barrier_Manager_initialization(void) { _Objects_Initialize_information( ffc0e53c: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Barrier_Manager_initialization(void) { ffc0e540: 94 21 ff f8 stwu r1,-8(r1) ffc0e544: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0e548: 3c 60 00 00 lis r3,0 ffc0e54c: 80 c9 20 94 lwz r6,8340(r9) ffc0e550: 38 63 2e 04 addi r3,r3,11780 ffc0e554: 38 80 00 02 li r4,2 <== ALWAYS TAKEN * * Output parameters: NONE */ void _Barrier_Manager_initialization(void) { ffc0e558: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0e55c: 38 a0 00 0a li r5,10 ffc0e560: 38 e0 00 60 li r7,96 <== ALWAYS TAKEN ffc0e564: 39 00 00 00 li r8,0 ffc0e568: 39 20 00 04 li r9,4 ffc0e56c: 4b ff bf 1d bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0e570: 80 01 00 0c lwz r0,12(r1) ffc0e574: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc0e578: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0e57c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc11900 <_Barrier_Translate_core_barrier_return_code>: #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; } ffc11900: 3d 20 00 00 lis r9,0 ffc11904: 39 29 21 c0 addi r9,r9,8640 }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) { ffc11908: 54 63 10 3a rlwinm r3,r3,2,0,29 #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; } ffc1190c: 7c 69 18 2e lwzx r3,r9,r3 ffc11910: 4e 80 00 20 blr <== ALWAYS TAKEN ffc11068 <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { ffc11068: 94 21 ff f8 stwu r1,-8(r1) ffc1106c: 7c 08 02 a6 mflr r0 the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( ffc11070: 3c a0 00 01 lis r5,1 void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { ffc11074: 90 01 00 0c stw r0,12(r1) the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; ffc11078: 38 00 00 00 li r0,0 _Thread_queue_Initialize( ffc1107c: 38 c0 00 03 li r6,3 CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; ffc11080: 81 64 00 00 lwz r11,0(r4) ffc11084: 81 84 00 04 lwz r12,4(r4) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( ffc11088: 38 80 00 00 li r4,0 CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; ffc1108c: 90 03 00 48 stw r0,72(r3) CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; ffc11090: 91 63 00 40 stw r11,64(r3) ffc11094: 91 83 00 44 stw r12,68(r3) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( ffc11098: 4b ff a8 b1 bl ffc0b948 <_Thread_queue_Initialize> <== ALWAYS TAKEN &the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); } ffc1109c: 80 01 00 0c lwz r0,12(r1) ffc110a0: 38 21 00 08 addi r1,r1,8 ffc110a4: 7c 08 03 a6 mtlr r0 ffc110a8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc110ac <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { ffc110ac: 94 21 ff f0 stwu r1,-16(r1) ffc110b0: 7c 08 02 a6 mflr r0 ffc110b4: 93 c1 00 08 stw r30,8(r1) ffc110b8: 7c 7e 1b 78 mr r30,r3 ffc110bc: 93 e1 00 0c stw r31,12(r1) Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { ffc110c0: 3b e0 00 00 li r31,0 #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { ffc110c4: 90 01 00 14 stw r0,20(r1) Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { ffc110c8: 48 00 00 08 b ffc110d0 <_CORE_barrier_Release+0x24> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; ffc110cc: 3b ff 00 01 addi r31,r31,1 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { ffc110d0: 7f c3 f3 78 mr r3,r30 ffc110d4: 4b ff a3 41 bl ffc0b414 <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc110d8: 2c 03 00 00 cmpwi r3,0 ffc110dc: 40 82 ff f0 bne+ ffc110cc <_CORE_barrier_Release+0x20> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } ffc110e0: 80 01 00 14 lwz r0,20(r1) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; ffc110e4: 90 7e 00 48 stw r3,72(r30) return count; } ffc110e8: 7f e3 fb 78 mr r3,r31 ffc110ec: 7c 08 03 a6 mtlr r0 ffc110f0: 83 c1 00 08 lwz r30,8(r1) ffc110f4: 83 e1 00 0c lwz r31,12(r1) ffc110f8: 38 21 00 10 addi r1,r1,16 ffc110fc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc11100 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { ffc11100: 94 21 ff f8 stwu r1,-8(r1) ffc11104: 7c 08 02 a6 mflr r0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; ffc11108: 3d 20 00 00 lis r9,0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { ffc1110c: 90 01 00 0c stw r0,12(r1) Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; ffc11110: 38 00 00 00 li r0,0 ) { Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; ffc11114: 81 29 27 6c lwz r9,10092(r9) executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; ffc11118: 90 09 00 34 stw r0,52(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1111c: 7d 40 00 a6 mfmsr r10 ffc11120: 7c 10 42 a6 mfsprg r0,0 ffc11124: 7d 40 00 78 andc r0,r10,r0 ffc11128: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { ffc1112c: 80 03 00 40 lwz r0,64(r3) ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; ffc11130: 81 63 00 48 lwz r11,72(r3) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { ffc11134: 2f 80 00 00 cmpwi cr7,r0,0 ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; ffc11138: 38 0b 00 01 addi r0,r11,1 ffc1113c: 90 03 00 48 stw r0,72(r3) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { ffc11140: 40 9e 00 10 bne- cr7,ffc11150 <_CORE_barrier_Wait+0x50> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { ffc11144: 81 63 00 44 lwz r11,68(r3) ffc11148: 7f 80 58 00 cmpw cr7,r0,r11 ffc1114c: 41 9e 00 38 beq- cr7,ffc11184 <_CORE_barrier_Wait+0x84> ffc11150: 38 00 00 01 li r0,1 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; ffc11154: 90 89 00 20 stw r4,32(r9) ffc11158: 90 03 00 30 stw r0,48(r3) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; ffc1115c: 90 69 00 44 stw r3,68(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc11160: 7d 40 01 24 mtmsr r10 executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); ffc11164: 3c a0 ff c1 lis r5,-63 ffc11168: 7c c4 33 78 mr r4,r6 ffc1116c: 38 a5 ba 54 addi r5,r5,-17836 ffc11170: 4b ff a4 85 bl ffc0b5f4 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN } ffc11174: 80 01 00 0c lwz r0,12(r1) ffc11178: 38 21 00 08 addi r1,r1,8 ffc1117c: 7c 08 03 a6 mtlr r0 ffc11180: 4e 80 00 20 blr <== ALWAYS TAKEN _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; ffc11184: 38 00 00 01 li r0,1 ffc11188: 90 09 00 34 stw r0,52(r9) ffc1118c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); ffc11190: 7c e5 3b 78 mr r5,r7 ffc11194: 4b ff ff 19 bl ffc110ac <_CORE_barrier_Release> <== ALWAYS TAKEN return; ffc11198: 4b ff ff dc b ffc11174 <_CORE_barrier_Wait+0x74> <== ALWAYS TAKEN ffc1bf80 <_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 ) { ffc1bf80: 94 21 ff e0 stwu r1,-32(r1) ffc1bf84: 7c 08 02 a6 mflr r0 ffc1bf88: 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 ) { ffc1bf8c: 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 ) { ffc1bf90: 93 41 00 08 stw r26,8(r1) ffc1bf94: 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 ) { ffc1bf98: 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 ) { ffc1bf9c: 93 a1 00 14 stw r29,20(r1) ffc1bfa0: 7c 9d 23 78 mr r29,r4 ffc1bfa4: 93 c1 00 18 stw r30,24(r1) ffc1bfa8: 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 ) { ffc1bfac: 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 ) { ffc1bfb0: 93 e1 00 1c stw r31,28(r1) ffc1bfb4: 7c bf 2b 78 mr r31,r5 ffc1bfb8: 93 61 00 0c stw r27,12(r1) <== ALWAYS TAKEN ffc1bfbc: 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 ) { ffc1bfc0: 41 9c 00 20 blt- cr7,ffc1bfe0 <_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 ) { ffc1bfc4: 80 1e 00 48 lwz r0,72(r30) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { ffc1bfc8: 3b 60 00 00 li r27,0 * 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 ) { ffc1bfcc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bfd0: 41 be 00 4c beq+ cr7,ffc1c01c <_CORE_message_queue_Broadcast+0x9c> *count = 0; ffc1bfd4: 38 00 00 00 li r0,0 ffc1bfd8: 90 08 00 00 stw r0,0(r8) ffc1bfdc: 38 60 00 00 li r3,0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1bfe0: 80 01 00 24 lwz r0,36(r1) ffc1bfe4: 83 41 00 08 lwz r26,8(r1) ffc1bfe8: 7c 08 03 a6 mtlr r0 ffc1bfec: 83 61 00 0c lwz r27,12(r1) ffc1bff0: 83 81 00 10 lwz r28,16(r1) ffc1bff4: 83 a1 00 14 lwz r29,20(r1) ffc1bff8: 83 c1 00 18 lwz r30,24(r1) ffc1bffc: 83 e1 00 1c lwz r31,28(r1) ffc1c000: 38 21 00 20 addi r1,r1,32 ffc1c004: 4e 80 00 20 blr <== ALWAYS TAKEN const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc1c008: 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; ffc1c00c: 3b 7b 00 01 addi r27,r27,1 ffc1c010: 48 00 a0 ed bl ffc260fc <== ALWAYS TAKEN buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc1c014: 81 3c 00 28 lwz r9,40(r28) ffc1c018: 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 = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { ffc1c01c: 7f c3 f3 78 mr r3,r30 ffc1c020: 48 00 30 01 bl ffc1f020 <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc1c024: 7f a4 eb 78 mr r4,r29 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = ffc1c028: 7c 7c 1b 79 mr. r28,r3 ffc1c02c: 7f e5 fb 78 mr r5,r31 ffc1c030: 40 82 ff d8 bne+ ffc1c008 <_CORE_message_queue_Broadcast+0x88> #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1c034: 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; ffc1c038: 93 7a 00 00 stw r27,0(r26) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1c03c: 7c 08 03 a6 mtlr r0 ffc1c040: 83 41 00 08 lwz r26,8(r1) ffc1c044: 83 61 00 0c lwz r27,12(r1) ffc1c048: 83 81 00 10 lwz r28,16(r1) ffc1c04c: 83 a1 00 14 lwz r29,20(r1) ffc1c050: 83 c1 00 18 lwz r30,24(r1) ffc1c054: 83 e1 00 1c lwz r31,28(r1) ffc1c058: 38 21 00 20 addi r1,r1,32 ffc1c05c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18fd8 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { ffc18fd8: 94 21 ff f0 stwu r1,-16(r1) ffc18fdc: 7c 08 02 a6 mflr r0 ffc18fe0: 93 e1 00 0c stw r31,12(r1) ffc18fe4: 7c 7f 1b 78 mr r31,r3 ffc18fe8: 90 01 00 14 stw r0,20(r1) /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( ffc18fec: 4b ff 91 55 bl ffc12140 <_Thread_queue_Flush> <== ALWAYS TAKEN * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) ffc18ff0: 80 1f 00 48 lwz r0,72(r31) ffc18ff4: 2f 80 00 00 cmpwi cr7,r0,0 ffc18ff8: 41 be 00 0c beq+ cr7,ffc19004 <_CORE_message_queue_Close+0x2c> (void) _CORE_message_queue_Flush_support( the_message_queue ); ffc18ffc: 7f e3 fb 78 mr r3,r31 ffc19000: 48 00 00 21 bl ffc19020 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN (void) _Workspace_Free( the_message_queue->message_buffers ); ffc19004: 80 7f 00 5c lwz r3,92(r31) ffc19008: 4b ff a2 e1 bl ffc132e8 <_Workspace_Free> <== ALWAYS TAKEN } ffc1900c: 80 01 00 14 lwz r0,20(r1) ffc19010: 83 e1 00 0c lwz r31,12(r1) ffc19014: 38 21 00 10 addi r1,r1,16 ffc19018: 7c 08 03 a6 mtlr r0 ffc1901c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1c0a8 <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { ffc1c0a8: 7c 08 02 a6 mflr r0 ffc1c0ac: 94 21 ff f8 stwu r1,-8(r1) ffc1c0b0: 90 01 00 0c stw r0,12(r1) if ( the_message_queue->number_of_pending_messages != 0 ) ffc1c0b4: 38 00 00 00 li r0,0 ffc1c0b8: 81 23 00 48 lwz r9,72(r3) ffc1c0bc: 2f 89 00 00 cmpwi cr7,r9,0 ffc1c0c0: 41 be 00 0c beq+ cr7,ffc1c0cc <_CORE_message_queue_Flush+0x24> return _CORE_message_queue_Flush_support( the_message_queue ); ffc1c0c4: 48 00 00 1d bl ffc1c0e0 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN ffc1c0c8: 7c 60 1b 78 mr r0,r3 else return 0; } ffc1c0cc: 7c 03 03 78 mr r3,r0 ffc1c0d0: 80 01 00 0c lwz r0,12(r1) ffc1c0d4: 38 21 00 08 addi r1,r1,8 ffc1c0d8: 7c 08 03 a6 mtlr r0 ffc1c0dc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19020 <_CORE_message_queue_Flush_support>: */ uint32_t _CORE_message_queue_Flush_support( CORE_message_queue_Control *the_message_queue ) { ffc19020: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc19024: 7c c0 00 a6 mfmsr r6 ffc19028: 7c 10 42 a6 mfsprg r0,0 ffc1902c: 7c c0 00 78 andc r0,r6,r0 ffc19030: 7c 00 01 24 mtmsr r0 * fixed execution time that only deals with pending messages. */ _ISR_Disable( level ); inactive_first = the_message_queue->Inactive_messages.first; message_queue_first = the_message_queue->Pending_messages.first; ffc19034: 80 e3 00 50 lwz r7,80(r3) message_queue_last = the_message_queue->Pending_messages.last; the_message_queue->Inactive_messages.first = message_queue_first; ffc19038: 7c 6b 1b 78 mr r11,r3 * For now, though, we are very happy to have a small routine with * fixed execution time that only deals with pending messages. */ _ISR_Disable( level ); inactive_first = the_message_queue->Inactive_messages.first; ffc1903c: 81 03 00 60 lwz r8,96(r3) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc19040: 38 00 00 00 li r0,0 message_queue_first = the_message_queue->Pending_messages.first; message_queue_last = the_message_queue->Pending_messages.last; ffc19044: 81 43 00 58 lwz r10,88(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc19048: 38 83 00 54 addi r4,r3,84 the_message_queue->Inactive_messages.first = message_queue_first; ffc1904c: 94 eb 00 60 stwu r7,96(r11) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc19050: 38 a3 00 50 addi r5,r3,80 message_queue_last->next = inactive_first; inactive_first->previous = message_queue_last; ffc19054: 91 48 00 04 stw r10,4(r8) inactive_first = the_message_queue->Inactive_messages.first; message_queue_first = the_message_queue->Pending_messages.first; message_queue_last = the_message_queue->Pending_messages.last; the_message_queue->Inactive_messages.first = message_queue_first; message_queue_last->next = inactive_first; ffc19058: 91 0a 00 00 stw r8,0(r10) inactive_first->previous = message_queue_last; message_queue_first->previous = ffc1905c: 91 67 00 04 stw r11,4(r7) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc19060: 90 83 00 50 stw r4,80(r3) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc19064: 90 a3 00 58 stw r5,88(r3) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc19068: 90 03 00 54 stw r0,84(r3) _Chain_Head( &the_message_queue->Inactive_messages ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); count = the_message_queue->number_of_pending_messages; ffc1906c: 80 63 00 48 lwz r3,72(r3) the_message_queue->number_of_pending_messages = 0; ffc19070: 90 09 00 48 stw r0,72(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19074: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); return count; } ffc19078: 4e 80 00 20 blr <== ALWAYS TAKEN ffc14a28 <_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 ) { ffc14a28: 94 21 ff e0 stwu r1,-32(r1) ffc14a2c: 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)) { ffc14a30: 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 ) { ffc14a34: 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)) { ffc14a38: 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; ffc14a3c: 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 ) { ffc14a40: 93 c1 00 18 stw r30,24(r1) ffc14a44: 7c 9e 23 78 mr r30,r4 ffc14a48: 93 e1 00 1c stw r31,28(r1) ffc14a4c: 7c 7f 1b 78 mr r31,r3 ffc14a50: 93 a1 00 14 stw r29,20(r1) 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; ffc14a54: 90 03 00 48 stw r0,72(r3) ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc14a58: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; ffc14a5c: 90 c3 00 4c stw r6,76(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)) { ffc14a60: 41 82 00 34 beq- ffc14a94 <_CORE_message_queue_Initialize+0x6c> allocated_message_size += sizeof(uint32_t); ffc14a64: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc14a68: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc14a6c: 7f 86 48 40 cmplw cr7,r6,r9 ffc14a70: 40 9d 00 24 ble- cr7,ffc14a94 <_CORE_message_queue_Initialize+0x6c> <== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14a74: 80 01 00 24 lwz r0,36(r1) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc14a78: 38 60 00 00 li r3,0 } ffc14a7c: 83 a1 00 14 lwz r29,20(r1) ffc14a80: 7c 08 03 a6 mtlr r0 ffc14a84: 83 c1 00 18 lwz r30,24(r1) ffc14a88: 83 e1 00 1c lwz r31,28(r1) ffc14a8c: 38 21 00 20 addi r1,r1,32 ffc14a90: 4e 80 00 20 blr <== ALWAYS TAKEN /* * 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)); ffc14a94: 3b a9 00 10 addi r29,r9,16 /* * 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 * ffc14a98: 7c 7d 29 d6 mullw r3,r29,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc14a9c: 7f 83 48 40 cmplw cr7,r3,r9 ffc14aa0: 41 9c ff d4 blt+ cr7,ffc14a74 <_CORE_message_queue_Initialize+0x4c> <== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc14aa4: 90 a1 00 08 stw r5,8(r1) ffc14aa8: 48 00 3a 31 bl ffc184d8 <_Workspace_Allocate> <== ALWAYS TAKEN _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc14aac: 2f 83 00 00 cmpwi cr7,r3,0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc14ab0: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc14ab4: 80 a1 00 08 lwz r5,8(r1) ffc14ab8: 41 be ff bc beq- cr7,ffc14a74 <_CORE_message_queue_Initialize+0x4c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc14abc: 7c 64 1b 78 mr r4,r3 ffc14ac0: 7f a6 eb 78 mr r6,r29 ffc14ac4: 38 7f 00 60 addi r3,r31,96 ffc14ac8: 48 00 5b 5d bl ffc1a624 <_Chain_Initialize> <== ALWAYS TAKEN allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc14acc: 80 9e 00 00 lwz r4,0(r30) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc14ad0: 39 3f 00 54 addi r9,r31,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc14ad4: 38 1f 00 50 addi r0,r31,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc14ad8: 91 3f 00 50 stw r9,80(r31) ffc14adc: 68 84 00 01 xori r4,r4,1 the_chain->permanent_null = NULL; ffc14ae0: 39 20 00 00 li r9,0 <== ALWAYS TAKEN the_chain->last = _Chain_Head(the_chain); ffc14ae4: 90 1f 00 58 stw r0,88(r31) ffc14ae8: 7c 84 00 34 cntlzw r4,r4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc14aec: 91 3f 00 54 stw r9,84(r31) ffc14af0: 7f e3 fb 78 mr r3,r31 ffc14af4: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc14af8: 38 a0 00 80 li r5,128 ffc14afc: 38 c0 00 06 li r6,6 ffc14b00: 48 00 29 49 bl ffc17448 <_Thread_queue_Initialize> <== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14b04: 80 01 00 24 lwz r0,36(r1) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc14b08: 38 60 00 01 li r3,1 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14b0c: 83 a1 00 14 lwz r29,20(r1) ffc14b10: 7c 08 03 a6 mtlr r0 ffc14b14: 83 c1 00 18 lwz r30,24(r1) ffc14b18: 83 e1 00 1c lwz r31,28(r1) <== ALWAYS TAKEN ffc14b1c: 38 21 00 20 addi r1,r1,32 ffc14b20: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1a668 <_CORE_message_queue_Insert_message>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a668: 7c 00 00 a6 mfmsr r0 ffc1a66c: 7d 30 42 a6 mfsprg r9,0 ffc1a670: 7c 09 48 78 andc r9,r0,r9 ffc1a674: 7d 20 01 24 mtmsr r9 #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) ffc1a678: 3d 20 7f ff lis r9,32767 ffc1a67c: 61 29 ff ff ori r9,r9,65535 ffc1a680: 7f 85 48 00 cmpw cr7,r5,r9 _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; ffc1a684: 81 23 00 48 lwz r9,72(r3) ffc1a688: 39 29 00 01 addi r9,r9,1 ffc1a68c: 91 23 00 48 stw r9,72(r3) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) ffc1a690: 41 9e 00 24 beq- cr7,ffc1a6b4 <_CORE_message_queue_Insert_message+0x4c> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc1a694: 81 23 00 50 lwz r9,80(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc1a698: 39 63 00 50 addi r11,r3,80 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc1a69c: 91 64 00 04 stw r11,4(r4) before_node = after_node->next; after_node->next = the_node; ffc1a6a0: 90 83 00 50 stw r4,80(r3) the_node->next = before_node; before_node->previous = the_node; ffc1a6a4: 90 89 00 04 stw r4,4(r9) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc1a6a8: 91 24 00 00 stw r9,0(r4) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a6ac: 7c 00 01 24 mtmsr r0 * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } ffc1a6b0: 4e 80 00 20 blr <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc1a6b4: 39 23 00 54 addi r9,r3,84 ffc1a6b8: 91 24 00 00 stw r9,0(r4) old_last_node = the_chain->last; ffc1a6bc: 81 23 00 58 lwz r9,88(r3) the_chain->last = the_node; ffc1a6c0: 90 83 00 58 stw r4,88(r3) old_last_node->next = the_node; the_node->previous = old_last_node; ffc1a6c4: 91 24 00 04 stw r9,4(r4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc1a6c8: 90 89 00 00 stw r4,0(r9) ffc1a6cc: 7c 00 01 24 mtmsr r0 ffc1a6d0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc14b24 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc14b24: 94 21 ff f0 stwu r1,-16(r1) ffc14b28: 7c 08 02 a6 mflr r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc14b2c: 3d 60 00 00 lis r11,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc14b30: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc14b34: 38 00 00 00 li r0,0 { ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc14b38: 81 2b 28 0c lwz r9,10252(r11) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc14b3c: 93 e1 00 0c stw r31,12(r1) ffc14b40: 7c 7f 1b 78 mr r31,r3 ffc14b44: 7c a3 2b 78 mr r3,r5 ffc14b48: 93 c1 00 08 stw r30,8(r1) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc14b4c: 90 09 00 34 stw r0,52(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc14b50: 7c a0 00 a6 mfmsr r5 ffc14b54: 7d 50 42 a6 mfsprg r10,0 ffc14b58: 7c aa 50 78 andc r10,r5,r10 ffc14b5c: 7d 40 01 24 mtmsr r10 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc14b60: 83 df 00 50 lwz r30,80(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc14b64: 39 5f 00 54 addi r10,r31,84 ffc14b68: 7f 9e 50 00 cmpw cr7,r30,r10 ffc14b6c: 41 9e 00 64 beq- cr7,ffc14bd0 <_CORE_message_queue_Seize+0xac> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc14b70: 81 5e 00 00 lwz r10,0(r30) the_chain->first = new_first; ffc14b74: 7f e9 fb 78 mr r9,r31 _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; ffc14b78: 81 1f 00 48 lwz r8,72(r31) ffc14b7c: 95 49 00 50 stwu r10,80(r9) ffc14b80: 38 08 ff ff addi r0,r8,-1 ffc14b84: 90 1f 00 48 stw r0,72(r31) new_first->previous = _Chain_Head(the_chain); ffc14b88: 91 2a 00 04 stw r9,4(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc14b8c: 7c a0 01 24 mtmsr r5 _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc14b90: 80 be 00 08 lwz r5,8(r30) _Thread_Executing->Wait.count = ffc14b94: 38 00 00 00 li r0,0 ffc14b98: 81 2b 28 0c lwz r9,10252(r11) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc14b9c: 38 9e 00 0c addi r4,r30,12 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc14ba0: 90 a6 00 00 stw r5,0(r6) _Thread_Executing->Wait.count = ffc14ba4: 90 09 00 24 stw r0,36(r9) ffc14ba8: 48 00 90 99 bl ffc1dc40 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); ffc14bac: 38 7f 00 60 addi r3,r31,96 ffc14bb0: 7f c4 f3 78 mr r4,r30 ffc14bb4: 4b ff fd ad bl ffc14960 <_Chain_Append> <== ALWAYS TAKEN executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } ffc14bb8: 80 01 00 14 lwz r0,20(r1) ffc14bbc: 83 c1 00 08 lwz r30,8(r1) ffc14bc0: 7c 08 03 a6 mtlr r0 ffc14bc4: 83 e1 00 0c lwz r31,12(r1) ffc14bc8: 38 21 00 10 addi r1,r1,16 ffc14bcc: 4e 80 00 20 blr <== ALWAYS TAKEN return; } #endif } if ( !wait ) { ffc14bd0: 2f 87 00 00 cmpwi cr7,r7,0 ffc14bd4: 40 9e 00 28 bne- cr7,ffc14bfc <_CORE_message_queue_Seize+0xd8> ffc14bd8: 7c a0 01 24 mtmsr r5 _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; ffc14bdc: 38 00 00 04 li r0,4 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } ffc14be0: 83 c1 00 08 lwz r30,8(r1) #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; ffc14be4: 90 09 00 34 stw r0,52(r9) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } ffc14be8: 80 01 00 14 lwz r0,20(r1) ffc14bec: 83 e1 00 0c lwz r31,12(r1) ffc14bf0: 38 21 00 10 addi r1,r1,16 ffc14bf4: 7c 08 03 a6 mtlr r0 ffc14bf8: 4e 80 00 20 blr <== ALWAYS TAKEN 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; ffc14bfc: 39 60 00 01 li r11,1 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; ffc14c00: 90 c9 00 28 stw r6,40(r9) ffc14c04: 91 7f 00 30 stw r11,48(r31) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; ffc14c08: 90 89 00 20 stw r4,32(r9) executing->Wait.return_argument_second.mutable_object = buffer; ffc14c0c: 90 69 00 2c stw r3,44(r9) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; ffc14c10: 93 e9 00 44 stw r31,68(r9) ffc14c14: 7c a0 01 24 mtmsr r5 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); ffc14c18: 3c a0 ff c1 lis r5,-63 ffc14c1c: 7f e3 fb 78 mr r3,r31 ffc14c20: 7d 04 43 78 mr r4,r8 ffc14c24: 38 a5 75 54 addi r5,r5,30036 ffc14c28: 48 00 24 cd bl ffc170f4 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN } ffc14c2c: 80 01 00 14 lwz r0,20(r1) ffc14c30: 83 c1 00 08 lwz r30,8(r1) ffc14c34: 7c 08 03 a6 mtlr r0 ffc14c38: 83 e1 00 0c lwz r31,12(r1) ffc14c3c: 38 21 00 10 addi r1,r1,16 ffc14c40: 4e 80 00 20 blr <== ALWAYS TAKEN ffc14c44 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc14c44: 94 21 ff e0 stwu r1,-32(r1) ffc14c48: 7c 08 02 a6 mflr r0 ffc14c4c: 90 01 00 24 stw r0,36(r1) CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc14c50: 80 03 00 4c lwz r0,76(r3) #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc14c54: 93 c1 00 18 stw r30,24(r1) ffc14c58: 7c be 2b 78 mr r30,r5 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc14c5c: 7f 80 28 40 cmplw cr7,r0,r5 #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc14c60: 93 e1 00 1c stw r31,28(r1) CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc14c64: 38 00 00 01 li r0,1 #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc14c68: 7c 7f 1b 78 mr r31,r3 ffc14c6c: 93 a1 00 14 stw r29,20(r1) CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc14c70: 41 9c 00 20 blt- cr7,ffc14c90 <_CORE_message_queue_Submit+0x4c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { ffc14c74: 81 23 00 48 lwz r9,72(r3) <== ALWAYS TAKEN ffc14c78: 2f 89 00 00 cmpwi cr7,r9,0 ffc14c7c: 41 9e 00 94 beq- cr7,ffc14d10 <_CORE_message_queue_Submit+0xcc> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { ffc14c80: 81 7f 00 44 lwz r11,68(r31) ffc14c84: 38 00 00 02 li r0,2 ffc14c88: 7f 8b 48 40 cmplw cr7,r11,r9 ffc14c8c: 41 9d 00 24 bgt- cr7,ffc14cb0 <_CORE_message_queue_Submit+0x6c> _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } ffc14c90: 7c 03 03 78 mr r3,r0 ffc14c94: 80 01 00 24 lwz r0,36(r1) ffc14c98: 83 a1 00 14 lwz r29,20(r1) ffc14c9c: 7c 08 03 a6 mtlr r0 ffc14ca0: 83 c1 00 18 lwz r30,24(r1) ffc14ca4: 83 e1 00 1c lwz r31,28(r1) ffc14ca8: 38 21 00 20 addi r1,r1,32 ffc14cac: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) ffc14cb0: 38 7f 00 60 addi r3,r31,96 ffc14cb4: 91 01 00 0c stw r8,12(r1) ffc14cb8: 90 81 00 08 stw r4,8(r1) ffc14cbc: 4b ff fc fd bl ffc149b8 <_Chain_Get> <== ALWAYS TAKEN ffc14cc0: 7c 7d 1b 78 mr r29,r3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc14cc4: 80 81 00 08 lwz r4,8(r1) ffc14cc8: 7f c5 f3 78 mr r5,r30 ffc14ccc: 38 63 00 0c addi r3,r3,12 ffc14cd0: 48 00 8f 71 bl ffc1dc40 <== ALWAYS TAKEN size ); the_message->Contents.size = size; _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( ffc14cd4: 81 01 00 0c lwz r8,12(r1) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; ffc14cd8: 93 dd 00 08 stw r30,8(r29) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( ffc14cdc: 7f e3 fb 78 mr r3,r31 ffc14ce0: 7f a4 eb 78 mr r4,r29 ffc14ce4: 7d 05 43 78 mr r5,r8 ffc14ce8: 48 00 59 81 bl ffc1a668 <_CORE_message_queue_Insert_message> <== ALWAYS TAKEN ffc14cec: 38 00 00 00 li r0,0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } ffc14cf0: 7c 03 03 78 mr r3,r0 ffc14cf4: 80 01 00 24 lwz r0,36(r1) ffc14cf8: 83 a1 00 14 lwz r29,20(r1) ffc14cfc: 7c 08 03 a6 mtlr r0 ffc14d00: 83 c1 00 18 lwz r30,24(r1) ffc14d04: 83 e1 00 1c lwz r31,28(r1) ffc14d08: 38 21 00 20 addi r1,r1,32 ffc14d0c: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); ffc14d10: 90 81 00 08 stw r4,8(r1) ffc14d14: 91 01 00 0c stw r8,12(r1) ffc14d18: 48 00 21 fd bl ffc16f14 <_Thread_queue_Dequeue> <== ALWAYS TAKEN if ( the_thread ) { ffc14d1c: 7c 7d 1b 79 mr. r29,r3 ffc14d20: 80 81 00 08 lwz r4,8(r1) ffc14d24: 81 01 00 0c lwz r8,12(r1) ffc14d28: 41 82 00 2c beq- ffc14d54 <_CORE_message_queue_Submit+0x110> ffc14d2c: 80 7d 00 2c lwz r3,44(r29) ffc14d30: 7f c5 f3 78 mr r5,r30 ffc14d34: 91 01 00 0c stw r8,12(r1) ffc14d38: 48 00 8f 09 bl ffc1dc40 <== ALWAYS TAKEN buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = (uint32_t) submit_type; ffc14d3c: 38 00 00 00 li r0,0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc14d40: 81 3d 00 28 lwz r9,40(r29) the_thread->Wait.count = (uint32_t) submit_type; ffc14d44: 81 01 00 0c lwz r8,12(r1) _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc14d48: 93 c9 00 00 stw r30,0(r9) the_thread->Wait.count = (uint32_t) submit_type; ffc14d4c: 91 1d 00 24 stw r8,36(r29) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc14d50: 4b ff ff 40 b ffc14c90 <_CORE_message_queue_Submit+0x4c> <== ALWAYS TAKEN /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { ffc14d54: 81 3f 00 48 lwz r9,72(r31) ffc14d58: 4b ff ff 28 b ffc14c80 <_CORE_message_queue_Submit+0x3c> <== ALWAYS TAKEN ffc0937c <_CORE_mutex_Flush>: void _CORE_mutex_Flush( CORE_mutex_Control *the_mutex, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { ffc0937c: 94 21 ff f8 stwu r1,-8(r1) ffc09380: 7c 08 02 a6 mflr r0 ffc09384: 90 01 00 0c stw r0,12(r1) _Thread_queue_Flush( ffc09388: 48 00 25 75 bl ffc0b8fc <_Thread_queue_Flush> <== ALWAYS TAKEN &the_mutex->Wait_queue, remote_extract_callout, status ); } ffc0938c: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc09390: 38 21 00 08 addi r1,r1,8 ffc09394: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc09398: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0939c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { ffc0939c: 7c 08 02 a6 mflr r0 ffc093a0: 94 21 ff f8 stwu r1,-8(r1) the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { ffc093a4: 2f 85 00 00 cmpwi cr7,r5,0 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { ffc093a8: 90 01 00 0c stw r0,12(r1) initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; ffc093ac: 39 00 00 00 li r8,0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; ffc093b0: 81 44 00 00 lwz r10,0(r4) ffc093b4: 81 64 00 04 lwz r11,4(r4) <== ALWAYS TAKEN ffc093b8: 80 04 00 08 lwz r0,8(r4) ffc093bc: 81 24 00 0c lwz r9,12(r4) <== ALWAYS TAKEN ffc093c0: 91 43 00 40 stw r10,64(r3) ffc093c4: 91 63 00 44 stw r11,68(r3) ffc093c8: 91 23 00 4c stw r9,76(r3) ffc093cc: 90 03 00 48 stw r0,72(r3) the_mutex->lock = initial_lock; ffc093d0: 90 a3 00 50 stw r5,80(r3) the_mutex->blocked_count = 0; ffc093d4: 91 03 00 58 stw r8,88(r3) if ( initial_lock == CORE_MUTEX_LOCKED ) { ffc093d8: 40 9e 00 54 bne- cr7,ffc0942c <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 1; ffc093dc: 39 20 00 01 li r9,1 <== ALWAYS TAKEN ffc093e0: 91 23 00 54 stw r9,84(r3) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc093e4: 2f 80 00 02 cmpwi cr7,r0,2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; ffc093e8: 3d 20 00 00 lis r9,0 ffc093ec: 81 29 27 6c lwz r9,10092(r9) the_mutex->holder_id = _Thread_Executing->Object.id; ffc093f0: 81 69 00 08 lwz r11,8(r9) the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; ffc093f4: 91 23 00 5c stw r9,92(r3) the_mutex->holder_id = _Thread_Executing->Object.id; ffc093f8: 91 63 00 60 stw r11,96(r3) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc093fc: 41 9e 00 0c beq- cr7,ffc09408 <_CORE_mutex_Initialize+0x6c> ffc09400: 2f 80 00 03 cmpwi cr7,r0,3 ffc09404: 40 be 00 34 bne+ cr7,ffc09438 <_CORE_mutex_Initialize+0x9c> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) ffc09408: 81 49 00 14 lwz r10,20(r9) ffc0940c: 38 00 00 06 li r0,6 ffc09410: 81 63 00 4c lwz r11,76(r3) ffc09414: 7f 8a 58 40 cmplw cr7,r10,r11 ffc09418: 41 9c 00 40 blt- cr7,ffc09458 <_CORE_mutex_Initialize+0xbc> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; ffc0941c: 81 69 00 1c lwz r11,28(r9) ffc09420: 38 0b 00 01 addi r0,r11,1 ffc09424: 90 09 00 1c stw r0,28(r9) ffc09428: 48 00 00 10 b ffc09438 <_CORE_mutex_Initialize+0x9c> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; ffc0942c: 91 03 00 60 stw r8,96(r3) #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; ffc09430: 91 03 00 54 stw r8,84(r3) the_mutex->holder = NULL; ffc09434: 91 03 00 5c stw r8,92(r3) the_mutex->holder_id = 0; } _Thread_queue_Initialize( ffc09438: 80 84 00 08 lwz r4,8(r4) ffc0943c: 38 a0 04 00 li r5,1024 ffc09440: 38 c0 00 05 li r6,5 ffc09444: 31 24 ff ff addic r9,r4,-1 ffc09448: 7c 09 21 10 subfe r0,r9,r4 ffc0944c: 7c 04 03 78 mr r4,r0 ffc09450: 48 00 24 f9 bl ffc0b948 <_Thread_queue_Initialize> <== ALWAYS TAKEN ffc09454: 38 00 00 00 li r0,0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } ffc09458: 7c 03 03 78 mr r3,r0 ffc0945c: 80 01 00 0c lwz r0,12(r1) ffc09460: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc09464: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc09468: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09530 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09530: 94 21 ff d8 stwu r1,-40(r1) <== ALWAYS TAKEN ffc09534: 7c 08 02 a6 mflr r0 ffc09538: 93 e1 00 24 stw r31,36(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0953c: 3f e0 00 00 lis r31,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09540: 90 01 00 2c stw r0,44(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09544: 80 1f 27 2c lwz r0,10028(r31) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09548: 93 61 00 14 stw r27,20(r1) <== ALWAYS TAKEN ffc0954c: 7c db 33 78 mr r27,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09550: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09554: 93 81 00 18 stw r28,24(r1) ffc09558: 7c bc 2b 78 mr r28,r5 ffc0955c: 93 a1 00 1c stw r29,28(r1) ffc09560: 7c 9d 23 78 mr r29,r4 <== ALWAYS TAKEN ffc09564: 93 c1 00 20 stw r30,32(r1) ffc09568: 7c 7e 1b 78 mr r30,r3 ffc0956c: 90 e1 00 08 stw r7,8(r1) <== ALWAYS TAKEN _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09570: 41 9e 00 0c beq- cr7,ffc0957c <_CORE_mutex_Seize+0x4c> ffc09574: 2f 85 00 00 cmpwi cr7,r5,0 ffc09578: 40 9e 00 5c bne- cr7,ffc095d4 <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN ffc0957c: 7f c3 f3 78 mr r3,r30 ffc09580: 38 81 00 08 addi r4,r1,8 ffc09584: 48 00 56 5d bl ffc0ebe0 <_CORE_mutex_Seize_interrupt_trylock> <== ALWAYS TAKEN ffc09588: 2f 83 00 00 cmpwi cr7,r3,0 ffc0958c: 41 9e 00 24 beq- cr7,ffc095b0 <_CORE_mutex_Seize+0x80> ffc09590: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09594: 40 9e 00 60 bne- cr7,ffc095f4 <_CORE_mutex_Seize+0xc4> ffc09598: 80 01 00 08 lwz r0,8(r1) ffc0959c: 7c 00 01 24 mtmsr r0 ffc095a0: 3d 20 00 00 lis r9,0 ffc095a4: 81 29 27 6c lwz r9,10092(r9) ffc095a8: 38 00 00 01 li r0,1 ffc095ac: 90 09 00 34 stw r0,52(r9) } ffc095b0: 80 01 00 2c lwz r0,44(r1) ffc095b4: 83 61 00 14 lwz r27,20(r1) ffc095b8: 7c 08 03 a6 mtlr r0 ffc095bc: 83 81 00 18 lwz r28,24(r1) ffc095c0: 83 a1 00 1c lwz r29,28(r1) ffc095c4: 83 c1 00 20 lwz r30,32(r1) ffc095c8: 83 e1 00 24 lwz r31,36(r1) ffc095cc: 38 21 00 28 addi r1,r1,40 ffc095d0: 4e 80 00 20 blr <== ALWAYS TAKEN bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc095d4: 3d 20 00 00 lis r9,0 ffc095d8: 80 09 27 90 lwz r0,10128(r9) ffc095dc: 2b 80 00 01 cmplwi cr7,r0,1 ffc095e0: 40 9d ff 9c ble+ cr7,ffc0957c <_CORE_mutex_Seize+0x4c> ffc095e4: 38 60 00 00 li r3,0 ffc095e8: 38 80 00 00 li r4,0 ffc095ec: 38 a0 00 13 li r5,19 ffc095f0: 48 00 07 9d bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc095f4: 3d 20 00 00 lis r9,0 ffc095f8: 81 7f 27 2c lwz r11,10028(r31) ffc095fc: 81 29 27 6c lwz r9,10092(r9) ffc09600: 38 0b 00 01 addi r0,r11,1 ffc09604: 93 a9 00 20 stw r29,32(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; ffc09608: 39 60 00 01 li r11,1 ffc0960c: 91 7e 00 30 stw r11,48(r30) ffc09610: 93 c9 00 44 stw r30,68(r9) ffc09614: 90 1f 27 2c stw r0,10028(r31) ffc09618: 80 01 00 08 lwz r0,8(r1) ffc0961c: 7c 00 01 24 mtmsr r0 ffc09620: 7f c3 f3 78 mr r3,r30 ffc09624: 7f 64 db 78 mr r4,r27 ffc09628: 4b ff fe 45 bl ffc0946c <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN } ffc0962c: 80 01 00 2c lwz r0,44(r1) ffc09630: 83 61 00 14 lwz r27,20(r1) ffc09634: 7c 08 03 a6 mtlr r0 ffc09638: 83 81 00 18 lwz r28,24(r1) ffc0963c: 83 a1 00 1c lwz r29,28(r1) ffc09640: 83 c1 00 20 lwz r30,32(r1) ffc09644: 83 e1 00 24 lwz r31,36(r1) ffc09648: 38 21 00 28 addi r1,r1,40 ffc0964c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0946c <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc0946c: 94 21 ff f0 stwu r1,-16(r1) ffc09470: 7c 08 02 a6 mflr r0 Thread_Control *executing; executing = _Thread_Executing; ffc09474: 3d 20 00 00 lis r9,0 void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc09478: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { ffc0947c: 80 03 00 48 lwz r0,72(r3) void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc09480: 93 c1 00 08 stw r30,8(r1) ffc09484: 7c 9e 23 78 mr r30,r4 Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { ffc09488: 2f 80 00 02 cmpwi cr7,r0,2 void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc0948c: 93 e1 00 0c stw r31,12(r1) ffc09490: 7c 7f 1b 78 mr r31,r3 Thread_Control *executing; executing = _Thread_Executing; ffc09494: 81 29 27 6c lwz r9,10092(r9) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { ffc09498: 41 9e 00 40 beq- cr7,ffc094d8 <_CORE_mutex_Seize_interrupt_blocking+0x6c> false ); } } the_mutex->blocked_count++; ffc0949c: 81 3f 00 58 lwz r9,88(r31) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); ffc094a0: 3c a0 ff c1 lis r5,-63 ffc094a4: 7f e3 fb 78 mr r3,r31 false ); } } the_mutex->blocked_count++; ffc094a8: 38 09 00 01 addi r0,r9,1 ffc094ac: 90 1f 00 58 stw r0,88(r31) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); ffc094b0: 7f c4 f3 78 mr r4,r30 ffc094b4: 38 a5 ba 54 addi r5,r5,-17836 ffc094b8: 48 00 21 3d bl ffc0b5f4 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc094bc: 48 00 1a bd bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc094c0: 80 01 00 14 lwz r0,20(r1) ffc094c4: 83 c1 00 08 lwz r30,8(r1) ffc094c8: 7c 08 03 a6 mtlr r0 ffc094cc: 83 e1 00 0c lwz r31,12(r1) ffc094d0: 38 21 00 10 addi r1,r1,16 ffc094d4: 4e 80 00 20 blr <== ALWAYS TAKEN { Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( the_mutex->holder->current_priority > executing->current_priority ) { ffc094d8: 80 63 00 5c lwz r3,92(r3) ffc094dc: 80 89 00 14 lwz r4,20(r9) ffc094e0: 80 03 00 14 lwz r0,20(r3) ffc094e4: 7f 80 20 40 cmplw cr7,r0,r4 ffc094e8: 40 9d ff b4 ble+ cr7,ffc0949c <_CORE_mutex_Seize_interrupt_blocking+0x30> _Thread_Change_priority( ffc094ec: 38 a0 00 00 li r5,0 ffc094f0: 48 00 13 7d bl ffc0a86c <_Thread_Change_priority> <== ALWAYS TAKEN false ); } } the_mutex->blocked_count++; ffc094f4: 81 3f 00 58 lwz r9,88(r31) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); ffc094f8: 3c a0 ff c1 lis r5,-63 false ); } } the_mutex->blocked_count++; ffc094fc: 38 09 00 01 addi r0,r9,1 ffc09500: 90 1f 00 58 stw r0,88(r31) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); ffc09504: 7f e3 fb 78 mr r3,r31 ffc09508: 7f c4 f3 78 mr r4,r30 ffc0950c: 38 a5 ba 54 addi r5,r5,-17836 ffc09510: 48 00 20 e5 bl ffc0b5f4 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc09514: 48 00 1a 65 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc09518: 80 01 00 14 lwz r0,20(r1) ffc0951c: 83 c1 00 08 lwz r30,8(r1) ffc09520: 7c 08 03 a6 mtlr r0 ffc09524: 83 e1 00 0c lwz r31,12(r1) ffc09528: 38 21 00 10 addi r1,r1,16 ffc0952c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ebe0 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { ffc0ebe0: 7c 08 02 a6 mflr r0 ffc0ebe4: 94 21 ff f8 stwu r1,-8(r1) <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc0ebe8: 3d 20 00 00 lis r9,0 ffc0ebec: 81 29 27 6c lwz r9,10092(r9) ffc0ebf0: 90 01 00 0c stw r0,12(r1) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; ffc0ebf4: 38 00 00 00 li r0,0 ffc0ebf8: 90 09 00 34 stw r0,52(r9) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0ebfc: 81 63 00 50 lwz r11,80(r3) <== ALWAYS TAKEN ffc0ec00: 2f 8b 00 00 cmpwi cr7,r11,0 <== ALWAYS TAKEN ffc0ec04: 41 9e 00 4c beq- cr7,ffc0ec50 <_CORE_mutex_Seize_interrupt_trylock+0x70> */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ffc0ec08: 81 63 00 48 lwz r11,72(r3) <== ALWAYS TAKEN executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; ffc0ec0c: 39 40 00 01 li r10,1 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; ffc0ec10: 90 03 00 50 stw r0,80(r3) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc0ec14: 2f 8b 00 02 cmpwi cr7,r11,2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; ffc0ec18: 81 09 00 08 lwz r8,8(r9) executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; ffc0ec1c: 91 23 00 5c stw r9,92(r3) the_mutex->holder_id = executing->Object.id; ffc0ec20: 91 03 00 60 stw r8,96(r3) the_mutex->nest_count = 1; ffc0ec24: 91 43 00 54 stw r10,84(r3) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc0ec28: 41 9e 00 48 beq- cr7,ffc0ec70 <_CORE_mutex_Seize_interrupt_trylock+0x90> ffc0ec2c: 2f 8b 00 03 cmpwi cr7,r11,3 ffc0ec30: 41 9e 00 78 beq- cr7,ffc0eca8 <_CORE_mutex_Seize_interrupt_trylock+0xc8> ffc0ec34: 80 04 00 00 lwz r0,0(r4) ffc0ec38: 7c 00 01 24 mtmsr r0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } ffc0ec3c: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0ec40: 38 60 00 00 li r3,0 ffc0ec44: 38 21 00 08 addi r1,r1,8 ffc0ec48: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0ec4c: 4e 80 00 20 blr <== ALWAYS TAKEN /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { ffc0ec50: 80 03 00 5c lwz r0,92(r3) ffc0ec54: 7f 89 00 00 cmpw cr7,r9,r0 ffc0ec58: 41 9e 00 28 beq- cr7,ffc0ec80 <_CORE_mutex_Seize_interrupt_trylock+0xa0> ffc0ec5c: 38 60 00 01 li r3,1 ffc0ec60: 80 01 00 0c lwz r0,12(r1) ffc0ec64: 38 21 00 08 addi r1,r1,8 ffc0ec68: 7c 08 03 a6 mtlr r0 ffc0ec6c: 4e 80 00 20 blr <== ALWAYS TAKEN _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0ec70: 81 69 00 1c lwz r11,28(r9) ffc0ec74: 38 0b 00 01 addi r0,r11,1 ffc0ec78: 90 09 00 1c stw r0,28(r9) ffc0ec7c: 4b ff ff b8 b ffc0ec34 <_CORE_mutex_Seize_interrupt_trylock+0x54> <== ALWAYS TAKEN * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ffc0ec80: 80 03 00 40 lwz r0,64(r3) ffc0ec84: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ec88: 40 9e 00 74 bne- cr7,ffc0ecfc <_CORE_mutex_Seize_interrupt_trylock+0x11c> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; ffc0ec8c: 81 23 00 54 lwz r9,84(r3) ffc0ec90: 38 09 00 01 addi r0,r9,1 ffc0ec94: 90 03 00 54 stw r0,84(r3) ffc0ec98: 80 04 00 00 lwz r0,0(r4) ffc0ec9c: 7c 00 01 24 mtmsr r0 ffc0eca0: 38 60 00 00 li r3,0 ffc0eca4: 4b ff ff bc b ffc0ec60 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== ALWAYS TAKEN _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0eca8: 80 e9 00 1c lwz r7,28(r9) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; ffc0ecac: 81 69 00 14 lwz r11,20(r9) _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0ecb0: 39 07 00 01 addi r8,r7,1 ffc0ecb4: 91 09 00 1c stw r8,28(r9) */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; ffc0ecb8: 81 03 00 4c lwz r8,76(r3) current = executing->current_priority; if ( current == ceiling ) { ffc0ecbc: 7f 88 58 00 cmpw cr7,r8,r11 ffc0ecc0: 41 9e 00 90 beq- cr7,ffc0ed50 <_CORE_mutex_Seize_interrupt_trylock+0x170> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { ffc0ecc4: 7f 88 58 40 cmplw cr7,r8,r11 ffc0ecc8: 41 9c 00 54 blt- cr7,ffc0ed1c <_CORE_mutex_Seize_interrupt_trylock+0x13c> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; ffc0eccc: 39 60 00 06 li r11,6 ffc0ecd0: 91 69 00 34 stw r11,52(r9) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ ffc0ecd4: 90 03 00 54 stw r0,84(r3) _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; ffc0ecd8: 91 43 00 50 stw r10,80(r3) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ ffc0ecdc: 90 e9 00 1c stw r7,28(r9) ffc0ece0: 80 04 00 00 lwz r0,0(r4) ffc0ece4: 7c 00 01 24 mtmsr r0 ffc0ece8: 80 01 00 0c lwz r0,12(r1) ffc0ecec: 38 60 00 00 li r3,0 ffc0ecf0: 38 21 00 08 addi r1,r1,8 ffc0ecf4: 7c 08 03 a6 mtlr r0 ffc0ecf8: 4e 80 00 20 blr <== ALWAYS TAKEN * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ffc0ecfc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ed00: 40 9e ff 5c bne+ cr7,ffc0ec5c <_CORE_mutex_Seize_interrupt_trylock+0x7c> <== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; ffc0ed04: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc0ed08: 90 09 00 34 stw r0,52(r9) <== NOT EXECUTED ffc0ed0c: 80 04 00 00 lwz r0,0(r4) <== NOT EXECUTED ffc0ed10: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc0ed14: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0ed18: 4b ff ff 48 b ffc0ec60 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ed1c: 3d 20 00 00 lis r9,0 ffc0ed20: 81 69 27 2c lwz r11,10028(r9) ffc0ed24: 38 0b 00 01 addi r0,r11,1 ffc0ed28: 90 09 27 2c stw r0,10028(r9) ffc0ed2c: 80 04 00 00 lwz r0,0(r4) ffc0ed30: 7c 00 01 24 mtmsr r0 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( ffc0ed34: 80 83 00 4c lwz r4,76(r3) ffc0ed38: 38 a0 00 00 li r5,0 ffc0ed3c: 80 63 00 5c lwz r3,92(r3) ffc0ed40: 4b ff bb 2d bl ffc0a86c <_Thread_Change_priority> <== ALWAYS TAKEN the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); ffc0ed44: 4b ff c2 35 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0ed48: 38 60 00 00 li r3,0 ffc0ed4c: 4b ff ff 14 b ffc0ec60 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== ALWAYS TAKEN ffc0ed50: 80 04 00 00 lwz r0,0(r4) ffc0ed54: 7c 00 01 24 mtmsr r0 ffc0ed58: 38 60 00 00 li r3,0 ffc0ed5c: 4b ff ff 04 b ffc0ec60 <_CORE_mutex_Seize_interrupt_trylock+0x80> <== ALWAYS TAKEN ffc09650 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { ffc09650: 94 21 ff f0 stwu r1,-16(r1) ffc09654: 7c 08 02 a6 mflr r0 ffc09658: 90 01 00 14 stw r0,20(r1) * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { ffc0965c: 88 03 00 44 lbz r0,68(r3) #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { ffc09660: 93 e1 00 0c stw r31,12(r1) ffc09664: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { ffc09668: 2f 80 00 00 cmpwi cr7,r0,0 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; ffc0966c: 81 23 00 5c lwz r9,92(r3) * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { ffc09670: 41 9e 00 2c beq- cr7,ffc0969c <_CORE_mutex_Surrender+0x4c> if ( !_Thread_Is_executing( holder ) ) ffc09674: 3d 60 00 00 lis r11,0 ffc09678: 80 0b 27 6c lwz r0,10092(r11) ffc0967c: 38 60 00 03 li r3,3 ffc09680: 7f 89 00 00 cmpw cr7,r9,r0 <== ALWAYS TAKEN ffc09684: 41 9e 00 18 beq- cr7,ffc0969c <_CORE_mutex_Surrender+0x4c> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } ffc09688: 80 01 00 14 lwz r0,20(r1) ffc0968c: 83 e1 00 0c lwz r31,12(r1) ffc09690: 38 21 00 10 addi r1,r1,16 ffc09694: 7c 08 03 a6 mtlr r0 ffc09698: 4e 80 00 20 blr <== ALWAYS TAKEN return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) ffc0969c: 81 7f 00 54 lwz r11,84(r31) ffc096a0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc096a4: 41 9e 00 7c beq- cr7,ffc09720 <_CORE_mutex_Surrender+0xd0> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; ffc096a8: 39 6b ff ff addi r11,r11,-1 <== ALWAYS TAKEN if ( the_mutex->nest_count != 0 ) { ffc096ac: 2f 8b 00 00 cmpwi cr7,r11,0 /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; ffc096b0: 91 7f 00 54 stw r11,84(r31) if ( the_mutex->nest_count != 0 ) { ffc096b4: 40 9e 00 6c bne- cr7,ffc09720 <_CORE_mutex_Surrender+0xd0> */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ffc096b8: 80 1f 00 48 lwz r0,72(r31) /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc096bc: 2f 80 00 02 cmpwi cr7,r0,2 ffc096c0: 41 9e 00 d0 beq- cr7,ffc09790 <_CORE_mutex_Surrender+0x140> ffc096c4: 2f 80 00 03 cmpwi cr7,r0,3 ffc096c8: 41 9e 00 c8 beq- cr7,ffc09790 <_CORE_mutex_Surrender+0x140> /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc096cc: 2f 80 00 02 cmpwi cr7,r0,2 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; ffc096d0: 39 60 00 00 li r11,0 the_mutex->holder_id = 0; ffc096d4: 91 7f 00 60 stw r11,96(r31) } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; ffc096d8: 91 7f 00 5c stw r11,92(r31) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc096dc: 41 9e 00 88 beq- cr7,ffc09764 <_CORE_mutex_Surrender+0x114> ffc096e0: 2f 80 00 03 cmpwi cr7,r0,3 ffc096e4: 41 9e 00 80 beq- cr7,ffc09764 <_CORE_mutex_Surrender+0x114> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { ffc096e8: 7f e3 fb 78 mr r3,r31 ffc096ec: 48 00 1d 29 bl ffc0b414 <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc096f0: 7c 69 1b 79 mr. r9,r3 ffc096f4: 41 82 00 c0 beq- ffc097b4 <_CORE_mutex_Surrender+0x164> the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { ffc096f8: 80 1f 00 48 lwz r0,72(r31) } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; ffc096fc: 81 69 00 08 lwz r11,8(r9) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { ffc09700: 2f 80 00 02 cmpwi cr7,r0,2 } else #endif { the_mutex->holder = the_thread; ffc09704: 91 3f 00 5c stw r9,92(r31) the_mutex->holder_id = the_thread->Object.id; ffc09708: 91 7f 00 60 stw r11,96(r31) the_mutex->nest_count = 1; ffc0970c: 39 60 00 01 li r11,1 ffc09710: 91 7f 00 54 stw r11,84(r31) switch ( the_mutex->Attributes.discipline ) { ffc09714: 41 9e 00 8c beq- cr7,ffc097a0 <_CORE_mutex_Surrender+0x150> ffc09718: 2f 80 00 03 cmpwi cr7,r0,3 ffc0971c: 41 9e 00 1c beq- cr7,ffc09738 <_CORE_mutex_Surrender+0xe8> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } ffc09720: 80 01 00 14 lwz r0,20(r1) } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; ffc09724: 38 60 00 00 li r3,0 return CORE_MUTEX_STATUS_SUCCESSFUL; } ffc09728: 83 e1 00 0c lwz r31,12(r1) ffc0972c: 38 21 00 10 addi r1,r1,16 ffc09730: 7c 08 03 a6 mtlr r0 ffc09734: 4e 80 00 20 blr <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; ffc09738: 81 69 00 1c lwz r11,28(r9) if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ ffc0973c: 80 09 00 14 lwz r0,20(r9) case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; ffc09740: 39 6b 00 01 addi r11,r11,1 ffc09744: 91 69 00 1c stw r11,28(r9) if (the_mutex->Attributes.priority_ceiling < ffc09748: 80 9f 00 4c lwz r4,76(r31) the_thread->current_priority){ ffc0974c: 7f 84 00 40 cmplw cr7,r4,r0 ffc09750: 40 9c ff d0 bge+ cr7,ffc09720 <_CORE_mutex_Surrender+0xd0> _Thread_Change_priority( ffc09754: 38 a0 00 00 li r5,0 ffc09758: 48 00 11 15 bl ffc0a86c <_Thread_Change_priority> <== ALWAYS TAKEN ffc0975c: 38 60 00 00 li r3,0 ffc09760: 4b ff ff 28 b ffc09688 <_CORE_mutex_Surrender+0x38> <== ALWAYS TAKEN _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && ffc09764: 80 09 00 1c lwz r0,28(r9) <== ALWAYS TAKEN ffc09768: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc0976c: 40 be ff 7c bne- cr7,ffc096e8 <_CORE_mutex_Surrender+0x98> holder->real_priority != holder->current_priority ) { ffc09770: 80 89 00 18 lwz r4,24(r9) ffc09774: 80 09 00 14 lwz r0,20(r9) ffc09778: 7f 84 00 00 cmpw cr7,r4,r0 ffc0977c: 41 be ff 6c beq- cr7,ffc096e8 <_CORE_mutex_Surrender+0x98> _Thread_Change_priority( holder, holder->real_priority, true ); ffc09780: 7d 23 4b 78 mr r3,r9 ffc09784: 38 a0 00 01 li r5,1 ffc09788: 48 00 10 e5 bl ffc0a86c <_Thread_Change_priority> <== ALWAYS TAKEN ffc0978c: 4b ff ff 5c b ffc096e8 <_CORE_mutex_Surrender+0x98> <== ALWAYS TAKEN the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; ffc09790: 81 69 00 1c lwz r11,28(r9) ffc09794: 39 6b ff ff addi r11,r11,-1 ffc09798: 91 69 00 1c stw r11,28(r9) ffc0979c: 4b ff ff 30 b ffc096cc <_CORE_mutex_Surrender+0x7c> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; ffc097a0: 81 69 00 1c lwz r11,28(r9) ffc097a4: 38 60 00 00 li r3,0 ffc097a8: 38 0b 00 01 addi r0,r11,1 ffc097ac: 90 09 00 1c stw r0,28(r9) break; ffc097b0: 4b ff fe d8 b ffc09688 <_CORE_mutex_Surrender+0x38> <== ALWAYS TAKEN } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; ffc097b4: 38 00 00 01 li r0,1 ffc097b8: 90 1f 00 50 stw r0,80(r31) ffc097bc: 38 60 00 00 li r3,0 ffc097c0: 4b ff fe c8 b ffc09688 <_CORE_mutex_Surrender+0x38> <== ALWAYS TAKEN ffc097c4 <_CORE_semaphore_Flush>: void _CORE_semaphore_Flush( CORE_semaphore_Control *the_semaphore, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { ffc097c4: 94 21 ff f8 stwu r1,-8(r1) ffc097c8: 7c 08 02 a6 mflr r0 ffc097cc: 90 01 00 0c stw r0,12(r1) _Thread_queue_Flush( ffc097d0: 48 00 21 2d bl ffc0b8fc <_Thread_queue_Flush> <== ALWAYS TAKEN &the_semaphore->Wait_queue, remote_extract_callout, status ); } ffc097d4: 80 01 00 0c lwz r0,12(r1) ffc097d8: 38 21 00 08 addi r1,r1,8 ffc097dc: 7c 08 03 a6 mtlr r0 ffc097e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc097e4 <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { ffc097e4: 94 21 ff f8 stwu r1,-8(r1) ffc097e8: 7c 08 02 a6 mflr r0 the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize( ffc097ec: 38 c0 00 03 li r6,3 void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { ffc097f0: 90 01 00 0c stw r0,12(r1) the_semaphore->Attributes = *the_semaphore_attributes; ffc097f4: 81 64 00 00 lwz r11,0(r4) ffc097f8: 81 84 00 04 lwz r12,4(r4) ffc097fc: 91 63 00 40 stw r11,64(r3) ffc09800: 91 83 00 44 stw r12,68(r3) <== ALWAYS TAKEN the_semaphore->count = initial_value; _Thread_queue_Initialize( ffc09804: 80 84 00 04 lwz r4,4(r4) uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; ffc09808: 90 a3 00 48 stw r5,72(r3) _Thread_queue_Initialize( ffc0980c: 38 a0 02 00 li r5,512 ffc09810: 68 84 00 01 xori r4,r4,1 ffc09814: 7c 84 00 34 cntlzw r4,r4 ffc09818: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc0981c: 48 00 21 2d bl ffc0b948 <_Thread_queue_Initialize> <== ALWAYS TAKEN _CORE_semaphore_Is_priority( the_semaphore_attributes ) ? THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_SEMAPHORE, CORE_SEMAPHORE_TIMEOUT ); } ffc09820: 80 01 00 0c lwz r0,12(r1) ffc09824: 38 21 00 08 addi r1,r1,8 ffc09828: 7c 08 03 a6 mtlr r0 ffc0982c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09830 <_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 ) { ffc09830: 94 21 ff f0 stwu r1,-16(r1) ffc09834: 7c 08 02 a6 mflr r0 ffc09838: 93 e1 00 0c stw r31,12(r1) ffc0983c: 7c 7f 1b 78 mr r31,r3 ffc09840: 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)) ) { ffc09844: 48 00 1b d1 bl ffc0b414 <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc09848: 2f 83 00 00 cmpwi cr7,r3,0 ffc0984c: 38 60 00 00 li r3,0 ffc09850: 41 9e 00 18 beq- cr7,ffc09868 <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc09854: 80 01 00 14 lwz r0,20(r1) ffc09858: 83 e1 00 0c lwz r31,12(r1) ffc0985c: 38 21 00 10 addi r1,r1,16 ffc09860: 7c 08 03 a6 mtlr r0 ffc09864: 4e 80 00 20 blr <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09868: 7c 00 00 a6 mfmsr r0 ffc0986c: 7d 30 42 a6 mfsprg r9,0 ffc09870: 7c 09 48 78 andc r9,r0,r9 ffc09874: 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 ) ffc09878: 81 3f 00 48 lwz r9,72(r31) ffc0987c: 38 60 00 04 li r3,4 ffc09880: 81 7f 00 40 lwz r11,64(r31) ffc09884: 7f 89 58 40 cmplw cr7,r9,r11 ffc09888: 41 9c 00 1c blt- cr7,ffc098a4 <_CORE_semaphore_Surrender+0x74> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0988c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc09890: 80 01 00 14 lwz r0,20(r1) ffc09894: 83 e1 00 0c lwz r31,12(r1) ffc09898: 38 21 00 10 addi r1,r1,16 ffc0989c: 7c 08 03 a6 mtlr r0 ffc098a0: 4e 80 00 20 blr <== ALWAYS TAKEN #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; ffc098a4: 39 29 00 01 addi r9,r9,1 ffc098a8: 91 3f 00 48 stw r9,72(r31) ffc098ac: 38 60 00 00 li r3,0 ffc098b0: 7c 00 01 24 mtmsr r0 ffc098b4: 4b ff ff dc b ffc09890 <_CORE_semaphore_Surrender+0x60> <== ALWAYS TAKEN ffc09308 <_Chain_Append>: ffc09308: 7c 00 00 a6 mfmsr r0 ffc0930c: 7d 30 42 a6 mfsprg r9,0 ffc09310: 7c 09 48 78 andc r9,r0,r9 ffc09314: 7d 20 01 24 mtmsr r9 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc09318: 39 23 00 04 addi r9,r3,4 ffc0931c: 91 24 00 00 stw r9,0(r4) old_last_node = the_chain->last; ffc09320: 81 23 00 08 lwz r9,8(r3) the_chain->last = the_node; ffc09324: 90 83 00 08 stw r4,8(r3) <== ALWAYS TAKEN old_last_node->next = the_node; the_node->previous = old_last_node; ffc09328: 91 24 00 04 stw r9,4(r4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0932c: 90 89 00 00 stw r4,0(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09330: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level ); } ffc09334: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eb74 <_Chain_Extract>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0eb74: 7c 00 00 a6 mfmsr r0 ffc0eb78: 7d 30 42 a6 mfsprg r9,0 ffc0eb7c: 7c 09 48 78 andc r9,r0,r9 ffc0eb80: 7d 20 01 24 mtmsr r9 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0eb84: 81 63 00 04 lwz r11,4(r3) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0eb88: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; next->previous = previous; previous->next = next; ffc0eb8c: 91 2b 00 00 stw r9,0(r11) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0eb90: 91 69 00 04 stw r11,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0eb94: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _Chain_Extract_unprotected( node ); _ISR_Enable( level ); } ffc0eb98: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09338 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { ffc09338: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0933c: 7c 00 00 a6 mfmsr r0 ffc09340: 7d 70 42 a6 mfsprg r11,0 ffc09344: 7c 0b 58 78 andc r11,r0,r11 ffc09348: 7d 60 01 24 mtmsr r11 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0934c: 80 63 00 00 lwz r3,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc09350: 39 69 00 04 addi r11,r9,4 ffc09354: 7f 83 58 00 cmpw cr7,r3,r11 ffc09358: 41 9e 00 18 beq- cr7,ffc09370 <_Chain_Get+0x38> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc0935c: 81 63 00 00 lwz r11,0(r3) the_chain->first = new_first; ffc09360: 91 69 00 00 stw r11,0(r9) new_first->previous = _Chain_Head(the_chain); ffc09364: 91 2b 00 04 stw r9,4(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09368: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); return return_node; } ffc0936c: 4e 80 00 20 blr <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc09370: 38 60 00 00 li r3,0 <== ALWAYS TAKEN ffc09374: 7c 00 01 24 mtmsr r0 ffc09378: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eb9c <_Chain_Initialize>: count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { ffc0eb9c: 2c 05 00 00 cmpwi r5,0 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; ffc0eba0: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc0eba4: 90 03 00 04 stw r0,4(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc0eba8: 7c 69 1b 78 mr r9,r3 next = starting_address; while ( count-- ) { ffc0ebac: 41 82 00 24 beq- ffc0ebd0 <_Chain_Initialize+0x34> <== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; ffc0ebb0: 7c a9 03 a6 mtctr r5 ffc0ebb4: 48 00 00 08 b ffc0ebbc <_Chain_Initialize+0x20> <== ALWAYS TAKEN while ( count-- ) { ffc0ebb8: 7c 04 03 78 mr r4,r0 current->next = next; next->previous = current; ffc0ebbc: 91 24 00 04 stw r9,4(r4) ffc0ebc0: 7c 04 32 14 add r0,r4,r6 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; ffc0ebc4: 90 89 00 00 stw r4,0(r9) <== ALWAYS TAKEN next->previous = current; current = next; next = (Chain_Node *) ffc0ebc8: 7c 89 23 78 mr r9,r4 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { ffc0ebcc: 42 00 ff ec bdnz+ ffc0ebb8 <_Chain_Initialize+0x1c> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); ffc0ebd0: 38 03 00 04 addi r0,r3,4 ffc0ebd4: 90 09 00 00 stw r0,0(r9) the_chain->last = current; ffc0ebd8: 91 23 00 08 stw r9,8(r3) } ffc0ebdc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1545c <_Chain_Insert>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1545c: 7c 00 00 a6 mfmsr r0 ffc15460: 7d 30 42 a6 mfsprg r9,0 ffc15464: 7c 09 48 78 andc r9,r0,r9 ffc15468: 7d 20 01 24 mtmsr r9 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc1546c: 81 23 00 00 lwz r9,0(r3) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc15470: 90 64 00 04 stw r3,4(r4) before_node = after_node->next; after_node->next = the_node; ffc15474: 90 83 00 00 stw r4,0(r3) the_node->next = before_node; before_node->previous = the_node; ffc15478: 90 89 00 04 stw r4,4(r9) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc1547c: 91 24 00 00 stw r9,0(r4) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc15480: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); } ffc15484: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eac4 <_Debug_Manager_initialization>: */ void rtems_debug_disable ( rtems_debug_control to_be_disabled ) { _Debug_Level &= ~to_be_disabled; ffc0eac4: 38 00 00 00 li r0,0 ffc0eac8: 3d 20 00 00 lis r9,0 ffc0eacc: 90 09 27 70 stw r0,10096(r9) <== ALWAYS TAKEN * _Debug_Manager_initialization */ void _Debug_Manager_initialization( void ) { rtems_debug_disable( RTEMS_DEBUG_ALL_MASK ); } ffc0ead0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e580 <_Dual_ported_memory_Manager_initialization>: * Output parameters: NONE */ void _Dual_ported_memory_Manager_initialization(void) { _Objects_Initialize_information( ffc0e580: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Dual_ported_memory_Manager_initialization(void) { ffc0e584: 94 21 ff f8 stwu r1,-8(r1) ffc0e588: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0e58c: 3c 60 00 00 lis r3,0 ffc0e590: 80 c9 20 8c lwz r6,8332(r9) ffc0e594: 38 63 2e 44 addi r3,r3,11844 ffc0e598: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Dual_ported_memory_Manager_initialization(void) { ffc0e59c: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0e5a0: 38 a0 00 07 li r5,7 ffc0e5a4: 38 e0 00 1c li r7,28 ffc0e5a8: 39 00 00 00 li r8,0 ffc0e5ac: 39 20 00 04 li r9,4 ffc0e5b0: 4b ff be d9 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0e5b4: 80 01 00 0c lwz r0,12(r1) ffc0e5b8: 38 21 00 08 addi r1,r1,8 ffc0e5bc: 7c 08 03 a6 mtlr r0 ffc0e5c0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e5c4 <_Event_Manager_initialization>: * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0e5c4: 38 00 00 00 li r0,0 ffc0e5c8: 3d 20 00 00 lis r9,0 ffc0e5cc: 90 09 27 a0 stw r0,10144(r9) */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } ffc0e5d0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07e8c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07e8c: 94 21 ff f0 stwu r1,-16(r1) ffc07e90: 7c 08 02 a6 mflr r0 rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; ffc07e94: 3d 20 00 00 lis r9,0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07e98: 93 e1 00 0c stw r31,12(r1) rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; ffc07e9c: 83 e9 27 6c lwz r31,10092(r9) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07ea0: 90 01 00 14 stw r0,20(r1) ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; ffc07ea4: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc07ea8: 90 1f 00 34 stw r0,52(r31) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07eac: 93 c1 00 08 stw r30,8(r1) Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc07eb0: 81 7f 01 40 lwz r11,320(r31) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07eb4: 7d 40 00 a6 mfmsr r10 ffc07eb8: 7c 10 42 a6 mfsprg r0,0 ffc07ebc: 7d 40 00 78 andc r0,r10,r0 ffc07ec0: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc07ec4: 80 0b 00 00 lwz r0,0(r11) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && ffc07ec8: 7c 69 00 39 and. r9,r3,r0 ffc07ecc: 41 82 00 14 beq- ffc07ee0 <_Event_Seize+0x54> ffc07ed0: 7f 83 48 00 cmpw cr7,r3,r9 ffc07ed4: 41 9e 00 b0 beq- cr7,ffc07f84 <_Event_Seize+0xf8> ffc07ed8: 70 88 00 02 andi. r8,r4,2 ffc07edc: 40 82 00 a8 bne- ffc07f84 <_Event_Seize+0xf8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { ffc07ee0: 70 80 00 01 andi. r0,r4,1 ffc07ee4: 40 82 00 78 bne- ffc07f5c <_Event_Seize+0xd0> */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc07ee8: 3f c0 00 00 lis r30,0 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; ffc07eec: 90 9f 00 30 stw r4,48(r31) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc07ef0: 38 00 00 01 li r0,1 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; ffc07ef4: 90 7f 00 24 stw r3,36(r31) executing->Wait.return_argument = event_out; ffc07ef8: 90 df 00 28 stw r6,40(r31) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc07efc: 90 1e 27 a0 stw r0,10144(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07f00: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); if ( ticks ) { ffc07f04: 2f 85 00 00 cmpwi cr7,r5,0 ffc07f08: 40 9e 00 c0 bne- cr7,ffc07fc8 <_Event_Seize+0x13c> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); ffc07f0c: 7f e3 fb 78 mr r3,r31 ffc07f10: 38 80 01 00 li r4,256 ffc07f14: 48 00 3b e1 bl ffc0baf4 <_Thread_Set_state> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07f18: 7c a0 00 a6 mfmsr r5 ffc07f1c: 7c 10 42 a6 mfsprg r0,0 ffc07f20: 7c a0 00 78 andc r0,r5,r0 ffc07f24: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); sync_state = _Event_Sync_state; ffc07f28: 80 7e 27 a0 lwz r3,10144(r30) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc07f2c: 38 00 00 00 li r0,0 ffc07f30: 90 1e 27 a0 stw r0,10144(r30) if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { ffc07f34: 2f 83 00 01 cmpwi cr7,r3,1 ffc07f38: 41 9e 00 74 beq- cr7,ffc07fac <_Event_Seize+0x120> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); ffc07f3c: 7f e4 fb 78 mr r4,r31 ffc07f40: 48 00 28 c9 bl ffc0a808 <_Thread_blocking_operation_Cancel> <== ALWAYS TAKEN } ffc07f44: 80 01 00 14 lwz r0,20(r1) ffc07f48: 83 c1 00 08 lwz r30,8(r1) ffc07f4c: 7c 08 03 a6 mtlr r0 ffc07f50: 83 e1 00 0c lwz r31,12(r1) ffc07f54: 38 21 00 10 addi r1,r1,16 ffc07f58: 4e 80 00 20 blr <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07f5c: 7d 40 01 24 mtmsr r10 return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; ffc07f60: 38 00 00 0d li r0,13 * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc07f64: 83 c1 00 08 lwz r30,8(r1) return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; ffc07f68: 90 1f 00 34 stw r0,52(r31) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc07f6c: 80 01 00 14 lwz r0,20(r1) ffc07f70: 83 e1 00 0c lwz r31,12(r1) ffc07f74: 38 21 00 10 addi r1,r1,16 ffc07f78: 7c 08 03 a6 mtlr r0 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; ffc07f7c: 91 26 00 00 stw r9,0(r6) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc07f80: 4e 80 00 20 blr <== ALWAYS TAKEN pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = ffc07f84: 7c 00 48 78 andc r0,r0,r9 ffc07f88: 90 0b 00 00 stw r0,0(r11) ffc07f8c: 7d 40 01 24 mtmsr r10 * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc07f90: 80 01 00 14 lwz r0,20(r1) ffc07f94: 83 c1 00 08 lwz r30,8(r1) ffc07f98: 7c 08 03 a6 mtlr r0 ffc07f9c: 83 e1 00 0c lwz r31,12(r1) if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); *event_out = seized_events; ffc07fa0: 91 26 00 00 stw r9,0(r6) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc07fa4: 38 21 00 10 addi r1,r1,16 ffc07fa8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07fac: 7c a0 01 24 mtmsr r5 ffc07fb0: 80 01 00 14 lwz r0,20(r1) ffc07fb4: 83 c1 00 08 lwz r30,8(r1) ffc07fb8: 7c 08 03 a6 mtlr r0 ffc07fbc: 83 e1 00 0c lwz r31,12(r1) ffc07fc0: 38 21 00 10 addi r1,r1,16 ffc07fc4: 4e 80 00 20 blr <== ALWAYS TAKEN _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( ffc07fc8: 81 3f 00 08 lwz r9,8(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc07fcc: 3d 60 ff c1 lis r11,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc07fd0: 38 00 00 00 li r0,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc07fd4: 90 bf 00 54 stw r5,84(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc07fd8: 39 6b 81 f0 addi r11,r11,-32272 ffc07fdc: 91 7f 00 64 stw r11,100(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07fe0: 3c 60 00 00 lis r3,0 ffc07fe4: 38 63 2c a8 addi r3,r3,11432 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc07fe8: 91 3f 00 68 stw r9,104(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07fec: 38 9f 00 48 addi r4,r31,72 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc07ff0: 90 1f 00 6c stw r0,108(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc07ff4: 90 1f 00 50 stw r0,80(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07ff8: 48 00 46 29 bl ffc0c620 <_Watchdog_Insert> <== ALWAYS TAKEN ffc07ffc: 4b ff ff 10 b ffc07f0c <_Event_Seize+0x80> <== ALWAYS TAKEN ffc08074 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc08074: 94 21 ff f0 stwu r1,-16(r1) ffc08078: 7c 08 02 a6 mflr r0 ffc0807c: 90 01 00 14 stw r0,20(r1) ffc08080: 93 e1 00 0c stw r31,12(r1) ffc08084: 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 ]; ffc08088: 81 63 01 40 lwz r11,320(r3) option_set = (rtems_option) the_thread->Wait.option; ffc0808c: 80 e3 00 30 lwz r7,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08090: 7d 40 00 a6 mfmsr r10 ffc08094: 7c 10 42 a6 mfsprg r0,0 ffc08098: 7d 40 00 78 andc r0,r10,r0 ffc0809c: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc080a0: 81 2b 00 00 lwz r9,0(r11) event_condition = (rtems_event_set) the_thread->Wait.count; ffc080a4: 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 ) ) { ffc080a8: 7c 08 48 39 and. r8,r0,r9 ffc080ac: 41 82 00 b0 beq- ffc0815c <_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() && ffc080b0: 3c c0 00 00 lis r6,0 ffc080b4: 80 c6 27 54 lwz r6,10068(r6) ffc080b8: 2f 86 00 00 cmpwi cr7,r6,0 ffc080bc: 41 9e 00 14 beq- cr7,ffc080d0 <_Event_Surrender+0x5c> ffc080c0: 3c c0 00 00 lis r6,0 ffc080c4: 80 c6 27 6c lwz r6,10092(r6) ffc080c8: 7f 83 30 00 cmpw cr7,r3,r6 ffc080cc: 41 9e 00 d0 beq- cr7,ffc0819c <_Event_Surrender+0x128> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc080d0: 80 df 00 10 lwz r6,16(r31) ffc080d4: 70 c5 01 00 andi. r5,r6,256 ffc080d8: 41 82 00 6c beq- ffc08144 <_Event_Surrender+0xd0> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc080dc: 7f 80 40 00 cmpw cr7,r0,r8 ffc080e0: 41 9e 00 0c beq- cr7,ffc080ec <_Event_Surrender+0x78> ffc080e4: 70 e0 00 02 andi. r0,r7,2 ffc080e8: 41 82 00 5c beq- ffc08144 <_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; ffc080ec: 80 ff 00 28 lwz r7,40(r31) /* * 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 ); ffc080f0: 7d 29 40 78 andc r9,r9,r8 the_thread->Wait.count = 0; ffc080f4: 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 ); ffc080f8: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc080fc: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08100: 91 07 00 00 stw r8,0(r7) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc08104: 7c 00 00 a6 mfmsr r0 ffc08108: 7d 40 01 24 mtmsr r10 ffc0810c: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc08110: 80 1f 00 50 lwz r0,80(r31) ffc08114: 2f 80 00 02 cmpwi cr7,r0,2 ffc08118: 41 9e 00 5c beq- cr7,ffc08174 <_Event_Surrender+0x100> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0811c: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08120: 3c 80 10 03 lis r4,4099 ffc08124: 7f e3 fb 78 mr r3,r31 ffc08128: 60 84 ff f8 ori r4,r4,65528 ffc0812c: 48 00 29 39 bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN } return; } } _ISR_Enable( level ); } ffc08130: 80 01 00 14 lwz r0,20(r1) ffc08134: 83 e1 00 0c lwz r31,12(r1) ffc08138: 38 21 00 10 addi r1,r1,16 ffc0813c: 7c 08 03 a6 mtlr r0 ffc08140: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08144: 7d 40 01 24 mtmsr r10 ffc08148: 80 01 00 14 lwz r0,20(r1) ffc0814c: 83 e1 00 0c lwz r31,12(r1) ffc08150: 38 21 00 10 addi r1,r1,16 ffc08154: 7c 08 03 a6 mtlr r0 ffc08158: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0815c: 7d 40 01 24 mtmsr r10 ffc08160: 80 01 00 14 lwz r0,20(r1) ffc08164: 83 e1 00 0c lwz r31,12(r1) ffc08168: 38 21 00 10 addi r1,r1,16 ffc0816c: 7c 08 03 a6 mtlr r0 ffc08170: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc08174: 38 00 00 03 li r0,3 ffc08178: 90 1f 00 50 stw r0,80(r31) ffc0817c: 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 ); ffc08180: 38 7f 00 48 addi r3,r31,72 ffc08184: 48 00 46 65 bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN ffc08188: 3c 80 10 03 lis r4,4099 ffc0818c: 7f e3 fb 78 mr r3,r31 ffc08190: 60 84 ff f8 ori r4,r4,65528 ffc08194: 48 00 28 d1 bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN ffc08198: 4b ff ff b0 b ffc08148 <_Event_Surrender+0xd4> <== ALWAYS TAKEN * 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) || ffc0819c: 3c c0 00 00 lis r6,0 ffc081a0: 80 a6 27 a0 lwz r5,10144(r6) /* * 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() && ffc081a4: 2f 85 00 02 cmpwi cr7,r5,2 ffc081a8: 41 9e 00 10 beq- cr7,ffc081b8 <_Event_Surrender+0x144> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc081ac: 80 a6 27 a0 lwz r5,10144(r6) /* * 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() && ffc081b0: 2f 85 00 01 cmpwi cr7,r5,1 ffc081b4: 40 9e ff 1c bne+ cr7,ffc080d0 <_Event_Surrender+0x5c> _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) ) { ffc081b8: 7f 80 40 00 cmpw cr7,r0,r8 ffc081bc: 41 9e 00 0c beq- cr7,ffc081c8 <_Event_Surrender+0x154> ffc081c0: 70 e0 00 02 andi. r0,r7,2 ffc081c4: 41 82 00 24 beq- ffc081e8 <_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; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc081c8: 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; ffc081cc: 80 ff 00 28 lwz r7,40(r31) 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 ); ffc081d0: 7d 29 40 78 andc r9,r9,r8 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc081d4: 90 06 27 a0 stw r0,10144(r6) _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; ffc081d8: 38 00 00 00 li r0,0 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 ); ffc081dc: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc081e0: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc081e4: 91 07 00 00 stw r8,0(r7) ffc081e8: 7d 40 01 24 mtmsr r10 ffc081ec: 4b ff ff 5c b ffc08148 <_Event_Surrender+0xd4> <== ALWAYS TAKEN ffc081f0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc081f0: 94 21 ff e8 stwu r1,-24(r1) ffc081f4: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc081f8: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc081fc: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08200: 48 00 2d 99 bl ffc0af98 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc08204: 80 01 00 08 lwz r0,8(r1) ffc08208: 2f 80 00 00 cmpwi cr7,r0,0 ffc0820c: 40 9e 00 50 bne- cr7,ffc0825c <_Event_Timeout+0x6c> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08210: 7d 20 00 a6 mfmsr r9 ffc08214: 7d 70 42 a6 mfsprg r11,0 ffc08218: 7d 2b 58 78 andc r11,r9,r11 ffc0821c: 7d 60 01 24 mtmsr r11 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc08220: 3d 60 00 00 lis r11,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc08224: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc08228: 81 6b 27 6c lwz r11,10092(r11) ffc0822c: 7f 83 58 00 cmpw cr7,r3,r11 ffc08230: 41 9e 00 3c beq- cr7,ffc0826c <_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; ffc08234: 38 00 00 06 li r0,6 ffc08238: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0823c: 7d 20 01 24 mtmsr r9 ffc08240: 3c 80 10 03 lis r4,4099 ffc08244: 60 84 ff f8 ori r4,r4,65528 ffc08248: 48 00 28 1d bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0824c: 3d 20 00 00 lis r9,0 ffc08250: 81 69 27 2c lwz r11,10028(r9) ffc08254: 38 0b ff ff addi r0,r11,-1 ffc08258: 90 09 27 2c stw r0,10028(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc0825c: 80 01 00 1c lwz r0,28(r1) ffc08260: 38 21 00 18 addi r1,r1,24 ffc08264: 7c 08 03 a6 mtlr r0 ffc08268: 4e 80 00 20 blr <== ALWAYS TAKEN } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc0826c: 3d 60 00 00 lis r11,0 ffc08270: 80 0b 27 a0 lwz r0,10144(r11) ffc08274: 2f 80 00 01 cmpwi cr7,r0,1 ffc08278: 40 9e ff bc bne+ cr7,ffc08234 <_Event_Timeout+0x44> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc0827c: 38 00 00 02 li r0,2 ffc08280: 90 0b 27 a0 stw r0,10144(r11) ffc08284: 4b ff ff b0 b ffc08234 <_Event_Timeout+0x44> <== ALWAYS TAKEN ffc08e64 <_Extension_Manager_initialization>: * Output parameters: NONE */ void _Extension_Manager_initialization(void) { _Objects_Initialize_information( ffc08e64: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { ffc08e68: 94 21 ff f8 stwu r1,-8(r1) ffc08e6c: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc08e70: 3c 60 00 00 lis r3,0 ffc08e74: 80 c9 20 a8 lwz r6,8360(r9) <== ALWAYS TAKEN ffc08e78: 38 63 2d c4 addi r3,r3,11716 <== ALWAYS TAKEN ffc08e7c: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { ffc08e80: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc08e84: 38 a0 00 09 li r5,9 ffc08e88: 38 e0 00 44 li r7,68 ffc08e8c: 39 00 00 00 li r8,0 ffc08e90: 39 20 00 04 li r9,4 ffc08e94: 48 00 15 f5 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc08e98: 80 01 00 0c lwz r0,12(r1) ffc08e9c: 38 21 00 08 addi r1,r1,8 ffc08ea0: 7c 08 03 a6 mtlr r0 ffc08ea4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eea8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0eea8: 94 21 ff e0 stwu r1,-32(r1) ffc0eeac: 7c 08 02 a6 mflr r0 ffc0eeb0: 7d 80 00 26 mfcr r12 ffc0eeb4: 7c 89 23 78 mr r9,r4 ffc0eeb8: 90 01 00 24 stw r0,36(r1) Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; ffc0eebc: 38 04 00 04 addi r0,r4,4 uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ffc0eec0: 7f 84 00 40 cmplw cr7,r4,r0 <== ALWAYS TAKEN Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0eec4: 93 a1 00 14 stw r29,20(r1) ffc0eec8: 7c 7d 1b 78 mr r29,r3 ffc0eecc: 93 61 00 0c stw r27,12(r1) ffc0eed0: 93 81 00 10 stw r28,16(r1) ffc0eed4: 93 c1 00 18 stw r30,24(r1) ffc0eed8: 93 e1 00 1c stw r31,28(r1) ffc0eedc: 91 81 00 08 stw r12,8(r1) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0eee0: 80 83 00 08 lwz r4,8(r3) Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; ffc0eee4: 80 e3 00 10 lwz r7,16(r3) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ffc0eee8: 41 9d 01 7c bgt- cr7,ffc0f064 <_Heap_Allocate_aligned_with_boundary+0x1bc> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc0eeec: 2e 06 00 00 cmpwi cr4,r6,0 ffc0eef0: 40 92 01 6c bne- cr4,ffc0f05c <_Heap_Allocate_aligned_with_boundary+0x1b4> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc0eef4: 7f 9d 20 00 cmpw cr7,r29,r4 ffc0eef8: 3b c0 00 00 li r30,0 ffc0eefc: 41 9e 01 98 beq- cr7,ffc0f094 <_Heap_Allocate_aligned_with_boundary+0x1ec> * 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 ) { ffc0ef00: 2c 05 00 00 cmpwi r5,0 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; ffc0ef04: 3b 67 00 07 addi r27,r7,7 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; ffc0ef08: 23 89 00 04 subfic r28,r9,4 <== ALWAYS TAKEN ffc0ef0c: 48 00 00 1c b ffc0ef28 <_Heap_Allocate_aligned_with_boundary+0x80> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0ef10: 3b e4 00 08 addi r31,r4,8 boundary ); } } if ( alloc_begin != 0 ) { ffc0ef14: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ef18: 40 9e 00 e8 bne- cr7,ffc0f000 <_Heap_Allocate_aligned_with_boundary+0x158> <== ALWAYS TAKEN break; } block = block->next; ffc0ef1c: 80 84 00 08 lwz r4,8(r4) if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc0ef20: 7f 9d 20 00 cmpw cr7,r29,r4 ffc0ef24: 41 9e 01 70 beq- cr7,ffc0f094 <_Heap_Allocate_aligned_with_boundary+0x1ec> /* * 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 ) { ffc0ef28: 81 64 00 04 lwz r11,4(r4) while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; ffc0ef2c: 3b de 00 01 addi r30,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 ) { ffc0ef30: 7f 80 58 40 cmplw cr7,r0,r11 ffc0ef34: 40 bc ff e8 bge- cr7,ffc0ef1c <_Heap_Allocate_aligned_with_boundary+0x74> if ( alignment == 0 ) { ffc0ef38: 41 82 ff d8 beq+ ffc0ef10 <_Heap_Allocate_aligned_with_boundary+0x68> 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; ffc0ef3c: 55 6b 00 3c rlwinm r11,r11,0,0,30 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; ffc0ef40: 80 7d 00 14 lwz r3,20(r29) 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; ffc0ef44: 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_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; ffc0ef48: 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); ffc0ef4c: 7f ff 2b 96 divwu r31,r31,r5 ffc0ef50: 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; ffc0ef54: 7d 43 d8 50 subf r10,r3,r27 ffc0ef58: 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 ) { ffc0ef5c: 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; ffc0ef60: 39 84 00 08 addi r12,r4,8 ffc0ef64: 40 9c 00 0c bge- cr7,ffc0ef70 <_Heap_Allocate_aligned_with_boundary+0xc8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0ef68: 7d 6b 2b 96 divwu r11,r11,r5 ffc0ef6c: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc0ef70: 41 92 00 60 beq- cr4,ffc0efd0 <_Heap_Allocate_aligned_with_boundary+0x128> /* 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; ffc0ef74: 7d 5f 4a 14 add r10,r31,r9 ffc0ef78: 7d 6a 33 96 divwu r11,r10,r6 ffc0ef7c: 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 ) { ffc0ef80: 7f 9f 58 40 cmplw cr7,r31,r11 ffc0ef84: 40 9c 00 4c bge- cr7,ffc0efd0 <_Heap_Allocate_aligned_with_boundary+0x128> ffc0ef88: 7f 8a 58 40 cmplw cr7,r10,r11 ffc0ef8c: 40 9d 00 44 ble- cr7,ffc0efd0 <_Heap_Allocate_aligned_with_boundary+0x128> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc0ef90: 7d 0c 4a 14 add r8,r12,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 ) { ffc0ef94: 7f 88 58 40 cmplw cr7,r8,r11 ffc0ef98: 40 bd 00 10 ble+ cr7,ffc0efa8 <_Heap_Allocate_aligned_with_boundary+0x100> ffc0ef9c: 4b ff ff 80 b ffc0ef1c <_Heap_Allocate_aligned_with_boundary+0x74> <== ALWAYS TAKEN /* 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 ) { ffc0efa0: 40 99 00 30 ble- cr6,ffc0efd0 <_Heap_Allocate_aligned_with_boundary+0x128> if ( boundary_line < boundary_floor ) { ffc0efa4: 41 a5 ff 78 bgt- cr1,ffc0ef1c <_Heap_Allocate_aligned_with_boundary+0x74> <== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc0efa8: 7f e9 58 50 subf r31,r9,r11 ffc0efac: 7f ff 2b 96 divwu r31,r31,r5 ffc0efb0: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc0efb4: 7d 5f 4a 14 add r10,r31,r9 ffc0efb8: 7d 6a 33 96 divwu r11,r10,r6 ffc0efbc: 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 ) { ffc0efc0: 7f 9f 58 40 cmplw cr7,r31,r11 ffc0efc4: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc0efc8: 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 ) { ffc0efcc: 41 9c ff d4 blt+ cr7,ffc0efa0 <_Heap_Allocate_aligned_with_boundary+0xf8> 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 ) { ffc0efd0: 7f 8c f8 40 cmplw cr7,r12,r31 ffc0efd4: 41 bd ff 48 bgt- cr7,ffc0ef1c <_Heap_Allocate_aligned_with_boundary+0x74> 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; ffc0efd8: 7d 7f 3b 96 divwu r11,r31,r7 ffc0efdc: 7d 6b 39 d6 mullw r11,r11,r7 ffc0efe0: 21 44 ff f8 subfic r10,r4,-8 ffc0efe4: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc0efe8: 7f 83 58 40 cmplw cr7,r3,r11 ffc0efec: 40 bd ff 28 ble- cr7,ffc0ef14 <_Heap_Allocate_aligned_with_boundary+0x6c> ffc0eff0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0eff4: 40 be ff 28 bne- cr7,ffc0ef1c <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { ffc0eff8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0effc: 41 9e ff 20 beq+ cr7,ffc0ef1c <_Heap_Allocate_aligned_with_boundary+0x74> <== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc0f000: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0f004: 7d 26 4b 78 mr r6,r9 ffc0f008: 7f a3 eb 78 mr r3,r29 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc0f00c: 7c 00 f2 14 add r0,r0,r30 ffc0f010: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0f014: 7f e5 fb 78 mr r5,r31 ffc0f018: 4b ff ab fd bl ffc09c14 <_Heap_Block_allocate> <== ALWAYS TAKEN ffc0f01c: 7f e3 fb 78 mr r3,r31 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; ffc0f020: 80 1d 00 44 lwz r0,68(r29) <== ALWAYS TAKEN ffc0f024: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0f028: 40 9c 00 40 bge- cr7,ffc0f068 <_Heap_Allocate_aligned_with_boundary+0x1c0> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc0f02c: 80 01 00 24 lwz r0,36(r1) <== ALWAYS TAKEN ffc0f030: 81 81 00 08 lwz r12,8(r1) ffc0f034: 7c 08 03 a6 mtlr r0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; ffc0f038: 93 dd 00 44 stw r30,68(r29) <== ALWAYS TAKEN } return (void *) alloc_begin; } ffc0f03c: 7d 80 81 20 mtcrf 8,r12 ffc0f040: 83 61 00 0c lwz r27,12(r1) ffc0f044: 83 81 00 10 lwz r28,16(r1) ffc0f048: 83 a1 00 14 lwz r29,20(r1) ffc0f04c: 83 c1 00 18 lwz r30,24(r1) ffc0f050: 83 e1 00 1c lwz r31,28(r1) ffc0f054: 38 21 00 20 addi r1,r1,32 ffc0f058: 4e 80 00 20 blr <== ALWAYS TAKEN /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc0f05c: 7f 89 30 40 cmplw cr7,r9,r6 ffc0f060: 40 bd 00 3c ble+ cr7,ffc0f09c <_Heap_Allocate_aligned_with_boundary+0x1f4> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; ffc0f064: 38 60 00 00 li r3,0 } return (void *) alloc_begin; } ffc0f068: 80 01 00 24 lwz r0,36(r1) ffc0f06c: 81 81 00 08 lwz r12,8(r1) <== ALWAYS TAKEN ffc0f070: 7c 08 03 a6 mtlr r0 ffc0f074: 83 61 00 0c lwz r27,12(r1) ffc0f078: 83 81 00 10 lwz r28,16(r1) ffc0f07c: 7d 80 81 20 mtcrf 8,r12 ffc0f080: 83 a1 00 14 lwz r29,20(r1) ffc0f084: 83 c1 00 18 lwz r30,24(r1) <== ALWAYS TAKEN ffc0f088: 83 e1 00 1c lwz r31,28(r1) ffc0f08c: 38 21 00 20 addi r1,r1,32 <== ALWAYS TAKEN ffc0f090: 4e 80 00 20 blr <== ALWAYS TAKEN if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc0f094: 38 60 00 00 li r3,0 ffc0f098: 4b ff ff 88 b ffc0f020 <_Heap_Allocate_aligned_with_boundary+0x178> <== ALWAYS TAKEN if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { ffc0f09c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f0a0: 40 be fe 54 bne- cr7,ffc0eef4 <_Heap_Allocate_aligned_with_boundary+0x4c> ffc0f0a4: 7c e5 3b 78 mr r5,r7 ffc0f0a8: 4b ff fe 4c b ffc0eef4 <_Heap_Allocate_aligned_with_boundary+0x4c> <== ALWAYS TAKEN ffc09c14 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc09c14: 94 21 ff e8 stwu r1,-24(r1) ffc09c18: 7c 08 02 a6 mflr r0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09c1c: 39 65 ff f8 addi r11,r5,-8 ffc09c20: 90 01 00 1c stw r0,28(r1) <== ALWAYS TAKEN ffc09c24: 7c 87 23 78 mr r7,r4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc09c28: 80 04 00 04 lwz r0,4(r4) Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc09c2c: 93 c1 00 10 stw r30,16(r1) ffc09c30: 7c 7e 1b 78 mr r30,r3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc09c34: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc09c38: 7d 24 02 14 add r9,r4,r0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc09c3c: 93 e1 00 14 stw r31,20(r1) ffc09c40: 7c 9f 23 78 mr r31,r4 <== ALWAYS TAKEN Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc09c44: 80 09 00 04 lwz r0,4(r9) /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); ffc09c48: 7c 69 1b 78 mr r9,r3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc09c4c: 93 a1 00 0c stw r29,12(r1) Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc09c50: 70 08 00 01 andi. r8,r0,1 <== ALWAYS TAKEN ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; ffc09c54: 7d 04 58 50 subf r8,r4,r11 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc09c58: 40 82 00 40 bne- ffc09c98 <_Heap_Block_allocate+0x84> _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; ffc09c5c: 81 43 00 40 lwz r10,64(r3) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ffc09c60: 81 23 00 38 lwz r9,56(r3) ++stats->used_blocks; ffc09c64: 38 0a 00 01 addi r0,r10,1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc09c68: 81 5f 00 08 lwz r10,8(r31) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ffc09c6c: 39 29 ff ff addi r9,r9,-1 ++stats->used_blocks; ffc09c70: 90 03 00 40 stw r0,64(r3) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ffc09c74: 91 23 00 38 stw r9,56(r3) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); ffc09c78: 80 04 00 04 lwz r0,4(r4) ffc09c7c: 80 83 00 30 lwz r4,48(r3) Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; ffc09c80: 81 3f 00 0c lwz r9,12(r31) <== ALWAYS TAKEN _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); ffc09c84: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc09c88: 7c 00 20 50 subf r0,r0,r4 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc09c8c: 91 2a 00 0c stw r9,12(r10) ffc09c90: 90 03 00 30 stw r0,48(r3) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc09c94: 91 49 00 08 stw r10,8(r9) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { ffc09c98: 81 5e 00 10 lwz r10,16(r30) ffc09c9c: 7f 88 50 40 cmplw cr7,r8,r10 ffc09ca0: 41 9c 00 d4 blt- cr7,ffc09d74 <_Heap_Block_allocate+0x160> 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 ) ffc09ca4: 7f a5 53 96 divwu r29,r5,r10 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; ffc09ca8: 81 1e 00 30 lwz r8,48(r30) - 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; ffc09cac: 80 1f 00 04 lwz r0,4(r31) 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 ) ffc09cb0: 7f bd 51 d6 mullw r29,r29,r10 ffc09cb4: 7f bd 28 50 subf r29,r29,r5 ffc09cb8: 7f bd 58 50 subf r29,r29,r11 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; ffc09cbc: 7d 7f e8 50 subf r11,r31,r29 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; ffc09cc0: 7d 48 5a 14 add r10,r8,r11 ffc09cc4: 91 5e 00 30 stw r10,48(r30) if ( _Heap_Is_prev_used( block ) ) { ffc09cc8: 81 5f 00 04 lwz r10,4(r31) ffc09ccc: 71 48 00 01 andi. r8,r10,1 ffc09cd0: 40 82 00 7c bne- ffc09d4c <_Heap_Block_allocate+0x138> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); ffc09cd4: 81 5f 00 00 lwz r10,0(r31) Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; ffc09cd8: 7d 25 4b 78 mr r5,r9 ffc09cdc: 7f ea f8 50 subf r31,r10,r31 ffc09ce0: 81 3f 00 04 lwz r9,4(r31) ffc09ce4: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc09ce8: 7d 6b 4a 14 add r11,r11,r9 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; ffc09cec: 54 00 00 3c rlwinm r0,r0,0,0,30 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; ffc09cf0: 91 7d 00 00 stw r11,0(r29) new_block->size_and_flag = new_block_size; ffc09cf4: 7c 07 02 14 add r0,r7,r0 ffc09cf8: 7c 1d 00 50 subf r0,r29,r0 <== ALWAYS TAKEN block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc09cfc: 61 69 00 01 ori r9,r11,1 ffc09d00: 91 3f 00 04 stw r9,4(r31) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); ffc09d04: 7f c3 f3 78 mr r3,r30 ffc09d08: 7f a4 eb 78 mr r4,r29 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; ffc09d0c: 90 1d 00 04 stw r0,4(r29) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); ffc09d10: 7f bf eb 78 mr r31,r29 ffc09d14: 4b ff fd ed bl ffc09b00 <_Heap_Block_split> <== ALWAYS TAKEN alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { ffc09d18: 80 1e 00 30 lwz r0,48(r30) Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; ffc09d1c: 81 3e 00 34 lwz r9,52(r30) ffc09d20: 7f 89 00 40 cmplw cr7,r9,r0 ffc09d24: 40 9d 00 08 ble- cr7,ffc09d2c <_Heap_Block_allocate+0x118> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; ffc09d28: 90 1e 00 34 stw r0,52(r30) <== ALWAYS TAKEN } return block; } ffc09d2c: 80 01 00 1c lwz r0,28(r1) ffc09d30: 7f e3 fb 78 mr r3,r31 ffc09d34: 83 a1 00 0c lwz r29,12(r1) ffc09d38: 7c 08 03 a6 mtlr r0 ffc09d3c: 83 c1 00 10 lwz r30,16(r1) ffc09d40: 83 e1 00 14 lwz r31,20(r1) ffc09d44: 38 21 00 18 addi r1,r1,24 ffc09d48: 4e 80 00 20 blr <== ALWAYS TAKEN _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; ffc09d4c: 81 1e 00 38 lwz r8,56(r30) ffc09d50: 7f e5 fb 78 mr r5,r31 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc09d54: 81 49 00 08 lwz r10,8(r9) ffc09d58: 39 08 00 01 addi r8,r8,1 new_block->next = next; new_block->prev = block_before; ffc09d5c: 91 3f 00 0c stw r9,12(r31) Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; ffc09d60: 91 5f 00 08 stw r10,8(r31) ffc09d64: 91 1e 00 38 stw r8,56(r30) new_block->prev = block_before; block_before->next = new_block; ffc09d68: 93 e9 00 08 stw r31,8(r9) next->prev = new_block; ffc09d6c: 93 ea 00 0c stw r31,12(r10) ffc09d70: 4b ff ff 7c b ffc09cec <_Heap_Block_allocate+0xd8> <== ALWAYS TAKEN Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); ffc09d74: 7c c8 32 14 add r6,r8,r6 <== ALWAYS TAKEN ffc09d78: 7d 25 4b 78 mr r5,r9 ffc09d7c: 7f c3 f3 78 mr r3,r30 ffc09d80: 7f e4 fb 78 mr r4,r31 ffc09d84: 4b ff fd 7d bl ffc09b00 <_Heap_Block_split> <== ALWAYS TAKEN ffc09d88: 4b ff ff 90 b ffc09d18 <_Heap_Block_allocate+0x104> <== ALWAYS TAKEN ffc09b00 <_Heap_Block_split>: ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; ffc09b00: 81 23 00 14 lwz r9,20(r3) - 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; ffc09b04: 81 64 00 04 lwz r11,4(r4) uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; ffc09b08: 38 09 ff f8 addi r0,r9,-8 uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; ffc09b0c: 81 43 00 10 lwz r10,16(r3) uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; ffc09b10: 7f 86 00 40 cmplw cr7,r6,r0 <== ALWAYS TAKEN ffc09b14: 55 68 00 3c rlwinm r8,r11,0,0,30 ffc09b18: 40 9c 00 08 bge- cr7,ffc09b20 <_Heap_Block_split+0x20> ffc09b1c: 7c 06 03 78 mr r6,r0 ffc09b20: 38 c6 00 08 addi r6,r6,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc09b24: 7c 06 53 96 divwu r0,r6,r10 ffc09b28: 7c 00 51 d6 mullw r0,r0,r10 if ( remainder != 0 ) { ffc09b2c: 7f 86 00 00 cmpw cr7,r6,r0 return value - remainder + alignment; ffc09b30: 7d 40 52 14 add r10,r0,r10 uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc09b34: 40 9e 00 08 bne- cr7,ffc09b3c <_Heap_Block_split+0x3c> ffc09b38: 7c ca 33 78 mr r10,r6 <== ALWAYS TAKEN Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { ffc09b3c: 38 08 00 04 addi r0,r8,4 <== ALWAYS TAKEN ffc09b40: 39 29 00 04 addi r9,r9,4 ffc09b44: 7c c6 00 50 subf r6,r6,r0 ffc09b48: 7f 86 48 40 cmplw cr7,r6,r9 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09b4c: 7d 24 42 14 add r9,r4,r8 ffc09b50: 41 9c 00 78 blt- cr7,ffc09bc8 <_Heap_Block_split+0xc8> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc09b54: 55 6b 07 fe clrlwi r11,r11,31 ffc09b58: 7d 4b 5b 78 or r11,r10,r11 ffc09b5c: 91 64 00 04 stw r11,4(r4) Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; ffc09b60: 7d 0a 40 50 subf r8,r10,r8 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09b64: 7c 8a 22 14 add r4,r10,r4 _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; ffc09b68: 80 03 00 30 lwz r0,48(r3) ffc09b6c: 7c 00 42 14 add r0,r0,r8 ffc09b70: 90 03 00 30 stw r0,48(r3) - 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; ffc09b74: 80 09 00 04 lwz r0,4(r9) <== ALWAYS TAKEN ffc09b78: 54 00 00 3c rlwinm r0,r0,0,0,30 if ( _Heap_Is_used( next_block ) ) { ffc09b7c: 7d 69 02 14 add r11,r9,r0 ffc09b80: 81 6b 00 04 lwz r11,4(r11) ffc09b84: 71 6a 00 01 andi. r10,r11,1 ffc09b88: 40 82 00 50 bne- ffc09bd8 <_Heap_Block_split+0xd8> } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; ffc09b8c: 7d 08 02 14 add r8,r8,r0 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; ffc09b90: 81 49 00 0c lwz r10,12(r9) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; ffc09b94: 61 00 00 01 ori r0,r8,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc09b98: 81 69 00 08 lwz r11,8(r9) ffc09b9c: 90 04 00 04 stw r0,4(r4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09ba0: 7d 28 22 14 add r9,r8,r4 next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc09ba4: 80 09 00 04 lwz r0,4(r9) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc09ba8: 91 64 00 08 stw r11,8(r4) ffc09bac: 54 00 00 3c rlwinm r0,r0,0,0,30 new_block->prev = prev; ffc09bb0: 91 44 00 0c stw r10,12(r4) next->prev = new_block; prev->next = new_block; ffc09bb4: 90 8a 00 08 stw r4,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc09bb8: 90 8b 00 0c stw r4,12(r11) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; ffc09bbc: 91 09 00 00 stw r8,0(r9) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc09bc0: 90 09 00 04 stw r0,4(r9) ffc09bc4: 4e 80 00 20 blr <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc09bc8: 80 09 00 04 lwz r0,4(r9) ffc09bcc: 60 00 00 01 ori r0,r0,1 ffc09bd0: 90 09 00 04 stw r0,4(r9) ffc09bd4: 4e 80 00 20 blr <== ALWAYS TAKEN if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; ffc09bd8: 81 43 00 38 lwz r10,56(r3) <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc09bdc: 81 65 00 08 lwz r11,8(r5) ffc09be0: 38 0a 00 01 addi r0,r10,1 <== ALWAYS TAKEN new_block->next = next; new_block->prev = block_before; ffc09be4: 90 a4 00 0c stw r5,12(r4) ffc09be8: 90 03 00 38 stw r0,56(r3) free_block_size += next_block_size; next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; ffc09bec: 61 00 00 01 ori r0,r8,1 ffc09bf0: 90 04 00 04 stw r0,4(r4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc09bf4: 80 09 00 04 lwz r0,4(r9) Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; ffc09bf8: 91 64 00 08 stw r11,8(r4) ffc09bfc: 54 00 00 3c rlwinm r0,r0,0,0,30 new_block->prev = block_before; block_before->next = new_block; ffc09c00: 90 85 00 08 stw r4,8(r5) next->prev = new_block; ffc09c04: 90 8b 00 0c stw r4,12(r11) <== ALWAYS TAKEN next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; ffc09c08: 91 09 00 00 stw r8,0(r9) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc09c0c: 90 09 00 04 stw r0,4(r9) <== ALWAYS TAKEN ffc09c10: 4e 80 00 20 blr <== ALWAYS TAKEN ffc14054 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { ffc14054: 7c 08 02 a6 mflr r0 ffc14058: 94 21 ff f8 stwu r1,-8(r1) ffc1405c: 7c 69 1b 78 mr r9,r3 ffc14060: 90 01 00 0c stw r0,12(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc14064: 80 03 00 18 lwz r0,24(r3) uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; ffc14068: 81 43 00 24 lwz r10,36(r3) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc1406c: 7f 84 00 40 cmplw cr7,r4,r0 uintptr_t const heap_area_end = heap->area_end; ffc14070: 80 03 00 1c lwz r0,28(r3) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc14074: 40 9c 00 bc bge- cr7,ffc14130 <_Heap_Extend+0xdc> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { ffc14078: 7f 84 00 00 cmpw cr7,r4,r0 ffc1407c: 38 60 00 02 li r3,2 ffc14080: 41 9e 00 14 beq- cr7,ffc14094 <_Heap_Extend+0x40> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } ffc14084: 80 01 00 0c lwz r0,12(r1) ffc14088: 38 21 00 08 addi r1,r1,8 ffc1408c: 7c 08 03 a6 mtlr r0 ffc14090: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc14094: 81 69 00 10 lwz r11,16(r9) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; ffc14098: 7c 84 2a 14 add r4,r4,r5 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end ffc1409c: 20 0a ff f8 subfic r0,r10,-8 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; ffc140a0: 90 89 00 1c stw r4,28(r9) extend_size = new_heap_area_end ffc140a4: 7c 00 22 14 add r0,r0,r4 ffc140a8: 7c 00 5b 96 divwu r0,r0,r11 ffc140ac: 7c 00 59 d6 mullw r0,r0,r11 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; if( extend_size >= heap->min_block_size ) { ffc140b0: 38 60 00 00 li r3,0 extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; ffc140b4: 90 06 00 00 stw r0,0(r6) if( extend_size >= heap->min_block_size ) { ffc140b8: 81 69 00 14 lwz r11,20(r9) ffc140bc: 7f 8b 00 40 cmplw cr7,r11,r0 ffc140c0: 41 9d ff c4 bgt+ cr7,ffc14084 <_Heap_Extend+0x30> <== NEVER TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc140c4: 80 ea 00 04 lwz r7,4(r10) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc140c8: 7d 60 52 14 add r11,r0,r10 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc140cc: 81 09 00 20 lwz r8,32(r9) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc140d0: 38 8a 00 08 addi r4,r10,8 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc140d4: 54 e7 07 fe clrlwi r7,r7,31 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; ffc140d8: 91 69 00 24 stw r11,36(r9) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc140dc: 7d 0b 40 50 subf r8,r11,r8 ffc140e0: 7c 07 3b 78 or r7,r0,r7 ffc140e4: 61 08 00 01 ori r8,r8,1 ffc140e8: 90 ea 00 04 stw r7,4(r10) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc140ec: 7d 23 4b 78 mr r3,r9 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc140f0: 91 0b 00 04 stw r8,4(r11) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc140f4: 80 e9 00 2c lwz r7,44(r9) ++stats->used_blocks; ffc140f8: 81 09 00 40 lwz r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc140fc: 81 49 00 50 lwz r10,80(r9) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc14100: 7c 07 02 14 add r0,r7,r0 ++stats->used_blocks; ffc14104: 39 08 00 01 addi r8,r8,1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc14108: 90 09 00 2c stw r0,44(r9) ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ ffc1410c: 39 4a ff ff addi r10,r10,-1 heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; ffc14110: 91 09 00 40 stw r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc14114: 91 49 00 50 stw r10,80(r9) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc14118: 4b ff 9b 89 bl ffc0dca0 <_Heap_Free> <== ALWAYS TAKEN } return HEAP_EXTEND_SUCCESSFUL; } ffc1411c: 80 01 00 0c lwz r0,12(r1) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc14120: 38 60 00 00 li r3,0 } return HEAP_EXTEND_SUCCESSFUL; } ffc14124: 7c 08 03 a6 mtlr r0 ffc14128: 38 21 00 08 addi r1,r1,8 ffc1412c: 4e 80 00 20 blr <== ALWAYS TAKEN * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { ffc14130: 7f 84 00 40 cmplw cr7,r4,r0 ffc14134: 38 60 00 01 li r3,1 ffc14138: 40 9c ff 40 bge+ cr7,ffc14078 <_Heap_Extend+0x24> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } ffc1413c: 80 01 00 0c lwz r0,12(r1) ffc14140: 38 21 00 08 addi r1,r1,8 ffc14144: 7c 08 03 a6 mtlr r0 ffc14148: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f0ac <_Heap_Free>: 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 ) ffc0f0ac: 80 03 00 10 lwz r0,16(r3) #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0f0b0: 7c 69 1b 78 mr r9,r3 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; ffc0f0b4: 81 63 00 20 lwz r11,32(r3) 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 ) ffc0f0b8: 7d 44 03 96 divwu r10,r4,r0 ffc0f0bc: 7d 4a 01 d6 mullw r10,r10,r0 ffc0f0c0: 39 4a ff f8 addi r10,r10,-8 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 ffc0f0c4: 7f 8a 58 40 cmplw cr7,r10,r11 ffc0f0c8: 41 9c 00 c0 blt- cr7,ffc0f188 <_Heap_Free+0xdc> && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0f0cc: 80 03 00 24 lwz r0,36(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 ffc0f0d0: 7f 8a 00 40 cmplw cr7,r10,r0 ffc0f0d4: 41 9d 00 b4 bgt- cr7,ffc0f188 <_Heap_Free+0xdc> - 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; ffc0f0d8: 80 ca 00 04 lwz r6,4(r10) ffc0f0dc: 54 c7 00 3c rlwinm r7,r6,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); ffc0f0e0: 7d 0a 3a 14 add r8,r10,r7 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 ffc0f0e4: 7f 8b 40 40 cmplw cr7,r11,r8 ffc0f0e8: 41 9d 00 a0 bgt- cr7,ffc0f188 <_Heap_Free+0xdc> <== NEVER TAKEN ffc0f0ec: 7f 80 40 40 cmplw cr7,r0,r8 ffc0f0f0: 41 9c 00 98 blt- cr7,ffc0f188 <_Heap_Free+0xdc> <== 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; ffc0f0f4: 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 ) ) { ffc0f0f8: 70 a3 00 01 andi. r3,r5,1 ffc0f0fc: 41 82 00 8c beq- ffc0f188 <_Heap_Free+0xdc> <== NEVER TAKEN _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0f100: 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; ffc0f104: 54 a4 00 3c rlwinm r4,r5,0,0,30 <== ALWAYS TAKEN ffc0f108: 38 a0 00 00 li r5,0 ffc0f10c: 41 9e 00 14 beq- cr7,ffc0f120 <_Heap_Free+0x74> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc0f110: 7c a8 22 14 add r5,r8,r4 ffc0f114: 80 a5 00 04 lwz r5,4(r5) ffc0f118: 54 a5 07 fe clrlwi r5,r5,31 ffc0f11c: 68 a5 00 01 xori r5,r5,1 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 ) ) { ffc0f120: 70 c3 00 01 andi. r3,r6,1 <== ALWAYS TAKEN ffc0f124: 40 82 00 6c bne- ffc0f190 <_Heap_Free+0xe4> uintptr_t const prev_size = block->prev_size; ffc0f128: 80 6a 00 00 lwz r3,0(r10) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0f12c: 7c c3 50 50 subf r6,r3,r10 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 ffc0f130: 7f 8b 30 40 cmplw cr7,r11,r6 ffc0f134: 41 9d 00 54 bgt- cr7,ffc0f188 <_Heap_Free+0xdc> <== NEVER TAKEN ffc0f138: 7f 80 30 40 cmplw cr7,r0,r6 <== ALWAYS TAKEN ffc0f13c: 41 9c 00 4c blt- cr7,ffc0f188 <_Heap_Free+0xdc> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc0f140: 80 06 00 04 lwz r0,4(r6) ffc0f144: 70 0b 00 01 andi. r11,r0,1 <== ALWAYS TAKEN ffc0f148: 41 82 00 40 beq- ffc0f188 <_Heap_Free+0xdc> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc0f14c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f150: 41 9e 00 e8 beq- cr7,ffc0f238 <_Heap_Free+0x18c> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0f154: 81 89 00 38 lwz r12,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc0f158: 7c 87 22 14 add r4,r7,r4 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; ffc0f15c: 81 68 00 0c lwz r11,12(r8) ffc0f160: 7c 64 1a 14 add r3,r4,r3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc0f164: 81 48 00 08 lwz r10,8(r8) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0f168: 60 60 00 01 ori r0,r3,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; ffc0f16c: 39 0c ff ff addi r8,r12,-1 ffc0f170: 91 09 00 38 stw r8,56(r9) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc0f174: 91 6a 00 0c stw r11,12(r10) 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; ffc0f178: 7c 66 19 2e stwx r3,r6,r3 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; ffc0f17c: 90 06 00 04 stw r0,4(r6) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc0f180: 91 4b 00 08 stw r10,8(r11) ffc0f184: 48 00 00 3c b ffc0f1c0 <_Heap_Free+0x114> <== ALWAYS TAKEN /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); ffc0f188: 38 60 00 00 li r3,0 } ffc0f18c: 4e 80 00 20 blr <== ALWAYS TAKEN 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 */ ffc0f190: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f194: 41 9e 00 58 beq- cr7,ffc0f1ec <_Heap_Free+0x140> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; ffc0f198: 80 c8 00 0c lwz r6,12(r8) uintptr_t const size = block_size + next_block_size; ffc0f19c: 7c 84 3a 14 add r4,r4,r7 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc0f1a0: 81 68 00 08 lwz r11,8(r8) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0f1a4: 60 80 00 01 ori r0,r4,1 <== ALWAYS TAKEN Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; ffc0f1a8: 90 ca 00 0c stw r6,12(r10) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc0f1ac: 91 6a 00 08 stw r11,8(r10) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc0f1b0: 7c 8a 21 2e stwx r4,r10,r4 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; ffc0f1b4: 90 0a 00 04 stw r0,4(r10) new_block->prev = prev; next->prev = new_block; prev->next = new_block; ffc0f1b8: 91 46 00 08 stw r10,8(r6) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc0f1bc: 91 4b 00 0c stw r10,12(r11) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; ffc0f1c0: 80 09 00 30 lwz r0,48(r9) ffc0f1c4: 38 60 00 01 li r3,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0f1c8: 81 69 00 40 lwz r11,64(r9) ++stats->frees; ffc0f1cc: 81 49 00 50 lwz r10,80(r9) stats->free_size += block_size; ffc0f1d0: 7c e0 3a 14 add r7,r0,r7 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0f1d4: 39 6b ff ff addi r11,r11,-1 ++stats->frees; stats->free_size += block_size; ffc0f1d8: 90 e9 00 30 stw r7,48(r9) } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc0f1dc: 38 0a 00 01 addi r0,r10,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0f1e0: 91 69 00 40 stw r11,64(r9) ++stats->frees; ffc0f1e4: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; return( true ); ffc0f1e8: 4e 80 00 20 blr <== ALWAYS TAKEN 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; ffc0f1ec: 60 e0 00 01 ori r0,r7,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; ffc0f1f0: 7c ea 39 2e stwx r7,r10,r7 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; ffc0f1f4: 90 0a 00 04 stw r0,4(r10) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0f1f8: 80 08 00 04 lwz r0,4(r8) ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc0f1fc: 91 2a 00 0c stw r9,12(r10) ffc0f200: 54 00 00 3c rlwinm r0,r0,0,0,30 <== ALWAYS TAKEN ffc0f204: 90 08 00 04 stw r0,4(r8) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0f208: 81 09 00 38 lwz r8,56(r9) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0f20c: 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; ffc0f210: 38 08 00 01 addi r0,r8,1 #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0f214: 7f 80 58 40 cmplw cr7,r0,r11 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0f218: 81 69 00 08 lwz r11,8(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; ffc0f21c: 90 09 00 38 stw r0,56(r9) new_block->next = next; ffc0f220: 91 6a 00 08 stw r11,8(r10) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc0f224: 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; ffc0f228: 91 49 00 08 stw r10,8(r9) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0f22c: 40 bd ff 94 ble- cr7,ffc0f1c0 <_Heap_Free+0x114> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; ffc0f230: 90 09 00 3c stw r0,60(r9) ffc0f234: 4b ff ff 8c b ffc0f1c0 <_Heap_Free+0x114> <== ALWAYS TAKEN 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; ffc0f238: 7c 67 1a 14 add r3,r7,r3 <== ALWAYS TAKEN prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0f23c: 60 60 00 01 ori r0,r3,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc0f240: 7c 6a 39 2e stwx r3,r10,r7 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; ffc0f244: 90 06 00 04 stw r0,4(r6) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0f248: 80 08 00 04 lwz r0,4(r8) ffc0f24c: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0f250: 90 08 00 04 stw r0,4(r8) <== ALWAYS TAKEN ffc0f254: 4b ff ff 6c b ffc0f1c0 <_Heap_Free+0x114> <== ALWAYS TAKEN ffc33140 <_Heap_Get_free_information>: return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc33140: 81 23 00 08 lwz r9,8(r3) ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; ffc33144: 38 00 00 00 li r0,0 info->largest = 0; info->total = 0; ffc33148: 90 04 00 08 stw r0,8(r4) for(the_block = _Heap_Free_list_first(the_heap); ffc3314c: 7f 83 48 00 cmpw cr7,r3,r9 ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; ffc33150: 90 04 00 00 stw r0,0(r4) info->largest = 0; ffc33154: 90 04 00 04 stw r0,4(r4) info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc33158: 4d 9e 00 20 beqlr cr7 <== NEVER TAKEN ffc3315c: 39 00 00 00 li r8,0 ffc33160: 39 60 00 01 li r11,1 ffc33164: 39 40 00 00 li r10,0 - 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; ffc33168: 80 09 00 04 lwz r0,4(r9) the_block != tail; the_block = the_block->next) ffc3316c: 7d 67 5b 78 mr r7,r11 ffc33170: 39 6b 00 01 addi r11,r11,1 ffc33174: 54 00 00 3c rlwinm r0,r0,0,0,30 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; ffc33178: 7f 88 00 40 cmplw cr7,r8,r0 ffc3317c: 7d 4a 02 14 add r10,r10,r0 ffc33180: 40 9c 00 08 bge- cr7,ffc33188 <_Heap_Get_free_information+0x48> ffc33184: 7c 08 03 78 mr r8,r0 info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) ffc33188: 81 29 00 08 lwz r9,8(r9) info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc3318c: 7f 83 48 00 cmpw cr7,r3,r9 ffc33190: 40 9e ff d8 bne+ cr7,ffc33168 <_Heap_Get_free_information+0x28> ffc33194: 91 04 00 04 stw r8,4(r4) ffc33198: 90 e4 00 00 stw r7,0(r4) ffc3319c: 91 44 00 08 stw r10,8(r4) ffc331a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc46ef4 <_Heap_Get_information>: Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; ffc46ef4: 80 03 00 24 lwz r0,36(r3) _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; ffc46ef8: 39 60 00 00 li r11,0 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; ffc46efc: 81 23 00 20 lwz r9,32(r3) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc46f00: 39 40 00 08 li r10,8 the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; ffc46f04: 91 64 00 10 stw r11,16(r4) while ( the_block != end ) { ffc46f08: 7f 89 00 00 cmpw cr7,r9,r0 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; ffc46f0c: 91 64 00 00 stw r11,0(r4) the_info->Free.total = 0; ffc46f10: 91 64 00 08 stw r11,8(r4) the_info->Free.largest = 0; ffc46f14: 91 64 00 04 stw r11,4(r4) the_info->Used.number = 0; ffc46f18: 91 64 00 0c stw r11,12(r4) the_info->Used.total = 0; ffc46f1c: 91 64 00 14 stw r11,20(r4) the_info->Used.largest = 0; while ( the_block != end ) { ffc46f20: 41 9e 00 60 beq- cr7,ffc46f80 <_Heap_Get_information+0x8c> <== NEVER TAKEN ffc46f24: 81 09 00 04 lwz r8,4(r9) uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; ffc46f28: 38 a4 00 0c addi r5,r4,12 - 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; ffc46f2c: 55 0a 00 3c rlwinm r10,r8,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); ffc46f30: 7d 29 52 14 add r9,r9,r10 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; ffc46f34: 81 09 00 04 lwz r8,4(r9) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc46f38: 7f 80 48 00 cmpw cr7,r0,r9 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) ffc46f3c: 71 0b 00 01 andi. r11,r8,1 ffc46f40: 7c ab 2b 78 mr r11,r5 ffc46f44: 40 82 00 08 bne- ffc46f4c <_Heap_Get_information+0x58> ffc46f48: 7c 8b 23 78 mr r11,r4 else info = &the_info->Free; info->number++; info->total += the_size; if ( info->largest < the_size ) ffc46f4c: 80 eb 00 04 lwz r7,4(r11) if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc46f50: 80 cb 00 00 lwz r6,0(r11) info->total += the_size; if ( info->largest < the_size ) ffc46f54: 7f 07 50 40 cmplw cr6,r7,r10 info = &the_info->Used; else info = &the_info->Free; info->number++; info->total += the_size; ffc46f58: 80 eb 00 08 lwz r7,8(r11) if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc46f5c: 38 c6 00 01 addi r6,r6,1 info->total += the_size; ffc46f60: 7c e7 52 14 add r7,r7,r10 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc46f64: 90 cb 00 00 stw r6,0(r11) info->total += the_size; ffc46f68: 90 eb 00 08 stw r7,8(r11) if ( info->largest < the_size ) ffc46f6c: 40 98 00 08 bge- cr6,ffc46f74 <_Heap_Get_information+0x80> info->largest = the_size; ffc46f70: 91 4b 00 04 stw r10,4(r11) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc46f74: 40 9e ff b8 bne+ cr7,ffc46f2c <_Heap_Get_information+0x38> ffc46f78: 81 44 00 14 lwz r10,20(r4) ffc46f7c: 39 4a 00 08 addi r10,r10,8 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; ffc46f80: 91 44 00 14 stw r10,20(r4) } ffc46f84: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0998c <_Heap_Initialize>: uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { ffc0998c: 2c 06 00 00 cmpwi r6,0 Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { ffc09990: 94 21 ff e8 stwu r1,-24(r1) ffc09994: 7c 69 1b 78 mr r9,r3 ffc09998: 93 81 00 08 stw r28,8(r1) ffc0999c: 93 a1 00 0c stw r29,12(r1) ffc099a0: 93 c1 00 10 stw r30,16(r1) ffc099a4: 93 e1 00 14 stw r31,20(r1) uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { ffc099a8: 40 82 01 00 bne- ffc09aa8 <_Heap_Initialize+0x11c> ffc099ac: 38 c0 00 08 li r6,8 ffc099b0: 39 40 00 10 li r10,16 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; ffc099b4: 39 64 00 08 addi r11,r4,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc099b8: 7c 0b 33 96 divwu r0,r11,r6 ffc099bc: 7c 00 31 d6 mullw r0,r0,r6 if ( remainder != 0 ) { ffc099c0: 7c 00 58 51 subf. r0,r0,r11 <== ALWAYS TAKEN ffc099c4: 41 82 00 0c beq- ffc099d0 <_Heap_Initialize+0x44> return value - remainder + alignment; ffc099c8: 7d 66 5a 14 add r11,r6,r11 ffc099cc: 7d 60 58 50 subf r11,r0,r11 uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; ffc099d0: 7c 04 2a 14 add r0,r4,r5 overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc099d4: 7f 84 00 40 cmplw cr7,r4,r0 ffc099d8: 41 9d 00 e8 bgt- cr7,ffc09ac0 <_Heap_Initialize+0x134> } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); ffc099dc: 7d 04 58 50 subf r8,r4,r11 first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc099e0: 7f 85 40 40 cmplw cr7,r5,r8 } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); ffc099e4: 39 6b ff f8 addi r11,r11,-8 first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc099e8: 40 9d 00 d8 ble- cr7,ffc09ac0 <_Heap_Initialize+0x134> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; ffc099ec: 7c a8 28 50 subf r5,r8,r5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc099f0: 7c a5 33 96 divwu r5,r5,r6 <== ALWAYS TAKEN ffc099f4: 7c a5 31 d6 mullw r5,r5,r6 <== ALWAYS TAKEN first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc099f8: 7f 8a 28 40 cmplw cr7,r10,r5 ffc099fc: 41 9d 00 c4 bgt- cr7,ffc09ac0 <_Heap_Initialize+0x134> stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc09a00: 3d 80 00 00 lis r12,0 /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; first_block->next = _Heap_Free_list_tail( heap ); ffc09a04: 91 2b 00 08 stw r9,8(r11) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09a08: 7c e5 5a 14 add r7,r5,r11 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc09a0c: 83 cc 28 f0 lwz r30,10480(r12) stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; ffc09a10: 39 00 00 00 li r8,0 /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; ffc09a14: 3b e0 00 01 li r31,1 <== ALWAYS TAKEN return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; ffc09a18: 90 cb 00 00 stw r6,0(r11) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc09a1c: 3b be 00 01 addi r29,r30,1 } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; ffc09a20: 60 a3 00 01 ori r3,r5,1 * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; ffc09a24: 7c a5 59 2e stwx r5,r5,r11 last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; ffc09a28: 7f 87 58 50 subf r28,r7,r11 } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; ffc09a2c: 90 6b 00 04 stw r3,4(r11) alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; ffc09a30: 38 65 ff f8 addi r3,r5,-8 <== ALWAYS TAKEN * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; ffc09a34: 93 87 00 04 stw r28,4(r7) /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; first_block->next = _Heap_Free_list_tail( heap ); first_block->prev = _Heap_Free_list_head( heap ); ffc09a38: 91 2b 00 0c stw r9,12(r11) <== ALWAYS TAKEN /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; stats->max_free_blocks = 1; ffc09a3c: 93 e9 00 3c stw r31,60(r9) <== ALWAYS TAKEN stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc09a40: 93 c9 00 28 stw r30,40(r9) /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; ffc09a44: 93 e9 00 38 stw r31,56(r9) last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; ffc09a48: 90 c9 00 10 stw r6,16(r9) heap->min_block_size = min_block_size; ffc09a4c: 91 49 00 14 stw r10,20(r9) <== ALWAYS TAKEN heap->area_begin = heap_area_begin; ffc09a50: 90 89 00 18 stw r4,24(r9) <== ALWAYS TAKEN heap->area_end = heap_area_end; ffc09a54: 90 09 00 1c stw r0,28(r9) _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; ffc09a58: 90 a9 00 34 stw r5,52(r9) stats->used_blocks = 0; stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; ffc09a5c: 91 09 00 54 stw r8,84(r9) <== ALWAYS TAKEN heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; ffc09a60: 90 a9 00 2c stw r5,44(r9) stats->free_size = first_block_size; ffc09a64: 90 a9 00 30 stw r5,48(r9) stats->min_free_size = first_block_size; stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; ffc09a68: 91 09 00 40 stw r8,64(r9) stats->max_search = 0; ffc09a6c: 91 09 00 44 stw r8,68(r9) stats->allocs = 0; ffc09a70: 91 09 00 48 stw r8,72(r9) stats->searches = 0; ffc09a74: 91 09 00 4c stw r8,76(r9) stats->frees = 0; ffc09a78: 91 09 00 50 stw r8,80(r9) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } ffc09a7c: 83 81 00 08 lwz r28,8(r1) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc09a80: 93 ac 28 f0 stw r29,10480(r12) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } ffc09a84: 83 c1 00 10 lwz r30,16(r1) ffc09a88: 83 a1 00 0c lwz r29,12(r1) ffc09a8c: 83 e1 00 14 lwz r31,20(r1) ffc09a90: 38 21 00 18 addi r1,r1,24 heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; ffc09a94: 90 e9 00 24 stw r7,36(r9) <== ALWAYS TAKEN _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; ffc09a98: 91 69 00 0c stw r11,12(r9) <== ALWAYS TAKEN /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; ffc09a9c: 91 69 00 20 stw r11,32(r9) <== ALWAYS TAKEN heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; ffc09aa0: 91 69 00 08 stw r11,8(r9) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } ffc09aa4: 4e 80 00 20 blr <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc09aa8: 70 c0 00 07 andi. r0,r6,7 <== ALWAYS TAKEN ffc09aac: 41 82 00 0c beq- ffc09ab8 <_Heap_Initialize+0x12c> return value - remainder + alignment; ffc09ab0: 38 c6 00 08 addi r6,r6,8 ffc09ab4: 7c c0 30 50 subf r6,r0,r6 if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { ffc09ab8: 2b 86 00 07 cmplwi cr7,r6,7 ffc09abc: 41 bd 00 20 bgt+ cr7,ffc09adc <_Heap_Initialize+0x150> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; ffc09ac0: 38 60 00 00 li r3,0 } ffc09ac4: 83 81 00 08 lwz r28,8(r1) ffc09ac8: 83 a1 00 0c lwz r29,12(r1) ffc09acc: 83 c1 00 10 lwz r30,16(r1) ffc09ad0: 83 e1 00 14 lwz r31,20(r1) ffc09ad4: 38 21 00 18 addi r1,r1,24 ffc09ad8: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc09adc: 39 40 00 10 li r10,16 ffc09ae0: 7d 4a 33 96 divwu r10,r10,r6 ffc09ae4: 7d 4a 31 d6 mullw r10,r10,r6 if ( remainder != 0 ) { return value - remainder + alignment; ffc09ae8: 20 0a 00 10 subfic r0,r10,16 uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc09aec: 2f 80 00 00 cmpwi cr7,r0,0 return value - remainder + alignment; ffc09af0: 7d 46 52 14 add r10,r6,r10 uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc09af4: 40 9e fe c0 bne+ cr7,ffc099b4 <_Heap_Initialize+0x28> ffc09af8: 39 40 00 10 li r10,16 ffc09afc: 4b ff fe b8 b ffc099b4 <_Heap_Initialize+0x28> <== ALWAYS TAKEN ffc1ccec <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { ffc1ccec: 94 21 ff e8 stwu r1,-24(r1) ffc1ccf0: 7c 08 02 a6 mflr r0 ffc1ccf4: 90 01 00 1c stw r0,28(r1) 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 ) ffc1ccf8: 80 03 00 10 lwz r0,16(r3) ffc1ccfc: 93 c1 00 10 stw r30,16(r1) ffc1cd00: 7c 9e 23 78 mr r30,r4 ffc1cd04: 7c 84 03 96 divwu r4,r4,r0 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 ffc1cd08: 81 23 00 20 lwz r9,32(r3) ffc1cd0c: 93 e1 00 14 stw r31,20(r1) 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 ) ffc1cd10: 7c 84 01 d6 mullw r4,r4,r0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; ffc1cd14: 38 00 00 00 li r0,0 ffc1cd18: 38 84 ff f8 addi r4,r4,-8 ffc1cd1c: 90 06 00 00 stw r0,0(r6) 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 ffc1cd20: 7f 89 20 40 cmplw cr7,r9,r4 void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { ffc1cd24: 7c 7f 1b 78 mr r31,r3 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; *new_size = 0; ffc1cd28: 90 07 00 00 stw r0,0(r7) ffc1cd2c: 40 9d 00 20 ble- cr7,ffc1cd4c <_Heap_Resize_block+0x60> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; ffc1cd30: 38 60 00 02 li r3,2 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } ffc1cd34: 80 01 00 1c lwz r0,28(r1) ffc1cd38: 83 c1 00 10 lwz r30,16(r1) ffc1cd3c: 7c 08 03 a6 mtlr r0 ffc1cd40: 83 e1 00 14 lwz r31,20(r1) ffc1cd44: 38 21 00 18 addi r1,r1,24 ffc1cd48: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1cd4c: 80 03 00 24 lwz r0,36(r3) ffc1cd50: 7f 80 20 40 cmplw cr7,r0,r4 ffc1cd54: 41 bc ff dc blt- cr7,ffc1cd30 <_Heap_Resize_block+0x44> - 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; ffc1cd58: 81 24 00 04 lwz r9,4(r4) uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1cd5c: 20 1e 00 04 subfic r0,r30,4 ffc1cd60: 55 29 00 3c rlwinm r9,r9,0,0,30 { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; ffc1cd64: 7d 64 4a 14 add r11,r4,r9 ffc1cd68: 81 4b 00 04 lwz r10,4(r11) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1cd6c: 7c 00 5a 14 add r0,r0,r11 ffc1cd70: 55 4a 00 3c rlwinm r10,r10,0,0,30 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); ffc1cd74: 7d 0b 52 14 add r8,r11,r10 ffc1cd78: 81 08 00 04 lwz r8,4(r8) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; ffc1cd7c: 90 06 00 00 stw r0,0(r6) <== ALWAYS TAKEN ffc1cd80: 7d 08 40 f8 not r8,r8 if ( next_block_is_free ) { ffc1cd84: 71 06 00 01 andi. r6,r8,1 ffc1cd88: 40 82 00 b8 bne- ffc1ce40 <_Heap_Resize_block+0x154> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { ffc1cd8c: 7f 85 00 40 cmplw cr7,r5,r0 ffc1cd90: 38 60 00 01 li r3,1 ffc1cd94: 41 bd ff a0 bgt- cr7,ffc1cd34 <_Heap_Resize_block+0x48> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { ffc1cd98: 41 82 00 4c beq- ffc1cde4 <_Heap_Resize_block+0xf8> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc1cd9c: 80 04 00 04 lwz r0,4(r4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1cda0: 7d 09 22 14 add r8,r9,r4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc1cda4: 54 00 07 fe clrlwi r0,r0,31 ffc1cda8: 7d 29 03 78 or r9,r9,r0 ffc1cdac: 91 24 00 04 stw r9,4(r4) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc1cdb0: 80 08 00 04 lwz r0,4(r8) } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; ffc1cdb4: 81 2b 00 0c lwz r9,12(r11) ffc1cdb8: 60 00 00 01 ori r0,r0,1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc1cdbc: 81 6b 00 08 lwz r11,8(r11) ffc1cdc0: 90 08 00 04 stw r0,4(r8) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; ffc1cdc4: 80 1f 00 30 lwz r0,48(r31) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; ffc1cdc8: 81 1f 00 38 lwz r8,56(r31) stats->free_size -= next_block_size; ffc1cdcc: 7d 4a 00 50 subf r10,r10,r0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc1cdd0: 91 2b 00 0c stw r9,12(r11) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; ffc1cdd4: 38 08 ff ff addi r0,r8,-1 ffc1cdd8: 90 1f 00 38 stw r0,56(r31) stats->free_size -= next_block_size; ffc1cddc: 91 5f 00 30 stw r10,48(r31) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc1cde0: 91 69 00 08 stw r11,8(r9) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); ffc1cde4: 7c a6 2b 78 mr r6,r5 ffc1cde8: 90 e1 00 08 stw r7,8(r1) ffc1cdec: 7f e3 fb 78 mr r3,r31 ffc1cdf0: 7f c5 f3 78 mr r5,r30 ffc1cdf4: 4b fe ce 21 bl ffc09c14 <_Heap_Block_allocate> <== ALWAYS TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1cdf8: 80 e1 00 08 lwz r7,8(r1) ffc1cdfc: 81 63 00 04 lwz r11,4(r3) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); ffc1ce00: 7c 69 1b 78 mr r9,r3 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; ffc1ce04: 38 60 00 00 li r3,0 block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1ce08: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc1ce0c: 38 0b 00 04 addi r0,r11,4 ffc1ce10: 7f de 00 50 subf r30,r30,r0 ffc1ce14: 7d 29 f2 14 add r9,r9,r30 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } ffc1ce18: 83 c1 00 10 lwz r30,16(r1) block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1ce1c: 91 27 00 00 stw r9,0(r7) /* Statistics */ ++stats->resizes; ffc1ce20: 81 3f 00 54 lwz r9,84(r31) ffc1ce24: 38 09 00 01 addi r0,r9,1 ffc1ce28: 90 1f 00 54 stw r0,84(r31) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } ffc1ce2c: 80 01 00 1c lwz r0,28(r1) ffc1ce30: 83 e1 00 14 lwz r31,20(r1) ffc1ce34: 38 21 00 18 addi r1,r1,24 ffc1ce38: 7c 08 03 a6 mtlr r0 ffc1ce3c: 4e 80 00 20 blr <== ALWAYS TAKEN _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; ffc1ce40: 7d 29 52 14 add r9,r9,r10 alloc_size += next_block_size; ffc1ce44: 7c 00 52 14 add r0,r0,r10 ffc1ce48: 4b ff ff 44 b ffc1cd8c <_Heap_Resize_block+0xa0> <== ALWAYS TAKEN ffc1ce4c <_Heap_Size_of_alloc_area>: 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 ) ffc1ce4c: 80 03 00 10 lwz r0,16(r3) 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; ffc1ce50: 81 23 00 20 lwz r9,32(r3) 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 ) ffc1ce54: 7d 64 03 96 divwu r11,r4,r0 ffc1ce58: 7d 6b 01 d6 mullw r11,r11,r0 ffc1ce5c: 39 6b ff f8 addi r11,r11,-8 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 ffc1ce60: 7f 8b 48 40 cmplw cr7,r11,r9 ffc1ce64: 41 9c 00 4c blt- cr7,ffc1ceb0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1ce68: 81 43 00 24 lwz r10,36(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 ffc1ce6c: 7f 8b 50 40 cmplw cr7,r11,r10 ffc1ce70: 41 9d 00 40 bgt- cr7,ffc1ceb0 <_Heap_Size_of_alloc_area+0x64> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1ce74: 80 0b 00 04 lwz r0,4(r11) ffc1ce78: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc1ce7c: 7d 6b 02 14 add r11,r11,r0 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 ffc1ce80: 7f 89 58 40 cmplw cr7,r9,r11 ffc1ce84: 41 9d 00 2c bgt- cr7,ffc1ceb0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN ffc1ce88: 7f 8a 58 40 cmplw cr7,r10,r11 ffc1ce8c: 41 9c 00 24 blt- cr7,ffc1ceb0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc1ce90: 80 0b 00 04 lwz r0,4(r11) ffc1ce94: 70 09 00 01 andi. r9,r0,1 ffc1ce98: 41 82 00 18 beq- ffc1ceb0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; ffc1ce9c: 20 84 00 04 subfic r4,r4,4 ffc1cea0: 7d 64 5a 14 add r11,r4,r11 ffc1cea4: 91 65 00 00 stw r11,0(r5) ffc1cea8: 38 60 00 01 li r3,1 return true; ffc1ceac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1ceb0: 38 60 00 00 li r3,0 } ffc1ceb4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a9f0 <_Heap_Walk>: uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0a9f0: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0a9f4: 94 21 ff 98 stwu r1,-104(r1) ffc0a9f8: 7c 08 02 a6 mflr r0 ffc0a9fc: 93 21 00 4c stw r25,76(r1) ffc0aa00: 90 01 00 6c stw r0,108(r1) ffc0aa04: 93 41 00 50 stw r26,80(r1) ffc0aa08: 93 61 00 54 stw r27,84(r1) ffc0aa0c: 93 81 00 58 stw r28,88(r1) ffc0aa10: 7c 9c 23 78 mr r28,r4 ffc0aa14: 93 c1 00 60 stw r30,96(r1) ffc0aa18: 93 e1 00 64 stw r31,100(r1) ffc0aa1c: 7c 7f 1b 78 mr r31,r3 ffc0aa20: 91 c1 00 20 stw r14,32(r1) ffc0aa24: 91 e1 00 24 stw r15,36(r1) ffc0aa28: 92 01 00 28 stw r16,40(r1) ffc0aa2c: 92 21 00 2c stw r17,44(r1) ffc0aa30: 92 41 00 30 stw r18,48(r1) ffc0aa34: 92 61 00 34 stw r19,52(r1) ffc0aa38: 92 81 00 38 stw r20,56(r1) ffc0aa3c: 92 a1 00 3c stw r21,60(r1) ffc0aa40: 92 c1 00 40 stw r22,64(r1) ffc0aa44: 92 e1 00 44 stw r23,68(r1) ffc0aa48: 93 01 00 48 stw r24,72(r1) ffc0aa4c: 93 a1 00 5c stw r29,92(r1) uintptr_t const page_size = heap->page_size; ffc0aa50: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0aa54: 83 43 00 14 lwz r26,20(r3) Heap_Block *const last_block = heap->last_block; ffc0aa58: 83 23 00 24 lwz r25,36(r3) Heap_Block *block = heap->first_block; ffc0aa5c: 83 c3 00 20 lwz r30,32(r3) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0aa60: 40 9e 00 7c bne- cr7,ffc0aadc <_Heap_Walk+0xec> ffc0aa64: 3d 20 ff c1 lis r9,-63 ffc0aa68: 39 29 a9 ec addi r9,r9,-22036 ffc0aa6c: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0aa70: 3d 20 00 00 lis r9,0 ffc0aa74: 80 09 27 90 lwz r0,10128(r9) ffc0aa78: 2f 80 00 03 cmpwi cr7,r0,3 ffc0aa7c: 41 9e 00 7c beq- cr7,ffc0aaf8 <_Heap_Walk+0x108> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0aa80: 38 60 00 01 li r3,1 block = next_block; } return true; } ffc0aa84: 80 01 00 6c lwz r0,108(r1) ffc0aa88: 81 c1 00 20 lwz r14,32(r1) ffc0aa8c: 7c 08 03 a6 mtlr r0 ffc0aa90: 81 e1 00 24 lwz r15,36(r1) ffc0aa94: 82 01 00 28 lwz r16,40(r1) ffc0aa98: 82 21 00 2c lwz r17,44(r1) ffc0aa9c: 82 41 00 30 lwz r18,48(r1) ffc0aaa0: 82 61 00 34 lwz r19,52(r1) ffc0aaa4: 82 81 00 38 lwz r20,56(r1) ffc0aaa8: 82 a1 00 3c lwz r21,60(r1) ffc0aaac: 82 c1 00 40 lwz r22,64(r1) ffc0aab0: 82 e1 00 44 lwz r23,68(r1) ffc0aab4: 83 01 00 48 lwz r24,72(r1) ffc0aab8: 83 21 00 4c lwz r25,76(r1) ffc0aabc: 83 41 00 50 lwz r26,80(r1) ffc0aac0: 83 61 00 54 lwz r27,84(r1) ffc0aac4: 83 81 00 58 lwz r28,88(r1) ffc0aac8: 83 a1 00 5c lwz r29,92(r1) ffc0aacc: 83 c1 00 60 lwz r30,96(r1) ffc0aad0: 83 e1 00 64 lwz r31,100(r1) ffc0aad4: 38 21 00 68 addi r1,r1,104 ffc0aad8: 4e 80 00 20 blr <== ALWAYS TAKEN uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0aadc: 3d 20 ff c1 lis r9,-63 ffc0aae0: 39 29 b0 08 addi r9,r9,-20472 ffc0aae4: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0aae8: 3d 20 00 00 lis r9,0 ffc0aaec: 80 09 27 90 lwz r0,10128(r9) ffc0aaf0: 2f 80 00 03 cmpwi cr7,r0,3 ffc0aaf4: 40 9e ff 8c bne+ cr7,ffc0aa80 <_Heap_Walk+0x90> <== NEVER TAKEN 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)( ffc0aaf8: 80 1f 00 0c lwz r0,12(r31) ffc0aafc: 3c a0 ff c2 lis r5,-62 ffc0ab00: 81 1f 00 18 lwz r8,24(r31) ffc0ab04: 38 a5 f3 84 addi r5,r5,-3196 ffc0ab08: 81 3f 00 1c lwz r9,28(r31) ffc0ab0c: 7f 83 e3 78 mr r3,r28 ffc0ab10: 81 7f 00 08 lwz r11,8(r31) ffc0ab14: 38 80 00 00 li r4,0 ffc0ab18: 90 01 00 10 stw r0,16(r1) ffc0ab1c: 7f 66 db 78 mr r6,r27 ffc0ab20: 7f 47 d3 78 mr r7,r26 ffc0ab24: 80 01 00 18 lwz r0,24(r1) ffc0ab28: 7f ca f3 78 mr r10,r30 ffc0ab2c: 91 61 00 0c stw r11,12(r1) ffc0ab30: 7c 09 03 a6 mtctr r0 ffc0ab34: 93 21 00 08 stw r25,8(r1) ffc0ab38: 4c c6 31 82 crclr 4*cr1+eq ffc0ab3c: 4e 80 04 21 bctrl <== ALWAYS TAKEN heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { ffc0ab40: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0ab44: 41 9e 00 d0 beq- cr7,ffc0ac14 <_Heap_Walk+0x224> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0ab48: 73 67 00 07 andi. r7,r27,7 ffc0ab4c: 40 82 00 f0 bne- ffc0ac3c <_Heap_Walk+0x24c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0ab50: 7c 1a db 96 divwu r0,r26,r27 ffc0ab54: 7c 00 d9 d6 mullw r0,r0,r27 ffc0ab58: 7f 9a 00 00 cmpw cr7,r26,r0 ffc0ab5c: 40 9e 00 f4 bne- cr7,ffc0ac50 <_Heap_Walk+0x260> ); return false; } if ( ffc0ab60: 38 1e 00 08 addi r0,r30,8 ffc0ab64: 7d 20 db 96 divwu r9,r0,r27 ffc0ab68: 7d 29 d9 d6 mullw r9,r9,r27 ffc0ab6c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ab70: 40 9e 00 f4 bne- cr7,ffc0ac64 <_Heap_Walk+0x274> 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; ffc0ab74: 83 1e 00 04 lwz r24,4(r30) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0ab78: 73 00 00 01 andi. r0,r24,1 ffc0ab7c: 41 82 00 fc beq- ffc0ac78 <_Heap_Walk+0x288> ); return false; } if ( first_block->prev_size != page_size ) { ffc0ab80: 80 de 00 00 lwz r6,0(r30) ffc0ab84: 7f 9b 30 00 cmpw cr7,r27,r6 ffc0ab88: 40 9e 00 60 bne- cr7,ffc0abe8 <_Heap_Walk+0x1f8> ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0ab8c: 81 39 00 04 lwz r9,4(r25) ffc0ab90: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0ab94: 7d 39 4a 14 add r9,r25,r9 ffc0ab98: 81 29 00 04 lwz r9,4(r9) ffc0ab9c: 71 27 00 01 andi. r7,r9,1 ffc0aba0: 41 82 04 28 beq- ffc0afc8 <_Heap_Walk+0x5d8> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0aba4: 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; ffc0aba8: 80 bf 00 10 lwz r5,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 ) { ffc0abac: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0abb0: 41 9e 01 78 beq- cr7,ffc0ad28 <_Heap_Walk+0x338> 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; ffc0abb4: 81 5f 00 20 lwz r10,32(r31) 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 ffc0abb8: 7f 8a 30 40 cmplw cr7,r10,r6 ffc0abbc: 40 9d 00 cc ble- cr7,ffc0ac88 <_Heap_Walk+0x298> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0abc0: 3c a0 ff c2 lis r5,-62 ffc0abc4: 7f 83 e3 78 mr r3,r28 ffc0abc8: 38 a5 f5 18 addi r5,r5,-2792 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0abcc: 80 01 00 18 lwz r0,24(r1) ffc0abd0: 38 80 00 01 li r4,1 ffc0abd4: 7c 09 03 a6 mtctr r0 ffc0abd8: 4c c6 31 82 crclr 4*cr1+eq ffc0abdc: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0abe0: 38 60 00 00 li r3,0 ffc0abe4: 4b ff fe a0 b ffc0aa84 <_Heap_Walk+0x94> <== ALWAYS TAKEN return false; } if ( first_block->prev_size != page_size ) { (*printer)( ffc0abe8: 3c a0 ff c2 lis r5,-62 ffc0abec: 7f 83 e3 78 mr r3,r28 ffc0abf0: 38 a5 f4 d4 addi r5,r5,-2860 ffc0abf4: 7f 67 db 78 mr r7,r27 return false; } if ( next_block_begin <= block_begin ) { (*printer)( ffc0abf8: 80 01 00 18 lwz r0,24(r1) ffc0abfc: 38 80 00 01 li r4,1 ffc0ac00: 7c 09 03 a6 mtctr r0 ffc0ac04: 4c c6 31 82 crclr 4*cr1+eq ffc0ac08: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0ac0c: 38 60 00 00 li r3,0 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0ac10: 4b ff fe 74 b ffc0aa84 <_Heap_Walk+0x94> <== ALWAYS TAKEN first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0ac14: 3c a0 ff c2 lis r5,-62 ffc0ac18: 7f 83 e3 78 mr r3,r28 ffc0ac1c: 38 a5 f4 18 addi r5,r5,-3048 return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0ac20: 80 01 00 18 lwz r0,24(r1) ffc0ac24: 38 80 00 01 li r4,1 ffc0ac28: 7c 09 03 a6 mtctr r0 ffc0ac2c: 4c c6 31 82 crclr 4*cr1+eq ffc0ac30: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0ac34: 38 60 00 00 li r3,0 ffc0ac38: 4b ff fe 4c b ffc0aa84 <_Heap_Walk+0x94> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0ac3c: 3c a0 ff c2 lis r5,-62 ffc0ac40: 7f 83 e3 78 mr r3,r28 ffc0ac44: 38 a5 f4 2c addi r5,r5,-3028 ffc0ac48: 7f 66 db 78 mr r6,r27 ffc0ac4c: 4b ff ff 80 b ffc0abcc <_Heap_Walk+0x1dc> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0ac50: 3c a0 ff c2 lis r5,-62 ffc0ac54: 7f 83 e3 78 mr r3,r28 ffc0ac58: 38 a5 f4 4c addi r5,r5,-2996 ffc0ac5c: 7f 46 d3 78 mr r6,r26 ffc0ac60: 4b ff ff 6c b ffc0abcc <_Heap_Walk+0x1dc> <== ALWAYS TAKEN } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0ac64: 3c a0 ff c2 lis r5,-62 ffc0ac68: 7f 83 e3 78 mr r3,r28 ffc0ac6c: 38 a5 f4 70 addi r5,r5,-2960 ffc0ac70: 7f c6 f3 78 mr r6,r30 ffc0ac74: 4b ff ff 58 b ffc0abcc <_Heap_Walk+0x1dc> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0ac78: 3c a0 ff c2 lis r5,-62 ffc0ac7c: 7f 83 e3 78 mr r3,r28 ffc0ac80: 38 a5 f4 a4 addi r5,r5,-2908 ffc0ac84: 4b ff ff 9c b ffc0ac20 <_Heap_Walk+0x230> <== ALWAYS TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0ac88: 81 1f 00 24 lwz r8,36(r31) 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 ffc0ac8c: 7f 88 30 40 cmplw cr7,r8,r6 ffc0ac90: 41 bc ff 30 blt- cr7,ffc0abc0 <_Heap_Walk+0x1d0> <== NEVER TAKEN ); return false; } if ( ffc0ac94: 39 26 00 08 addi r9,r6,8 ffc0ac98: 7d 69 2b 96 divwu r11,r9,r5 ffc0ac9c: 7d 6b 29 d6 mullw r11,r11,r5 ffc0aca0: 7f 89 58 00 cmpw cr7,r9,r11 ffc0aca4: 40 9e 03 34 bne- cr7,ffc0afd8 <_Heap_Walk+0x5e8> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0aca8: 81 26 00 04 lwz r9,4(r6) ffc0acac: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0acb0: 7d 26 4a 14 add r9,r6,r9 ffc0acb4: 81 29 00 04 lwz r9,4(r9) ffc0acb8: 71 27 00 01 andi. r7,r9,1 ffc0acbc: 40 82 03 3c bne- ffc0aff8 <_Heap_Walk+0x608> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { ffc0acc0: 80 e6 00 0c lwz r7,12(r6) ffc0acc4: 7f 9f 38 00 cmpw cr7,r31,r7 ffc0acc8: 41 be 00 48 beq+ cr7,ffc0ad10 <_Heap_Walk+0x320> <== ALWAYS TAKEN ffc0accc: 48 00 03 1c b ffc0afe8 <_Heap_Walk+0x5f8> <== NOT EXECUTED ffc0acd0: 41 b8 fe f0 blt- cr6,ffc0abc0 <_Heap_Walk+0x1d0> ); return false; } if ( ffc0acd4: 39 66 00 08 addi r11,r6,8 ffc0acd8: 41 a4 fe e8 blt- cr1,ffc0abc0 <_Heap_Walk+0x1d0> <== NEVER TAKEN ffc0acdc: 7c eb 2b 96 divwu r7,r11,r5 ffc0ace0: 7c e7 29 d6 mullw r7,r7,r5 ffc0ace4: 7f 8b 38 00 cmpw cr7,r11,r7 ffc0ace8: 40 9e 02 f0 bne- cr7,ffc0afd8 <_Heap_Walk+0x5e8> ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0acec: 81 66 00 04 lwz r11,4(r6) ffc0acf0: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc0acf4: 7d 6b 32 14 add r11,r11,r6 ffc0acf8: 81 6b 00 04 lwz r11,4(r11) ffc0acfc: 71 67 00 01 andi. r7,r11,1 ffc0ad00: 40 82 02 f8 bne- ffc0aff8 <_Heap_Walk+0x608> ); return false; } if ( free_block->prev != prev_block ) { ffc0ad04: 80 e6 00 0c lwz r7,12(r6) ffc0ad08: 7f 87 48 00 cmpw cr7,r7,r9 ffc0ad0c: 40 9e 02 dc bne- cr7,ffc0afe8 <_Heap_Walk+0x5f8> (*printer)( ffc0ad10: 7c c9 33 78 mr r9,r6 return false; } prev_block = free_block; free_block = free_block->next; ffc0ad14: 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 ) { ffc0ad18: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0ad1c: 7f 06 50 40 cmplw cr6,r6,r10 ffc0ad20: 7c 88 30 40 cmplw cr1,r8,r6 ffc0ad24: 40 9e ff ac bne+ cr7,ffc0acd0 <_Heap_Walk+0x2e0> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0ad28: 7f 99 f0 00 cmpw cr7,r25,r30 ffc0ad2c: 41 be fd 54 beq- cr7,ffc0aa80 <_Heap_Walk+0x90> <== NEVER TAKEN 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; if ( prev_used ) { (*printer)( ffc0ad30: 3e 60 ff c2 lis r19,-62 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0ad34: 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)( ffc0ad38: 3e 40 ff c2 lis r18,-62 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0ad3c: 3d e0 ff c2 lis r15,-62 ffc0ad40: 3e a0 ff c2 lis r21,-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)( ffc0ad44: 3e 20 ff c2 lis r17,-62 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0ad48: 3d c0 ff c2 lis r14,-62 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0ad4c: 3e 00 ff c2 lis r16,-62 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; if ( prev_used ) { (*printer)( ffc0ad50: 3a 73 f5 b8 addi r19,r19,-2632 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0ad54: 3a 94 f5 d0 addi r20,r20,-2608 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)( ffc0ad58: 3a 52 f6 e8 addi r18,r18,-2328 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0ad5c: 39 ef f6 dc addi r15,r15,-2340 ffc0ad60: 3a b5 f7 4c addi r21,r21,-2228 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)( ffc0ad64: 3a 31 f6 d0 addi r17,r17,-2352 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0ad68: 39 ce f6 c4 addi r14,r14,-2364 ffc0ad6c: 3a 10 f6 b8 addi r16,r16,-2376 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; if ( prev_used ) { ffc0ad70: 2f 80 00 00 cmpwi cr7,r0,0 - 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; ffc0ad74: 57 18 00 3c rlwinm r24,r24,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); ffc0ad78: 7f b8 f2 14 add r29,r24,r30 ffc0ad7c: 41 9e 00 4c beq- cr7,ffc0adc8 <_Heap_Walk+0x3d8> (*printer)( ffc0ad80: 80 01 00 18 lwz r0,24(r1) ffc0ad84: 7f 83 e3 78 mr r3,r28 ffc0ad88: 38 80 00 00 li r4,0 ffc0ad8c: 7c 09 03 a6 mtctr r0 ffc0ad90: 7e 65 9b 78 mr r5,r19 ffc0ad94: 7f c6 f3 78 mr r6,r30 ffc0ad98: 7f 07 c3 78 mr r7,r24 ffc0ad9c: 4c c6 31 82 crclr 4*cr1+eq ffc0ada0: 4e 80 04 21 bctrl <== ALWAYS TAKEN 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 ffc0ada4: 80 1f 00 20 lwz r0,32(r31) ffc0ada8: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0adac: 40 9d 00 50 ble- cr7,ffc0adfc <_Heap_Walk+0x40c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( ffc0adb0: 3c a0 ff c2 lis r5,-62 ffc0adb4: 7f 83 e3 78 mr r3,r28 ffc0adb8: 38 a5 f5 f8 addi r5,r5,-2568 ffc0adbc: 7f c6 f3 78 mr r6,r30 ffc0adc0: 7f a7 eb 78 mr r7,r29 ffc0adc4: 4b ff fe 34 b ffc0abf8 <_Heap_Walk+0x208> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0adc8: 80 01 00 18 lwz r0,24(r1) ffc0adcc: 7f 83 e3 78 mr r3,r28 ffc0add0: 38 80 00 00 li r4,0 ffc0add4: 81 1e 00 00 lwz r8,0(r30) ffc0add8: 7c 09 03 a6 mtctr r0 ffc0addc: 7e 85 a3 78 mr r5,r20 ffc0ade0: 7f c6 f3 78 mr r6,r30 ffc0ade4: 7f 07 c3 78 mr r7,r24 ffc0ade8: 4c c6 31 82 crclr 4*cr1+eq ffc0adec: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0adf0: 80 1f 00 20 lwz r0,32(r31) ffc0adf4: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0adf8: 41 bd ff b8 bgt- cr7,ffc0adb0 <_Heap_Walk+0x3c0> <== NEVER TAKEN ffc0adfc: 80 1f 00 24 lwz r0,36(r31) ffc0ae00: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0ae04: 41 bc ff ac blt- cr7,ffc0adb0 <_Heap_Walk+0x3c0> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { ffc0ae08: 7c 18 db 96 divwu r0,r24,r27 ffc0ae0c: 7c 00 d9 d6 mullw r0,r0,r27 ffc0ae10: 7f 98 00 00 cmpw cr7,r24,r0 ffc0ae14: 40 9e 01 50 bne- cr7,ffc0af64 <_Heap_Walk+0x574> ); return false; } if ( block_size < min_block_size ) { ffc0ae18: 7f 9a c0 40 cmplw cr7,r26,r24 ffc0ae1c: 41 9d 01 60 bgt- cr7,ffc0af7c <_Heap_Walk+0x58c> ); return false; } if ( next_block_begin <= block_begin ) { ffc0ae20: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0ae24: 40 9c 01 8c bge- cr7,ffc0afb0 <_Heap_Walk+0x5c0> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0ae28: 80 1d 00 04 lwz r0,4(r29) ffc0ae2c: 70 07 00 01 andi. r7,r0,1 ffc0ae30: 40 82 00 b0 bne- ffc0aee0 <_Heap_Walk+0x4f0> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0ae34: 80 1f 00 08 lwz r0,8(r31) ffc0ae38: 7e 08 83 78 mr r8,r16 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)( ffc0ae3c: 80 fe 00 0c lwz r7,12(r30) 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; ffc0ae40: 82 de 00 04 lwz r22,4(r30) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0ae44: 7f 80 38 00 cmpw cr7,r0,r7 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0ae48: 80 1f 00 0c lwz r0,12(r31) - 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; ffc0ae4c: 56 d8 00 3c rlwinm r24,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); ffc0ae50: 7e fe c2 14 add r23,r30,r24 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0ae54: 41 9e 00 10 beq- cr7,ffc0ae64 <_Heap_Walk+0x474> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0ae58: 7f 87 f8 00 cmpw cr7,r7,r31 ffc0ae5c: 7e a8 ab 78 mr r8,r21 ffc0ae60: 41 9e 00 fc beq- cr7,ffc0af5c <_Heap_Walk+0x56c> 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)( ffc0ae64: 81 3e 00 08 lwz r9,8(r30) ffc0ae68: 7e 2a 8b 78 mr r10,r17 ffc0ae6c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ae70: 41 9e 00 10 beq- cr7,ffc0ae80 <_Heap_Walk+0x490> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0ae74: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0ae78: 7e aa ab 78 mr r10,r21 ffc0ae7c: 41 9e 00 d8 beq- cr7,ffc0af54 <_Heap_Walk+0x564> 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)( ffc0ae80: 80 01 00 18 lwz r0,24(r1) ffc0ae84: 7f 83 e3 78 mr r3,r28 ffc0ae88: 38 80 00 00 li r4,0 ffc0ae8c: 7e 45 93 78 mr r5,r18 ffc0ae90: 7c 09 03 a6 mtctr r0 ffc0ae94: 7f c6 f3 78 mr r6,r30 ffc0ae98: 4c c6 31 82 crclr 4*cr1+eq ffc0ae9c: 4e 80 04 21 bctrl <== ALWAYS TAKEN block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0aea0: 81 17 00 00 lwz r8,0(r23) ffc0aea4: 7f 98 40 00 cmpw cr7,r24,r8 ffc0aea8: 41 9e 00 50 beq- cr7,ffc0aef8 <_Heap_Walk+0x508> (*printer)( ffc0aeac: 80 01 00 18 lwz r0,24(r1) ffc0aeb0: 3c a0 ff c2 lis r5,-62 ffc0aeb4: 7f 83 e3 78 mr r3,r28 ffc0aeb8: 38 a5 f7 14 addi r5,r5,-2284 ffc0aebc: 7c 09 03 a6 mtctr r0 ffc0aec0: 7f c6 f3 78 mr r6,r30 ffc0aec4: 7f 07 c3 78 mr r7,r24 ffc0aec8: 7e e9 bb 78 mr r9,r23 ffc0aecc: 38 80 00 01 li r4,1 ffc0aed0: 4c c6 31 82 crclr 4*cr1+eq ffc0aed4: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0aed8: 38 60 00 00 li r3,0 ffc0aedc: 4b ff fb a8 b ffc0aa84 <_Heap_Walk+0x94> <== ALWAYS TAKEN if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0aee0: 7f 99 e8 00 cmpw cr7,r25,r29 ffc0aee4: 41 be fb 9c beq- cr7,ffc0aa80 <_Heap_Walk+0x90> 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 ) { ffc0aee8: 83 1d 00 04 lwz r24,4(r29) ffc0aeec: 7f be eb 78 mr r30,r29 ffc0aef0: 57 00 07 fe clrlwi r0,r24,31 ffc0aef4: 4b ff fe 7c b ffc0ad70 <_Heap_Walk+0x380> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { ffc0aef8: 72 c7 00 01 andi. r7,r22,1 ffc0aefc: 41 82 00 44 beq- ffc0af40 <_Heap_Walk+0x550> ffc0af00: 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 ) { ffc0af04: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0af08: 41 9e 00 24 beq- cr7,ffc0af2c <_Heap_Walk+0x53c> <== NEVER TAKEN if ( free_block == block ) { ffc0af0c: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0af10: 40 be 00 0c bne+ cr7,ffc0af1c <_Heap_Walk+0x52c> ffc0af14: 4b ff ff cc b ffc0aee0 <_Heap_Walk+0x4f0> <== ALWAYS TAKEN ffc0af18: 41 ba ff c8 beq- cr6,ffc0aee0 <_Heap_Walk+0x4f0> return true; } free_block = free_block->next; ffc0af1c: 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 ) { ffc0af20: 7f 89 f8 00 cmpw cr7,r9,r31 if ( free_block == block ) { ffc0af24: 7f 09 f0 00 cmpw cr6,r9,r30 ) { 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 ) { ffc0af28: 40 9e ff f0 bne+ cr7,ffc0af18 <_Heap_Walk+0x528> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0af2c: 3c a0 ff c2 lis r5,-62 ffc0af30: 7f 83 e3 78 mr r3,r28 ffc0af34: 38 a5 f7 80 addi r5,r5,-2176 ffc0af38: 7f c6 f3 78 mr r6,r30 ffc0af3c: 4b ff fc 90 b ffc0abcc <_Heap_Walk+0x1dc> <== ALWAYS TAKEN return false; } if ( !prev_used ) { (*printer)( ffc0af40: 3c a0 ff c2 lis r5,-62 ffc0af44: 7f 83 e3 78 mr r3,r28 ffc0af48: 38 a5 f7 50 addi r5,r5,-2224 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0af4c: 7f c6 f3 78 mr r6,r30 ffc0af50: 4b ff fc 7c b ffc0abcc <_Heap_Walk+0x1dc> <== ALWAYS TAKEN " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0af54: 7d ea 7b 78 mr r10,r15 ffc0af58: 4b ff ff 28 b ffc0ae80 <_Heap_Walk+0x490> <== ALWAYS TAKEN "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0af5c: 7d c8 73 78 mr r8,r14 ffc0af60: 4b ff ff 04 b ffc0ae64 <_Heap_Walk+0x474> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( ffc0af64: 3c a0 ff c2 lis r5,-62 ffc0af68: 7f 83 e3 78 mr r3,r28 ffc0af6c: 38 a5 f6 28 addi r5,r5,-2520 ffc0af70: 7f c6 f3 78 mr r6,r30 ffc0af74: 7f 07 c3 78 mr r7,r24 ffc0af78: 4b ff fc 80 b ffc0abf8 <_Heap_Walk+0x208> <== ALWAYS TAKEN return false; } if ( block_size < min_block_size ) { (*printer)( ffc0af7c: 80 01 00 18 lwz r0,24(r1) ffc0af80: 3c a0 ff c2 lis r5,-62 ffc0af84: 7f 83 e3 78 mr r3,r28 ffc0af88: 38 a5 f6 58 addi r5,r5,-2472 ffc0af8c: 7c 09 03 a6 mtctr r0 ffc0af90: 7f c6 f3 78 mr r6,r30 ffc0af94: 7f 07 c3 78 mr r7,r24 ffc0af98: 7f 48 d3 78 mr r8,r26 ffc0af9c: 38 80 00 01 li r4,1 ffc0afa0: 4c c6 31 82 crclr 4*cr1+eq ffc0afa4: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0afa8: 38 60 00 00 li r3,0 block, block_size, min_block_size ); return false; ffc0afac: 4b ff fa d8 b ffc0aa84 <_Heap_Walk+0x94> <== ALWAYS TAKEN } if ( next_block_begin <= block_begin ) { (*printer)( ffc0afb0: 3c a0 ff c2 lis r5,-62 ffc0afb4: 7f 83 e3 78 mr r3,r28 ffc0afb8: 38 a5 f6 84 addi r5,r5,-2428 ffc0afbc: 7f c6 f3 78 mr r6,r30 ffc0afc0: 7f a7 eb 78 mr r7,r29 ffc0afc4: 4b ff fc 34 b ffc0abf8 <_Heap_Walk+0x208> <== ALWAYS TAKEN return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0afc8: 3c a0 ff c2 lis r5,-62 ffc0afcc: 7f 83 e3 78 mr r3,r28 ffc0afd0: 38 a5 f5 00 addi r5,r5,-2816 ffc0afd4: 4b ff fc 4c b ffc0ac20 <_Heap_Walk+0x230> <== ALWAYS TAKEN } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0afd8: 3c a0 ff c2 lis r5,-62 ffc0afdc: 7f 83 e3 78 mr r3,r28 ffc0afe0: 38 a5 f5 38 addi r5,r5,-2760 ffc0afe4: 4b ff fb e8 b ffc0abcc <_Heap_Walk+0x1dc> <== ALWAYS TAKEN return false; } if ( free_block->prev != prev_block ) { (*printer)( ffc0afe8: 3c a0 ff c2 lis r5,-62 ffc0afec: 7f 83 e3 78 mr r3,r28 ffc0aff0: 38 a5 f5 84 addi r5,r5,-2684 ffc0aff4: 4b ff fc 04 b ffc0abf8 <_Heap_Walk+0x208> <== ALWAYS TAKEN return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0aff8: 3c a0 ff c2 lis r5,-62 ffc0affc: 7f 83 e3 78 mr r3,r28 <== ALWAYS TAKEN ffc0b000: 38 a5 f5 68 addi r5,r5,-2712 ffc0b004: 4b ff fb c8 b ffc0abcc <_Heap_Walk+0x1dc> <== ALWAYS TAKEN ffc0b008 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b008: 94 21 ff 88 stwu r1,-120(r1) ffc0b00c: 7c 08 02 a6 mflr r0 ffc0b010: 93 e1 00 74 stw r31,116(r1) ffc0b014: 90 01 00 7c stw r0,124(r1) ffc0b018: 7c 60 1b 78 mr r0,r3 ffc0b01c: 90 c1 00 1c stw r6,28(r1) ffc0b020: 90 e1 00 20 stw r7,32(r1) ffc0b024: 91 01 00 24 stw r8,36(r1) ffc0b028: 91 21 00 28 stw r9,40(r1) ffc0b02c: 91 41 00 2c stw r10,44(r1) ffc0b030: 40 86 00 24 bne- cr1,ffc0b054 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b034: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b038: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b03c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b040: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b044: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b048: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b04c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b050: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b054: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b058: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b05c: 40 9e 00 58 bne- cr7,ffc0b0b4 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b060: 3c 60 ff c2 lis r3,-62 ffc0b064: 7c 04 03 78 mr r4,r0 ffc0b068: 38 63 f7 b8 addi r3,r3,-2120 ffc0b06c: 4c c6 31 82 crclr 4*cr1+eq ffc0b070: 4b ff ad d9 bl ffc05e48 <== ALWAYS TAKEN } va_start( ap, fmt ); ffc0b074: 38 00 00 03 li r0,3 ffc0b078: 98 01 00 08 stb r0,8(r1) ffc0b07c: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b080: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b084: 98 01 00 09 stb r0,9(r1) ffc0b088: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b08c: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b090: 90 01 00 0c stw r0,12(r1) ffc0b094: 38 01 00 10 addi r0,r1,16 ffc0b098: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b09c: 4b ff d0 e1 bl ffc0817c <== ALWAYS TAKEN va_end( ap ); } ffc0b0a0: 80 01 00 7c lwz r0,124(r1) ffc0b0a4: 83 e1 00 74 lwz r31,116(r1) ffc0b0a8: 38 21 00 78 addi r1,r1,120 ffc0b0ac: 7c 08 03 a6 mtlr r0 ffc0b0b0: 4e 80 00 20 blr <== ALWAYS TAKEN static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); ffc0b0b4: 3c 60 ff c2 lis r3,-62 ffc0b0b8: 7c 04 03 78 mr r4,r0 ffc0b0bc: 38 63 f7 ac addi r3,r3,-2132 ffc0b0c0: 4c c6 31 82 crclr 4*cr1+eq ffc0b0c4: 4b ff ad 85 bl ffc05e48 <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b0c8: 38 00 00 03 li r0,3 ffc0b0cc: 98 01 00 08 stb r0,8(r1) ffc0b0d0: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b0d4: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b0d8: 98 01 00 09 stb r0,9(r1) ffc0b0dc: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b0e0: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b0e4: 90 01 00 0c stw r0,12(r1) ffc0b0e8: 38 01 00 10 addi r0,r1,16 ffc0b0ec: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b0f0: 4b ff d0 8d bl ffc0817c <== ALWAYS TAKEN va_end( ap ); } ffc0b0f4: 80 01 00 7c lwz r0,124(r1) ffc0b0f8: 83 e1 00 74 lwz r31,116(r1) ffc0b0fc: 38 21 00 78 addi r1,r1,120 ffc0b100: 7c 08 03 a6 mtlr r0 ffc0b104: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a9ec <_Heap_Walk_print_nothing>: const char *fmt, ... ) { /* Do nothing */ } ffc0a9ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08ec4 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc08ec4: 94 21 ff f0 stwu r1,-16(r1) ffc08ec8: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc08ecc: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08ed0: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc08ed4: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08ed8: 80 1e 27 a4 lwz r0,10148(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc08edc: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08ee0: 2f 80 00 00 cmpwi cr7,r0,0 ffc08ee4: 41 9e 00 2c beq- cr7,ffc08f10 <_IO_Initialize_all_drivers+0x4c> <== NEVER TAKEN ffc08ee8: 3b de 27 a4 addi r30,r30,10148 ffc08eec: 3b e0 00 00 li r31,0 (void) rtems_io_initialize( major, 0, NULL ); ffc08ef0: 7f e3 fb 78 mr r3,r31 <== ALWAYS TAKEN ffc08ef4: 38 80 00 00 li r4,0 ffc08ef8: 38 a0 00 00 li r5,0 ffc08efc: 48 00 5c 1d bl ffc0eb18 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08f00: 80 1e 00 00 lwz r0,0(r30) ffc08f04: 3b ff 00 01 addi r31,r31,1 ffc08f08: 7f 80 f8 40 cmplw cr7,r0,r31 ffc08f0c: 41 9d ff e4 bgt+ cr7,ffc08ef0 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc08f10: 80 01 00 14 lwz r0,20(r1) ffc08f14: 83 c1 00 08 lwz r30,8(r1) ffc08f18: 7c 08 03 a6 mtlr r0 ffc08f1c: 83 e1 00 0c lwz r31,12(r1) ffc08f20: 38 21 00 10 addi r1,r1,16 ffc08f24: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08f28 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc08f28: 94 21 ff e0 stwu r1,-32(r1) ffc08f2c: 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; ffc08f30: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc08f34: 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; ffc08f38: 39 29 20 a0 addi r9,r9,8352 * workspace. * */ void _IO_Manager_initialization(void) { ffc08f3c: 93 a1 00 14 stw r29,20(r1) ffc08f40: 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; ffc08f44: 83 a9 00 2c lwz r29,44(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; ffc08f48: 83 c9 00 30 lwz r30,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc08f4c: 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 ) ffc08f50: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc08f54: 93 61 00 0c stw r27,12(r1) ffc08f58: 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; ffc08f5c: 83 e9 00 34 lwz r31,52(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 ) ffc08f60: 41 9c 00 38 blt- cr7,ffc08f98 <_IO_Manager_initialization+0x70> * 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; ffc08f64: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc08f68: 93 e9 27 a8 stw r31,10152(r9) _IO_Number_of_drivers = number_of_drivers; ffc08f6c: 3d 20 00 00 lis r9,0 ffc08f70: 93 c9 27 a4 stw r30,10148(r9) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } ffc08f74: 80 01 00 24 lwz r0,36(r1) ffc08f78: 83 61 00 0c lwz r27,12(r1) ffc08f7c: 7c 08 03 a6 mtlr r0 ffc08f80: 83 81 00 10 lwz r28,16(r1) ffc08f84: 83 a1 00 14 lwz r29,20(r1) <== ALWAYS TAKEN ffc08f88: 83 c1 00 18 lwz r30,24(r1) ffc08f8c: 83 e1 00 1c lwz r31,28(r1) ffc08f90: 38 21 00 20 addi r1,r1,32 ffc08f94: 4e 80 00 20 blr <== ALWAYS TAKEN * 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 ) ffc08f98: 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 *) ffc08f9c: 7f 63 db 78 mr r3,r27 ffc08fa0: 48 00 39 f1 bl ffc0c990 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN ffc08fa4: 3f 80 00 00 lis r28,0 <== ALWAYS TAKEN _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc08fa8: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN /* * 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 *) ffc08fac: 90 7c 27 a8 stw r3,10152(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc08fb0: 7f 65 db 78 mr r5,r27 ffc08fb4: 38 80 00 00 li r4,0 _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; ffc08fb8: 93 a9 27 a4 stw r29,10148(r9) memset( ffc08fbc: 48 00 97 19 bl ffc126d4 <== ALWAYS TAKEN _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc08fc0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08fc4: 41 be ff b0 beq- cr7,ffc08f74 <_IO_Manager_initialization+0x4c> <== NEVER TAKEN ffc08fc8: 7f c9 03 a6 mtctr r30 ffc08fcc: 81 1c 27 a8 lwz r8,10152(r28) ffc08fd0: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc08fd4: 7f e9 fb 78 mr r9,r31 ffc08fd8: 7c a9 50 6e lwzux r5,r9,r10 ffc08fdc: 7d 68 52 14 add r11,r8,r10 ffc08fe0: 80 e9 00 08 lwz r7,8(r9) ffc08fe4: 80 09 00 0c lwz r0,12(r9) ffc08fe8: 80 c9 00 04 lwz r6,4(r9) ffc08fec: 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++ ) ffc08ff0: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc08ff4: 90 cb 00 04 stw r6,4(r11) ffc08ff8: 90 eb 00 08 stw r7,8(r11) ffc08ffc: 90 0b 00 0c stw r0,12(r11) ffc09000: 80 e9 00 14 lwz r7,20(r9) ffc09004: 80 09 00 10 lwz r0,16(r9) ffc09008: 90 eb 00 14 stw r7,20(r11) ffc0900c: 90 0b 00 10 stw r0,16(r11) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09010: 42 00 ff c4 bdnz+ ffc08fd4 <_IO_Manager_initialization+0xac> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } ffc09014: 80 01 00 24 lwz r0,36(r1) ffc09018: 83 61 00 0c lwz r27,12(r1) ffc0901c: 7c 08 03 a6 mtlr r0 ffc09020: 83 81 00 10 lwz r28,16(r1) ffc09024: 83 a1 00 14 lwz r29,20(r1) ffc09028: 83 c1 00 18 lwz r30,24(r1) ffc0902c: 83 e1 00 1c lwz r31,28(r1) ffc09030: 38 21 00 20 addi r1,r1,32 ffc09034: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09dd0 <_ISR_Handler_initialization>: * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; ffc09dd0: 38 00 00 00 li r0,0 ffc09dd4: 3d 20 00 00 lis r9,0 ffc09dd8: 98 09 27 88 stb r0,10120(r9) _ISR_Nest_level = 0; ffc09ddc: 38 00 00 00 li r0,0 ffc09de0: 3d 20 00 00 lis r9,0 ffc09de4: 90 09 27 54 stw r0,10068(r9) <== ALWAYS TAKEN #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } ffc09de8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09d8c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09d8c: 94 21 ff f0 stwu r1,-16(r1) ffc09d90: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc09d94: 3d 60 00 00 lis r11,0 ffc09d98: 39 2b 2c 90 addi r9,r11,11408 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09d9c: 90 01 00 14 stw r0,20(r1) _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; ffc09da0: 90 a9 00 08 stw r5,8(r9) Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc09da4: 98 89 00 04 stb r4,4(r9) void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09da8: 93 e1 00 0c stw r31,12(r1) ffc09dac: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; ffc09db0: 90 6b 2c 90 stw r3,11408(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 ); ffc09db4: 48 00 25 c1 bl ffc0c374 <_User_extensions_Fatal> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc09db8: 38 00 00 05 li r0,5 ffc09dbc: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc09dc0: 7f e3 fb 78 mr r3,r31 ffc09dc4: 90 09 27 90 stw r0,10128(r9) ffc09dc8: 4b ff 9a e1 bl ffc038a8 <_BSP_Fatal_error> <== ALWAYS TAKEN ffc09dcc: 48 00 00 00 b ffc09dcc <_Internal_error_Occurred+0x40> <== NOT EXECUTED ffc1a0a0 <_Message_queue_Allocate>: * Output parameters: * the_message_queue - set if successful, NULL otherwise */ Message_queue_Control *_Message_queue_Allocate(void) { ffc1a0a0: 94 21 ff f8 stwu r1,-8(r1) ffc1a0a4: 7c 08 02 a6 mflr r0 return (Message_queue_Control *) ffc1a0a8: 3c 60 00 00 lis r3,0 ffc1a0ac: 38 63 2f 64 addi r3,r3,12132 * Output parameters: * the_message_queue - set if successful, NULL otherwise */ Message_queue_Control *_Message_queue_Allocate(void) { ffc1a0b0: 90 01 00 0c stw r0,12(r1) return (Message_queue_Control *) ffc1a0b4: 4b ff b7 19 bl ffc157cc <_Objects_Allocate> <== ALWAYS TAKEN _Objects_Allocate(&_Message_queue_Information); } ffc1a0b8: 80 01 00 0c lwz r0,12(r1) ffc1a0bc: 38 21 00 08 addi r1,r1,8 ffc1a0c0: 7c 08 03 a6 mtlr r0 ffc1a0c4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e5d4 <_Message_queue_Manager_initialization>: * Output parameters: NONE */ void _Message_queue_Manager_initialization(void) { _Objects_Initialize_information( ffc0e5d4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Message_queue_Manager_initialization(void) { ffc0e5d8: 94 21 ff f8 stwu r1,-8(r1) ffc0e5dc: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0e5e0: 3c 60 00 00 lis r3,0 ffc0e5e4: 80 c9 20 80 lwz r6,8320(r9) ffc0e5e8: 38 63 2e 84 addi r3,r3,11908 ffc0e5ec: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Message_queue_Manager_initialization(void) { ffc0e5f0: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN _Objects_Initialize_information( ffc0e5f4: 38 a0 00 04 li r5,4 ffc0e5f8: 38 e0 00 80 li r7,128 ffc0e5fc: 39 00 00 00 li r8,0 ffc0e600: 39 20 00 04 li r9,4 ffc0e604: 4b ff be 85 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_MESSAGE_QUEUE, _Message_queue_MP_Process_packet ); #endif } ffc0e608: 80 01 00 0c lwz r0,12(r1) ffc0e60c: 38 21 00 08 addi r1,r1,8 ffc0e610: 7c 08 03 a6 mtlr r0 ffc0e614: 4e 80 00 20 blr <== ALWAYS TAKEN ffc133dc <_Message_queue_Translate_core_message_queue_return_code>: if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; } ffc133dc: 3d 20 00 00 lis r9,0 ffc133e0: 39 29 21 d8 addi r9,r9,8664 }; rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( uint32_t status ) { ffc133e4: 54 63 10 3a rlwinm r3,r3,2,0,29 if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; } ffc133e8: 7c 69 18 2e lwzx r3,r9,r3 ffc133ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f258 <_Objects_API_maximum_class>: case OBJECTS_NO_API: default: break; } return 0; } ffc0f258: 38 03 ff ff addi r0,r3,-1 ffc0f25c: 2b 80 00 03 cmplwi cr7,r0,3 ffc0f260: 38 60 00 00 li r3,0 ffc0f264: 4d 9d 00 20 bgtlr cr7 ffc0f268: 3d 20 ff c2 lis r9,-62 ffc0f26c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0f270: 39 29 e1 24 addi r9,r9,-7900 ffc0f274: 7c 69 00 2e lwzx r3,r9,r0 ffc0f278: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09dec <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09dec: 94 21 ff f0 stwu r1,-16(r1) ffc09df0: 7c 08 02 a6 mflr r0 ffc09df4: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN * 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 ) ffc09df8: 80 03 00 18 lwz r0,24(r3) <== ALWAYS TAKEN */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09dfc: 93 e1 00 0c stw r31,12(r1) ffc09e00: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN * 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 ) ffc09e04: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09e08: 93 c1 00 08 stw r30,8(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 ) ffc09e0c: 38 60 00 00 li r3,0 ffc09e10: 40 9e 00 1c bne- cr7,ffc09e2c <_Objects_Allocate+0x40> <== ALWAYS TAKEN information->inactive--; } } return the_object; } ffc09e14: 80 01 00 14 lwz r0,20(r1) ffc09e18: 83 c1 00 08 lwz r30,8(r1) <== ALWAYS TAKEN ffc09e1c: 7c 08 03 a6 mtlr r0 ffc09e20: 83 e1 00 0c lwz r31,12(r1) ffc09e24: 38 21 00 10 addi r1,r1,16 <== ALWAYS TAKEN ffc09e28: 4e 80 00 20 blr <== ALWAYS TAKEN /* * 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 ); ffc09e2c: 3b df 00 20 addi r30,r31,32 ffc09e30: 7f c3 f3 78 mr r3,r30 ffc09e34: 4b ff f5 05 bl ffc09338 <_Chain_Get> <== ALWAYS TAKEN if ( information->auto_extend ) { ffc09e38: 88 1f 00 12 lbz r0,18(r31) <== ALWAYS TAKEN ffc09e3c: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc09e40: 41 be ff d4 beq- cr7,ffc09e14 <_Objects_Allocate+0x28> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc09e44: 2f 83 00 00 cmpwi cr7,r3,0 ffc09e48: 41 9e 00 50 beq- cr7,ffc09e98 <_Objects_Allocate+0xac> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc09e4c: a1 63 00 0a lhz r11,10(r3) ffc09e50: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc09e54: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc09e58: 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--; ffc09e5c: a1 7f 00 2c lhz r11,44(r31) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc09e60: 7c 00 4b 96 divwu r0,r0,r9 ffc09e64: 81 3f 00 30 lwz r9,48(r31) information->inactive--; } } return the_object; } ffc09e68: 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 ]--; ffc09e6c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09e70: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc09e74: 39 6b ff ff addi r11,r11,-1 ffc09e78: b1 7f 00 2c sth r11,44(r31) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc09e7c: 39 4a ff ff addi r10,r10,-1 ffc09e80: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; } } return the_object; } ffc09e84: 80 01 00 14 lwz r0,20(r1) ffc09e88: 83 e1 00 0c lwz r31,12(r1) ffc09e8c: 38 21 00 10 addi r1,r1,16 ffc09e90: 7c 08 03 a6 mtlr r0 ffc09e94: 4e 80 00 20 blr <== ALWAYS TAKEN * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); ffc09e98: 7f e3 fb 78 mr r3,r31 ffc09e9c: 48 00 00 4d bl ffc09ee8 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc09ea0: 7f c3 f3 78 mr r3,r30 ffc09ea4: 4b ff f4 95 bl ffc09338 <_Chain_Get> <== ALWAYS TAKEN } if ( the_object ) { ffc09ea8: 2c 03 00 00 cmpwi r3,0 ffc09eac: 41 82 ff 68 beq+ ffc09e14 <_Objects_Allocate+0x28> ffc09eb0: 4b ff ff 9c b ffc09e4c <_Objects_Allocate+0x60> <== ALWAYS TAKEN ffc09eb4 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { ffc09eb4: 94 21 ff f8 stwu r1,-8(r1) ffc09eb8: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09ebc: 39 60 00 00 li r11,0 ffc09ec0: 90 01 00 0c stw r0,12(r1) ffc09ec4: a0 04 00 0a lhz r0,10(r4) <== ALWAYS TAKEN ffc09ec8: 81 23 00 1c lwz r9,28(r3) ffc09ecc: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09ed0: 7d 69 01 2e stwx r11,r9,r0 _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); ffc09ed4: 48 00 06 a5 bl ffc0a578 <_Objects_Namespace_remove> <== ALWAYS TAKEN } ffc09ed8: 80 01 00 0c lwz r0,12(r1) ffc09edc: 38 21 00 08 addi r1,r1,8 ffc09ee0: 7c 08 03 a6 mtlr r0 ffc09ee4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09ee8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc09ee8: 94 21 ff b8 stwu r1,-72(r1) <== ALWAYS TAKEN ffc09eec: 7c 08 02 a6 mflr r0 ffc09ef0: 90 01 00 4c stw r0,76(r1) <== ALWAYS TAKEN minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc09ef4: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc09ef8: 93 a1 00 3c stw r29,60(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 ) ffc09efc: 2f 8b 00 00 cmpwi cr7,r11,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc09f00: 93 e1 00 44 stw r31,68(r1) ffc09f04: 7c 7f 1b 78 mr r31,r3 ffc09f08: 92 a1 00 1c stw r21,28(r1) ffc09f0c: 92 c1 00 20 stw r22,32(r1) ffc09f10: 92 e1 00 24 stw r23,36(r1) ffc09f14: 93 01 00 28 stw r24,40(r1) ffc09f18: 93 21 00 2c stw r25,44(r1) ffc09f1c: 93 41 00 30 stw r26,48(r1) ffc09f20: 93 61 00 34 stw r27,52(r1) ffc09f24: 93 81 00 38 stw r28,56(r1) ffc09f28: 93 c1 00 40 stw r30,64(r1) /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); ffc09f2c: a3 a3 00 0a lhz r29,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc09f30: 41 9e 02 9c beq- cr7,ffc0a1cc <_Objects_Extend_information+0x2e4> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc09f34: a3 23 00 10 lhz r25,16(r3) ffc09f38: a1 23 00 14 lhz r9,20(r3) ffc09f3c: 7e b9 4b 96 divwu r21,r25,r9 for ( ; block < block_count; block++ ) { ffc09f40: 2f 95 00 00 cmpwi cr7,r21,0 ffc09f44: 41 9e 02 a0 beq- cr7,ffc0a1e4 <_Objects_Extend_information+0x2fc> <== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) ffc09f48: 80 0b 00 00 lwz r0,0(r11) ffc09f4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09f50: 41 9e 02 94 beq- cr7,ffc0a1e4 <_Objects_Extend_information+0x2fc> <== NEVER TAKEN ffc09f54: 7d 2a 4b 78 mr r10,r9 ffc09f58: 7e a9 03 a6 mtctr r21 ffc09f5c: 7f be eb 78 mr r30,r29 ffc09f60: 3b 60 00 00 li r27,0 ffc09f64: 48 00 00 10 b ffc09f74 <_Objects_Extend_information+0x8c> <== ALWAYS TAKEN ffc09f68: 7c 0b 00 2e lwzx r0,r11,r0 ffc09f6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09f70: 41 9e 00 14 beq- cr7,ffc09f84 <_Objects_Extend_information+0x9c> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc09f74: 3b 7b 00 01 addi r27,r27,1 if ( information->object_blocks[ block ] == NULL ) ffc09f78: 57 60 10 3a rlwinm r0,r27,2,0,29 break; else index_base += information->allocation_size; ffc09f7c: 7f de 4a 14 add r30,r30,r9 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc09f80: 42 00 ff e8 bdnz+ ffc09f68 <_Objects_Extend_information+0x80> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc09f84: 7f 39 52 14 add r25,r25,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 ) { ffc09f88: 2b 99 ff ff cmplwi cr7,r25,65535 ffc09f8c: 41 9d 01 b8 bgt- cr7,ffc0a144 <_Objects_Extend_information+0x25c> <== NEVER TAKEN /* * 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 ) { ffc09f90: 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; ffc09f94: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc09f98: 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; ffc09f9c: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc09fa0: 40 9e 01 e0 bne- cr7,ffc0a180 <_Objects_Extend_information+0x298> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc09fa4: 48 00 29 ed bl ffc0c990 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN ffc09fa8: 7c 7c 1b 78 mr r28,r3 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { ffc09fac: a0 1f 00 10 lhz r0,16(r31) ffc09fb0: 7f 9e 00 40 cmplw cr7,r30,r0 <== ALWAYS TAKEN ffc09fb4: 41 9c 01 08 blt- cr7,ffc0a0bc <_Objects_Extend_information+0x1d4> */ /* * Up the block count and maximum */ block_count++; ffc09fb8: 3b 55 00 01 addi r26,r21,1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc09fbc: 1c 7a 00 03 mulli r3,r26,3 ffc09fc0: 7c 79 1a 14 add r3,r25,r3 <== ALWAYS TAKEN ffc09fc4: 7c 63 ea 14 add r3,r3,r29 <== ALWAYS TAKEN ffc09fc8: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc09fcc: 48 00 2a 0d bl ffc0c9d8 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !object_blocks ) { ffc09fd0: 7c 76 1b 79 mr. r22,r3 ffc09fd4: 41 82 02 20 beq- ffc0a1f4 <_Objects_Extend_information+0x30c> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc09fd8: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc09fdc: 57 5a 10 3a rlwinm r26,r26,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc09fe0: 7f 16 d2 14 add r24,r22,r26 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc09fe4: 7f 9d 00 40 cmplw cr7,r29,r0 ffc09fe8: 7f 58 d2 14 add r26,r24,r26 ffc09fec: 41 9c 01 a4 blt- cr7,ffc0a190 <_Objects_Extend_information+0x2a8> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc09ff0: 2f 9d 00 00 cmpwi cr7,r29,0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc09ff4: 39 20 00 00 li r9,0 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc09ff8: 56 b7 10 3a rlwinm r23,r21,2,0,29 ffc09ffc: 41 9e 00 20 beq- cr7,ffc0a01c <_Objects_Extend_information+0x134> <== NEVER TAKEN local_table[ index ] = NULL; ffc0a000: 7f a9 03 a6 mtctr r29 ffc0a004: 38 00 00 00 li r0,0 ffc0a008: 55 2b 10 3a rlwinm r11,r9,2,0,29 ffc0a00c: 7c 0b d1 2e stwx r0,r11,r26 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0a010: 39 29 00 01 addi r9,r9,1 ffc0a014: 42 00 ff f4 bdnz+ ffc0a008 <_Objects_Extend_information+0x120> <== NEVER TAKEN ffc0a018: 56 b7 10 3a rlwinm r23,r21,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0a01c: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0a020: 38 00 00 00 li r0,0 <== ALWAYS TAKEN inactive_per_block[block_count] = 0; ffc0a024: 7c 18 b9 2e stwx r0,r24,r23 for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0a028: 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 ; ffc0a02c: 7f 9e 58 40 cmplw cr7,r30,r11 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0a030: 7c 16 b9 2e stwx r0,r22,r23 inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a034: 40 9c 00 30 bge- cr7,ffc0a064 <_Objects_Extend_information+0x17c> <== NEVER TAKEN ffc0a038: 38 1e 00 01 addi r0,r30,1 ffc0a03c: 7f 80 58 40 cmplw cr7,r0,r11 ffc0a040: 57 c9 10 3a rlwinm r9,r30,2,0,29 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0a044: 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 ; ffc0a048: 7d 3a 4a 14 add r9,r26,r9 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0a04c: 7d 69 03 a6 mtctr r11 ffc0a050: 38 00 00 00 li r0,0 ffc0a054: 41 9d 01 ac bgt- cr7,ffc0a200 <_Objects_Extend_information+0x318> <== NEVER TAKEN ffc0a058: 90 09 00 00 stw r0,0(r9) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { ffc0a05c: 39 29 00 04 addi r9,r9,4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a060: 42 00 ff f8 bdnz+ ffc0a058 <_Objects_Extend_information+0x170> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a064: 7c 00 00 a6 mfmsr r0 ffc0a068: 7d 30 42 a6 mfsprg r9,0 ffc0a06c: 7c 09 48 78 andc r9,r0,r9 ffc0a070: 7d 20 01 24 mtmsr r9 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a074: 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; ffc0a078: 57 39 04 3e clrlwi r25,r25,16 information->maximum_id = _Objects_Build_id( ffc0a07c: a1 3f 00 04 lhz r9,4(r31) ffc0a080: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0a084: 80 7f 00 34 lwz r3,52(r31) information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a088: 65 6b 00 01 oris r11,r11,1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0a08c: 93 1f 00 30 stw r24,48(r31) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a090: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0a094: 7d 69 4b 78 or r9,r11,r9 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0a098: 93 5f 00 1c stw r26,28(r31) information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a09c: 7d 29 cb 78 or r9,r9,r25 ffc0a0a0: 91 3f 00 0c stw r9,12(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; ffc0a0a4: b3 3f 00 10 sth r25,16(r31) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0a0a8: 92 df 00 34 stw r22,52(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a0ac: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc0a0b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a0b4: 41 9e 00 08 beq- cr7,ffc0a0bc <_Objects_Extend_information+0x1d4> _Workspace_Free( old_tables ); ffc0a0b8: 48 00 29 55 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0a0bc: 81 3f 00 34 lwz r9,52(r31) ffc0a0c0: 57 7b 10 3a rlwinm r27,r27,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a0c4: 3b a1 00 08 addi r29,r1,8 ffc0a0c8: 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; ffc0a0cc: 7f 89 d9 2e stwx r28,r9,r27 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a0d0: 7f 84 e3 78 mr r4,r28 ffc0a0d4: 7f a3 eb 78 mr r3,r29 ffc0a0d8: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a0dc: 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( ffc0a0e0: 48 00 4a bd bl ffc0eb9c <_Chain_Initialize> <== ALWAYS TAKEN /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0a0e4: 48 00 00 2c b ffc0a110 <_Objects_Extend_information+0x228> <== ALWAYS TAKEN the_object->id = _Objects_Build_id( ffc0a0e8: 81 7f 00 00 lwz r11,0(r31) ffc0a0ec: a0 1f 00 04 lhz r0,4(r31) ffc0a0f0: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0a0f4: 65 6b 00 01 oris r11,r11,1 ffc0a0f8: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0a0fc: 7d 60 03 78 or r0,r11,r0 ffc0a100: 7c 00 f3 78 or r0,r0,r30 ffc0a104: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0a108: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a10c: 4b ff f1 fd bl ffc09308 <_Chain_Append> <== ALWAYS TAKEN /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0a110: 7f a3 eb 78 mr r3,r29 ffc0a114: 4b ff f2 25 bl ffc09338 <_Chain_Get> <== ALWAYS TAKEN ffc0a118: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a11c: 7f 83 e3 78 mr r3,r28 ffc0a120: 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 ) { ffc0a124: 40 82 ff c4 bne+ ffc0a0e8 <_Objects_Extend_information+0x200> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a128: a0 1f 00 14 lhz r0,20(r31) information->inactive = ffc0a12c: a1 3f 00 2c lhz r9,44(r31) <== ALWAYS TAKEN _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a130: 81 7f 00 30 lwz r11,48(r31) <== ALWAYS TAKEN information->inactive = ffc0a134: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a138: 54 00 04 3e clrlwi r0,r0,16 <== ALWAYS TAKEN information->inactive = ffc0a13c: b1 3f 00 2c sth r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a140: 7c 0b d9 2e stwx r0,r11,r27 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0a144: 80 01 00 4c lwz r0,76(r1) ffc0a148: 82 a1 00 1c lwz r21,28(r1) ffc0a14c: 7c 08 03 a6 mtlr r0 ffc0a150: 82 c1 00 20 lwz r22,32(r1) ffc0a154: 82 e1 00 24 lwz r23,36(r1) <== ALWAYS TAKEN ffc0a158: 83 01 00 28 lwz r24,40(r1) ffc0a15c: 83 21 00 2c lwz r25,44(r1) ffc0a160: 83 41 00 30 lwz r26,48(r1) ffc0a164: 83 61 00 34 lwz r27,52(r1) ffc0a168: 83 81 00 38 lwz r28,56(r1) ffc0a16c: 83 a1 00 3c lwz r29,60(r1) ffc0a170: 83 c1 00 40 lwz r30,64(r1) ffc0a174: 83 e1 00 44 lwz r31,68(r1) ffc0a178: 38 21 00 48 addi r1,r1,72 ffc0a17c: 4e 80 00 20 blr <== ALWAYS TAKEN * 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 ) { new_object_block = _Workspace_Allocate( block_size ); ffc0a180: 48 00 28 59 bl ffc0c9d8 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !new_object_block ) ffc0a184: 7c 7c 1b 79 mr. r28,r3 ffc0a188: 40 82 fe 24 bne+ ffc09fac <_Objects_Extend_information+0xc4> ffc0a18c: 4b ff ff b8 b ffc0a144 <_Objects_Extend_information+0x25c> <== ALWAYS TAKEN * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0a190: 56 b7 10 3a rlwinm r23,r21,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, ffc0a194: 80 9f 00 34 lwz r4,52(r31) ffc0a198: 7e e5 bb 78 mr r5,r23 ffc0a19c: 48 00 84 39 bl ffc125d4 <== ALWAYS TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0a1a0: 80 9f 00 30 lwz r4,48(r31) ffc0a1a4: 7e e5 bb 78 mr r5,r23 ffc0a1a8: 7f 03 c3 78 mr r3,r24 ffc0a1ac: 48 00 84 29 bl ffc125d4 <== ALWAYS TAKEN information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0a1b0: a0 bf 00 10 lhz r5,16(r31) ffc0a1b4: 80 9f 00 1c lwz r4,28(r31) ffc0a1b8: 7f 43 d3 78 mr r3,r26 ffc0a1bc: 7c bd 2a 14 add r5,r29,r5 ffc0a1c0: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0a1c4: 48 00 84 11 bl ffc125d4 <== ALWAYS TAKEN ffc0a1c8: 4b ff fe 54 b ffc0a01c <_Objects_Extend_information+0x134> <== ALWAYS TAKEN minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a1cc: a3 23 00 10 lhz r25,16(r3) ffc0a1d0: 7f be eb 78 mr r30,r29 ffc0a1d4: a1 43 00 14 lhz r10,20(r3) ffc0a1d8: 3b 60 00 00 li r27,0 ffc0a1dc: 3a a0 00 00 li r21,0 <== ALWAYS TAKEN ffc0a1e0: 4b ff fd a4 b ffc09f84 <_Objects_Extend_information+0x9c> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) ffc0a1e4: 7d 2a 4b 78 mr r10,r9 <== NOT EXECUTED ffc0a1e8: 7f be eb 78 mr r30,r29 <== NOT EXECUTED ffc0a1ec: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0a1f0: 4b ff fd 94 b ffc09f84 <_Objects_Extend_information+0x9c> <== 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 ); ffc0a1f4: 7f 83 e3 78 mr r3,r28 ffc0a1f8: 48 00 28 15 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN return; ffc0a1fc: 4b ff ff 48 b ffc0a144 <_Objects_Extend_information+0x25c> <== ALWAYS TAKEN ffc0a200: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0a204: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0a208: 4b ff fe 50 b ffc0a058 <_Objects_Extend_information+0x170> <== NOT EXECUTED ffc0a20c <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { ffc0a20c: 94 21 ff e8 stwu r1,-24(r1) ffc0a210: 7c 08 02 a6 mflr r0 ffc0a214: 90 01 00 1c stw r0,28(r1) <== ALWAYS TAKEN ffc0a218: 93 e1 00 14 stw r31,20(r1) ffc0a21c: 7c 7f 1b 78 mr r31,r3 uint32_t allocation_size = information->allocation_size; _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a220: 38 63 00 20 addi r3,r3,32 void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { ffc0a224: 93 a1 00 0c stw r29,12(r1) ffc0a228: 7c 9d 23 78 mr r29,r4 ffc0a22c: 93 c1 00 10 stw r30,16(r1) <== ALWAYS TAKEN uint32_t allocation_size = information->allocation_size; ffc0a230: a3 df 00 14 lhz r30,20(r31) <== ALWAYS TAKEN _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a234: 4b ff f0 d5 bl ffc09308 <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { ffc0a238: 88 1f 00 12 lbz r0,18(r31) ffc0a23c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a240: 41 9e 00 4c beq- cr7,ffc0a28c <_Objects_Free+0x80> uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - ffc0a244: a1 7d 00 0a lhz r11,10(r29) /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc0a248: 57 ca f8 7e rlwinm r10,r30,31,1,31 _Chain_Append( &information->Inactive, &the_object->Node ); if ( information->auto_extend ) { uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - ffc0a24c: a0 1f 00 0a lhz r0,10(r31) /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc0a250: 7f ca f2 14 add r30,r10,r30 block = (uint32_t) (_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; ffc0a254: a1 3f 00 14 lhz r9,20(r31) _Chain_Append( &information->Inactive, &the_object->Node ); if ( information->auto_extend ) { uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - ffc0a258: 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++; ffc0a25c: a1 7f 00 2c lhz r11,44(r31) block = (uint32_t) (_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; ffc0a260: 7c 00 4b 96 divwu r0,r0,r9 ffc0a264: 81 3f 00 30 lwz r9,48(r31) information->inactive++; ffc0a268: 39 6b 00 01 addi r11,r11,1 ffc0a26c: 55 6b 04 3e clrlwi r11,r11,16 /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc0a270: 7f 8b f0 40 cmplw cr7,r11,r30 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++; ffc0a274: b1 7f 00 2c sth r11,44(r31) block = (uint32_t) (_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; ffc0a278: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a27c: 7d 49 00 2e lwzx r10,r9,r0 ffc0a280: 39 6a 00 01 addi r11,r10,1 ffc0a284: 7d 69 01 2e stwx r11,r9,r0 /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc0a288: 41 9d 00 20 bgt- cr7,ffc0a2a8 <_Objects_Free+0x9c> _Objects_Shrink_information( information ); } } } ffc0a28c: 80 01 00 1c lwz r0,28(r1) ffc0a290: 83 a1 00 0c lwz r29,12(r1) ffc0a294: 7c 08 03 a6 mtlr r0 ffc0a298: 83 c1 00 10 lwz r30,16(r1) ffc0a29c: 83 e1 00 14 lwz r31,20(r1) ffc0a2a0: 38 21 00 18 addi r1,r1,24 ffc0a2a4: 4e 80 00 20 blr <== ALWAYS TAKEN * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { _Objects_Shrink_information( information ); ffc0a2a8: 7f e3 fb 78 mr r3,r31 ffc0a2ac: 48 00 03 65 bl ffc0a610 <_Objects_Shrink_information> <== ALWAYS TAKEN } } } ffc0a2b0: 80 01 00 1c lwz r0,28(r1) ffc0a2b4: 83 a1 00 0c lwz r29,12(r1) ffc0a2b8: 7c 08 03 a6 mtlr r0 ffc0a2bc: 83 c1 00 10 lwz r30,16(r1) ffc0a2c0: 83 e1 00 14 lwz r31,20(r1) ffc0a2c4: 38 21 00 18 addi r1,r1,24 ffc0a2c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a3ec <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { ffc0a3ec: 7c 08 02 a6 mflr r0 ffc0a3f0: 94 21 ff f0 stwu r1,-16(r1) ffc0a3f4: 90 01 00 14 stw r0,20(r1) * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; ffc0a3f8: 81 23 00 08 lwz r9,8(r3) /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { ffc0a3fc: a0 03 00 10 lhz r0,16(r3) * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; ffc0a400: 21 29 00 01 subfic r9,r9,1 ffc0a404: 7d 29 22 14 add r9,r9,r4 /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { ffc0a408: 7f 89 00 40 cmplw cr7,r9,r0 ffc0a40c: 41 9d 00 40 bgt- cr7,ffc0a44c <_Objects_Get+0x60> ffc0a410: 3d 60 00 00 lis r11,0 ffc0a414: 81 4b 27 2c lwz r10,10028(r11) ffc0a418: 38 0a 00 01 addi r0,r10,1 ffc0a41c: 90 0b 27 2c stw r0,10028(r11) _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { ffc0a420: 81 63 00 1c lwz r11,28(r3) ffc0a424: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0a428: 7c 6b 48 2e lwzx r3,r11,r9 <== ALWAYS TAKEN ffc0a42c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a430: 41 9e 00 38 beq- cr7,ffc0a468 <_Objects_Get+0x7c> *location = OBJECTS_LOCAL; ffc0a434: 38 00 00 00 li r0,0 ffc0a438: 90 05 00 00 stw r0,0(r5) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } ffc0a43c: 80 01 00 14 lwz r0,20(r1) ffc0a440: 38 21 00 10 addi r1,r1,16 ffc0a444: 7c 08 03 a6 mtlr r0 ffc0a448: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; ffc0a44c: 38 00 00 01 li r0,1 ffc0a450: 90 05 00 00 stw r0,0(r5) ffc0a454: 38 60 00 00 li r3,0 _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } ffc0a458: 80 01 00 14 lwz r0,20(r1) ffc0a45c: 38 21 00 10 addi r1,r1,16 ffc0a460: 7c 08 03 a6 mtlr r0 ffc0a464: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); ffc0a468: 90 61 00 08 stw r3,8(r1) ffc0a46c: 90 a1 00 0c stw r5,12(r1) ffc0a470: 48 00 0b 09 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; ffc0a474: 38 00 00 01 li r0,1 ffc0a478: 80 a1 00 0c lwz r5,12(r1) return NULL; ffc0a47c: 80 61 00 08 lwz r3,8(r1) /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); *location = OBJECTS_ERROR; ffc0a480: 90 05 00 00 stw r0,0(r5) return NULL; ffc0a484: 4b ff ff b8 b ffc0a43c <_Objects_Get+0x50> <== ALWAYS TAKEN ffc0a2f4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc0a2f4: 94 21 ff f0 stwu r1,-16(r1) ffc0a2f8: 7c 08 02 a6 mflr r0 ffc0a2fc: 93 e1 00 0c stw r31,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0a300: 7c 9f 23 79 mr. r31,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc0a304: 93 c1 00 08 stw r30,8(r1) ffc0a308: 7c 7e 1b 78 mr r30,r3 ffc0a30c: 90 01 00 14 stw r0,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0a310: 40 82 00 20 bne- ffc0a330 <_Objects_Get_information+0x3c> * 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 ) ffc0a314: 38 60 00 00 li r3,0 return NULL; #endif return info; } ffc0a318: 80 01 00 14 lwz r0,20(r1) ffc0a31c: 83 c1 00 08 lwz r30,8(r1) ffc0a320: 7c 08 03 a6 mtlr r0 ffc0a324: 83 e1 00 0c lwz r31,12(r1) ffc0a328: 38 21 00 10 addi r1,r1,16 ffc0a32c: 4e 80 00 20 blr <== ALWAYS TAKEN /* * 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 ); ffc0a330: 48 00 4f 29 bl ffc0f258 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) ffc0a334: 2c 03 00 00 cmpwi r3,0 ffc0a338: 41 82 ff dc beq+ ffc0a314 <_Objects_Get_information+0x20> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0a33c: 7f 9f 18 40 cmplw cr7,r31,r3 ffc0a340: 41 9d ff d4 bgt+ cr7,ffc0a314 <_Objects_Get_information+0x20> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0a344: 3d 20 00 00 lis r9,0 ffc0a348: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0a34c: 39 29 2b 80 addi r9,r9,11136 ffc0a350: 7d 29 f0 2e lwzx r9,r9,r30 ffc0a354: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a358: 41 9e ff bc beq+ cr7,ffc0a314 <_Objects_Get_information+0x20> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0a35c: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0a360: 7c 69 f8 2e lwzx r3,r9,r31 if ( !info ) ffc0a364: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a368: 41 9e ff b0 beq+ cr7,ffc0a318 <_Objects_Get_information+0x24> <== 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 ) ffc0a36c: a0 03 00 10 lhz r0,16(r3) <== ALWAYS TAKEN ffc0a370: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a374: 40 9e ff a4 bne+ cr7,ffc0a318 <_Objects_Get_information+0x24> ffc0a378: 4b ff ff 9c b ffc0a314 <_Objects_Get_information+0x20> <== ALWAYS TAKEN ffc0a2cc <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { ffc0a2cc: 94 21 ff f8 stwu r1,-8(r1) ffc0a2d0: 7c 08 02 a6 mflr r0 return _Objects_Get_information( ffc0a2d4: 54 64 2e fe rlwinm r4,r3,5,27,31 ffc0a2d8: 54 63 47 7e rlwinm r3,r3,8,29,31 #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { ffc0a2dc: 90 01 00 0c stw r0,12(r1) return _Objects_Get_information( ffc0a2e0: 48 00 00 15 bl ffc0a2f4 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } ffc0a2e4: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0a2e8: 38 21 00 08 addi r1,r1,8 ffc0a2ec: 7c 08 03 a6 mtlr r0 ffc0a2f0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a37c <_Objects_Get_isr_disable>: { Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; ffc0a37c: 80 03 00 08 lwz r0,8(r3) ffc0a380: 20 00 00 01 subfic r0,r0,1 ffc0a384: 7c 00 22 14 add r0,r0,r4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a388: 7d 60 00 a6 mfmsr r11 ffc0a38c: 7d 30 42 a6 mfsprg r9,0 ffc0a390: 7d 69 48 78 andc r9,r11,r9 ffc0a394: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( information->maximum >= index ) { ffc0a398: a1 23 00 10 lhz r9,16(r3) ffc0a39c: 7f 80 48 40 cmplw cr7,r0,r9 ffc0a3a0: 41 9d 00 28 bgt- cr7,ffc0a3c8 <_Objects_Get_isr_disable+0x4c> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc0a3a4: 81 23 00 1c lwz r9,28(r3) ffc0a3a8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a3ac: 7c 69 00 2e lwzx r3,r9,r0 ffc0a3b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a3b4: 41 9e 00 28 beq- cr7,ffc0a3dc <_Objects_Get_isr_disable+0x60> *location = OBJECTS_LOCAL; ffc0a3b8: 38 00 00 00 li r0,0 *level_p = level; ffc0a3bc: 91 66 00 00 stw r11,0(r6) index = id - information->minimum_id + 1; _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; ffc0a3c0: 90 05 00 00 stw r0,0(r5) *level_p = level; return the_object; ffc0a3c4: 4e 80 00 20 blr <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a3c8: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); *location = OBJECTS_ERROR; ffc0a3cc: 38 00 00 01 li r0,1 ffc0a3d0: 90 05 00 00 stw r0,0(r5) ffc0a3d4: 38 60 00 00 li r3,0 _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } ffc0a3d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a3dc: 7d 60 01 24 mtmsr r11 *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); *location = OBJECTS_ERROR; ffc0a3e0: 38 00 00 01 li r0,1 ffc0a3e4: 90 05 00 00 stw r0,0(r5) return NULL; ffc0a3e8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19950 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc19950: 94 21 ff d8 stwu r1,-40(r1) ffc19954: 7c 08 02 a6 mflr r0 ffc19958: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc1995c: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc19960: 93 e1 00 24 stw r31,36(r1) ffc19964: 7c bf 2b 78 mr r31,r5 ffc19968: 90 01 00 2c stw r0,44(r1) ffc1996c: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc19970: 40 82 00 28 bne- ffc19998 <_Objects_Get_name_as_string+0x48> } } *d = '\0'; _Thread_Enable_dispatch(); return name; ffc19974: 3b e0 00 00 li r31,0 } return NULL; /* unreachable path */ } ffc19978: 80 01 00 2c lwz r0,44(r1) ffc1997c: 7f e3 fb 78 mr r3,r31 ffc19980: 83 a1 00 1c lwz r29,28(r1) ffc19984: 7c 08 03 a6 mtlr r0 ffc19988: 83 c1 00 20 lwz r30,32(r1) ffc1998c: 83 e1 00 24 lwz r31,36(r1) ffc19990: 38 21 00 28 addi r1,r1,40 ffc19994: 4e 80 00 20 blr <== ALWAYS TAKEN Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) ffc19998: 2f 85 00 00 cmpwi cr7,r5,0 ffc1999c: 41 9e ff dc beq+ cr7,ffc19978 <_Objects_Get_name_as_string+0x28> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc199a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc199a4: 7c 7d 1b 78 mr r29,r3 ffc199a8: 40 9e 00 10 bne- cr7,ffc199b8 <_Objects_Get_name_as_string+0x68> ffc199ac: 3d 20 00 00 lis r9,0 ffc199b0: 81 29 29 70 lwz r9,10608(r9) ffc199b4: 83 a9 00 08 lwz r29,8(r9) information = _Objects_Get_information_id( tmpId ); ffc199b8: 7f a3 eb 78 mr r3,r29 ffc199bc: 4b ff 70 55 bl ffc10a10 <_Objects_Get_information_id> <== ALWAYS TAKEN if ( !information ) ffc199c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc199c4: 41 9e ff b0 beq+ cr7,ffc19974 <_Objects_Get_name_as_string+0x24> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc199c8: 7f a4 eb 78 mr r4,r29 ffc199cc: 38 a1 00 08 addi r5,r1,8 ffc199d0: 4b ff 71 61 bl ffc10b30 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { ffc199d4: 80 01 00 08 lwz r0,8(r1) ffc199d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc199dc: 40 be ff 98 bne- cr7,ffc19974 <_Objects_Get_name_as_string+0x24> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc199e0: 37 de ff ff addic. r30,r30,-1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc199e4: 81 23 00 0c lwz r9,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'; ffc199e8: 98 01 00 10 stb r0,16(r1) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc199ec: 55 2a 84 3e rlwinm r10,r9,16,16,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc199f0: 55 20 46 3e rlwinm r0,r9,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc199f4: 99 41 00 0d stb r10,13(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc199f8: 55 2b c2 3e rlwinm r11,r9,24,8,31 ffc199fc: 99 61 00 0e stb r11,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc19a00: 99 21 00 0f stb r9,15(r1) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc19a04: 98 01 00 0c stb r0,12(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc19a08: 41 82 00 6c beq- ffc19a74 <_Objects_Get_name_as_string+0x124> <== NEVER TAKEN ffc19a0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc19a10: 41 9e 00 64 beq- cr7,ffc19a74 <_Objects_Get_name_as_string+0x124> ffc19a14: 3d 00 00 00 lis r8,0 ffc19a18: 7f c9 03 a6 mtctr r30 ffc19a1c: 39 08 28 a4 addi r8,r8,10404 ffc19a20: 7f e9 fb 78 mr r9,r31 ffc19a24: 39 60 00 00 li r11,0 ffc19a28: 38 e1 00 0c addi r7,r1,12 ffc19a2c: 48 00 00 10 b ffc19a3c <_Objects_Get_name_as_string+0xec> <== ALWAYS TAKEN ffc19a30: 7c 07 58 ae lbzx r0,r7,r11 ffc19a34: 2f 80 00 00 cmpwi cr7,r0,0 ffc19a38: 41 9e 00 2c beq- cr7,ffc19a64 <_Objects_Get_name_as_string+0x114> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc19a3c: 81 48 00 00 lwz r10,0(r8) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc19a40: 39 6b 00 01 addi r11,r11,1 *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc19a44: 7d 4a 02 14 add r10,r10,r0 ffc19a48: 89 4a 00 01 lbz r10,1(r10) ffc19a4c: 71 46 00 97 andi. r6,r10,151 ffc19a50: 40 82 00 08 bne- ffc19a58 <_Objects_Get_name_as_string+0x108> ffc19a54: 38 00 00 2a li r0,42 ffc19a58: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc19a5c: 39 29 00 01 addi r9,r9,1 ffc19a60: 42 00 ff d0 bdnz+ ffc19a30 <_Objects_Get_name_as_string+0xe0> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc19a64: 38 00 00 00 li r0,0 ffc19a68: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc19a6c: 4b ff 7d 05 bl ffc11770 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return name; ffc19a70: 4b ff ff 08 b ffc19978 <_Objects_Get_name_as_string+0x28> <== ALWAYS TAKEN s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc19a74: 7f e9 fb 78 mr r9,r31 ffc19a78: 4b ff ff ec b ffc19a64 <_Objects_Get_name_as_string+0x114> <== ALWAYS TAKEN ffc1cb34 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc1cb34: 94 21 ff e8 stwu r1,-24(r1) ffc1cb38: 7c 08 02 a6 mflr r0 ffc1cb3c: 93 c1 00 10 stw r30,16(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc1cb40: 7c 7e 1b 79 mr. r30,r3 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc1cb44: 93 81 00 08 stw r28,8(r1) ffc1cb48: 7c dc 33 78 mr r28,r6 ffc1cb4c: 93 e1 00 14 stw r31,20(r1) ffc1cb50: 7c bf 2b 78 mr r31,r5 ffc1cb54: 90 01 00 1c stw r0,28(r1) ffc1cb58: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc1cb5c: 40 82 00 28 bne- ffc1cb84 <_Objects_Get_next+0x50> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; ffc1cb60: 38 60 00 00 li r3,0 } ffc1cb64: 80 01 00 1c lwz r0,28(r1) ffc1cb68: 83 81 00 08 lwz r28,8(r1) ffc1cb6c: 7c 08 03 a6 mtlr r0 ffc1cb70: 83 a1 00 0c lwz r29,12(r1) ffc1cb74: 83 c1 00 10 lwz r30,16(r1) ffc1cb78: 83 e1 00 14 lwz r31,20(r1) ffc1cb7c: 38 21 00 18 addi r1,r1,24 ffc1cb80: 4e 80 00 20 blr <== ALWAYS TAKEN Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) ffc1cb84: 2f 85 00 00 cmpwi cr7,r5,0 ffc1cb88: 41 9e ff d8 beq+ cr7,ffc1cb60 <_Objects_Get_next+0x2c> return NULL; if ( !next_id_p ) ffc1cb8c: 2f 86 00 00 cmpwi cr7,r6,0 ffc1cb90: 41 be ff d0 beq- cr7,ffc1cb60 <_Objects_Get_next+0x2c> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc1cb94: 54 80 04 3e clrlwi r0,r4,16 ffc1cb98: 2f 80 00 00 cmpwi cr7,r0,0 ffc1cb9c: 7c 9d 23 78 mr r29,r4 ffc1cba0: 40 9e 00 08 bne- cr7,ffc1cba8 <_Objects_Get_next+0x74> next_id = information->minimum_id; ffc1cba4: 83 be 00 08 lwz r29,8(r30) else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1cba8: a1 3e 00 10 lhz r9,16(r30) ffc1cbac: 57 a0 04 3e clrlwi r0,r29,16 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1cbb0: 7f a4 eb 78 mr r4,r29 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1cbb4: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1cbb8: 7f c3 f3 78 mr r3,r30 ffc1cbbc: 7f e5 fb 78 mr r5,r31 next_id++; ffc1cbc0: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1cbc4: 41 9c 00 38 blt- cr7,ffc1cbfc <_Objects_Get_next+0xc8> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1cbc8: 4b ff 3f 69 bl ffc10b30 <_Objects_Get> <== ALWAYS TAKEN next_id++; } while (*location_p != OBJECTS_LOCAL); ffc1cbcc: 80 1f 00 00 lwz r0,0(r31) ffc1cbd0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1cbd4: 40 9e ff d4 bne+ cr7,ffc1cba8 <_Objects_Get_next+0x74> return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc1cbd8: 80 01 00 1c lwz r0,28(r1) next_id++; } while (*location_p != OBJECTS_LOCAL); *next_id_p = next_id; ffc1cbdc: 93 bc 00 00 stw r29,0(r28) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc1cbe0: 7c 08 03 a6 mtlr r0 ffc1cbe4: 83 81 00 08 lwz r28,8(r1) ffc1cbe8: 83 a1 00 0c lwz r29,12(r1) ffc1cbec: 83 c1 00 10 lwz r30,16(r1) ffc1cbf0: 83 e1 00 14 lwz r31,20(r1) ffc1cbf4: 38 21 00 18 addi r1,r1,24 ffc1cbf8: 4e 80 00 20 blr <== ALWAYS TAKEN do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; ffc1cbfc: 38 00 00 01 li r0,1 ffc1cc00: 90 1f 00 00 stw r0,0(r31) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc1cc04: 38 00 ff ff li r0,-1 ffc1cc08: 38 60 00 00 li r3,0 ffc1cc0c: 90 1c 00 00 stw r0,0(r28) return 0; ffc1cc10: 4b ff ff 54 b ffc1cb64 <_Objects_Get_next+0x30> <== ALWAYS TAKEN ffc1deb0 <_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; ffc1deb0: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc1deb4: 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; ffc1deb8: 21 29 00 01 subfic r9,r9,1 ffc1debc: 7d 29 22 14 add r9,r9,r4 if ( information->maximum >= index ) { ffc1dec0: 7f 89 00 40 cmplw cr7,r9,r0 ffc1dec4: 41 9d 00 24 bgt- cr7,ffc1dee8 <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1dec8: 81 63 00 1c lwz r11,28(r3) ffc1decc: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc1ded0: 7c 6b 48 2e lwzx r3,r11,r9 ffc1ded4: 2f 83 00 00 cmpwi cr7,r3,0 ffc1ded8: 41 9e 00 10 beq- cr7,ffc1dee8 <_Objects_Get_no_protection+0x38> <== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1dedc: 38 00 00 00 li r0,0 ffc1dee0: 90 05 00 00 stw r0,0(r5) return the_object; ffc1dee4: 4e 80 00 20 blr <== ALWAYS TAKEN /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; ffc1dee8: 38 00 00 01 li r0,1 ffc1deec: 90 05 00 00 stw r0,0(r5) ffc1def0: 38 60 00 00 li r3,0 return NULL; } ffc1def4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10bcc <_Objects_Id_to_name>: /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc10bcc: 2c 03 00 00 cmpwi r3,0 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc10bd0: 94 21 ff e0 stwu r1,-32(r1) ffc10bd4: 7c 08 02 a6 mflr r0 ffc10bd8: 93 e1 00 1c stw r31,28(r1) ffc10bdc: 7c 9f 23 78 mr r31,r4 ffc10be0: 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; ffc10be4: 41 82 00 8c beq- ffc10c70 <_Objects_Id_to_name+0xa4> ffc10be8: 7c 64 1b 78 mr r4,r3 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc10bec: 54 89 47 7e rlwinm r9,r4,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc10bf0: 38 09 ff ff addi r0,r9,-1 ffc10bf4: 2b 80 00 03 cmplwi cr7,r0,3 ffc10bf8: 41 9d 00 60 bgt- cr7,ffc10c58 <_Objects_Id_to_name+0x8c> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc10bfc: 3d 60 00 00 lis r11,0 ffc10c00: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc10c04: 39 6b 34 c0 addi r11,r11,13504 ffc10c08: 7d 2b 48 2e lwzx r9,r11,r9 ffc10c0c: 2f 89 00 00 cmpwi cr7,r9,0 ffc10c10: 41 9e 00 48 beq- cr7,ffc10c58 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc10c14: 54 80 3e 7a rlwinm r0,r4,7,25,29 ffc10c18: 7c 69 00 2e lwzx r3,r9,r0 if ( !information ) ffc10c1c: 2f 83 00 00 cmpwi cr7,r3,0 ffc10c20: 41 9e 00 38 beq- cr7,ffc10c58 <_Objects_Id_to_name+0x8c> <== NEVER TAKEN #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 ); ffc10c24: 38 a1 00 08 addi r5,r1,8 ffc10c28: 4b ff ff 09 bl ffc10b30 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) ffc10c2c: 2c 03 00 00 cmpwi r3,0 ffc10c30: 41 82 00 28 beq- ffc10c58 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; *name = the_object->name; ffc10c34: 80 03 00 0c lwz r0,12(r3) ffc10c38: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc10c3c: 48 00 0b 35 bl ffc11770 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc10c40: 80 01 00 24 lwz r0,36(r1) the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); ffc10c44: 38 60 00 00 li r3,0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc10c48: 83 e1 00 1c lwz r31,28(r1) ffc10c4c: 7c 08 03 a6 mtlr r0 ffc10c50: 38 21 00 20 addi r1,r1,32 ffc10c54: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10c58: 80 01 00 24 lwz r0,36(r1) if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc10c5c: 38 60 00 03 li r3,3 } ffc10c60: 83 e1 00 1c lwz r31,28(r1) ffc10c64: 38 21 00 20 addi r1,r1,32 ffc10c68: 7c 08 03 a6 mtlr r0 ffc10c6c: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc10c70: 3d 20 00 00 lis r9,0 ffc10c74: 81 29 29 70 lwz r9,10608(r9) ffc10c78: 80 89 00 08 lwz r4,8(r9) ffc10c7c: 4b ff ff 70 b ffc10bec <_Objects_Id_to_name+0x20> <== ALWAYS TAKEN ffc0a488 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc0a488: 7c 08 02 a6 mflr r0 ffc0a48c: 94 21 ff f8 stwu r1,-8(r1) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc0a490: 3d 40 00 00 lis r10,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc0a494: 90 01 00 0c stw r0,12(r1) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; ffc0a498: 54 c0 0f fe rlwinm r0,r6,1,31,31 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc0a49c: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc0a4a0: 39 4a 2b 80 addi r10,r10,11136 <== ALWAYS TAKEN uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; ffc0a4a4: 90 e3 00 18 stw r7,24(r3) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc0a4a8: 54 8b 10 3a rlwinm r11,r4,2,0,29 ffc0a4ac: 7d 6a 58 2e lwzx r11,r10,r11 ffc0a4b0: 54 a8 10 3a rlwinm r8,r5,2,0,29 #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; ffc0a4b4: 39 40 00 00 li r10,0 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; ffc0a4b8: 90 83 00 00 stw r4,0(r3) ffc0a4bc: 54 c6 00 7f clrlwi. r6,r6,1 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc0a4c0: 7c 6b 41 2e stwx r3,r11,r8 /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; ffc0a4c4: b1 43 00 10 sth r10,16(r3) #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; ffc0a4c8: b0 a3 00 04 sth r5,4(r3) information->size = size; information->local_table = 0; ffc0a4cc: 91 43 00 1c stw r10,28(r3) information->inactive_per_block = 0; ffc0a4d0: 91 43 00 30 stw r10,48(r3) information->object_blocks = 0; ffc0a4d4: 91 43 00 34 stw r10,52(r3) <== ALWAYS TAKEN information->inactive = 0; ffc0a4d8: b1 43 00 2c sth r10,44(r3) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = ffc0a4dc: 98 03 00 12 stb r0,18(r3) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc0a4e0: 41 9e 00 08 beq- cr7,ffc0a4e8 <_Objects_Initialize_information+0x60> ffc0a4e4: 41 82 00 84 beq- ffc0a568 <_Objects_Initialize_information+0xe0> /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc0a4e8: 55 20 07 be clrlwi r0,r9,30 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; ffc0a4ec: b0 c3 00 14 sth r6,20(r3) <== ALWAYS TAKEN /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc0a4f0: 2f 80 00 00 cmpwi cr7,r0,0 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = ffc0a4f4: 54 84 c0 0e rlwinm r4,r4,24,0,7 ffc0a4f8: 64 84 00 01 oris r4,r4,1 ffc0a4fc: 54 a5 d8 08 rlwinm r5,r5,27,0,4 <== ALWAYS TAKEN ffc0a500: 7c 06 00 d0 neg r0,r6 ffc0a504: 54 00 0f fe rlwinm r0,r0,1,31,31 ffc0a508: 7c 85 2b 78 or r5,r4,r5 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc0a50c: 3d 60 00 00 lis r11,0 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = ffc0a510: 7c a5 03 78 or r5,r5,r0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc0a514: 39 6b 28 f4 addi r11,r11,10484 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = ffc0a518: 90 a3 00 08 stw r5,8(r3) * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ffc0a51c: 38 09 00 04 addi r0,r9,4 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc0a520: 91 63 00 1c stw r11,28(r3) * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ffc0a524: 54 00 00 3a rlwinm r0,r0,0,0,29 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc0a528: 41 9e 00 38 beq- cr7,ffc0a560 <_Objects_Initialize_information+0xd8> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0a52c: 39 63 00 24 addi r11,r3,36 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; ffc0a530: b0 03 00 38 sth r0,56(r3) <== ALWAYS TAKEN the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0a534: 39 23 00 20 addi r9,r3,32 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0a538: 38 00 00 00 li r0,0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0a53c: 91 63 00 20 stw r11,32(r3) the_chain->permanent_null = NULL; ffc0a540: 90 03 00 24 stw r0,36(r3) the_chain->last = _Chain_Head(the_chain); ffc0a544: 91 23 00 28 stw r9,40(r3) <== ALWAYS TAKEN _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { ffc0a548: 41 a2 00 08 beq+ ffc0a550 <_Objects_Initialize_information+0xc8> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); ffc0a54c: 4b ff f9 9d bl ffc09ee8 <_Objects_Extend_information> <== ALWAYS TAKEN _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } ffc0a550: 80 01 00 0c lwz r0,12(r1) ffc0a554: 38 21 00 08 addi r1,r1,8 ffc0a558: 7c 08 03 a6 mtlr r0 ffc0a55c: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc0a560: 7d 20 4b 78 mr r0,r9 <== ALWAYS TAKEN ffc0a564: 4b ff ff c8 b ffc0a52c <_Objects_Initialize_information+0xa4> <== ALWAYS TAKEN /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( ffc0a568: 38 60 00 00 li r3,0 ffc0a56c: 38 80 00 01 li r4,1 ffc0a570: 38 a0 00 14 li r5,20 ffc0a574: 4b ff f8 19 bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc0a584 <_Objects_Name_to_id_u32>: Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) ffc0a584: 2c 06 00 00 cmpwi r6,0 Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { ffc0a588: 7c 69 1b 78 mr r9,r3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) ffc0a58c: 38 60 00 02 li r3,2 ffc0a590: 4d 82 00 20 beqlr return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) ffc0a594: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a598: 41 9e 00 48 beq- cr7,ffc0a5e0 <_Objects_Name_to_id_u32+0x5c> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && ffc0a59c: a1 49 00 10 lhz r10,16(r9) ffc0a5a0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0a5a4: 41 9e 00 3c beq- cr7,ffc0a5e0 <_Objects_Name_to_id_u32+0x5c> ffc0a5a8: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a5ac: 40 9e 00 4c bne- cr7,ffc0a5f8 <_Objects_Name_to_id_u32+0x74> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { ffc0a5b0: 81 09 00 1c lwz r8,28(r9) ffc0a5b4: 39 20 00 01 li r9,1 the_object = information->local_table[ index ]; ffc0a5b8: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc0a5bc: 7d 68 00 2e lwzx r11,r8,r0 search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { ffc0a5c0: 39 29 00 01 addi r9,r9,1 ffc0a5c4: 7f 0a 48 40 cmplw cr6,r10,r9 the_object = information->local_table[ index ]; if ( !the_object ) ffc0a5c8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a5cc: 41 9e 00 10 beq- cr7,ffc0a5dc <_Objects_Name_to_id_u32+0x58> continue; if ( name == the_object->name.name_u32 ) { ffc0a5d0: 80 0b 00 0c lwz r0,12(r11) ffc0a5d4: 7f 80 20 00 cmpw cr7,r0,r4 ffc0a5d8: 41 9e 00 10 beq- cr7,ffc0a5e8 <_Objects_Name_to_id_u32+0x64> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { ffc0a5dc: 40 98 ff dc bge+ cr6,ffc0a5b8 <_Objects_Name_to_id_u32+0x34> ffc0a5e0: 38 60 00 01 li r3,1 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } ffc0a5e4: 4e 80 00 20 blr <== ALWAYS TAKEN the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; ffc0a5e8: 80 0b 00 08 lwz r0,8(r11) ffc0a5ec: 38 60 00 00 li r3,0 ffc0a5f0: 90 06 00 00 stw r0,0(r6) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0a5f4: 4e 80 00 20 blr <== ALWAYS TAKEN if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && ffc0a5f8: 6c a0 80 00 xoris r0,r5,32768 ffc0a5fc: 2f 80 ff ff cmpwi cr7,r0,-1 ffc0a600: 41 9e ff b0 beq+ cr7,ffc0a5b0 <_Objects_Name_to_id_u32+0x2c> ffc0a604: 2f 85 00 01 cmpwi cr7,r5,1 ffc0a608: 40 9e ff d8 bne+ cr7,ffc0a5e0 <_Objects_Name_to_id_u32+0x5c> ffc0a60c: 4b ff ff a4 b ffc0a5b0 <_Objects_Name_to_id_u32+0x2c> <== ALWAYS TAKEN ffc0a578 <_Objects_Namespace_remove>: * Clear out either format. */ #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) the_object->name.name_p = NULL; #endif the_object->name.name_u32 = 0; ffc0a578: 38 00 00 00 li r0,0 ffc0a57c: 90 04 00 0c stw r0,12(r4) } ffc0a580: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ceac <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0ceac: 94 21 ff f0 stwu r1,-16(r1) ffc0ceb0: 7c 08 02 a6 mflr r0 ffc0ceb4: 90 01 00 14 stw r0,20(r1) size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0ceb8: a0 03 00 38 lhz r0,56(r3) ffc0cebc: 7c a3 2b 78 mr r3,r5 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0cec0: 93 c1 00 08 stw r30,8(r1) ffc0cec4: 7c 9e 23 78 mr r30,r4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0cec8: 7c 04 03 78 mr r4,r0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0cecc: 93 e1 00 0c stw r31,12(r1) ffc0ced0: 7c bf 2b 78 mr r31,r5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0ced4: 48 00 8f e1 bl ffc15eb4 <== ALWAYS TAKEN d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0ced8: 2b 83 00 01 cmplwi cr7,r3,1 ffc0cedc: 89 3f 00 00 lbz r9,0(r31) ffc0cee0: 55 29 c0 0e rlwinm r9,r9,24,0,7 ffc0cee4: 40 9d 00 58 ble- cr7,ffc0cf3c <_Objects_Set_name+0x90> ffc0cee8: 2f 83 00 02 cmpwi cr7,r3,2 ffc0ceec: 88 1f 00 01 lbz r0,1(r31) ffc0cef0: 54 00 80 1e rlwinm r0,r0,16,0,15 ffc0cef4: 7c 09 4b 78 or r9,r0,r9 ffc0cef8: 41 9e 00 48 beq- cr7,ffc0cf40 <_Objects_Set_name+0x94> ffc0cefc: 2f 83 00 03 cmpwi cr7,r3,3 ffc0cf00: 89 7f 00 02 lbz r11,2(r31) ffc0cf04: 38 00 00 20 li r0,32 ffc0cf08: 55 6b 40 2e rlwinm r11,r11,8,0,23 ffc0cf0c: 7d 29 5b 78 or r9,r9,r11 ffc0cf10: 41 9e 00 08 beq- cr7,ffc0cf18 <_Objects_Set_name+0x6c> ffc0cf14: 88 1f 00 03 lbz r0,3(r31) ffc0cf18: 7d 20 03 78 or r0,r9,r0 ffc0cf1c: 90 1e 00 0c stw r0,12(r30) ); } return true; } ffc0cf20: 38 60 00 01 li r3,1 ffc0cf24: 80 01 00 14 lwz r0,20(r1) ffc0cf28: 83 c1 00 08 lwz r30,8(r1) ffc0cf2c: 7c 08 03 a6 mtlr r0 ffc0cf30: 83 e1 00 0c lwz r31,12(r1) ffc0cf34: 38 21 00 10 addi r1,r1,16 ffc0cf38: 4e 80 00 20 blr <== ALWAYS TAKEN d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0cf3c: 65 29 00 20 oris r9,r9,32 ffc0cf40: 61 29 20 00 ori r9,r9,8192 ffc0cf44: 38 00 00 20 li r0,32 ffc0cf48: 7d 20 03 78 or r0,r9,r0 ffc0cf4c: 90 1e 00 0c stw r0,12(r30) ); } return true; } ffc0cf50: 38 60 00 01 li r3,1 ffc0cf54: 80 01 00 14 lwz r0,20(r1) ffc0cf58: 83 c1 00 08 lwz r30,8(r1) ffc0cf5c: 7c 08 03 a6 mtlr r0 ffc0cf60: 83 e1 00 0c lwz r31,12(r1) ffc0cf64: 38 21 00 10 addi r1,r1,16 ffc0cf68: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a610 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a610: 94 21 ff e8 stwu r1,-24(r1) ffc0a614: 7c 08 02 a6 mflr r0 ffc0a618: 90 01 00 1c stw r0,28(r1) ffc0a61c: 93 c1 00 10 stw r30,16(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) / ffc0a620: a1 23 00 10 lhz r9,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0a624: a3 c3 00 0a lhz r30,10(r3) block_count = (information->maximum - index_base) / ffc0a628: a0 03 00 14 lhz r0,20(r3) ffc0a62c: 7d 3e 48 50 subf r9,r30,r9 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a630: 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) / ffc0a634: 7d 29 03 96 divwu r9,r9,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a638: 93 a1 00 0c stw r29,12(r1) ffc0a63c: 93 e1 00 14 stw r31,20(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++ ) { ffc0a640: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a644: 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++ ) { ffc0a648: 41 9e 00 3c beq- cr7,ffc0a684 <_Objects_Shrink_information+0x74> <== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0a64c: 81 63 00 30 lwz r11,48(r3) ffc0a650: 7d 29 03 a6 mtctr r9 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; ffc0a654: 3b e0 00 04 li r31,4 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 ] == ffc0a658: 81 2b 00 00 lwz r9,0(r11) ffc0a65c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0a660: 41 9e 00 44 beq- cr7,ffc0a6a4 <_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++ ) { ffc0a664: 42 40 00 20 bdz- ffc0a684 <_Objects_Shrink_information+0x74> <== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0a668: 7d 2b f8 2e lwzx r9,r11,r31 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0a66c: 7f de 02 14 add r30,r30,r0 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 ] == ffc0a670: 7f 80 48 00 cmpw cr7,r0,r9 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0a674: 39 3f 00 04 addi r9,r31,4 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 ] == ffc0a678: 41 9e 00 30 beq- cr7,ffc0a6a8 <_Objects_Shrink_information+0x98> ffc0a67c: 7d 3f 4b 78 mr r31,r9 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a680: 42 00 ff e8 bdnz+ ffc0a668 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0a684: 80 01 00 1c lwz r0,28(r1) ffc0a688: 83 81 00 08 lwz r28,8(r1) ffc0a68c: 7c 08 03 a6 mtlr r0 ffc0a690: 83 a1 00 0c lwz r29,12(r1) ffc0a694: 83 c1 00 10 lwz r30,16(r1) ffc0a698: 83 e1 00 14 lwz r31,20(r1) ffc0a69c: 38 21 00 18 addi r1,r1,24 ffc0a6a0: 4e 80 00 20 blr <== ALWAYS 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++ ) { if ( information->inactive_per_block[ block ] == ffc0a6a4: 3b e0 00 00 li r31,0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; ffc0a6a8: 80 7c 00 20 lwz r3,32(r28) ffc0a6ac: 48 00 00 10 b ffc0a6bc <_Objects_Shrink_information+0xac> <== ALWAYS TAKEN if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0a6b0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a6b4: 7f a3 eb 78 mr r3,r29 ffc0a6b8: 41 9e 00 34 beq- cr7,ffc0a6ec <_Objects_Shrink_information+0xdc> * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); ffc0a6bc: 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; ffc0a6c0: 83 a3 00 00 lwz r29,0(r3) if ((index >= index_base) && ffc0a6c4: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0a6c8: 41 bc ff e8 blt- cr7,ffc0a6b0 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0a6cc: a1 3c 00 14 lhz r9,20(r28) ffc0a6d0: 7d 3e 4a 14 add r9,r30,r9 ffc0a6d4: 7f 80 48 40 cmplw cr7,r0,r9 ffc0a6d8: 40 9c ff d8 bge+ cr7,ffc0a6b0 <_Objects_Shrink_information+0xa0> _Chain_Extract( &extract_me->Node ); ffc0a6dc: 48 00 44 99 bl ffc0eb74 <_Chain_Extract> <== ALWAYS TAKEN } } while ( the_object ); ffc0a6e0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a6e4: 7f a3 eb 78 mr r3,r29 ffc0a6e8: 40 9e ff d4 bne+ cr7,ffc0a6bc <_Objects_Shrink_information+0xac> <== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0a6ec: 81 3c 00 34 lwz r9,52(r28) ffc0a6f0: 7c 69 f8 2e lwzx r3,r9,r31 ffc0a6f4: 48 00 23 19 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0a6f8: a1 5c 00 2c lhz r10,44(r28) ffc0a6fc: 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; ffc0a700: 81 3c 00 34 lwz r9,52(r28) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0a704: 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; information->inactive_per_block[ block ] = 0; ffc0a708: 81 7c 00 30 lwz r11,48(r28) information->inactive -= information->allocation_size; ffc0a70c: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0a710: 80 01 00 1c lwz r0,28(r1) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0a714: 7f ab f9 2e stwx r29,r11,r31 return; } index_base += information->allocation_size; } } ffc0a718: 7c 08 03 a6 mtlr r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0a71c: 7f a9 f9 2e stwx r29,r9,r31 return; } index_base += information->allocation_size; } } ffc0a720: 83 81 00 08 lwz r28,8(r1) ffc0a724: 83 a1 00 0c lwz r29,12(r1) ffc0a728: 83 c1 00 10 lwz r30,16(r1) ffc0a72c: 83 e1 00 14 lwz r31,20(r1) ffc0a730: 38 21 00 18 addi r1,r1,24 ffc0a734: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e618 <_Partition_Manager_initialization>: * Output parameters: NONE */ void _Partition_Manager_initialization(void) { _Objects_Initialize_information( ffc0e618: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Partition_Manager_initialization(void) { ffc0e61c: 94 21 ff f8 stwu r1,-8(r1) ffc0e620: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN _Objects_Initialize_information( ffc0e624: 3c 60 00 00 lis r3,0 ffc0e628: 80 c9 20 84 lwz r6,8324(r9) ffc0e62c: 38 63 2e c4 addi r3,r3,11972 ffc0e630: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Partition_Manager_initialization(void) { ffc0e634: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0e638: 38 a0 00 05 li r5,5 <== ALWAYS TAKEN ffc0e63c: 38 e0 00 30 li r7,48 <== ALWAYS TAKEN ffc0e640: 39 00 00 00 li r8,0 ffc0e644: 39 20 00 04 li r9,4 ffc0e648: 4b ff be 41 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_PARTITION, _Partition_MP_Process_packet ); #endif } ffc0e64c: 80 01 00 0c lwz r0,12(r1) ffc0e650: 38 21 00 08 addi r1,r1,8 ffc0e654: 7c 08 03 a6 mtlr r0 ffc0e658: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a738 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { ffc0a738: 94 21 ff e0 stwu r1,-32(r1) ffc0a73c: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0a740: 93 e1 00 1c stw r31,28(r1) void *p; _RTEMS_Lock_allocator(); ffc0a744: 3f e0 00 00 lis r31,0 Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { ffc0a748: 93 c1 00 18 stw r30,24(r1) ffc0a74c: 7c 7e 1b 78 mr r30,r3 void *p; _RTEMS_Lock_allocator(); ffc0a750: 80 7f 27 64 lwz r3,10084(r31) Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { ffc0a754: 90 01 00 24 stw r0,36(r1) void *p; _RTEMS_Lock_allocator(); ffc0a758: 90 81 00 08 stw r4,8(r1) ffc0a75c: 90 a1 00 0c stw r5,12(r1) ffc0a760: 90 c1 00 10 stw r6,16(r1) <== ALWAYS TAKEN ffc0a764: 4b ff ea e5 bl ffc09248 <_API_Mutex_Lock> <== ALWAYS TAKEN p = _Heap_Allocate_aligned_with_boundary( ffc0a768: 7f c3 f3 78 mr r3,r30 <== ALWAYS TAKEN ffc0a76c: 80 81 00 08 lwz r4,8(r1) <== ALWAYS TAKEN ffc0a770: 80 a1 00 0c lwz r5,12(r1) ffc0a774: 80 c1 00 10 lwz r6,16(r1) ffc0a778: 48 00 47 31 bl ffc0eea8 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN ffc0a77c: 7c 7e 1b 78 mr r30,r3 heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); ffc0a780: 80 7f 27 64 lwz r3,10084(r31) ffc0a784: 4b ff eb 45 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN return p; } ffc0a788: 80 01 00 24 lwz r0,36(r1) ffc0a78c: 7f c3 f3 78 mr r3,r30 ffc0a790: 83 e1 00 1c lwz r31,28(r1) ffc0a794: 7c 08 03 a6 mtlr r0 ffc0a798: 83 c1 00 18 lwz r30,24(r1) ffc0a79c: 38 21 00 20 addi r1,r1,32 ffc0a7a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f4e0 <_Protected_heap_Extend>: bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc0f4e0: 94 21 ff d8 stwu r1,-40(r1) ffc0f4e4: 7c 08 02 a6 mflr r0 ffc0f4e8: 93 e1 00 24 stw r31,36(r1) Heap_Extend_status status; uintptr_t amount_extended; _RTEMS_Lock_allocator(); ffc0f4ec: 3f e0 00 00 lis r31,0 bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc0f4f0: 93 c1 00 20 stw r30,32(r1) ffc0f4f4: 7c 7e 1b 78 mr r30,r3 Heap_Extend_status status; uintptr_t amount_extended; _RTEMS_Lock_allocator(); ffc0f4f8: 80 7f 27 e8 lwz r3,10216(r31) bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc0f4fc: 90 01 00 2c stw r0,44(r1) Heap_Extend_status status; uintptr_t amount_extended; _RTEMS_Lock_allocator(); ffc0f500: 90 81 00 18 stw r4,24(r1) ffc0f504: 90 a1 00 1c stw r5,28(r1) ffc0f508: 4b ff dc d1 bl ffc0d1d8 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); ffc0f50c: 38 c1 00 08 addi r6,r1,8 ffc0f510: 80 81 00 18 lwz r4,24(r1) ffc0f514: 7f c3 f3 78 mr r3,r30 ffc0f518: 80 a1 00 1c lwz r5,28(r1) ffc0f51c: 48 00 4b 39 bl ffc14054 <_Heap_Extend> <== ALWAYS TAKEN ffc0f520: 7c 7e 1b 78 mr r30,r3 _RTEMS_Unlock_allocator(); ffc0f524: 80 7f 27 e8 lwz r3,10216(r31) ffc0f528: 4b ff dd 31 bl ffc0d258 <_API_Mutex_Unlock> <== ALWAYS TAKEN return (status == HEAP_EXTEND_SUCCESSFUL); } ffc0f52c: 80 01 00 2c lwz r0,44(r1) ffc0f530: 7f c3 00 34 cntlzw r3,r30 ffc0f534: 83 e1 00 24 lwz r31,36(r1) ffc0f538: 7c 08 03 a6 mtlr r0 ffc0f53c: 54 63 d9 7e rlwinm r3,r3,27,5,31 ffc0f540: 83 c1 00 20 lwz r30,32(r1) ffc0f544: 38 21 00 28 addi r1,r1,40 ffc0f548: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a7a4 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { ffc0a7a4: 94 21 ff e8 stwu r1,-24(r1) ffc0a7a8: 7c 08 02 a6 mflr r0 ffc0a7ac: 93 e1 00 14 stw r31,20(r1) bool status; _RTEMS_Lock_allocator(); ffc0a7b0: 3f e0 00 00 lis r31,0 bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { ffc0a7b4: 93 c1 00 10 stw r30,16(r1) ffc0a7b8: 7c 7e 1b 78 mr r30,r3 bool status; _RTEMS_Lock_allocator(); ffc0a7bc: 80 7f 27 64 lwz r3,10084(r31) bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { ffc0a7c0: 90 01 00 1c stw r0,28(r1) bool status; _RTEMS_Lock_allocator(); ffc0a7c4: 90 81 00 08 stw r4,8(r1) ffc0a7c8: 4b ff ea 81 bl ffc09248 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Free( the_heap, start_address ); ffc0a7cc: 7f c3 f3 78 mr r3,r30 ffc0a7d0: 80 81 00 08 lwz r4,8(r1) ffc0a7d4: 48 00 48 d9 bl ffc0f0ac <_Heap_Free> <== ALWAYS TAKEN ffc0a7d8: 7c 7e 1b 78 mr r30,r3 _RTEMS_Unlock_allocator(); ffc0a7dc: 80 7f 27 64 lwz r3,10084(r31) ffc0a7e0: 4b ff ea e9 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } ffc0a7e4: 80 01 00 1c lwz r0,28(r1) ffc0a7e8: 7f c3 f3 78 mr r3,r30 ffc0a7ec: 83 e1 00 14 lwz r31,20(r1) ffc0a7f0: 7c 08 03 a6 mtlr r0 ffc0a7f4: 83 c1 00 10 lwz r30,16(r1) ffc0a7f8: 38 21 00 18 addi r1,r1,24 ffc0a7fc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1cc18 <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { ffc1cc18: 94 21 ff e8 stwu r1,-24(r1) ffc1cc1c: 7c 08 02 a6 mflr r0 ffc1cc20: 93 e1 00 14 stw r31,20(r1) bool status; _RTEMS_Lock_allocator(); ffc1cc24: 3f e0 00 00 lis r31,0 bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { ffc1cc28: 93 c1 00 10 stw r30,16(r1) ffc1cc2c: 7c 7e 1b 78 mr r30,r3 bool status; _RTEMS_Lock_allocator(); ffc1cc30: 80 7f 27 64 lwz r3,10084(r31) bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { ffc1cc34: 90 01 00 1c stw r0,28(r1) bool status; _RTEMS_Lock_allocator(); ffc1cc38: 90 81 00 08 stw r4,8(r1) ffc1cc3c: 90 a1 00 0c stw r5,12(r1) ffc1cc40: 4b fe c6 09 bl ffc09248 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Size_of_alloc_area( the_heap, starting_address, size ); ffc1cc44: 7f c3 f3 78 mr r3,r30 ffc1cc48: 80 81 00 08 lwz r4,8(r1) ffc1cc4c: 80 a1 00 0c lwz r5,12(r1) ffc1cc50: 48 00 01 fd bl ffc1ce4c <_Heap_Size_of_alloc_area> <== ALWAYS TAKEN ffc1cc54: 7c 7e 1b 78 mr r30,r3 _RTEMS_Unlock_allocator(); ffc1cc58: 80 7f 27 64 lwz r3,10084(r31) ffc1cc5c: 4b fe c6 6d bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } ffc1cc60: 80 01 00 1c lwz r0,28(r1) ffc1cc64: 7f c3 f3 78 mr r3,r30 ffc1cc68: 83 e1 00 14 lwz r31,20(r1) ffc1cc6c: 7c 08 03 a6 mtlr r0 ffc1cc70: 83 c1 00 10 lwz r30,16(r1) ffc1cc74: 38 21 00 18 addi r1,r1,24 ffc1cc78: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10ad4 <_Protected_heap_Get_free_information>: bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { ffc10ad4: 94 21 ff e8 stwu r1,-24(r1) ffc10ad8: 7c 08 02 a6 mflr r0 ffc10adc: 93 e1 00 14 stw r31,20(r1) /* * TBD: _Heap_Get_free_information does not error check or return status. */ _RTEMS_Lock_allocator(); ffc10ae0: 3f e0 00 00 lis r31,0 bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { ffc10ae4: 93 c1 00 10 stw r30,16(r1) ffc10ae8: 7c 7e 1b 78 mr r30,r3 /* * TBD: _Heap_Get_free_information does not error check or return status. */ _RTEMS_Lock_allocator(); ffc10aec: 80 7f 36 0c lwz r3,13836(r31) bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { ffc10af0: 90 01 00 1c stw r0,28(r1) /* * TBD: _Heap_Get_free_information does not error check or return status. */ _RTEMS_Lock_allocator(); ffc10af4: 90 81 00 08 stw r4,8(r1) ffc10af8: 4b ff e7 09 bl ffc0f200 <_API_Mutex_Lock> <== ALWAYS TAKEN _Heap_Get_free_information( the_heap, info ); ffc10afc: 7f c3 f3 78 mr r3,r30 ffc10b00: 80 81 00 08 lwz r4,8(r1) ffc10b04: 48 02 26 3d bl ffc33140 <_Heap_Get_free_information> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); ffc10b08: 80 7f 36 0c lwz r3,13836(r31) ffc10b0c: 4b ff e7 75 bl ffc0f280 <_API_Mutex_Unlock> <== ALWAYS TAKEN return true; } ffc10b10: 80 01 00 1c lwz r0,28(r1) ffc10b14: 38 60 00 01 li r3,1 ffc10b18: 83 c1 00 10 lwz r30,16(r1) ffc10b1c: 7c 08 03 a6 mtlr r0 ffc10b20: 83 e1 00 14 lwz r31,20(r1) ffc10b24: 38 21 00 18 addi r1,r1,24 ffc10b28: 4e 80 00 20 blr <== ALWAYS TAKEN ffc33394 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { ffc33394: 94 21 ff e8 stwu r1,-24(r1) ffc33398: 7c 08 02 a6 mflr r0 ffc3339c: 93 c1 00 10 stw r30,16(r1) if ( !the_heap ) ffc333a0: 7c 7e 1b 79 mr. r30,r3 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { ffc333a4: 90 01 00 1c stw r0,28(r1) ffc333a8: 93 e1 00 14 stw r31,20(r1) if ( !the_heap ) ffc333ac: 41 82 00 4c beq- ffc333f8 <_Protected_heap_Get_information+0x64> return false; if ( !the_info ) ffc333b0: 2f 84 00 00 cmpwi cr7,r4,0 ffc333b4: 41 9e 00 44 beq- cr7,ffc333f8 <_Protected_heap_Get_information+0x64> return false; _RTEMS_Lock_allocator(); ffc333b8: 3f e0 00 00 lis r31,0 ffc333bc: 90 81 00 08 stw r4,8(r1) ffc333c0: 80 7f 36 0c lwz r3,13836(r31) ffc333c4: 4b fd be 3d bl ffc0f200 <_API_Mutex_Lock> <== ALWAYS TAKEN _Heap_Get_information( the_heap, the_info ); ffc333c8: 80 81 00 08 lwz r4,8(r1) ffc333cc: 7f c3 f3 78 mr r3,r30 ffc333d0: 48 01 3b 25 bl ffc46ef4 <_Heap_Get_information> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); ffc333d4: 80 7f 36 0c lwz r3,13836(r31) ffc333d8: 4b fd be a9 bl ffc0f280 <_API_Mutex_Unlock> <== ALWAYS TAKEN return true; } ffc333dc: 80 01 00 1c lwz r0,28(r1) if ( !the_info ) return false; _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); ffc333e0: 38 60 00 01 li r3,1 return true; } ffc333e4: 83 c1 00 10 lwz r30,16(r1) ffc333e8: 7c 08 03 a6 mtlr r0 ffc333ec: 83 e1 00 14 lwz r31,20(r1) ffc333f0: 38 21 00 18 addi r1,r1,24 ffc333f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc333f8: 80 01 00 1c lwz r0,28(r1) _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; ffc333fc: 38 60 00 00 li r3,0 } ffc33400: 83 c1 00 10 lwz r30,16(r1) ffc33404: 7c 08 03 a6 mtlr r0 ffc33408: 83 e1 00 14 lwz r31,20(r1) ffc3340c: 38 21 00 18 addi r1,r1,24 ffc33410: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a800 <_Protected_heap_Get_size>: uintptr_t _Protected_heap_Get_size( Heap_Control *the_heap ) { return _Heap_Get_size( the_heap ); } ffc0a800: 80 63 00 2c lwz r3,44(r3) ffc0a804: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1cc7c <_Protected_heap_Resize_block>: bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc1cc7c: 94 21 ff d8 stwu r1,-40(r1) ffc1cc80: 7c 08 02 a6 mflr r0 ffc1cc84: 93 e1 00 24 stw r31,36(r1) Heap_Resize_status status; uintptr_t old_mem_size; uintptr_t avail_mem_size; _RTEMS_Lock_allocator(); ffc1cc88: 3f e0 00 00 lis r31,0 bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc1cc8c: 93 c1 00 20 stw r30,32(r1) ffc1cc90: 7c 7e 1b 78 mr r30,r3 Heap_Resize_status status; uintptr_t old_mem_size; uintptr_t avail_mem_size; _RTEMS_Lock_allocator(); ffc1cc94: 80 7f 27 64 lwz r3,10084(r31) bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc1cc98: 90 01 00 2c stw r0,44(r1) Heap_Resize_status status; uintptr_t old_mem_size; uintptr_t avail_mem_size; _RTEMS_Lock_allocator(); ffc1cc9c: 90 81 00 18 stw r4,24(r1) ffc1cca0: 90 a1 00 1c stw r5,28(r1) ffc1cca4: 4b fe c5 a5 bl ffc09248 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Resize_block( ffc1cca8: 38 c1 00 08 addi r6,r1,8 ffc1ccac: 80 81 00 18 lwz r4,24(r1) ffc1ccb0: 38 e1 00 0c addi r7,r1,12 ffc1ccb4: 80 a1 00 1c lwz r5,28(r1) ffc1ccb8: 7f c3 f3 78 mr r3,r30 ffc1ccbc: 48 00 00 31 bl ffc1ccec <_Heap_Resize_block> <== ALWAYS TAKEN ffc1ccc0: 7c 7e 1b 78 mr r30,r3 the_heap, starting_address, size, &old_mem_size, &avail_mem_size ); _RTEMS_Unlock_allocator(); ffc1ccc4: 80 7f 27 64 lwz r3,10084(r31) ffc1ccc8: 4b fe c6 01 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN return (status == HEAP_RESIZE_SUCCESSFUL); } ffc1cccc: 80 01 00 2c lwz r0,44(r1) ffc1ccd0: 7f c3 00 34 cntlzw r3,r30 ffc1ccd4: 83 e1 00 24 lwz r31,36(r1) ffc1ccd8: 7c 08 03 a6 mtlr r0 ffc1ccdc: 54 63 d9 7e rlwinm r3,r3,27,5,31 ffc1cce0: 83 c1 00 20 lwz r30,32(r1) ffc1cce4: 38 21 00 28 addi r1,r1,40 ffc1cce8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f75c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0f75c: 94 21 ff e8 stwu r1,-24(r1) ffc0f760: 7c 08 02 a6 mflr r0 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0f764: 3d 20 00 00 lis r9,0 bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0f768: 90 01 00 1c stw r0,28(r1) * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0f76c: 80 09 27 b0 lwz r0,10160(r9) bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0f770: 93 a1 00 0c stw r29,12(r1) ffc0f774: 7c 7d 1b 78 mr r29,r3 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0f778: 2f 80 00 00 cmpwi cr7,r0,0 bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0f77c: 93 c1 00 10 stw r30,16(r1) ffc0f780: 7c 9e 23 78 mr r30,r4 ffc0f784: 93 e1 00 14 stw r31,20(r1) ffc0f788: 7c bf 2b 78 mr r31,r5 ffc0f78c: 93 81 00 08 stw r28,8(r1) * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0f790: 41 9e 00 30 beq- cr7,ffc0f7c0 <_Protected_heap_Walk+0x64> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); ffc0f794: 4b ff ec 1d bl ffc0e3b0 <_Heap_Walk> <== ALWAYS TAKEN } return status; } ffc0f798: 80 01 00 1c lwz r0,28(r1) if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); ffc0f79c: 7c 7f 1b 78 mr r31,r3 } return status; } ffc0f7a0: 83 81 00 08 lwz r28,8(r1) ffc0f7a4: 7c 08 03 a6 mtlr r0 ffc0f7a8: 7f e3 fb 78 mr r3,r31 ffc0f7ac: 83 a1 00 0c lwz r29,12(r1) ffc0f7b0: 83 c1 00 10 lwz r30,16(r1) ffc0f7b4: 83 e1 00 14 lwz r31,20(r1) ffc0f7b8: 38 21 00 18 addi r1,r1,24 ffc0f7bc: 4e 80 00 20 blr <== ALWAYS TAKEN * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); ffc0f7c0: 3f 80 00 00 lis r28,0 ffc0f7c4: 80 7c 27 e8 lwz r3,10216(r28) ffc0f7c8: 4b ff da 11 bl ffc0d1d8 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Walk( the_heap, source, do_dump ); ffc0f7cc: 7f c4 f3 78 mr r4,r30 ffc0f7d0: 7f e5 fb 78 mr r5,r31 ffc0f7d4: 7f a3 eb 78 mr r3,r29 ffc0f7d8: 4b ff eb d9 bl ffc0e3b0 <_Heap_Walk> <== ALWAYS TAKEN ffc0f7dc: 7c 7f 1b 78 mr r31,r3 _RTEMS_Unlock_allocator(); ffc0f7e0: 80 7c 27 e8 lwz r3,10216(r28) ffc0f7e4: 4b ff da 75 bl ffc0d258 <_API_Mutex_Unlock> <== ALWAYS TAKEN } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } ffc0f7e8: 80 01 00 1c lwz r0,28(r1) ffc0f7ec: 7f e3 fb 78 mr r3,r31 ffc0f7f0: 83 81 00 08 lwz r28,8(r1) ffc0f7f4: 7c 08 03 a6 mtlr r0 ffc0f7f8: 83 a1 00 0c lwz r29,12(r1) ffc0f7fc: 83 c1 00 10 lwz r30,16(r1) ffc0f800: 83 e1 00 14 lwz r31,20(r1) ffc0f804: 38 21 00 18 addi r1,r1,24 ffc0f808: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09038 <_RTEMS_API_Initialize>: * * XXX */ void _RTEMS_API_Initialize(void) { ffc09038: 94 21 ff f8 stwu r1,-8(r1) ffc0903c: 7c 08 02 a6 mflr r0 /* * Install our API Object Management Table and initialize the * various managers. */ _Objects_Information_table[OBJECTS_CLASSIC_API] = _RTEMS_Objects; ffc09040: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN * * XXX */ void _RTEMS_API_Initialize(void) { ffc09044: 90 01 00 0c stw r0,12(r1) /* * Install our API Object Management Table and initialize the * various managers. */ _Objects_Information_table[OBJECTS_CLASSIC_API] = _RTEMS_Objects; ffc09048: 38 09 2d 98 addi r0,r9,11672 ffc0904c: 3d 20 00 00 lis r9,0 ffc09050: 90 09 2b 88 stw r0,11144(r9) #if defined(RTEMS_MULTIPROCESSING) _Multiprocessing_Manager_initialization(); #endif _RTEMS_tasks_Manager_initialization(); ffc09054: 48 00 57 c9 bl ffc0e81c <_RTEMS_tasks_Manager_initialization> <== ALWAYS TAKEN _Timer_Manager_initialization(); ffc09058: 48 00 56 8d bl ffc0e6e4 <_Timer_Manager_initialization> <== ALWAYS TAKEN _Signal_Manager_initialization(); ffc0905c: 48 00 57 1d bl ffc0e778 <_Signal_Manager_initialization> <== ALWAYS TAKEN _Event_Manager_initialization(); ffc09060: 48 00 55 65 bl ffc0e5c4 <_Event_Manager_initialization> <== ALWAYS TAKEN _Message_queue_Manager_initialization(); ffc09064: 48 00 55 71 bl ffc0e5d4 <_Message_queue_Manager_initialization> <== ALWAYS TAKEN _Semaphore_Manager_initialization(); ffc09068: 48 00 56 cd bl ffc0e734 <_Semaphore_Manager_initialization> <== ALWAYS TAKEN _Partition_Manager_initialization(); ffc0906c: 48 00 55 ad bl ffc0e618 <_Partition_Manager_initialization> <== ALWAYS TAKEN _Region_Manager_initialization(); ffc09070: 48 00 56 31 bl ffc0e6a0 <_Region_Manager_initialization> <== ALWAYS TAKEN _Dual_ported_memory_Manager_initialization(); ffc09074: 48 00 55 0d bl ffc0e580 <_Dual_ported_memory_Manager_initialization> <== ALWAYS TAKEN _Rate_monotonic_Manager_initialization(); ffc09078: 48 00 55 e5 bl ffc0e65c <_Rate_monotonic_Manager_initialization> <== ALWAYS TAKEN _Barrier_Manager_initialization(); ffc0907c: 48 00 54 c1 bl ffc0e53c <_Barrier_Manager_initialization> <== ALWAYS TAKEN } ffc09080: 80 01 00 0c lwz r0,12(r1) ffc09084: 38 21 00 08 addi r1,r1,8 ffc09088: 7c 08 03 a6 mtlr r0 ffc0908c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ea58 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { ffc0ea58: 94 21 ff f0 stwu r1,-16(r1) ffc0ea5c: 7c 08 02 a6 mflr r0 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { ffc0ea60: 3d 20 00 00 lis r9,0 void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { ffc0ea64: 90 01 00 14 stw r0,20(r1) void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { ffc0ea68: 80 09 27 6c lwz r0,10092(r9) void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { ffc0ea6c: 93 e1 00 0c stw r31,12(r1) ffc0ea70: 7c 9f 23 78 mr r31,r4 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { ffc0ea74: 7f 80 18 00 cmpw cr7,r0,r3 ) { void (*dtor)(void *); void *value; dtor = tvp->dtor; ffc0ea78: 80 04 00 10 lwz r0,16(r4) if (_Thread_Is_executing(the_thread)) { ffc0ea7c: 41 9e 00 34 beq- cr7,ffc0eab0 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x58> value = *tvp->ptr; *tvp->ptr = tvp->gval; } else { value = tvp->tval; ffc0ea80: 80 64 00 0c lwz r3,12(r4) } if ( dtor ) ffc0ea84: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ea88: 41 9e 00 0c beq- cr7,ffc0ea94 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x3c> (*dtor)(value); ffc0ea8c: 7c 09 03 a6 mtctr r0 ffc0ea90: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Workspace_Free(tvp); ffc0ea94: 7f e3 fb 78 mr r3,r31 ffc0ea98: 4b ff df 75 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN } ffc0ea9c: 80 01 00 14 lwz r0,20(r1) ffc0eaa0: 83 e1 00 0c lwz r31,12(r1) ffc0eaa4: 38 21 00 10 addi r1,r1,16 ffc0eaa8: 7c 08 03 a6 mtlr r0 ffc0eaac: 4e 80 00 20 blr <== ALWAYS TAKEN void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; ffc0eab0: 81 24 00 04 lwz r9,4(r4) *tvp->ptr = tvp->gval; ffc0eab4: 81 64 00 08 lwz r11,8(r4) void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; ffc0eab8: 80 69 00 00 lwz r3,0(r9) *tvp->ptr = tvp->gval; ffc0eabc: 91 69 00 00 stw r11,0(r9) ffc0eac0: 4b ff ff c4 b ffc0ea84 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x2c> <== ALWAYS TAKEN ffc0e9a8 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { ffc0e9a8: 94 21 ff f0 stwu r1,-16(r1) ffc0e9ac: 7c 08 02 a6 mflr r0 ffc0e9b0: 93 e1 00 0c stw r31,12(r1) /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) ffc0e9b4: 3f e0 00 00 lis r31,0 ffc0e9b8: 3b ff 20 70 addi r31,r31,8304 bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { ffc0e9bc: 90 01 00 14 stw r0,20(r1) /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) ffc0e9c0: 88 1f 00 04 lbz r0,4(r31) bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { ffc0e9c4: 93 c1 00 08 stw r30,8(r1) ffc0e9c8: 7c 9e 23 78 mr r30,r4 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) ffc0e9cc: 7c 00 00 d0 neg r0,r0 ffc0e9d0: 54 03 3e 72 rlwinm r3,r0,7,25,25 <== ALWAYS TAKEN to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); ffc0e9d4: 38 63 00 20 addi r3,r3,32 ffc0e9d8: 4b ff e0 01 bl ffc0c9d8 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !api ) ffc0e9dc: 7c 6b 1b 79 mr. r11,r3 ffc0e9e0: 38 60 00 00 li r3,0 ffc0e9e4: 41 82 00 5c beq- ffc0ea40 <_RTEMS_tasks_Create_extension+0x98> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; ffc0e9e8: 38 00 00 00 li r0,0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; ffc0e9ec: 91 7e 01 40 stw r11,320(r30) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; ffc0e9f0: 98 0b 00 08 stb r0,8(r11) api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { ffc0e9f4: 89 3f 00 04 lbz r9,4(r31) <== ALWAYS TAKEN created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; ffc0e9f8: 90 1e 01 50 stw r0,336(r30) if ( rtems_configuration_get_notepads_enabled() ) { ffc0e9fc: 2f 89 00 00 cmpwi cr7,r9,0 <== ALWAYS TAKEN if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; ffc0ea00: 90 0b 00 00 stw r0,0(r11) api->event_condition = 0; ffc0ea04: 90 0b 00 04 stw r0,4(r11) information->handler = NULL; ffc0ea08: 90 0b 00 0c stw r0,12(r11) <== ALWAYS TAKEN information->mode_set = RTEMS_DEFAULT_MODES; ffc0ea0c: 90 0b 00 10 stw r0,16(r11) information->signals_posted = 0; ffc0ea10: 90 0b 00 14 stw r0,20(r11) information->signals_pending = 0; ffc0ea14: 90 0b 00 18 stw r0,24(r11) information->nest_level = 0; ffc0ea18: 90 0b 00 1c stw r0,28(r11) <== ALWAYS TAKEN _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { ffc0ea1c: 41 9e 00 20 beq- cr7,ffc0ea3c <_RTEMS_tasks_Create_extension+0x94> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; ffc0ea20: 39 40 00 10 li r10,16 ffc0ea24: 7d 49 03 a6 mtctr r10 api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { ffc0ea28: 39 20 00 00 li r9,0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; ffc0ea2c: 7d 4b 4a 14 add r10,r11,r9 ffc0ea30: 90 0a 00 20 stw r0,32(r10) ffc0ea34: 39 29 00 04 addi r9,r9,4 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) ffc0ea38: 42 00 ff f4 bdnz+ ffc0ea2c <_RTEMS_tasks_Create_extension+0x84> ffc0ea3c: 38 60 00 01 li r3,1 api->Notepads[i] = 0; } return true; } ffc0ea40: 80 01 00 14 lwz r0,20(r1) ffc0ea44: 83 c1 00 08 lwz r30,8(r1) ffc0ea48: 7c 08 03 a6 mtlr r0 ffc0ea4c: 83 e1 00 0c lwz r31,12(r1) ffc0ea50: 38 21 00 10 addi r1,r1,16 ffc0ea54: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e93c <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { ffc0e93c: 94 21 ff f0 stwu r1,-16(r1) ffc0e940: 7c 08 02 a6 mflr r0 ffc0e944: 90 01 00 14 stw r0,20(r1) /* * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; ffc0e948: 38 00 00 00 li r0,0 void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { ffc0e94c: 93 c1 00 08 stw r30,8(r1) ffc0e950: 7c 9e 23 78 mr r30,r4 /* * Free per task variable memory */ tvp = deleted->task_variables; ffc0e954: 80 84 01 50 lwz r4,336(r4) void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { ffc0e958: 93 e1 00 0c stw r31,12(r1) * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { ffc0e95c: 2f 84 00 00 cmpwi cr7,r4,0 /* * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; ffc0e960: 90 1e 01 50 stw r0,336(r30) while (tvp) { ffc0e964: 41 9e 00 1c beq- cr7,ffc0e980 <_RTEMS_tasks_Delete_extension+0x44> next = (rtems_task_variable_t *)tvp->next; ffc0e968: 83 e4 00 00 lwz r31,0(r4) _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); ffc0e96c: 7f c3 f3 78 mr r3,r30 ffc0e970: 48 00 00 e9 bl ffc0ea58 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { ffc0e974: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0e978: 7f e4 fb 78 mr r4,r31 ffc0e97c: 40 9e ff ec bne+ cr7,ffc0e968 <_RTEMS_tasks_Delete_extension+0x2c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); ffc0e980: 80 7e 01 40 lwz r3,320(r30) <== ALWAYS TAKEN ffc0e984: 4b ff e0 89 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; ffc0e988: 38 00 00 00 li r0,0 ffc0e98c: 90 1e 01 40 stw r0,320(r30) } ffc0e990: 80 01 00 14 lwz r0,20(r1) ffc0e994: 83 c1 00 08 lwz r30,8(r1) ffc0e998: 7c 08 03 a6 mtlr r0 ffc0e99c: 83 e1 00 0c lwz r31,12(r1) ffc0e9a0: 38 21 00 10 addi r1,r1,16 ffc0e9a4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e7e8 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { ffc0e7e8: 7c 08 02 a6 mflr r0 ffc0e7ec: 94 21 ff f8 stwu r1,-8(r1) if ( _RTEMS_tasks_Initialize_user_tasks_p ) ffc0e7f0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { ffc0e7f4: 90 01 00 0c stw r0,12(r1) if ( _RTEMS_tasks_Initialize_user_tasks_p ) ffc0e7f8: 80 09 26 68 lwz r0,9832(r9) ffc0e7fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e800: 41 9e 00 0c beq- cr7,ffc0e80c <_RTEMS_tasks_Initialize_user_tasks+0x24> (*_RTEMS_tasks_Initialize_user_tasks_p)(); ffc0e804: 7c 09 03 a6 mtctr r0 ffc0e808: 4e 80 04 21 bctrl <== ALWAYS TAKEN } ffc0e80c: 80 01 00 0c lwz r0,12(r1) ffc0e810: 38 21 00 08 addi r1,r1,8 ffc0e814: 7c 08 03 a6 mtlr r0 ffc0e818: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08abc <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08abc: 94 21 ff d8 stwu r1,-40(r1) <== ALWAYS TAKEN ffc08ac0: 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; ffc08ac4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08ac8: 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; ffc08acc: 39 29 20 70 addi r9,r9,8304 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08ad0: 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; ffc08ad4: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08ad8: 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 ) ffc08adc: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08ae0: 93 81 00 18 stw r28,24(r1) <== ALWAYS TAKEN ffc08ae4: 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; ffc08ae8: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc08aec: 41 9e 00 60 beq- cr7,ffc08b4c <_RTEMS_tasks_Initialize_user_tasks_body+0x90> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc08af0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc08af4: 41 9e 00 58 beq- cr7,ffc08b4c <_RTEMS_tasks_Initialize_user_tasks_body+0x90> <== NEVER TAKEN ffc08af8: 3b c0 00 00 li r30,0 <== ALWAYS TAKEN ffc08afc: 3b 81 00 08 addi r28,r1,8 return_value = rtems_task_create( ffc08b00: 80 7f 00 00 lwz r3,0(r31) ffc08b04: 7f 88 e3 78 mr r8,r28 ffc08b08: 80 9f 00 08 lwz r4,8(r31) ffc08b0c: 80 bf 00 04 lwz r5,4(r31) ffc08b10: 80 df 00 14 lwz r6,20(r31) ffc08b14: 80 ff 00 0c lwz r7,12(r31) ffc08b18: 4b ff fc a9 bl ffc087c0 <== ALWAYS TAKEN user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc08b1c: 2c 03 00 00 cmpwi r3,0 ffc08b20: 40 82 00 4c bne- ffc08b6c <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc08b24: 80 61 00 08 lwz r3,8(r1) ffc08b28: 80 9f 00 10 lwz r4,16(r31) ffc08b2c: 80 bf 00 18 lwz r5,24(r31) ffc08b30: 48 00 00 4d bl ffc08b7c <== ALWAYS TAKEN id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc08b34: 2c 03 00 00 cmpwi r3,0 ffc08b38: 40 82 00 34 bne- ffc08b6c <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc08b3c: 3b de 00 01 addi r30,r30,1 ffc08b40: 7f 9d f0 40 cmplw cr7,r29,r30 <== ALWAYS TAKEN ffc08b44: 3b ff 00 1c addi r31,r31,28 ffc08b48: 41 9d ff b8 bgt+ cr7,ffc08b00 <_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 ); } } ffc08b4c: 80 01 00 2c lwz r0,44(r1) ffc08b50: 83 81 00 18 lwz r28,24(r1) ffc08b54: 7c 08 03 a6 mtlr r0 ffc08b58: 83 a1 00 1c lwz r29,28(r1) ffc08b5c: 83 c1 00 20 lwz r30,32(r1) ffc08b60: 83 e1 00 24 lwz r31,36(r1) ffc08b64: 38 21 00 28 addi r1,r1,40 ffc08b68: 4e 80 00 20 blr <== ALWAYS TAKEN 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 ); ffc08b6c: 7c 65 1b 78 mr r5,r3 ffc08b70: 38 80 00 01 li r4,1 ffc08b74: 38 60 00 01 li r3,1 ffc08b78: 48 00 12 15 bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc0e81c <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0e81c: 94 21 ff f0 stwu r1,-16(r1) _Objects_Initialize_information( ffc0e820: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0e824: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0e828: 3c 60 00 00 lis r3,0 ffc0e82c: 80 c9 20 70 lwz r6,8304(r9) ffc0e830: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0e834: 93 e1 00 0c stw r31,12(r1) RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); ffc0e838: 3f e0 00 00 lis r31,0 _Objects_Initialize_information( ffc0e83c: 38 a0 00 01 li r5,1 ffc0e840: 38 e0 01 54 li r7,340 <== ALWAYS TAKEN * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0e844: 90 01 00 14 stw r0,20(r1) _Objects_Initialize_information( ffc0e848: 39 00 00 00 li r8,0 ffc0e84c: 39 20 00 04 li r9,4 ffc0e850: 3b ff 21 78 addi r31,r31,8568 ffc0e854: 38 63 2b 2c addi r3,r3,11052 ffc0e858: 4b ff bc 31 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN ffc0e85c: 7f e3 fb 78 mr r3,r31 ffc0e860: 48 00 0f 11 bl ffc0f770 <_User_extensions_Add_set> <== ALWAYS TAKEN * Add all the extensions for this API */ _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions ); _API_extensions_Add( &_RTEMS_tasks_API_extensions ); ffc0e864: 38 7f 00 34 addi r3,r31,52 ffc0e868: 4b ff a9 15 bl ffc0917c <_API_extensions_Add> <== ALWAYS TAKEN MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } ffc0e86c: 80 01 00 14 lwz r0,20(r1) ffc0e870: 83 e1 00 0c lwz r31,12(r1) ffc0e874: 38 21 00 10 addi r1,r1,16 ffc0e878: 7c 08 03 a6 mtlr r0 ffc0e87c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e880 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0e880: 94 21 ff d8 stwu r1,-40(r1) ffc0e884: 7c 08 02 a6 mflr r0 ffc0e888: 90 01 00 2c stw r0,44(r1) ffc0e88c: 93 e1 00 24 stw r31,36(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0e890: 83 e3 01 40 lwz r31,320(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0e894: 93 a1 00 1c stw r29,28(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0e898: 2f 9f 00 00 cmpwi cr7,r31,0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0e89c: 93 c1 00 20 stw r30,32(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0e8a0: 41 9e 00 80 beq- cr7,ffc0e920 <_RTEMS_tasks_Post_switch_extension+0xa0> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e8a4: 7c 00 00 a6 mfmsr r0 ffc0e8a8: 7d 30 42 a6 mfsprg r9,0 ffc0e8ac: 7c 09 48 78 andc r9,r0,r9 ffc0e8b0: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0e8b4: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0e8b8: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0e8bc: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e8c0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0e8c4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e8c8: 41 be 00 58 beq+ cr7,ffc0e920 <_RTEMS_tasks_Post_switch_extension+0xa0> <== NEVER TAKEN return; asr->nest_level += 1; ffc0e8cc: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0e8d0: 3b a1 00 08 addi r29,r1,8 ffc0e8d4: 80 7f 00 10 lwz r3,16(r31) ffc0e8d8: 38 80 00 00 li r4,0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0e8dc: 38 09 00 01 addi r0,r9,1 ffc0e8e0: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0e8e4: 60 84 ff ff ori r4,r4,65535 ffc0e8e8: 7f a5 eb 78 mr r5,r29 ffc0e8ec: 48 00 23 b1 bl ffc10c9c <== ALWAYS TAKEN (*asr->handler)( signal_set ); ffc0e8f0: 80 1f 00 0c lwz r0,12(r31) ffc0e8f4: 7f c3 f3 78 mr r3,r30 ffc0e8f8: 7c 09 03 a6 mtctr r0 ffc0e8fc: 4e 80 04 21 bctrl <== ALWAYS TAKEN asr->nest_level -= 1; ffc0e900: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0e904: 38 80 00 00 li r4,0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0e908: 38 09 ff ff addi r0,r9,-1 ffc0e90c: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0e910: 60 84 ff ff ori r4,r4,65535 ffc0e914: 7f a5 eb 78 mr r5,r29 ffc0e918: 80 61 00 08 lwz r3,8(r1) ffc0e91c: 48 00 23 81 bl ffc10c9c <== ALWAYS TAKEN } ffc0e920: 80 01 00 2c lwz r0,44(r1) ffc0e924: 83 a1 00 1c lwz r29,28(r1) ffc0e928: 7c 08 03 a6 mtlr r0 ffc0e92c: 83 c1 00 20 lwz r30,32(r1) ffc0e930: 83 e1 00 24 lwz r31,36(r1) ffc0e934: 38 21 00 28 addi r1,r1,40 ffc0e938: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e77c <_RTEMS_tasks_Start_extension>: { RTEMS_API_Control *api; api = started->API_Extensions[ THREAD_API_RTEMS ]; api->pending_events = EVENT_SETS_NONE_PENDING; ffc0e77c: 81 24 01 40 lwz r9,320(r4) ffc0e780: 38 00 00 00 li r0,0 ffc0e784: 90 09 00 00 stw r0,0(r9) } ffc0e788: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e78c <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0e78c: 81 23 01 50 lwz r9,336(r3) <== ALWAYS TAKEN while (tvp) { ffc0e790: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e794: 41 9e 00 24 beq- cr7,ffc0e7b8 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc0e798: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc0e79c: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0e7a0: 81 4b 00 00 lwz r10,0(r11) ffc0e7a4: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; ffc0e7a8: 81 29 00 00 lwz r9,0(r9) */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; ffc0e7ac: 90 0b 00 00 stw r0,0(r11) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0e7b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e7b4: 40 9e ff e4 bne+ cr7,ffc0e798 <_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; ffc0e7b8: 81 24 01 50 lwz r9,336(r4) while (tvp) { ffc0e7bc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e7c0: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc0e7c4: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc0e7c8: 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; ffc0e7cc: 81 4b 00 00 lwz r10,0(r11) ffc0e7d0: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; ffc0e7d4: 81 29 00 00 lwz r9,0(r9) } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; ffc0e7d8: 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) { ffc0e7dc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e7e0: 40 9e ff e4 bne+ cr7,ffc0e7c4 <_RTEMS_tasks_Switch_extension+0x38> <== NEVER TAKEN ffc0e7e4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc46514 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc46514: 94 21 ff c0 stwu r1,-64(r1) ffc46518: 7c 08 02 a6 mflr r0 ffc4651c: 93 c1 00 38 stw r30,56(r1) /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); ffc46520: 3b c1 00 08 addi r30,r1,8 bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc46524: 90 01 00 44 stw r0,68(r1) ffc46528: 93 61 00 2c stw r27,44(r1) ffc4652c: 7c 9b 23 78 mr r27,r4 ffc46530: 93 e1 00 3c stw r31,60(r1) ffc46534: 7c 7f 1b 78 mr r31,r3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); ffc46538: 7f c3 f3 78 mr r3,r30 bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc4653c: 93 81 00 30 stw r28,48(r1) ffc46540: 7c bc 2b 78 mr r28,r5 ffc46544: 93 a1 00 34 stw r29,52(r1) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; ffc46548: 83 bf 00 40 lwz r29,64(r31) /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); ffc4654c: 4b fe c6 85 bl ffc32bd0 <_TOD_Get_uptime> <== ALWAYS TAKEN _Timestamp_Subtract( ffc46550: 38 7f 00 4c addi r3,r31,76 ffc46554: 7f 65 db 78 mr r5,r27 ffc46558: 7f c4 f3 78 mr r4,r30 ffc4655c: 4b fc bf 6d bl ffc124c8 <_Timespec_Subtract> <== ALWAYS TAKEN * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc46560: 3d 20 00 00 lis r9,0 ffc46564: 80 09 36 14 lwz r0,13844(r9) ffc46568: 38 60 00 01 li r3,1 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; ffc4656c: 81 3d 00 84 lwz r9,132(r29) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc46570: 7f 9d 00 00 cmpw cr7,r29,r0 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; ffc46574: 81 5d 00 88 lwz r10,136(r29) ffc46578: 91 21 00 10 stw r9,16(r1) ffc4657c: 91 41 00 14 stw r10,20(r1) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc46580: 41 9e 00 28 beq- cr7,ffc465a8 <_Rate_monotonic_Get_status+0x94> return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } ffc46584: 80 01 00 44 lwz r0,68(r1) ffc46588: 83 61 00 2c lwz r27,44(r1) ffc4658c: 7c 08 03 a6 mtlr r0 ffc46590: 83 81 00 30 lwz r28,48(r1) ffc46594: 83 a1 00 34 lwz r29,52(r1) ffc46598: 83 c1 00 38 lwz r30,56(r1) ffc4659c: 83 e1 00 3c lwz r31,60(r1) ffc465a0: 38 21 00 40 addi r1,r1,64 ffc465a4: 4e 80 00 20 blr <== ALWAYS TAKEN if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( ffc465a8: 3b a1 00 18 addi r29,r1,24 ffc465ac: 3c 60 00 00 lis r3,0 ffc465b0: 7f c4 f3 78 mr r4,r30 ffc465b4: 7f a5 eb 78 mr r5,r29 ffc465b8: 38 63 36 1c addi r3,r3,13852 &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); ffc465bc: 3b c1 00 10 addi r30,r1,16 if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( ffc465c0: 4b fc bf 09 bl ffc124c8 <_Timespec_Subtract> <== ALWAYS TAKEN /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc465c4: 3b ff 00 44 addi r31,r31,68 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); ffc465c8: 7f a4 eb 78 mr r4,r29 ffc465cc: 7f c3 f3 78 mr r3,r30 ffc465d0: 4b fc be 9d bl ffc1246c <_Timespec_Add_to> <== ALWAYS TAKEN /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc465d4: 7f c3 f3 78 mr r3,r30 ffc465d8: 7f e4 fb 78 mr r4,r31 ffc465dc: 48 00 0b 71 bl ffc4714c <_Timespec_Less_than> <== ALWAYS TAKEN ffc465e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc465e4: 38 60 00 00 li r3,0 ffc465e8: 40 9e ff 9c bne+ cr7,ffc46584 <_Rate_monotonic_Get_status+0x70> return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( ffc465ec: 7f e3 fb 78 mr r3,r31 ffc465f0: 7f c4 f3 78 mr r4,r30 ffc465f4: 7f 85 e3 78 mr r5,r28 ffc465f8: 4b fc be d1 bl ffc124c8 <_Timespec_Subtract> <== ALWAYS TAKEN ffc465fc: 38 60 00 01 li r3,1 ffc46600: 4b ff ff 84 b ffc46584 <_Rate_monotonic_Get_status+0x70> <== ALWAYS TAKEN ffc4645c <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { ffc4645c: 94 21 ff d8 stwu r1,-40(r1) ffc46460: 7c 08 02 a6 mflr r0 ffc46464: 93 a1 00 1c stw r29,28(r1) * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); ffc46468: 3b a1 00 08 addi r29,r1,8 } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { ffc4646c: 90 01 00 2c stw r0,44(r1) ffc46470: 93 e1 00 24 stw r31,36(r1) ffc46474: 7c 7f 1b 78 mr r31,r3 * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); ffc46478: 7f a3 eb 78 mr r3,r29 } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { ffc4647c: 93 c1 00 20 stw r30,32(r1) Thread_Control *owning_thread = the_period->owner; ffc46480: 83 df 00 40 lwz r30,64(r31) * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); ffc46484: 4b fe c7 4d bl ffc32bd0 <_TOD_Get_uptime> <== ALWAYS TAKEN * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc46488: 3d 20 00 00 lis r9,0 /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; ffc4648c: 81 41 00 0c lwz r10,12(r1) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc46490: 80 09 36 14 lwz r0,13844(r9) /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; ffc46494: 81 21 00 08 lwz r9,8(r1) <== ALWAYS TAKEN * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc46498: 7f 9e 00 00 cmpw cr7,r30,r0 /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; ffc4649c: 91 5f 00 50 stw r10,80(r31) ffc464a0: 91 3f 00 4c stw r9,76(r31) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; ffc464a4: 81 3e 00 84 lwz r9,132(r30) ffc464a8: 81 5e 00 88 lwz r10,136(r30) ffc464ac: 91 3f 00 44 stw r9,68(r31) ffc464b0: 91 5f 00 48 stw r10,72(r31) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc464b4: 41 9e 00 20 beq- cr7,ffc464d4 <_Rate_monotonic_Initiate_statistics+0x78> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } ffc464b8: 80 01 00 2c lwz r0,44(r1) ffc464bc: 83 a1 00 1c lwz r29,28(r1) ffc464c0: 7c 08 03 a6 mtlr r0 ffc464c4: 83 c1 00 20 lwz r30,32(r1) ffc464c8: 83 e1 00 24 lwz r31,36(r1) ffc464cc: 38 21 00 28 addi r1,r1,40 ffc464d0: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( ffc464d4: 3b c1 00 10 addi r30,r1,16 ffc464d8: 3c 60 00 00 lis r3,0 ffc464dc: 7f a4 eb 78 mr r4,r29 ffc464e0: 7f c5 f3 78 mr r5,r30 ffc464e4: 38 63 36 1c addi r3,r3,13852 ffc464e8: 4b fc bf e1 bl ffc124c8 <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); ffc464ec: 38 7f 00 44 addi r3,r31,68 ffc464f0: 7f c4 f3 78 mr r4,r30 ffc464f4: 4b fc bf 79 bl ffc1246c <_Timespec_Add_to> <== ALWAYS TAKEN } #endif } ffc464f8: 80 01 00 2c lwz r0,44(r1) ffc464fc: 83 a1 00 1c lwz r29,28(r1) ffc46500: 7c 08 03 a6 mtlr r0 ffc46504: 83 c1 00 20 lwz r30,32(r1) ffc46508: 83 e1 00 24 lwz r31,36(r1) ffc4650c: 38 21 00 28 addi r1,r1,40 ffc46510: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e65c <_Rate_monotonic_Manager_initialization>: * Handler. */ void _Rate_monotonic_Manager_initialization(void) { _Objects_Initialize_information( ffc0e65c: 3d 20 00 00 lis r9,0 * NOTE: The Rate Monotonic Manager is built on top of the Watchdog * Handler. */ void _Rate_monotonic_Manager_initialization(void) { ffc0e660: 94 21 ff f8 stwu r1,-8(r1) ffc0e664: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0e668: 3c 60 00 00 lis r3,0 ffc0e66c: 80 c9 20 90 lwz r6,8336(r9) ffc0e670: 38 63 2f 04 addi r3,r3,12036 ffc0e674: 38 80 00 02 li r4,2 * NOTE: The Rate Monotonic Manager is built on top of the Watchdog * Handler. */ void _Rate_monotonic_Manager_initialization(void) { ffc0e678: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0e67c: 38 a0 00 08 li r5,8 ffc0e680: 38 e0 00 8c li r7,140 ffc0e684: 39 00 00 00 li r8,0 ffc0e688: 39 20 00 04 li r9,4 ffc0e68c: 4b ff bd fd bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0e690: 80 01 00 0c lwz r0,12(r1) ffc0e694: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc0e698: 7c 08 03 a6 mtlr r0 ffc0e69c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc46958 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc46958: 94 21 ff e0 stwu r1,-32(r1) ffc4695c: 7c 08 02 a6 mflr r0 ffc46960: 7c 64 1b 78 mr r4,r3 ffc46964: 3c 60 00 00 lis r3,0 ffc46968: 90 01 00 24 stw r0,36(r1) ffc4696c: 38 63 68 c4 addi r3,r3,26820 ffc46970: 38 a1 00 08 addi r5,r1,8 ffc46974: 93 e1 00 1c stw r31,28(r1) ffc46978: 4b fc 9c e5 bl ffc1065c <_Objects_Get> <== ALWAYS TAKEN /* * 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 ) { ffc4697c: 80 01 00 08 lwz r0,8(r1) ffc46980: 7c 7f 1b 78 mr r31,r3 ffc46984: 2f 80 00 00 cmpwi cr7,r0,0 ffc46988: 40 9e 00 48 bne- cr7,ffc469d0 <_Rate_monotonic_Timeout+0x78> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc4698c: 80 63 00 40 lwz r3,64(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc46990: 80 03 00 10 lwz r0,16(r3) ffc46994: 70 09 40 00 andi. r9,r0,16384 ffc46998: 41 82 00 14 beq- ffc469ac <_Rate_monotonic_Timeout+0x54> the_thread->Wait.id == the_period->Object.id ) { ffc4699c: 81 23 00 20 lwz r9,32(r3) ffc469a0: 80 1f 00 08 lwz r0,8(r31) ffc469a4: 7f 89 00 00 cmpw cr7,r9,r0 ffc469a8: 41 9e 00 68 beq- cr7,ffc46a10 <_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 ) { ffc469ac: 80 1f 00 38 lwz r0,56(r31) ffc469b0: 2f 80 00 01 cmpwi cr7,r0,1 ffc469b4: 41 9e 00 30 beq- cr7,ffc469e4 <_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; ffc469b8: 38 00 00 04 li r0,4 ffc469bc: 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; ffc469c0: 3d 20 00 00 lis r9,0 ffc469c4: 81 69 35 d4 lwz r11,13780(r9) ffc469c8: 38 0b ff ff addi r0,r11,-1 ffc469cc: 90 09 35 d4 stw r0,13780(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc469d0: 80 01 00 24 lwz r0,36(r1) ffc469d4: 83 e1 00 1c lwz r31,28(r1) ffc469d8: 38 21 00 20 addi r1,r1,32 ffc469dc: 7c 08 03 a6 mtlr r0 ffc469e0: 4e 80 00 20 blr <== ALWAYS TAKEN _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; ffc469e4: 38 00 00 03 li r0,3 ffc469e8: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc469ec: 7f e3 fb 78 mr r3,r31 ffc469f0: 4b ff fa 6d bl ffc4645c <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc469f4: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc469f8: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc469fc: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc46a00: 38 63 65 68 addi r3,r3,25960 ffc46a04: 38 9f 00 10 addi r4,r31,16 ffc46a08: 4b fc bf b5 bl ffc129bc <_Watchdog_Insert> <== ALWAYS TAKEN ffc46a0c: 4b ff ff b4 b ffc469c0 <_Rate_monotonic_Timeout+0x68> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc46a10: 3c 80 10 03 lis r4,4099 ffc46a14: 60 84 ff f8 ori r4,r4,65528 ffc46a18: 4b fc a3 e9 bl ffc10e00 <_Thread_Clear_state> <== ALWAYS TAKEN ffc46a1c: 4b ff ff d0 b ffc469ec <_Rate_monotonic_Timeout+0x94> <== ALWAYS TAKEN ffc46604 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc46604: 94 21 ff d8 stwu r1,-40(r1) ffc46608: 7c 08 02 a6 mflr r0 ffc4660c: 90 01 00 2c stw r0,44(r1) * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc46610: 80 03 00 38 lwz r0,56(r3) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc46614: 81 23 00 54 lwz r9,84(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc46618: 2f 80 00 04 cmpwi cr7,r0,4 } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc4661c: 93 e1 00 24 stw r31,36(r1) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc46620: 38 09 00 01 addi r0,r9,1 } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc46624: 93 a1 00 1c stw r29,28(r1) ffc46628: 7c 7f 1b 78 mr r31,r3 ffc4662c: 93 c1 00 20 stw r30,32(r1) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc46630: 90 03 00 54 stw r0,84(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc46634: 41 9e 00 f4 beq- cr7,ffc46728 <_Rate_monotonic_Update_statistics+0x124> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); ffc46638: 3b c1 00 10 addi r30,r1,16 ffc4663c: 3b a1 00 08 addi r29,r1,8 ffc46640: 7f e3 fb 78 mr r3,r31 ffc46644: 7f c4 f3 78 mr r4,r30 ffc46648: 7f a5 eb 78 mr r5,r29 ffc4664c: 4b ff fe c9 bl ffc46514 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) ffc46650: 2f 83 00 00 cmpwi cr7,r3,0 ffc46654: 40 9e 00 20 bne- cr7,ffc46674 <_Rate_monotonic_Update_statistics+0x70> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc46658: 80 01 00 2c lwz r0,44(r1) ffc4665c: 83 a1 00 1c lwz r29,28(r1) ffc46660: 7c 08 03 a6 mtlr r0 ffc46664: 83 c1 00 20 lwz r30,32(r1) ffc46668: 83 e1 00 24 lwz r31,36(r1) ffc4666c: 38 21 00 28 addi r1,r1,40 ffc46670: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); ffc46674: 7f a4 eb 78 mr r4,r29 ffc46678: 38 7f 00 6c addi r3,r31,108 ffc4667c: 4b fc bd f1 bl ffc1246c <_Timespec_Add_to> <== ALWAYS TAKEN if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc46680: 7f a3 eb 78 mr r3,r29 ffc46684: 38 9f 00 5c addi r4,r31,92 ffc46688: 48 00 0a c5 bl ffc4714c <_Timespec_Less_than> <== ALWAYS TAKEN ffc4668c: 2f 83 00 00 cmpwi cr7,r3,0 ffc46690: 41 9e 00 14 beq- cr7,ffc466a4 <_Rate_monotonic_Update_statistics+0xa0> stats->min_cpu_time = executed; ffc46694: 81 21 00 08 lwz r9,8(r1) ffc46698: 81 41 00 0c lwz r10,12(r1) <== ALWAYS TAKEN ffc4669c: 91 3f 00 5c stw r9,92(r31) ffc466a0: 91 5f 00 60 stw r10,96(r31) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) ffc466a4: 7f a3 eb 78 mr r3,r29 ffc466a8: 38 9f 00 64 addi r4,r31,100 ffc466ac: 48 00 0a 65 bl ffc47110 <_Timespec_Greater_than> <== ALWAYS TAKEN ffc466b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc466b4: 41 9e 00 14 beq- cr7,ffc466c8 <_Rate_monotonic_Update_statistics+0xc4> stats->max_cpu_time = executed; ffc466b8: 81 21 00 08 lwz r9,8(r1) ffc466bc: 81 41 00 0c lwz r10,12(r1) ffc466c0: 91 3f 00 64 stw r9,100(r31) ffc466c4: 91 5f 00 68 stw r10,104(r31) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); ffc466c8: 7f c4 f3 78 mr r4,r30 ffc466cc: 38 7f 00 84 addi r3,r31,132 ffc466d0: 4b fc bd 9d bl ffc1246c <_Timespec_Add_to> <== ALWAYS TAKEN if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc466d4: 7f c3 f3 78 mr r3,r30 ffc466d8: 38 9f 00 74 addi r4,r31,116 ffc466dc: 48 00 0a 71 bl ffc4714c <_Timespec_Less_than> <== ALWAYS TAKEN ffc466e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc466e4: 40 9e 00 54 bne- cr7,ffc46738 <_Rate_monotonic_Update_statistics+0x134> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc466e8: 7f c3 f3 78 mr r3,r30 ffc466ec: 38 9f 00 7c addi r4,r31,124 ffc466f0: 48 00 0a 21 bl ffc47110 <_Timespec_Greater_than> <== ALWAYS TAKEN ffc466f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc466f8: 41 be ff 60 beq- cr7,ffc46658 <_Rate_monotonic_Update_statistics+0x54> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc466fc: 80 01 00 2c lwz r0,44(r1) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) stats->max_wall_time = since_last_period; ffc46700: 81 21 00 10 lwz r9,16(r1) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc46704: 7c 08 03 a6 mtlr r0 if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) stats->max_wall_time = since_last_period; ffc46708: 81 41 00 14 lwz r10,20(r1) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc4670c: 83 a1 00 1c lwz r29,28(r1) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) stats->max_wall_time = since_last_period; ffc46710: 91 3f 00 7c stw r9,124(r31) ffc46714: 91 5f 00 80 stw r10,128(r31) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc46718: 83 c1 00 20 lwz r30,32(r1) ffc4671c: 83 e1 00 24 lwz r31,36(r1) ffc46720: 38 21 00 28 addi r1,r1,40 ffc46724: 4e 80 00 20 blr <== ALWAYS TAKEN */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; ffc46728: 81 23 00 58 lwz r9,88(r3) ffc4672c: 38 09 00 01 addi r0,r9,1 ffc46730: 90 03 00 58 stw r0,88(r3) ffc46734: 4b ff ff 04 b ffc46638 <_Rate_monotonic_Update_statistics+0x34> <== ALWAYS TAKEN */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; ffc46738: 81 21 00 10 lwz r9,16(r1) ffc4673c: 81 41 00 14 lwz r10,20(r1) ffc46740: 91 3f 00 74 stw r9,116(r31) ffc46744: 91 5f 00 78 stw r10,120(r31) ffc46748: 4b ff ff a0 b ffc466e8 <_Rate_monotonic_Update_statistics+0xe4> <== ALWAYS TAKEN ffc0e6a0 <_Region_Manager_initialization>: * Output parameters: NONE */ void _Region_Manager_initialization(void) { _Objects_Initialize_information( ffc0e6a0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Region_Manager_initialization(void) { ffc0e6a4: 94 21 ff f8 stwu r1,-8(r1) ffc0e6a8: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN _Objects_Initialize_information( ffc0e6ac: 3c 60 00 00 lis r3,0 ffc0e6b0: 80 c9 20 88 lwz r6,8328(r9) ffc0e6b4: 38 63 2f 44 addi r3,r3,12100 ffc0e6b8: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Region_Manager_initialization(void) { ffc0e6bc: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0e6c0: 38 a0 00 06 li r5,6 ffc0e6c4: 38 e0 00 c0 li r7,192 ffc0e6c8: 39 00 00 00 li r8,0 ffc0e6cc: 39 20 00 04 li r9,4 ffc0e6d0: 4b ff bd b9 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_REGION, 0 /* XXX _Region_MP_Process_packet */ ); #endif } ffc0e6d4: 80 01 00 0c lwz r0,12(r1) ffc0e6d8: 38 21 00 08 addi r1,r1,8 ffc0e6dc: 7c 08 03 a6 mtlr r0 ffc0e6e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc228a0 <_Region_Process_queue>: ffc228a0: 3d 20 00 00 lis r9,0 */ void _Region_Process_queue( Region_Control *the_region ) { ffc228a4: 94 21 ff e8 stwu r1,-24(r1) ffc228a8: 7c 08 02 a6 mflr r0 ffc228ac: 81 69 28 24 lwz r11,10276(r9) ffc228b0: 93 c1 00 10 stw r30,16(r1) ffc228b4: 7c 7e 1b 78 mr r30,r3 ffc228b8: 39 6b 00 01 addi r11,r11,1 ffc228bc: 90 01 00 1c stw r0,28(r1) ffc228c0: 93 81 00 08 stw r28,8(r1) ffc228c4: 93 a1 00 0c stw r29,12(r1) ffc228c8: 93 e1 00 14 stw r31,20(r1) ffc228cc: 91 69 28 24 stw r11,10276(r9) * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); ffc228d0: 3d 20 00 00 lis r9,0 ffc228d4: 80 69 28 5c lwz r3,10332(r9) /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); ffc228d8: 3b be 00 10 addi r29,r30,16 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); ffc228dc: 3b 9e 00 68 addi r28,r30,104 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); ffc228e0: 4b ff 95 a9 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc228e4: 48 00 00 3c b ffc22920 <_Region_Process_queue+0x80> <== ALWAYS TAKEN ffc228e8: 80 9f 00 24 lwz r4,36(r31) ffc228ec: 4b ff a3 f9 bl ffc1cce4 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); ffc228f0: 7f e4 fb 78 mr r4,r31 the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) ffc228f4: 7c 60 1b 79 mr. r0,r3 break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); ffc228f8: 7f a3 eb 78 mr r3,r29 the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) ffc228fc: 41 82 00 40 beq- ffc2293c <_Region_Process_queue+0x9c> break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; ffc22900: 81 3e 00 64 lwz r9,100(r30) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; ffc22904: 81 7f 00 28 lwz r11,40(r31) the_region->number_of_used_blocks += 1; ffc22908: 39 29 00 01 addi r9,r9,1 ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; ffc2290c: 90 0b 00 00 stw r0,0(r11) the_region->number_of_used_blocks += 1; ffc22910: 91 3e 00 64 stw r9,100(r30) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); ffc22914: 48 00 08 15 bl ffc23128 <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; ffc22918: 38 00 00 00 li r0,0 ffc2291c: 90 1f 00 34 stw r0,52(r31) /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); ffc22920: 7f a3 eb 78 mr r3,r29 ffc22924: 48 00 09 5d bl ffc23280 <_Thread_queue_First> <== ALWAYS TAKEN ffc22928: 38 a0 00 00 li r5,0 if ( the_thread == NULL ) ffc2292c: 7c 7f 1b 79 mr. r31,r3 ffc22930: 38 c0 00 00 li r6,0 ffc22934: 7f 83 e3 78 mr r3,r28 ffc22938: 40 82 ff b0 bne+ ffc228e8 <_Region_Process_queue+0x48> *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc2293c: 4b ff c1 fd bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc22940: 80 01 00 1c lwz r0,28(r1) ffc22944: 83 81 00 08 lwz r28,8(r1) ffc22948: 7c 08 03 a6 mtlr r0 ffc2294c: 83 a1 00 0c lwz r29,12(r1) ffc22950: 83 c1 00 10 lwz r30,16(r1) ffc22954: 83 e1 00 14 lwz r31,20(r1) ffc22958: 38 21 00 18 addi r1,r1,24 ffc2295c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e734 <_Semaphore_Manager_initialization>: * Output parameters: NONE */ void _Semaphore_Manager_initialization(void) { _Objects_Initialize_information( ffc0e734: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Semaphore_Manager_initialization(void) { ffc0e738: 94 21 ff f8 stwu r1,-8(r1) ffc0e73c: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0e740: 3c 60 00 00 lis r3,0 ffc0e744: 80 c9 20 7c lwz r6,8316(r9) ffc0e748: 38 63 2a ec addi r3,r3,10988 ffc0e74c: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Semaphore_Manager_initialization(void) { ffc0e750: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0e754: 38 a0 00 03 li r5,3 ffc0e758: 38 e0 00 78 li r7,120 ffc0e75c: 39 00 00 00 li r8,0 ffc0e760: 39 20 00 04 li r9,4 ffc0e764: 4b ff bd 25 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_SEMAPHORE, _Semaphore_MP_Process_packet ); #endif } ffc0e768: 80 01 00 0c lwz r0,12(r1) ffc0e76c: 38 21 00 08 addi r1,r1,8 ffc0e770: 7c 08 03 a6 mtlr r0 ffc0e774: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08794 <_Semaphore_Translate_core_mutex_return_code>: #if defined(RTEMS_DEBUG) if ( status > CORE_MUTEX_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Semaphore_Translate_core_mutex_return_code_[status]; } ffc08794: 3d 20 ff c2 lis r9,-62 ffc08798: 39 29 de 04 addi r9,r9,-8700 }; rtems_status_code _Semaphore_Translate_core_mutex_return_code ( uint32_t status ) { ffc0879c: 54 63 10 3a rlwinm r3,r3,2,0,29 #if defined(RTEMS_DEBUG) if ( status > CORE_MUTEX_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Semaphore_Translate_core_mutex_return_code_[status]; } ffc087a0: 7c 69 18 2e lwzx r3,r9,r3 ffc087a4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc087a8 <_Semaphore_Translate_core_semaphore_return_code>: }; rtems_status_code _Semaphore_Translate_core_semaphore_return_code ( uint32_t status ) { ffc087a8: 3d 20 ff c2 lis r9,-62 ffc087ac: 38 09 de 04 addi r0,r9,-8700 ffc087b0: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc087b4: 7c 60 1a 14 add r3,r0,r3 #if defined(RTEMS_DEBUG) if ( status > CORE_SEMAPHORE_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Semaphore_Translate_core_semaphore_return_code_[status]; } ffc087b8: 80 63 00 1c lwz r3,28(r3) ffc087bc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e778 <_Signal_Manager_initialization>: _MPCI_Register_packet_processor( MP_PACKET_SIGNAL, _Signal_MP_Process_packet ); #endif } ffc0e778: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ed60 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { ffc0ed60: 94 21 ff e0 stwu r1,-32(r1) <== ALWAYS TAKEN ffc0ed64: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0ed68: 93 e1 00 1c stw r31,28(r1) ffc0ed6c: 7c 7f 1b 78 mr r31,r3 ffc0ed70: 90 01 00 24 stw r0,36(r1) ffc0ed74: 93 c1 00 18 stw r30,24(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ed78: 7f c0 00 a6 mfmsr r30 <== ALWAYS TAKEN ffc0ed7c: 7c 10 42 a6 mfsprg r0,0 ffc0ed80: 7f c0 00 78 andc r0,r30,r0 ffc0ed84: 7c 00 01 24 mtmsr r0 /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0ed88: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0ed8c: 81 29 27 94 lwz r9,10132(r9) <== ALWAYS TAKEN /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; ffc0ed90: 3d 60 00 00 lis r11,0 ffc0ed94: 39 6b 27 4c addi r11,r11,10060 if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0ed98: 2f 89 00 00 cmpwi cr7,r9,0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; ffc0ed9c: 81 8b 00 04 lwz r12,4(r11) ffc0eda0: 81 6b 00 00 lwz r11,0(r11) if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0eda4: 38 00 00 00 li r0,0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; ffc0eda8: 91 81 00 14 stw r12,20(r1) ffc0edac: 91 61 00 10 stw r11,16(r1) if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0edb0: 41 9e 00 10 beq- cr7,ffc0edc0 <_TOD_Get+0x60> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); ffc0edb4: 7d 29 03 a6 mtctr r9 ffc0edb8: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0edbc: 7c 60 1b 78 mr r0,r3 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0edc0: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0edc4: 39 20 00 00 li r9,0 ffc0edc8: 90 01 00 0c stw r0,12(r1) _Timestamp_Add_to( &now, &offset ); ffc0edcc: 38 61 00 10 addi r3,r1,16 ffc0edd0: 38 81 00 08 addi r4,r1,8 now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0edd4: 91 21 00 08 stw r9,8(r1) _Timestamp_Add_to( &now, &offset ); ffc0edd8: 4b ff d2 f9 bl ffc0c0d0 <_Timespec_Add_to> <== ALWAYS TAKEN _Timestamp_To_timespec( &now, time ); } ffc0eddc: 80 01 00 24 lwz r0,36(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); ffc0ede0: 81 21 00 10 lwz r9,16(r1) } ffc0ede4: 7c 08 03 a6 mtlr r0 nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); ffc0ede8: 81 41 00 14 lwz r10,20(r1) } ffc0edec: 83 c1 00 18 lwz r30,24(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); ffc0edf0: 91 3f 00 00 stw r9,0(r31) ffc0edf4: 91 5f 00 04 stw r10,4(r31) } ffc0edf8: 83 e1 00 1c lwz r31,28(r1) ffc0edfc: 38 21 00 20 addi r1,r1,32 ffc0ee00: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ee04 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { ffc0ee04: 94 21 ff e0 stwu r1,-32(r1) ffc0ee08: 7c 08 02 a6 mflr r0 ffc0ee0c: 93 e1 00 1c stw r31,28(r1) ffc0ee10: 7c 7f 1b 78 mr r31,r3 ffc0ee14: 90 01 00 24 stw r0,36(r1) ffc0ee18: 93 c1 00 18 stw r30,24(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ee1c: 7f c0 00 a6 mfmsr r30 ffc0ee20: 7c 10 42 a6 mfsprg r0,0 ffc0ee24: 7f c0 00 78 andc r0,r30,r0 ffc0ee28: 7c 00 01 24 mtmsr r0 /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0ee2c: 3d 20 00 00 lis r9,0 ffc0ee30: 81 29 27 94 lwz r9,10132(r9) /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; ffc0ee34: 3d 60 00 00 lis r11,0 ffc0ee38: 39 6b 27 38 addi r11,r11,10040 if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0ee3c: 2f 89 00 00 cmpwi cr7,r9,0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; ffc0ee40: 81 8b 00 04 lwz r12,4(r11) ffc0ee44: 81 6b 00 00 lwz r11,0(r11) if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0ee48: 38 00 00 00 li r0,0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; ffc0ee4c: 91 81 00 14 stw r12,20(r1) ffc0ee50: 91 61 00 10 stw r11,16(r1) <== ALWAYS TAKEN if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0ee54: 41 9e 00 10 beq- cr7,ffc0ee64 <_TOD_Get_uptime+0x60> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); ffc0ee58: 7d 29 03 a6 mtctr r9 ffc0ee5c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0ee60: 7c 60 1b 78 mr r0,r3 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ee64: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0ee68: 39 20 00 00 li r9,0 ffc0ee6c: 90 01 00 0c stw r0,12(r1) _Timestamp_Add_to( &up, &offset ); ffc0ee70: 38 61 00 10 addi r3,r1,16 ffc0ee74: 38 81 00 08 addi r4,r1,8 up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0ee78: 91 21 00 08 stw r9,8(r1) _Timestamp_Add_to( &up, &offset ); ffc0ee7c: 4b ff d2 55 bl ffc0c0d0 <_Timespec_Add_to> <== ALWAYS TAKEN *uptime = up; } ffc0ee80: 80 01 00 24 lwz r0,36(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; ffc0ee84: 81 21 00 10 lwz r9,16(r1) } ffc0ee88: 7c 08 03 a6 mtlr r0 nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; ffc0ee8c: 81 41 00 14 lwz r10,20(r1) } ffc0ee90: 83 c1 00 18 lwz r30,24(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; ffc0ee94: 91 3f 00 00 stw r9,0(r31) ffc0ee98: 91 5f 00 04 stw r10,4(r31) } ffc0ee9c: 83 e1 00 1c lwz r31,28(r1) ffc0eea0: 38 21 00 20 addi r1,r1,32 ffc0eea4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc32c74 <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { ffc32c74: 94 21 ff e0 stwu r1,-32(r1) ffc32c78: 7c 08 02 a6 mflr r0 ffc32c7c: 93 e1 00 1c stw r31,28(r1) ffc32c80: 7c 7f 1b 78 mr r31,r3 Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); ffc32c84: 38 61 00 08 addi r3,r1,8 */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { ffc32c88: 90 01 00 24 stw r0,36(r1) Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); ffc32c8c: 4b ff ff 45 bl ffc32bd0 <_TOD_Get_uptime> <== ALWAYS TAKEN _Timestamp_To_timespec( &uptime_ts, uptime ); } ffc32c90: 80 01 00 24 lwz r0,36(r1) { Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); ffc32c94: 81 21 00 08 lwz r9,8(r1) } ffc32c98: 7c 08 03 a6 mtlr r0 { Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); ffc32c9c: 81 41 00 0c lwz r10,12(r1) ffc32ca0: 91 3f 00 00 stw r9,0(r31) ffc32ca4: 91 5f 00 04 stw r10,4(r31) } ffc32ca8: 83 e1 00 1c lwz r31,28(r1) ffc32cac: 38 21 00 20 addi r1,r1,32 ffc32cb0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc098b8 <_TOD_Handler_initialization>: */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); ffc098b8: 3c e0 21 da lis r7,8666 ffc098bc: 3d 60 00 00 lis r11,0 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); ffc098c0: 3d 20 00 00 lis r9,0 */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); ffc098c4: 60 e7 e5 00 ori r7,r7,58624 <== ALWAYS TAKEN ffc098c8: 38 00 00 00 li r0,0 ffc098cc: 90 eb 27 4c stw r7,10060(r11) ffc098d0: 39 0b 27 4c addi r8,r11,10060 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); ffc098d4: 39 49 27 38 addi r10,r9,10040 */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); ffc098d8: 90 08 00 04 stw r0,4(r8) /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; ffc098dc: 3d 60 00 00 lis r11,0 ffc098e0: 98 0b 27 34 stb r0,10036(r11) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); ffc098e4: 90 09 27 38 stw r0,10040(r9) ffc098e8: 90 0a 00 04 stw r0,4(r10) /* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); } ffc098ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b978 <_TOD_Set>: ffc0b978: 3d 20 00 00 lis r9,0 */ void _TOD_Set( const struct timespec *time ) { ffc0b97c: 94 21 ff f0 stwu r1,-16(r1) ffc0b980: 7c 08 02 a6 mflr r0 ffc0b984: 81 69 27 d8 lwz r11,10200(r9) ffc0b988: 90 01 00 14 stw r0,20(r1) ffc0b98c: 39 6b 00 01 addi r11,r11,1 ffc0b990: 93 c1 00 08 stw r30,8(r1) ffc0b994: 7c 7e 1b 78 mr r30,r3 ffc0b998: 93 e1 00 0c stw r31,12(r1) ffc0b99c: 91 69 27 d8 stw r11,10200(r9) long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); ffc0b9a0: 3f e0 00 00 lis r31,0 if ( time->tv_sec < seconds ) ffc0b9a4: 80 a3 00 00 lwz r5,0(r3) long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); ffc0b9a8: 80 1f 27 f8 lwz r0,10232(r31) if ( time->tv_sec < seconds ) ffc0b9ac: 7f 80 28 00 cmpw cr7,r0,r5 ffc0b9b0: 41 9d 00 54 bgt- cr7,ffc0ba04 <_TOD_Set+0x8c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); ffc0b9b4: 3c 60 00 01 lis r3,1 ffc0b9b8: 7c a0 28 50 subf r5,r0,r5 ffc0b9bc: 38 63 aa 9c addi r3,r3,-21860 ffc0b9c0: 38 80 00 00 li r4,0 ffc0b9c4: 48 00 32 29 bl ffc0ebec <_Watchdog_Adjust> <== ALWAYS TAKEN _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); ffc0b9c8: 80 1e 00 04 lwz r0,4(r30) ffc0b9cc: 39 3f 27 f8 addi r9,r31,10232 ffc0b9d0: 81 7e 00 00 lwz r11,0(r30) <== ALWAYS TAKEN ffc0b9d4: 90 09 00 04 stw r0,4(r9) _TOD_Is_set = true; ffc0b9d8: 38 00 00 01 li r0,1 ffc0b9dc: 3d 20 00 00 lis r9,0 _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); ffc0b9e0: 91 7f 27 f8 stw r11,10232(r31) _TOD_Is_set = true; ffc0b9e4: 98 09 27 e0 stb r0,10208(r9) _TOD_Activate(); _Thread_Enable_dispatch(); ffc0b9e8: 48 00 18 e1 bl ffc0d2c8 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc0b9ec: 80 01 00 14 lwz r0,20(r1) ffc0b9f0: 83 c1 00 08 lwz r30,8(r1) ffc0b9f4: 7c 08 03 a6 mtlr r0 ffc0b9f8: 83 e1 00 0c lwz r31,12(r1) ffc0b9fc: 38 21 00 10 addi r1,r1,16 ffc0ba00: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ba04: 3c 60 00 01 lis r3,1 ffc0ba08: 7c a5 00 50 subf r5,r5,r0 ffc0ba0c: 38 63 aa 9c addi r3,r3,-21860 ffc0ba10: 38 80 00 01 li r4,1 ffc0ba14: 48 00 31 d9 bl ffc0ebec <_Watchdog_Adjust> <== ALWAYS TAKEN _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); ffc0ba18: 80 1e 00 04 lwz r0,4(r30) ffc0ba1c: 39 3f 27 f8 addi r9,r31,10232 ffc0ba20: 81 7e 00 00 lwz r11,0(r30) ffc0ba24: 90 09 00 04 stw r0,4(r9) _TOD_Is_set = true; ffc0ba28: 38 00 00 01 li r0,1 ffc0ba2c: 3d 20 00 00 lis r9,0 _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); ffc0ba30: 91 7f 27 f8 stw r11,10232(r31) _TOD_Is_set = true; ffc0ba34: 98 09 27 e0 stb r0,10208(r9) _TOD_Activate(); _Thread_Enable_dispatch(); ffc0ba38: 48 00 18 91 bl ffc0d2c8 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc0ba3c: 80 01 00 14 lwz r0,20(r1) ffc0ba40: 83 c1 00 08 lwz r30,8(r1) ffc0ba44: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0ba48: 83 e1 00 0c lwz r31,12(r1) ffc0ba4c: 38 21 00 10 addi r1,r1,16 ffc0ba50: 4e 80 00 20 blr <== ALWAYS TAKEN ffc098f0 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc098f0: 94 21 ff d8 stwu r1,-40(r1) ffc098f4: 7c 08 02 a6 mflr r0 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc098f8: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc098fc: 90 01 00 2c stw r0,44(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc09900: 3c 60 00 00 lis r3,0 ffc09904: 38 63 27 38 addi r3,r3,10040 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc09908: 80 09 20 ac lwz r0,8364(r9) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0990c: 3d 20 00 00 lis r9,0 ffc09910: 81 69 27 84 lwz r11,10116(r9) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc09914: 1c 00 03 e8 mulli r0,r0,1000 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc09918: 93 e1 00 24 stw r31,36(r1) /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0991c: 39 6b 00 01 addi r11,r11,1 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc09920: 90 01 00 0c stw r0,12(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc09924: 3b e1 00 08 addi r31,r1,8 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc09928: 91 69 27 84 stw r11,10116(r9) /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0992c: 7f e4 fb 78 mr r4,r31 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc09930: 39 20 00 00 li r9,0 ffc09934: 91 21 00 08 stw r9,8(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc09938: 48 00 27 99 bl ffc0c0d0 <_Timespec_Add_to> <== ALWAYS TAKEN /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); ffc0993c: 3c 60 00 00 lis r3,0 ffc09940: 38 63 27 4c addi r3,r3,10060 ffc09944: 7f e4 fb 78 mr r4,r31 ffc09948: 48 00 27 89 bl ffc0c0d0 <_Timespec_Add_to> <== ALWAYS TAKEN while ( seconds ) { ffc0994c: 7c 60 1b 79 mr. r0,r3 ffc09950: 90 01 00 18 stw r0,24(r1) ffc09954: 41 82 00 24 beq- ffc09978 <_TOD_Tickle_ticks+0x88> ffc09958: 3f e0 00 00 lis r31,0 ffc0995c: 3b ff 2c 9c addi r31,r31,11420 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); ffc09960: 7f e3 fb 78 mr r3,r31 <== ALWAYS TAKEN ffc09964: 48 00 2f 55 bl ffc0c8b8 <_Watchdog_Tickle> <== ALWAYS TAKEN ffc09968: 80 01 00 18 lwz r0,24(r1) ffc0996c: 35 20 ff ff addic. r9,r0,-1 ffc09970: 91 21 00 18 stw r9,24(r1) ffc09974: 40 82 ff ec bne+ ffc09960 <_TOD_Tickle_ticks+0x70> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } ffc09978: 80 01 00 2c lwz r0,44(r1) <== ALWAYS TAKEN ffc0997c: 83 e1 00 24 lwz r31,36(r1) ffc09980: 38 21 00 28 addi r1,r1,40 <== ALWAYS TAKEN ffc09984: 7c 08 03 a6 mtlr r0 ffc09988: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09804 <_TOD_To_seconds>: { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; ffc09804: 81 23 00 00 lwz r9,0(r3) ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; ffc09808: 81 63 00 08 lwz r11,8(r3) year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) ffc0980c: 71 20 00 03 andi. r0,r9,3 ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; ffc09810: 39 6b ff ff addi r11,r11,-1 <== ALWAYS TAKEN year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) ffc09814: 41 82 00 88 beq- ffc0989c <_TOD_To_seconds+0x98> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; ffc09818: 81 43 00 04 lwz r10,4(r3) ffc0981c: 3d 00 ff c2 lis r8,-62 ffc09820: 39 08 3e d2 addi r8,r8,16082 ffc09824: 55 4a 08 3c rlwinm r10,r10,1,0,30 ffc09828: 7d 48 52 2e lhzx r10,r8,r10 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ffc0982c: 39 29 f8 3c addi r9,r9,-1988 ffc09830: 54 00 08 3c rlwinm r0,r0,1,0,30 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; ffc09834: 7d 6a 5a 14 add r11,r10,r11 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ffc09838: 3d 40 00 00 lis r10,0 ffc0983c: 39 4a 27 20 addi r10,r10,10016 ffc09840: 55 29 f0 be rlwinm r9,r9,30,2,31 ffc09844: 7c 0a 02 2e lhzx r0,r10,r0 ffc09848: 1d 29 05 b5 mulli r9,r9,1461 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc0984c: 81 43 00 0c lwz r10,12(r3) if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ffc09850: 7d 20 4a 14 add r9,r0,r9 ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; ffc09854: 7d 29 5a 14 add r9,r9,r11 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc09858: 81 63 00 10 lwz r11,16(r3) time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; ffc0985c: 55 20 48 2c rlwinm r0,r9,9,0,22 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) ffc09860: 80 63 00 14 lwz r3,20(r3) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc09864: 1d 4a 00 3c mulli r10,r10,60 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; ffc09868: 55 29 38 30 rlwinm r9,r9,7,0,24 ffc0986c: 7c 09 00 50 subf r0,r9,r0 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc09870: 7d 2a 5a 14 add r9,r10,r11 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; ffc09874: 54 0b 20 36 rlwinm r11,r0,4,0,27 ffc09878: 7c 00 58 50 subf r0,r0,r11 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc0987c: 1d 29 00 3c mulli r9,r9,60 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) ffc09880: 3c 63 21 db addis r3,r3,8667 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; ffc09884: 54 0b 20 36 rlwinm r11,r0,4,0,27 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) ffc09888: 38 63 e5 00 addi r3,r3,-6912 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; ffc0988c: 7c 00 58 50 subf r0,r0,r11 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc09890: 7c 63 4a 14 add r3,r3,r9 time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } ffc09894: 7c 63 02 14 add r3,r3,r0 <== ALWAYS TAKEN ffc09898: 4e 80 00 20 blr <== ALWAYS TAKEN time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; ffc0989c: 81 43 00 04 lwz r10,4(r3) ffc098a0: 39 4a 00 0d addi r10,r10,13 ffc098a4: 4b ff ff 78 b ffc0981c <_TOD_To_seconds+0x18> <== ALWAYS TAKEN ffc098a8 <_TOD_Validate>: uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc098a8: 2c 03 00 00 cmpwi r3,0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); ffc098ac: 3d 20 00 00 lis r9,0 ffc098b0: 80 09 20 cc lwz r0,8396(r9) if ((!the_tod) || ffc098b4: 41 82 00 98 beq- ffc0994c <_TOD_Validate+0xa4> <== NEVER TAKEN ffc098b8: 3d 20 00 0f lis r9,15 ffc098bc: 61 29 42 40 ori r9,r9,16960 ffc098c0: 7c 09 03 96 divwu r0,r9,r0 (the_tod->ticks >= ticks_per_second) || ffc098c4: 81 23 00 18 lwz r9,24(r3) ffc098c8: 7f 80 48 40 cmplw cr7,r0,r9 ffc098cc: 40 9d 00 80 ble- cr7,ffc0994c <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc098d0: 80 03 00 14 lwz r0,20(r3) ffc098d4: 2b 80 00 3b cmplwi cr7,r0,59 ffc098d8: 41 9d 00 74 bgt- cr7,ffc0994c <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc098dc: 80 03 00 10 lwz r0,16(r3) ffc098e0: 2b 80 00 3b cmplwi cr7,r0,59 ffc098e4: 41 9d 00 68 bgt- cr7,ffc0994c <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc098e8: 80 03 00 0c lwz r0,12(r3) ffc098ec: 2b 80 00 17 cmplwi cr7,r0,23 ffc098f0: 41 9d 00 5c bgt- cr7,ffc0994c <_TOD_Validate+0xa4> (the_tod->month == 0) || ffc098f4: 81 23 00 04 lwz r9,4(r3) uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc098f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc098fc: 41 9e 00 50 beq- cr7,ffc0994c <_TOD_Validate+0xa4> <== NEVER TAKEN ffc09900: 2b 89 00 0c cmplwi cr7,r9,12 ffc09904: 41 9d 00 48 bgt- cr7,ffc0994c <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc09908: 80 03 00 00 lwz r0,0(r3) uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc0990c: 2b 80 07 c3 cmplwi cr7,r0,1987 ffc09910: 40 9d 00 3c ble- cr7,ffc0994c <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) ffc09914: 81 63 00 08 lwz r11,8(r3) uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc09918: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0991c: 41 9e 00 30 beq- cr7,ffc0994c <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc09920: 70 0a 00 03 andi. r10,r0,3 ffc09924: 40 82 00 30 bne- ffc09954 <_TOD_Validate+0xac> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc09928: 38 09 00 0d addi r0,r9,13 ffc0992c: 3d 20 ff c2 lis r9,-62 ffc09930: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09934: 39 29 3f 08 addi r9,r9,16136 ffc09938: 7c 69 00 2e lwzx r3,r9,r0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( ffc0993c: 7c 6b 18 10 subfc r3,r11,r3 ffc09940: 38 60 00 00 li r3,0 ffc09944: 7c 63 19 14 adde r3,r3,r3 <== ALWAYS TAKEN ffc09948: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0994c: 38 60 00 00 li r3,0 if ( the_tod->day > days_in_month ) return false; return true; } ffc09950: 4e 80 00 20 blr <== ALWAYS TAKEN return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc09954: 3d 40 ff c2 lis r10,-62 ffc09958: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0995c: 39 4a 3f 08 addi r10,r10,16136 ffc09960: 7c 6a 48 2e lwzx r3,r10,r9 ffc09964: 4b ff ff d8 b ffc0993c <_TOD_Validate+0x94> <== ALWAYS TAKEN ffc0a86c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0a86c: 94 21 ff e8 stwu r1,-24(r1) ffc0a870: 7c 08 02 a6 mflr r0 ffc0a874: 90 01 00 1c stw r0,28(r1) ffc0a878: 93 e1 00 14 stw r31,20(r1) ffc0a87c: 7c 7f 1b 78 mr r31,r3 ffc0a880: 93 81 00 08 stw r28,8(r1) ffc0a884: 7c bc 2b 78 mr r28,r5 ffc0a888: 93 a1 00 0c stw r29,12(r1) ffc0a88c: 93 c1 00 10 stw r30,16(r1) ffc0a890: 7c 9e 23 78 mr r30,r4 */ /* * Save original state */ original_state = the_thread->current_state; ffc0a894: 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 ); ffc0a898: 48 00 13 81 bl ffc0bc18 <_Thread_Set_transient> <== ALWAYS TAKEN /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) ffc0a89c: 80 1f 00 14 lwz r0,20(r31) ffc0a8a0: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0a8a4: 41 9e 00 10 beq- cr7,ffc0a8b4 <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0a8a8: 7f c4 f3 78 mr r4,r30 ffc0a8ac: 7f e3 fb 78 mr r3,r31 ffc0a8b0: 48 00 11 e9 bl ffc0ba98 <_Thread_Set_priority> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a8b4: 7d 20 00 a6 mfmsr r9 ffc0a8b8: 7c 10 42 a6 mfsprg r0,0 ffc0a8bc: 7d 20 00 78 andc r0,r9,r0 ffc0a8c0: 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; ffc0a8c4: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0a8c8: 2f 80 00 04 cmpwi cr7,r0,4 ffc0a8cc: 41 9e 00 88 beq- cr7,ffc0a954 <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0a8d0: 73 ab 00 04 andi. r11,r29,4 ffc0a8d4: 41 82 00 38 beq- ffc0a90c <_Thread_Change_priority+0xa0> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a8d8: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0a8dc: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0a8e0: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED ffc0a8e4: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0a8e8: 40 82 00 40 bne- ffc0a928 <_Thread_Change_priority+0xbc> <== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } ffc0a8ec: 80 01 00 1c lwz r0,28(r1) ffc0a8f0: 83 81 00 08 lwz r28,8(r1) ffc0a8f4: 7c 08 03 a6 mtlr r0 ffc0a8f8: 83 a1 00 0c lwz r29,12(r1) ffc0a8fc: 83 c1 00 10 lwz r30,16(r1) ffc0a900: 83 e1 00 14 lwz r31,20(r1) ffc0a904: 38 21 00 18 addi r1,r1,24 ffc0a908: 4e 80 00 20 blr <== ALWAYS TAKEN */ 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 ); ffc0a90c: 54 0b 07 b8 rlwinm r11,r0,0,30,28 ffc0a910: 91 7f 00 10 stw r11,16(r31) ffc0a914: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0a918: 3d 20 00 03 lis r9,3 ffc0a91c: 61 29 be e0 ori r9,r9,48864 ffc0a920: 7c 0b 48 39 and. r11,r0,r9 ffc0a924: 41 82 ff c8 beq+ ffc0a8ec <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0a928: 80 7f 00 44 lwz r3,68(r31) ffc0a92c: 7f e4 fb 78 mr r4,r31 ffc0a930: 48 00 10 71 bl ffc0b9a0 <_Thread_queue_Requeue> <== ALWAYS TAKEN if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } ffc0a934: 80 01 00 1c lwz r0,28(r1) ffc0a938: 83 81 00 08 lwz r28,8(r1) ffc0a93c: 7c 08 03 a6 mtlr r0 ffc0a940: 83 a1 00 0c lwz r29,12(r1) ffc0a944: 83 c1 00 10 lwz r30,16(r1) ffc0a948: 83 e1 00 14 lwz r31,20(r1) ffc0a94c: 38 21 00 18 addi r1,r1,24 ffc0a950: 4e 80 00 20 blr <== ALWAYS TAKEN } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0a954: 73 bd 00 04 andi. r29,r29,4 ffc0a958: 3d 40 00 00 lis r10,0 ffc0a95c: 40 82 00 4c bne- ffc0a9a8 <_Thread_Change_priority+0x13c> <== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0a960: 93 bf 00 10 stw r29,16(r31) _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) ffc0a964: 2f 9c 00 00 cmpwi cr7,r28,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0a968: 81 7f 00 90 lwz r11,144(r31) ffc0a96c: 80 1f 00 98 lwz r0,152(r31) ffc0a970: 81 0b 00 00 lwz r8,0(r11) ffc0a974: 7d 00 03 78 or r0,r8,r0 ffc0a978: 90 0b 00 00 stw r0,0(r11) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0a97c: 81 6a 27 60 lwz r11,10080(r10) ffc0a980: 80 1f 00 94 lwz r0,148(r31) ffc0a984: 7d 60 03 78 or r0,r11,r0 ffc0a988: 90 0a 27 60 stw r0,10080(r10) ffc0a98c: 41 9e 00 b8 beq- cr7,ffc0aa44 <_Thread_Change_priority+0x1d8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc0a990: 81 7f 00 8c lwz r11,140(r31) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0a994: 81 0b 00 00 lwz r8,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0a998: 91 7f 00 04 stw r11,4(r31) before_node = after_node->next; after_node->next = the_node; ffc0a99c: 93 eb 00 00 stw r31,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0a9a0: 93 e8 00 04 stw r31,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0a9a4: 91 1f 00 00 stw r8,0(r31) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0a9a8: 7c 00 00 a6 mfmsr r0 ffc0a9ac: 7d 20 01 24 mtmsr r9 ffc0a9b0: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0a9b4: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0a9b8: 81 6a 27 60 lwz r11,10080(r10) ffc0a9bc: 80 a8 27 20 lwz r5,10016(r8) ffc0a9c0: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0a9c4: 3c e0 00 00 lis r7,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0a9c8: 91 6a 27 60 stw r11,10080(r10) <== ALWAYS TAKEN _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0a9cc: 38 e7 2d 00 addi r7,r7,11520 ffc0a9d0: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0a9d4: 7c 07 40 2e lwzx r0,r7,r8 ffc0a9d8: 7c 0b 00 34 cntlzw r11,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0a9dc: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0a9e0: 7c 07 41 2e stwx r0,r7,r8 ffc0a9e4: 7c c6 5a 14 add r6,r6,r11 ffc0a9e8: 1c c6 00 0c mulli r6,r6,12 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0a9ec: 3d 60 00 00 lis r11,0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0a9f0: 7c 05 30 2e lwzx r0,r5,r6 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0a9f4: 81 6b 27 6c lwz r11,10092(r11) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0a9f8: 3d 40 00 00 lis r10,0 ffc0a9fc: 90 0a 27 48 stw r0,10056(r10) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && ffc0aa00: 7f 80 58 00 cmpw cr7,r0,r11 ffc0aa04: 41 9e 00 1c beq- cr7,ffc0aa20 <_Thread_Change_priority+0x1b4> _Thread_Executing->is_preemptible ) ffc0aa08: 88 0b 00 75 lbz r0,117(r11) ffc0aa0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aa10: 41 9e 00 10 beq- cr7,ffc0aa20 <_Thread_Change_priority+0x1b4> _Context_Switch_necessary = true; ffc0aa14: 38 00 00 01 li r0,1 ffc0aa18: 3d 60 00 00 lis r11,0 ffc0aa1c: 98 0b 27 7c stb r0,10108(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0aa20: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); } ffc0aa24: 80 01 00 1c lwz r0,28(r1) ffc0aa28: 83 81 00 08 lwz r28,8(r1) ffc0aa2c: 7c 08 03 a6 mtlr r0 ffc0aa30: 83 a1 00 0c lwz r29,12(r1) ffc0aa34: 83 c1 00 10 lwz r30,16(r1) ffc0aa38: 83 e1 00 14 lwz r31,20(r1) ffc0aa3c: 38 21 00 18 addi r1,r1,24 ffc0aa40: 4e 80 00 20 blr <== ALWAYS TAKEN _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); ffc0aa44: 81 7f 00 8c lwz r11,140(r31) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0aa48: 38 0b 00 04 addi r0,r11,4 ffc0aa4c: 90 1f 00 00 stw r0,0(r31) old_last_node = the_chain->last; ffc0aa50: 81 0b 00 08 lwz r8,8(r11) <== ALWAYS TAKEN the_chain->last = the_node; ffc0aa54: 93 eb 00 08 stw r31,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0aa58: 91 1f 00 04 stw r8,4(r31) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0aa5c: 93 e8 00 00 stw r31,0(r8) ffc0aa60: 4b ff ff 48 b ffc0a9a8 <_Thread_Change_priority+0x13c> <== ALWAYS TAKEN ffc0aa64 <_Thread_Clear_state>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0aa64: 7d 20 00 a6 mfmsr r9 ffc0aa68: 7c 10 42 a6 mfsprg r0,0 ffc0aa6c: 7d 20 00 78 andc r0,r9,r0 ffc0aa70: 7c 00 01 24 mtmsr r0 { ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc0aa74: 80 03 00 10 lwz r0,16(r3) if ( current_state & state ) { ffc0aa78: 7c 8b 00 39 and. r11,r4,r0 ffc0aa7c: 41 82 00 a0 beq- ffc0ab1c <_Thread_Clear_state+0xb8> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0aa80: 7c 00 20 78 andc r0,r0,r4 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc0aa84: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & state ) { current_state = ffc0aa88: 90 03 00 10 stw r0,16(r3) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc0aa8c: 40 9e 00 90 bne- cr7,ffc0ab1c <_Thread_Clear_state+0xb8> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0aa90: 81 43 00 90 lwz r10,144(r3) ffc0aa94: 80 03 00 98 lwz r0,152(r3) <== ALWAYS TAKEN ffc0aa98: 81 0a 00 00 lwz r8,0(r10) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc0aa9c: 81 63 00 8c lwz r11,140(r3) ffc0aaa0: 7d 00 03 78 or r0,r8,r0 ffc0aaa4: 90 0a 00 00 stw r0,0(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0aaa8: 38 0b 00 04 addi r0,r11,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0aaac: 3d 00 00 00 lis r8,0 ffc0aab0: 90 03 00 00 stw r0,0(r3) ffc0aab4: 80 e8 27 60 lwz r7,10080(r8) ffc0aab8: 80 03 00 94 lwz r0,148(r3) old_last_node = the_chain->last; ffc0aabc: 81 4b 00 08 lwz r10,8(r11) ffc0aac0: 7c e0 03 78 or r0,r7,r0 the_chain->last = the_node; ffc0aac4: 90 6b 00 08 stw r3,8(r11) ffc0aac8: 90 08 27 60 stw r0,10080(r8) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0aacc: 91 43 00 04 stw r10,4(r3) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0aad0: 90 6a 00 00 stw r3,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0aad4: 7c 00 00 a6 mfmsr r0 ffc0aad8: 7d 20 01 24 mtmsr r9 ffc0aadc: 7c 00 01 24 mtmsr r0 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { ffc0aae0: 3d 60 00 00 lis r11,0 ffc0aae4: 80 03 00 14 lwz r0,20(r3) ffc0aae8: 81 4b 27 48 lwz r10,10056(r11) ffc0aaec: 81 4a 00 14 lwz r10,20(r10) ffc0aaf0: 7f 80 50 40 cmplw cr7,r0,r10 ffc0aaf4: 40 9c 00 28 bge- cr7,ffc0ab1c <_Thread_Clear_state+0xb8> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0aaf8: 3d 40 00 00 lis r10,0 * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; ffc0aafc: 90 6b 27 48 stw r3,10056(r11) if ( _Thread_Executing->is_preemptible || ffc0ab00: 81 4a 27 6c lwz r10,10092(r10) ffc0ab04: 89 6a 00 75 lbz r11,117(r10) ffc0ab08: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ab0c: 41 9e 00 18 beq- cr7,ffc0ab24 <_Thread_Clear_state+0xc0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc0ab10: 38 00 00 01 li r0,1 ffc0ab14: 3d 60 00 00 lis r11,0 ffc0ab18: 98 0b 27 7c stb r0,10108(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ab1c: 7d 20 01 24 mtmsr r9 } } } _ISR_Enable( level ); } ffc0ab20: 4e 80 00 20 blr <== ALWAYS TAKEN * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0ab24: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ab28: 41 9e ff e8 beq+ cr7,ffc0ab10 <_Thread_Clear_state+0xac> <== NEVER TAKEN ffc0ab2c: 4b ff ff f0 b ffc0ab1c <_Thread_Clear_state+0xb8> <== ALWAYS TAKEN ffc0ab30 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc0ab30: 94 21 ff e8 stwu r1,-24(r1) ffc0ab34: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0ab38: 39 60 00 00 li r11,0 <== ALWAYS TAKEN ffc0ab3c: 90 01 00 1c stw r0,28(r1) ffc0ab40: a0 04 00 0a lhz r0,10(r4) ffc0ab44: 81 23 00 1c lwz r9,28(r3) ffc0ab48: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ab4c: 93 a1 00 0c stw r29,12(r1) ffc0ab50: 7c 7d 1b 78 mr r29,r3 ffc0ab54: 93 e1 00 14 stw r31,20(r1) ffc0ab58: 7c 9f 23 78 mr r31,r4 ffc0ab5c: 93 c1 00 10 stw r30,16(r1) ffc0ab60: 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; ffc0ab64: 3f c0 00 00 lis r30,0 ffc0ab68: 81 3e 27 2c lwz r9,10028(r30) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc0ab6c: 7c 83 23 78 mr r3,r4 ffc0ab70: 38 09 ff ff addi r0,r9,-1 ffc0ab74: 90 1e 27 2c stw r0,10028(r30) ffc0ab78: 48 00 19 21 bl ffc0c498 <_User_extensions_Thread_delete> <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ab7c: 81 3e 27 2c lwz r9,10028(r30) ffc0ab80: 38 09 00 01 addi r0,r9,1 ffc0ab84: 90 1e 27 2c stw r0,10028(r30) /* * 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 ); ffc0ab88: 7f a3 eb 78 mr r3,r29 ffc0ab8c: 7f e4 fb 78 mr r4,r31 ffc0ab90: 4b ff f3 25 bl ffc09eb4 <_Objects_Close> <== ALWAYS TAKEN /* * 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 ); ffc0ab94: 7f e3 fb 78 mr r3,r31 ffc0ab98: 38 80 00 01 li r4,1 <== ALWAYS TAKEN ffc0ab9c: 48 00 0f 59 bl ffc0baf4 <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc0aba0: 7f e3 fb 78 mr r3,r31 <== ALWAYS TAKEN ffc0aba4: 48 00 0d 15 bl ffc0b8b8 <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN ffc0aba8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0abac: 40 9e 00 10 bne- cr7,ffc0abbc <_Thread_Close+0x8c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc0abb0: 80 1f 00 50 lwz r0,80(r31) ffc0abb4: 2f 80 00 02 cmpwi cr7,r0,2 ffc0abb8: 41 9e 00 60 beq- cr7,ffc0ac18 <_Thread_Close+0xe8> if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc0abbc: 80 7f 00 d0 lwz r3,208(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; ffc0abc0: 38 00 00 00 li r0,0 ffc0abc4: 90 1f 01 38 stw r0,312(r31) if ( the_thread->Start.fp_context ) ffc0abc8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0abcc: 41 9e 00 08 beq- cr7,ffc0abd4 <_Thread_Close+0xa4> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc0abd0: 48 00 1e 3d bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); ffc0abd4: 7f e3 fb 78 mr r3,r31 ffc0abd8: 48 00 11 8d bl ffc0bd64 <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc0abdc: 80 7f 01 4c lwz r3,332(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; ffc0abe0: 38 00 00 00 li r0,0 <== ALWAYS TAKEN if ( the_thread->extensions ) ffc0abe4: 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; ffc0abe8: 90 1f 00 d4 stw r0,212(r31) if ( the_thread->extensions ) ffc0abec: 41 9e 00 08 beq- cr7,ffc0abf4 <_Thread_Close+0xc4> (void) _Workspace_Free( the_thread->extensions ); ffc0abf0: 48 00 1e 1d bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN the_thread->extensions = NULL; ffc0abf4: 38 00 00 00 li r0,0 } ffc0abf8: 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; ffc0abfc: 90 1f 01 4c stw r0,332(r31) } ffc0ac00: 80 01 00 1c lwz r0,28(r1) ffc0ac04: 83 c1 00 10 lwz r30,16(r1) ffc0ac08: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0ac0c: 83 e1 00 14 lwz r31,20(r1) ffc0ac10: 38 21 00 18 addi r1,r1,24 ffc0ac14: 4e 80 00 20 blr <== ALWAYS TAKEN */ _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 ); ffc0ac18: 38 7f 00 48 addi r3,r31,72 ffc0ac1c: 48 00 1b cd bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN ffc0ac20: 4b ff ff 9c b ffc0abbc <_Thread_Close+0x8c> <== ALWAYS TAKEN ffc0ac24 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { ffc0ac24: 94 21 ff d0 stwu r1,-48(r1) <== ALWAYS TAKEN ffc0ac28: 7c 08 02 a6 mflr r0 ffc0ac2c: 93 81 00 20 stw r28,32(r1) * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); ffc0ac30: 3f 80 00 00 lis r28,0 ffc0ac34: 3b 9c 2d 40 addi r28,r28,11584 ffc0ac38: 93 e1 00 2c stw r31,44(r1) ffc0ac3c: 7f 83 e3 78 mr r3,r28 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ac40: 3f e0 00 00 lis r31,0 <== ALWAYS TAKEN ffc0ac44: 90 01 00 34 stw r0,52(r1) ffc0ac48: 93 c1 00 28 stw r30,40(r1) <== ALWAYS TAKEN /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); ffc0ac4c: 3f c0 00 00 lis r30,0 * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { ffc0ac50: 93 a1 00 24 stw r29,36(r1) <== ALWAYS TAKEN * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); ffc0ac54: 4b ff f1 99 bl ffc09dec <_Objects_Allocate> <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ac58: 81 3f 27 2c lwz r9,10028(r31) /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); ffc0ac5c: 90 7e 27 98 stw r3,10136(r30) ffc0ac60: 38 09 00 01 addi r0,r9,1 ffc0ac64: 90 1f 27 2c stw r0,10028(r31) _Thread_Initialize( &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ _Stack_Ensure_minimum( Configuration.idle_task_stack_size ), ffc0ac68: 3f a0 00 00 lis r29,0 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( ffc0ac6c: 80 9e 27 98 lwz r4,10136(r30) ffc0ac70: 3d 20 00 00 lis r9,0 &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ _Stack_Ensure_minimum( Configuration.idle_task_stack_size ), ffc0ac74: 3b bd 20 a0 addi r29,r29,8352 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( ffc0ac78: 80 c9 26 60 lwz r6,9824(r9) &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ _Stack_Ensure_minimum( Configuration.idle_task_stack_size ), ffc0ac7c: 80 1d 00 18 lwz r0,24(r29) * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( ffc0ac80: 3d 20 49 44 lis r9,18756 <== ALWAYS TAKEN ffc0ac84: 61 29 4c 45 ori r9,r9,19525 ffc0ac88: 7f 86 00 40 cmplw cr7,r6,r0 ffc0ac8c: 91 21 00 18 stw r9,24(r1) ffc0ac90: 40 9c 00 08 bge- cr7,ffc0ac98 <_Thread_Create_idle+0x74> ffc0ac94: 7c 06 03 78 mr r6,r0 ffc0ac98: 3d 20 00 00 lis r9,0 ffc0ac9c: 89 09 26 64 lbz r8,9828(r9) ffc0aca0: 38 00 00 00 li r0,0 ffc0aca4: 39 61 00 18 addi r11,r1,24 ffc0aca8: 90 01 00 0c stw r0,12(r1) ffc0acac: 7f 83 e3 78 mr r3,r28 <== ALWAYS TAKEN ffc0acb0: 38 a0 00 00 li r5,0 ffc0acb4: 91 61 00 10 stw r11,16(r1) ffc0acb8: 38 e0 00 00 li r7,0 ffc0acbc: 39 20 00 01 li r9,1 <== ALWAYS TAKEN ffc0acc0: 90 01 00 08 stw r0,8(r1) ffc0acc4: 39 40 00 00 li r10,0 ffc0acc8: 48 00 03 9d bl ffc0b064 <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0accc: 81 3f 27 2c lwz r9,10028(r31) * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( ffc0acd0: 38 80 00 00 li r4,0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; ffc0acd4: 80 1e 27 98 lwz r0,10136(r30) _Thread_Start( ffc0acd8: 38 c0 00 00 li r6,0 ffc0acdc: 39 29 ff ff addi r9,r9,-1 ffc0ace0: 80 bd 00 14 lwz r5,20(r29) <== ALWAYS TAKEN ffc0ace4: 91 3f 27 2c stw r9,10028(r31) /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = ffc0ace8: 3d 20 00 00 lis r9,0 _Thread_Executing = _Thread_Idle; _Thread_Start( ffc0acec: 7c 03 03 78 mr r3,r0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = ffc0acf0: 90 09 27 6c stw r0,10092(r9) _Thread_Executing = _Thread_Idle; _Thread_Start( ffc0acf4: 38 e0 00 00 li r7,0 <== ALWAYS TAKEN /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = ffc0acf8: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0acfc: 90 09 27 48 stw r0,10056(r9) _Thread_Executing = _Thread_Idle; _Thread_Start( ffc0ad00: 48 00 11 29 bl ffc0be28 <_Thread_Start> <== ALWAYS TAKEN Configuration.idle_task, NULL, 0 ); } ffc0ad04: 80 01 00 34 lwz r0,52(r1) <== ALWAYS TAKEN ffc0ad08: 83 81 00 20 lwz r28,32(r1) <== ALWAYS TAKEN ffc0ad0c: 7c 08 03 a6 mtlr r0 ffc0ad10: 83 a1 00 24 lwz r29,36(r1) <== ALWAYS TAKEN ffc0ad14: 83 c1 00 28 lwz r30,40(r1) ffc0ad18: 83 e1 00 2c lwz r31,44(r1) ffc0ad1c: 38 21 00 30 addi r1,r1,48 ffc0ad20: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ad24 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ad24: 94 21 ff e8 stwu r1,-24(r1) ffc0ad28: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ad2c: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ad30: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ad34: 48 00 02 65 bl ffc0af98 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0ad38: 80 01 00 08 lwz r0,8(r1) ffc0ad3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ad40: 40 9e 00 20 bne- cr7,ffc0ad60 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0ad44: 3c 80 10 00 lis r4,4096 ffc0ad48: 60 84 00 18 ori r4,r4,24 ffc0ad4c: 4b ff fd 19 bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN ffc0ad50: 3d 20 00 00 lis r9,0 ffc0ad54: 81 69 27 2c lwz r11,10028(r9) ffc0ad58: 38 0b ff ff addi r0,r11,-1 ffc0ad5c: 90 09 27 2c stw r0,10028(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0ad60: 80 01 00 1c lwz r0,28(r1) ffc0ad64: 38 21 00 18 addi r1,r1,24 ffc0ad68: 7c 08 03 a6 mtlr r0 ffc0ad6c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ad70 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0ad70: 94 21 ff b0 stwu r1,-80(r1) ffc0ad74: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0ad78: 93 41 00 38 stw r26,56(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0ad7c: 3f 40 00 00 lis r26,0 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0ad80: 93 e1 00 4c stw r31,76(r1) ffc0ad84: 90 01 00 54 stw r0,84(r1) ffc0ad88: 92 41 00 18 stw r18,24(r1) ffc0ad8c: 92 61 00 1c stw r19,28(r1) ffc0ad90: 92 81 00 20 stw r20,32(r1) ffc0ad94: 92 a1 00 24 stw r21,36(r1) ffc0ad98: 92 c1 00 28 stw r22,40(r1) ffc0ad9c: 92 e1 00 2c stw r23,44(r1) ffc0ada0: 93 01 00 30 stw r24,48(r1) ffc0ada4: 93 21 00 34 stw r25,52(r1) ffc0ada8: 93 61 00 3c stw r27,60(r1) ffc0adac: 93 81 00 40 stw r28,64(r1) <== ALWAYS TAKEN ffc0adb0: 93 a1 00 44 stw r29,68(r1) ffc0adb4: 93 c1 00 48 stw r30,72(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0adb8: 83 fa 27 6c lwz r31,10092(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0adbc: 7c 00 00 a6 mfmsr r0 ffc0adc0: 7d 30 42 a6 mfsprg r9,0 ffc0adc4: 7c 09 48 78 andc r9,r0,r9 <== ALWAYS TAKEN ffc0adc8: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0adcc: 3f 20 00 00 lis r25,0 ffc0add0: 89 39 27 7c lbz r9,10108(r25) <== ALWAYS TAKEN ffc0add4: 3e 40 00 00 lis r18,0 ffc0add8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0addc: 41 9e 01 20 beq- cr7,ffc0aefc <_Thread_Dispatch+0x18c> ffc0ade0: 3e 80 00 00 lis r20,0 ffc0ade4: 3f 60 00 00 lis r27,0 ffc0ade8: 3e a0 00 00 lis r21,0 #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; ffc0adec: 3e 60 00 00 lis r19,0 <== ALWAYS TAKEN ffc0adf0: 3a 94 27 48 addi r20,r20,10056 ffc0adf4: 3b 39 27 7c addi r25,r25,10108 ffc0adf8: 3b 5a 27 6c addi r26,r26,10092 ffc0adfc: 3b 7b 27 74 addi r27,r27,10100 ffc0ae00: 3a b5 27 44 addi r21,r21,10052 <== ALWAYS TAKEN ffc0ae04: 3a 73 27 24 addi r19,r19,10020 ffc0ae08: 3a d2 27 2c addi r22,r18,10028 ffc0ae0c: 3b 81 00 08 addi r28,r1,8 ffc0ae10: 3b a1 00 10 addi r29,r1,16 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc0ae14: 3a e0 00 01 li r23,1 _Context_Switch_necessary = false; ffc0ae18: 3b 00 00 00 li r24,0 ffc0ae1c: 48 00 00 b8 b ffc0aed4 <_Thread_Dispatch+0x164> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ae20: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0ae24: 7f 83 e3 78 mr r3,r28 ffc0ae28: 48 00 3f dd bl ffc0ee04 <_TOD_Get_uptime> <== ALWAYS TAKEN _Timestamp_Subtract( ffc0ae2c: 7f 63 db 78 mr r3,r27 ffc0ae30: 7f 84 e3 78 mr r4,r28 ffc0ae34: 7f a5 eb 78 mr r5,r29 ffc0ae38: 48 00 12 f5 bl ffc0c12c <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0ae3c: 7f a4 eb 78 mr r4,r29 ffc0ae40: 38 7f 00 84 addi r3,r31,132 ffc0ae44: 48 00 12 8d bl ffc0c0d0 <_Timespec_Add_to> <== ALWAYS TAKEN #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0ae48: 81 35 00 00 lwz r9,0(r21) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0ae4c: 81 61 00 08 lwz r11,8(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0ae50: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0ae54: 2f 89 00 00 cmpwi cr7,r9,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0ae58: 81 81 00 0c lwz r12,12(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0ae5c: 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; ffc0ae60: 91 7b 00 00 stw r11,0(r27) ffc0ae64: 91 9b 00 04 stw r12,4(r27) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0ae68: 41 9e 00 14 beq- cr7,ffc0ae7c <_Thread_Dispatch+0x10c> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0ae6c: 80 09 00 00 lwz r0,0(r9) ffc0ae70: 90 1f 01 3c stw r0,316(r31) *_Thread_libc_reent = heir->libc_reent; ffc0ae74: 80 1e 01 3c lwz r0,316(r30) ffc0ae78: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0ae7c: 48 00 17 29 bl ffc0c5a4 <_User_extensions_Thread_switch> <== ALWAYS TAKEN * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0ae80: 80 1f 01 38 lwz r0,312(r31) _Context_Save_fp( &executing->fp_context ); ffc0ae84: 38 7f 01 38 addi r3,r31,312 * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0ae88: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ae8c: 41 9e 00 08 beq- cr7,ffc0ae94 <_Thread_Dispatch+0x124> _Context_Save_fp( &executing->fp_context ); ffc0ae90: 48 01 12 d1 bl ffc1c160 <_CPU_Context_save_fp> <== ALWAYS TAKEN #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0ae94: 38 7f 00 d8 addi r3,r31,216 ffc0ae98: 38 9e 00 d8 addi r4,r30,216 ffc0ae9c: 48 01 14 45 bl ffc1c2e0 <_CPU_Context_switch> <== ALWAYS TAKEN _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0aea0: 80 1f 01 38 lwz r0,312(r31) <== ALWAYS TAKEN _Context_Restore_fp( &executing->fp_context ); ffc0aea4: 38 7f 01 38 addi r3,r31,312 _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0aea8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aeac: 41 9e 00 08 beq- cr7,ffc0aeb4 <_Thread_Dispatch+0x144> _Context_Restore_fp( &executing->fp_context ); ffc0aeb0: 48 01 13 71 bl ffc1c220 <_CPU_Context_restore_fp> <== ALWAYS TAKEN #endif #endif executing = _Thread_Executing; ffc0aeb4: 83 fa 00 00 lwz r31,0(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0aeb8: 7c 00 00 a6 mfmsr r0 <== ALWAYS TAKEN ffc0aebc: 7d 30 42 a6 mfsprg r9,0 ffc0aec0: 7c 09 48 78 andc r9,r0,r9 ffc0aec4: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0aec8: 89 39 00 00 lbz r9,0(r25) ffc0aecc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0aed0: 41 9e 00 2c beq- cr7,ffc0aefc <_Thread_Dispatch+0x18c> heir = _Thread_Heir; ffc0aed4: 83 d4 00 00 lwz r30,0(r20) _Thread_Dispatch_disable_level = 1; ffc0aed8: 92 f6 00 00 stw r23,0(r22) _Thread_Executing = heir; #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 ) ffc0aedc: 81 3e 00 7c lwz r9,124(r30) executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; ffc0aee0: 9b 19 00 00 stb r24,0(r25) _Thread_Executing = heir; #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 ) ffc0aee4: 2f 89 00 01 cmpwi cr7,r9,1 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; ffc0aee8: 93 da 00 00 stw r30,0(r26) #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 ) ffc0aeec: 40 9e ff 34 bne+ cr7,ffc0ae20 <_Thread_Dispatch+0xb0> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0aef0: 81 33 00 00 lwz r9,0(r19) ffc0aef4: 91 3e 00 78 stw r9,120(r30) ffc0aef8: 4b ff ff 28 b ffc0ae20 <_Thread_Dispatch+0xb0> <== ALWAYS TAKEN executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; ffc0aefc: 39 20 00 00 li r9,0 ffc0af00: 91 32 27 2c stw r9,10028(r18) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0af04: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( _Thread_Do_post_task_switch_extension || ffc0af08: 3d 20 00 00 lis r9,0 ffc0af0c: 80 09 27 5c lwz r0,10076(r9) ffc0af10: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af14: 40 9e 00 10 bne- cr7,ffc0af24 <_Thread_Dispatch+0x1b4> <== NEVER TAKEN executing->do_post_task_switch_extension ) { ffc0af18: 88 1f 00 74 lbz r0,116(r31) ffc0af1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af20: 41 9e 00 10 beq- cr7,ffc0af30 <_Thread_Dispatch+0x1c0> executing->do_post_task_switch_extension = false; ffc0af24: 38 00 00 00 li r0,0 ffc0af28: 98 1f 00 74 stb r0,116(r31) _API_extensions_Run_postswitch(); ffc0af2c: 4b ff e1 e1 bl ffc0910c <_API_extensions_Run_postswitch> <== ALWAYS TAKEN } } ffc0af30: 80 01 00 54 lwz r0,84(r1) ffc0af34: 82 41 00 18 lwz r18,24(r1) ffc0af38: 7c 08 03 a6 mtlr r0 ffc0af3c: 82 61 00 1c lwz r19,28(r1) ffc0af40: 82 81 00 20 lwz r20,32(r1) ffc0af44: 82 a1 00 24 lwz r21,36(r1) ffc0af48: 82 c1 00 28 lwz r22,40(r1) <== ALWAYS TAKEN ffc0af4c: 82 e1 00 2c lwz r23,44(r1) ffc0af50: 83 01 00 30 lwz r24,48(r1) ffc0af54: 83 21 00 34 lwz r25,52(r1) ffc0af58: 83 41 00 38 lwz r26,56(r1) ffc0af5c: 83 61 00 3c lwz r27,60(r1) ffc0af60: 83 81 00 40 lwz r28,64(r1) ffc0af64: 83 a1 00 44 lwz r29,68(r1) <== ALWAYS TAKEN ffc0af68: 83 c1 00 48 lwz r30,72(r1) ffc0af6c: 83 e1 00 4c lwz r31,76(r1) ffc0af70: 38 21 00 50 addi r1,r1,80 ffc0af74: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0af78 <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) ffc0af78: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0af7c: 81 69 27 2c lwz r11,10028(r9) ffc0af80: 38 0b ff ff addi r0,r11,-1 ffc0af84: 90 09 27 2c stw r0,10028(r9) ffc0af88: 80 09 27 2c lwz r0,10028(r9) ffc0af8c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af90: 4c be 00 20 bnelr+ cr7 return; _Thread_Dispatch(); ffc0af94: 4b ff fd dc b ffc0ad70 <_Thread_Dispatch> <== ALWAYS TAKEN ffc1119c <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; ffc1119c: 3d 20 00 00 lis r9,0 ffc111a0: 81 29 27 6c lwz r9,10092(r9) if ( !_States_Is_ready( executing->current_state ) || ffc111a4: 80 09 00 10 lwz r0,16(r9) ffc111a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc111ac: 40 9e 00 20 bne- cr7,ffc111cc <_Thread_Evaluate_mode+0x30> <== NEVER TAKEN ffc111b0: 3d 60 00 00 lis r11,0 ffc111b4: 80 0b 27 48 lwz r0,10056(r11) ffc111b8: 7f 89 00 00 cmpw cr7,r9,r0 ffc111bc: 41 9e 00 24 beq- cr7,ffc111e0 <_Thread_Evaluate_mode+0x44> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { ffc111c0: 88 09 00 75 lbz r0,117(r9) ffc111c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc111c8: 41 9e 00 18 beq- cr7,ffc111e0 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN _Context_Switch_necessary = true; ffc111cc: 38 00 00 01 li r0,1 ffc111d0: 3d 20 00 00 lis r9,0 ffc111d4: 98 09 27 7c stb r0,10108(r9) ffc111d8: 38 60 00 01 li r3,1 return true; ffc111dc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc111e0: 38 60 00 00 li r3,0 } return false; } ffc111e4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0af98 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { ffc0af98: 7c 08 02 a6 mflr r0 ffc0af9c: 94 21 ff f8 stwu r1,-8(r1) ffc0afa0: 7c 85 23 78 mr r5,r4 ffc0afa4: 90 01 00 0c stw r0,12(r1) uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { ffc0afa8: 7c 60 1b 79 mr. r0,r3 ffc0afac: 41 82 00 78 beq- ffc0b024 <_Thread_Get+0x8c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0afb0: 54 09 47 7e rlwinm r9,r0,8,29,31 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0afb4: 39 69 ff ff addi r11,r9,-1 ffc0afb8: 2b 8b 00 03 cmplwi cr7,r11,3 ffc0afbc: 41 9d 00 4c bgt- cr7,ffc0b008 <_Thread_Get+0x70> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ ffc0afc0: 54 0a 2e fe rlwinm r10,r0,5,27,31 <== ALWAYS TAKEN ffc0afc4: 2f 8a 00 01 cmpwi cr7,r10,1 <== ALWAYS TAKEN ffc0afc8: 40 9e 00 40 bne- cr7,ffc0b008 <_Thread_Get+0x70> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; ffc0afcc: 3d 60 00 00 lis r11,0 ffc0afd0: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0afd4: 39 6b 2b 80 addi r11,r11,11136 ffc0afd8: 7d 2b 48 2e lwzx r9,r11,r9 if ( !api_information ) { ffc0afdc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0afe0: 41 9e 00 78 beq- cr7,ffc0b058 <_Thread_Get+0xc0> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; ffc0afe4: 80 69 00 04 lwz r3,4(r9) if ( !information ) { ffc0afe8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0afec: 41 9e 00 64 beq- cr7,ffc0b050 <_Thread_Get+0xb8> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); ffc0aff0: 7c 04 03 78 mr r4,r0 ffc0aff4: 4b ff f3 f9 bl ffc0a3ec <_Objects_Get> <== ALWAYS TAKEN done: return tp; } ffc0aff8: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0affc: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc0b000: 7c 08 03 a6 mtlr r0 ffc0b004: 4e 80 00 20 blr <== ALWAYS TAKEN goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; ffc0b008: 38 00 00 01 li r0,1 ffc0b00c: 90 05 00 00 stw r0,0(r5) ffc0b010: 38 60 00 00 li r3,0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } ffc0b014: 80 01 00 0c lwz r0,12(r1) ffc0b018: 38 21 00 08 addi r1,r1,8 ffc0b01c: 7c 08 03 a6 mtlr r0 ffc0b020: 4e 80 00 20 blr <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0b024: 3d 20 00 00 lis r9,0 ffc0b028: 81 69 27 2c lwz r11,10028(r9) ffc0b02c: 39 6b 00 01 addi r11,r11,1 ffc0b030: 91 69 27 2c stw r11,10028(r9) Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; ffc0b034: 90 04 00 00 stw r0,0(r4) tp = _Thread_Executing; ffc0b038: 3d 20 00 00 lis r9,0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } ffc0b03c: 80 01 00 0c lwz r0,12(r1) ffc0b040: 38 21 00 08 addi r1,r1,8 Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; ffc0b044: 80 69 27 6c lwz r3,10092(r9) tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } ffc0b048: 7c 08 03 a6 mtlr r0 ffc0b04c: 4e 80 00 20 blr <== ALWAYS TAKEN goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; ffc0b050: 91 45 00 00 stw r10,0(r5) goto done; ffc0b054: 4b ff ff c0 b ffc0b014 <_Thread_Get+0x7c> <== ALWAYS TAKEN goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; ffc0b058: 91 45 00 00 stw r10,0(r5) ffc0b05c: 38 60 00 00 li r3,0 goto done; ffc0b060: 4b ff ff b4 b ffc0b014 <_Thread_Get+0x7c> <== ALWAYS TAKEN ffc111e8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc111e8: 94 21 ff f0 stwu r1,-16(r1) ffc111ec: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc111f0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc111f4: 90 01 00 14 stw r0,20(r1) ffc111f8: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc111fc: 83 e9 27 6c lwz r31,10092(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc11200: 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; ffc11204: 81 3f 00 c0 lwz r9,192(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc11208: 38 00 00 00 li r0,0 ffc1120c: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc11210: 71 2b 00 01 andi. r11,r9,1 <== ALWAYS TAKEN ffc11214: 40 82 00 58 bne- ffc1126c <_Thread_Handler+0x84> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc11218: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc1121c: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc11220: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc11224: 3d 20 00 00 lis r9,0 ffc11228: 8b c9 28 fc lbz r30,10492(r9) doneConstructors = 1; ffc1122c: 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 ); ffc11230: 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; ffc11234: 98 09 28 fc stb r0,10492(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 ); ffc11238: 4b ff b0 59 bl ffc0c290 <_User_extensions_Thread_begin> <== ALWAYS TAKEN /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc1123c: 4b ff 9d 3d bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN /* * _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) */ { ffc11240: 2f 9e 00 00 cmpwi cr7,r30,0 ffc11244: 41 9e 00 58 beq- cr7,ffc1129c <_Thread_Handler+0xb4> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc11248: 80 1f 00 a8 lwz r0,168(r31) <== ALWAYS TAKEN ffc1124c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11250: 41 9e 00 5c beq- cr7,ffc112ac <_Thread_Handler+0xc4> <== 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 ); ffc11254: 7f e3 fb 78 mr r3,r31 ffc11258: 4b ff b0 ad bl ffc0c304 <_User_extensions_Thread_exitted> <== ALWAYS TAKEN _Internal_error_Occurred( ffc1125c: 38 60 00 00 li r3,0 ffc11260: 38 80 00 01 li r4,1 ffc11264: 38 a0 00 06 li r5,6 ffc11268: 4b ff 8b 25 bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc1126c: 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(); ffc11270: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc11274: 7c 00 01 24 mtmsr r0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc11278: 3d 20 00 00 lis r9,0 ffc1127c: 8b c9 28 fc lbz r30,10492(r9) doneConstructors = 1; ffc11280: 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 ); ffc11284: 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; ffc11288: 98 09 28 fc stb r0,10492(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 ); ffc1128c: 4b ff b0 05 bl ffc0c290 <_User_extensions_Thread_begin> <== ALWAYS TAKEN /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc11290: 4b ff 9c e9 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN /* * _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) */ { ffc11294: 2f 9e 00 00 cmpwi cr7,r30,0 ffc11298: 40 9e ff b0 bne+ cr7,ffc11248 <_Thread_Handler+0x60> <== ALWAYS TAKEN INIT_NAME (); ffc1129c: 48 00 bf c1 bl ffc1d25c <_init> <== ALWAYS TAKEN } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc112a0: 80 1f 00 a8 lwz r0,168(r31) ffc112a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc112a8: 40 9e ff ac bne+ cr7,ffc11254 <_Thread_Handler+0x6c> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc112ac: 80 1f 00 a4 lwz r0,164(r31) ffc112b0: 80 7f 00 b0 lwz r3,176(r31) ffc112b4: 7c 09 03 a6 mtctr r0 ffc112b8: 4e 80 04 21 bctrl <== ALWAYS TAKEN INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc112bc: 90 7f 00 28 stw r3,40(r31) ffc112c0: 4b ff ff 94 b ffc11254 <_Thread_Handler+0x6c> <== ALWAYS TAKEN ffc0b30c <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { ffc0b30c: 94 21 ff f0 stwu r1,-16(r1) ffc0b310: 7c 08 02 a6 mflr r0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; ffc0b314: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { ffc0b318: 90 01 00 14 stw r0,20(r1) uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; ffc0b31c: 39 29 20 a0 addi r9,r9,8352 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0b320: 81 69 00 20 lwz r11,32(r9) ffc0b324: 80 09 00 24 lwz r0,36(r9) ffc0b328: 7d 6b 00 34 cntlzw r11,r11 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { ffc0b32c: 93 e1 00 0c stw r31,12(r1) <== ALWAYS TAKEN #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0b330: 7c 00 00 34 cntlzw r0,r0 <== ALWAYS TAKEN ffc0b334: 55 6b d9 7e rlwinm r11,r11,27,5,31 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; maximum_extensions = Configuration.maximum_extensions; ffc0b338: 81 49 00 08 lwz r10,8(r9) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0b33c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0b340: 7c 00 5a 79 xor. r0,r0,r11 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; ffc0b344: 81 69 00 10 lwz r11,16(r9) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0b348: 40 82 00 bc bne- ffc0b404 <_Thread_Handler_initialization+0xf8> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; ffc0b34c: 3d 20 00 00 lis r9,0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0b350: 3f e0 00 00 lis r31,0 <== ALWAYS TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; ffc0b354: 98 09 27 7c stb r0,10108(r9) _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; ffc0b358: 3d 20 00 00 lis r9,0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0b35c: 88 7f 26 64 lbz r3,9828(r31) _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; ffc0b360: 90 09 27 5c stw r0,10076(r9) _Thread_Maximum_extensions = maximum_extensions; ffc0b364: 3d 20 00 00 lis r9,0 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0b368: 38 63 00 01 addi r3,r3,1 <== ALWAYS TAKEN _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; ffc0b36c: 91 49 27 58 stw r10,10072(r9) <== ALWAYS TAKEN _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0b370: 3d 20 00 00 lis r9,0 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0b374: 1c 63 00 0c mulli r3,r3,12 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0b378: 91 69 27 24 stw r11,10020(r9) <== ALWAYS TAKEN true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; ffc0b37c: 3d 20 00 00 lis r9,0 ffc0b380: 90 09 27 6c stw r0,10092(r9) _Thread_Heir = NULL; ffc0b384: 3d 20 00 00 lis r9,0 ffc0b388: 90 09 27 48 stw r0,10056(r9) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; ffc0b38c: 3d 20 00 00 lis r9,0 ffc0b390: 90 09 27 40 stw r0,10048(r9) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0b394: 48 00 15 fd bl ffc0c990 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN ffc0b398: 3d 20 00 00 lis r9,0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) ffc0b39c: 89 5f 26 64 lbz r10,9828(r31) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0b3a0: 39 60 00 00 li r11,0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0b3a4: 90 69 27 20 stw r3,10016(r9) (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) ffc0b3a8: 39 20 00 00 li r9,0 ffc0b3ac: 39 29 00 01 addi r9,r9,1 ffc0b3b0: 91 63 00 04 stw r11,4(r3) ffc0b3b4: 7f 89 50 40 cmplw cr7,r9,r10 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b3b8: 38 03 00 04 addi r0,r3,4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b3bc: 90 63 00 08 stw r3,8(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b3c0: 90 03 00 00 stw r0,0(r3) <== ALWAYS TAKEN ffc0b3c4: 38 63 00 0c addi r3,r3,12 ffc0b3c8: 40 9d ff e4 ble+ cr7,ffc0b3ac <_Thread_Handler_initialization+0xa0> /* * Initialize this class of objects. */ _Objects_Initialize_information( ffc0b3cc: 3c 60 00 00 lis r3,0 ffc0b3d0: 38 63 2d 40 addi r3,r3,11584 ffc0b3d4: 38 80 00 01 li r4,1 ffc0b3d8: 38 a0 00 01 li r5,1 ffc0b3dc: 38 c0 00 01 li r6,1 ffc0b3e0: 38 e0 01 54 li r7,340 ffc0b3e4: 39 00 00 00 li r8,0 ffc0b3e8: 39 20 00 08 li r9,8 ffc0b3ec: 4b ff f0 9d bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0b3f0: 80 01 00 14 lwz r0,20(r1) <== ALWAYS TAKEN ffc0b3f4: 83 e1 00 0c lwz r31,12(r1) ffc0b3f8: 38 21 00 10 addi r1,r1,16 ffc0b3fc: 7c 08 03 a6 mtlr r0 ffc0b400: 4e 80 00 20 blr <== ALWAYS TAKEN * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( ffc0b404: 38 60 00 00 li r3,0 ffc0b408: 38 80 00 01 li r4,1 ffc0b40c: 38 a0 00 0f li r5,15 ffc0b410: 4b ff e9 7d bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc0b064 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0b064: 94 21 ff d0 stwu r1,-48(r1) ffc0b068: 7c 08 02 a6 mflr r0 ffc0b06c: 7d 80 00 26 mfcr r12 ffc0b070: 90 01 00 34 stw r0,52(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0b074: 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 ) { ffc0b078: 93 41 00 18 stw r26,24(r1) ffc0b07c: 7d 3a 4b 78 mr r26,r9 */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; the_thread->libc_reent = NULL; ffc0b080: 90 04 01 3c stw r0,316(r4) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0b084: 90 04 01 40 stw r0,320(r4) ffc0b088: 90 04 01 44 stw r0,324(r4) ffc0b08c: 90 04 01 48 stw r0,328(r4) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0b090: 81 21 00 40 lwz r9,64(r1) ffc0b094: 93 a1 00 24 stw r29,36(r1) ffc0b098: 7c 7d 1b 78 mr r29,r3 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0b09c: 7c 83 23 78 mr r3,r4 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0b0a0: 93 e1 00 2c stw r31,44(r1) ffc0b0a4: 7c 9f 23 78 mr r31,r4 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0b0a8: 7c c4 33 78 mr r4,r6 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0b0ac: 93 01 00 10 stw r24,16(r1) ffc0b0b0: 93 21 00 14 stw r25,20(r1) <== ALWAYS TAKEN ffc0b0b4: 7d 59 53 78 mr r25,r10 ffc0b0b8: 93 61 00 1c stw r27,28(r1) ffc0b0bc: 7d 1b 43 78 mr r27,r8 ffc0b0c0: 93 81 00 20 stw r28,32(r1) ffc0b0c4: 7c fc 3b 78 mr r28,r7 ffc0b0c8: 93 c1 00 28 stw r30,40(r1) ffc0b0cc: 7c de 33 78 mr r30,r6 ffc0b0d0: 92 e1 00 0c stw r23,12(r1) ffc0b0d4: 91 81 00 08 stw r12,8(r1) ffc0b0d8: 83 09 00 00 lwz r24,0(r9) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0b0dc: 48 00 0b d1 bl ffc0bcac <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0b0e0: 2c 03 00 00 cmpwi r3,0 ffc0b0e4: 41 82 01 68 beq- ffc0b24c <_Thread_Initialize+0x1e8> ffc0b0e8: 7f 9e 18 40 cmplw cr7,r30,r3 ffc0b0ec: 41 9d 01 60 bgt- cr7,ffc0b24c <_Thread_Initialize+0x1e8> <== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0b0f0: 2f 9c 00 00 cmpwi cr7,r28,0 <== ALWAYS TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0b0f4: 80 1f 00 d4 lwz r0,212(r31) the_stack->size = size; ffc0b0f8: 90 7f 00 c8 stw r3,200(r31) ffc0b0fc: 39 20 00 00 li r9,0 ffc0b100: 3b 80 00 00 li r28,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0b104: 90 1f 00 cc stw r0,204(r31) ffc0b108: 40 9e 01 84 bne- cr7,ffc0b28c <_Thread_Initialize+0x228> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0b10c: 3f c0 00 00 lis r30,0 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; ffc0b110: 91 3f 00 d0 stw r9,208(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0b114: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0b118: 81 7e 27 58 lwz r11,10072(r30) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0b11c: 90 1f 00 6c stw r0,108(r31) ffc0b120: 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; ffc0b124: 91 3f 01 38 stw r9,312(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0b128: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0b12c: 90 1f 00 64 stw r0,100(r31) <== ALWAYS TAKEN the_watchdog->id = id; ffc0b130: 90 1f 00 68 stw r0,104(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0b134: 40 9e 01 7c bne- cr7,ffc0b2b0 <_Thread_Initialize+0x24c> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0b138: 91 7f 01 4c stw r11,332(r31) <== ALWAYS TAKEN ffc0b13c: 3a e0 00 00 li r23,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0b140: 80 01 00 38 lwz r0,56(r1) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0b144: 3b c0 00 00 li r30,0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0b148: 9b 5f 00 b4 stb r26,180(r31) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); ffc0b14c: 7f 64 db 78 mr r4,r27 ffc0b150: 7f e3 fb 78 mr r3,r31 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0b154: 90 1f 00 bc stw r0,188(r31) <== ALWAYS TAKEN ffc0b158: 2e 1c 00 00 cmpwi cr4,r28,0 ffc0b15c: 2d 97 00 00 cmpwi cr3,r23,0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0b160: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0b164: 93 3f 00 b8 stw r25,184(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0b168: 90 1f 00 c0 stw r0,192(r31) the_thread->current_state = STATES_DORMANT; ffc0b16c: 38 00 00 01 li r0,1 ffc0b170: 90 1f 00 10 stw r0,16(r31) the_thread->Wait.queue = NULL; ffc0b174: 93 df 00 44 stw r30,68(r31) the_thread->resource_count = 0; ffc0b178: 93 df 00 1c stw r30,28(r31) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; ffc0b17c: 93 7f 00 18 stw r27,24(r31) the_thread->Start.initial_priority = priority; ffc0b180: 93 7f 00 c4 stw r27,196(r31) _Thread_Set_priority( the_thread, priority ); ffc0b184: 48 00 09 15 bl ffc0ba98 <_Thread_Set_priority> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0b188: a0 1f 00 0a lhz r0,10(r31) ffc0b18c: 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 ); ffc0b190: 7f e3 fb 78 mr r3,r31 ffc0b194: 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 ); ffc0b198: 93 df 00 88 stw r30,136(r31) ffc0b19c: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0b1a0: 93 1f 00 0c stw r24,12(r31) ffc0b1a4: 93 df 00 84 stw r30,132(r31) <== ALWAYS TAKEN * 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 ); ffc0b1a8: 48 00 12 5d bl ffc0c404 <_User_extensions_Thread_create> <== ALWAYS TAKEN if ( extension_status ) ffc0b1ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b1b0: 38 60 00 01 li r3,1 ffc0b1b4: 40 9e 00 9c bne- cr7,ffc0b250 <_Thread_Initialize+0x1ec> return true; failed: if ( the_thread->libc_reent ) ffc0b1b8: 80 7f 01 3c lwz r3,316(r31) ffc0b1bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b1c0: 41 9e 00 08 beq- cr7,ffc0b1c8 <_Thread_Initialize+0x164> _Workspace_Free( the_thread->libc_reent ); ffc0b1c4: 48 00 18 49 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN ffc0b1c8: 3b c0 00 00 li r30,0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0b1cc: 7d 3f f2 14 add r9,r31,r30 ffc0b1d0: 80 69 01 40 lwz r3,320(r9) ffc0b1d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b1d8: 41 9e 00 08 beq- cr7,ffc0b1e0 <_Thread_Initialize+0x17c> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0b1dc: 48 00 18 31 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) ffc0b1e0: 2f 9e 00 08 cmpwi cr7,r30,8 ffc0b1e4: 3b de 00 04 addi r30,r30,4 ffc0b1e8: 40 9e ff e4 bne+ cr7,ffc0b1cc <_Thread_Initialize+0x168> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) ffc0b1ec: 41 8e 00 0c beq- cr3,ffc0b1f8 <_Thread_Initialize+0x194> (void) _Workspace_Free( extensions_area ); ffc0b1f0: 7e e3 bb 78 mr r3,r23 ffc0b1f4: 48 00 18 19 bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0b1f8: 41 92 00 0c beq- cr4,ffc0b204 <_Thread_Initialize+0x1a0> (void) _Workspace_Free( fp_area ); ffc0b1fc: 7f 83 e3 78 mr r3,r28 ffc0b200: 48 00 18 0d bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN #endif _Thread_Stack_Free( the_thread ); ffc0b204: 7f e3 fb 78 mr r3,r31 ffc0b208: 48 00 0b 5d bl ffc0bd64 <_Thread_Stack_Free> <== ALWAYS TAKEN return false; } ffc0b20c: 80 01 00 34 lwz r0,52(r1) ffc0b210: 81 81 00 08 lwz r12,8(r1) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); ffc0b214: 38 60 00 00 li r3,0 return false; } ffc0b218: 7c 08 03 a6 mtlr r0 ffc0b21c: 82 e1 00 0c lwz r23,12(r1) ffc0b220: 83 01 00 10 lwz r24,16(r1) ffc0b224: 7d 81 81 20 mtcrf 24,r12 ffc0b228: 83 21 00 14 lwz r25,20(r1) ffc0b22c: 83 41 00 18 lwz r26,24(r1) ffc0b230: 83 61 00 1c lwz r27,28(r1) ffc0b234: 83 81 00 20 lwz r28,32(r1) ffc0b238: 83 a1 00 24 lwz r29,36(r1) ffc0b23c: 83 c1 00 28 lwz r30,40(r1) ffc0b240: 83 e1 00 2c lwz r31,44(r1) ffc0b244: 38 21 00 30 addi r1,r1,48 ffc0b248: 4e 80 00 20 blr <== ALWAYS TAKEN if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; ffc0b24c: 38 60 00 00 li r3,0 } ffc0b250: 80 01 00 34 lwz r0,52(r1) ffc0b254: 81 81 00 08 lwz r12,8(r1) ffc0b258: 7c 08 03 a6 mtlr r0 ffc0b25c: 82 e1 00 0c lwz r23,12(r1) <== ALWAYS TAKEN ffc0b260: 83 01 00 10 lwz r24,16(r1) ffc0b264: 7d 81 81 20 mtcrf 24,r12 ffc0b268: 83 21 00 14 lwz r25,20(r1) <== ALWAYS TAKEN ffc0b26c: 83 41 00 18 lwz r26,24(r1) ffc0b270: 83 61 00 1c lwz r27,28(r1) <== ALWAYS TAKEN ffc0b274: 83 81 00 20 lwz r28,32(r1) ffc0b278: 83 a1 00 24 lwz r29,36(r1) ffc0b27c: 83 c1 00 28 lwz r30,40(r1) <== ALWAYS TAKEN ffc0b280: 83 e1 00 2c lwz r31,44(r1) ffc0b284: 38 21 00 30 addi r1,r1,48 ffc0b288: 4e 80 00 20 blr <== ALWAYS TAKEN /* * 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 ); ffc0b28c: 38 60 01 08 li r3,264 ffc0b290: 48 00 17 49 bl ffc0c9d8 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !fp_area ) ffc0b294: 2e 03 00 00 cmpwi cr4,r3,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 ); ffc0b298: 7c 7c 1b 78 mr r28,r3 if ( !fp_area ) ffc0b29c: 7c 69 1b 78 mr r9,r3 ffc0b2a0: 40 92 fe 6c bne+ cr4,ffc0b10c <_Thread_Initialize+0xa8> ffc0b2a4: 3a e0 00 00 li r23,0 ffc0b2a8: 4d 90 00 00 mcrf cr3,cr4 ffc0b2ac: 4b ff ff 0c b ffc0b1b8 <_Thread_Initialize+0x154> <== ALWAYS TAKEN /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0b2b0: 39 6b 00 01 addi r11,r11,1 ffc0b2b4: 55 63 10 3a rlwinm r3,r11,2,0,29 ffc0b2b8: 48 00 17 21 bl ffc0c9d8 <_Workspace_Allocate> <== ALWAYS TAKEN (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0b2bc: 2d 83 00 00 cmpwi cr3,r3,0 ffc0b2c0: 7c 77 1b 78 mr r23,r3 ffc0b2c4: 41 8e 00 40 beq- cr3,ffc0b304 <_Thread_Initialize+0x2a0> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0b2c8: 90 7f 01 4c stw r3,332(r31) ffc0b2cc: 7c 6b 1b 78 mr r11,r3 * 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++ ) ffc0b2d0: 38 00 00 00 li r0,0 ffc0b2d4: 81 1e 27 58 lwz r8,10072(r30) ffc0b2d8: 39 20 00 00 li r9,0 the_thread->extensions[i] = NULL; ffc0b2dc: 39 40 00 00 li r10,0 ffc0b2e0: 48 00 00 08 b ffc0b2e8 <_Thread_Initialize+0x284> <== ALWAYS TAKEN * 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++ ) ffc0b2e4: 81 7f 01 4c lwz r11,332(r31) ffc0b2e8: 39 29 00 01 addi r9,r9,1 ffc0b2ec: 7f 88 48 40 cmplw cr7,r8,r9 the_thread->extensions[i] = NULL; ffc0b2f0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0b2f4: 7d 4b 01 2e stwx r10,r11,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++ ) ffc0b2f8: 7d 20 4b 78 mr r0,r9 ffc0b2fc: 40 9c ff e8 bge+ cr7,ffc0b2e4 <_Thread_Initialize+0x280> ffc0b300: 4b ff fe 40 b ffc0b140 <_Thread_Initialize+0xdc> <== ALWAYS TAKEN ffc0b304: 2e 1c 00 00 cmpwi cr4,r28,0 ffc0b308: 4b ff fe b0 b ffc0b1b8 <_Thread_Initialize+0x154> <== ALWAYS TAKEN ffc0f27c <_Thread_Load_environment>: */ void _Thread_Load_environment( Thread_Control *the_thread ) { ffc0f27c: 94 21 ff f0 stwu r1,-16(r1) ffc0f280: 7c 08 02 a6 mflr r0 bool is_fp; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( the_thread->Start.fp_context ) { ffc0f284: 39 00 00 00 li r8,0 */ void _Thread_Load_environment( Thread_Control *the_thread ) { ffc0f288: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN ffc0f28c: 93 e1 00 0c stw r31,12(r1) ffc0f290: 7c 7f 1b 78 mr r31,r3 bool is_fp; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( the_thread->Start.fp_context ) { ffc0f294: 80 63 00 d0 lwz r3,208(r3) <== ALWAYS TAKEN ffc0f298: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f29c: 41 9e 00 18 beq- cr7,ffc0f2b4 <_Thread_Load_environment+0x38> the_thread->fp_context = the_thread->Start.fp_context; ffc0f2a0: 90 7f 01 38 stw r3,312(r31) _Context_Initialize_fp( &the_thread->fp_context ); ffc0f2a4: 38 80 00 00 li r4,0 ffc0f2a8: 38 a0 01 08 li r5,264 ffc0f2ac: 48 00 34 29 bl ffc126d4 <== ALWAYS TAKEN ffc0f2b0: 39 00 00 01 li r8,1 the_thread->do_post_task_switch_extension = false; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; ffc0f2b4: 80 1f 00 bc lwz r0,188(r31) <== ALWAYS TAKEN } else #endif is_fp = false; the_thread->do_post_task_switch_extension = false; ffc0f2b8: 39 40 00 00 li r10,0 the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0f2bc: 89 7f 00 b4 lbz r11,180(r31) <== ALWAYS TAKEN the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; _Context_Initialize( ffc0f2c0: 3c e0 ff c1 lis r7,-63 <== ALWAYS TAKEN is_fp = false; the_thread->do_post_task_switch_extension = false; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0f2c4: 81 3f 00 b8 lwz r9,184(r31) the_thread->budget_callout = the_thread->Start.budget_callout; _Context_Initialize( ffc0f2c8: 38 7f 00 d8 addi r3,r31,216 the_thread->do_post_task_switch_extension = false; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; ffc0f2cc: 90 1f 00 80 stw r0,128(r31) _Context_Initialize( ffc0f2d0: 38 e7 11 e8 addi r7,r7,4584 } else #endif is_fp = false; the_thread->do_post_task_switch_extension = false; ffc0f2d4: 99 5f 00 74 stb r10,116(r31) the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0f2d8: 99 7f 00 75 stb r11,117(r31) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0f2dc: 91 3f 00 7c stw r9,124(r31) the_thread->budget_callout = the_thread->Start.budget_callout; _Context_Initialize( ffc0f2e0: 80 df 00 c0 lwz r6,192(r31) ffc0f2e4: 80 9f 00 cc lwz r4,204(r31) <== ALWAYS TAKEN ffc0f2e8: 80 bf 00 c8 lwz r5,200(r31) ffc0f2ec: 48 00 cd b9 bl ffc1c0a4 <_CPU_Context_Initialize> <== ALWAYS TAKEN the_thread->Start.isr_level, _Thread_Handler, is_fp ); } ffc0f2f0: 80 01 00 14 lwz r0,20(r1) ffc0f2f4: 83 e1 00 0c lwz r31,12(r1) ffc0f2f8: 38 21 00 10 addi r1,r1,16 <== ALWAYS TAKEN ffc0f2fc: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0f300: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f5ec <_Thread_Ready>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f5ec: 7d 40 00 a6 mfmsr r10 ffc0f5f0: 7c 10 42 a6 mfsprg r0,0 ffc0f5f4: 7d 40 00 78 andc r0,r10,r0 ffc0f5f8: 7c 00 01 24 mtmsr r0 ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY; ffc0f5fc: 38 00 00 00 li r0,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0f600: 81 03 00 90 lwz r8,144(r3) ffc0f604: 90 03 00 10 stw r0,16(r3) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0f608: 3d 20 00 00 lis r9,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0f60c: 80 e8 00 00 lwz r7,0(r8) ffc0f610: 80 03 00 98 lwz r0,152(r3) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); ffc0f614: 81 63 00 8c lwz r11,140(r3) ffc0f618: 7c e0 03 78 or r0,r7,r0 ffc0f61c: 90 08 00 00 stw r0,0(r8) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0f620: 38 eb 00 04 addi r7,r11,4 <== ALWAYS TAKEN _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0f624: 81 09 27 60 lwz r8,10080(r9) ffc0f628: 80 03 00 94 lwz r0,148(r3) ffc0f62c: 90 e3 00 00 stw r7,0(r3) ffc0f630: 7d 00 03 78 or r0,r8,r0 old_last_node = the_chain->last; ffc0f634: 81 0b 00 08 lwz r8,8(r11) ffc0f638: 90 09 27 60 stw r0,10080(r9) the_chain->last = the_node; ffc0f63c: 90 6b 00 08 stw r3,8(r11) <== ALWAYS TAKEN old_last_node->next = the_node; the_node->previous = old_last_node; ffc0f640: 91 03 00 04 stw r8,4(r3) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0f644: 90 68 00 00 stw r3,0(r8) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0f648: 7c 00 00 a6 mfmsr r0 ffc0f64c: 7d 40 01 24 mtmsr r10 ffc0f650: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0f654: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0f658: 81 69 27 60 lwz r11,10080(r9) ffc0f65c: 80 a8 27 20 lwz r5,10016(r8) ffc0f660: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0f664: 3c e0 00 00 lis r7,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0f668: 91 69 27 60 stw r11,10080(r9) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0f66c: 38 e7 2d 00 addi r7,r7,11520 ffc0f670: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0f674: 7c 07 40 2e lwzx r0,r7,r8 ffc0f678: 7c 09 00 34 cntlzw r9,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0f67c: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0f680: 7c 07 41 2e stwx r0,r7,r8 ffc0f684: 7c c6 4a 14 add r6,r6,r9 ffc0f688: 1c c6 00 0c mulli r6,r6,12 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0f68c: 3d 20 00 00 lis r9,0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0f690: 7c 05 30 2e lwzx r0,r5,r6 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0f694: 81 29 27 6c lwz r9,10092(r9) <== ALWAYS TAKEN * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0f698: 3d 60 00 00 lis r11,0 <== ALWAYS TAKEN ffc0f69c: 90 0b 27 48 stw r0,10056(r11) _Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) ffc0f6a0: 7f 80 48 00 cmpw cr7,r0,r9 ffc0f6a4: 41 9e 00 1c beq- cr7,ffc0f6c0 <_Thread_Ready+0xd4> ffc0f6a8: 88 09 00 75 lbz r0,117(r9) <== ALWAYS TAKEN ffc0f6ac: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc0f6b0: 41 9e 00 10 beq- cr7,ffc0f6c0 <_Thread_Ready+0xd4> _Context_Switch_necessary = true; ffc0f6b4: 38 00 00 01 li r0,1 ffc0f6b8: 3d 20 00 00 lis r9,0 ffc0f6bc: 98 09 27 7c stb r0,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f6c0: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); } ffc0f6c4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1096c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc1096c: 94 21 ff f0 stwu r1,-16(r1) ffc10970: 7c 08 02 a6 mflr r0 the_thread->resource_count = 0; ffc10974: 39 40 00 00 li r10,0 void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc10978: 90 01 00 14 stw r0,20(r1) the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc1097c: 89 63 00 b4 lbz r11,180(r3) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc10980: 81 23 00 b8 lwz r9,184(r3) the_thread->budget_callout = the_thread->Start.budget_callout; ffc10984: 80 03 00 bc lwz r0,188(r3) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; ffc10988: 91 43 00 1c stw r10,28(r3) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc1098c: 99 63 00 75 stb r11,117(r3) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc10990: 91 23 00 7c stw r9,124(r3) the_thread->budget_callout = the_thread->Start.budget_callout; ffc10994: 90 03 00 80 stw r0,128(r3) the_thread->Start.pointer_argument = pointer_argument; ffc10998: 90 83 00 ac stw r4,172(r3) the_thread->Start.numeric_argument = numeric_argument; ffc1099c: 90 a3 00 b0 stw r5,176(r3) void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc109a0: 93 e1 00 0c stw r31,12(r1) ffc109a4: 7c 7f 1b 78 mr r31,r3 the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc109a8: 4b ff bf 4d bl ffc0c8f4 <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN ffc109ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc109b0: 40 9e 00 10 bne- cr7,ffc109c0 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc109b4: 80 1f 00 50 lwz r0,80(r31) ffc109b8: 2f 80 00 02 cmpwi cr7,r0,2 ffc109bc: 41 9e 00 34 beq- cr7,ffc109f0 <_Thread_Reset+0x84> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { ffc109c0: 80 9f 00 c4 lwz r4,196(r31) ffc109c4: 80 1f 00 14 lwz r0,20(r31) ffc109c8: 7f 80 20 00 cmpw cr7,r0,r4 ffc109cc: 41 9e 00 10 beq- cr7,ffc109dc <_Thread_Reset+0x70> the_thread->real_priority = the_thread->Start.initial_priority; ffc109d0: 90 9f 00 18 stw r4,24(r31) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); ffc109d4: 7f e3 fb 78 mr r3,r31 ffc109d8: 4b ff c1 b1 bl ffc0cb88 <_Thread_Set_priority> <== ALWAYS TAKEN } } ffc109dc: 80 01 00 14 lwz r0,20(r1) ffc109e0: 83 e1 00 0c lwz r31,12(r1) ffc109e4: 38 21 00 10 addi r1,r1,16 ffc109e8: 7c 08 03 a6 mtlr r0 ffc109ec: 4e 80 00 20 blr <== ALWAYS TAKEN the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); ffc109f0: 38 7f 00 48 addi r3,r31,72 ffc109f4: 4b ff cf 6d bl ffc0d960 <_Watchdog_Remove> <== ALWAYS TAKEN ffc109f8: 4b ff ff c8 b ffc109c0 <_Thread_Reset+0x54> <== ALWAYS TAKEN ffc0f6c8 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0f6c8: 3d 20 00 00 lis r9,0 ffc0f6cc: 81 29 27 6c lwz r9,10092(r9) ready = executing->ready; ffc0f6d0: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f6d4: 7c 00 00 a6 mfmsr r0 ffc0f6d8: 7d 50 42 a6 mfsprg r10,0 ffc0f6dc: 7c 0a 50 78 andc r10,r0,r10 ffc0f6e0: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { ffc0f6e4: 81 0b 00 00 lwz r8,0(r11) ffc0f6e8: 81 4b 00 08 lwz r10,8(r11) ffc0f6ec: 7f 88 50 00 cmpw cr7,r8,r10 ffc0f6f0: 41 9e 00 78 beq- cr7,ffc0f768 <_Thread_Reset_timeslice+0xa0> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0f6f4: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0f6f8: 38 eb 00 04 addi r7,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0f6fc: 81 09 00 04 lwz r8,4(r9) next->previous = previous; previous->next = next; ffc0f700: 91 48 00 00 stw r10,0(r8) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0f704: 91 0a 00 04 stw r8,4(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0f708: 90 e9 00 00 stw r7,0(r9) old_last_node = the_chain->last; ffc0f70c: 81 4b 00 08 lwz r10,8(r11) the_chain->last = the_node; ffc0f710: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0f714: 91 49 00 04 stw r10,4(r9) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0f718: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0f71c: 7d 40 00 a6 mfmsr r10 ffc0f720: 7c 00 01 24 mtmsr r0 ffc0f724: 7d 40 01 24 mtmsr r10 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0f728: 3d 40 00 00 lis r10,0 ffc0f72c: 81 0a 27 48 lwz r8,10056(r10) ffc0f730: 7f 89 40 00 cmpw cr7,r9,r8 ffc0f734: 41 9e 00 18 beq- cr7,ffc0f74c <_Thread_Reset_timeslice+0x84> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; ffc0f738: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0f73c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0f740: 99 69 27 7c stb r11,10108(r9) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f744: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc0f748: 4e 80 00 20 blr <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc0f74c: 81 2b 00 00 lwz r9,0(r11) _Context_Switch_necessary = true; ffc0f750: 39 60 00 01 li r11,1 _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc0f754: 91 2a 27 48 stw r9,10056(r10) _Context_Switch_necessary = true; ffc0f758: 3d 20 00 00 lis r9,0 ffc0f75c: 99 69 27 7c stb r11,10108(r9) ffc0f760: 7c 00 01 24 mtmsr r0 ffc0f764: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f768: 7c 00 01 24 mtmsr r0 ffc0f76c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0cad4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0cad4: 94 21 ff e8 stwu r1,-24(r1) <== ALWAYS TAKEN ffc0cad8: 7c 08 02 a6 mflr r0 ffc0cadc: 90 01 00 1c stw r0,28(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0cae0: 80 03 00 10 lwz r0,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0cae4: 93 e1 00 14 stw r31,20(r1) ffc0cae8: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0caec: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0caf0: 93 c1 00 10 stw r30,16(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0caf4: 38 00 00 00 li r0,0 ffc0caf8: 41 82 00 20 beq- ffc0cb18 <_Thread_Restart+0x44> return true; } return false; } ffc0cafc: 7c 03 03 78 mr r3,r0 ffc0cb00: 80 01 00 1c lwz r0,28(r1) ffc0cb04: 83 c1 00 10 lwz r30,16(r1) ffc0cb08: 7c 08 03 a6 mtlr r0 ffc0cb0c: 83 e1 00 14 lwz r31,20(r1) ffc0cb10: 38 21 00 18 addi r1,r1,24 ffc0cb14: 4e 80 00 20 blr <== ALWAYS TAKEN Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0cb18: 90 81 00 08 stw r4,8(r1) _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0cb1c: 3f c0 00 00 lis r30,0 Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0cb20: 90 a1 00 0c stw r5,12(r1) ffc0cb24: 48 00 01 e5 bl ffc0cd08 <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0cb28: 7f e3 fb 78 mr r3,r31 ffc0cb2c: 80 81 00 08 lwz r4,8(r1) ffc0cb30: 80 a1 00 0c lwz r5,12(r1) ffc0cb34: 48 00 3e 39 bl ffc1096c <_Thread_Reset> <== ALWAYS TAKEN _Thread_Load_environment( the_thread ); ffc0cb38: 7f e3 fb 78 mr r3,r31 ffc0cb3c: 48 00 39 e5 bl ffc10520 <_Thread_Load_environment> <== ALWAYS TAKEN _Thread_Ready( the_thread ); ffc0cb40: 7f e3 fb 78 mr r3,r31 ffc0cb44: 48 00 3d 4d bl ffc10890 <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_restart( the_thread ); ffc0cb48: 7f e3 fb 78 mr r3,r31 ffc0cb4c: 48 00 0a c1 bl ffc0d60c <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) ffc0cb50: 81 3e 27 98 lwz r9,10136(r30) ffc0cb54: 38 00 00 01 li r0,1 ffc0cb58: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0cb5c: 40 9e ff a0 bne+ cr7,ffc0cafc <_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 ) ffc0cb60: 80 1f 01 38 lwz r0,312(r31) ffc0cb64: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cb68: 41 9e 00 10 beq- cr7,ffc0cb78 <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0cb6c: 38 7f 01 38 addi r3,r31,312 ffc0cb70: 48 01 35 b1 bl ffc20120 <_CPU_Context_restore_fp> <== ALWAYS TAKEN ffc0cb74: 83 fe 27 98 lwz r31,10136(r30) #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0cb78: 38 7f 00 d8 addi r3,r31,216 ffc0cb7c: 48 01 37 65 bl ffc202e0 <_CPU_Context_restore> <== ALWAYS TAKEN ffc0cb80: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0cb84: 4b ff ff 78 b ffc0cafc <_Thread_Restart+0x28> <== NOT EXECUTED ffc10538 <_Thread_Resume>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc10538: 7d 20 00 a6 mfmsr r9 ffc1053c: 7c 10 42 a6 mfsprg r0,0 <== ALWAYS TAKEN ffc10540: 7d 20 00 78 andc r0,r9,r0 ffc10544: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; ffc10548: 80 03 00 10 lwz r0,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc1054c: 70 0b 00 02 andi. r11,r0,2 ffc10550: 41 82 00 a0 beq- ffc105f0 <_Thread_Resume+0xb8> <== NEVER TAKEN ffc10554: 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 ) ) { ffc10558: 2f 80 00 00 cmpwi cr7,r0,0 } #endif current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = ffc1055c: 90 03 00 10 stw r0,16(r3) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc10560: 40 9e 00 90 bne- cr7,ffc105f0 <_Thread_Resume+0xb8> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc10564: 81 43 00 90 lwz r10,144(r3) ffc10568: 80 03 00 98 lwz r0,152(r3) ffc1056c: 81 0a 00 00 lwz r8,0(r10) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc10570: 81 63 00 8c lwz r11,140(r3) ffc10574: 7d 00 03 78 or r0,r8,r0 ffc10578: 90 0a 00 00 stw r0,0(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc1057c: 38 0b 00 04 addi r0,r11,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc10580: 3d 00 00 00 lis r8,0 ffc10584: 90 03 00 00 stw r0,0(r3) ffc10588: 80 e8 27 80 lwz r7,10112(r8) ffc1058c: 80 03 00 94 lwz r0,148(r3) old_last_node = the_chain->last; ffc10590: 81 4b 00 08 lwz r10,8(r11) ffc10594: 7c e0 03 78 or r0,r7,r0 the_chain->last = the_node; ffc10598: 90 6b 00 08 stw r3,8(r11) ffc1059c: 90 08 27 80 stw r0,10112(r8) old_last_node->next = the_node; the_node->previous = old_last_node; ffc105a0: 91 43 00 04 stw r10,4(r3) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc105a4: 90 6a 00 00 stw r3,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc105a8: 7c 00 00 a6 mfmsr r0 ffc105ac: 7d 20 01 24 mtmsr r9 ffc105b0: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { ffc105b4: 3d 60 00 00 lis r11,0 ffc105b8: 80 03 00 14 lwz r0,20(r3) ffc105bc: 81 4b 27 68 lwz r10,10088(r11) ffc105c0: 81 4a 00 14 lwz r10,20(r10) ffc105c4: 7f 80 50 40 cmplw cr7,r0,r10 ffc105c8: 40 9c 00 28 bge- cr7,ffc105f0 <_Thread_Resume+0xb8> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc105cc: 3d 40 00 00 lis r10,0 _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; ffc105d0: 90 6b 27 68 stw r3,10088(r11) if ( _Thread_Executing->is_preemptible || ffc105d4: 81 4a 27 8c lwz r10,10124(r10) ffc105d8: 89 6a 00 75 lbz r11,117(r10) ffc105dc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc105e0: 41 9e 00 18 beq- cr7,ffc105f8 <_Thread_Resume+0xc0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc105e4: 38 00 00 01 li r0,1 ffc105e8: 3d 60 00 00 lis r11,0 ffc105ec: 98 0b 27 9c stb r0,10140(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc105f0: 7d 20 01 24 mtmsr r9 } } } _ISR_Enable( level ); } ffc105f4: 4e 80 00 20 blr <== ALWAYS TAKEN _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc105f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc105fc: 41 9e ff e8 beq+ cr7,ffc105e4 <_Thread_Resume+0xac> <== NEVER TAKEN ffc10600: 4b ff ff f0 b ffc105f0 <_Thread_Resume+0xb8> <== ALWAYS TAKEN ffc0ba98 <_Thread_Set_priority>: Thread_Control *the_thread, Priority_Control new_priority ) { the_thread->current_priority = new_priority; the_thread->ready = &_Thread_Ready_chain[ new_priority ]; ffc0ba98: 3d 20 00 00 lis r9,0 void _Thread_Set_priority( Thread_Control *the_thread, Priority_Control new_priority ) { the_thread->current_priority = new_priority; ffc0ba9c: 90 83 00 14 stw r4,20(r3) the_thread->ready = &_Thread_Ready_chain[ new_priority ]; ffc0baa0: 1d 44 00 0c mulli r10,r4,12 ffc0baa4: 81 09 27 20 lwz r8,10016(r9) RTEMS_INLINE_ROUTINE Priority_Bit_map_control _Priority_Major ( Priority_Control the_priority ) { return (Priority_Bit_map_control)( the_priority / 16 ); ffc0baa8: 54 8b e1 3e rlwinm r11,r4,28,4,31 <== ALWAYS TAKEN minor = _Priority_Minor( new_priority ); the_priority_map->minor = &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); ffc0baac: 3d 20 80 00 lis r9,-32768 ffc0bab0: 7d 48 52 14 add r10,r8,r10 the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); ffc0bab4: 54 80 07 3e clrlwi r0,r4,28 ffc0bab8: 91 43 00 8c stw r10,140(r3) Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0babc: 3d 00 00 00 lis r8,0 mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); ffc0bac0: 7d 20 04 30 srw r0,r9,r0 Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0bac4: 39 08 2d 00 addi r8,r8,11520 the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); the_priority_map->ready_minor = mask; ffc0bac8: 90 03 00 98 stw r0,152(r3) minor = _Priority_Minor( new_priority ); the_priority_map->minor = &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); ffc0bacc: 7d 29 5c 30 srw r9,r9,r11 <== ALWAYS TAKEN Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0bad0: 55 6b 10 3a rlwinm r11,r11,2,0,29 &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; ffc0bad4: 91 23 00 94 stw r9,148(r3) Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0bad8: 7d 68 5a 14 add r11,r8,r11 the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); the_priority_map->ready_minor = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_minor = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0badc: 7c 07 00 f8 not r7,r0 Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0bae0: 91 63 00 90 stw r11,144(r3) &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0bae4: 7d 28 48 f8 not r8,r9 mask = _Priority_Mask( minor ); the_priority_map->ready_minor = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_minor = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0bae8: 90 e3 00 a0 stw r7,160(r3) &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0baec: 91 03 00 9c stw r8,156(r3) _Priority_Initialize_information( &the_thread->Priority_map, new_priority ); } ffc0baf0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0baf4 <_Thread_Set_state>: ) { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; ffc0baf4: 81 23 00 8c lwz r9,140(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0baf8: 7c 00 00 a6 mfmsr r0 ffc0bafc: 7d 70 42 a6 mfsprg r11,0 ffc0bb00: 7c 0b 58 78 andc r11,r0,r11 ffc0bb04: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { ffc0bb08: 81 63 00 10 lwz r11,16(r3) ffc0bb0c: 2f 8b 00 00 cmpwi cr7,r11,0 <== ALWAYS TAKEN ffc0bb10: 40 9e 00 5c bne- cr7,ffc0bb6c <_Thread_Set_state+0x78> return; } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { ffc0bb14: 81 09 00 00 lwz r8,0(r9) ffc0bb18: 81 49 00 08 lwz r10,8(r9) <== ALWAYS TAKEN _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; ffc0bb1c: 90 83 00 10 stw r4,16(r3) if ( _Chain_Has_only_one_node( ready ) ) { ffc0bb20: 7f 88 50 00 cmpw cr7,r8,r10 ffc0bb24: 41 9e 00 68 beq- cr7,ffc0bb8c <_Thread_Set_state+0x98> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0bb28: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; ffc0bb2c: 81 63 00 04 lwz r11,4(r3) next->previous = previous; previous->next = next; ffc0bb30: 91 2b 00 00 stw r9,0(r11) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0bb34: 91 69 00 04 stw r11,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0bb38: 7d 20 00 a6 mfmsr r9 <== ALWAYS TAKEN ffc0bb3c: 7c 00 01 24 mtmsr r0 ffc0bb40: 7d 20 01 24 mtmsr r9 } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) ffc0bb44: 3d 20 00 00 lis r9,0 ffc0bb48: 81 69 27 48 lwz r11,10056(r9) ffc0bb4c: 7f 83 58 00 cmpw cr7,r3,r11 ffc0bb50: 41 9e 00 80 beq- cr7,ffc0bbd0 <_Thread_Set_state+0xdc> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) ffc0bb54: 3d 20 00 00 lis r9,0 ffc0bb58: 81 29 27 6c lwz r9,10092(r9) ffc0bb5c: 7f 83 48 00 cmpw cr7,r3,r9 ffc0bb60: 41 9e 00 1c beq- cr7,ffc0bb7c <_Thread_Set_state+0x88> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bb64: 7c 00 01 24 mtmsr r0 ffc0bb68: 4e 80 00 20 blr <== ALWAYS TAKEN Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = ffc0bb6c: 7c 8b 5b 78 or r11,r4,r11 ffc0bb70: 91 63 00 10 stw r11,16(r3) ffc0bb74: 7c 00 01 24 mtmsr r0 ffc0bb78: 4e 80 00 20 blr <== ALWAYS TAKEN if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; ffc0bb7c: 39 60 00 01 li r11,1 ffc0bb80: 3d 20 00 00 lis r9,0 ffc0bb84: 99 69 27 7c stb r11,10108(r9) ffc0bb88: 4b ff ff dc b ffc0bb64 <_Thread_Set_state+0x70> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0bb8c: 81 43 00 90 lwz r10,144(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0bb90: 38 e9 00 04 addi r7,r9,4 ffc0bb94: 81 03 00 a0 lwz r8,160(r3) ffc0bb98: 80 ca 00 00 lwz r6,0(r10) ffc0bb9c: 90 e9 00 00 stw r7,0(r9) ffc0bba0: 7c c8 40 38 and r8,r6,r8 the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); ffc0bba4: 2f 88 00 00 cmpwi cr7,r8,0 the_chain->permanent_null = NULL; ffc0bba8: 91 69 00 04 stw r11,4(r9) the_chain->last = _Chain_Head(the_chain); ffc0bbac: 91 29 00 08 stw r9,8(r9) ffc0bbb0: 91 0a 00 00 stw r8,0(r10) ffc0bbb4: 40 be ff 84 bne- cr7,ffc0bb38 <_Thread_Set_state+0x44> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; ffc0bbb8: 3d 20 00 00 lis r9,0 ffc0bbbc: 81 63 00 9c lwz r11,156(r3) <== ALWAYS TAKEN ffc0bbc0: 81 49 27 60 lwz r10,10080(r9) ffc0bbc4: 7d 4b 58 38 and r11,r10,r11 ffc0bbc8: 91 69 27 60 stw r11,10080(r9) ffc0bbcc: 4b ff ff 6c b ffc0bb38 <_Thread_Set_state+0x44> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0bbd0: 3c a0 00 00 lis r5,0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0bbd4: 3d 60 00 00 lis r11,0 ffc0bbd8: 81 45 27 60 lwz r10,10080(r5) <== ALWAYS TAKEN ffc0bbdc: 80 8b 27 20 lwz r4,10016(r11) ffc0bbe0: 7d 46 00 34 cntlzw r6,r10 <== ALWAYS TAKEN _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bbe4: 3c e0 00 00 lis r7,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0bbe8: 91 45 27 60 stw r10,10080(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bbec: 38 e7 2d 00 addi r7,r7,11520 ffc0bbf0: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0bbf4: 7d 67 40 2e lwzx r11,r7,r8 ffc0bbf8: 7d 6a 00 34 cntlzw r10,r11 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0bbfc: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0bc00: 7d 67 41 2e stwx r11,r7,r8 ffc0bc04: 7c c6 52 14 add r6,r6,r10 <== ALWAYS TAKEN ffc0bc08: 1c c6 00 0c mulli r6,r6,12 ffc0bc0c: 7d 64 30 2e lwzx r11,r4,r6 ffc0bc10: 91 69 27 48 stw r11,10056(r9) ffc0bc14: 4b ff ff 40 b ffc0bb54 <_Thread_Set_state+0x60> <== ALWAYS TAKEN ffc0bc18 <_Thread_Set_transient>: { ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; ffc0bc18: 81 23 00 8c lwz r9,140(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bc1c: 7d 60 00 a6 mfmsr r11 ffc0bc20: 7c 10 42 a6 mfsprg r0,0 ffc0bc24: 7d 60 00 78 andc r0,r11,r0 ffc0bc28: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); old_state = the_thread->current_state; ffc0bc2c: 80 03 00 10 lwz r0,16(r3) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { ffc0bc30: 2f 80 00 00 cmpwi cr7,r0,0 ready = the_thread->ready; _ISR_Disable( level ); old_state = the_thread->current_state; the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); ffc0bc34: 60 0a 00 04 ori r10,r0,4 ffc0bc38: 91 43 00 10 stw r10,16(r3) if ( _States_Is_ready( old_state ) ) { ffc0bc3c: 40 9e 00 24 bne- cr7,ffc0bc60 <_Thread_Set_transient+0x48> if ( _Chain_Has_only_one_node( ready ) ) { ffc0bc40: 81 09 00 00 lwz r8,0(r9) ffc0bc44: 81 49 00 08 lwz r10,8(r9) ffc0bc48: 7f 88 50 00 cmpw cr7,r8,r10 ffc0bc4c: 41 9e 00 1c beq- cr7,ffc0bc68 <_Thread_Set_transient+0x50> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0bc50: 81 43 00 04 lwz r10,4(r3) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0bc54: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; next->previous = previous; previous->next = next; ffc0bc58: 91 2a 00 00 stw r9,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0bc5c: 91 49 00 04 stw r10,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bc60: 7d 60 01 24 mtmsr r11 _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); } ffc0bc64: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0bc68: 81 43 00 90 lwz r10,144(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0bc6c: 38 e9 00 04 addi r7,r9,4 ffc0bc70: 81 03 00 a0 lwz r8,160(r3) ffc0bc74: 80 ca 00 00 lwz r6,0(r10) ffc0bc78: 90 e9 00 00 stw r7,0(r9) ffc0bc7c: 7c c8 40 38 and r8,r6,r8 if ( _States_Is_ready( old_state ) ) { if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); ffc0bc80: 2f 88 00 00 cmpwi cr7,r8,0 the_chain->permanent_null = NULL; ffc0bc84: 90 09 00 04 stw r0,4(r9) the_chain->last = _Chain_Head(the_chain); ffc0bc88: 91 29 00 08 stw r9,8(r9) ffc0bc8c: 91 0a 00 00 stw r8,0(r10) ffc0bc90: 40 be ff d0 bne- cr7,ffc0bc60 <_Thread_Set_transient+0x48> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; ffc0bc94: 3d 20 00 00 lis r9,0 ffc0bc98: 80 03 00 9c lwz r0,156(r3) ffc0bc9c: 81 49 27 60 lwz r10,10080(r9) ffc0bca0: 7d 40 00 38 and r0,r10,r0 ffc0bca4: 90 09 27 60 stw r0,10080(r9) ffc0bca8: 4b ff ff b8 b ffc0bc60 <_Thread_Set_transient+0x48> <== ALWAYS TAKEN ffc0bcac <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { ffc0bcac: 94 21 ff f0 stwu r1,-16(r1) <== ALWAYS TAKEN ffc0bcb0: 7c 08 02 a6 mflr r0 ffc0bcb4: 3d 20 00 00 lis r9,0 ffc0bcb8: 90 01 00 14 stw r0,20(r1) ffc0bcbc: 80 09 26 60 lwz r0,9824(r9) <== ALWAYS TAKEN ffc0bcc0: 93 c1 00 08 stw r30,8(r1) ffc0bcc4: 7c 7e 1b 78 mr r30,r3 <== ALWAYS TAKEN ffc0bcc8: 7f 84 00 40 cmplw cr7,r4,r0 ffc0bccc: 93 e1 00 0c stw r31,12(r1) ffc0bcd0: 7c 9f 23 78 mr r31,r4 ffc0bcd4: 40 9c 00 08 bge- cr7,ffc0bcdc <_Thread_Stack_Allocate+0x30> ffc0bcd8: 7c 1f 03 78 mr r31,r0 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { ffc0bcdc: 3d 20 00 00 lis r9,0 ffc0bce0: 80 09 20 c0 lwz r0,8384(r9) <== ALWAYS TAKEN ffc0bce4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bce8: 41 9e 00 40 beq- cr7,ffc0bd28 <_Thread_Stack_Allocate+0x7c> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); ffc0bcec: 7f e3 fb 78 mr r3,r31 ffc0bcf0: 7c 09 03 a6 mtctr r0 ffc0bcf4: 4e 80 04 21 bctrl <== ALWAYS TAKEN the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) ffc0bcf8: 7c 69 fe 70 srawi r9,r3,31 the_stack_size = 0; the_thread->Start.stack = stack_addr; ffc0bcfc: 90 7e 00 d4 stw r3,212(r30) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) ffc0bd00: 7d 20 1a 78 xor r0,r9,r3 ffc0bd04: 7c 00 48 50 subf r0,r0,r9 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } ffc0bd08: 83 c1 00 08 lwz r30,8(r1) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) ffc0bd0c: 7c 00 fe 70 srawi r0,r0,31 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } ffc0bd10: 7f e3 00 38 and r3,r31,r0 ffc0bd14: 80 01 00 14 lwz r0,20(r1) ffc0bd18: 83 e1 00 0c lwz r31,12(r1) ffc0bd1c: 38 21 00 10 addi r1,r1,16 ffc0bd20: 7c 08 03 a6 mtlr r0 ffc0bd24: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; ffc0bd28: 3b ff 00 10 addi r31,r31,16 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); ffc0bd2c: 7f e3 fb 78 mr r3,r31 ffc0bd30: 48 00 0c a9 bl ffc0c9d8 <_Workspace_Allocate> <== ALWAYS TAKEN } if ( !stack_addr ) ffc0bd34: 7c 69 fe 70 srawi r9,r3,31 <== ALWAYS TAKEN the_stack_size = 0; the_thread->Start.stack = stack_addr; ffc0bd38: 90 7e 00 d4 stw r3,212(r30) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) ffc0bd3c: 7d 20 1a 78 xor r0,r9,r3 ffc0bd40: 7c 00 48 50 subf r0,r0,r9 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } ffc0bd44: 83 c1 00 08 lwz r30,8(r1) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) ffc0bd48: 7c 00 fe 70 srawi r0,r0,31 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } ffc0bd4c: 7f e3 00 38 and r3,r31,r0 ffc0bd50: 80 01 00 14 lwz r0,20(r1) ffc0bd54: 83 e1 00 0c lwz r31,12(r1) ffc0bd58: 38 21 00 10 addi r1,r1,16 ffc0bd5c: 7c 08 03 a6 mtlr r0 ffc0bd60: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0bd64 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { ffc0bd64: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0bd68: 94 21 ff f8 stwu r1,-8(r1) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) ffc0bd6c: 3d 20 00 00 lis r9,0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { ffc0bd70: 90 01 00 0c stw r0,12(r1) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) ffc0bd74: 80 09 20 c4 lwz r0,8388(r9) ffc0bd78: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd7c: 41 9e 00 20 beq- cr7,ffc0bd9c <_Thread_Stack_Free+0x38> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); ffc0bd80: 7c 09 03 a6 mtctr r0 ffc0bd84: 80 63 00 cc lwz r3,204(r3) ffc0bd88: 4e 80 04 21 bctrl <== ALWAYS TAKEN else _Workspace_Free( the_thread->Start.Initial_stack.area ); } ffc0bd8c: 80 01 00 0c lwz r0,12(r1) ffc0bd90: 38 21 00 08 addi r1,r1,8 ffc0bd94: 7c 08 03 a6 mtlr r0 ffc0bd98: 4e 80 00 20 blr <== ALWAYS TAKEN */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); ffc0bd9c: 80 63 00 cc lwz r3,204(r3) ffc0bda0: 48 00 0c 6d bl ffc0ca0c <_Workspace_Free> <== ALWAYS TAKEN } ffc0bda4: 80 01 00 0c lwz r0,12(r1) ffc0bda8: 38 21 00 08 addi r1,r1,8 ffc0bdac: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0bdb0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0be28 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0be28: 94 21 ff f0 stwu r1,-16(r1) ffc0be2c: 7c 08 02 a6 mflr r0 ffc0be30: 90 01 00 14 stw r0,20(r1) if ( _States_Is_dormant( the_thread->current_state ) ) { ffc0be34: 80 03 00 10 lwz r0,16(r3) Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0be38: 93 e1 00 0c stw r31,12(r1) <== ALWAYS TAKEN ffc0be3c: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN if ( _States_Is_dormant( the_thread->current_state ) ) { ffc0be40: 70 09 00 01 andi. r9,r0,1 ffc0be44: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc0be48: 41 a2 00 2c beq+ ffc0be74 <_Thread_Start+0x4c> the_thread->Start.entry_point = (Thread_Entry) entry_point; ffc0be4c: 90 a3 00 a4 stw r5,164(r3) <== ALWAYS TAKEN the_thread->Start.prototype = the_prototype; ffc0be50: 90 83 00 a8 stw r4,168(r3) <== ALWAYS TAKEN the_thread->Start.pointer_argument = pointer_argument; ffc0be54: 90 c3 00 ac stw r6,172(r3) the_thread->Start.numeric_argument = numeric_argument; ffc0be58: 90 e3 00 b0 stw r7,176(r3) <== ALWAYS TAKEN _Thread_Load_environment( the_thread ); ffc0be5c: 48 00 34 21 bl ffc0f27c <_Thread_Load_environment> <== ALWAYS TAKEN _Thread_Ready( the_thread ); ffc0be60: 7f e3 fb 78 mr r3,r31 ffc0be64: 48 00 37 89 bl ffc0f5ec <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_start( the_thread ); ffc0be68: 7f e3 fb 78 mr r3,r31 ffc0be6c: 48 00 06 b1 bl ffc0c51c <_User_extensions_Thread_start> <== ALWAYS TAKEN ffc0be70: 38 00 00 01 li r0,1 return true; } return false; } ffc0be74: 7c 03 03 78 mr r3,r0 ffc0be78: 80 01 00 14 lwz r0,20(r1) <== ALWAYS TAKEN ffc0be7c: 83 e1 00 0c lwz r31,12(r1) ffc0be80: 38 21 00 10 addi r1,r1,16 <== ALWAYS TAKEN ffc0be84: 7c 08 03 a6 mtlr r0 ffc0be88: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0bdb4 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { ffc0bdb4: 94 21 ff f0 stwu r1,-16(r1) ffc0bdb8: 7c 08 02 a6 mflr r0 ffc0bdbc: 3d 20 00 00 lis r9,0 ffc0bdc0: 93 e1 00 0c stw r31,12(r1) _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; _Thread_Executing = _Thread_Heir; ffc0bdc4: 3f e0 00 00 lis r31,0 <== ALWAYS TAKEN ffc0bdc8: 80 9f 27 48 lwz r4,10056(r31) * ready chain * select heir */ void _Thread_Start_multitasking( void ) { ffc0bdcc: 90 01 00 14 stw r0,20(r1) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) ffc0bdd0: 80 04 01 38 lwz r0,312(r4) <== ALWAYS TAKEN ffc0bdd4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bdd8: 38 00 00 03 li r0,3 ffc0bddc: 90 09 27 90 stw r0,10128(r9) * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; ffc0bde0: 3d 20 00 00 lis r9,0 ffc0bde4: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc0bde8: 98 09 27 7c stb r0,10108(r9) _Thread_Executing = _Thread_Heir; ffc0bdec: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0bdf0: 90 89 27 6c stw r4,10092(r9) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) ffc0bdf4: 41 9e 00 10 beq- cr7,ffc0be04 <_Thread_Start_multitasking+0x50> _Context_Restore_fp( &_Thread_Heir->fp_context ); ffc0bdf8: 38 64 01 38 addi r3,r4,312 <== ALWAYS TAKEN ffc0bdfc: 48 01 04 25 bl ffc1c220 <_CPU_Context_restore_fp> <== ALWAYS TAKEN ffc0be00: 80 9f 27 48 lwz r4,10056(r31) #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); ffc0be04: 3c 60 00 00 lis r3,0 ffc0be08: 38 63 2b 94 addi r3,r3,11156 ffc0be0c: 38 84 00 d8 addi r4,r4,216 ffc0be10: 48 01 04 d1 bl ffc1c2e0 <_CPU_Context_switch> <== ALWAYS TAKEN } ffc0be14: 80 01 00 14 lwz r0,20(r1) ffc0be18: 83 e1 00 0c lwz r31,12(r1) ffc0be1c: 38 21 00 10 addi r1,r1,16 ffc0be20: 7c 08 03 a6 mtlr r0 ffc0be24: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0be8c <_Thread_Suspend>: ) { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; ffc0be8c: 81 23 00 8c lwz r9,140(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0be90: 7c 00 00 a6 mfmsr r0 ffc0be94: 7d 70 42 a6 mfsprg r11,0 ffc0be98: 7c 0b 58 78 andc r11,r0,r11 ffc0be9c: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { ffc0bea0: 81 63 00 10 lwz r11,16(r3) ffc0bea4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0bea8: 40 9e 00 60 bne- cr7,ffc0bf08 <_Thread_Suspend+0x7c> return; } the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { ffc0beac: 81 49 00 08 lwz r10,8(r9) <== ALWAYS TAKEN ffc0beb0: 81 09 00 00 lwz r8,0(r9) ffc0beb4: 7f 88 50 00 cmpw cr7,r8,r10 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; ffc0beb8: 39 40 00 02 li r10,2 ffc0bebc: 91 43 00 10 stw r10,16(r3) if ( _Chain_Has_only_one_node( ready ) ) { ffc0bec0: 41 9e 00 68 beq- cr7,ffc0bf28 <_Thread_Suspend+0x9c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0bec4: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; ffc0bec8: 81 63 00 04 lwz r11,4(r3) next->previous = previous; previous->next = next; ffc0becc: 91 2b 00 00 stw r9,0(r11) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0bed0: 91 69 00 04 stw r11,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0bed4: 7d 20 00 a6 mfmsr r9 ffc0bed8: 7c 00 01 24 mtmsr r0 ffc0bedc: 7d 20 01 24 mtmsr r9 } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) ffc0bee0: 3d 20 00 00 lis r9,0 ffc0bee4: 81 69 27 48 lwz r11,10056(r9) ffc0bee8: 7f 83 58 00 cmpw cr7,r3,r11 ffc0beec: 41 9e 00 80 beq- cr7,ffc0bf6c <_Thread_Suspend+0xe0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) ffc0bef0: 3d 20 00 00 lis r9,0 ffc0bef4: 81 29 27 6c lwz r9,10092(r9) ffc0bef8: 7f 83 48 00 cmpw cr7,r3,r9 ffc0befc: 41 9e 00 1c beq- cr7,ffc0bf18 <_Thread_Suspend+0x8c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bf00: 7c 00 01 24 mtmsr r0 ffc0bf04: 4e 80 00 20 blr <== ALWAYS TAKEN _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = ffc0bf08: 61 6b 00 02 ori r11,r11,2 ffc0bf0c: 91 63 00 10 stw r11,16(r3) ffc0bf10: 7c 00 01 24 mtmsr r0 ffc0bf14: 4e 80 00 20 blr <== ALWAYS TAKEN if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; ffc0bf18: 39 60 00 01 li r11,1 ffc0bf1c: 3d 20 00 00 lis r9,0 ffc0bf20: 99 69 27 7c stb r11,10108(r9) ffc0bf24: 4b ff ff dc b ffc0bf00 <_Thread_Suspend+0x74> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0bf28: 81 43 00 90 lwz r10,144(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0bf2c: 38 e9 00 04 addi r7,r9,4 ffc0bf30: 81 03 00 a0 lwz r8,160(r3) ffc0bf34: 80 ca 00 00 lwz r6,0(r10) ffc0bf38: 90 e9 00 00 stw r7,0(r9) ffc0bf3c: 7c c8 40 38 and r8,r6,r8 the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); ffc0bf40: 2f 88 00 00 cmpwi cr7,r8,0 the_chain->permanent_null = NULL; ffc0bf44: 91 69 00 04 stw r11,4(r9) the_chain->last = _Chain_Head(the_chain); ffc0bf48: 91 29 00 08 stw r9,8(r9) ffc0bf4c: 91 0a 00 00 stw r8,0(r10) ffc0bf50: 40 be ff 84 bne- cr7,ffc0bed4 <_Thread_Suspend+0x48> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; ffc0bf54: 3d 20 00 00 lis r9,0 ffc0bf58: 81 63 00 9c lwz r11,156(r3) ffc0bf5c: 81 49 27 60 lwz r10,10080(r9) ffc0bf60: 7d 4b 58 38 and r11,r10,r11 ffc0bf64: 91 69 27 60 stw r11,10080(r9) ffc0bf68: 4b ff ff 6c b ffc0bed4 <_Thread_Suspend+0x48> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0bf6c: 3c a0 00 00 lis r5,0 _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0bf70: 3d 60 00 00 lis r11,0 ffc0bf74: 81 45 27 60 lwz r10,10080(r5) ffc0bf78: 80 8b 27 20 lwz r4,10016(r11) ffc0bf7c: 7d 46 00 34 cntlzw r6,r10 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bf80: 3c e0 00 00 lis r7,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0bf84: 91 45 27 60 stw r10,10080(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bf88: 38 e7 2d 00 addi r7,r7,11520 ffc0bf8c: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0bf90: 7d 67 40 2e lwzx r11,r7,r8 ffc0bf94: 7d 6a 00 34 cntlzw r10,r11 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0bf98: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0bf9c: 7d 67 41 2e stwx r11,r7,r8 ffc0bfa0: 7c c6 52 14 add r6,r6,r10 ffc0bfa4: 1c c6 00 0c mulli r6,r6,12 ffc0bfa8: 7d 64 30 2e lwzx r11,r4,r6 ffc0bfac: 91 69 27 48 stw r11,10056(r9) ffc0bfb0: 4b ff ff 40 b ffc0bef0 <_Thread_Suspend+0x64> <== ALWAYS TAKEN ffc0bfb4 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0bfb4: 94 21 ff f0 stwu r1,-16(r1) ffc0bfb8: 7c 08 02 a6 mflr r0 Thread_Control *executing; executing = _Thread_Executing; ffc0bfbc: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0bfc0: 90 01 00 14 stw r0,20(r1) ffc0bfc4: 93 e1 00 0c stw r31,12(r1) <== ALWAYS TAKEN Thread_Control *executing; executing = _Thread_Executing; ffc0bfc8: 83 e9 27 6c lwz r31,10092(r9) /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) ffc0bfcc: 88 1f 00 75 lbz r0,117(r31) ffc0bfd0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bfd4: 41 9e 00 1c beq- cr7,ffc0bff0 <_Thread_Tickle_timeslice+0x3c> return; if ( !_States_Is_ready( executing->current_state ) ) ffc0bfd8: 80 1f 00 10 lwz r0,16(r31) ffc0bfdc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bfe0: 40 9e 00 10 bne- cr7,ffc0bff0 <_Thread_Tickle_timeslice+0x3c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { ffc0bfe4: 80 1f 00 7c lwz r0,124(r31) ffc0bfe8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bfec: 41 9e 00 18 beq- cr7,ffc0c004 <_Thread_Tickle_timeslice+0x50> if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } ffc0bff0: 80 01 00 14 lwz r0,20(r1) ffc0bff4: 83 e1 00 0c lwz r31,12(r1) ffc0bff8: 38 21 00 10 addi r1,r1,16 <== ALWAYS TAKEN ffc0bffc: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0c000: 4e 80 00 20 blr <== ALWAYS TAKEN 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 ) { ffc0c004: 81 3f 00 78 lwz r9,120(r31) ffc0c008: 38 09 ff ff addi r0,r9,-1 ffc0c00c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c010: 90 1f 00 78 stw r0,120(r31) ffc0c014: 41 9d ff dc bgt+ cr7,ffc0bff0 <_Thread_Tickle_timeslice+0x3c> _Thread_Reset_timeslice(); ffc0c018: 48 00 36 b1 bl ffc0f6c8 <_Thread_Reset_timeslice> <== ALWAYS TAKEN executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c01c: 3d 20 00 00 lis r9,0 ffc0c020: 80 09 27 24 lwz r0,10020(r9) ffc0c024: 90 1f 00 78 stw r0,120(r31) ffc0c028: 4b ff ff c8 b ffc0bff0 <_Thread_Tickle_timeslice+0x3c> <== ALWAYS TAKEN ffc0c02c <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0c02c: 3d 20 00 00 lis r9,0 ffc0c030: 81 29 27 6c lwz r9,10092(r9) ready = executing->ready; ffc0c034: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c038: 7c 00 00 a6 mfmsr r0 ffc0c03c: 7d 50 42 a6 mfsprg r10,0 ffc0c040: 7c 0a 50 78 andc r10,r0,r10 ffc0c044: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0c048: 81 0b 00 00 lwz r8,0(r11) ffc0c04c: 81 4b 00 08 lwz r10,8(r11) ffc0c050: 7f 88 50 00 cmpw cr7,r8,r10 ffc0c054: 41 9e 00 68 beq- cr7,ffc0c0bc <_Thread_Yield_processor+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0c058: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0c05c: 38 eb 00 04 addi r7,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0c060: 81 09 00 04 lwz r8,4(r9) next->previous = previous; previous->next = next; ffc0c064: 91 48 00 00 stw r10,0(r8) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0c068: 91 0a 00 04 stw r8,4(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0c06c: 90 e9 00 00 stw r7,0(r9) old_last_node = the_chain->last; ffc0c070: 81 4b 00 08 lwz r10,8(r11) the_chain->last = the_node; ffc0c074: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0c078: 91 49 00 04 stw r10,4(r9) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0c07c: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0c080: 7d 40 00 a6 mfmsr r10 ffc0c084: 7c 00 01 24 mtmsr r0 ffc0c088: 7d 40 01 24 mtmsr r10 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0c08c: 3d 40 00 00 lis r10,0 ffc0c090: 81 0a 27 48 lwz r8,10056(r10) ffc0c094: 7f 89 40 00 cmpw cr7,r9,r8 ffc0c098: 41 9e 00 18 beq- cr7,ffc0c0b0 <_Thread_Yield_processor+0x84> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; ffc0c09c: 39 60 00 01 li r11,1 ffc0c0a0: 3d 20 00 00 lis r9,0 ffc0c0a4: 99 69 27 7c stb r11,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c0a8: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0c0ac: 4e 80 00 20 blr <== ALWAYS TAKEN _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc0c0b0: 81 2b 00 00 lwz r9,0(r11) ffc0c0b4: 91 2a 27 48 stw r9,10056(r10) ffc0c0b8: 4b ff ff e4 b ffc0c09c <_Thread_Yield_processor+0x70> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0c0bc: 3d 60 00 00 lis r11,0 ffc0c0c0: 81 6b 27 48 lwz r11,10056(r11) ffc0c0c4: 7f 89 58 00 cmpw cr7,r9,r11 ffc0c0c8: 40 9e ff d4 bne+ cr7,ffc0c09c <_Thread_Yield_processor+0x70> <== NEVER TAKEN ffc0c0cc: 4b ff ff dc b ffc0c0a8 <_Thread_Yield_processor+0x7c> <== ALWAYS TAKEN ffc0a808 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { ffc0a808: 7c 08 02 a6 mflr r0 ffc0a80c: 94 21 ff f0 stwu r1,-16(r1) ffc0a810: 90 01 00 14 stw r0,20(r1) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { ffc0a814: 80 04 00 50 lwz r0,80(r4) ffc0a818: 2f 80 00 02 cmpwi cr7,r0,2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; ffc0a81c: 38 00 00 00 li r0,0 ffc0a820: 90 04 00 44 stw r0,68(r4) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { ffc0a824: 41 9e 00 28 beq- cr7,ffc0a84c <_Thread_blocking_operation_Cancel+0x44> ffc0a828: 7c a0 01 24 mtmsr r5 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0a82c: 7c 83 23 78 mr r3,r4 ffc0a830: 3c 80 10 03 lis r4,4099 ffc0a834: 60 84 ff f8 ori r4,r4,65528 ffc0a838: 48 00 02 2d bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ffc0a83c: 80 01 00 14 lwz r0,20(r1) ffc0a840: 38 21 00 10 addi r1,r1,16 ffc0a844: 7c 08 03 a6 mtlr r0 ffc0a848: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc0a84c: 38 00 00 03 li r0,3 ffc0a850: 90 04 00 50 stw r0,80(r4) ffc0a854: 7c a0 01 24 mtmsr r5 * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0a858: 38 64 00 48 addi r3,r4,72 ffc0a85c: 90 81 00 08 stw r4,8(r1) ffc0a860: 48 00 1f 89 bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN ffc0a864: 80 81 00 08 lwz r4,8(r1) ffc0a868: 4b ff ff c4 b ffc0a82c <_Thread_blocking_operation_Cancel+0x24> <== ALWAYS TAKEN ffc0b414 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { ffc0b414: 94 21 ff f0 stwu r1,-16(r1) ffc0b418: 7c 08 02 a6 mflr r0 ffc0b41c: 90 01 00 14 stw r0,20(r1) Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0b420: 80 03 00 34 lwz r0,52(r3) */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { ffc0b424: 93 e1 00 0c stw r31,12(r1) ffc0b428: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0b42c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b430: 41 9e 00 48 beq- cr7,ffc0b478 <_Thread_queue_Dequeue+0x64> ffc0b434: 3d 20 ff c1 lis r9,-63 ffc0b438: 38 09 f3 04 addi r0,r9,-3324 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); ffc0b43c: 7f e3 fb 78 mr r3,r31 ffc0b440: 7c 09 03 a6 mtctr r0 ffc0b444: 4e 80 04 21 bctrl <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b448: 7c 00 00 a6 mfmsr r0 ffc0b44c: 7d 30 42 a6 mfsprg r9,0 ffc0b450: 7c 09 48 78 andc r9,r0,r9 ffc0b454: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( !the_thread ) { ffc0b458: 2f 83 00 00 cmpwi cr7,r3,0 <== ALWAYS TAKEN ffc0b45c: 41 9e 00 48 beq- cr7,ffc0b4a4 <_Thread_queue_Dequeue+0x90> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b460: 7c 00 01 24 mtmsr r0 the_thread = _Thread_Executing; } } _ISR_Enable( level ); return the_thread; } ffc0b464: 80 01 00 14 lwz r0,20(r1) ffc0b468: 83 e1 00 0c lwz r31,12(r1) ffc0b46c: 38 21 00 10 addi r1,r1,16 ffc0b470: 7c 08 03 a6 mtlr r0 ffc0b474: 4e 80 00 20 blr <== ALWAYS TAKEN Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0b478: 3d 20 ff c1 lis r9,-63 <== ALWAYS TAKEN ffc0b47c: 38 09 b4 c8 addi r0,r9,-19256 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); ffc0b480: 7f e3 fb 78 mr r3,r31 ffc0b484: 7c 09 03 a6 mtctr r0 ffc0b488: 4e 80 04 21 bctrl <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b48c: 7c 00 00 a6 mfmsr r0 ffc0b490: 7d 30 42 a6 mfsprg r9,0 ffc0b494: 7c 09 48 78 andc r9,r0,r9 ffc0b498: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( !the_thread ) { ffc0b49c: 2f 83 00 00 cmpwi cr7,r3,0 <== ALWAYS TAKEN ffc0b4a0: 40 9e ff c0 bne+ cr7,ffc0b460 <_Thread_queue_Dequeue+0x4c> sync_state = the_thread_queue->sync_state; ffc0b4a4: 81 3f 00 30 lwz r9,48(r31) ffc0b4a8: 39 29 ff ff addi r9,r9,-1 ffc0b4ac: 2b 89 00 01 cmplwi cr7,r9,1 ffc0b4b0: 41 9d ff b0 bgt+ cr7,ffc0b460 <_Thread_queue_Dequeue+0x4c> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc0b4b4: 39 20 00 03 li r9,3 ffc0b4b8: 91 3f 00 30 stw r9,48(r31) the_thread = _Thread_Executing; ffc0b4bc: 3d 20 00 00 lis r9,0 ffc0b4c0: 80 69 27 6c lwz r3,10092(r9) ffc0b4c4: 4b ff ff 9c b ffc0b460 <_Thread_queue_Dequeue+0x4c> <== ALWAYS TAKEN ffc0f304 <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { ffc0f304: 94 21 ff f0 stwu r1,-16(r1) ffc0f308: 7c 08 02 a6 mflr r0 ffc0f30c: 93 c1 00 08 stw r30,8(r1) ffc0f310: 90 01 00 14 stw r0,20(r1) ffc0f314: 93 e1 00 0c stw r31,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f318: 7d 60 00 a6 mfmsr r11 ffc0f31c: 7c 10 42 a6 mfsprg r0,0 ffc0f320: 7d 60 00 78 andc r0,r11,r0 ffc0f324: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0f328: 83 c3 00 00 lwz r30,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0f32c: 38 03 00 04 addi r0,r3,4 ffc0f330: 7f 9e 00 00 cmpw cr7,r30,r0 ffc0f334: 41 9e 00 98 beq- cr7,ffc0f3cc <_Thread_queue_Dequeue_fifo+0xc8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc0f338: 81 3e 00 00 lwz r9,0(r30) Thread_Control *the_thread; _ISR_Disable( level ); if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) ffc0f33c: 7f df f3 78 mr r31,r30 <== ALWAYS TAKEN the_chain->first = new_first; ffc0f340: 91 23 00 00 stw r9,0(r3) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0f344: 80 1e 00 50 lwz r0,80(r30) new_first->previous = _Chain_Head(the_chain); ffc0f348: 90 69 00 04 stw r3,4(r9) ffc0f34c: 2f 80 00 02 cmpwi cr7,r0,2 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; ffc0f350: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc0f354: 90 1e 00 44 stw r0,68(r30) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0f358: 41 9e 00 34 beq- cr7,ffc0f38c <_Thread_queue_Dequeue_fifo+0x88> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f35c: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0f360: 3c 80 10 03 lis r4,4099 ffc0f364: 7f c3 f3 78 mr r3,r30 ffc0f368: 60 84 ff f8 ori r4,r4,65528 ffc0f36c: 4b ff b6 f9 bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN return the_thread; } _ISR_Enable( level ); return NULL; } ffc0f370: 80 01 00 14 lwz r0,20(r1) <== ALWAYS TAKEN ffc0f374: 7f e3 fb 78 mr r3,r31 ffc0f378: 83 c1 00 08 lwz r30,8(r1) ffc0f37c: 7c 08 03 a6 mtlr r0 ffc0f380: 83 e1 00 0c lwz r31,12(r1) ffc0f384: 38 21 00 10 addi r1,r1,16 <== ALWAYS TAKEN ffc0f388: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc0f38c: 38 00 00 03 li r0,3 ffc0f390: 90 1e 00 50 stw r0,80(r30) ffc0f394: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0f398: 38 7e 00 48 addi r3,r30,72 ffc0f39c: 4b ff d4 4d bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN ffc0f3a0: 3c 80 10 03 lis r4,4099 ffc0f3a4: 7f c3 f3 78 mr r3,r30 ffc0f3a8: 60 84 ff f8 ori r4,r4,65528 ffc0f3ac: 4b ff b6 b9 bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN return the_thread; } _ISR_Enable( level ); return NULL; } ffc0f3b0: 80 01 00 14 lwz r0,20(r1) ffc0f3b4: 7f e3 fb 78 mr r3,r31 ffc0f3b8: 83 c1 00 08 lwz r30,8(r1) ffc0f3bc: 7c 08 03 a6 mtlr r0 ffc0f3c0: 83 e1 00 0c lwz r31,12(r1) ffc0f3c4: 38 21 00 10 addi r1,r1,16 ffc0f3c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f3cc: 7d 60 01 24 mtmsr r11 ffc0f3d0: 3b e0 00 00 li r31,0 <== ALWAYS TAKEN return the_thread; } _ISR_Enable( level ); return NULL; ffc0f3d4: 4b ff ff 9c b ffc0f370 <_Thread_queue_Dequeue_fifo+0x6c> <== ALWAYS TAKEN ffc0b4c8 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { ffc0b4c8: 94 21 ff f0 stwu r1,-16(r1) ffc0b4cc: 7c 08 02 a6 mflr r0 ffc0b4d0: 93 e1 00 0c stw r31,12(r1) ffc0b4d4: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN ffc0b4d8: 7d 00 00 a6 mfmsr r8 ffc0b4dc: 7c 10 42 a6 mfsprg r0,0 ffc0b4e0: 7d 00 00 78 andc r0,r8,r0 <== ALWAYS TAKEN ffc0b4e4: 7c 00 01 24 mtmsr r0 Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); ffc0b4e8: 38 00 00 04 li r0,4 ffc0b4ec: 7c 09 03 a6 mtctr r0 <== ALWAYS TAKEN ffc0b4f0: 39 60 00 00 li r11,0 ffc0b4f4: 7c 69 1b 78 mr r9,r3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0b4f8: 81 49 00 00 lwz r10,0(r9) ffc0b4fc: 38 09 00 04 addi r0,r9,4 <== ALWAYS TAKEN for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { ffc0b500: 39 29 00 0c addi r9,r9,12 ffc0b504: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0b508: 40 9e 00 2c bne- cr7,ffc0b534 <_Thread_queue_Dequeue_priority+0x6c> ffc0b50c: 39 6b 00 01 addi r11,r11,1 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; ffc0b510: 42 00 ff e8 bdnz+ ffc0b4f8 <_Thread_queue_Dequeue_priority+0x30> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b514: 7d 00 01 24 mtmsr r8 ffc0b518: 3b e0 00 00 li r31,0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } ffc0b51c: 80 01 00 14 lwz r0,20(r1) ffc0b520: 7f e3 fb 78 mr r3,r31 ffc0b524: 83 e1 00 0c lwz r31,12(r1) ffc0b528: 38 21 00 10 addi r1,r1,16 ffc0b52c: 7c 08 03 a6 mtlr r0 ffc0b530: 4e 80 00 20 blr <== ALWAYS TAKEN _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) ffc0b534: 1d 6b 00 0c mulli r11,r11,12 ffc0b538: 7f e3 58 2e lwzx r31,r3,r11 _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; ffc0b53c: 81 3f 00 38 lwz r9,56(r31) ffc0b540: 38 1f 00 3c addi r0,r31,60 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; ffc0b544: 81 5f 00 00 lwz r10,0(r31) ffc0b548: 7f 89 00 00 cmpw cr7,r9,r0 <== ALWAYS TAKEN previous_node = the_thread->Object.Node.previous; ffc0b54c: 81 7f 00 04 lwz r11,4(r31) */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; ffc0b550: 38 00 00 00 li r0,0 ffc0b554: 90 1f 00 44 stw r0,68(r31) ffc0b558: 41 9e 00 90 beq- cr7,ffc0b5e8 <_Thread_queue_Dequeue_priority+0x120> new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; ffc0b55c: 80 ff 00 40 lwz r7,64(r31) new_second_node = new_first_node->next; ffc0b560: 80 c9 00 00 lwz r6,0(r9) previous_node->next = new_first_node; next_node->previous = new_first_node; ffc0b564: 91 2a 00 04 stw r9,4(r10) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; ffc0b568: 91 2b 00 00 stw r9,0(r11) next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; ffc0b56c: 91 69 00 04 stw r11,4(r9) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; ffc0b570: 91 49 00 00 stw r10,0(r9) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { ffc0b574: 81 7f 00 38 lwz r11,56(r31) ffc0b578: 80 1f 00 40 lwz r0,64(r31) ffc0b57c: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0b580: 41 9e 00 1c beq- cr7,ffc0b59c <_Thread_queue_Dequeue_priority+0xd4> _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0b584: 38 09 00 3c addi r0,r9,60 new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = ffc0b588: 39 69 00 38 addi r11,r9,56 ffc0b58c: 91 66 00 04 stw r11,4(r6) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; ffc0b590: 90 c9 00 38 stw r6,56(r9) new_first_thread->Wait.Block2n.last = last_node; ffc0b594: 90 e9 00 40 stw r7,64(r9) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0b598: 90 07 00 00 stw r0,0(r7) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0b59c: 80 1f 00 50 lwz r0,80(r31) ffc0b5a0: 2f 80 00 02 cmpwi cr7,r0,2 ffc0b5a4: 41 9e 00 1c beq- cr7,ffc0b5c0 <_Thread_queue_Dequeue_priority+0xf8> ffc0b5a8: 7d 00 01 24 mtmsr r8 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0b5ac: 3c 80 10 03 lis r4,4099 ffc0b5b0: 60 84 ff f8 ori r4,r4,65528 ffc0b5b4: 7f e3 fb 78 mr r3,r31 ffc0b5b8: 4b ff f4 ad bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN ffc0b5bc: 4b ff ff 60 b ffc0b51c <_Thread_queue_Dequeue_priority+0x54> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc0b5c0: 38 00 00 03 li r0,3 ffc0b5c4: 90 1f 00 50 stw r0,80(r31) ffc0b5c8: 7d 00 01 24 mtmsr r8 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0b5cc: 38 7f 00 48 addi r3,r31,72 ffc0b5d0: 48 00 12 19 bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN ffc0b5d4: 3c 80 10 03 lis r4,4099 ffc0b5d8: 7f e3 fb 78 mr r3,r31 ffc0b5dc: 60 84 ff f8 ori r4,r4,65528 ffc0b5e0: 4b ff f4 85 bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN ffc0b5e4: 4b ff ff 38 b ffc0b51c <_Thread_queue_Dequeue_priority+0x54> <== ALWAYS TAKEN last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; ffc0b5e8: 91 6a 00 04 stw r11,4(r10) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; ffc0b5ec: 91 4b 00 00 stw r10,0(r11) ffc0b5f0: 4b ff ff ac b ffc0b59c <_Thread_queue_Dequeue_priority+0xd4> <== ALWAYS TAKEN ffc0f3d8 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0f3d8: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f3dc: 7d 60 00 a6 mfmsr r11 ffc0f3e0: 7c 10 42 a6 mfsprg r0,0 ffc0f3e4: 7d 60 00 78 andc r0,r11,r0 ffc0f3e8: 7c 00 01 24 mtmsr r0 Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); sync_state = the_thread_queue->sync_state; ffc0f3ec: 80 63 00 30 lwz r3,48(r3) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0f3f0: 38 00 00 00 li r0,0 ffc0f3f4: 90 09 00 30 stw r0,48(r9) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { ffc0f3f8: 2f 83 00 01 cmpwi cr7,r3,1 ffc0f3fc: 41 9e 00 0c beq- cr7,ffc0f408 <_Thread_queue_Enqueue_fifo+0x30> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; ffc0f400: 91 65 00 00 stw r11,0(r5) return sync_state; } ffc0f404: 4e 80 00 20 blr <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0f408: 39 49 00 04 addi r10,r9,4 ffc0f40c: 91 44 00 00 stw r10,0(r4) old_last_node = the_chain->last; ffc0f410: 81 49 00 08 lwz r10,8(r9) the_chain->last = the_node; ffc0f414: 90 89 00 08 stw r4,8(r9) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0f418: 91 44 00 04 stw r10,4(r4) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; ffc0f41c: 91 24 00 44 stw r9,68(r4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0f420: 90 8a 00 00 stw r4,0(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f424: 7d 60 01 24 mtmsr r11 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0f428: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b6d8 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; ffc0b6d8: 80 04 00 14 lwz r0,20(r4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b6dc: 39 04 00 3c addi r8,r4,60 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0b6e0: 94 21 ff f0 stwu r1,-16(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b6e4: 39 64 00 38 addi r11,r4,56 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0b6e8: 70 09 00 20 andi. r9,r0,32 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; ffc0b6ec: 54 0a d1 be rlwinm r10,r0,26,6,31 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b6f0: 91 04 00 38 stw r8,56(r4) ffc0b6f4: 1d 4a 00 0c mulli r10,r10,12 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0b6f8: 93 e1 00 0c stw r31,12(r1) the_chain->permanent_null = NULL; ffc0b6fc: 39 00 00 00 li r8,0 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; ffc0b700: 81 23 00 38 lwz r9,56(r3) _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; ffc0b704: 7d 43 52 14 add r10,r3,r10 ffc0b708: 91 04 00 3c stw r8,60(r4) the_chain->last = _Chain_Head(the_chain); ffc0b70c: 91 64 00 40 stw r11,64(r4) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0b710: 40 82 00 7c bne- ffc0b78c <_Thread_queue_Enqueue_priority+0xb4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0b714: 39 8a 00 04 addi r12,r10,4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b718: 7c c0 00 a6 mfmsr r6 ffc0b71c: 7d 70 42 a6 mfsprg r11,0 ffc0b720: 7c cb 58 78 andc r11,r6,r11 ffc0b724: 7d 60 01 24 mtmsr r11 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; ffc0b728: 81 6a 00 00 lwz r11,0(r10) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b72c: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b730: 40 be 00 2c bne+ cr7,ffc0b75c <_Thread_queue_Enqueue_priority+0x84> ffc0b734: 48 00 01 78 b ffc0b8ac <_Thread_queue_Enqueue_priority+0x1d4> <== ALWAYS TAKEN static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b738: 7c e0 00 a6 mfmsr r7 ffc0b73c: 7c c0 01 24 mtmsr r6 ffc0b740: 7c e0 01 24 mtmsr r7 search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0b744: 80 eb 00 10 lwz r7,16(r11) ffc0b748: 7d 3f 38 39 and. r31,r9,r7 ffc0b74c: 41 82 00 f4 beq- ffc0b840 <_Thread_queue_Enqueue_priority+0x168> <== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; ffc0b750: 81 6b 00 00 lwz r11,0(r11) restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b754: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b758: 41 9e 00 10 beq- cr7,ffc0b768 <_Thread_queue_Enqueue_priority+0x90> search_priority = search_thread->current_priority; ffc0b75c: 81 0b 00 14 lwz r8,20(r11) if ( priority <= search_priority ) ffc0b760: 7f 80 40 40 cmplw cr7,r0,r8 ffc0b764: 41 9d ff d4 bgt+ cr7,ffc0b738 <_Thread_queue_Enqueue_priority+0x60> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b768: 7c ca 33 78 mr r10,r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0b76c: 81 23 00 30 lwz r9,48(r3) ffc0b770: 2f 89 00 01 cmpwi cr7,r9,1 ffc0b774: 41 9e 00 d4 beq- cr7,ffc0b848 <_Thread_queue_Enqueue_priority+0x170> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; ffc0b778: 91 45 00 00 stw r10,0(r5) return the_thread_queue->sync_state; ffc0b77c: 7d 23 4b 78 mr r3,r9 } ffc0b780: 83 e1 00 0c lwz r31,12(r1) ffc0b784: 38 21 00 10 addi r1,r1,16 ffc0b788: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b78c: 3d 80 00 00 lis r12,0 ffc0b790: 39 8c 26 64 addi r12,r12,9828 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; ffc0b794: 89 0c 00 00 lbz r8,0(r12) ffc0b798: 39 08 00 01 addi r8,r8,1 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b79c: 7c c0 00 a6 mfmsr r6 ffc0b7a0: 7d 70 42 a6 mfsprg r11,0 ffc0b7a4: 7c cb 58 78 andc r11,r6,r11 ffc0b7a8: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; ffc0b7ac: 81 6a 00 08 lwz r11,8(r10) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0b7b0: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0b7b4: 40 be 00 2c bne+ cr7,ffc0b7e0 <_Thread_queue_Enqueue_priority+0x108> ffc0b7b8: 48 00 00 34 b ffc0b7ec <_Thread_queue_Enqueue_priority+0x114> <== ALWAYS TAKEN static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b7bc: 7c e0 00 a6 mfmsr r7 ffc0b7c0: 7c c0 01 24 mtmsr r6 ffc0b7c4: 7c e0 01 24 mtmsr r7 search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0b7c8: 80 eb 00 10 lwz r7,16(r11) ffc0b7cc: 7d 3f 38 39 and. r31,r9,r7 ffc0b7d0: 41 82 00 68 beq- ffc0b838 <_Thread_queue_Enqueue_priority+0x160> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) ffc0b7d4: 81 6b 00 04 lwz r11,4(r11) restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0b7d8: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0b7dc: 41 9e 00 10 beq- cr7,ffc0b7ec <_Thread_queue_Enqueue_priority+0x114> search_priority = search_thread->current_priority; ffc0b7e0: 81 0b 00 14 lwz r8,20(r11) if ( priority >= search_priority ) ffc0b7e4: 7f 80 40 40 cmplw cr7,r0,r8 ffc0b7e8: 41 9c ff d4 blt+ cr7,ffc0b7bc <_Thread_queue_Enqueue_priority+0xe4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0b7ec: 81 23 00 30 lwz r9,48(r3) restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0b7f0: 7c ca 33 78 mr r10,r6 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0b7f4: 2f 89 00 01 cmpwi cr7,r9,1 ffc0b7f8: 40 9e ff 80 bne+ cr7,ffc0b778 <_Thread_queue_Enqueue_priority+0xa0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0b7fc: 7f 80 40 00 cmpw cr7,r0,r8 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0b800: 38 00 00 00 li r0,0 ffc0b804: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0b808: 41 9e 00 7c beq- cr7,ffc0b884 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; ffc0b80c: 81 2b 00 00 lwz r9,0(r11) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; ffc0b810: 91 64 00 04 stw r11,4(r4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; ffc0b814: 91 24 00 00 stw r9,0(r4) the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0b818: 90 64 00 44 stw r3,68(r4) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; ffc0b81c: 90 8b 00 00 stw r4,0(r11) next_node->previous = the_node; ffc0b820: 90 89 00 04 stw r4,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b824: 7c c0 01 24 mtmsr r6 ffc0b828: 38 60 00 01 li r3,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0b82c: 83 e1 00 0c lwz r31,12(r1) ffc0b830: 38 21 00 10 addi r1,r1,16 ffc0b834: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b838: 7c c0 01 24 mtmsr r6 ffc0b83c: 4b ff ff 58 b ffc0b794 <_Thread_queue_Enqueue_priority+0xbc> <== ALWAYS TAKEN ffc0b840: 7c c0 01 24 mtmsr r6 <== NOT EXECUTED ffc0b844: 4b ff fe d4 b ffc0b718 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0b848: 7f 80 40 00 cmpw cr7,r0,r8 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0b84c: 38 00 00 00 li r0,0 ffc0b850: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0b854: 41 9e 00 30 beq- cr7,ffc0b884 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; ffc0b858: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0b85c: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0b860: 91 24 00 04 stw r9,4(r4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0b864: 90 64 00 44 stw r3,68(r4) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; ffc0b868: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0b86c: 90 8b 00 04 stw r4,4(r11) ffc0b870: 7c c0 01 24 mtmsr r6 ffc0b874: 38 60 00 01 li r3,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0b878: 83 e1 00 0c lwz r31,12(r1) ffc0b87c: 38 21 00 10 addi r1,r1,16 ffc0b880: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b884: 39 6b 00 3c addi r11,r11,60 the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0b888: 90 64 00 44 stw r3,68(r4) _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; ffc0b88c: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0b890: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0b894: 91 24 00 04 stw r9,4(r4) previous_node->next = the_node; ffc0b898: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0b89c: 90 8b 00 04 stw r4,4(r11) ffc0b8a0: 7d 40 01 24 mtmsr r10 ffc0b8a4: 38 60 00 01 li r3,1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0b8a8: 4b ff fe d8 b ffc0b780 <_Thread_queue_Enqueue_priority+0xa8> <== ALWAYS TAKEN restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b8ac: 7c ca 33 78 mr r10,r6 ffc0b8b0: 39 00 ff ff li r8,-1 ffc0b8b4: 4b ff fe b8 b ffc0b76c <_Thread_queue_Enqueue_priority+0x94> <== ALWAYS TAKEN ffc0b5f4 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0b5f4: 94 21 ff d8 stwu r1,-40(r1) <== ALWAYS TAKEN ffc0b5f8: 7c 08 02 a6 mflr r0 Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; ffc0b5fc: 3d 20 00 00 lis r9,0 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0b600: 90 01 00 2c stw r0,44(r1) ffc0b604: 93 e1 00 24 stw r31,36(r1) Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; ffc0b608: 83 e9 27 6c lwz r31,10092(r9) void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0b60c: 93 a1 00 1c stw r29,28(r1) ffc0b610: 7c 9d 23 78 mr r29,r4 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); ffc0b614: 80 83 00 38 lwz r4,56(r3) void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0b618: 93 c1 00 20 stw r30,32(r1) ffc0b61c: 7c 7e 1b 78 mr r30,r3 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); ffc0b620: 7f e3 fb 78 mr r3,r31 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0b624: 93 81 00 18 stw r28,24(r1) ffc0b628: 7c bc 2b 78 mr r28,r5 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); ffc0b62c: 48 00 04 c9 bl ffc0baf4 <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { ffc0b630: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0b634: 40 9e 00 60 bne- cr7,ffc0b694 <_Thread_queue_Enqueue_with_handler+0xa0> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0b638: 80 1e 00 34 lwz r0,52(r30) ffc0b63c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b640: 41 9e 00 8c beq- cr7,ffc0b6cc <_Thread_queue_Enqueue_with_handler+0xd8> ffc0b644: 3d 20 ff c1 lis r9,-63 ffc0b648: 38 09 f3 d8 addi r0,r9,-3112 enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); ffc0b64c: 7f c3 f3 78 mr r3,r30 ffc0b650: 7c 09 03 a6 mtctr r0 ffc0b654: 7f e4 fb 78 mr r4,r31 ffc0b658: 38 a1 00 08 addi r5,r1,8 ffc0b65c: 4e 80 04 21 bctrl <== ALWAYS TAKEN if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc0b660: 2f 83 00 01 cmpwi cr7,r3,1 ffc0b664: 41 9e 00 10 beq- cr7,ffc0b674 <_Thread_queue_Enqueue_with_handler+0x80> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); ffc0b668: 80 a1 00 08 lwz r5,8(r1) ffc0b66c: 7f e4 fb 78 mr r4,r31 ffc0b670: 4b ff f1 99 bl ffc0a808 <_Thread_blocking_operation_Cancel> <== ALWAYS TAKEN } ffc0b674: 80 01 00 2c lwz r0,44(r1) ffc0b678: 83 81 00 18 lwz r28,24(r1) ffc0b67c: 7c 08 03 a6 mtlr r0 ffc0b680: 83 a1 00 1c lwz r29,28(r1) ffc0b684: 83 c1 00 20 lwz r30,32(r1) ffc0b688: 83 e1 00 24 lwz r31,36(r1) ffc0b68c: 38 21 00 28 addi r1,r1,40 ffc0b690: 4e 80 00 20 blr <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( ffc0b694: 81 3f 00 08 lwz r9,8(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0b698: 38 00 00 00 li r0,0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0b69c: 90 1f 00 6c stw r0,108(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0b6a0: 3c 60 00 00 lis r3,0 ffc0b6a4: 38 63 2c a8 addi r3,r3,11432 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0b6a8: 90 1f 00 50 stw r0,80(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0b6ac: 38 9f 00 48 addi r4,r31,72 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0b6b0: 93 9f 00 64 stw r28,100(r31) the_watchdog->id = id; ffc0b6b4: 91 3f 00 68 stw r9,104(r31) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0b6b8: 93 bf 00 54 stw r29,84(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0b6bc: 48 00 0f 65 bl ffc0c620 <_Watchdog_Insert> <== ALWAYS TAKEN } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0b6c0: 80 1e 00 34 lwz r0,52(r30) ffc0b6c4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b6c8: 40 9e ff 7c bne+ cr7,ffc0b644 <_Thread_queue_Enqueue_with_handler+0x50> ffc0b6cc: 3d 20 ff c1 lis r9,-63 ffc0b6d0: 38 09 b6 d8 addi r0,r9,-18728 ffc0b6d4: 4b ff ff 78 b ffc0b64c <_Thread_queue_Enqueue_with_handler+0x58> <== ALWAYS TAKEN ffc0f42c <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0f42c: 7c 08 02 a6 mflr r0 ffc0f430: 94 21 ff f8 stwu r1,-8(r1) ffc0f434: 90 01 00 0c stw r0,12(r1) /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0f438: 80 03 00 34 lwz r0,52(r3) ffc0f43c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0f440: 41 9e 00 18 beq- cr7,ffc0f458 <_Thread_queue_Extract+0x2c> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); ffc0f444: 48 00 1e 81 bl ffc112c4 <_Thread_queue_Extract_fifo> <== ALWAYS TAKEN } ffc0f448: 80 01 00 0c lwz r0,12(r1) ffc0f44c: 38 21 00 08 addi r1,r1,8 ffc0f450: 7c 08 03 a6 mtlr r0 ffc0f454: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); ffc0f458: 38 a0 00 00 li r5,0 ffc0f45c: 48 00 00 15 bl ffc0f470 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } ffc0f460: 80 01 00 0c lwz r0,12(r1) ffc0f464: 38 21 00 08 addi r1,r1,8 ffc0f468: 7c 08 03 a6 mtlr r0 ffc0f46c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc112c4 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { ffc112c4: 94 21 ff f0 stwu r1,-16(r1) ffc112c8: 7c 08 02 a6 mflr r0 ffc112cc: 90 01 00 14 stw r0,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc112d0: 7d 60 00 a6 mfmsr r11 ffc112d4: 7c 10 42 a6 mfsprg r0,0 ffc112d8: 7d 60 00 78 andc r0,r11,r0 ffc112dc: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc112e0: 3d 20 00 03 lis r9,3 ffc112e4: 80 04 00 10 lwz r0,16(r4) ffc112e8: 61 29 be e0 ori r9,r9,48864 ffc112ec: 7d 2a 00 39 and. r10,r9,r0 ffc112f0: 41 82 00 4c beq- ffc1133c <_Thread_queue_Extract_fifo+0x78> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc112f4: 80 04 00 50 lwz r0,80(r4) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc112f8: 81 24 00 00 lwz r9,0(r4) ffc112fc: 2f 80 00 02 cmpwi cr7,r0,2 previous = the_node->previous; ffc11300: 81 44 00 04 lwz r10,4(r4) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; ffc11304: 38 00 00 00 li r0,0 next->previous = previous; previous->next = next; ffc11308: 91 2a 00 00 stw r9,0(r10) ffc1130c: 90 04 00 44 stw r0,68(r4) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc11310: 91 49 00 04 stw r10,4(r9) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc11314: 41 9e 00 3c beq- cr7,ffc11350 <_Thread_queue_Extract_fifo+0x8c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc11318: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc1131c: 7c 83 23 78 mr r3,r4 ffc11320: 3c 80 10 03 lis r4,4099 ffc11324: 60 84 ff f8 ori r4,r4,65528 ffc11328: 4b ff 97 3d bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ffc1132c: 80 01 00 14 lwz r0,20(r1) ffc11330: 38 21 00 10 addi r1,r1,16 ffc11334: 7c 08 03 a6 mtlr r0 ffc11338: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1133c: 7d 60 01 24 mtmsr r11 ffc11340: 80 01 00 14 lwz r0,20(r1) ffc11344: 38 21 00 10 addi r1,r1,16 ffc11348: 7c 08 03 a6 mtlr r0 ffc1134c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc11350: 38 00 00 03 li r0,3 ffc11354: 90 04 00 50 stw r0,80(r4) ffc11358: 7d 60 01 24 mtmsr r11 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc1135c: 38 64 00 48 addi r3,r4,72 ffc11360: 90 81 00 08 stw r4,8(r1) ffc11364: 4b ff b4 85 bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN ffc11368: 80 81 00 08 lwz r4,8(r1) ffc1136c: 4b ff ff b0 b ffc1131c <_Thread_queue_Extract_fifo+0x58> <== ALWAYS TAKEN ffc0f470 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { ffc0f470: 94 21 ff f0 stwu r1,-16(r1) ffc0f474: 7c 08 02 a6 mflr r0 ffc0f478: 90 01 00 14 stw r0,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f47c: 7d 60 00 a6 mfmsr r11 ffc0f480: 7c 10 42 a6 mfsprg r0,0 ffc0f484: 7d 60 00 78 andc r0,r11,r0 ffc0f488: 7c 00 01 24 mtmsr r0 Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0f48c: 3d 20 00 03 lis r9,3 ffc0f490: 80 04 00 10 lwz r0,16(r4) ffc0f494: 61 29 be e0 ori r9,r9,48864 ffc0f498: 7d 2a 00 39 and. r10,r9,r0 ffc0f49c: 41 82 00 a8 beq- ffc0f544 <_Thread_queue_Extract_priority_helper+0xd4> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0f4a0: 81 24 00 38 lwz r9,56(r4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0f4a4: 38 04 00 3c addi r0,r4,60 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; ffc0f4a8: 81 04 00 00 lwz r8,0(r4) ffc0f4ac: 7f 89 00 00 cmpw cr7,r9,r0 previous_node = the_node->previous; ffc0f4b0: 81 44 00 04 lwz r10,4(r4) ffc0f4b4: 41 9e 00 a4 beq- cr7,ffc0f558 <_Thread_queue_Extract_priority_helper+0xe8> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; ffc0f4b8: 80 e4 00 40 lwz r7,64(r4) new_second_node = new_first_node->next; ffc0f4bc: 80 c9 00 00 lwz r6,0(r9) previous_node->next = new_first_node; next_node->previous = new_first_node; ffc0f4c0: 91 28 00 04 stw r9,4(r8) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; ffc0f4c4: 91 2a 00 00 stw r9,0(r10) next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; ffc0f4c8: 91 49 00 04 stw r10,4(r9) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; ffc0f4cc: 91 09 00 00 stw r8,0(r9) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { ffc0f4d0: 81 44 00 38 lwz r10,56(r4) ffc0f4d4: 80 04 00 40 lwz r0,64(r4) ffc0f4d8: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0f4dc: 41 9e 00 1c beq- cr7,ffc0f4f8 <_Thread_queue_Extract_priority_helper+0x88> new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0f4e0: 38 09 00 3c addi r0,r9,60 new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = ffc0f4e4: 39 49 00 38 addi r10,r9,56 ffc0f4e8: 91 46 00 04 stw r10,4(r6) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; ffc0f4ec: 90 c9 00 38 stw r6,56(r9) new_first_thread->Wait.Block2n.last = last_node; ffc0f4f0: 90 e9 00 40 stw r7,64(r9) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0f4f4: 90 07 00 00 stw r0,0(r7) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { ffc0f4f8: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f4fc: 40 9e 00 34 bne- cr7,ffc0f530 <_Thread_queue_Extract_priority_helper+0xc0> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0f500: 80 04 00 50 lwz r0,80(r4) ffc0f504: 2f 80 00 02 cmpwi cr7,r0,2 ffc0f508: 41 9e 00 5c beq- cr7,ffc0f564 <_Thread_queue_Extract_priority_helper+0xf4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f50c: 7d 60 01 24 mtmsr r11 ffc0f510: 7c 83 23 78 mr r3,r4 ffc0f514: 3c 80 10 03 lis r4,4099 ffc0f518: 60 84 ff f8 ori r4,r4,65528 ffc0f51c: 4b ff b5 49 bl ffc0aa64 <_Thread_Clear_state> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ffc0f520: 80 01 00 14 lwz r0,20(r1) ffc0f524: 38 21 00 10 addi r1,r1,16 ffc0f528: 7c 08 03 a6 mtlr r0 ffc0f52c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f530: 7d 60 01 24 mtmsr r11 ffc0f534: 80 01 00 14 lwz r0,20(r1) ffc0f538: 38 21 00 10 addi r1,r1,16 ffc0f53c: 7c 08 03 a6 mtlr r0 ffc0f540: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f544: 7d 60 01 24 mtmsr r11 ffc0f548: 80 01 00 14 lwz r0,20(r1) ffc0f54c: 38 21 00 10 addi r1,r1,16 ffc0f550: 7c 08 03 a6 mtlr r0 ffc0f554: 4e 80 00 20 blr <== ALWAYS TAKEN new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; ffc0f558: 91 48 00 04 stw r10,4(r8) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; ffc0f55c: 91 0a 00 00 stw r8,0(r10) ffc0f560: 4b ff ff 98 b ffc0f4f8 <_Thread_queue_Extract_priority_helper+0x88> <== ALWAYS TAKEN ffc0f564: 38 00 00 03 li r0,3 ffc0f568: 90 04 00 50 stw r0,80(r4) ffc0f56c: 7d 60 01 24 mtmsr r11 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0f570: 38 64 00 48 addi r3,r4,72 ffc0f574: 90 81 00 08 stw r4,8(r1) ffc0f578: 4b ff d2 71 bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN ffc0f57c: 80 81 00 08 lwz r4,8(r1) ffc0f580: 4b ff ff 90 b ffc0f510 <_Thread_queue_Extract_priority_helper+0xa0> <== ALWAYS TAKEN ffc0b8b8 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { ffc0b8b8: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0b8bc: 94 21 ff f8 stwu r1,-8(r1) States_Control state; state = the_thread->current_state; ffc0b8c0: 3d 20 00 03 lis r9,3 */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { ffc0b8c4: 90 01 00 0c stw r0,12(r1) States_Control state; state = the_thread->current_state; ffc0b8c8: 61 29 be e0 ori r9,r9,48864 */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { ffc0b8cc: 7c 64 1b 78 mr r4,r3 States_Control state; state = the_thread->current_state; ffc0b8d0: 80 03 00 10 lwz r0,16(r3) ffc0b8d4: 38 60 00 00 li r3,0 ffc0b8d8: 7d 2b 00 39 and. r11,r9,r0 ffc0b8dc: 41 a2 00 10 beq+ ffc0b8ec <_Thread_queue_Extract_with_proxy+0x34> if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc0b8e0: 80 64 00 44 lwz r3,68(r4) ffc0b8e4: 48 00 3b 49 bl ffc0f42c <_Thread_queue_Extract> <== ALWAYS TAKEN ffc0b8e8: 38 60 00 01 li r3,1 return true; } return false; } ffc0b8ec: 80 01 00 0c lwz r0,12(r1) ffc0b8f0: 38 21 00 08 addi r1,r1,8 ffc0b8f4: 7c 08 03 a6 mtlr r0 ffc0b8f8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc23280 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { ffc23280: 7c 08 02 a6 mflr r0 ffc23284: 94 21 ff f8 stwu r1,-8(r1) ffc23288: 90 01 00 0c stw r0,12(r1) Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc2328c: 80 03 00 34 lwz r0,52(r3) ffc23290: 2f 80 00 01 cmpwi cr7,r0,1 ffc23294: 41 9e 00 24 beq- cr7,ffc232b8 <_Thread_queue_First+0x38> ffc23298: 3d 20 ff c2 lis r9,-62 ffc2329c: 39 29 4d 88 addi r9,r9,19848 ffc232a0: 7d 29 03 a6 mtctr r9 first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); ffc232a4: 4e 80 04 21 bctrl <== ALWAYS TAKEN } ffc232a8: 80 01 00 0c lwz r0,12(r1) ffc232ac: 38 21 00 08 addi r1,r1,8 ffc232b0: 7c 08 03 a6 mtlr r0 ffc232b4: 4e 80 00 20 blr <== ALWAYS TAKEN Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc232b8: 3d 20 ff c2 lis r9,-62 ffc232bc: 39 29 32 d8 addi r9,r9,13016 ffc232c0: 7d 29 03 a6 mtctr r9 first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); ffc232c4: 4e 80 04 21 bctrl <== ALWAYS TAKEN } ffc232c8: 80 01 00 0c lwz r0,12(r1) ffc232cc: 38 21 00 08 addi r1,r1,8 ffc232d0: 7c 08 03 a6 mtlr r0 ffc232d4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc24d88 <_Thread_queue_First_fifo>: */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc24d88: 80 03 00 00 lwz r0,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc24d8c: 38 63 00 04 addi r3,r3,4 ffc24d90: 7c 09 1a 78 xor r9,r0,r3 ffc24d94: 7d 2b fe 70 srawi r11,r9,31 ffc24d98: 7d 63 4a 78 xor r3,r11,r9 ffc24d9c: 7c 63 58 50 subf r3,r3,r11 ffc24da0: 7c 63 fe 70 srawi r3,r3,31 { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } ffc24da4: 7c 03 18 38 and r3,r0,r3 <== ALWAYS TAKEN ffc24da8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc232d8 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { ffc232d8: 38 00 00 04 li r0,4 ffc232dc: 7c 09 03 a6 mtctr r0 ffc232e0: 7c 69 1b 78 mr r9,r3 ffc232e4: 39 60 00 00 li r11,0 ffc232e8: 81 49 00 00 lwz r10,0(r9) ffc232ec: 38 09 00 04 addi r0,r9,4 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { ffc232f0: 39 29 00 0c addi r9,r9,12 ffc232f4: 7f 8a 00 00 cmpw cr7,r10,r0 ffc232f8: 40 9e 00 14 bne- cr7,ffc2330c <_Thread_queue_First_priority+0x34> ffc232fc: 39 6b 00 01 addi r11,r11,1 Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; ffc23300: 42 00 ff e8 bdnz+ ffc232e8 <_Thread_queue_First_priority+0x10> ffc23304: 38 60 00 00 li r3,0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } ffc23308: 4e 80 00 20 blr <== ALWAYS TAKEN for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) ffc2330c: 1d 6b 00 0c mulli r11,r11,12 ffc23310: 7c 63 58 2e lwzx r3,r3,r11 ffc23314: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b8fc <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { ffc0b8fc: 94 21 ff f0 stwu r1,-16(r1) ffc0b900: 7c 08 02 a6 mflr r0 ffc0b904: 93 c1 00 08 stw r30,8(r1) ffc0b908: 7c be 2b 78 mr r30,r5 ffc0b90c: 93 e1 00 0c stw r31,12(r1) ffc0b910: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN ffc0b914: 90 01 00 14 stw r0,20(r1) Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { ffc0b918: 48 00 00 08 b ffc0b920 <_Thread_queue_Flush+0x24> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; ffc0b91c: 93 c3 00 34 stw r30,52(r3) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { ffc0b920: 7f e3 fb 78 mr r3,r31 ffc0b924: 4b ff fa f1 bl ffc0b414 <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc0b928: 2c 03 00 00 cmpwi r3,0 ffc0b92c: 40 82 ff f0 bne+ ffc0b91c <_Thread_queue_Flush+0x20> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } ffc0b930: 80 01 00 14 lwz r0,20(r1) ffc0b934: 83 c1 00 08 lwz r30,8(r1) ffc0b938: 7c 08 03 a6 mtlr r0 ffc0b93c: 83 e1 00 0c lwz r31,12(r1) ffc0b940: 38 21 00 10 addi r1,r1,16 ffc0b944: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b948 <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0b948: 2f 84 00 01 cmpwi cr7,r4,1 Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; ffc0b94c: 90 a3 00 38 stw r5,56(r3) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0b950: 38 00 00 00 li r0,0 uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; ffc0b954: 90 c3 00 3c stw r6,60(r3) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; ffc0b958: 90 83 00 34 stw r4,52(r3) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0b95c: 90 03 00 30 stw r0,48(r3) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0b960: 41 9e 00 18 beq- cr7,ffc0b978 <_Thread_queue_Initialize+0x30> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b964: 39 23 00 04 addi r9,r3,4 the_chain->permanent_null = NULL; ffc0b968: 90 03 00 04 stw r0,4(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b96c: 91 23 00 00 stw r9,0(r3) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b970: 90 63 00 08 stw r3,8(r3) ffc0b974: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0b978: 38 00 00 04 li r0,4 <== ALWAYS TAKEN ffc0b97c: 7c 09 03 a6 mtctr r0 <== ALWAYS TAKEN ffc0b980: 39 20 00 00 li r9,0 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b984: 38 03 00 04 addi r0,r3,4 the_chain->permanent_null = NULL; ffc0b988: 91 23 00 04 stw r9,4(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b98c: 90 03 00 00 stw r0,0(r3) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b990: 90 63 00 08 stw r3,8(r3) ffc0b994: 38 63 00 0c addi r3,r3,12 uint32_t index; for( index=0 ; ffc0b998: 42 00 ff ec bdnz+ ffc0b984 <_Thread_queue_Initialize+0x3c> ffc0b99c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f584 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ffc0f584: 7c 08 02 a6 mflr r0 ffc0f588: 94 21 ff f8 stwu r1,-8(r1) ffc0f58c: 7c 64 1b 78 mr r4,r3 ffc0f590: 90 01 00 0c stw r0,12(r1) Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ffc0f594: 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 && ffc0f598: 80 03 00 30 lwz r0,48(r3) ffc0f59c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f5a0: 41 9e 00 14 beq- cr7,ffc0f5b4 <_Thread_queue_Process_timeout+0x30> ffc0f5a4: 3d 20 00 00 lis r9,0 ffc0f5a8: 81 29 27 6c lwz r9,10092(r9) ffc0f5ac: 7f 84 48 00 cmpw cr7,r4,r9 ffc0f5b0: 41 9e 00 20 beq- cr7,ffc0f5d0 <_Thread_queue_Process_timeout+0x4c> 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; ffc0f5b4: 80 03 00 3c lwz r0,60(r3) ffc0f5b8: 90 04 00 34 stw r0,52(r4) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc0f5bc: 4b ff fe 71 bl ffc0f42c <_Thread_queue_Extract> <== ALWAYS TAKEN } } ffc0f5c0: 80 01 00 0c lwz r0,12(r1) ffc0f5c4: 38 21 00 08 addi r1,r1,8 ffc0f5c8: 7c 08 03 a6 mtlr r0 ffc0f5cc: 4e 80 00 20 blr <== ALWAYS TAKEN * 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 ) { ffc0f5d0: 2f 80 00 03 cmpwi cr7,r0,3 ffc0f5d4: 41 be ff ec beq- cr7,ffc0f5c0 <_Thread_queue_Process_timeout+0x3c> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0f5d8: 80 03 00 3c lwz r0,60(r3) ffc0f5dc: 90 04 00 34 stw r0,52(r4) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc0f5e0: 38 00 00 02 li r0,2 ffc0f5e4: 90 03 00 30 stw r0,48(r3) ffc0f5e8: 4b ff ff d8 b ffc0f5c0 <_Thread_queue_Process_timeout+0x3c> <== ALWAYS TAKEN ffc0b9a0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0b9a0: 94 21 ff d8 stwu r1,-40(r1) ffc0b9a4: 7c 08 02 a6 mflr r0 ffc0b9a8: 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 ) ffc0b9ac: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0b9b0: 93 c1 00 20 stw r30,32(r1) ffc0b9b4: 7c 9e 23 78 mr r30,r4 ffc0b9b8: 90 01 00 2c stw r0,44(r1) ffc0b9bc: 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 ) ffc0b9c0: 41 82 00 10 beq- ffc0b9d0 <_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 ) { ffc0b9c4: 80 1f 00 34 lwz r0,52(r31) ffc0b9c8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9cc: 41 9e 00 20 beq- cr7,ffc0b9ec <_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 ); } } ffc0b9d0: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0b9d4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0b9d8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0b9dc: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0b9e0: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0b9e4: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0b9e8: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b9ec: 7f a0 00 a6 mfmsr r29 ffc0b9f0: 7d 30 42 a6 mfsprg r9,0 ffc0b9f4: 7f a9 48 78 andc r9,r29,r9 ffc0b9f8: 7d 20 01 24 mtmsr r9 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 ) ) { ffc0b9fc: 3d 60 00 03 lis r11,3 ffc0ba00: 81 24 00 10 lwz r9,16(r4) ffc0ba04: 61 6b be e0 ori r11,r11,48864 ffc0ba08: 7d 6a 48 39 and. r10,r11,r9 ffc0ba0c: 40 82 00 24 bne- ffc0ba30 <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ba10: 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 ); } } ffc0ba14: 80 01 00 2c lwz r0,44(r1) ffc0ba18: 83 a1 00 1c lwz r29,28(r1) ffc0ba1c: 7c 08 03 a6 mtlr r0 ffc0ba20: 83 c1 00 20 lwz r30,32(r1) ffc0ba24: 83 e1 00 24 lwz r31,36(r1) ffc0ba28: 38 21 00 28 addi r1,r1,40 ffc0ba2c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ba30: 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 ); ffc0ba34: 38 a0 00 01 li r5,1 ffc0ba38: 48 00 3a 39 bl ffc0f470 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0ba3c: 7f e3 fb 78 mr r3,r31 ffc0ba40: 7f c4 f3 78 mr r4,r30 ffc0ba44: 38 a1 00 08 addi r5,r1,8 ffc0ba48: 4b ff fc 91 bl ffc0b6d8 <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN ffc0ba4c: 7f a0 01 24 mtmsr r29 ffc0ba50: 4b ff ff c4 b ffc0ba14 <_Thread_queue_Requeue+0x74> <== ALWAYS TAKEN ffc0ba54 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ba54: 94 21 ff e8 stwu r1,-24(r1) ffc0ba58: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ba5c: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ba60: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ba64: 4b ff f5 35 bl ffc0af98 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0ba68: 80 01 00 08 lwz r0,8(r1) ffc0ba6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ba70: 40 9e 00 18 bne- cr7,ffc0ba88 <_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 ); ffc0ba74: 48 00 3b 11 bl ffc0f584 <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0ba78: 3d 20 00 00 lis r9,0 ffc0ba7c: 81 69 27 2c lwz r11,10028(r9) ffc0ba80: 38 0b ff ff addi r0,r11,-1 ffc0ba84: 90 09 27 2c stw r0,10028(r9) _Thread_Unnest_dispatch(); break; } } ffc0ba88: 80 01 00 1c lwz r0,28(r1) ffc0ba8c: 38 21 00 18 addi r1,r1,24 ffc0ba90: 7c 08 03 a6 mtlr r0 ffc0ba94: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e6e4 <_Timer_Manager_initialization>: * Output parameters: NONE */ void _Timer_Manager_initialization(void) { _Objects_Initialize_information( ffc0e6e4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { ffc0e6e8: 94 21 ff f8 stwu r1,-8(r1) ffc0e6ec: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0e6f0: 3c 60 00 00 lis r3,0 ffc0e6f4: 80 c9 20 78 lwz r6,8312(r9) ffc0e6f8: 38 63 2f 84 addi r3,r3,12164 ffc0e6fc: 39 20 00 04 li r9,4 <== ALWAYS TAKEN * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { ffc0e700: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0e704: 38 80 00 02 li r4,2 ffc0e708: 38 a0 00 02 li r5,2 ffc0e70c: 38 e0 00 3c li r7,60 ffc0e710: 39 00 00 00 li r8,0 ffc0e714: 4b ff bd 75 bl ffc0a488 <_Objects_Initialize_information> <== ALWAYS TAKEN /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; ffc0e718: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc0e71c: 3d 20 00 00 lis r9,0 ffc0e720: 90 09 27 ac stw r0,10156(r9) } ffc0e724: 80 01 00 0c lwz r0,12(r1) ffc0e728: 38 21 00 08 addi r1,r1,8 ffc0e72c: 7c 08 03 a6 mtlr r0 ffc0e730: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b260 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1b260: 94 21 ff 98 stwu r1,-104(r1) ffc1b264: 7c 08 02 a6 mflr r0 ffc1b268: 92 a1 00 3c stw r21,60(r1) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc1b26c: 3a a1 00 08 addi r21,r1,8 ffc1b270: 90 01 00 6c stw r0,108(r1) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc1b274: 38 00 00 00 li r0,0 ffc1b278: 92 e1 00 44 stw r23,68(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc1b27c: 3a e1 00 18 addi r23,r1,24 ffc1b280: 93 41 00 50 stw r26,80(r1) ffc1b284: 3b 41 00 0c addi r26,r1,12 ffc1b288: 93 81 00 58 stw r28,88(r1) ffc1b28c: 3b 81 00 14 addi r28,r1,20 ffc1b290: 92 81 00 38 stw r20,56(r1) ffc1b294: 3e 80 00 00 lis r20,0 ffc1b298: 3a 94 28 24 addi r20,r20,10276 ffc1b29c: 93 01 00 48 stw r24,72(r1) ffc1b2a0: 3f 00 00 00 lis r24,0 ffc1b2a4: 3b 18 28 7c addi r24,r24,10364 ffc1b2a8: 93 21 00 4c stw r25,76(r1) ffc1b2ac: 3f 20 00 00 lis r25,0 ffc1b2b0: 3b 39 28 44 addi r25,r25,10308 ffc1b2b4: 93 c1 00 60 stw r30,96(r1) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc1b2b8: 90 01 00 18 stw r0,24(r1) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1b2bc: 93 41 00 08 stw r26,8(r1) the_chain->permanent_null = NULL; ffc1b2c0: 90 01 00 0c stw r0,12(r1) the_chain->last = _Chain_Head(the_chain); ffc1b2c4: 92 a1 00 10 stw r21,16(r1) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1b2c8: 92 e1 00 14 stw r23,20(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc1b2cc: 93 81 00 1c stw r28,28(r1) ffc1b2d0: 92 01 00 28 stw r16,40(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1b2d4: 3a 03 00 08 addi r16,r3,8 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1b2d8: 92 21 00 2c stw r17,44(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1b2dc: 3a 23 00 40 addi r17,r3,64 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1b2e0: 92 41 00 30 stw r18,48(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1b2e4: 3a 40 00 00 li r18,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1b2e8: 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; ffc1b2ec: 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 ) { ffc1b2f0: 92 c1 00 40 stw r22,64(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; ffc1b2f4: 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 ) { ffc1b2f8: 93 61 00 54 stw r27,84(r1) /* * 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 ); ffc1b2fc: 3b 63 00 68 addi r27,r3,104 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1b300: 93 a1 00 5c stw r29,92(r1) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1b304: 3b a3 00 30 addi r29,r3,48 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1b308: 93 e1 00 64 stw r31,100(r1) ffc1b30c: 7c 7f 1b 78 mr r31,r3 { /* * 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; ffc1b310: 92 bf 00 78 stw r21,120(r31) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1b314: 7f a3 eb 78 mr r3,r29 ffc1b318: 7f 85 e3 78 mr r5,r28 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1b31c: 80 18 00 00 lwz r0,0(r24) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1b320: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; ffc1b324: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1b328: 7c 84 00 50 subf r4,r4,r0 ffc1b32c: 48 00 52 a1 bl ffc205cc <_Watchdog_Adjust_to_chain> <== ALWAYS TAKEN static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1b330: 83 d9 00 00 lwz r30,0(r25) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1b334: 80 9f 00 74 lwz r4,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 ) { ffc1b338: 7f 9e 20 40 cmplw cr7,r30,r4 ffc1b33c: 41 9d 00 98 bgt- cr7,ffc1b3d4 <_Timer_server_Body+0x174> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1b340: 41 9c 00 a8 blt- cr7,ffc1b3e8 <_Timer_server_Body+0x188> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1b344: 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 ); ffc1b348: 80 7f 00 78 lwz r3,120(r31) ffc1b34c: 48 00 0b ad bl ffc1bef8 <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { ffc1b350: 2c 03 00 00 cmpwi r3,0 ffc1b354: 41 82 00 34 beq- ffc1b388 <_Timer_server_Body+0x128> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1b358: 80 03 00 38 lwz r0,56(r3) ffc1b35c: 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 ) { ffc1b360: 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 ) { ffc1b364: 41 9e 00 98 beq- cr7,ffc1b3fc <_Timer_server_Body+0x19c> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1b368: 40 9a ff e0 bne+ cr6,ffc1b348 <_Timer_server_Body+0xe8> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1b36c: 38 83 00 10 addi r4,r3,16 ffc1b370: 7f 63 db 78 mr r3,r27 ffc1b374: 48 00 53 15 bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1b378: 80 7f 00 78 lwz r3,120(r31) ffc1b37c: 48 00 0b 7d bl ffc1bef8 <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { ffc1b380: 2c 03 00 00 cmpwi r3,0 ffc1b384: 40 82 ff d4 bne+ ffc1b358 <_Timer_server_Body+0xf8> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1b388: 7d 20 00 a6 mfmsr r9 ffc1b38c: 7c 10 42 a6 mfsprg r0,0 ffc1b390: 7d 20 00 78 andc r0,r9,r0 <== ALWAYS TAKEN ffc1b394: 7c 00 01 24 mtmsr r0 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1b398: 80 01 00 08 lwz r0,8(r1) ffc1b39c: 7f 9a 00 00 cmpw cr7,r26,r0 ffc1b3a0: 41 9e 00 6c beq- cr7,ffc1b40c <_Timer_server_Body+0x1ac> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1b3a4: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1b3a8: 80 18 00 00 lwz r0,0(r24) <== NOT EXECUTED */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1b3ac: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1b3b0: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1b3b4: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1b3b8: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1b3bc: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED ffc1b3c0: 48 00 52 0d bl ffc205cc <_Watchdog_Adjust_to_chain> <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1b3c4: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1b3c8: 80 9f 00 74 lwz r4,116(r31) <== NOT EXECUTED /* * 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 ) { ffc1b3cc: 7f 9e 20 40 cmplw cr7,r30,r4 <== NOT EXECUTED ffc1b3d0: 40 9d ff 70 ble+ cr7,ffc1b340 <_Timer_server_Body+0xe0> <== NOT EXECUTED /* * 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 ); ffc1b3d4: 7c 84 f0 50 subf r4,r4,r30 ffc1b3d8: 7f 63 db 78 mr r3,r27 ffc1b3dc: 7f 85 e3 78 mr r5,r28 ffc1b3e0: 48 00 51 ed bl ffc205cc <_Watchdog_Adjust_to_chain> <== ALWAYS TAKEN ffc1b3e4: 4b ff ff 60 b ffc1b344 <_Timer_server_Body+0xe4> <== ALWAYS TAKEN /* * 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 ); ffc1b3e8: 7c be 20 50 subf r5,r30,r4 ffc1b3ec: 7f 63 db 78 mr r3,r27 ffc1b3f0: 38 80 00 01 li r4,1 ffc1b3f4: 48 00 50 b9 bl ffc204ac <_Watchdog_Adjust> <== ALWAYS TAKEN ffc1b3f8: 4b ff ff 4c b ffc1b344 <_Timer_server_Body+0xe4> <== ALWAYS TAKEN Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1b3fc: 38 83 00 10 addi r4,r3,16 ffc1b400: 7f a3 eb 78 mr r3,r29 ffc1b404: 48 00 52 85 bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN ffc1b408: 4b ff ff 40 b ffc1b348 <_Timer_server_Body+0xe8> <== ALWAYS TAKEN */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1b40c: 90 7f 00 78 stw r3,120(r31) ffc1b410: 7d 20 01 24 mtmsr r9 _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 ) ) { ffc1b414: 80 01 00 14 lwz r0,20(r1) ffc1b418: 7f 97 00 00 cmpw cr7,r23,r0 ffc1b41c: 40 be 00 30 bne+ cr7,ffc1b44c <_Timer_server_Body+0x1ec> ffc1b420: 48 00 00 50 b ffc1b470 <_Timer_server_Body+0x210> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc1b424: 81 69 00 00 lwz r11,0(r9) * 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; ffc1b428: 92 c9 00 08 stw r22,8(r9) the_chain->first = new_first; ffc1b42c: 91 61 00 14 stw r11,20(r1) new_first->previous = _Chain_Head(the_chain); ffc1b430: 93 8b 00 04 stw r28,4(r11) ffc1b434: 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 ); ffc1b438: 80 09 00 1c lwz r0,28(r9) ffc1b43c: 80 89 00 24 lwz r4,36(r9) ffc1b440: 80 69 00 20 lwz r3,32(r9) ffc1b444: 7c 09 03 a6 mtctr r0 ffc1b448: 4e 80 04 21 bctrl <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1b44c: 7c 00 00 a6 mfmsr r0 ffc1b450: 7d 30 42 a6 mfsprg r9,0 ffc1b454: 7c 09 48 78 andc r9,r0,r9 ffc1b458: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1b45c: 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)) ffc1b460: 7f 97 48 00 cmpw cr7,r23,r9 ffc1b464: 40 9e ff c0 bne+ cr7,ffc1b424 <_Timer_server_Body+0x1c4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1b468: 7c 00 01 24 mtmsr r0 ffc1b46c: 4b ff fe a4 b ffc1b310 <_Timer_server_Body+0xb0> <== ALWAYS TAKEN } } else { ts->active = false; ffc1b470: 9a 5f 00 7c stb r18,124(r31) ffc1b474: 80 14 00 00 lwz r0,0(r20) ffc1b478: 30 00 00 01 addic r0,r0,1 ffc1b47c: 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 ); ffc1b480: 80 7f 00 00 lwz r3,0(r31) ffc1b484: 38 80 00 08 li r4,8 ffc1b488: 48 00 43 f9 bl ffc1f880 <_Thread_Set_state> <== ALWAYS TAKEN _Timer_server_Reset_interval_system_watchdog( ts ); ffc1b48c: 7f e3 fb 78 mr r3,r31 ffc1b490: 4b ff fc a9 bl ffc1b138 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); ffc1b494: 7f e3 fb 78 mr r3,r31 ffc1b498: 4b ff fd 35 bl ffc1b1cc <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc1b49c: 48 00 36 9d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ts->active = true; ffc1b4a0: 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 ); ffc1b4a4: 7e 03 83 78 mr r3,r16 ffc1b4a8: 48 00 53 a9 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1b4ac: 7e 23 8b 78 mr r3,r17 ffc1b4b0: 48 00 53 a1 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN ffc1b4b4: 4b ff fe 5c b ffc1b310 <_Timer_server_Body+0xb0> <== ALWAYS TAKEN ffc1b138 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { ffc1b138: 94 21 ff f0 stwu r1,-16(r1) ffc1b13c: 7c 08 02 a6 mflr r0 ffc1b140: 93 c1 00 08 stw r30,8(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1b144: 3b c3 00 08 addi r30,r3,8 } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { ffc1b148: 93 e1 00 0c stw r31,12(r1) ffc1b14c: 7c 7f 1b 78 mr r31,r3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1b150: 7f c3 f3 78 mr r3,r30 } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { ffc1b154: 90 01 00 14 stw r0,20(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1b158: 48 00 56 f9 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1b15c: 7d 60 00 a6 mfmsr r11 ffc1b160: 7c 10 42 a6 mfsprg r0,0 ffc1b164: 7d 60 00 78 andc r0,r11,r0 ffc1b168: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1b16c: 81 3f 00 30 lwz r9,48(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc1b170: 38 1f 00 34 addi r0,r31,52 ffc1b174: 7f 89 00 00 cmpw cr7,r9,r0 ffc1b178: 41 9e 00 38 beq- cr7,ffc1b1b0 <_Timer_server_Reset_interval_system_watchdog+0x78> _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; ffc1b17c: 80 09 00 10 lwz r0,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1b180: 7d 60 01 24 mtmsr r11 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1b184: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc1b188: 90 1f 00 14 stw r0,20(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1b18c: 7f c4 f3 78 mr r4,r30 ffc1b190: 38 63 70 e8 addi r3,r3,28904 ffc1b194: 48 00 54 f5 bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN delta_interval ); } else { _ISR_Enable( level ); } } ffc1b198: 80 01 00 14 lwz r0,20(r1) ffc1b19c: 83 c1 00 08 lwz r30,8(r1) ffc1b1a0: 7c 08 03 a6 mtlr r0 ffc1b1a4: 83 e1 00 0c lwz r31,12(r1) ffc1b1a8: 38 21 00 10 addi r1,r1,16 ffc1b1ac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b1b0: 7d 60 01 24 mtmsr r11 ffc1b1b4: 80 01 00 14 lwz r0,20(r1) ffc1b1b8: 83 c1 00 08 lwz r30,8(r1) ffc1b1bc: 7c 08 03 a6 mtlr r0 ffc1b1c0: 83 e1 00 0c lwz r31,12(r1) ffc1b1c4: 38 21 00 10 addi r1,r1,16 ffc1b1c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b1cc <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { ffc1b1cc: 94 21 ff f0 stwu r1,-16(r1) ffc1b1d0: 7c 08 02 a6 mflr r0 ffc1b1d4: 93 c1 00 08 stw r30,8(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1b1d8: 3b c3 00 40 addi r30,r3,64 } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { ffc1b1dc: 93 e1 00 0c stw r31,12(r1) ffc1b1e0: 7c 7f 1b 78 mr r31,r3 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1b1e4: 7f c3 f3 78 mr r3,r30 } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { ffc1b1e8: 90 01 00 14 stw r0,20(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1b1ec: 48 00 56 65 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1b1f0: 7d 60 00 a6 mfmsr r11 ffc1b1f4: 7c 10 42 a6 mfsprg r0,0 ffc1b1f8: 7d 60 00 78 andc r0,r11,r0 ffc1b1fc: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1b200: 81 3f 00 68 lwz r9,104(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc1b204: 38 1f 00 6c addi r0,r31,108 ffc1b208: 7f 89 00 00 cmpw cr7,r9,r0 ffc1b20c: 41 9e 00 38 beq- cr7,ffc1b244 <_Timer_server_Reset_tod_system_watchdog+0x78> _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; ffc1b210: 80 09 00 10 lwz r0,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1b214: 7d 60 01 24 mtmsr r11 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc1b218: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc1b21c: 90 1f 00 4c stw r0,76(r31) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc1b220: 7f c4 f3 78 mr r4,r30 ffc1b224: 38 63 70 dc addi r3,r3,28892 ffc1b228: 48 00 54 61 bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN delta_interval ); } else { _ISR_Enable( level ); } } ffc1b22c: 80 01 00 14 lwz r0,20(r1) ffc1b230: 83 c1 00 08 lwz r30,8(r1) ffc1b234: 7c 08 03 a6 mtlr r0 ffc1b238: 83 e1 00 0c lwz r31,12(r1) ffc1b23c: 38 21 00 10 addi r1,r1,16 ffc1b240: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b244: 7d 60 01 24 mtmsr r11 ffc1b248: 80 01 00 14 lwz r0,20(r1) ffc1b24c: 83 c1 00 08 lwz r30,8(r1) ffc1b250: 7c 08 03 a6 mtlr r0 ffc1b254: 83 e1 00 0c lwz r31,12(r1) ffc1b258: 38 21 00 10 addi r1,r1,16 ffc1b25c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b4b8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1b4b8: 94 21 ff f0 stwu r1,-16(r1) ffc1b4bc: 7c 08 02 a6 mflr r0 ffc1b4c0: 7c 89 23 78 mr r9,r4 ffc1b4c4: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc1b4c8: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1b4cc: 93 e1 00 0c stw r31,12(r1) ffc1b4d0: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1b4d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b4d8: 41 9e 00 20 beq- cr7,ffc1b4f8 <_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 ); ffc1b4dc: 80 63 00 78 lwz r3,120(r3) ffc1b4e0: 48 00 09 e9 bl ffc1bec8 <_Chain_Append> <== ALWAYS TAKEN } } ffc1b4e4: 80 01 00 14 lwz r0,20(r1) ffc1b4e8: 83 e1 00 0c lwz r31,12(r1) ffc1b4ec: 38 21 00 10 addi r1,r1,16 ffc1b4f0: 7c 08 03 a6 mtlr r0 ffc1b4f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b4f8: 3d 60 00 00 lis r11,0 ffc1b4fc: 81 4b 28 24 lwz r10,10276(r11) ffc1b500: 38 0a 00 01 addi r0,r10,1 ffc1b504: 90 0b 28 24 stw r0,10276(r11) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1b508: 80 04 00 38 lwz r0,56(r4) ffc1b50c: 2f 80 00 01 cmpwi cr7,r0,1 ffc1b510: 41 9e 00 ac beq- cr7,ffc1b5bc <_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 ) { ffc1b514: 2f 80 00 03 cmpwi cr7,r0,3 ffc1b518: 41 9e 00 1c beq- cr7,ffc1b534 <_Timer_server_Schedule_operation_method+0x7c> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1b51c: 48 00 36 1d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN * 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 ); } } ffc1b520: 80 01 00 14 lwz r0,20(r1) ffc1b524: 83 e1 00 0c lwz r31,12(r1) ffc1b528: 38 21 00 10 addi r1,r1,16 ffc1b52c: 7c 08 03 a6 mtlr r0 ffc1b530: 4e 80 00 20 blr <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1b534: 7c c0 00 a6 mfmsr r6 ffc1b538: 7c 10 42 a6 mfsprg r0,0 ffc1b53c: 7c c0 00 78 andc r0,r6,r0 ffc1b540: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1b544: 81 63 00 68 lwz r11,104(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc1b548: 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(); ffc1b54c: 3d 40 00 00 lis r10,0 ffc1b550: 7f 8b 00 00 cmpw cr7,r11,r0 ffc1b554: 80 0a 28 44 lwz r0,10308(r10) last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1b558: 81 43 00 74 lwz r10,116(r3) ffc1b55c: 41 9e 00 30 beq- cr7,ffc1b58c <_Timer_server_Schedule_operation_method+0xd4> 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 ) { ffc1b560: 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; ffc1b564: 80 eb 00 10 lwz r7,16(r11) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1b568: 7d 07 52 14 add r8,r7,r10 delta_interval += delta; ffc1b56c: 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 ) { ffc1b570: 40 9d 00 18 ble- cr7,ffc1b588 <_Timer_server_Schedule_operation_method+0xd0> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1b574: 7d 4a 00 50 subf r10,r10,r0 if (delta_interval > delta) { ffc1b578: 7c a7 50 10 subfc r5,r7,r10 ffc1b57c: 7c a5 29 10 subfe r5,r5,r5 delta_interval -= delta; ffc1b580: 7d 0a 38 50 subf r8,r10,r7 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1b584: 7d 08 28 38 and r8,r8,r5 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc1b588: 91 0b 00 10 stw r8,16(r11) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1b58c: 90 1f 00 74 stw r0,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1b590: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1b594: 38 89 00 10 addi r4,r9,16 ffc1b598: 38 7f 00 68 addi r3,r31,104 ffc1b59c: 48 00 50 ed bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN if ( !ts->active ) { ffc1b5a0: 88 1f 00 7c lbz r0,124(r31) ffc1b5a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b5a8: 40 9e ff 74 bne+ cr7,ffc1b51c <_Timer_server_Schedule_operation_method+0x64> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1b5ac: 7f e3 fb 78 mr r3,r31 ffc1b5b0: 4b ff fc 1d bl ffc1b1cc <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN } } _Thread_Enable_dispatch(); ffc1b5b4: 48 00 35 85 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1b5b8: 4b ff ff 68 b ffc1b520 <_Timer_server_Schedule_operation_method+0x68> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1b5bc: 7c e0 00 a6 mfmsr r7 ffc1b5c0: 7c 10 42 a6 mfsprg r0,0 ffc1b5c4: 7c e0 00 78 andc r0,r7,r0 ffc1b5c8: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1b5cc: 81 63 00 30 lwz r11,48(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc1b5d0: 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; ffc1b5d4: 3d 40 00 00 lis r10,0 ffc1b5d8: 7f 8b 00 00 cmpw cr7,r11,r0 ffc1b5dc: 81 4a 28 7c lwz r10,10364(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1b5e0: 80 03 00 3c lwz r0,60(r3) ffc1b5e4: 41 9e 00 20 beq- cr7,ffc1b604 <_Timer_server_Schedule_operation_method+0x14c> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1b5e8: 81 0b 00 10 lwz r8,16(r11) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc1b5ec: 7c 00 50 50 subf r0,r0,r10 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc1b5f0: 7c c8 00 10 subfc r6,r8,r0 ffc1b5f4: 7c c6 31 10 subfe r6,r6,r6 delta_interval -= delta; ffc1b5f8: 7c 00 40 50 subf r0,r0,r8 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc1b5fc: 7c 00 30 38 and r0,r0,r6 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1b600: 90 0b 00 10 stw r0,16(r11) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1b604: 91 5f 00 3c stw r10,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1b608: 7c e0 01 24 mtmsr r7 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1b60c: 38 89 00 10 addi r4,r9,16 ffc1b610: 38 7f 00 30 addi r3,r31,48 ffc1b614: 48 00 50 75 bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN if ( !ts->active ) { ffc1b618: 88 1f 00 7c lbz r0,124(r31) ffc1b61c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b620: 40 9e fe fc bne+ cr7,ffc1b51c <_Timer_server_Schedule_operation_method+0x64> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1b624: 7f e3 fb 78 mr r3,r31 ffc1b628: 4b ff fb 11 bl ffc1b138 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1b62c: 48 00 35 0d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1b630: 4b ff fe f0 b ffc1b520 <_Timer_server_Schedule_operation_method+0x68> <== ALWAYS TAKEN ffc0c0d0 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0c0d0: 80 03 00 04 lwz r0,4(r3) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { ffc0c0d4: 7c 69 1b 78 mr r9,r3 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0c0d8: 81 04 00 04 lwz r8,4(r4) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; ffc0c0dc: 80 64 00 00 lwz r3,0(r4) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0c0e0: 7d 08 02 14 add r8,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0c0e4: 81 49 00 00 lwz r10,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0c0e8: 3c 00 3b 9a lis r0,15258 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0c0ec: 91 09 00 04 stw r8,4(r9) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0c0f0: 60 00 c9 ff ori r0,r0,51711 <== ALWAYS TAKEN ffc0c0f4: 7f 88 00 40 cmplw cr7,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0c0f8: 7d 4a 1a 14 add r10,r10,r3 time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0c0fc: 7d 0b 43 78 mr r11,r8 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0c100: 91 49 00 00 stw r10,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0c104: 4c 9d 00 20 blelr cr7 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0c108: 3d 6b c4 65 addis r11,r11,-15259 ffc0c10c: 39 6b 36 00 addi r11,r11,13824 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0c110: 7f 8b 00 40 cmplw cr7,r11,r0 * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( ffc0c114: 39 4a 00 01 addi r10,r10,1 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; ffc0c118: 38 63 00 01 addi r3,r3,1 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0c11c: 41 9d ff ec bgt+ cr7,ffc0c108 <_Timespec_Add_to+0x38> <== NEVER TAKEN ffc0c120: 91 49 00 00 stw r10,0(r9) ffc0c124: 91 69 00 04 stw r11,4(r9) time->tv_sec++; seconds++; } return seconds; } ffc0c128: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e594 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0e594: 94 21 ff e8 stwu r1,-24(r1) ffc0e598: 7c 08 02 a6 mflr r0 ffc0e59c: 90 01 00 1c stw r0,28(r1) * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0e5a0: 3c 00 3b 9a lis r0,15258 ffc0e5a4: 60 00 ca 00 ori r0,r0,51712 ffc0e5a8: 81 04 00 00 lwz r8,0(r4) right += rhs->tv_nsec; ffc0e5ac: 81 44 00 04 lwz r10,4(r4) * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0e5b0: 7d 60 40 96 mulhw r11,r0,r8 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0e5b4: 93 c1 00 10 stw r30,16(r1) * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0e5b8: 7d 80 41 d6 mullw r12,r0,r8 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0e5bc: 93 e1 00 14 stw r31,20(r1) * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; ffc0e5c0: 7d 49 fe 70 srawi r9,r10,31 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0e5c4: 93 81 00 08 stw r28,8(r1) * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; ffc0e5c8: 7d 0c 50 14 addc r8,r12,r10 ffc0e5cc: 7c eb 49 14 adde r7,r11,r9 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0e5d0: 93 a1 00 0c stw r29,12(r1) left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { ffc0e5d4: 7c eb 43 79 or. r11,r7,r8 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; ffc0e5d8: 81 23 00 04 lwz r9,4(r3) const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0e5dc: 7c be 2b 78 mr r30,r5 ffc0e5e0: 7c df 33 78 mr r31,r6 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0e5e4: 81 43 00 00 lwz r10,0(r3) left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { ffc0e5e8: 41 82 00 90 beq- ffc0e678 <_Timespec_Divide+0xe4> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0e5ec: 7c aa 00 96 mulhw r5,r10,r0 ffc0e5f0: 7c ca 01 d6 mullw r6,r10,r0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; ffc0e5f4: 7d 2c 4b 78 mr r12,r9 ffc0e5f8: 7d 2b fe 70 srawi r11,r9,31 ffc0e5fc: 3c 00 00 01 lis r0,1 ffc0e600: 7d 46 60 14 addc r10,r6,r12 ffc0e604: 7d 25 59 14 adde r9,r5,r11 ffc0e608: 60 00 86 a0 ori r0,r0,34464 ffc0e60c: 7c 60 50 16 mulhwu r3,r0,r10 ffc0e610: 7c 80 51 d6 mullw r4,r0,r10 ffc0e614: 7c 00 49 d6 mullw r0,r0,r9 ffc0e618: 7c e5 3b 78 mr r5,r7 ffc0e61c: 7d 06 43 78 mr r6,r8 ffc0e620: 7c 60 1a 14 add r3,r0,r3 ffc0e624: 48 01 2b 65 bl ffc21188 <__udivdi3> <== ALWAYS TAKEN *ival_percentage = answer / 1000; ffc0e628: 38 a0 00 00 li r5,0 ffc0e62c: 38 c0 03 e8 li r6,1000 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; ffc0e630: 7c 7c 1b 78 mr r28,r3 ffc0e634: 7c 9d 23 78 mr r29,r4 *ival_percentage = answer / 1000; ffc0e638: 48 01 2b 51 bl ffc21188 <__udivdi3> <== ALWAYS TAKEN ffc0e63c: 90 9e 00 00 stw r4,0(r30) *fval_percentage = answer % 1000; ffc0e640: 7f 83 e3 78 mr r3,r28 ffc0e644: 7f a4 eb 78 mr r4,r29 ffc0e648: 38 a0 00 00 li r5,0 ffc0e64c: 38 c0 03 e8 li r6,1000 ffc0e650: 48 01 2f 15 bl ffc21564 <__umoddi3> <== ALWAYS TAKEN } ffc0e654: 80 01 00 1c lwz r0,28(r1) */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; ffc0e658: 90 9f 00 00 stw r4,0(r31) } ffc0e65c: 7c 08 03 a6 mtlr r0 ffc0e660: 83 81 00 08 lwz r28,8(r1) ffc0e664: 83 a1 00 0c lwz r29,12(r1) ffc0e668: 83 c1 00 10 lwz r30,16(r1) ffc0e66c: 83 e1 00 14 lwz r31,20(r1) ffc0e670: 38 21 00 18 addi r1,r1,24 ffc0e674: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e678: 80 01 00 1c lwz r0,28(r1) left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; ffc0e67c: 91 65 00 00 stw r11,0(r5) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } ffc0e680: 7c 08 03 a6 mtlr r0 ffc0e684: 83 81 00 08 lwz r28,8(r1) ffc0e688: 83 a1 00 0c lwz r29,12(r1) ffc0e68c: 83 c1 00 10 lwz r30,16(r1) ffc0e690: 83 e1 00 14 lwz r31,20(r1) ffc0e694: 38 21 00 18 addi r1,r1,24 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; *fval_percentage = 0; ffc0e698: 91 66 00 00 stw r11,0(r6) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } ffc0e69c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc33954 <_Timespec_Divide_by_integer>: void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc33954: 94 21 ff e8 stwu r1,-24(r1) ffc33958: 7c 08 02 a6 mflr r0 ffc3395c: 7c 86 23 78 mr r6,r4 ffc33960: 90 01 00 1c stw r0,28(r1) /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc33964: 3c 00 3b 9a lis r0,15258 ffc33968: 60 00 ca 00 ori r0,r0,51712 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; ffc3396c: 81 23 00 00 lwz r9,0(r3) void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc33970: 93 e1 00 14 stw r31,20(r1) ffc33974: 7c bf 2b 78 mr r31,r5 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; ffc33978: 7d 2a fe 70 srawi r10,r9,31 t *= TOD_NANOSECONDS_PER_SECOND; ffc3397c: 7d 80 49 d6 mullw r12,r0,r9 void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc33980: 93 a1 00 0c stw r29,12(r1) /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc33984: 7d 60 48 16 mulhwu r11,r0,r9 void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc33988: 93 c1 00 10 stw r30,16(r1) /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc3398c: 7c 00 51 d6 mullw r0,r0,r10 t += time->tv_nsec; ffc33990: 81 43 00 04 lwz r10,4(r3) ffc33994: 7d 49 fe 70 srawi r9,r10,31 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc33998: 7d 60 5a 14 add r11,r0,r11 /* * Divide to get nanoseconds per iteration */ t /= iterations; ffc3399c: 7c 8c 50 14 addc r4,r12,r10 ffc339a0: 7c 6b 49 14 adde r3,r11,r9 ffc339a4: 38 a0 00 00 li r5,0 ffc339a8: 48 03 31 65 bl ffc66b0c <__udivdi3> <== ALWAYS TAKEN /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; ffc339ac: 3c c0 3b 9a lis r6,15258 ffc339b0: 38 a0 00 00 li r5,0 ffc339b4: 60 c6 ca 00 ori r6,r6,51712 /* * Divide to get nanoseconds per iteration */ t /= iterations; ffc339b8: 7c 7d 1b 78 mr r29,r3 ffc339bc: 7c 9e 23 78 mr r30,r4 /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; ffc339c0: 48 03 31 4d bl ffc66b0c <__udivdi3> <== ALWAYS TAKEN ffc339c4: 90 9f 00 00 stw r4,0(r31) result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; ffc339c8: 3c c0 3b 9a lis r6,15258 ffc339cc: 7f a3 eb 78 mr r3,r29 ffc339d0: 7f c4 f3 78 mr r4,r30 ffc339d4: 38 a0 00 00 li r5,0 ffc339d8: 60 c6 ca 00 ori r6,r6,51712 ffc339dc: 48 03 35 0d bl ffc66ee8 <__umoddi3> <== ALWAYS TAKEN } ffc339e0: 80 01 00 1c lwz r0,28(r1) /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; ffc339e4: 90 9f 00 04 stw r4,4(r31) } ffc339e8: 7c 08 03 a6 mtlr r0 ffc339ec: 83 a1 00 0c lwz r29,12(r1) ffc339f0: 83 c1 00 10 lwz r30,16(r1) ffc339f4: 83 e1 00 14 lwz r31,20(r1) ffc339f8: 38 21 00 18 addi r1,r1,24 ffc339fc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d3ac <_Timespec_From_ticks>: struct timespec *time ) { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); ffc2d3ac: 3d 20 00 00 lis r9,0 ffc2d3b0: 80 09 20 ac lwz r0,8364(r9) ffc2d3b4: 7c 63 01 d6 mullw r3,r3,r0 time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; ffc2d3b8: 3c 00 43 1b lis r0,17179 ffc2d3bc: 60 00 de 83 ori r0,r0,56963 ffc2d3c0: 7c 03 00 16 mulhwu r0,r3,r0 ffc2d3c4: 54 00 74 be rlwinm r0,r0,14,18,31 time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * ffc2d3c8: 54 0b 40 2e rlwinm r11,r0,8,0,23 { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; ffc2d3cc: 90 04 00 00 stw r0,0(r4) time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * ffc2d3d0: 54 09 18 38 rlwinm r9,r0,3,0,28 ffc2d3d4: 7d 29 58 50 subf r9,r9,r11 ffc2d3d8: 55 2b 30 32 rlwinm r11,r9,6,0,25 ffc2d3dc: 7d 29 58 50 subf r9,r9,r11 ffc2d3e0: 7d 29 02 14 add r9,r9,r0 ffc2d3e4: 55 29 30 32 rlwinm r9,r9,6,0,25 ffc2d3e8: 7c 69 18 50 subf r3,r9,r3 ffc2d3ec: 1c 63 03 e8 mulli r3,r3,1000 ffc2d3f0: 90 64 00 04 stw r3,4(r4) TOD_NANOSECONDS_PER_MICROSECOND; } ffc2d3f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc47110 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) ffc47110: 81 63 00 00 lwz r11,0(r3) <== ALWAYS TAKEN bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { ffc47114: 7c 69 1b 78 mr r9,r3 if ( lhs->tv_sec > rhs->tv_sec ) ffc47118: 80 04 00 00 lwz r0,0(r4) ffc4711c: 38 60 00 01 li r3,1 ffc47120: 7f 8b 00 00 cmpw cr7,r11,r0 ffc47124: 4d 9d 00 20 bgtlr cr7 <== NEVER TAKEN return true; if ( lhs->tv_sec < rhs->tv_sec ) ffc47128: 41 9c 00 1c blt- cr7,ffc47144 <_Timespec_Greater_than+0x34> #include #include #include bool _Timespec_Greater_than( ffc4712c: 81 29 00 04 lwz r9,4(r9) ffc47130: 80 04 00 04 lwz r0,4(r4) ffc47134: 7f 89 00 00 cmpw cr7,r9,r0 ffc47138: 7c 60 00 26 mfcr r3 ffc4713c: 54 63 f7 fe rlwinm r3,r3,30,31,31 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } ffc47140: 4e 80 00 20 blr <== ALWAYS TAKEN ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) ffc47144: 38 60 00 00 li r3,0 ffc47148: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d3f8 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) ffc2d3f8: 2c 03 00 00 cmpwi r3,0 ffc2d3fc: 41 82 00 30 beq- ffc2d42c <_Timespec_Is_valid+0x34> return false; if ( time->tv_sec < 0 ) ffc2d400: 80 03 00 00 lwz r0,0(r3) ffc2d404: 2f 80 00 00 cmpwi cr7,r0,0 ffc2d408: 41 9c 00 24 blt- cr7,ffc2d42c <_Timespec_Is_valid+0x34> return false; if ( time->tv_nsec < 0 ) ffc2d40c: 80 03 00 04 lwz r0,4(r3) #include #include #include bool _Timespec_Is_valid( ffc2d410: 3c 60 3b 9a lis r3,15258 ffc2d414: 60 63 c9 ff ori r3,r3,51711 return false; if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) ffc2d418: 2f 80 00 00 cmpwi cr7,r0,0 #include #include #include bool _Timespec_Is_valid( ffc2d41c: 7c 60 18 10 subfc r3,r0,r3 ffc2d420: 38 60 00 00 li r3,0 ffc2d424: 7c 63 19 14 adde r3,r3,r3 return false; if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) ffc2d428: 4c bc 00 20 bgelr+ cr7 #include #include #include bool _Timespec_Is_valid( ffc2d42c: 38 60 00 00 li r3,0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } ffc2d430: 4e 80 00 20 blr <== ALWAYS TAKEN ffc4714c <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) ffc4714c: 81 63 00 00 lwz r11,0(r3) bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { ffc47150: 7c 69 1b 78 mr r9,r3 if ( lhs->tv_sec < rhs->tv_sec ) ffc47154: 80 04 00 00 lwz r0,0(r4) ffc47158: 38 60 00 01 li r3,1 ffc4715c: 7f 8b 00 00 cmpw cr7,r11,r0 ffc47160: 4d 9c 00 20 bltlr cr7 return true; if ( lhs->tv_sec > rhs->tv_sec ) ffc47164: 41 9d 00 1c bgt- cr7,ffc47180 <_Timespec_Less_than+0x34> <== NEVER TAKEN #include #include #include bool _Timespec_Less_than( ffc47168: 81 29 00 04 lwz r9,4(r9) ffc4716c: 80 04 00 04 lwz r0,4(r4) ffc47170: 7f 89 00 00 cmpw cr7,r9,r0 ffc47174: 7c 60 00 26 mfcr r3 ffc47178: 54 63 ef fe rlwinm r3,r3,29,31,31 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } ffc4717c: 4e 80 00 20 blr <== ALWAYS TAKEN ) { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) ffc47180: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc47184: 4e 80 00 20 blr <== NOT EXECUTED ffc0c12c <_Timespec_Subtract>: const struct timespec *end, struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { ffc0c12c: 81 24 00 04 lwz r9,4(r4) <== ALWAYS TAKEN ffc0c130: 80 03 00 04 lwz r0,4(r3) ffc0c134: 7f 89 00 00 cmpw cr7,r9,r0 ffc0c138: 41 9c 00 20 blt- cr7,ffc0c158 <_Timespec_Subtract+0x2c> result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; ffc0c13c: 81 44 00 00 lwz r10,0(r4) result->tv_nsec = end->tv_nsec - start->tv_nsec; ffc0c140: 7c 00 48 50 subf r0,r0,r9 if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; ffc0c144: 81 63 00 00 lwz r11,0(r3) result->tv_nsec = end->tv_nsec - start->tv_nsec; ffc0c148: 90 05 00 04 stw r0,4(r5) if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; ffc0c14c: 7d 6b 50 50 subf r11,r11,r10 ffc0c150: 91 65 00 00 stw r11,0(r5) ffc0c154: 4e 80 00 20 blr <== ALWAYS TAKEN struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; ffc0c158: 81 64 00 00 lwz r11,0(r4) result->tv_nsec = ffc0c15c: 3d 29 3b 9b addis r9,r9,15259 struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; ffc0c160: 81 43 00 00 lwz r10,0(r3) result->tv_nsec = ffc0c164: 39 29 ca 00 addi r9,r9,-13824 struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; ffc0c168: 39 6b ff ff addi r11,r11,-1 ffc0c16c: 7d 6a 58 50 subf r11,r10,r11 result->tv_nsec = ffc0c170: 7c 00 48 50 subf r0,r0,r9 struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; ffc0c174: 91 65 00 00 stw r11,0(r5) result->tv_nsec = ffc0c178: 90 05 00 04 stw r0,4(r5) ffc0c17c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d434 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { ffc2d434: 94 21 ff f0 stwu r1,-16(r1) ffc2d438: 7c 08 02 a6 mflr r0 ffc2d43c: 90 01 00 14 stw r0,20(r1) ffc2d440: 93 c1 00 08 stw r30,8(r1) uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) ffc2d444: 83 c3 00 00 lwz r30,0(r3) */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { ffc2d448: 93 e1 00 0c stw r31,12(r1) ffc2d44c: 7c 7f 1b 78 mr r31,r3 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) ffc2d450: 2f 9e 00 00 cmpwi cr7,r30,0 ffc2d454: 40 9e 00 14 bne- cr7,ffc2d468 <_Timespec_To_ticks+0x34> ffc2d458: 80 03 00 04 lwz r0,4(r3) ffc2d45c: 38 60 00 00 li r3,0 ffc2d460: 2f 80 00 00 cmpwi cr7,r0,0 ffc2d464: 41 9e 00 28 beq- cr7,ffc2d48c <_Timespec_To_ticks+0x58> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ffc2d468: 48 00 01 45 bl ffc2d5ac <== ALWAYS TAKEN ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); ffc2d46c: 3d 20 00 00 lis r9,0 ffc2d470: 80 09 20 ac lwz r0,8364(r9) uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ffc2d474: 7c 63 f1 d6 mullw r3,r3,r30 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); ffc2d478: 81 3f 00 04 lwz r9,4(r31) ffc2d47c: 1c 00 03 e8 mulli r0,r0,1000 ffc2d480: 7c 09 03 96 divwu r0,r9,r0 if (ticks) ffc2d484: 7c 63 02 15 add. r3,r3,r0 ffc2d488: 41 82 00 1c beq- ffc2d4a4 <_Timespec_To_ticks+0x70> return ticks; return 1; } ffc2d48c: 80 01 00 14 lwz r0,20(r1) ffc2d490: 83 c1 00 08 lwz r30,8(r1) ffc2d494: 7c 08 03 a6 mtlr r0 ffc2d498: 83 e1 00 0c lwz r31,12(r1) ffc2d49c: 38 21 00 10 addi r1,r1,16 ffc2d4a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d4a4: 80 01 00 14 lwz r0,20(r1) ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) ffc2d4a8: 38 60 00 01 li r3,1 return ticks; return 1; } ffc2d4ac: 83 c1 00 08 lwz r30,8(r1) ffc2d4b0: 7c 08 03 a6 mtlr r0 ffc2d4b4: 83 e1 00 0c lwz r31,12(r1) ffc2d4b8: 38 21 00 10 addi r1,r1,16 ffc2d4bc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f770 <_User_extensions_Add_set>: #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { ffc0f770: 94 21 ff f0 stwu r1,-16(r1) ffc0f774: 7c 08 02 a6 mflr r0 ffc0f778: 93 e1 00 0c stw r31,12(r1) ffc0f77c: 7c 7f 1b 78 mr r31,r3 _Chain_Append( &_User_extensions_List, &the_extension->Node ); ffc0f780: 3c 60 00 00 lis r3,0 <== ALWAYS TAKEN ffc0f784: 38 63 2d 80 addi r3,r3,11648 #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { ffc0f788: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN _Chain_Append( &_User_extensions_List, &the_extension->Node ); ffc0f78c: 7f e4 fb 78 mr r4,r31 ffc0f790: 4b ff 9b 79 bl ffc09308 <_Chain_Append> <== ALWAYS TAKEN /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { ffc0f794: 80 1f 00 24 lwz r0,36(r31) ffc0f798: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f79c: 41 9e 00 18 beq- cr7,ffc0f7b4 <_User_extensions_Add_set+0x44> the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append( ffc0f7a0: 3c 60 00 00 lis r3,0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { the_extension->Switch.thread_switch = ffc0f7a4: 90 1f 00 10 stw r0,16(r31) the_extension->Callouts.thread_switch; _Chain_Append( ffc0f7a8: 38 63 2b f4 addi r3,r3,11252 ffc0f7ac: 38 9f 00 08 addi r4,r31,8 ffc0f7b0: 4b ff 9b 59 bl ffc09308 <_Chain_Append> <== ALWAYS TAKEN &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } ffc0f7b4: 80 01 00 14 lwz r0,20(r1) ffc0f7b8: 83 e1 00 0c lwz r31,12(r1) ffc0f7bc: 38 21 00 10 addi r1,r1,16 ffc0f7c0: 7c 08 03 a6 mtlr r0 ffc0f7c4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c374 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0c374: 94 21 ff e0 stwu r1,-32(r1) ffc0c378: 7c 08 02 a6 mflr r0 ffc0c37c: 93 c1 00 18 stw r30,24(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c380: 3f c0 00 00 lis r30,0 ffc0c384: 3b de 2d 80 addi r30,r30,11648 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0c388: 93 e1 00 1c stw r31,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c38c: 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 ) { ffc0c390: 93 61 00 0c stw r27,12(r1) ffc0c394: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c398: 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 ) { ffc0c39c: 93 81 00 10 stw r28,16(r1) ffc0c3a0: 7c 9c 23 78 mr r28,r4 ffc0c3a4: 93 a1 00 14 stw r29,20(r1) ffc0c3a8: 7c bd 2b 78 mr r29,r5 ffc0c3ac: 90 01 00 24 stw r0,36(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c3b0: 41 9e 00 30 beq- cr7,ffc0c3e0 <_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 ) ffc0c3b4: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0c3b8: 7f 63 db 78 mr r3,r27 ffc0c3bc: 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 ) ffc0c3c0: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0c3c4: 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 ) ffc0c3c8: 41 9e 00 0c beq- cr7,ffc0c3d4 <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0c3cc: 7c 09 03 a6 mtctr r0 ffc0c3d0: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0c3d4: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c3d8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c3dc: 40 9e ff d8 bne+ cr7,ffc0c3b4 <_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 ); } } ffc0c3e0: 80 01 00 24 lwz r0,36(r1) ffc0c3e4: 83 61 00 0c lwz r27,12(r1) ffc0c3e8: 7c 08 03 a6 mtlr r0 ffc0c3ec: 83 81 00 10 lwz r28,16(r1) ffc0c3f0: 83 a1 00 14 lwz r29,20(r1) ffc0c3f4: 83 c1 00 18 lwz r30,24(r1) ffc0c3f8: 83 e1 00 1c lwz r31,28(r1) ffc0c3fc: 38 21 00 20 addi r1,r1,32 ffc0c400: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c180 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c180: 94 21 ff e8 stwu r1,-24(r1) ffc0c184: 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; ffc0c188: 3d 40 00 00 lis r10,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c18c: 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; ffc0c190: 39 4a 20 a0 addi r10,r10,8352 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0c194: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c198: 93 a1 00 0c stw r29,12(r1) ffc0c19c: 3d 00 00 00 lis r8,0 ffc0c1a0: 39 27 2d 80 addi r9,r7,11648 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; ffc0c1a4: 83 aa 00 3c lwz r29,60(r10) ffc0c1a8: 39 68 2b f4 addi r11,r8,11252 the_chain->permanent_null = NULL; ffc0c1ac: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c1b0: 93 c1 00 10 stw r30,16(r1) <== ALWAYS TAKEN initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0c1b4: 2f 9d 00 00 cmpwi cr7,r29,0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0c1b8: 38 a9 00 04 addi r5,r9,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c1bc: 93 81 00 08 stw r28,8(r1) ffc0c1c0: 38 cb 00 04 addi r6,r11,4 ffc0c1c4: 93 e1 00 14 stw r31,20(r1) ffc0c1c8: 90 a7 2d 80 stw r5,11648(r7) ffc0c1cc: 90 c8 2b f4 stw r6,11252(r8) <== ALWAYS TAKEN the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0c1d0: 91 29 00 08 stw r9,8(r9) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0c1d4: 90 0b 00 04 stw r0,4(r11) the_chain->last = _Chain_Head(the_chain); ffc0c1d8: 91 6b 00 08 stw r11,8(r11) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0c1dc: 90 09 00 04 stw r0,4(r9) 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; ffc0c1e0: 83 ca 00 38 lwz r30,56(r10) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0c1e4: 41 9e 00 8c beq- cr7,ffc0c270 <_User_extensions_Handler_initialization+0xf0> extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0c1e8: 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 *) ffc0c1ec: 7f 83 e3 78 mr r3,r28 ffc0c1f0: 48 00 07 a1 bl ffc0c990 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0c1f4: 7f 85 e3 78 mr r5,r28 ffc0c1f8: 38 80 00 00 li r4,0 <== ALWAYS TAKEN _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0c1fc: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0c200: 48 00 64 d5 bl ffc126d4 <== ALWAYS TAKEN extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0c204: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0c208: 41 9e 00 68 beq- cr7,ffc0c270 <_User_extensions_Handler_initialization+0xf0> <== NEVER TAKEN ffc0c20c: 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; ffc0c210: 7f a9 eb 78 mr r9,r29 ffc0c214: 57 80 28 34 rlwinm r0,r28,5,0,26 <== ALWAYS TAKEN ffc0c218: 7d 09 00 6e lwzux r8,r9,r0 <== ALWAYS TAKEN _User_extensions_Add_set( extension ); ffc0c21c: 7f e3 fb 78 mr r3,r31 ffc0c220: 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; ffc0c224: 81 49 00 04 lwz r10,4(r9) ffc0c228: 81 69 00 08 lwz r11,8(r9) ffc0c22c: 80 09 00 0c lwz r0,12(r9) <== ALWAYS TAKEN ffc0c230: 91 1f 00 14 stw r8,20(r31) <== ALWAYS TAKEN ffc0c234: 91 5f 00 18 stw r10,24(r31) ffc0c238: 91 7f 00 1c stw r11,28(r31) ffc0c23c: 90 1f 00 20 stw r0,32(r31) ffc0c240: 80 09 00 1c lwz r0,28(r9) ffc0c244: 81 49 00 10 lwz r10,16(r9) ffc0c248: 81 69 00 14 lwz r11,20(r9) ffc0c24c: 81 29 00 18 lwz r9,24(r9) <== ALWAYS TAKEN ffc0c250: 91 5f 00 24 stw r10,36(r31) ffc0c254: 91 7f 00 28 stw r11,40(r31) ffc0c258: 91 3f 00 2c stw r9,44(r31) ffc0c25c: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0c260: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0c264: 48 00 35 0d bl ffc0f770 <_User_extensions_Add_set> <== ALWAYS TAKEN extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0c268: 7f 9e e0 40 cmplw cr7,r30,r28 <== ALWAYS TAKEN ffc0c26c: 41 9d ff a4 bgt+ cr7,ffc0c210 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0c270: 80 01 00 1c lwz r0,28(r1) <== ALWAYS TAKEN ffc0c274: 83 81 00 08 lwz r28,8(r1) ffc0c278: 7c 08 03 a6 mtlr r0 ffc0c27c: 83 a1 00 0c lwz r29,12(r1) ffc0c280: 83 c1 00 10 lwz r30,16(r1) ffc0c284: 83 e1 00 14 lwz r31,20(r1) ffc0c288: 38 21 00 18 addi r1,r1,24 ffc0c28c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc12b2c <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { ffc12b2c: 94 21 ff f0 stwu r1,-16(r1) ffc12b30: 7c 08 02 a6 mflr r0 ffc12b34: 93 e1 00 0c stw r31,12(r1) ffc12b38: 7c 7f 1b 78 mr r31,r3 ffc12b3c: 90 01 00 14 stw r0,20(r1) _Chain_Extract( &the_extension->Node ); ffc12b40: 48 00 64 2d bl ffc18f6c <_Chain_Extract> <== ALWAYS TAKEN /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) ffc12b44: 80 1f 00 24 lwz r0,36(r31) ffc12b48: 2f 80 00 00 cmpwi cr7,r0,0 ffc12b4c: 41 9e 00 0c beq- cr7,ffc12b58 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); ffc12b50: 38 7f 00 08 addi r3,r31,8 ffc12b54: 48 00 64 19 bl ffc18f6c <_Chain_Extract> <== ALWAYS TAKEN } ffc12b58: 80 01 00 14 lwz r0,20(r1) ffc12b5c: 83 e1 00 0c lwz r31,12(r1) ffc12b60: 38 21 00 10 addi r1,r1,16 ffc12b64: 7c 08 03 a6 mtlr r0 ffc12b68: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c290 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c290: 94 21 ff e8 stwu r1,-24(r1) ffc0c294: 7c 08 02 a6 mflr r0 ffc0c298: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c29c: 3f c0 00 00 lis r30,0 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c2a0: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c2a4: 83 fe 2d 80 lwz r31,11648(r30) ffc0c2a8: 3b de 2d 80 addi r30,r30,11648 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0c2ac: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c2b0: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c2b4: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c2b8: 90 01 00 1c stw r0,28(r1) ffc0c2bc: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c2c0: 41 9e 00 28 beq- cr7,ffc0c2e8 <_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 ) ffc0c2c4: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0c2c8: 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 ) ffc0c2cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c2d0: 41 9e 00 0c beq- cr7,ffc0c2dc <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0c2d4: 7c 09 03 a6 mtctr r0 ffc0c2d8: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0c2dc: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c2e0: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c2e4: 40 9e ff e0 bne+ cr7,ffc0c2c4 <_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 ); } } ffc0c2e8: 80 01 00 1c lwz r0,28(r1) ffc0c2ec: 83 a1 00 0c lwz r29,12(r1) ffc0c2f0: 7c 08 03 a6 mtlr r0 ffc0c2f4: 83 c1 00 10 lwz r30,16(r1) ffc0c2f8: 83 e1 00 14 lwz r31,20(r1) ffc0c2fc: 38 21 00 18 addi r1,r1,24 ffc0c300: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c404 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c404: 94 21 ff e8 stwu r1,-24(r1) ffc0c408: 7c 08 02 a6 mflr r0 ffc0c40c: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c410: 3f c0 00 00 lis r30,0 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c414: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c418: 83 fe 2d 80 lwz r31,11648(r30) ffc0c41c: 3b de 2d 80 addi r30,r30,11648 ffc0c420: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c424: 93 a1 00 0c stw r29,12(r1) <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c428: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c42c: 90 01 00 1c stw r0,28(r1) ffc0c430: 7c 7d 1b 78 mr r29,r3 ffc0c434: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c438: 41 9e 00 3c beq- cr7,ffc0c474 <_User_extensions_Thread_create+0x70> <== 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)( ffc0c43c: 3f 80 00 00 lis r28,0 ffc0c440: 3b 9c 27 6c addi r28,r28,10092 !_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 ) { ffc0c444: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0c448: 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 ) { ffc0c44c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c450: 41 9e 00 18 beq- cr7,ffc0c468 <_User_extensions_Thread_create+0x64> status = (*the_extension->Callouts.thread_create)( ffc0c454: 80 7c 00 00 lwz r3,0(r28) ffc0c458: 7c 09 03 a6 mtctr r0 ffc0c45c: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Thread_Executing, the_thread ); if ( !status ) ffc0c460: 2f 83 00 00 cmpwi cr7,r3,0 <== ALWAYS TAKEN ffc0c464: 41 9e 00 14 beq- cr7,ffc0c478 <_User_extensions_Thread_create+0x74> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0c468: 83 ff 00 00 lwz r31,0(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c46c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c470: 40 9e ff d4 bne+ cr7,ffc0c444 <_User_extensions_Thread_create+0x40> ffc0c474: 38 60 00 01 li r3,1 return false; } } return true; } ffc0c478: 80 01 00 1c lwz r0,28(r1) ffc0c47c: 83 81 00 08 lwz r28,8(r1) <== ALWAYS TAKEN ffc0c480: 7c 08 03 a6 mtlr r0 ffc0c484: 83 a1 00 0c lwz r29,12(r1) ffc0c488: 83 c1 00 10 lwz r30,16(r1) ffc0c48c: 83 e1 00 14 lwz r31,20(r1) ffc0c490: 38 21 00 18 addi r1,r1,24 ffc0c494: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c498 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c498: 94 21 ff e8 stwu r1,-24(r1) ffc0c49c: 7c 08 02 a6 mflr r0 ffc0c4a0: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c4a4: 3f c0 00 00 lis r30,0 ffc0c4a8: 3b de 2d 80 addi r30,r30,11648 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c4ac: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c4b0: 83 fe 00 08 lwz r31,8(r30) <== ALWAYS TAKEN #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c4b4: 93 a1 00 0c stw r29,12(r1) ffc0c4b8: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c4bc: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c4c0: 90 01 00 1c stw r0,28(r1) ffc0c4c4: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c4c8: 41 9e 00 34 beq- cr7,ffc0c4fc <_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)( ffc0c4cc: 3f 80 00 00 lis r28,0 ffc0c4d0: 3b 9c 27 6c addi r28,r28,10092 !_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 ) ffc0c4d4: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0c4d8: 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 ) ffc0c4dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c4e0: 41 9e 00 10 beq- cr7,ffc0c4f0 <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0c4e4: 80 7c 00 00 lwz r3,0(r28) ffc0c4e8: 7c 09 03 a6 mtctr r0 ffc0c4ec: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0c4f0: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c4f4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c4f8: 40 9e ff dc bne+ cr7,ffc0c4d4 <_User_extensions_Thread_delete+0x3c> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0c4fc: 80 01 00 1c lwz r0,28(r1) <== ALWAYS TAKEN ffc0c500: 83 81 00 08 lwz r28,8(r1) ffc0c504: 7c 08 03 a6 mtlr r0 ffc0c508: 83 a1 00 0c lwz r29,12(r1) ffc0c50c: 83 c1 00 10 lwz r30,16(r1) ffc0c510: 83 e1 00 14 lwz r31,20(r1) ffc0c514: 38 21 00 18 addi r1,r1,24 ffc0c518: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c304 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c304: 94 21 ff e8 stwu r1,-24(r1) ffc0c308: 7c 08 02 a6 mflr r0 ffc0c30c: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c310: 3f c0 00 00 lis r30,0 ffc0c314: 3b de 2d 80 addi r30,r30,11648 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c318: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c31c: 83 fe 00 08 lwz r31,8(r30) } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c320: 93 a1 00 0c stw r29,12(r1) ffc0c324: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c328: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c32c: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c330: 41 9e 00 28 beq- cr7,ffc0c358 <_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 ) ffc0c334: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0c338: 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 ) ffc0c33c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c340: 41 9e 00 0c beq- cr7,ffc0c34c <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0c344: 7c 09 03 a6 mtctr r0 ffc0c348: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0c34c: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c350: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c354: 40 9e ff e0 bne+ cr7,ffc0c334 <_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 ); } } ffc0c358: 80 01 00 1c lwz r0,28(r1) ffc0c35c: 83 a1 00 0c lwz r29,12(r1) ffc0c360: 7c 08 03 a6 mtlr r0 ffc0c364: 83 c1 00 10 lwz r30,16(r1) ffc0c368: 83 e1 00 14 lwz r31,20(r1) ffc0c36c: 38 21 00 18 addi r1,r1,24 ffc0c370: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d60c <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d60c: 94 21 ff e8 stwu r1,-24(r1) ffc0d610: 7c 08 02 a6 mflr r0 ffc0d614: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d618: 3f c0 00 00 lis r30,0 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d61c: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d620: 83 fe 2d e0 lwz r31,11744(r30) ffc0d624: 3b de 2d e0 addi r30,r30,11744 ffc0d628: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d62c: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d630: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d634: 90 01 00 1c stw r0,28(r1) ffc0d638: 7c 7d 1b 78 mr r29,r3 ffc0d63c: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d640: 41 9e 00 34 beq- cr7,ffc0d674 <_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)( ffc0d644: 3f 80 00 00 lis r28,0 ffc0d648: 3b 9c 27 98 addi r28,r28,10136 !_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 ) ffc0d64c: 80 1f 00 1c lwz r0,28(r31) <== ALWAYS TAKEN (*the_extension->Callouts.thread_restart)( ffc0d650: 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 ) ffc0d654: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d658: 41 9e 00 10 beq- cr7,ffc0d668 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0d65c: 80 7c 00 00 lwz r3,0(r28) ffc0d660: 7c 09 03 a6 mtctr r0 ffc0d664: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d668: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d66c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d670: 40 9e ff dc bne+ cr7,ffc0d64c <_User_extensions_Thread_restart+0x40> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0d674: 80 01 00 1c lwz r0,28(r1) ffc0d678: 83 81 00 08 lwz r28,8(r1) ffc0d67c: 7c 08 03 a6 mtlr r0 ffc0d680: 83 a1 00 0c lwz r29,12(r1) ffc0d684: 83 c1 00 10 lwz r30,16(r1) ffc0d688: 83 e1 00 14 lwz r31,20(r1) ffc0d68c: 38 21 00 18 addi r1,r1,24 ffc0d690: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c51c <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c51c: 94 21 ff e8 stwu r1,-24(r1) ffc0c520: 7c 08 02 a6 mflr r0 ffc0c524: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c528: 3f c0 00 00 lis r30,0 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c52c: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c530: 83 fe 2d 80 lwz r31,11648(r30) <== ALWAYS TAKEN ffc0c534: 3b de 2d 80 addi r30,r30,11648 ffc0c538: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c53c: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c540: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c544: 90 01 00 1c stw r0,28(r1) <== ALWAYS TAKEN ffc0c548: 7c 7d 1b 78 mr r29,r3 ffc0c54c: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c550: 41 9e 00 34 beq- cr7,ffc0c584 <_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)( ffc0c554: 3f 80 00 00 lis r28,0 ffc0c558: 3b 9c 27 6c addi r28,r28,10092 !_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 ) ffc0c55c: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0c560: 7f a4 eb 78 mr r4,r29 <== ALWAYS 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_start != NULL ) ffc0c564: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c568: 41 9e 00 10 beq- cr7,ffc0c578 <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0c56c: 80 7c 00 00 lwz r3,0(r28) <== ALWAYS TAKEN ffc0c570: 7c 09 03 a6 mtctr r0 ffc0c574: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0c578: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c57c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c580: 40 9e ff dc bne+ cr7,ffc0c55c <_User_extensions_Thread_start+0x40> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0c584: 80 01 00 1c lwz r0,28(r1) <== ALWAYS TAKEN ffc0c588: 83 81 00 08 lwz r28,8(r1) ffc0c58c: 7c 08 03 a6 mtlr r0 ffc0c590: 83 a1 00 0c lwz r29,12(r1) ffc0c594: 83 c1 00 10 lwz r30,16(r1) ffc0c598: 83 e1 00 14 lwz r31,20(r1) ffc0c59c: 38 21 00 18 addi r1,r1,24 ffc0c5a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c5a4 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c5a4: 94 21 ff e8 stwu r1,-24(r1) ffc0c5a8: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0c5ac: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c5b0: 3f c0 00 00 lis r30,0 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c5b4: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c5b8: 83 fe 2b f4 lwz r31,11252(r30) ffc0c5bc: 3b de 2b f4 addi r30,r30,11252 ffc0c5c0: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c5c4: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c5c8: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c5cc: 93 a1 00 0c stw r29,12(r1) ffc0c5d0: 7c 7c 1b 78 mr r28,r3 ffc0c5d4: 7c 9d 23 78 mr r29,r4 ffc0c5d8: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c5dc: 41 9e 00 24 beq- cr7,ffc0c600 <_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 ); ffc0c5e0: 80 1f 00 08 lwz r0,8(r31) ffc0c5e4: 7f 83 e3 78 mr r3,r28 ffc0c5e8: 7f a4 eb 78 mr r4,r29 ffc0c5ec: 7c 09 03 a6 mtctr r0 ffc0c5f0: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { ffc0c5f4: 83 ff 00 00 lwz r31,0(r31) <== ALWAYS TAKEN ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c5f8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c5fc: 40 9e ff e4 bne+ cr7,ffc0c5e0 <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0c600: 80 01 00 1c lwz r0,28(r1) ffc0c604: 83 81 00 08 lwz r28,8(r1) <== ALWAYS TAKEN ffc0c608: 7c 08 03 a6 mtlr r0 ffc0c60c: 83 a1 00 0c lwz r29,12(r1) ffc0c610: 83 c1 00 10 lwz r30,16(r1) ffc0c614: 83 e1 00 14 lwz r31,20(r1) ffc0c618: 38 21 00 18 addi r1,r1,24 ffc0c61c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ebec <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0ebec: 94 21 ff e0 stwu r1,-32(r1) ffc0ebf0: 7c 08 02 a6 mflr r0 ffc0ebf4: 90 01 00 24 stw r0,36(r1) ffc0ebf8: 93 c1 00 18 stw r30,24(r1) ffc0ebfc: 7c be 2b 78 mr r30,r5 ffc0ec00: 93 e1 00 1c stw r31,28(r1) ffc0ec04: 7c 7f 1b 78 mr r31,r3 ffc0ec08: 93 61 00 0c stw r27,12(r1) ffc0ec0c: 93 81 00 10 stw r28,16(r1) ffc0ec10: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ec14: 7c 00 00 a6 mfmsr r0 ffc0ec18: 7d 30 42 a6 mfsprg r9,0 ffc0ec1c: 7c 09 48 78 andc r9,r0,r9 ffc0ec20: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0ec24: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0ec28: 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 ) ) { ffc0ec2c: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0ec30: 41 9e 00 6c beq- cr7,ffc0ec9c <_Watchdog_Adjust+0xb0> switch ( direction ) { ffc0ec34: 2f 84 00 00 cmpwi cr7,r4,0 ffc0ec38: 40 9e 00 8c bne- cr7,ffc0ecc4 <_Watchdog_Adjust+0xd8> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0ec3c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ec40: 41 9e 00 5c beq- cr7,ffc0ec9c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0ec44: 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; ffc0ec48: 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 ) { ffc0ec4c: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0ec50: 40 bc 00 18 bge+ cr7,ffc0ec68 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0ec54: 48 00 00 ac b ffc0ed00 <_Watchdog_Adjust+0x114> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0ec58: 41 82 00 44 beq- ffc0ec9c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0ec5c: 83 a9 00 10 lwz r29,16(r9) ffc0ec60: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0ec64: 41 9d 00 9c bgt- cr7,ffc0ed00 <_Watchdog_Adjust+0x114> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0ec68: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ec6c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0ec70: 7f e3 fb 78 mr r3,r31 ffc0ec74: 48 00 03 31 bl ffc0efa4 <_Watchdog_Tickle> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ec78: 7c 00 00 a6 mfmsr r0 ffc0ec7c: 7d 30 42 a6 mfsprg r9,0 ffc0ec80: 7c 09 48 78 andc r9,r0,r9 ffc0ec84: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0ec88: 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 ) { ffc0ec8c: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0ec90: 7f 9c 58 00 cmpw cr7,r28,r11 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); ffc0ec94: 7d 69 5b 78 mr r9,r11 ffc0ec98: 40 9e ff c0 bne+ cr7,ffc0ec58 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ec9c: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0eca0: 80 01 00 24 lwz r0,36(r1) ffc0eca4: 83 61 00 0c lwz r27,12(r1) ffc0eca8: 7c 08 03 a6 mtlr r0 ffc0ecac: 83 81 00 10 lwz r28,16(r1) ffc0ecb0: 83 a1 00 14 lwz r29,20(r1) ffc0ecb4: 83 c1 00 18 lwz r30,24(r1) ffc0ecb8: 83 e1 00 1c lwz r31,28(r1) ffc0ecbc: 38 21 00 20 addi r1,r1,32 ffc0ecc0: 4e 80 00 20 blr <== ALWAYS TAKEN * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0ecc4: 2f 84 00 01 cmpwi cr7,r4,1 ffc0ecc8: 40 9e ff d4 bne+ cr7,ffc0ec9c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0eccc: 81 69 00 10 lwz r11,16(r9) ffc0ecd0: 7f cb 2a 14 add r30,r11,r5 ffc0ecd4: 93 c9 00 10 stw r30,16(r9) ffc0ecd8: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0ecdc: 80 01 00 24 lwz r0,36(r1) ffc0ece0: 83 61 00 0c lwz r27,12(r1) ffc0ece4: 7c 08 03 a6 mtlr r0 ffc0ece8: 83 81 00 10 lwz r28,16(r1) ffc0ecec: 83 a1 00 14 lwz r29,20(r1) ffc0ecf0: 83 c1 00 18 lwz r30,24(r1) ffc0ecf4: 83 e1 00 1c lwz r31,28(r1) ffc0ecf8: 38 21 00 20 addi r1,r1,32 ffc0ecfc: 4e 80 00 20 blr <== ALWAYS TAKEN _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; ffc0ed00: 7f de e8 50 subf r30,r30,r29 ffc0ed04: 93 c9 00 10 stw r30,16(r9) break; ffc0ed08: 4b ff ff 94 b ffc0ec9c <_Watchdog_Adjust+0xb0> <== ALWAYS TAKEN ffc205cc <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc205cc: 2c 04 00 00 cmpwi r4,0 ffc205d0: 4d 82 00 20 beqlr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc205d4: 7c e0 00 a6 mfmsr r7 ffc205d8: 7c 10 42 a6 mfsprg r0,0 ffc205dc: 7c e0 00 78 andc r0,r7,r0 ffc205e0: 7c 00 01 24 mtmsr r0 return; } _ISR_Disable( level ); ffc205e4: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc205e8: 39 03 00 04 addi r8,r3,4 ffc205ec: 38 c5 00 04 addi r6,r5,4 /* * 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; ffc205f0: 39 80 00 00 li r12,0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { ffc205f4: 7f 88 48 00 cmpw cr7,r8,r9 ffc205f8: 41 9e 00 68 beq- cr7,ffc20660 <_Watchdog_Adjust_to_chain+0x94> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc205fc: 80 09 00 10 lwz r0,16(r9) ffc20600: 7f 80 20 40 cmplw cr7,r0,r4 ffc20604: 41 9d 00 74 bgt- cr7,ffc20678 <_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; ffc20608: 91 89 00 10 stw r12,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; ffc2060c: 7c 80 20 50 subf r4,r0,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc20610: 81 69 00 00 lwz r11,0(r9) previous = the_node->previous; ffc20614: 81 49 00 04 lwz r10,4(r9) next->previous = previous; previous->next = next; ffc20618: 91 6a 00 00 stw r11,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc2061c: 91 4b 00 04 stw r10,4(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc20620: 90 c9 00 00 stw r6,0(r9) old_last_node = the_chain->last; ffc20624: 81 65 00 08 lwz r11,8(r5) the_chain->last = the_node; ffc20628: 91 25 00 08 stw r9,8(r5) old_last_node->next = the_node; the_node->previous = old_last_node; ffc2062c: 91 69 00 04 stw r11,4(r9) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc20630: 91 2b 00 00 stw r9,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc20634: 7c 00 00 a6 mfmsr r0 ffc20638: 7c e0 01 24 mtmsr r7 ffc2063c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc20640: 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 ) ) ffc20644: 7f 88 48 00 cmpw cr7,r8,r9 ffc20648: 41 9e 00 20 beq- cr7,ffc20668 <_Watchdog_Adjust_to_chain+0x9c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc2064c: 80 09 00 10 lwz r0,16(r9) ffc20650: 2f 80 00 00 cmpwi cr7,r0,0 ffc20654: 41 9e ff bc beq+ cr7,ffc20610 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { ffc20658: 2f 84 00 00 cmpwi cr7,r4,0 ffc2065c: 40 9e ff 98 bne+ cr7,ffc205f4 <_Watchdog_Adjust_to_chain+0x28> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc20660: 7c e0 01 24 mtmsr r7 ffc20664: 4e 80 00 20 blr <== ALWAYS TAKEN ffc20668: 2f 84 00 00 cmpwi cr7,r4,0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc2066c: 7d 09 43 78 mr r9,r8 ffc20670: 40 9e ff 84 bne+ cr7,ffc205f4 <_Watchdog_Adjust_to_chain+0x28> ffc20674: 4b ff ff ec b ffc20660 <_Watchdog_Adjust_to_chain+0x94> <== ALWAYS TAKEN /* * 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; ffc20678: 7c 04 00 50 subf r0,r4,r0 ffc2067c: 90 09 00 10 stw r0,16(r9) ffc20680: 7c e0 01 24 mtmsr r7 ffc20684: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c798 <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0c798: 3d 40 00 00 lis r10,0 ffc0c79c: 39 6a 2c 9c addi r11,r10,11420 ffc0c7a0: 38 eb 00 04 addi r7,r11,4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0c7a4: 91 6b 00 08 stw r11,8(r11) * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; ffc0c7a8: 38 00 00 00 li r0,0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0c7ac: 3d 00 00 00 lis r8,0 ffc0c7b0: 90 ea 2c 9c stw r7,11420(r10) ffc0c7b4: 3d 40 00 00 lis r10,0 ffc0c7b8: 39 28 2c a8 addi r9,r8,11432 ffc0c7bc: 90 0a 27 80 stw r0,10112(r10) _Watchdog_Sync_level = 0; ffc0c7c0: 3d 40 00 00 lis r10,0 ffc0c7c4: 90 0a 27 68 stw r0,10088(r10) ffc0c7c8: 38 c9 00 04 addi r6,r9,4 _Watchdog_Ticks_since_boot = 0; ffc0c7cc: 3d 40 00 00 lis r10,0 ffc0c7d0: 90 c8 2c a8 stw r6,11432(r8) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0c7d4: 91 29 00 08 stw r9,8(r9) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0c7d8: 90 0b 00 04 stw r0,4(r11) ffc0c7dc: 90 0a 27 84 stw r0,10116(r10) ffc0c7e0: 90 09 00 04 stw r0,4(r9) _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } ffc0c7e4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c620 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0c620: 3d 20 00 00 lis r9,0 ffc0c624: 80 09 27 54 lwz r0,10068(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c628: 7c e0 00 a6 mfmsr r7 ffc0c62c: 7d 30 42 a6 mfsprg r9,0 ffc0c630: 7c e9 48 78 andc r9,r7,r9 ffc0c634: 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 ) { ffc0c638: 81 24 00 08 lwz r9,8(r4) <== ALWAYS TAKEN ffc0c63c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c640: 40 9e 01 0c bne- cr7,ffc0c74c <_Watchdog_Insert+0x12c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0c644: 3c a0 00 00 lis r5,0 ffc0c648: 81 25 27 80 lwz r9,10112(r5) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0c64c: 39 60 00 01 li r11,1 ffc0c650: 3d 80 00 00 lis r12,0 ffc0c654: 91 64 00 08 stw r11,8(r4) _Watchdog_Sync_count++; ffc0c658: 39 29 00 01 addi r9,r9,1 ffc0c65c: 91 25 27 80 stw r9,10112(r5) if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0c660: 38 cc 27 68 addi r6,r12,10088 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; ffc0c664: 81 24 00 0c lwz r9,12(r4) <== ALWAYS TAKEN * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ffc0c668: 81 63 00 00 lwz r11,0(r3) ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0c66c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c670: 41 9e 00 94 beq- cr7,ffc0c704 <_Watchdog_Insert+0xe4> ffc0c674: 81 4b 00 00 lwz r10,0(r11) ffc0c678: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c67c: 41 9e 00 88 beq- cr7,ffc0c704 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0c680: 81 4b 00 10 lwz r10,16(r11) <== ALWAYS TAKEN ffc0c684: 7f 89 50 40 cmplw cr7,r9,r10 ffc0c688: 41 9c 00 cc blt- cr7,ffc0c754 <_Watchdog_Insert+0x134> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0c68c: 7d 00 00 a6 mfmsr r8 ffc0c690: 7c e0 01 24 mtmsr r7 ffc0c694: 7d 00 01 24 mtmsr r8 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0c698: 81 04 00 08 lwz r8,8(r4) <== ALWAYS TAKEN ffc0c69c: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c6a0: 40 9e 00 94 bne- cr7,ffc0c734 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0c6a4: 81 06 00 00 lwz r8,0(r6) if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0c6a8: 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 ) { ffc0c6ac: 7f 80 40 40 cmplw cr7,r0,r8 ffc0c6b0: 40 bc 00 48 bge+ cr7,ffc0c6f8 <_Watchdog_Insert+0xd8> ffc0c6b4: 48 00 00 dc b ffc0c790 <_Watchdog_Insert+0x170> <== ALWAYS TAKEN */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0c6b8: 81 4b 00 00 lwz r10,0(r11) ffc0c6bc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c6c0: 41 9e 00 44 beq- cr7,ffc0c704 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0c6c4: 81 4b 00 10 lwz r10,16(r11) ffc0c6c8: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0c6cc: 41 9d 00 88 bgt- cr7,ffc0c754 <_Watchdog_Insert+0x134> ffc0c6d0: 7d 00 00 a6 mfmsr r8 ffc0c6d4: 7c e0 01 24 mtmsr r7 ffc0c6d8: 7d 00 01 24 mtmsr r8 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0c6dc: 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; ffc0c6e0: 7d 2a 48 50 subf r9,r10,r9 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0c6e4: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c6e8: 40 9e 00 4c bne- cr7,ffc0c734 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0c6ec: 81 46 00 00 lwz r10,0(r6) ffc0c6f0: 7f 80 50 40 cmplw cr7,r0,r10 ffc0c6f4: 41 9c 00 9c blt- cr7,ffc0c790 <_Watchdog_Insert+0x170> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0c6f8: 2f 89 00 00 cmpwi cr7,r9,0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); ffc0c6fc: 81 6b 00 00 lwz r11,0(r11) ffc0c700: 40 9e ff b8 bne+ cr7,ffc0c6b8 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0c704: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0c708: 3d 40 00 00 lis r10,0 ffc0c70c: 81 0a 27 84 lwz r8,10116(r10) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c710: 81 4b 00 00 lwz r10,0(r11) ffc0c714: 91 04 00 14 stw r8,20(r4) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0c718: 39 00 00 02 li r8,2 after_node->next = the_node; ffc0c71c: 90 8b 00 00 stw r4,0(r11) <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c720: 91 64 00 04 stw r11,4(r4) ffc0c724: 91 04 00 08 stw r8,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0c728: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; ffc0c72c: 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; ffc0c730: 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; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0c734: 90 0c 27 68 stw r0,10088(r12) _Watchdog_Sync_count--; ffc0c738: 81 25 27 80 lwz r9,10112(r5) ffc0c73c: 38 09 ff ff addi r0,r9,-1 ffc0c740: 90 05 27 80 stw r0,10112(r5) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c744: 7c e0 01 24 mtmsr r7 ffc0c748: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c74c: 7c e0 01 24 mtmsr r7 ffc0c750: 4e 80 00 20 blr <== ALWAYS TAKEN if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0c754: 7d 49 50 50 subf r10,r9,r10 ffc0c758: 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; ffc0c75c: 3d 40 00 00 lis r10,0 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0c760: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0c764: 81 0a 27 84 lwz r8,10116(r10) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c768: 81 4b 00 00 lwz r10,0(r11) ffc0c76c: 91 04 00 14 stw r8,20(r4) ffc0c770: 39 00 00 02 li r8,2 after_node->next = the_node; ffc0c774: 90 8b 00 00 stw r4,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c778: 91 64 00 04 stw r11,4(r4) ffc0c77c: 91 04 00 08 stw r8,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0c780: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; ffc0c784: 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; ffc0c788: 91 44 00 00 stw r10,0(r4) ffc0c78c: 4b ff ff a8 b ffc0c734 <_Watchdog_Insert+0x114> <== ALWAYS TAKEN 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; ffc0c790: 90 06 00 00 stw r0,0(r6) goto restart; ffc0c794: 4b ff fe d0 b ffc0c664 <_Watchdog_Insert+0x44> <== ALWAYS TAKEN ffc0c7e8 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c7e8: 7d 20 00 a6 mfmsr r9 ffc0c7ec: 7c 10 42 a6 mfsprg r0,0 ffc0c7f0: 7d 20 00 78 andc r0,r9,r0 ffc0c7f4: 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; ffc0c7f8: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0c7fc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c800: 41 9e 00 98 beq- cr7,ffc0c898 <_Watchdog_Remove+0xb0> ffc0c804: 2b 80 00 01 cmplwi cr7,r0,1 ffc0c808: 40 9c 00 1c bge- cr7,ffc0c824 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0c80c: 3d 60 00 00 lis r11,0 ffc0c810: 81 6b 27 84 lwz r11,10116(r11) ffc0c814: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c818: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0c81c: 7c 03 03 78 mr r3,r0 ffc0c820: 4e 80 00 20 blr <== ALWAYS TAKEN Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0c824: 2b 80 00 03 cmplwi cr7,r0,3 ffc0c828: 41 bd ff e4 bgt- cr7,ffc0c80c <_Watchdog_Remove+0x24> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); ffc0c82c: 81 63 00 00 lwz r11,0(r3) break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0c830: 39 00 00 00 li r8,0 ffc0c834: 91 03 00 08 stw r8,8(r3) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0c838: 81 4b 00 00 lwz r10,0(r11) ffc0c83c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c840: 41 9e 00 14 beq- cr7,ffc0c854 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0c844: 81 0b 00 10 lwz r8,16(r11) ffc0c848: 81 43 00 10 lwz r10,16(r3) ffc0c84c: 7d 48 52 14 add r10,r8,r10 ffc0c850: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0c854: 3d 40 00 00 lis r10,0 ffc0c858: 81 4a 27 80 lwz r10,10112(r10) ffc0c85c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c860: 41 9e 00 14 beq- cr7,ffc0c874 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0c864: 3d 40 00 00 lis r10,0 ffc0c868: 81 0a 27 54 lwz r8,10068(r10) ffc0c86c: 3d 40 00 00 lis r10,0 ffc0c870: 91 0a 27 68 stw r8,10088(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0c874: 81 43 00 04 lwz r10,4(r3) next->previous = previous; previous->next = next; ffc0c878: 91 6a 00 00 stw r11,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0c87c: 91 4b 00 04 stw r10,4(r11) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0c880: 3d 60 00 00 lis r11,0 ffc0c884: 81 6b 27 84 lwz r11,10116(r11) ffc0c888: 91 63 00 18 stw r11,24(r3) ffc0c88c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0c890: 7c 03 03 78 mr r3,r0 ffc0c894: 4e 80 00 20 blr <== ALWAYS TAKEN /* * 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; ffc0c898: 39 60 00 00 li r11,0 ffc0c89c: 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; ffc0c8a0: 3d 60 00 00 lis r11,0 ffc0c8a4: 81 6b 27 84 lwz r11,10116(r11) ffc0c8a8: 91 63 00 18 stw r11,24(r3) ffc0c8ac: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0c8b0: 7c 03 03 78 mr r3,r0 ffc0c8b4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e400 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( ffc0e400: 7c 6b 1b 79 mr. r11,r3 void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { ffc0e404: 94 21 ff f0 stwu r1,-16(r1) ffc0e408: 7c 08 02 a6 mflr r0 ffc0e40c: 7c 88 23 78 mr r8,r4 ffc0e410: 90 01 00 14 stw r0,20(r1) printk( ffc0e414: 41 82 00 48 beq- ffc0e45c <_Watchdog_Report+0x5c> ffc0e418: 80 08 00 24 lwz r0,36(r8) ffc0e41c: 3c a0 ff c2 lis r5,-62 ffc0e420: 80 c8 00 10 lwz r6,16(r8) ffc0e424: 3c 60 ff c2 lis r3,-62 ffc0e428: 80 e8 00 0c lwz r7,12(r8) ffc0e42c: 38 a5 36 d8 addi r5,r5,14040 ffc0e430: 81 28 00 1c lwz r9,28(r8) ffc0e434: 38 63 36 dc addi r3,r3,14044 ffc0e438: 81 48 00 20 lwz r10,32(r8) ffc0e43c: 7d 64 5b 78 mr r4,r11 ffc0e440: 90 01 00 08 stw r0,8(r1) ffc0e444: 4c c6 31 82 crclr 4*cr1+eq ffc0e448: 4b ff 81 49 bl ffc06590 <== ALWAYS TAKEN watch, watch->routine, watch->id, watch->user_data ); } ffc0e44c: 80 01 00 14 lwz r0,20(r1) ffc0e450: 38 21 00 10 addi r1,r1,16 ffc0e454: 7c 08 03 a6 mtlr r0 ffc0e458: 4e 80 00 20 blr <== ALWAYS TAKEN void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( ffc0e45c: 3d 60 ff c2 lis r11,-62 ffc0e460: 80 08 00 24 lwz r0,36(r8) ffc0e464: 39 6b 26 88 addi r11,r11,9864 ffc0e468: 80 c8 00 10 lwz r6,16(r8) ffc0e46c: 80 e8 00 0c lwz r7,12(r8) ffc0e470: 3c 60 ff c2 lis r3,-62 ffc0e474: 81 28 00 1c lwz r9,28(r8) ffc0e478: 7d 65 5b 78 mr r5,r11 ffc0e47c: 81 48 00 20 lwz r10,32(r8) ffc0e480: 38 63 36 dc addi r3,r3,14044 ffc0e484: 7d 64 5b 78 mr r4,r11 ffc0e488: 90 01 00 08 stw r0,8(r1) ffc0e48c: 4c c6 31 82 crclr 4*cr1+eq ffc0e490: 4b ff 81 01 bl ffc06590 <== ALWAYS TAKEN watch, watch->routine, watch->id, watch->user_data ); } ffc0e494: 80 01 00 14 lwz r0,20(r1) ffc0e498: 38 21 00 10 addi r1,r1,16 ffc0e49c: 7c 08 03 a6 mtlr r0 ffc0e4a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e340 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0e340: 94 21 ff e8 stwu r1,-24(r1) ffc0e344: 7c 08 02 a6 mflr r0 ffc0e348: 93 c1 00 10 stw r30,16(r1) ffc0e34c: 7c 7e 1b 78 mr r30,r3 ffc0e350: 93 e1 00 14 stw r31,20(r1) ffc0e354: 7c 9f 23 78 mr r31,r4 ffc0e358: 90 01 00 1c stw r0,28(r1) ffc0e35c: 93 81 00 08 stw r28,8(r1) ffc0e360: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e364: 7f a0 00 a6 mfmsr r29 ffc0e368: 7c 10 42 a6 mfsprg r0,0 ffc0e36c: 7f a0 00 78 andc r0,r29,r0 ffc0e370: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0e374: 3c 60 ff c2 lis r3,-62 ffc0e378: 7f e5 fb 78 mr r5,r31 ffc0e37c: 38 63 36 a0 addi r3,r3,13984 ffc0e380: 7f c4 f3 78 mr r4,r30 ffc0e384: 4c c6 31 82 crclr 4*cr1+eq ffc0e388: 4b ff 82 09 bl ffc06590 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0e38c: 83 9f 00 00 lwz r28,0(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0e390: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0e394: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0e398: 41 9e 00 54 beq- cr7,ffc0e3ec <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0e39c: 7f 84 e3 78 mr r4,r28 ffc0e3a0: 38 60 00 00 li r3,0 ffc0e3a4: 48 00 00 5d bl ffc0e400 <_Watchdog_Report> <== ALWAYS TAKEN _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) ffc0e3a8: 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 = header->first ; ffc0e3ac: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0e3b0: 40 9e ff ec bne+ cr7,ffc0e39c <_Watchdog_Report_chain+0x5c> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0e3b4: 3c 60 ff c2 lis r3,-62 ffc0e3b8: 38 63 36 b8 addi r3,r3,14008 ffc0e3bc: 7f c4 f3 78 mr r4,r30 ffc0e3c0: 4c c6 31 82 crclr 4*cr1+eq ffc0e3c4: 4b ff 81 cd bl ffc06590 <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e3c8: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0e3cc: 80 01 00 1c lwz r0,28(r1) ffc0e3d0: 83 81 00 08 lwz r28,8(r1) ffc0e3d4: 7c 08 03 a6 mtlr r0 ffc0e3d8: 83 a1 00 0c lwz r29,12(r1) ffc0e3dc: 83 c1 00 10 lwz r30,16(r1) ffc0e3e0: 83 e1 00 14 lwz r31,20(r1) ffc0e3e4: 38 21 00 18 addi r1,r1,24 ffc0e3e8: 4e 80 00 20 blr <== ALWAYS TAKEN _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0e3ec: 3c 60 ff c2 lis r3,-62 ffc0e3f0: 38 63 36 c8 addi r3,r3,14024 ffc0e3f4: 4c c6 31 82 crclr 4*cr1+eq ffc0e3f8: 4b ff 81 99 bl ffc06590 <== ALWAYS TAKEN ffc0e3fc: 4b ff ff cc b ffc0e3c8 <_Watchdog_Report_chain+0x88> <== ALWAYS TAKEN ffc0c8b8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { ffc0c8b8: 94 21 ff e8 stwu r1,-24(r1) ffc0c8bc: 7c 08 02 a6 mflr r0 ffc0c8c0: 90 01 00 1c stw r0,28(r1) ffc0c8c4: 93 c1 00 10 stw r30,16(r1) ffc0c8c8: 7c 7e 1b 78 mr r30,r3 ffc0c8cc: 93 81 00 08 stw r28,8(r1) ffc0c8d0: 93 a1 00 0c stw r29,12(r1) ffc0c8d4: 93 e1 00 14 stw r31,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c8d8: 7f 80 00 a6 mfmsr r28 ffc0c8dc: 7c 10 42 a6 mfsprg r0,0 ffc0c8e0: 7f 80 00 78 andc r0,r28,r0 ffc0c8e4: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0c8e8: 83 e3 00 00 lwz r31,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0c8ec: 3b a3 00 04 addi r29,r3,4 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0c8f0: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0c8f4: 41 9e 00 20 beq- cr7,ffc0c914 <_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) { ffc0c8f8: 81 3f 00 10 lwz r9,16(r31) ffc0c8fc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c900: 41 9e 00 78 beq- cr7,ffc0c978 <_Watchdog_Tickle+0xc0> the_watchdog->delta_interval--; ffc0c904: 39 29 ff ff addi r9,r9,-1 if ( the_watchdog->delta_interval != 0 ) ffc0c908: 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--; ffc0c90c: 91 3f 00 10 stw r9,16(r31) if ( the_watchdog->delta_interval != 0 ) ffc0c910: 41 be 00 68 beq+ cr7,ffc0c978 <_Watchdog_Tickle+0xc0> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c914: 7f 80 01 24 mtmsr r28 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } ffc0c918: 80 01 00 1c lwz r0,28(r1) ffc0c91c: 83 81 00 08 lwz r28,8(r1) ffc0c920: 7c 08 03 a6 mtlr r0 ffc0c924: 83 a1 00 0c lwz r29,12(r1) ffc0c928: 83 c1 00 10 lwz r30,16(r1) ffc0c92c: 83 e1 00 14 lwz r31,20(r1) <== ALWAYS TAKEN ffc0c930: 38 21 00 18 addi r1,r1,24 ffc0c934: 4e 80 00 20 blr <== ALWAYS TAKEN _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( ffc0c938: 80 1f 00 1c lwz r0,28(r31) ffc0c93c: 80 9f 00 24 lwz r4,36(r31) ffc0c940: 80 7f 00 20 lwz r3,32(r31) ffc0c944: 7c 09 03 a6 mtctr r0 ffc0c948: 4e 80 04 21 bctrl <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c94c: 7f 80 00 a6 mfmsr r28 ffc0c950: 7c 10 42 a6 mfsprg r0,0 ffc0c954: 7f 80 00 78 andc r0,r28,r0 ffc0c958: 7c 00 01 24 mtmsr r0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); ffc0c95c: 80 1e 00 00 lwz r0,0(r30) _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); ffc0c960: 7f 9d 00 00 cmpw cr7,r29,r0 ffc0c964: 7c 1f 03 78 mr r31,r0 ffc0c968: 41 be ff ac beq- cr7,ffc0c914 <_Watchdog_Tickle+0x5c> ffc0c96c: 80 1f 00 10 lwz r0,16(r31) ffc0c970: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c974: 40 be ff a0 bne- cr7,ffc0c914 <_Watchdog_Tickle+0x5c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); ffc0c978: 7f e3 fb 78 mr r3,r31 ffc0c97c: 4b ff fe 6d bl ffc0c7e8 <_Watchdog_Remove> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c980: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); switch( watchdog_state ) { ffc0c984: 2f 83 00 02 cmpwi cr7,r3,2 ffc0c988: 40 9e ff c4 bne+ cr7,ffc0c94c <_Watchdog_Tickle+0x94> ffc0c98c: 4b ff ff ac b ffc0c938 <_Watchdog_Tickle+0x80> <== ALWAYS TAKEN ffc0c9d8 <_Workspace_Allocate>: * _Workspace_Allocate */ void *_Workspace_Allocate( size_t size ) { ffc0c9d8: 94 21 ff f8 stwu r1,-8(r1) ffc0c9dc: 7c 08 02 a6 mflr r0 ffc0c9e0: 7c 64 1b 78 mr r4,r3 ffc0c9e4: 3c 60 00 00 lis r3,0 <== ALWAYS TAKEN ffc0c9e8: 90 01 00 0c stw r0,12(r1) ffc0c9ec: 38 63 2c 0c addi r3,r3,11276 <== ALWAYS TAKEN ffc0c9f0: 38 a0 00 00 li r5,0 <== ALWAYS TAKEN ffc0c9f4: 38 c0 00 00 li r6,0 ffc0c9f8: 48 00 24 b1 bl ffc0eea8 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN __builtin_return_address( 1 ), memory ); #endif return memory; } ffc0c9fc: 80 01 00 0c lwz r0,12(r1) ffc0ca00: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc0ca04: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0ca08: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c990 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { ffc0c990: 94 21 ff f8 stwu r1,-8(r1) ffc0c994: 7c 08 02 a6 mflr r0 ffc0c998: 7c 64 1b 78 mr r4,r3 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc0c99c: 3c 60 00 00 lis r3,0 ffc0c9a0: 90 01 00 0c stw r0,12(r1) ffc0c9a4: 38 63 2c 0c addi r3,r3,11276 ffc0c9a8: 38 a0 00 00 li r5,0 ffc0c9ac: 38 c0 00 00 li r6,0 <== ALWAYS TAKEN ffc0c9b0: 48 00 24 f9 bl ffc0eea8 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) ffc0c9b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c9b8: 41 9e 00 14 beq- cr7,ffc0c9cc <_Workspace_Allocate_or_fatal_error+0x3c> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } ffc0c9bc: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0c9c0: 38 21 00 08 addi r1,r1,8 ffc0c9c4: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0c9c8: 4e 80 00 20 blr <== ALWAYS TAKEN memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( ffc0c9cc: 38 80 00 01 li r4,1 ffc0c9d0: 38 a0 00 04 li r5,4 ffc0c9d4: 4b ff d3 b9 bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc0ca0c <_Workspace_Free>: * _Workspace_Free */ bool _Workspace_Free( void *block ) { ffc0ca0c: 94 21 ff f8 stwu r1,-8(r1) ffc0ca10: 7c 08 02 a6 mflr r0 ffc0ca14: 7c 64 1b 78 mr r4,r3 block, __builtin_return_address( 0 ), __builtin_return_address( 1 ) ); #endif return _Heap_Free( &_Workspace_Area, block ); ffc0ca18: 3c 60 00 00 lis r3,0 * _Workspace_Free */ bool _Workspace_Free( void *block ) { ffc0ca1c: 90 01 00 0c stw r0,12(r1) block, __builtin_return_address( 0 ), __builtin_return_address( 1 ) ); #endif return _Heap_Free( &_Workspace_Area, block ); ffc0ca20: 38 63 2c 0c addi r3,r3,11276 ffc0ca24: 48 00 26 89 bl ffc0f0ac <_Heap_Free> <== ALWAYS TAKEN } ffc0ca28: 80 01 00 0c lwz r0,12(r1) ffc0ca2c: 38 21 00 08 addi r1,r1,8 ffc0ca30: 7c 08 03 a6 mtlr r0 ffc0ca34: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ca38 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0ca38: 94 21 ff f0 stwu r1,-16(r1) ffc0ca3c: 7c 08 02 a6 mflr r0 uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; ffc0ca40: 3d 60 00 00 lis r11,0 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0ca44: 90 01 00 14 stw r0,20(r1) uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; ffc0ca48: 39 2b 20 a0 addi r9,r11,8352 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) ffc0ca4c: 88 09 00 28 lbz r0,40(r9) /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0ca50: 93 c1 00 08 stw r30,8(r1) <== ALWAYS TAKEN uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) ffc0ca54: 2f 80 00 00 cmpwi cr7,r0,0 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0ca58: 93 e1 00 0c stw r31,12(r1) uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; ffc0ca5c: 83 cb 20 a0 lwz r30,8352(r11) uintptr_t size = Configuration.work_space_size; ffc0ca60: 83 e9 00 04 lwz r31,4(r9) if ( Configuration.do_zero_of_workspace ) ffc0ca64: 40 9e 00 3c bne- cr7,ffc0caa0 <_Workspace_Handler_initialization+0x68> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( ffc0ca68: 3c 60 00 00 lis r3,0 ffc0ca6c: 38 63 2c 0c addi r3,r3,11276 ffc0ca70: 7f c4 f3 78 mr r4,r30 ffc0ca74: 7f e5 fb 78 mr r5,r31 ffc0ca78: 38 c0 00 08 li r6,8 ffc0ca7c: 4b ff cf 11 bl ffc0998c <_Heap_Initialize> <== ALWAYS TAKEN starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) ffc0ca80: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ca84: 41 9e 00 30 beq- cr7,ffc0cab4 <_Workspace_Handler_initialization+0x7c> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } ffc0ca88: 80 01 00 14 lwz r0,20(r1) ffc0ca8c: 83 c1 00 08 lwz r30,8(r1) ffc0ca90: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0ca94: 83 e1 00 0c lwz r31,12(r1) ffc0ca98: 38 21 00 10 addi r1,r1,16 ffc0ca9c: 4e 80 00 20 blr <== ALWAYS TAKEN uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); ffc0caa0: 7f c3 f3 78 mr r3,r30 ffc0caa4: 38 80 00 00 li r4,0 ffc0caa8: 7f e5 fb 78 mr r5,r31 ffc0caac: 48 00 5c 29 bl ffc126d4 <== ALWAYS TAKEN ffc0cab0: 4b ff ff b8 b ffc0ca68 <_Workspace_Handler_initialization+0x30> <== ALWAYS TAKEN size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( ffc0cab4: 38 80 00 01 li r4,1 ffc0cab8: 38 a0 00 03 li r5,3 ffc0cabc: 4b ff d2 d1 bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc109b8 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc109b8: 94 21 ff d0 stwu r1,-48(r1) ffc109bc: 7c 08 02 a6 mflr r0 ffc109c0: 93 e1 00 2c stw r31,44(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc109c4: 7c 7f 1b 79 mr. r31,r3 ffc109c8: 38 60 00 03 li r3,3 rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc109cc: 93 a1 00 24 stw r29,36(r1) ffc109d0: 7c dd 33 78 mr r29,r6 ffc109d4: 90 01 00 34 stw r0,52(r1) ffc109d8: 93 81 00 20 stw r28,32(r1) ffc109dc: 93 c1 00 28 stw r30,40(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc109e0: 41 82 00 90 beq- ffc10a70 return RTEMS_INVALID_NAME; if ( !id ) ffc109e4: 2f 86 00 00 cmpwi cr7,r6,0 ffc109e8: 38 60 00 09 li r3,9 ffc109ec: 41 9e 00 84 beq- cr7,ffc10a70 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { ffc109f0: 70 80 00 10 andi. r0,r4,16 ffc109f4: 41 82 00 9c beq- ffc10a90 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) ffc109f8: 2f 85 00 00 cmpwi cr7,r5,0 ffc109fc: 38 60 00 0a li r3,10 ffc10a00: 41 9e 00 70 beq- cr7,ffc10a70 ffc10a04: 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; ffc10a08: 90 a1 00 0c stw r5,12(r1) if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc10a0c: 38 00 00 00 li r0,0 ffc10a10: 81 69 27 2c lwz r11,10028(r9) ffc10a14: 90 01 00 08 stw r0,8(r1) ffc10a18: 38 0b 00 01 addi r0,r11,1 ffc10a1c: 90 09 27 2c stw r0,10028(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 ); ffc10a20: 3f 80 00 00 lis r28,0 ffc10a24: 90 81 00 18 stw r4,24(r1) ffc10a28: 3b 9c 2e 04 addi r28,r28,11780 ffc10a2c: 7f 83 e3 78 mr r3,r28 ffc10a30: 4b ff 93 bd bl ffc09dec <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc10a34: 80 81 00 18 lwz r4,24(r1) ffc10a38: 7c 7e 1b 79 mr. r30,r3 ffc10a3c: 41 82 00 90 beq- ffc10acc <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; ffc10a40: 90 9e 00 10 stw r4,16(r30) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc10a44: 38 7e 00 14 addi r3,r30,20 ffc10a48: 38 81 00 08 addi r4,r1,8 ffc10a4c: 48 00 06 1d bl ffc11068 <_CORE_barrier_Initialize> <== ALWAYS TAKEN ffc10a50: 80 1e 00 08 lwz r0,8(r30) ffc10a54: 81 7c 00 1c lwz r11,28(r28) ffc10a58: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc10a5c: 93 fe 00 0c stw r31,12(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc10a60: 7f cb 49 2e stwx r30,r11,r9 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; ffc10a64: 90 1d 00 00 stw r0,0(r29) _Thread_Enable_dispatch(); ffc10a68: 4b ff a5 11 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc10a6c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc10a70: 80 01 00 34 lwz r0,52(r1) ffc10a74: 83 81 00 20 lwz r28,32(r1) ffc10a78: 7c 08 03 a6 mtlr r0 ffc10a7c: 83 a1 00 24 lwz r29,36(r1) ffc10a80: 83 c1 00 28 lwz r30,40(r1) ffc10a84: 83 e1 00 2c lwz r31,44(r1) ffc10a88: 38 21 00 30 addi r1,r1,48 ffc10a8c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10a90: 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; ffc10a94: 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; ffc10a98: 38 00 00 01 li r0,1 ffc10a9c: 81 69 27 2c lwz r11,10028(r9) ffc10aa0: 90 01 00 08 stw r0,8(r1) ffc10aa4: 38 0b 00 01 addi r0,r11,1 ffc10aa8: 90 09 27 2c stw r0,10028(r9) ffc10aac: 3f 80 00 00 lis r28,0 ffc10ab0: 90 81 00 18 stw r4,24(r1) ffc10ab4: 3b 9c 2e 04 addi r28,r28,11780 ffc10ab8: 7f 83 e3 78 mr r3,r28 ffc10abc: 4b ff 93 31 bl ffc09dec <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc10ac0: 80 81 00 18 lwz r4,24(r1) ffc10ac4: 7c 7e 1b 79 mr. r30,r3 ffc10ac8: 40 82 ff 78 bne+ ffc10a40 _Thread_Enable_dispatch(); ffc10acc: 4b ff a4 ad bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc10ad0: 80 01 00 34 lwz r0,52(r1) _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); ffc10ad4: 38 60 00 05 li r3,5 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc10ad8: 83 81 00 20 lwz r28,32(r1) ffc10adc: 7c 08 03 a6 mtlr r0 ffc10ae0: 83 a1 00 24 lwz r29,36(r1) ffc10ae4: 83 c1 00 28 lwz r30,40(r1) ffc10ae8: 83 e1 00 2c lwz r31,44(r1) ffc10aec: 38 21 00 30 addi r1,r1,48 ffc10af0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10af4 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { ffc10af4: 94 21 ff e0 stwu r1,-32(r1) ffc10af8: 7c 08 02 a6 mflr r0 ffc10afc: 7c 64 1b 78 mr r4,r3 ffc10b00: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc10b04: 3f e0 00 00 lis r31,0 ffc10b08: 3b ff 2e 04 addi r31,r31,11780 ffc10b0c: 7f e3 fb 78 mr r3,r31 ffc10b10: 90 01 00 24 stw r0,36(r1) ffc10b14: 38 a1 00 08 addi r5,r1,8 ffc10b18: 93 c1 00 18 stw r30,24(r1) ffc10b1c: 4b ff 98 d1 bl ffc0a3ec <_Objects_Get> <== ALWAYS TAKEN ffc10b20: 7c 7e 1b 78 mr r30,r3 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { ffc10b24: 80 01 00 08 lwz r0,8(r1) ffc10b28: 38 60 00 04 li r3,4 ffc10b2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc10b30: 40 9e 00 34 bne- cr7,ffc10b64 case OBJECTS_LOCAL: _CORE_barrier_Flush( ffc10b34: 38 a0 00 02 li r5,2 ffc10b38: 38 7e 00 14 addi r3,r30,20 ffc10b3c: 38 80 00 00 li r4,0 ffc10b40: 4b ff ad bd bl ffc0b8fc <_Thread_queue_Flush> <== ALWAYS TAKEN &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); ffc10b44: 7f e3 fb 78 mr r3,r31 ffc10b48: 7f c4 f3 78 mr r4,r30 ffc10b4c: 4b ff 93 69 bl ffc09eb4 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); ffc10b50: 7f e3 fb 78 mr r3,r31 ffc10b54: 7f c4 f3 78 mr r4,r30 ffc10b58: 4b ff 96 b5 bl ffc0a20c <_Objects_Free> <== ALWAYS TAKEN _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); ffc10b5c: 4b ff a4 1d bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc10b60: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc10b64: 80 01 00 24 lwz r0,36(r1) ffc10b68: 83 c1 00 18 lwz r30,24(r1) ffc10b6c: 7c 08 03 a6 mtlr r0 ffc10b70: 83 e1 00 1c lwz r31,28(r1) ffc10b74: 38 21 00 20 addi r1,r1,32 ffc10b78: 4e 80 00 20 blr <== ALWAYS TAKEN ffc096f8 : rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id ) { ffc096f8: 94 21 ff f8 stwu r1,-8(r1) ffc096fc: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc09700: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id ) { ffc09704: 90 01 00 0c stw r0,12(r1) ffc09708: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0970c: 3c 60 00 00 lis r3,0 rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id ) { ffc09710: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc09714: 38 63 2b 2c addi r3,r3,11052 ffc09718: 7c 04 03 78 mr r4,r0 ffc0971c: 60 a5 ff ff ori r5,r5,65535 ffc09720: 48 00 2a e9 bl ffc0c208 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc09724: 80 01 00 0c lwz r0,12(r1) ffc09728: 3d 20 ff c2 lis r9,-62 ffc0972c: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc09730: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc09734: 39 29 2c 38 addi r9,r9,11320 ffc09738: 7c 69 18 2e lwzx r3,r9,r3 ffc0973c: 38 21 00 08 addi r1,r1,8 ffc09740: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10b7c : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { ffc10b7c: 94 21 ff e0 stwu r1,-32(r1) ffc10b80: 7c 08 02 a6 mflr r0 ffc10b84: 93 c1 00 18 stw r30,24(r1) Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) ffc10b88: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { ffc10b8c: 93 e1 00 1c stw r31,28(r1) ffc10b90: 7c 7f 1b 78 mr r31,r3 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) ffc10b94: 38 60 00 09 li r3,9 rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { ffc10b98: 90 01 00 24 stw r0,36(r1) Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) ffc10b9c: 41 82 00 2c beq- ffc10bc8 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc10ba0: 3c 60 00 00 lis r3,0 ffc10ba4: 38 63 2e 04 addi r3,r3,11780 ffc10ba8: 7f e4 fb 78 mr r4,r31 ffc10bac: 38 a1 00 08 addi r5,r1,8 ffc10bb0: 4b ff 98 3d bl ffc0a3ec <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { ffc10bb4: 80 01 00 08 lwz r0,8(r1) ffc10bb8: 7c 69 1b 78 mr r9,r3 ffc10bbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc10bc0: 38 60 00 04 li r3,4 ffc10bc4: 41 9e 00 1c beq- cr7,ffc10be0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc10bc8: 80 01 00 24 lwz r0,36(r1) ffc10bcc: 83 c1 00 18 lwz r30,24(r1) ffc10bd0: 7c 08 03 a6 mtlr r0 ffc10bd4: 83 e1 00 1c lwz r31,28(r1) ffc10bd8: 38 21 00 20 addi r1,r1,32 ffc10bdc: 4e 80 00 20 blr <== ALWAYS TAKEN the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); ffc10be0: 7f e4 fb 78 mr r4,r31 ffc10be4: 38 69 00 14 addi r3,r9,20 ffc10be8: 38 a0 00 00 li r5,0 ffc10bec: 48 00 04 c1 bl ffc110ac <_CORE_barrier_Release> <== ALWAYS TAKEN ffc10bf0: 90 7e 00 00 stw r3,0(r30) _Thread_Enable_dispatch(); ffc10bf4: 4b ff a3 85 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc10bf8: 80 01 00 24 lwz r0,36(r1) the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); ffc10bfc: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc10c00: 83 c1 00 18 lwz r30,24(r1) ffc10c04: 7c 08 03 a6 mtlr r0 ffc10c08: 83 e1 00 1c lwz r31,28(r1) ffc10c0c: 38 21 00 20 addi r1,r1,32 ffc10c10: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10c14 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { ffc10c14: 94 21 ff e0 stwu r1,-32(r1) ffc10c18: 7c 08 02 a6 mflr r0 ffc10c1c: 93 e1 00 1c stw r31,28(r1) ffc10c20: 7c 7f 1b 78 mr r31,r3 ffc10c24: 3c 60 00 00 lis r3,0 ffc10c28: 93 c1 00 18 stw r30,24(r1) ffc10c2c: 38 63 2e 04 addi r3,r3,11780 ffc10c30: 7c 9e 23 78 mr r30,r4 ffc10c34: 38 a1 00 08 addi r5,r1,8 ffc10c38: 90 01 00 24 stw r0,36(r1) ffc10c3c: 7f e4 fb 78 mr r4,r31 ffc10c40: 4b ff 97 ad bl ffc0a3ec <_Objects_Get> <== ALWAYS TAKEN Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { ffc10c44: 80 01 00 08 lwz r0,8(r1) ffc10c48: 7c 69 1b 78 mr r9,r3 ffc10c4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc10c50: 38 60 00 04 li r3,4 ffc10c54: 40 9e 00 30 bne- cr7,ffc10c84 case OBJECTS_LOCAL: _CORE_barrier_Wait( ffc10c58: 38 69 00 14 addi r3,r9,20 ffc10c5c: 7f e4 fb 78 mr r4,r31 ffc10c60: 7f c6 f3 78 mr r6,r30 ffc10c64: 38 a0 00 01 li r5,1 ffc10c68: 38 e0 00 00 li r7,0 ffc10c6c: 48 00 04 95 bl ffc11100 <_CORE_barrier_Wait> <== ALWAYS TAKEN id, true, timeout, NULL ); _Thread_Enable_dispatch(); ffc10c70: 4b ff a3 09 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Barrier_Translate_core_barrier_return_code( ffc10c74: 3d 20 00 00 lis r9,0 ffc10c78: 81 29 27 6c lwz r9,10092(r9) ffc10c7c: 80 69 00 34 lwz r3,52(r9) ffc10c80: 48 00 0c 81 bl ffc11900 <_Barrier_Translate_core_barrier_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc10c84: 80 01 00 24 lwz r0,36(r1) ffc10c88: 83 c1 00 18 lwz r30,24(r1) ffc10c8c: 7c 08 03 a6 mtlr r0 ffc10c90: 83 e1 00 1c lwz r31,28(r1) ffc10c94: 38 21 00 20 addi r1,r1,32 ffc10c98: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a4bc : uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { ffc0a4bc: 54 84 d8 08 rlwinm r4,r4,27,0,4 ffc0a4c0: 54 63 c0 0e rlwinm r3,r3,24,0,7 ffc0a4c4: 7c 83 1b 78 or r3,r4,r3 ffc0a4c8: 7c 63 33 78 or r3,r3,r6 ffc0a4cc: 54 a5 80 1e rlwinm r5,r5,16,0,15 return _Objects_Build_id( api, class, node, index ); } ffc0a4d0: 7c 63 2b 78 or r3,r3,r5 ffc0a4d4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a4d8 : char C1, char C2, char C3, char C4 ) { ffc0a4d8: 54 84 80 1e rlwinm r4,r4,16,0,15 ffc0a4dc: 54 63 c0 0e rlwinm r3,r3,24,0,7 ffc0a4e0: 7c 83 1b 78 or r3,r4,r3 ffc0a4e4: 54 a5 40 2e rlwinm r5,r5,8,0,23 ffc0a4e8: 7c 63 2b 78 or r3,r3,r5 return _Objects_Build_name( C1, C2, C3, C4 ); } ffc0a4ec: 7c 63 33 78 or r3,r3,r6 ffc0a4f0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0da74 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { ffc0da74: 94 21 ff f0 stwu r1,-16(r1) ffc0da78: 7c 08 02 a6 mflr r0 ffc0da7c: 93 e1 00 0c stw r31,12(r1) if ( !time_buffer ) ffc0da80: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { ffc0da84: 90 01 00 14 stw r0,20(r1) ffc0da88: 7c 60 1b 78 mr r0,r3 if ( !time_buffer ) ffc0da8c: 38 60 00 09 li r3,9 ffc0da90: 41 82 00 30 beq- ffc0dac0 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) ffc0da94: 2f 80 00 00 cmpwi cr7,r0,0 ffc0da98: 41 9e 00 58 beq- cr7,ffc0daf0 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) ffc0da9c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0daa0: 41 9e 00 6c beq- cr7,ffc0db0c return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { ffc0daa4: 2f 80 00 02 cmpwi cr7,r0,2 ffc0daa8: 41 9e 00 70 beq- cr7,ffc0db18 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { ffc0daac: 2f 80 00 03 cmpwi cr7,r0,3 ffc0dab0: 41 9e 00 78 beq- cr7,ffc0db28 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) ffc0dab4: 2f 80 00 04 cmpwi cr7,r0,4 ffc0dab8: 38 60 00 0a li r3,10 ffc0dabc: 41 9e 00 18 beq- cr7,ffc0dad4 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } ffc0dac0: 80 01 00 14 lwz r0,20(r1) ffc0dac4: 83 e1 00 0c lwz r31,12(r1) ffc0dac8: 38 21 00 10 addi r1,r1,16 ffc0dacc: 7c 08 03 a6 mtlr r0 ffc0dad0: 4e 80 00 20 blr <== ALWAYS TAKEN *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); ffc0dad4: 7f e3 fb 78 mr r3,r31 ffc0dad8: 48 00 01 a5 bl ffc0dc7c <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; } ffc0dadc: 80 01 00 14 lwz r0,20(r1) ffc0dae0: 83 e1 00 0c lwz r31,12(r1) ffc0dae4: 38 21 00 10 addi r1,r1,16 ffc0dae8: 7c 08 03 a6 mtlr r0 ffc0daec: 4e 80 00 20 blr <== ALWAYS TAKEN { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); ffc0daf0: 7f e3 fb 78 mr r3,r31 ffc0daf4: 48 00 00 9d bl ffc0db90 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } ffc0daf8: 80 01 00 14 lwz r0,20(r1) ffc0dafc: 83 e1 00 0c lwz r31,12(r1) ffc0db00: 38 21 00 10 addi r1,r1,16 ffc0db04: 7c 08 03 a6 mtlr r0 ffc0db08: 4e 80 00 20 blr <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); ffc0db0c: 7f e3 fb 78 mr r3,r31 ffc0db10: 48 00 00 29 bl ffc0db38 <== ALWAYS TAKEN ffc0db14: 4b ff ff ac b ffc0dac0 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); ffc0db18: 48 00 00 6d bl ffc0db84 <== ALWAYS TAKEN ffc0db1c: 90 7f 00 00 stw r3,0(r31) ffc0db20: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc0db24: 4b ff ff 9c b ffc0dac0 <== ALWAYS TAKEN } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); ffc0db28: 48 00 00 45 bl ffc0db6c <== ALWAYS TAKEN ffc0db2c: 90 7f 00 00 stw r3,0(r31) ffc0db30: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc0db34: 4b ff ff 8c b ffc0dac0 <== ALWAYS TAKEN ffc095b0 : rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) ffc095b0: 7c 6b 1b 79 mr. r11,r3 ffc095b4: 38 60 00 09 li r3,9 ffc095b8: 4d 82 00 20 beqlr return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) ffc095bc: 3d 20 00 00 lis r9,0 ffc095c0: 88 09 27 e0 lbz r0,10208(r9) ffc095c4: 38 60 00 0b li r3,11 ffc095c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc095cc: 4d 9e 00 20 beqlr cr7 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); ffc095d0: 3d 20 00 00 lis r9,0 ffc095d4: 80 09 27 f8 lwz r0,10232(r9) ffc095d8: 38 60 00 00 li r3,0 ffc095dc: 90 0b 00 00 stw r0,0(r11) return RTEMS_SUCCESSFUL; } ffc095e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07d54 : #include #include #include rtems_interval rtems_clock_get_ticks_per_second(void) { ffc07d54: 3d 20 00 00 lis r9,0 ffc07d58: 80 09 20 ac lwz r0,8364(r9) ffc07d5c: 3c 60 00 0f lis r3,15 ffc07d60: 60 63 42 40 ori r3,r3,16960 <== ALWAYS TAKEN return TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); } ffc07d64: 7c 63 03 96 divwu r3,r3,r0 ffc07d68: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07d6c : #include #include rtems_interval rtems_clock_get_ticks_since_boot(void) { return _Watchdog_Ticks_since_boot; ffc07d6c: 3d 20 00 00 lis r9,0 ffc07d70: 80 69 27 84 lwz r3,10116(r9) } ffc07d74: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09608 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { ffc09608: 94 21 ff b0 stwu r1,-80(r1) ffc0960c: 7c 08 02 a6 mflr r0 ffc09610: 93 e1 00 4c stw r31,76(r1) rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) ffc09614: 7c 7f 1b 79 mr. r31,r3 ffc09618: 38 60 00 09 li r3,9 #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { ffc0961c: 90 01 00 54 stw r0,84(r1) ffc09620: 93 c1 00 48 stw r30,72(r1) rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) ffc09624: 41 82 00 b8 beq- ffc096dc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) ffc09628: 3d 20 00 00 lis r9,0 ffc0962c: 88 09 27 e0 lbz r0,10208(r9) ffc09630: 38 60 00 0b li r3,11 ffc09634: 2f 80 00 00 cmpwi cr7,r0,0 ffc09638: 41 be 00 a4 beq+ cr7,ffc096dc static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0963c: 7f c0 00 a6 mfmsr r30 ffc09640: 7c 10 42 a6 mfsprg r0,0 ffc09644: 7f c0 00 78 andc r0,r30,r0 ffc09648: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc0964c: 38 61 00 10 addi r3,r1,16 ffc09650: 48 00 21 a9 bl ffc0b7f8 <_TOD_Get> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09654: 7f c0 01 24 mtmsr r30 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc09658: 3c 00 10 62 lis r0,4194 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; ffc0965c: 81 21 00 14 lwz r9,20(r1) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc09660: 60 00 4d d3 ori r0,r0,19923 ffc09664: 7c 09 00 96 mulhw r0,r9,r0 ffc09668: 7d 29 fe 70 srawi r9,r9,31 ffc0966c: 7c 00 36 70 srawi r0,r0,6 ffc09670: 7c 09 00 50 subf r0,r9,r0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc09674: 81 21 00 10 lwz r9,16(r1) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); ffc09678: 38 61 00 08 addi r3,r1,8 time->tv_usec = useconds; ffc0967c: 90 01 00 0c stw r0,12(r1) ffc09680: 38 81 00 18 addi r4,r1,24 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc09684: 91 21 00 08 stw r9,8(r1) ffc09688: 48 00 b3 49 bl ffc149d0 <== ALWAYS TAKEN tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / ffc0968c: 38 60 00 00 li r3,0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; ffc09690: 81 61 00 28 lwz r11,40(r1) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; ffc09694: 81 21 00 2c lwz r9,44(r1) tmbuf->month = time.tm_mon + 1; ffc09698: 38 0b 00 01 addi r0,r11,1 ffc0969c: 90 1f 00 04 stw r0,4(r31) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; ffc096a0: 39 29 07 6c addi r9,r9,1900 tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; ffc096a4: 80 01 00 24 lwz r0,36(r1) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; ffc096a8: 91 3f 00 00 stw r9,0(r31) tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / ffc096ac: 3d 20 00 00 lis r9,0 gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; ffc096b0: 90 1f 00 08 stw r0,8(r31) tmbuf->hour = time.tm_hour; ffc096b4: 80 01 00 20 lwz r0,32(r1) ffc096b8: 90 1f 00 0c stw r0,12(r31) tmbuf->minute = time.tm_min; ffc096bc: 80 01 00 1c lwz r0,28(r1) ffc096c0: 90 1f 00 10 stw r0,16(r31) tmbuf->second = time.tm_sec; ffc096c4: 80 01 00 18 lwz r0,24(r1) ffc096c8: 90 1f 00 14 stw r0,20(r31) tmbuf->ticks = now.tv_usec / ffc096cc: 80 09 20 cc lwz r0,8396(r9) ffc096d0: 81 21 00 0c lwz r9,12(r1) ffc096d4: 7c 09 03 96 divwu r0,r9,r0 ffc096d8: 90 1f 00 18 stw r0,24(r31) rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } ffc096dc: 80 01 00 54 lwz r0,84(r1) ffc096e0: 83 c1 00 48 lwz r30,72(r1) ffc096e4: 7c 08 03 a6 mtlr r0 ffc096e8: 83 e1 00 4c lwz r31,76(r1) ffc096ec: 38 21 00 50 addi r1,r1,80 ffc096f0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0dc7c : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { ffc0dc7c: 94 21 ff e0 stwu r1,-32(r1) ffc0dc80: 7c 08 02 a6 mflr r0 ffc0dc84: 93 e1 00 1c stw r31,28(r1) if ( !time ) ffc0dc88: 7c 7f 1b 79 mr. r31,r3 ffc0dc8c: 38 60 00 09 li r3,9 #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { ffc0dc90: 90 01 00 24 stw r0,36(r1) ffc0dc94: 93 c1 00 18 stw r30,24(r1) if ( !time ) ffc0dc98: 41 82 00 60 beq- ffc0dcf8 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) ffc0dc9c: 3d 20 00 00 lis r9,0 ffc0dca0: 88 09 35 dc lbz r0,13788(r9) ffc0dca4: 38 60 00 0b li r3,11 ffc0dca8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dcac: 41 be 00 4c beq+ cr7,ffc0dcf8 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0dcb0: 7f c0 00 a6 mfmsr r30 ffc0dcb4: 7c 10 42 a6 mfsprg r0,0 ffc0dcb8: 7f c0 00 78 andc r0,r30,r0 ffc0dcbc: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc0dcc0: 38 61 00 08 addi r3,r1,8 ffc0dcc4: 48 00 1b d5 bl ffc0f898 <_TOD_Get> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0dcc8: 7f c0 01 24 mtmsr r30 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc0dccc: 3d 60 10 62 lis r11,4194 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; ffc0dcd0: 80 01 00 0c lwz r0,12(r1) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc0dcd4: 61 6b 4d d3 ori r11,r11,19923 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc0dcd8: 81 21 00 08 lwz r9,8(r1) time->tv_usec = useconds; ffc0dcdc: 7d 60 58 96 mulhw r11,r0,r11 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc0dce0: 91 3f 00 00 stw r9,0(r31) time->tv_usec = useconds; ffc0dce4: 7c 00 fe 70 srawi r0,r0,31 ffc0dce8: 7d 6b 36 70 srawi r11,r11,6 ffc0dcec: 7c 00 58 50 subf r0,r0,r11 ffc0dcf0: 90 1f 00 04 stw r0,4(r31) ffc0dcf4: 38 60 00 00 li r3,0 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } ffc0dcf8: 80 01 00 24 lwz r0,36(r1) ffc0dcfc: 83 c1 00 18 lwz r30,24(r1) ffc0dd00: 7c 08 03 a6 mtlr r0 ffc0dd04: 83 e1 00 1c lwz r31,28(r1) ffc0dd08: 38 21 00 20 addi r1,r1,32 ffc0dd0c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc31728 : */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) ffc31728: 2f 83 00 00 cmpwi cr7,r3,0 * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { ffc3172c: 7c 08 02 a6 mflr r0 ffc31730: 94 21 ff f8 stwu r1,-8(r1) ffc31734: 90 01 00 0c stw r0,12(r1) if ( !uptime ) ffc31738: 38 00 00 09 li r0,9 ffc3173c: 41 9e 00 0c beq- cr7,ffc31748 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); ffc31740: 48 00 15 35 bl ffc32c74 <_TOD_Get_uptime_as_timespec> <== ALWAYS TAKEN ffc31744: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc31748: 7c 03 03 78 mr r3,r0 ffc3174c: 80 01 00 0c lwz r0,12(r1) ffc31750: 38 21 00 08 addi r1,r1,8 ffc31754: 7c 08 03 a6 mtlr r0 ffc31758: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09710 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { ffc09710: 94 21 ff e0 stwu r1,-32(r1) ffc09714: 7c 08 02 a6 mflr r0 ffc09718: 93 e1 00 1c stw r31,28(r1) struct timespec newtime; if ( !time_buffer ) ffc0971c: 7c 7f 1b 79 mr. r31,r3 */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { ffc09720: 90 01 00 24 stw r0,36(r1) <== ALWAYS TAKEN struct timespec newtime; if ( !time_buffer ) ffc09724: 38 00 00 09 li r0,9 ffc09728: 41 82 00 58 beq- ffc09780 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { ffc0972c: 48 00 01 7d bl ffc098a8 <_TOD_Validate> <== ALWAYS TAKEN ffc09730: 38 00 00 14 li r0,20 ffc09734: 2f 83 00 00 cmpwi cr7,r3,0 ffc09738: 41 be 00 48 beq+ cr7,ffc09780 newtime.tv_sec = _TOD_To_seconds( time_buffer ); ffc0973c: 7f e3 fb 78 mr r3,r31 ffc09740: 48 00 00 c5 bl ffc09804 <_TOD_To_seconds> <== ALWAYS TAKEN newtime.tv_nsec = time_buffer->ticks * ffc09744: 3d 20 00 00 lis r9,0 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); ffc09748: 90 61 00 08 stw r3,8(r1) newtime.tv_nsec = time_buffer->ticks * ffc0974c: 80 09 20 cc lwz r0,8396(r9) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09750: 3d 20 00 00 lis r9,0 ffc09754: 81 7f 00 18 lwz r11,24(r31) ffc09758: 7c 0b 01 d6 mullw r0,r11,r0 ffc0975c: 81 69 27 d8 lwz r11,10200(r9) <== ALWAYS TAKEN ffc09760: 39 6b 00 01 addi r11,r11,1 ffc09764: 1c 00 03 e8 mulli r0,r0,1000 ffc09768: 91 69 27 d8 stw r11,10200(r9) ffc0976c: 90 01 00 0c stw r0,12(r1) rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); ffc09770: 38 61 00 08 addi r3,r1,8 ffc09774: 48 00 22 05 bl ffc0b978 <_TOD_Set> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc09778: 48 00 3b 51 bl ffc0d2c8 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0977c: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } ffc09780: 7c 03 03 78 mr r3,r0 ffc09784: 80 01 00 24 lwz r0,36(r1) ffc09788: 83 e1 00 1c lwz r31,28(r1) ffc0978c: 38 21 00 20 addi r1,r1,32 ffc09790: 7c 08 03 a6 mtlr r0 ffc09794: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07d78 : */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) ffc07d78: 7c 60 1b 79 mr. r0,r3 ffc07d7c: 38 60 00 09 li r3,9 ffc07d80: 4d 82 00 20 beqlr return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; ffc07d84: 3d 20 00 00 lis r9,0 ffc07d88: 90 09 27 94 stw r0,10132(r9) ffc07d8c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc07d90: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07d94 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { ffc07d94: 7c 08 02 a6 mflr r0 ffc07d98: 94 21 ff f8 stwu r1,-8(r1) ffc07d9c: 90 01 00 0c stw r0,12(r1) _TOD_Tickle_ticks(); ffc07da0: 48 00 1b 51 bl ffc098f0 <_TOD_Tickle_ticks> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); ffc07da4: 3c 60 00 00 lis r3,0 ffc07da8: 38 63 2c a8 addi r3,r3,11432 <== ALWAYS TAKEN ffc07dac: 48 00 4b 0d bl ffc0c8b8 <_Watchdog_Tickle> <== ALWAYS TAKEN _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); ffc07db0: 48 00 42 05 bl ffc0bfb4 <_Thread_Tickle_timeslice> <== ALWAYS TAKEN * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); ffc07db4: 3d 20 00 00 lis r9,0 ffc07db8: 88 09 27 7c lbz r0,10108(r9) if ( _Thread_Is_context_switch_necessary() && ffc07dbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc07dc0: 41 9e 00 14 beq- cr7,ffc07dd4 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); ffc07dc4: 3d 20 00 00 lis r9,0 ffc07dc8: 80 09 27 2c lwz r0,10028(r9) ffc07dcc: 2f 80 00 00 cmpwi cr7,r0,0 ffc07dd0: 41 9e 00 18 beq- cr7,ffc07de8 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } ffc07dd4: 80 01 00 0c lwz r0,12(r1) ffc07dd8: 38 60 00 00 li r3,0 ffc07ddc: 38 21 00 08 addi r1,r1,8 ffc07de0: 7c 08 03 a6 mtlr r0 ffc07de4: 4e 80 00 20 blr <== ALWAYS TAKEN _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); ffc07de8: 48 00 2f 89 bl ffc0ad70 <_Thread_Dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc07dec: 80 01 00 0c lwz r0,12(r1) ffc07df0: 38 60 00 00 li r3,0 ffc07df4: 7c 08 03 a6 mtlr r0 ffc07df8: 38 21 00 08 addi r1,r1,8 ffc07dfc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eae8 : */ void rtems_debug_disable ( rtems_debug_control to_be_disabled ) { _Debug_Level &= ~to_be_disabled; ffc0eae8: 3d 20 00 00 lis r9,0 ffc0eaec: 80 09 27 70 lwz r0,10096(r9) ffc0eaf0: 7c 00 18 78 andc r0,r0,r3 ffc0eaf4: 90 09 27 70 stw r0,10096(r9) } ffc0eaf8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ead4 : */ void rtems_debug_enable ( rtems_debug_control to_be_enabled ) { _Debug_Level |= to_be_enabled; ffc0ead4: 3d 20 00 00 lis r9,0 ffc0ead8: 80 09 27 70 lwz r0,10096(r9) ffc0eadc: 7c 60 03 78 or r0,r3,r0 ffc0eae0: 90 09 27 70 stw r0,10096(r9) } ffc0eae4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eafc : * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { ffc0eafc: 3d 20 00 00 lis r9,0 ffc0eb00: 80 09 27 70 lwz r0,10096(r9) ffc0eb04: 7c 63 00 38 and r3,r3,r0 return (_Debug_Level & level) ? true : false; } ffc0eb08: 31 23 ff ff addic r9,r3,-1 ffc0eb0c: 7c 09 19 10 subfe r0,r9,r3 ffc0eb10: 7c 03 03 78 mr r3,r0 ffc0eb14: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07e00 : rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out ) ffc07e00: 7c cb 33 79 mr. r11,r6 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07e04: 94 21 ff f0 stwu r1,-16(r1) ffc07e08: 7c 08 02 a6 mflr r0 ffc07e0c: 93 e1 00 0c stw r31,12(r1) ffc07e10: 90 01 00 14 stw r0,20(r1) RTEMS_API_Control *api; if ( !event_out ) ffc07e14: 38 00 00 09 li r0,9 ffc07e18: 41 82 00 24 beq- ffc07e3c return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; if ( _Event_sets_Is_empty( event_in ) ) { ffc07e1c: 2f 83 00 00 cmpwi cr7,r3,0 RTEMS_API_Control *api; if ( !event_out ) return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; ffc07e20: 3f e0 00 00 lis r31,0 ffc07e24: 81 3f 27 6c lwz r9,10092(r31) ffc07e28: 81 29 01 40 lwz r9,320(r9) if ( _Event_sets_Is_empty( event_in ) ) { ffc07e2c: 40 9e 00 28 bne- cr7,ffc07e54 *event_out = api->pending_events; ffc07e30: 81 29 00 00 lwz r9,0(r9) ffc07e34: 38 00 00 00 li r0,0 ffc07e38: 91 2b 00 00 stw r9,0(r11) _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } ffc07e3c: 7c 03 03 78 mr r3,r0 ffc07e40: 80 01 00 14 lwz r0,20(r1) ffc07e44: 83 e1 00 0c lwz r31,12(r1) ffc07e48: 38 21 00 10 addi r1,r1,16 ffc07e4c: 7c 08 03 a6 mtlr r0 ffc07e50: 4e 80 00 20 blr <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc07e54: 3d 20 00 00 lis r9,0 ffc07e58: 81 69 27 2c lwz r11,10028(r9) ffc07e5c: 38 0b 00 01 addi r0,r11,1 ffc07e60: 90 09 27 2c stw r0,10028(r9) *event_out = api->pending_events; return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); ffc07e64: 48 00 00 29 bl ffc07e8c <_Event_Seize> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc07e68: 48 00 31 11 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return( _Thread_Executing->Wait.return_code ); ffc07e6c: 81 3f 27 6c lwz r9,10092(r31) } ffc07e70: 83 e1 00 0c lwz r31,12(r1) } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); ffc07e74: 80 09 00 34 lwz r0,52(r9) } ffc07e78: 7c 03 03 78 mr r3,r0 ffc07e7c: 80 01 00 14 lwz r0,20(r1) ffc07e80: 38 21 00 10 addi r1,r1,16 ffc07e84: 7c 08 03 a6 mtlr r0 ffc07e88: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08000 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { ffc08000: 94 21 ff e0 stwu r1,-32(r1) ffc08004: 7c 08 02 a6 mflr r0 ffc08008: 93 e1 00 1c stw r31,28(r1) ffc0800c: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); ffc08010: 38 81 00 08 addi r4,r1,8 rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { ffc08014: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); ffc08018: 48 00 2f 81 bl ffc0af98 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0801c: 38 00 00 04 li r0,4 ffc08020: 81 21 00 08 lwz r9,8(r1) ffc08024: 2f 89 00 00 cmpwi cr7,r9,0 ffc08028: 40 9e 00 34 bne- cr7,ffc0805c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc0802c: 81 23 01 40 lwz r9,320(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08030: 7c 00 00 a6 mfmsr r0 ffc08034: 7d 70 42 a6 mfsprg r11,0 ffc08038: 7c 0b 58 78 andc r11,r0,r11 ffc0803c: 7d 60 01 24 mtmsr r11 ) { ISR_Level level; _ISR_Disable( level ); *the_event_set |= the_new_events; ffc08040: 81 69 00 00 lwz r11,0(r9) ffc08044: 7d 7f fb 78 or r31,r11,r31 ffc08048: 93 e9 00 00 stw r31,0(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0804c: 7c 00 01 24 mtmsr r0 _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); ffc08050: 48 00 00 25 bl ffc08074 <_Event_Surrender> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc08054: 48 00 2f 25 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08058: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0805c: 7c 03 03 78 mr r3,r0 ffc08060: 80 01 00 24 lwz r0,36(r1) ffc08064: 83 e1 00 1c lwz r31,28(r1) ffc08068: 38 21 00 20 addi r1,r1,32 ffc0806c: 7c 08 03 a6 mtlr r0 ffc08070: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f40c : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { ffc0f40c: 94 21 ff e0 stwu r1,-32(r1) <== ALWAYS TAKEN ffc0f410: 7c 08 02 a6 mflr r0 ffc0f414: 93 c1 00 18 stw r30,24(r1) Extension_Control *the_extension; if ( !id ) ffc0f418: 7c be 2b 79 mr. r30,r5 rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { ffc0f41c: 93 e1 00 1c stw r31,28(r1) ffc0f420: 7c 7f 1b 78 mr r31,r3 Extension_Control *the_extension; if ( !id ) ffc0f424: 38 60 00 09 li r3,9 rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { ffc0f428: 90 01 00 24 stw r0,36(r1) ffc0f42c: 93 81 00 10 stw r28,16(r1) ffc0f430: 93 a1 00 14 stw r29,20(r1) Extension_Control *the_extension; if ( !id ) ffc0f434: 41 82 00 10 beq- ffc0f444 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) ffc0f438: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0f43c: 38 60 00 03 li r3,3 ffc0f440: 40 9e 00 24 bne- cr7,ffc0f464 ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc0f444: 80 01 00 24 lwz r0,36(r1) ffc0f448: 83 81 00 10 lwz r28,16(r1) ffc0f44c: 7c 08 03 a6 mtlr r0 ffc0f450: 83 a1 00 14 lwz r29,20(r1) ffc0f454: 83 c1 00 18 lwz r30,24(r1) ffc0f458: 83 e1 00 1c lwz r31,28(r1) ffc0f45c: 38 21 00 20 addi r1,r1,32 ffc0f460: 4e 80 00 20 blr <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0f464: 3d 20 00 00 lis r9,0 ffc0f468: 81 69 29 30 lwz r11,10544(r9) ffc0f46c: 38 0b 00 01 addi r0,r11,1 ffc0f470: 90 09 29 30 stw r0,10544(r9) #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); ffc0f474: 3f 80 00 00 lis r28,0 ffc0f478: 90 81 00 08 stw r4,8(r1) ffc0f47c: 3b 9c 36 d8 addi r28,r28,14040 ffc0f480: 7f 83 e3 78 mr r3,r28 ffc0f484: 48 00 10 ad bl ffc10530 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { ffc0f488: 80 81 00 08 lwz r4,8(r1) ffc0f48c: 7c 7d 1b 79 mr. r29,r3 ffc0f490: 41 82 00 8c beq- ffc0f51c RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0f494: 81 44 00 00 lwz r10,0(r4) _User_extensions_Add_set( extension ); ffc0f498: 38 7d 00 10 addi r3,r29,16 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0f49c: 81 64 00 04 lwz r11,4(r4) ffc0f4a0: 81 24 00 08 lwz r9,8(r4) ffc0f4a4: 80 04 00 0c lwz r0,12(r4) ffc0f4a8: 91 5d 00 24 stw r10,36(r29) ffc0f4ac: 91 7d 00 28 stw r11,40(r29) ffc0f4b0: 91 3d 00 2c stw r9,44(r29) ffc0f4b4: 90 1d 00 30 stw r0,48(r29) ffc0f4b8: 80 04 00 1c lwz r0,28(r4) ffc0f4bc: 81 64 00 14 lwz r11,20(r4) ffc0f4c0: 81 24 00 18 lwz r9,24(r4) ffc0f4c4: 81 44 00 10 lwz r10,16(r4) ffc0f4c8: 91 7d 00 38 stw r11,56(r29) ffc0f4cc: 91 5d 00 34 stw r10,52(r29) ffc0f4d0: 91 3d 00 3c stw r9,60(r29) ffc0f4d4: 90 1d 00 40 stw r0,64(r29) _User_extensions_Add_set( extension ); ffc0f4d8: 48 00 34 ed bl ffc129c4 <_User_extensions_Add_set> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0f4dc: 80 1d 00 08 lwz r0,8(r29) ffc0f4e0: 81 7c 00 1c lwz r11,28(r28) ffc0f4e4: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0f4e8: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0f4ec: 7f ab 49 2e stwx r29,r11,r9 &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; ffc0f4f0: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0f4f4: 48 00 22 7d bl ffc11770 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc0f4f8: 80 01 00 24 lwz r0,36(r1) &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); ffc0f4fc: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc0f500: 83 81 00 10 lwz r28,16(r1) ffc0f504: 7c 08 03 a6 mtlr r0 ffc0f508: 83 a1 00 14 lwz r29,20(r1) ffc0f50c: 83 c1 00 18 lwz r30,24(r1) ffc0f510: 83 e1 00 1c lwz r31,28(r1) ffc0f514: 38 21 00 20 addi r1,r1,32 ffc0f518: 4e 80 00 20 blr <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); ffc0f51c: 48 00 22 55 bl ffc11770 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0f520: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc0f524: 4b ff ff 20 b ffc0f444 <== ALWAYS TAKEN ffc0f528 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { ffc0f528: 94 21 ff e0 stwu r1,-32(r1) ffc0f52c: 7c 08 02 a6 mflr r0 ffc0f530: 7c 64 1b 78 mr r4,r3 ffc0f534: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) ffc0f538: 3f e0 00 00 lis r31,0 ffc0f53c: 3b ff 36 d8 addi r31,r31,14040 ffc0f540: 7f e3 fb 78 mr r3,r31 ffc0f544: 90 01 00 24 stw r0,36(r1) ffc0f548: 38 a1 00 08 addi r5,r1,8 ffc0f54c: 93 c1 00 18 stw r30,24(r1) ffc0f550: 48 00 15 e1 bl ffc10b30 <_Objects_Get> <== ALWAYS TAKEN ffc0f554: 7c 7e 1b 78 mr r30,r3 Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { ffc0f558: 80 01 00 08 lwz r0,8(r1) ffc0f55c: 38 60 00 04 li r3,4 ffc0f560: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f564: 40 9e 00 2c bne- cr7,ffc0f590 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); ffc0f568: 38 7e 00 10 addi r3,r30,16 ffc0f56c: 48 00 35 c1 bl ffc12b2c <_User_extensions_Remove_set> <== ALWAYS TAKEN _Objects_Close( &_Extension_Information, &the_extension->Object ); ffc0f570: 7f e3 fb 78 mr r3,r31 ffc0f574: 7f c4 f3 78 mr r4,r30 ffc0f578: 48 00 10 81 bl ffc105f8 <_Objects_Close> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); ffc0f57c: 7f e3 fb 78 mr r3,r31 ffc0f580: 7f c4 f3 78 mr r4,r30 ffc0f584: 48 00 13 cd bl ffc10950 <_Objects_Free> <== ALWAYS TAKEN _Extension_Free( the_extension ); _Thread_Enable_dispatch(); ffc0f588: 48 00 21 e9 bl ffc11770 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0f58c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0f590: 80 01 00 24 lwz r0,36(r1) ffc0f594: 83 c1 00 18 lwz r30,24(r1) ffc0f598: 7c 08 03 a6 mtlr r0 ffc0f59c: 83 e1 00 1c lwz r31,28(r1) ffc0f5a0: 38 21 00 20 addi r1,r1,32 ffc0f5a4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b76c : rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id ) { ffc0b76c: 94 21 ff f8 stwu r1,-8(r1) ffc0b770: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0b774: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id ) { ffc0b778: 90 01 00 0c stw r0,12(r1) ffc0b77c: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0b780: 3c 60 00 00 lis r3,0 rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id ) { ffc0b784: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0b788: 38 63 30 38 addi r3,r3,12344 ffc0b78c: 7c 04 03 78 mr r4,r0 ffc0b790: 60 a5 ff ff ori r5,r5,65535 ffc0b794: 48 00 17 45 bl ffc0ced8 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc0b798: 80 01 00 0c lwz r0,12(r1) ffc0b79c: 3d 20 ff c2 lis r9,-62 ffc0b7a0: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0b7a4: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc0b7a8: 39 29 45 b8 addi r9,r9,17848 ffc0b7ac: 7c 69 18 2e lwzx r3,r9,r3 ffc0b7b0: 38 21 00 08 addi r1,r1,8 ffc0b7b4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08ea8 : */ void rtems_fatal_error_occurred( uint32_t the_error ) { ffc08ea8: 94 21 ff f8 stwu r1,-8(r1) ffc08eac: 7c 08 02 a6 mflr r0 ffc08eb0: 7c 65 1b 78 mr r5,r3 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); ffc08eb4: 38 80 00 00 li r4,0 */ void rtems_fatal_error_occurred( uint32_t the_error ) { ffc08eb8: 90 01 00 0c stw r0,12(r1) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); ffc08ebc: 38 60 00 01 li r3,1 ffc08ec0: 48 00 0e cd bl ffc09d8c <_Internal_error_Occurred> <== ALWAYS TAKEN ffc0b550 : #endif #include const char *rtems_get_version_string(void) { ffc0b550: 3c 60 ff c2 lis r3,-62 return _RTEMS_version; } ffc0b554: 38 63 3f f0 addi r3,r3,16368 ffc0b558: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08d44 : /* * Run the API and BSPs predriver hook. */ _API_extensions_Run_predriver(); #endif } ffc08d44: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08d98 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { ffc08d98: 94 21 ff f0 stwu r1,-16(r1) ffc08d9c: 7c 08 02 a6 mflr r0 ffc08da0: 93 c1 00 08 stw r30,8(r1) ffc08da4: 3b c0 00 00 li r30,0 ffc08da8: 93 e1 00 0c stw r31,12(r1) ffc08dac: 3f e0 00 00 lis r31,0 ffc08db0: 90 01 00 14 stw r0,20(r1) ffc08db4: 93 df 27 90 stw r30,10128(r31) #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); ffc08db8: 48 01 32 e9 bl ffc1c0a0 <_CPU_Initialize> <== ALWAYS TAKEN /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); ffc08dbc: 48 00 5d 09 bl ffc0eac4 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); ffc08dc0: 48 00 02 d1 bl ffc09090 <_API_extensions_Initialization> <== ALWAYS TAKEN * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; ffc08dc4: 38 00 00 01 li r0,1 <== ALWAYS TAKEN ffc08dc8: 3d 20 00 00 lis r9,0 ffc08dcc: 90 09 27 2c stw r0,10028(r9) /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); ffc08dd0: 48 00 3c 69 bl ffc0ca38 <_Workspace_Handler_initialization> <== ALWAYS TAKEN _User_extensions_Handler_initialization(); ffc08dd4: 48 00 33 ad bl ffc0c180 <_User_extensions_Handler_initialization> <== ALWAYS TAKEN _ISR_Handler_initialization(); ffc08dd8: 48 00 0f f9 bl ffc09dd0 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; ffc08ddc: 3d 20 00 00 lis r9,0 ffc08de0: 38 09 2c 00 addi r0,r9,11264 _API_Mutex_Initialization( 1 ); ffc08de4: 38 60 00 01 li r3,1 _ISR_Handler_initialization(); /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; ffc08de8: 3d 20 00 00 lis r9,0 ffc08dec: 90 09 2b 84 stw r0,11140(r9) <== ALWAYS TAKEN _API_Mutex_Initialization( 1 ); ffc08df0: 48 00 04 99 bl ffc09288 <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); ffc08df4: 3c 60 00 00 lis r3,0 ffc08df8: 38 63 27 64 addi r3,r3,10084 ffc08dfc: 48 00 03 ad bl ffc091a8 <_API_Mutex_Allocate> <== ALWAYS TAKEN { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; ffc08e00: 39 60 00 10 li r11,16 ffc08e04: 7d 69 03 a6 mtctr r11 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; ffc08e08: 3d 20 00 00 lis r9,0 ffc08e0c: 93 c9 27 60 stw r30,10080(r9) ffc08e10: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc08e14: 39 29 2d 00 addi r9,r9,11520 for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; ffc08e18: 38 00 00 00 li r0,0 ffc08e1c: 90 09 00 00 stw r0,0(r9) ffc08e20: 39 29 00 04 addi r9,r9,4 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) ffc08e24: 42 00 ff f8 bdnz+ ffc08e1c _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); ffc08e28: 48 00 39 71 bl ffc0c798 <_Watchdog_Handler_initialization> <== ALWAYS TAKEN _TOD_Handler_initialization(); ffc08e2c: 48 00 0a 8d bl ffc098b8 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); ffc08e30: 48 00 24 dd bl ffc0b30c <_Thread_Handler_initialization> <== ALWAYS TAKEN _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); ffc08e34: 48 00 02 05 bl ffc09038 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); ffc08e38: 48 00 00 2d bl ffc08e64 <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); ffc08e3c: 48 00 00 ed bl ffc08f28 <_IO_Manager_initialization> <== ALWAYS TAKEN ffc08e40: 38 00 00 01 li r0,1 <== ALWAYS TAKEN ffc08e44: 90 1f 27 90 stw r0,10128(r31) <== ALWAYS TAKEN * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); ffc08e48: 48 00 1d dd bl ffc0ac24 <_Thread_Create_idle> <== ALWAYS TAKEN /* * Scheduling can properly occur now as long as we avoid dispatching. */ } ffc08e4c: 80 01 00 14 lwz r0,20(r1) <== ALWAYS TAKEN ffc08e50: 83 c1 00 08 lwz r30,8(r1) <== ALWAYS TAKEN ffc08e54: 7c 08 03 a6 mtlr r0 ffc08e58: 83 e1 00 0c lwz r31,12(r1) <== ALWAYS TAKEN ffc08e5c: 38 21 00 10 addi r1,r1,16 ffc08e60: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08d74 : _API_extensions_Run_predriver(); #endif } void rtems_initialize_device_drivers(void) { ffc08d74: 94 21 ff f8 stwu r1,-8(r1) <== ALWAYS TAKEN ffc08d78: 7c 08 02 a6 mflr r0 ffc08d7c: 90 01 00 0c stw r0,12(r1) * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); ffc08d80: 48 00 01 45 bl ffc08ec4 <_IO_Initialize_all_drivers> <== ALWAYS TAKEN /* * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); ffc08d84: 48 00 03 2d bl ffc090b0 <_API_extensions_Run_postdriver> <== ALWAYS TAKEN } ffc08d88: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc08d8c: 38 21 00 08 addi r1,r1,8 ffc08d90: 7c 08 03 a6 mtlr r0 ffc08d94: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08d48 : */ _API_extensions_Run_postdriver(); } void rtems_initialize_start_multitasking(void) { ffc08d48: 94 21 ff f8 stwu r1,-8(r1) ffc08d4c: 7c 08 02 a6 mflr r0 RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc08d50: 3d 20 00 00 lis r9,0 ffc08d54: 90 01 00 0c stw r0,12(r1) ffc08d58: 38 00 00 02 li r0,2 <== ALWAYS TAKEN ffc08d5c: 90 09 27 90 stw r0,10128(r9) _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); _Thread_Start_multitasking(); ffc08d60: 48 00 30 55 bl ffc0bdb4 <_Thread_Start_multitasking> <== ALWAYS TAKEN ****** APPLICATION RUNS HERE ****** ****** RETURNS WHEN SYSTEM IS SHUT DOWN ****** ******************************************************************* ******************************************************************* *******************************************************************/ } ffc08d64: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc08d68: 38 21 00 08 addi r1,r1,8 ffc08d6c: 7c 08 03 a6 mtlr r0 ffc08d70: 4e 80 00 20 blr <== ALWAYS TAKEN ffc095dc : static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc095dc: 7c 60 00 a6 mfmsr r3 ffc095e0: 7c 10 42 a6 mfsprg r0,0 ffc095e4: 7c 60 00 78 andc r0,r3,r0 ffc095e8: 7c 00 01 24 mtmsr r0 rtems_interrupt_level previous_level; _ISR_Disable( previous_level ); return previous_level; } ffc095ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc095f0 : return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc095f0: 7c 60 01 24 mtmsr r3 void rtems_interrupt_enable( rtems_interrupt_level previous_level ) { _ISR_Enable( previous_level ); } ffc095f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc095f8 : static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc095f8: 7c 00 00 a6 mfmsr r0 ffc095fc: 7c 60 01 24 mtmsr r3 ffc09600: 7c 00 01 24 mtmsr r0 void rtems_interrupt_flash( rtems_interrupt_level previous_level ) { _ISR_Flash( previous_level ); } ffc09604: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09608 : #undef rtems_interrupt_is_in_progress bool rtems_interrupt_is_in_progress( void ) { return _ISR_Is_in_progress(); ffc09608: 3d 20 00 00 lis r9,0 ffc0960c: 80 69 27 88 lwz r3,10120(r9) } ffc09610: 31 23 ff ff addic r9,r3,-1 ffc09614: 7c 09 19 10 subfe r0,r9,r3 ffc09618: 7c 03 03 78 mr r3,r0 ffc0961c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08eb4 : rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); } ffc08eb4: 54 63 07 fe clrlwi r3,r3,31 ffc08eb8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10e88 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10e88: 7c 08 02 a6 mflr r0 ffc10e8c: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10e90: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10e94: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10e98: 80 09 27 a4 lwz r0,10148(r9) ffc10e9c: 7f 80 18 40 cmplw cr7,r0,r3 ffc10ea0: 38 00 00 0a li r0,10 ffc10ea4: 40 9d 00 30 ble- cr7,ffc10ed4 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; ffc10ea8: 3d 60 00 00 lis r11,0 ffc10eac: 80 0b 27 a8 lwz r0,10152(r11) ffc10eb0: 1d 23 00 18 mulli r9,r3,24 ffc10eb4: 7d 20 4a 14 add r9,r0,r9 ffc10eb8: 81 29 00 08 lwz r9,8(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc10ebc: 38 00 00 00 li r0,0 ffc10ec0: 2f 89 00 00 cmpwi cr7,r9,0 ffc10ec4: 41 9e 00 10 beq- cr7,ffc10ed4 ffc10ec8: 7d 29 03 a6 mtctr r9 ffc10ecc: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc10ed0: 7c 60 1b 78 mr r0,r3 } ffc10ed4: 7c 03 03 78 mr r3,r0 ffc10ed8: 80 01 00 0c lwz r0,12(r1) ffc10edc: 38 21 00 08 addi r1,r1,8 ffc10ee0: 7c 08 03 a6 mtlr r0 ffc10ee4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10ee8 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10ee8: 7c 08 02 a6 mflr r0 ffc10eec: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10ef0: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10ef4: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10ef8: 80 09 27 a4 lwz r0,10148(r9) ffc10efc: 7f 80 18 40 cmplw cr7,r0,r3 ffc10f00: 38 00 00 0a li r0,10 <== ALWAYS TAKEN ffc10f04: 40 9d 00 30 ble- cr7,ffc10f34 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; ffc10f08: 3d 60 00 00 lis r11,0 ffc10f0c: 80 0b 27 a8 lwz r0,10152(r11) ffc10f10: 1d 23 00 18 mulli r9,r3,24 ffc10f14: 7d 20 4a 14 add r9,r0,r9 ffc10f18: 81 29 00 14 lwz r9,20(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc10f1c: 38 00 00 00 li r0,0 ffc10f20: 2f 89 00 00 cmpwi cr7,r9,0 ffc10f24: 41 9e 00 10 beq- cr7,ffc10f34 ffc10f28: 7d 29 03 a6 mtctr r9 ffc10f2c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc10f30: 7c 60 1b 78 mr r0,r3 } ffc10f34: 7c 03 03 78 mr r3,r0 ffc10f38: 80 01 00 0c lwz r0,12(r1) ffc10f3c: 38 21 00 08 addi r1,r1,8 ffc10f40: 7c 08 03 a6 mtlr r0 ffc10f44: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eb18 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0eb18: 7c 08 02 a6 mflr r0 ffc0eb1c: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0eb20: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0eb24: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0eb28: 80 09 27 a4 lwz r0,10148(r9) ffc0eb2c: 7f 80 18 40 cmplw cr7,r0,r3 ffc0eb30: 38 00 00 0a li r0,10 ffc0eb34: 40 9d 00 2c ble- cr7,ffc0eb60 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; ffc0eb38: 3d 60 00 00 lis r11,0 ffc0eb3c: 81 6b 27 a8 lwz r11,10152(r11) <== ALWAYS TAKEN ffc0eb40: 1d 23 00 18 mulli r9,r3,24 ffc0eb44: 7d 2b 48 2e lwzx r9,r11,r9 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc0eb48: 38 00 00 00 li r0,0 ffc0eb4c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0eb50: 41 9e 00 10 beq- cr7,ffc0eb60 ffc0eb54: 7d 29 03 a6 mtctr r9 ffc0eb58: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0eb5c: 7c 60 1b 78 mr r0,r3 } ffc0eb60: 7c 03 03 78 mr r3,r0 ffc0eb64: 80 01 00 0c lwz r0,12(r1) ffc0eb68: 38 21 00 08 addi r1,r1,8 ffc0eb6c: 7c 08 03 a6 mtlr r0 ffc0eb70: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10f48 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10f48: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc10f4c: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10f50: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10f54: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10f58: 80 09 27 a4 lwz r0,10148(r9) <== ALWAYS TAKEN ffc10f5c: 7f 80 18 40 cmplw cr7,r0,r3 ffc10f60: 38 00 00 0a li r0,10 ffc10f64: 40 9d 00 30 ble- cr7,ffc10f94 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; ffc10f68: 3d 60 00 00 lis r11,0 ffc10f6c: 80 0b 27 a8 lwz r0,10152(r11) <== ALWAYS TAKEN ffc10f70: 1d 23 00 18 mulli r9,r3,24 ffc10f74: 7d 20 4a 14 add r9,r0,r9 ffc10f78: 81 29 00 04 lwz r9,4(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc10f7c: 38 00 00 00 li r0,0 ffc10f80: 2f 89 00 00 cmpwi cr7,r9,0 ffc10f84: 41 9e 00 10 beq- cr7,ffc10f94 ffc10f88: 7d 29 03 a6 mtctr r9 ffc10f8c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc10f90: 7c 60 1b 78 mr r0,r3 } ffc10f94: 7c 03 03 78 mr r3,r0 ffc10f98: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc10f9c: 38 21 00 08 addi r1,r1,8 ffc10fa0: 7c 08 03 a6 mtlr r0 ffc10fa4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10fa8 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10fa8: 7c 08 02 a6 mflr r0 ffc10fac: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10fb0: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc10fb4: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc10fb8: 80 09 27 a4 lwz r0,10148(r9) ffc10fbc: 7f 80 18 40 cmplw cr7,r0,r3 ffc10fc0: 38 00 00 0a li r0,10 ffc10fc4: 40 9d 00 30 ble- cr7,ffc10ff4 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; ffc10fc8: 3d 60 00 00 lis r11,0 ffc10fcc: 80 0b 27 a8 lwz r0,10152(r11) ffc10fd0: 1d 23 00 18 mulli r9,r3,24 ffc10fd4: 7d 20 4a 14 add r9,r0,r9 ffc10fd8: 81 29 00 0c lwz r9,12(r9) <== ALWAYS TAKEN return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc10fdc: 38 00 00 00 li r0,0 ffc10fe0: 2f 89 00 00 cmpwi cr7,r9,0 ffc10fe4: 41 9e 00 10 beq- cr7,ffc10ff4 ffc10fe8: 7d 29 03 a6 mtctr r9 ffc10fec: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc10ff0: 7c 60 1b 78 mr r0,r3 } ffc10ff4: 7c 03 03 78 mr r3,r0 ffc10ff8: 80 01 00 0c lwz r0,12(r1) ffc10ffc: 38 21 00 08 addi r1,r1,8 ffc11000: 7c 08 03 a6 mtlr r0 ffc11004: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0af1c : 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 ) { ffc0af1c: 94 21 ff f0 stwu r1,-16(r1) ffc0af20: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0af24: 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 ) { ffc0af28: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0af2c: 80 09 27 74 lwz r0,10100(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; ffc0af30: 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 ) { ffc0af34: 93 e1 00 0c stw r31,12(r1) ffc0af38: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0af3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af40: 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; ffc0af44: 80 09 27 c0 lwz r0,10176(r9) if ( rtems_interrupt_is_in_progress() ) ffc0af48: 40 9e 00 e8 bne- cr7,ffc0b030 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0af4c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0af50: 41 9e 01 38 beq- cr7,ffc0b088 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0af54: 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; ffc0af58: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0af5c: 41 9e 01 2c beq- cr7,ffc0b088 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0af60: 81 64 00 00 lwz r11,0(r4) ffc0af64: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0af68: 41 9e 01 14 beq- cr7,ffc0b07c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0af6c: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0af70: 38 60 00 0a li r3,10 ffc0af74: 40 9d 00 bc ble- cr7,ffc0b030 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0af78: 3d 60 00 00 lis r11,0 ffc0af7c: 81 4b 27 4c lwz r10,10060(r11) ffc0af80: 38 0a 00 01 addi r0,r10,1 ffc0af84: 90 0b 27 4c stw r0,10060(r11) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0af88: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0af8c: 40 9e 00 b8 bne- cr7,ffc0b044 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0af90: 81 69 27 c0 lwz r11,10176(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0af94: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0af98: 41 9e 01 08 beq- cr7,ffc0b0a0 <== NEVER TAKEN ffc0af9c: 3d 20 00 00 lis r9,0 ffc0afa0: 7d 69 03 a6 mtctr r11 ffc0afa4: 81 49 27 c4 lwz r10,10180(r9) ffc0afa8: 7d 49 53 78 mr r9,r10 ffc0afac: 40 be 00 14 bne+ cr7,ffc0afc0 <== ALWAYS TAKEN ffc0afb0: 48 00 01 14 b ffc0b0c4 <== NOT EXECUTED ffc0afb4: 3b ff 00 01 addi r31,r31,1 ffc0afb8: 39 29 00 18 addi r9,r9,24 ffc0afbc: 42 40 00 1c bdz- ffc0afd8 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0afc0: 80 09 00 00 lwz r0,0(r9) ffc0afc4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0afc8: 40 9e ff ec bne+ cr7,ffc0afb4 ffc0afcc: 80 09 00 04 lwz r0,4(r9) ffc0afd0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0afd4: 40 9e ff e0 bne+ cr7,ffc0afb4 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0afd8: 7f 8b f8 00 cmpw cr7,r11,r31 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0afdc: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc0afe0: 41 9e 00 c4 beq- cr7,ffc0b0a4 ffc0afe4: 1d 3f 00 18 mulli r9,r31,24 ffc0afe8: 7d 2a 4a 14 add r9,r10,r9 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0afec: 81 64 00 08 lwz r11,8(r4) ffc0aff0: 80 04 00 0c lwz r0,12(r4) ffc0aff4: 81 04 00 00 lwz r8,0(r4) ffc0aff8: 81 44 00 04 lwz r10,4(r4) ffc0affc: 91 09 00 00 stw r8,0(r9) <== ALWAYS TAKEN ffc0b000: 91 49 00 04 stw r10,4(r9) ffc0b004: 91 69 00 08 stw r11,8(r9) ffc0b008: 90 09 00 0c stw r0,12(r9) ffc0b00c: 81 64 00 14 lwz r11,20(r4) ffc0b010: 80 04 00 10 lwz r0,16(r4) ffc0b014: 91 69 00 14 stw r11,20(r9) ffc0b018: 90 09 00 10 stw r0,16(r9) _Thread_Enable_dispatch(); ffc0b01c: 48 00 21 95 bl ffc0d1b0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return rtems_io_initialize( major, 0, NULL ); ffc0b020: 7f e3 fb 78 mr r3,r31 ffc0b024: 38 80 00 00 li r4,0 ffc0b028: 38 a0 00 00 li r5,0 ffc0b02c: 48 00 a3 d5 bl ffc15400 <== ALWAYS TAKEN } ffc0b030: 80 01 00 14 lwz r0,20(r1) ffc0b034: 83 e1 00 0c lwz r31,12(r1) ffc0b038: 38 21 00 10 addi r1,r1,16 ffc0b03c: 7c 08 03 a6 mtlr r0 ffc0b040: 4e 80 00 20 blr <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0b044: 3d 20 00 00 lis r9,0 ffc0b048: 81 29 27 c4 lwz r9,10180(r9) ffc0b04c: 1c 1f 00 18 mulli r0,r31,24 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b050: 7d 69 00 2e lwzx r11,r9,r0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0b054: 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; ffc0b058: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b05c: 41 9e 00 54 beq- cr7,ffc0b0b0 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(); ffc0b060: 48 00 21 51 bl ffc0d1b0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b064: 80 01 00 14 lwz r0,20(r1) 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(); ffc0b068: 38 60 00 0c li r3,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b06c: 83 e1 00 0c lwz r31,12(r1) ffc0b070: 7c 08 03 a6 mtlr r0 ffc0b074: 38 21 00 10 addi r1,r1,16 ffc0b078: 4e 80 00 20 blr <== ALWAYS TAKEN static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b07c: 81 64 00 04 lwz r11,4(r4) ffc0b080: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b084: 40 9e fe e8 bne+ cr7,ffc0af6c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b088: 80 01 00 14 lwz r0,20(r1) _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); ffc0b08c: 38 60 00 09 li r3,9 } ffc0b090: 83 e1 00 0c lwz r31,12(r1) ffc0b094: 38 21 00 10 addi r1,r1,16 ffc0b098: 7c 08 03 a6 mtlr r0 ffc0b09c: 4e 80 00 20 blr <== ALWAYS TAKEN if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0b0a0: 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(); ffc0b0a4: 48 00 21 0d bl ffc0d1b0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0b0a8: 38 60 00 05 li r3,5 return sc; ffc0b0ac: 4b ff ff 84 b ffc0b030 <== ALWAYS TAKEN static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b0b0: 80 09 00 04 lwz r0,4(r9) ffc0b0b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b0b8: 40 9e ff a8 bne+ cr7,ffc0b060 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0b0bc: 93 e5 00 00 stw r31,0(r5) ffc0b0c0: 4b ff ff 2c b ffc0afec <== ALWAYS TAKEN ffc0b0c4: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b0c8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b0cc: 4b ff fe f4 b ffc0afc0 <== NOT EXECUTED ffc0b0d0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { ffc0b0d0: 7c 08 02 a6 mflr r0 ffc0b0d4: 94 21 ff f8 stwu r1,-8(r1) if ( rtems_interrupt_is_in_progress() ) ffc0b0d8: 3d 20 00 00 lis r9,0 */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { ffc0b0dc: 90 01 00 0c stw r0,12(r1) if ( rtems_interrupt_is_in_progress() ) ffc0b0e0: 80 09 27 74 lwz r0,10100(r9) ffc0b0e4: 39 20 00 12 li r9,18 ffc0b0e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b0ec: 40 9e 00 18 bne- cr7,ffc0b104 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { ffc0b0f0: 3d 20 00 00 lis r9,0 ffc0b0f4: 81 69 27 c0 lwz r11,10176(r9) ffc0b0f8: 39 20 00 0d li r9,13 ffc0b0fc: 7f 8b 18 40 cmplw cr7,r11,r3 ffc0b100: 41 9d 00 18 bgt- cr7,ffc0b118 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } ffc0b104: 80 01 00 0c lwz r0,12(r1) ffc0b108: 7d 23 4b 78 mr r3,r9 ffc0b10c: 38 21 00 08 addi r1,r1,8 ffc0b110: 7c 08 03 a6 mtlr r0 ffc0b114: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b118: 3d 20 00 00 lis r9,0 ffc0b11c: 81 69 27 4c lwz r11,10060(r9) ffc0b120: 39 6b 00 01 addi r11,r11,1 ffc0b124: 91 69 27 4c stw r11,10060(r9) if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( ffc0b128: 3d 20 00 00 lis r9,0 ffc0b12c: 81 69 27 c4 lwz r11,10180(r9) ffc0b130: 1c 63 00 18 mulli r3,r3,24 ffc0b134: 7d 2b 1a 14 add r9,r11,r3 ffc0b138: 7c 0b 19 2e stwx r0,r11,r3 ffc0b13c: 90 09 00 14 stw r0,20(r9) ffc0b140: 90 09 00 04 stw r0,4(r9) ffc0b144: 90 09 00 08 stw r0,8(r9) ffc0b148: 90 09 00 0c stw r0,12(r9) ffc0b14c: 90 09 00 10 stw r0,16(r9) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); ffc0b150: 48 00 20 61 bl ffc0d1b0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } ffc0b154: 80 01 00 0c lwz r0,12(r1) memset( &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); ffc0b158: 39 20 00 00 li r9,0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } ffc0b15c: 7c 08 03 a6 mtlr r0 ffc0b160: 7d 23 4b 78 mr r3,r9 ffc0b164: 38 21 00 08 addi r1,r1,8 ffc0b168: 4e 80 00 20 blr <== ALWAYS TAKEN ffc11008 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc11008: 7c 08 02 a6 mflr r0 ffc1100c: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc11010: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc11014: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc11018: 80 09 27 a4 lwz r0,10148(r9) ffc1101c: 7f 80 18 40 cmplw cr7,r0,r3 ffc11020: 38 00 00 0a li r0,10 <== ALWAYS TAKEN ffc11024: 40 9d 00 30 ble- cr7,ffc11054 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; ffc11028: 3d 60 00 00 lis r11,0 ffc1102c: 80 0b 27 a8 lwz r0,10152(r11) ffc11030: 1d 23 00 18 mulli r9,r3,24 <== ALWAYS TAKEN ffc11034: 7d 20 4a 14 add r9,r0,r9 ffc11038: 81 29 00 10 lwz r9,16(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc1103c: 38 00 00 00 li r0,0 ffc11040: 2f 89 00 00 cmpwi cr7,r9,0 ffc11044: 41 9e 00 10 beq- cr7,ffc11054 ffc11048: 7d 29 03 a6 mtctr r9 ffc1104c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc11050: 7c 60 1b 78 mr r0,r3 } ffc11054: 7c 03 03 78 mr r3,r0 <== ALWAYS TAKEN ffc11058: 80 01 00 0c lwz r0,12(r1) ffc1105c: 38 21 00 08 addi r1,r1,8 ffc11060: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc11064: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0bf50 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0bf50: 94 21 ff e0 stwu r1,-32(r1) ffc0bf54: 7c 08 02 a6 mflr r0 ffc0bf58: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0bf5c: 7c 60 1b 79 mr. r0,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0bf60: 93 81 00 10 stw r28,16(r1) ffc0bf64: 93 a1 00 14 stw r29,20(r1) ffc0bf68: 93 c1 00 18 stw r30,24(r1) ffc0bf6c: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0bf70: 90 01 00 08 stw r0,8(r1) ffc0bf74: 41 82 00 7c beq- ffc0bff0 <== NEVER TAKEN ffc0bf78: 3f a0 00 01 lis r29,1 ffc0bf7c: 3b bd a9 84 addi r29,r29,-22140 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0bf80: 3b 9d 00 10 addi r28,r29,16 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) ffc0bf84: 81 3d 00 00 lwz r9,0(r29) ffc0bf88: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bf8c: 41 9e 00 58 beq- cr7,ffc0bfe4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; ffc0bf90: 83 c9 00 04 lwz r30,4(r9) if ( !information ) ffc0bf94: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0bf98: 41 9e 00 4c beq- cr7,ffc0bfe4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0bf9c: a1 3e 00 10 lhz r9,16(r30) ffc0bfa0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bfa4: 41 9e 00 40 beq- cr7,ffc0bfe4 <== NEVER TAKEN ffc0bfa8: 3b e0 00 01 li r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0bfac: 81 7e 00 1c lwz r11,28(r30) ffc0bfb0: 57 e0 10 3a rlwinm r0,r31,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0bfb4: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0bfb8: 7c 0b 00 2e lwzx r0,r11,r0 if ( !the_thread ) ffc0bfbc: 2f 80 00 00 cmpwi cr7,r0,0 continue; (*routine)(the_thread); ffc0bfc0: 7c 03 03 78 mr r3,r0 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) ffc0bfc4: 41 9e 00 14 beq- cr7,ffc0bfd8 <== NEVER TAKEN continue; (*routine)(the_thread); ffc0bfc8: 80 01 00 08 lwz r0,8(r1) ffc0bfcc: 7c 09 03 a6 mtctr r0 ffc0bfd0: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0bfd4: a1 3e 00 10 lhz r9,16(r30) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0bfd8: 55 20 04 3e clrlwi r0,r9,16 ffc0bfdc: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0bfe0: 40 9c ff cc bge+ cr7,ffc0bfac ffc0bfe4: 3b bd 00 04 addi r29,r29,4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0bfe8: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0bfec: 40 9e ff 98 bne+ cr7,ffc0bf84 (*routine)(the_thread); } } } ffc0bff0: 80 01 00 24 lwz r0,36(r1) ffc0bff4: 83 81 00 10 lwz r28,16(r1) ffc0bff8: 7c 08 03 a6 mtlr r0 ffc0bffc: 83 a1 00 14 lwz r29,20(r1) <== ALWAYS TAKEN ffc0c000: 83 c1 00 18 lwz r30,24(r1) ffc0c004: 83 e1 00 1c lwz r31,28(r1) ffc0c008: 38 21 00 20 addi r1,r1,32 ffc0c00c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc175a8 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { ffc175a8: 94 21 ff d0 stwu r1,-48(r1) ffc175ac: 7c 08 02 a6 mflr r0 ffc175b0: 93 81 00 20 stw r28,32(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) ffc175b4: 7c 9c 23 79 mr. r28,r4 rtems_id id, const void *buffer, size_t size, uint32_t *count ) { ffc175b8: 93 a1 00 24 stw r29,36(r1) ffc175bc: 7c bd 2b 78 mr r29,r5 ffc175c0: 93 c1 00 28 stw r30,40(r1) ffc175c4: 7c 7e 1b 78 mr r30,r3 ffc175c8: 93 e1 00 2c stw r31,44(r1) ffc175cc: 7c df 33 78 mr r31,r6 ffc175d0: 90 01 00 34 stw r0,52(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) ffc175d4: 41 82 00 a0 beq- ffc17674 return RTEMS_INVALID_ADDRESS; if ( !count ) ffc175d8: 2f 86 00 00 cmpwi cr7,r6,0 ffc175dc: 41 9e 00 98 beq- cr7,ffc17674 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc175e0: 3c 60 00 00 lis r3,0 ffc175e4: 38 63 72 04 addi r3,r3,29188 ffc175e8: 7f c4 f3 78 mr r4,r30 ffc175ec: 38 a1 00 08 addi r5,r1,8 ffc175f0: 48 00 69 09 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc175f4: 80 01 00 08 lwz r0,8(r1) ffc175f8: 7c 69 1b 78 mr r9,r3 ffc175fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc17600: 38 60 00 04 li r3,4 ffc17604: 41 9e 00 24 beq- cr7,ffc17628 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17608: 80 01 00 34 lwz r0,52(r1) ffc1760c: 83 81 00 20 lwz r28,32(r1) ffc17610: 7c 08 03 a6 mtlr r0 ffc17614: 83 a1 00 24 lwz r29,36(r1) ffc17618: 83 c1 00 28 lwz r30,40(r1) ffc1761c: 83 e1 00 2c lwz r31,44(r1) ffc17620: 38 21 00 30 addi r1,r1,48 ffc17624: 4e 80 00 20 blr <== ALWAYS TAKEN the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( ffc17628: 7f 84 e3 78 mr r4,r28 ffc1762c: 7f a5 eb 78 mr r5,r29 ffc17630: 7f c6 f3 78 mr r6,r30 ffc17634: 7f e8 fb 78 mr r8,r31 ffc17638: 38 69 00 14 addi r3,r9,20 ffc1763c: 38 e0 00 00 li r7,0 ffc17640: 48 00 49 41 bl ffc1bf80 <_CORE_message_queue_Broadcast> <== ALWAYS TAKEN NULL, #endif count ); _Thread_Enable_dispatch(); ffc17644: 90 61 00 18 stw r3,24(r1) ffc17648: 48 00 74 f1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Message_queue_Translate_core_message_queue_return_code( core_status ); ffc1764c: 80 61 00 18 lwz r3,24(r1) ffc17650: 48 00 05 01 bl ffc17b50 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17654: 80 01 00 34 lwz r0,52(r1) ffc17658: 83 81 00 20 lwz r28,32(r1) ffc1765c: 7c 08 03 a6 mtlr r0 ffc17660: 83 a1 00 24 lwz r29,36(r1) ffc17664: 83 c1 00 28 lwz r30,40(r1) ffc17668: 83 e1 00 2c lwz r31,44(r1) ffc1766c: 38 21 00 30 addi r1,r1,48 ffc17670: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17674: 80 01 00 34 lwz r0,52(r1) #endif count ); _Thread_Enable_dispatch(); return ffc17678: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1767c: 83 81 00 20 lwz r28,32(r1) ffc17680: 7c 08 03 a6 mtlr r0 ffc17684: 83 a1 00 24 lwz r29,36(r1) ffc17688: 83 c1 00 28 lwz r30,40(r1) ffc1768c: 83 e1 00 2c lwz r31,44(r1) ffc17690: 38 21 00 30 addi r1,r1,48 ffc17694: 4e 80 00 20 blr <== ALWAYS TAKEN ffc130a8 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { ffc130a8: 94 21 ff c8 stwu r1,-56(r1) ffc130ac: 7c 08 02 a6 mflr r0 ffc130b0: 93 e1 00 34 stw r31,52(r1) CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) ffc130b4: 7c 7f 1b 79 mr. r31,r3 ffc130b8: 38 60 00 03 li r3,3 uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { ffc130bc: 93 c1 00 30 stw r30,48(r1) ffc130c0: 7c be 2b 78 mr r30,r5 ffc130c4: 90 01 00 3c stw r0,60(r1) ffc130c8: 93 a1 00 2c stw r29,44(r1) CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) ffc130cc: 41 82 00 28 beq- ffc130f4 return RTEMS_INVALID_NAME; if ( !id ) ffc130d0: 2f 87 00 00 cmpwi cr7,r7,0 ffc130d4: 38 60 00 09 li r3,9 ffc130d8: 41 9e 00 1c beq- cr7,ffc130f4 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) ffc130dc: 2f 84 00 00 cmpwi cr7,r4,0 ffc130e0: 38 60 00 0a li r3,10 ffc130e4: 41 9e 00 10 beq- cr7,ffc130f4 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) ffc130e8: 2f 85 00 00 cmpwi cr7,r5,0 ffc130ec: 38 60 00 08 li r3,8 ffc130f0: 40 9e 00 20 bne- cr7,ffc13110 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc130f4: 80 01 00 3c lwz r0,60(r1) ffc130f8: 83 a1 00 2c lwz r29,44(r1) ffc130fc: 7c 08 03 a6 mtlr r0 ffc13100: 83 c1 00 30 lwz r30,48(r1) ffc13104: 83 e1 00 34 lwz r31,52(r1) ffc13108: 38 21 00 38 addi r1,r1,56 ffc1310c: 4e 80 00 20 blr <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc13110: 3d 20 00 00 lis r9,0 ffc13114: 81 69 27 cc lwz r11,10188(r9) ffc13118: 38 0b 00 01 addi r0,r11,1 ffc1311c: 90 09 27 cc stw r0,10188(r9) #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); ffc13120: 90 81 00 18 stw r4,24(r1) ffc13124: 90 c1 00 1c stw r6,28(r1) ffc13128: 90 e1 00 20 stw r7,32(r1) ffc1312c: 48 00 6f 75 bl ffc1a0a0 <_Message_queue_Allocate> <== ALWAYS TAKEN if ( !the_message_queue ) { ffc13130: 7c 7d 1b 79 mr. r29,r3 ffc13134: 80 81 00 18 lwz r4,24(r1) ffc13138: 80 c1 00 1c lwz r6,28(r1) ffc1313c: 80 e1 00 20 lwz r7,32(r1) ffc13140: 41 82 00 88 beq- ffc131c8 } #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) ffc13144: 70 c0 00 04 andi. r0,r6,4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; ffc13148: 90 dd 00 10 stw r6,16(r29) if (_Attributes_Is_priority( attribute_set ) ) ffc1314c: 41 82 00 4c beq- ffc13198 the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; ffc13150: 38 00 00 01 li r0,1 ffc13154: 90 01 00 08 stw r0,8(r1) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( ffc13158: 7c 85 23 78 mr r5,r4 ffc1315c: 90 e1 00 20 stw r7,32(r1) ffc13160: 7f c6 f3 78 mr r6,r30 ffc13164: 38 7d 00 14 addi r3,r29,20 ffc13168: 38 81 00 08 addi r4,r1,8 ffc1316c: 48 00 18 bd bl ffc14a28 <_CORE_message_queue_Initialize> <== ALWAYS TAKEN ffc13170: 80 e1 00 20 lwz r7,32(r1) ffc13174: 2f 83 00 00 cmpwi cr7,r3,0 ffc13178: 40 9e 00 28 bne- cr7,ffc131a0 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); ffc1317c: 3c 60 00 00 lis r3,0 ffc13180: 38 63 2f 64 addi r3,r3,12132 ffc13184: 7f a4 eb 78 mr r4,r29 ffc13188: 48 00 2a 65 bl ffc15bec <_Objects_Free> <== ALWAYS TAKEN _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); ffc1318c: 48 00 38 a1 bl ffc16a2c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc13190: 38 60 00 0d li r3,13 return RTEMS_UNSATISFIED; ffc13194: 4b ff ff 60 b ffc130f4 <== ALWAYS TAKEN the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; ffc13198: 90 01 00 08 stw r0,8(r1) ffc1319c: 4b ff ff bc b ffc13158 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc131a0: 80 1d 00 08 lwz r0,8(r29) ffc131a4: 3d 20 00 00 lis r9,0 ffc131a8: 81 69 2f 80 lwz r11,12160(r9) ffc131ac: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc131b0: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc131b4: 7f ab 49 2e stwx r29,r11,r9 &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; ffc131b8: 90 07 00 00 stw r0,0(r7) name, 0 ); #endif _Thread_Enable_dispatch(); ffc131bc: 48 00 38 71 bl ffc16a2c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc131c0: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc131c4: 4b ff ff 30 b ffc130f4 <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); ffc131c8: 48 00 38 65 bl ffc16a2c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc131cc: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc131d0: 4b ff ff 24 b ffc130f4 <== ALWAYS TAKEN ffc1874c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { ffc1874c: 94 21 ff e0 stwu r1,-32(r1) ffc18750: 7c 08 02 a6 mflr r0 ffc18754: 7c 64 1b 78 mr r4,r3 ffc18758: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc1875c: 3f e0 00 00 lis r31,0 ffc18760: 3b ff 37 44 addi r31,r31,14148 ffc18764: 7f e3 fb 78 mr r3,r31 ffc18768: 90 01 00 24 stw r0,36(r1) ffc1876c: 38 a1 00 08 addi r5,r1,8 ffc18770: 93 c1 00 18 stw r30,24(r1) ffc18774: 4b ff 83 bd bl ffc10b30 <_Objects_Get> <== ALWAYS TAKEN ffc18778: 7c 7e 1b 78 mr r30,r3 register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc1877c: 80 01 00 08 lwz r0,8(r1) ffc18780: 38 60 00 04 li r3,4 ffc18784: 2f 80 00 00 cmpwi cr7,r0,0 ffc18788: 40 9e 00 34 bne- cr7,ffc187bc case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, ffc1878c: 7f e3 fb 78 mr r3,r31 ffc18790: 7f c4 f3 78 mr r4,r30 ffc18794: 4b ff 7e 65 bl ffc105f8 <_Objects_Close> <== ALWAYS TAKEN &the_message_queue->Object ); _CORE_message_queue_Close( ffc18798: 38 a0 00 05 li r5,5 ffc1879c: 38 7e 00 14 addi r3,r30,20 ffc187a0: 38 80 00 00 li r4,0 ffc187a4: 48 00 08 35 bl ffc18fd8 <_CORE_message_queue_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); ffc187a8: 7f e3 fb 78 mr r3,r31 ffc187ac: 7f c4 f3 78 mr r4,r30 ffc187b0: 4b ff 81 a1 bl ffc10950 <_Objects_Free> <== ALWAYS TAKEN 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); ffc187b4: 4b ff 8f bd bl ffc11770 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc187b8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc187bc: 80 01 00 24 lwz r0,36(r1) ffc187c0: 83 c1 00 18 lwz r30,24(r1) ffc187c4: 7c 08 03 a6 mtlr r0 ffc187c8: 83 e1 00 1c lwz r31,28(r1) ffc187cc: 38 21 00 20 addi r1,r1,32 ffc187d0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1784c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { ffc1784c: 94 21 ff e0 stwu r1,-32(r1) ffc17850: 7c 08 02 a6 mflr r0 ffc17854: 93 e1 00 1c stw r31,28(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc17858: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { ffc1785c: 7c 64 1b 78 mr r4,r3 ffc17860: 90 01 00 24 stw r0,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc17864: 38 60 00 09 li r3,9 ffc17868: 41 82 00 28 beq- ffc17890 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc1786c: 3c 60 00 00 lis r3,0 ffc17870: 38 63 72 04 addi r3,r3,29188 ffc17874: 38 a1 00 08 addi r5,r1,8 ffc17878: 48 00 66 81 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc1787c: 80 01 00 08 lwz r0,8(r1) ffc17880: 7c 69 1b 78 mr r9,r3 ffc17884: 2f 80 00 00 cmpwi cr7,r0,0 ffc17888: 38 60 00 04 li r3,4 ffc1788c: 41 9e 00 18 beq- cr7,ffc178a4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17890: 80 01 00 24 lwz r0,36(r1) ffc17894: 83 e1 00 1c lwz r31,28(r1) ffc17898: 38 21 00 20 addi r1,r1,32 ffc1789c: 7c 08 03 a6 mtlr r0 ffc178a0: 4e 80 00 20 blr <== ALWAYS TAKEN the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); ffc178a4: 38 69 00 14 addi r3,r9,20 ffc178a8: 48 00 48 01 bl ffc1c0a8 <_CORE_message_queue_Flush> <== ALWAYS TAKEN ffc178ac: 90 7f 00 00 stw r3,0(r31) _Thread_Enable_dispatch(); ffc178b0: 48 00 72 89 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc178b4: 80 01 00 24 lwz r0,36(r1) the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); _Thread_Enable_dispatch(); ffc178b8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc178bc: 83 e1 00 1c lwz r31,28(r1) ffc178c0: 7c 08 03 a6 mtlr r0 ffc178c4: 38 21 00 20 addi r1,r1,32 ffc178c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc178cc : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { ffc178cc: 94 21 ff e0 stwu r1,-32(r1) ffc178d0: 7c 08 02 a6 mflr r0 ffc178d4: 93 e1 00 1c stw r31,28(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc178d8: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { ffc178dc: 7c 64 1b 78 mr r4,r3 ffc178e0: 90 01 00 24 stw r0,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc178e4: 38 60 00 09 li r3,9 ffc178e8: 41 82 00 28 beq- ffc17910 ffc178ec: 3c 60 00 00 lis r3,0 ffc178f0: 38 63 72 04 addi r3,r3,29188 ffc178f4: 38 a1 00 08 addi r5,r1,8 ffc178f8: 48 00 66 01 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc178fc: 80 01 00 08 lwz r0,8(r1) ffc17900: 7c 69 1b 78 mr r9,r3 ffc17904: 2f 80 00 00 cmpwi cr7,r0,0 ffc17908: 38 60 00 04 li r3,4 ffc1790c: 41 9e 00 18 beq- cr7,ffc17924 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17910: 80 01 00 24 lwz r0,36(r1) ffc17914: 83 e1 00 1c lwz r31,28(r1) ffc17918: 38 21 00 20 addi r1,r1,32 ffc1791c: 7c 08 03 a6 mtlr r0 ffc17920: 4e 80 00 20 blr <== ALWAYS TAKEN the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; ffc17924: 80 09 00 5c lwz r0,92(r9) ffc17928: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc1792c: 48 00 72 0d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17930: 80 01 00 24 lwz r0,36(r1) the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; _Thread_Enable_dispatch(); ffc17934: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17938: 83 e1 00 1c lwz r31,28(r1) ffc1793c: 7c 08 03 a6 mtlr r0 ffc17940: 38 21 00 20 addi r1,r1,32 ffc17944: 4e 80 00 20 blr <== ALWAYS TAKEN ffc131d4 : rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc131d4: 94 21 ff f8 stwu r1,-8(r1) ffc131d8: 7c 08 02 a6 mflr r0 ffc131dc: 7c 69 1b 78 mr r9,r3 ffc131e0: 90 01 00 0c stw r0,12(r1) Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc131e4: 3c 60 00 00 lis r3,0 rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc131e8: 7c 80 23 78 mr r0,r4 <== ALWAYS TAKEN ffc131ec: 7c a6 2b 78 mr r6,r5 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc131f0: 7d 24 4b 78 mr r4,r9 ffc131f4: 7c 05 03 78 mr r5,r0 ffc131f8: 38 63 2f 64 addi r3,r3,12132 ffc131fc: 48 00 2d 69 bl ffc15f64 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN node, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc13200: 80 01 00 0c lwz r0,12(r1) ffc13204: 3d 20 ff c3 lis r9,-61 ffc13208: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1320c: 54 63 10 3a rlwinm r3,r3,2,0,29 node, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc13210: 39 29 cd 0c addi r9,r9,-13044 ffc13214: 7c 69 18 2e lwzx r3,r9,r3 ffc13218: 38 21 00 08 addi r1,r1,8 ffc1321c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc13220 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { ffc13220: 94 21 ff d8 stwu r1,-40(r1) ffc13224: 7c 08 02 a6 mflr r0 ffc13228: 93 a1 00 1c stw r29,28(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) ffc1322c: 7c 9d 23 79 mr. r29,r4 void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { ffc13230: 7c 64 1b 78 mr r4,r3 ffc13234: 93 81 00 18 stw r28,24(r1) ffc13238: 7c dc 33 78 mr r28,r6 ffc1323c: 93 c1 00 20 stw r30,32(r1) ffc13240: 7c fe 3b 78 mr r30,r7 ffc13244: 93 e1 00 24 stw r31,36(r1) ffc13248: 7c bf 2b 78 mr r31,r5 ffc1324c: 90 01 00 2c stw r0,44(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) ffc13250: 41 82 00 a4 beq- ffc132f4 return RTEMS_INVALID_ADDRESS; if ( !size ) ffc13254: 2f 85 00 00 cmpwi cr7,r5,0 ffc13258: 41 9e 00 9c beq- cr7,ffc132f4 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc1325c: 3c 60 00 00 lis r3,0 ffc13260: 38 63 2f 64 addi r3,r3,12132 ffc13264: 38 a1 00 08 addi r5,r1,8 ffc13268: 48 00 2b 65 bl ffc15dcc <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc1326c: 80 01 00 08 lwz r0,8(r1) ffc13270: 7c 69 1b 78 mr r9,r3 ffc13274: 2f 80 00 00 cmpwi cr7,r0,0 ffc13278: 38 60 00 04 li r3,4 ffc1327c: 41 9e 00 24 beq- cr7,ffc132a0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc13280: 80 01 00 2c lwz r0,44(r1) ffc13284: 83 81 00 18 lwz r28,24(r1) ffc13288: 7c 08 03 a6 mtlr r0 ffc1328c: 83 a1 00 1c lwz r29,28(r1) ffc13290: 83 c1 00 20 lwz r30,32(r1) ffc13294: 83 e1 00 24 lwz r31,36(r1) ffc13298: 38 21 00 28 addi r1,r1,40 ffc1329c: 4e 80 00 20 blr <== ALWAYS TAKEN if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( ffc132a0: 80 89 00 08 lwz r4,8(r9) ffc132a4: 6b 87 00 01 xori r7,r28,1 ffc132a8: 7f a5 eb 78 mr r5,r29 ffc132ac: 7f e6 fb 78 mr r6,r31 ffc132b0: 7f c8 f3 78 mr r8,r30 ffc132b4: 38 69 00 14 addi r3,r9,20 ffc132b8: 54 e7 07 fe clrlwi r7,r7,31 ffc132bc: 48 00 18 69 bl ffc14b24 <_CORE_message_queue_Seize> <== ALWAYS TAKEN buffer, size, wait, timeout ); _Thread_Enable_dispatch(); ffc132c0: 48 00 37 6d bl ffc16a2c <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Message_queue_Translate_core_message_queue_return_code( ffc132c4: 3d 20 00 00 lis r9,0 ffc132c8: 81 29 28 0c lwz r9,10252(r9) ffc132cc: 80 69 00 34 lwz r3,52(r9) ffc132d0: 48 00 01 0d bl ffc133dc <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc132d4: 80 01 00 2c lwz r0,44(r1) ffc132d8: 83 81 00 18 lwz r28,24(r1) ffc132dc: 7c 08 03 a6 mtlr r0 ffc132e0: 83 a1 00 1c lwz r29,28(r1) ffc132e4: 83 c1 00 20 lwz r30,32(r1) ffc132e8: 83 e1 00 24 lwz r31,36(r1) ffc132ec: 38 21 00 28 addi r1,r1,40 ffc132f0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc132f4: 80 01 00 2c lwz r0,44(r1) size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( ffc132f8: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc132fc: 83 81 00 18 lwz r28,24(r1) ffc13300: 7c 08 03 a6 mtlr r0 ffc13304: 83 a1 00 1c lwz r29,28(r1) ffc13308: 83 c1 00 20 lwz r30,32(r1) ffc1330c: 83 e1 00 24 lwz r31,36(r1) ffc13310: 38 21 00 28 addi r1,r1,40 ffc13314: 4e 80 00 20 blr <== ALWAYS TAKEN ffc13318 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { ffc13318: 94 21 ff d0 stwu r1,-48(r1) ffc1331c: 7c 08 02 a6 mflr r0 ffc13320: 93 a1 00 24 stw r29,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc13324: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { ffc13328: 93 c1 00 28 stw r30,40(r1) ffc1332c: 7c be 2b 78 mr r30,r5 ffc13330: 93 e1 00 2c stw r31,44(r1) ffc13334: 7c 7f 1b 78 mr r31,r3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc13338: 38 60 00 09 li r3,9 rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { ffc1333c: 90 01 00 34 stw r0,52(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc13340: 41 82 00 2c beq- ffc1336c ffc13344: 3c 60 00 00 lis r3,0 ffc13348: 38 63 2f 64 addi r3,r3,12132 ffc1334c: 7f e4 fb 78 mr r4,r31 ffc13350: 38 a1 00 08 addi r5,r1,8 ffc13354: 48 00 2a 79 bl ffc15dcc <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc13358: 80 01 00 08 lwz r0,8(r1) ffc1335c: 7c 69 1b 78 mr r9,r3 ffc13360: 2f 80 00 00 cmpwi cr7,r0,0 ffc13364: 38 60 00 04 li r3,4 ffc13368: 41 9e 00 20 beq- cr7,ffc13388 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1336c: 80 01 00 34 lwz r0,52(r1) ffc13370: 83 a1 00 24 lwz r29,36(r1) ffc13374: 7c 08 03 a6 mtlr r0 ffc13378: 83 c1 00 28 lwz r30,40(r1) ffc1337c: 83 e1 00 2c lwz r31,44(r1) ffc13380: 38 21 00 30 addi r1,r1,48 ffc13384: 4e 80 00 20 blr <== ALWAYS TAKEN CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( ffc13388: 3d 00 7f ff lis r8,32767 ffc1338c: 7f a4 eb 78 mr r4,r29 ffc13390: 7f c5 f3 78 mr r5,r30 ffc13394: 7f e6 fb 78 mr r6,r31 ffc13398: 61 08 ff ff ori r8,r8,65535 ffc1339c: 38 e0 00 00 li r7,0 ffc133a0: 39 40 00 00 li r10,0 ffc133a4: 38 69 00 14 addi r3,r9,20 ffc133a8: 39 20 00 00 li r9,0 ffc133ac: 48 00 18 99 bl ffc14c44 <_CORE_message_queue_Submit> <== ALWAYS TAKEN MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); ffc133b0: 90 61 00 18 stw r3,24(r1) ffc133b4: 48 00 36 79 bl ffc16a2c <_Thread_Enable_dispatch> <== ALWAYS TAKEN /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); ffc133b8: 80 61 00 18 lwz r3,24(r1) ffc133bc: 48 00 00 21 bl ffc133dc <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc133c0: 80 01 00 34 lwz r0,52(r1) ffc133c4: 83 a1 00 24 lwz r29,36(r1) ffc133c8: 7c 08 03 a6 mtlr r0 ffc133cc: 83 c1 00 28 lwz r30,40(r1) ffc133d0: 83 e1 00 2c lwz r31,44(r1) ffc133d4: 38 21 00 30 addi r1,r1,48 ffc133d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17b64 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { ffc17b64: 94 21 ff d0 stwu r1,-48(r1) ffc17b68: 7c 08 02 a6 mflr r0 ffc17b6c: 93 a1 00 24 stw r29,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc17b70: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { ffc17b74: 93 c1 00 28 stw r30,40(r1) ffc17b78: 7c be 2b 78 mr r30,r5 ffc17b7c: 93 e1 00 2c stw r31,44(r1) ffc17b80: 7c 7f 1b 78 mr r31,r3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc17b84: 38 60 00 09 li r3,9 rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { ffc17b88: 90 01 00 34 stw r0,52(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc17b8c: 41 82 00 2c beq- ffc17bb8 ffc17b90: 3c 60 00 00 lis r3,0 ffc17b94: 38 63 72 04 addi r3,r3,29188 ffc17b98: 7f e4 fb 78 mr r4,r31 ffc17b9c: 38 a1 00 08 addi r5,r1,8 ffc17ba0: 48 00 63 59 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc17ba4: 80 01 00 08 lwz r0,8(r1) ffc17ba8: 7c 69 1b 78 mr r9,r3 ffc17bac: 2f 80 00 00 cmpwi cr7,r0,0 ffc17bb0: 38 60 00 04 li r3,4 ffc17bb4: 41 9e 00 20 beq- cr7,ffc17bd4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17bb8: 80 01 00 34 lwz r0,52(r1) ffc17bbc: 83 a1 00 24 lwz r29,36(r1) ffc17bc0: 7c 08 03 a6 mtlr r0 ffc17bc4: 83 c1 00 28 lwz r30,40(r1) ffc17bc8: 83 e1 00 2c lwz r31,44(r1) ffc17bcc: 38 21 00 30 addi r1,r1,48 ffc17bd0: 4e 80 00 20 blr <== ALWAYS TAKEN CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( ffc17bd4: 7f a4 eb 78 mr r4,r29 ffc17bd8: 7f c5 f3 78 mr r5,r30 ffc17bdc: 7f e6 fb 78 mr r6,r31 ffc17be0: 38 e0 00 00 li r7,0 ffc17be4: 3d 00 80 00 lis r8,-32768 ffc17be8: 39 40 00 00 li r10,0 ffc17bec: 38 69 00 14 addi r3,r9,20 ffc17bf0: 39 20 00 00 li r9,0 ffc17bf4: 48 00 47 65 bl ffc1c358 <_CORE_message_queue_Submit> <== ALWAYS TAKEN id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); ffc17bf8: 90 61 00 18 stw r3,24(r1) ffc17bfc: 48 00 6f 3d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); ffc17c00: 80 61 00 18 lwz r3,24(r1) ffc17c04: 4b ff ff 4d bl ffc17b50 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17c08: 80 01 00 34 lwz r0,52(r1) ffc17c0c: 83 a1 00 24 lwz r29,36(r1) ffc17c10: 7c 08 03 a6 mtlr r0 ffc17c14: 83 c1 00 28 lwz r30,40(r1) ffc17c18: 83 e1 00 2c lwz r31,44(r1) ffc17c1c: 38 21 00 30 addi r1,r1,48 ffc17c20: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a4f4 : #include int rtems_object_api_maximum_class( int api ) { ffc0a4f4: 94 21 ff f8 stwu r1,-8(r1) ffc0a4f8: 7c 08 02 a6 mflr r0 ffc0a4fc: 90 01 00 0c stw r0,12(r1) return _Objects_API_maximum_class(api); ffc0a500: 48 00 20 4d bl ffc0c54c <_Objects_API_maximum_class> <== ALWAYS TAKEN } ffc0a504: 80 01 00 0c lwz r0,12(r1) ffc0a508: 38 21 00 08 addi r1,r1,8 ffc0a50c: 7c 08 03 a6 mtlr r0 ffc0a510: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a514 : */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0a514: 38 63 ff ff addi r3,r3,-1 ffc0a518: 20 63 00 03 subfic r3,r3,3 ffc0a51c: 7c 63 19 10 subfe r3,r3,r3 ) { if ( _Objects_Is_api_valid( api ) ) return 1; return -1; } ffc0a520: 60 63 00 01 ori r3,r3,1 ffc0a524: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a528 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) ffc0a528: 2f 83 00 01 cmpwi cr7,r3,1 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { ffc0a52c: 94 21 ff f8 stwu r1,-8(r1) ffc0a530: 7c 08 02 a6 mflr r0 ffc0a534: 90 01 00 0c stw r0,12(r1) const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) ffc0a538: 41 9e 00 50 beq- cr7,ffc0a588 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) ffc0a53c: 2f 83 00 02 cmpwi cr7,r3,2 ffc0a540: 41 9e 00 1c beq- cr7,ffc0a55c ffc0a544: 3c 60 ff c2 lis r3,-62 ffc0a548: 38 63 45 88 addi r3,r3,17800 return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } ffc0a54c: 80 01 00 0c lwz r0,12(r1) ffc0a550: 38 21 00 08 addi r1,r1,8 ffc0a554: 7c 08 03 a6 mtlr r0 ffc0a558: 4e 80 00 20 blr <== ALWAYS TAKEN const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) ffc0a55c: 3c 60 00 00 lis r3,0 ffc0a560: 38 63 21 78 addi r3,r3,8568 ffc0a564: 38 63 00 18 addi r3,r3,24 else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); ffc0a568: 48 00 62 f5 bl ffc1085c <== ALWAYS TAKEN if ( class_assoc ) ffc0a56c: 2c 03 00 00 cmpwi r3,0 ffc0a570: 41 82 00 24 beq- ffc0a594 return class_assoc->name; return "BAD CLASS"; } ffc0a574: 80 01 00 0c lwz r0,12(r1) ffc0a578: 38 21 00 08 addi r1,r1,8 #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; ffc0a57c: 80 63 00 00 lwz r3,0(r3) return "BAD CLASS"; } ffc0a580: 7c 08 03 a6 mtlr r0 ffc0a584: 4e 80 00 20 blr <== ALWAYS TAKEN ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) ffc0a588: 3c 60 00 00 lis r3,0 ffc0a58c: 38 63 21 78 addi r3,r3,8568 ffc0a590: 4b ff ff d8 b ffc0a568 <== ALWAYS TAKEN api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) ffc0a594: 3c 60 ff c2 lis r3,-62 ffc0a598: 38 63 45 90 addi r3,r3,17808 ffc0a59c: 4b ff ff b0 b ffc0a54c <== ALWAYS TAKEN ffc0a5a0 : }; const char *rtems_object_get_api_name( int api ) { ffc0a5a0: 94 21 ff f8 stwu r1,-8(r1) ffc0a5a4: 7c 08 02 a6 mflr r0 ffc0a5a8: 7c 64 1b 78 mr r4,r3 const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); ffc0a5ac: 3c 60 00 00 lis r3,0 }; const char *rtems_object_get_api_name( int api ) { ffc0a5b0: 90 01 00 0c stw r0,12(r1) const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); ffc0a5b4: 38 63 22 08 addi r3,r3,8712 ffc0a5b8: 48 00 62 a5 bl ffc1085c <== ALWAYS TAKEN if ( api_assoc ) ffc0a5bc: 2c 03 00 00 cmpwi r3,0 ffc0a5c0: 41 82 00 18 beq- ffc0a5d8 return api_assoc->name; return "BAD CLASS"; } ffc0a5c4: 80 01 00 0c lwz r0,12(r1) ffc0a5c8: 38 21 00 08 addi r1,r1,8 { const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) return api_assoc->name; ffc0a5cc: 80 63 00 00 lwz r3,0(r3) return "BAD CLASS"; } ffc0a5d0: 7c 08 03 a6 mtlr r0 ffc0a5d4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a5d8: 80 01 00 0c lwz r0,12(r1) ) { const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) ffc0a5dc: 3c 60 ff c2 lis r3,-62 ffc0a5e0: 38 63 45 90 addi r3,r3,17808 return api_assoc->name; return "BAD CLASS"; } ffc0a5e4: 7c 08 03 a6 mtlr r0 ffc0a5e8: 38 21 00 08 addi r1,r1,8 ffc0a5ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a644 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0a644: 94 21 ff f0 stwu r1,-16(r1) ffc0a648: 7c 08 02 a6 mflr r0 ffc0a64c: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0a650: 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 ) { ffc0a654: 90 01 00 14 stw r0,20(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0a658: 38 00 00 09 li r0,9 ffc0a65c: 41 82 00 78 beq- ffc0a6d4 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc0a660: 48 00 23 51 bl ffc0c9b0 <_Objects_Get_information> <== ALWAYS TAKEN if ( !obj_info ) ffc0a664: 38 00 00 0a li r0,10 ffc0a668: 2c 03 00 00 cmpwi r3,0 ffc0a66c: 41 82 00 68 beq- ffc0a6d4 * 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; ffc0a670: 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; ffc0a674: 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++ ) ffc0a678: 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; info->auto_extend = obj_info->auto_extend; ffc0a67c: 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; ffc0a680: 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++ ) ffc0a684: 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; ffc0a688: 81 63 00 0c lwz r11,12(r3) info->auto_extend = obj_info->auto_extend; ffc0a68c: 99 3f 00 0c stb r9,12(r31) /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0a690: 91 7f 00 04 stw r11,4(r31) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc0a694: 91 1f 00 08 stw r8,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0a698: 41 9e 00 34 beq- cr7,ffc0a6cc <== NEVER TAKEN ffc0a69c: 80 e3 00 1c lwz r7,28(r3) ffc0a6a0: 39 60 00 01 li r11,1 ffc0a6a4: 39 20 00 01 li r9,1 ffc0a6a8: 39 29 00 01 addi r9,r9,1 ffc0a6ac: 7f 88 48 40 cmplw cr7,r8,r9 if ( !obj_info->local_table[i] ) ffc0a6b0: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0a6b4: 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++ ) ffc0a6b8: 7d 2b 4b 78 mr r11,r9 if ( !obj_info->local_table[i] ) unallocated++; ffc0a6bc: 20 ca 00 00 subfic r6,r10,0 ffc0a6c0: 7c c0 01 94 addze r6,r0 ffc0a6c4: 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++ ) ffc0a6c8: 40 9c ff e0 bge+ cr7,ffc0a6a8 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc0a6cc: 90 1f 00 10 stw r0,16(r31) ffc0a6d0: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc0a6d4: 7c 03 03 78 mr r3,r0 ffc0a6d8: 80 01 00 14 lwz r0,20(r1) ffc0a6dc: 83 e1 00 0c lwz r31,12(r1) ffc0a6e0: 38 21 00 10 addi r1,r1,16 ffc0a6e4: 7c 08 03 a6 mtlr r0 ffc0a6e8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e4ec : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { ffc0e4ec: 94 21 ff e0 stwu r1,-32(r1) ffc0e4f0: 7c 08 02 a6 mflr r0 ffc0e4f4: 93 e1 00 1c stw r31,28(r1) Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) ffc0e4f8: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { ffc0e4fc: 90 01 00 24 stw r0,36(r1) Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) ffc0e500: 38 00 00 09 li r0,9 ffc0e504: 41 82 00 24 beq- ffc0e528 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); ffc0e508: 38 81 00 08 addi r4,r1,8 ffc0e50c: 48 00 26 c1 bl ffc10bcc <_Objects_Id_to_name> <== ALWAYS TAKEN *name = name_u.name_u32; ffc0e510: 80 01 00 08 lwz r0,8(r1) return _Status_Object_name_errors_to_status[ status ]; ffc0e514: 3d 20 ff c3 lis r9,-61 ffc0e518: 54 63 10 3a rlwinm r3,r3,2,0,29 if ( !name ) return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; ffc0e51c: 90 1f 00 00 stw r0,0(r31) return _Status_Object_name_errors_to_status[ status ]; ffc0e520: 39 29 f6 6c addi r9,r9,-2452 ffc0e524: 7c 09 18 2e lwzx r0,r9,r3 } ffc0e528: 7c 03 03 78 mr r3,r0 ffc0e52c: 80 01 00 24 lwz r0,36(r1) ffc0e530: 83 e1 00 1c lwz r31,28(r1) ffc0e534: 38 21 00 20 addi r1,r1,32 ffc0e538: 7c 08 03 a6 mtlr r0 ffc0e53c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18abc : char *rtems_object_get_name( Objects_Id id, size_t length, char *name ) { ffc18abc: 94 21 ff f8 stwu r1,-8(r1) ffc18ac0: 7c 08 02 a6 mflr r0 ffc18ac4: 90 01 00 0c stw r0,12(r1) return _Objects_Get_name_as_string( id, length, name ); ffc18ac8: 48 00 0e 89 bl ffc19950 <_Objects_Get_name_as_string> <== ALWAYS TAKEN } ffc18acc: 80 01 00 0c lwz r0,12(r1) ffc18ad0: 38 21 00 08 addi r1,r1,8 ffc18ad4: 7c 08 03 a6 mtlr r0 ffc18ad8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a70c : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; } ffc0a70c: 38 60 00 04 li r3,4 ffc0a710: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a714 : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } ffc0a714: 38 60 00 01 li r3,1 ffc0a718: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a71c : int rtems_object_id_get_api( rtems_id id ) { return _Objects_Get_API( id ); } ffc0a71c: 54 63 47 7e rlwinm r3,r3,8,29,31 ffc0a720: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a724 : int rtems_object_id_get_class( rtems_id id ) { return _Objects_Get_class( id ); } ffc0a724: 54 63 2e fe rlwinm r3,r3,5,27,31 ffc0a728: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a72c : int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); } ffc0a72c: 54 63 04 3e clrlwi r3,r3,16 ffc0a730: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a734 : int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } ffc0a734: 54 63 86 3e rlwinm r3,r3,16,24,31 ffc0a738: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a73c : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { ffc0a73c: 94 21 ff d8 stwu r1,-40(r1) ffc0a740: 7c 08 02 a6 mflr r0 ffc0a744: 93 e1 00 24 stw r31,36(r1) Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) ffc0a748: 7c 9f 23 79 mr. r31,r4 */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { ffc0a74c: 90 01 00 2c stw r0,44(r1) Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) ffc0a750: 38 00 00 09 li r0,9 */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { ffc0a754: 93 a1 00 1c stw r29,28(r1) ffc0a758: 93 c1 00 20 stw r30,32(r1) Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) ffc0a75c: 41 82 00 3c beq- ffc0a798 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0a760: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a764: 7c 7d 1b 78 mr r29,r3 ffc0a768: 41 9e 00 50 beq- cr7,ffc0a7b8 information = _Objects_Get_information_id( tmpId ); ffc0a76c: 7f a3 eb 78 mr r3,r29 ffc0a770: 48 00 22 19 bl ffc0c988 <_Objects_Get_information_id> <== ALWAYS TAKEN if ( !information ) ffc0a774: 7c 7e 1b 79 mr. r30,r3 ffc0a778: 41 82 00 1c beq- ffc0a794 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); ffc0a77c: 7f a4 eb 78 mr r4,r29 ffc0a780: 38 a1 00 08 addi r5,r1,8 ffc0a784: 48 00 24 51 bl ffc0cbd4 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { ffc0a788: 80 01 00 08 lwz r0,8(r1) ffc0a78c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a790: 41 9e 00 38 beq- cr7,ffc0a7c8 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc0a794: 38 00 00 04 li r0,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a798: 7c 03 03 78 mr r3,r0 ffc0a79c: 80 01 00 2c lwz r0,44(r1) ffc0a7a0: 83 a1 00 1c lwz r29,28(r1) ffc0a7a4: 7c 08 03 a6 mtlr r0 ffc0a7a8: 83 c1 00 20 lwz r30,32(r1) ffc0a7ac: 83 e1 00 24 lwz r31,36(r1) ffc0a7b0: 38 21 00 28 addi r1,r1,40 ffc0a7b4: 4e 80 00 20 blr <== ALWAYS TAKEN Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0a7b8: 3d 20 00 00 lis r9,0 ffc0a7bc: 81 29 28 78 lwz r9,10360(r9) ffc0a7c0: 83 a9 00 08 lwz r29,8(r9) ffc0a7c4: 4b ff ff a8 b ffc0a76c <== ALWAYS TAKEN the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); ffc0a7c8: 7c 64 1b 78 mr r4,r3 ffc0a7cc: 7f e5 fb 78 mr r5,r31 ffc0a7d0: 7f c3 f3 78 mr r3,r30 ffc0a7d4: 48 00 26 d9 bl ffc0ceac <_Objects_Set_name> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc0a7d8: 48 00 30 fd bl ffc0d8d4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0a7dc: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a7e0: 7c 03 03 78 mr r3,r0 ffc0a7e4: 80 01 00 2c lwz r0,44(r1) ffc0a7e8: 83 a1 00 1c lwz r29,28(r1) ffc0a7ec: 7c 08 03 a6 mtlr r0 ffc0a7f0: 83 c1 00 20 lwz r30,32(r1) ffc0a7f4: 83 e1 00 24 lwz r31,36(r1) ffc0a7f8: 38 21 00 28 addi r1,r1,40 ffc0a7fc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17c24 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc17c24: 94 21 ff d0 stwu r1,-48(r1) ffc17c28: 7c 08 02 a6 mflr r0 ffc17c2c: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc17c30: 7c 7f 1b 79 mr. r31,r3 ffc17c34: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc17c38: 93 c1 00 28 stw r30,40(r1) ffc17c3c: 7c be 2b 78 mr r30,r5 ffc17c40: 90 01 00 34 stw r0,52(r1) ffc17c44: 93 61 00 1c stw r27,28(r1) ffc17c48: 93 81 00 20 stw r28,32(r1) ffc17c4c: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc17c50: 41 82 00 40 beq- ffc17c90 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc17c54: 2f 84 00 00 cmpwi cr7,r4,0 ffc17c58: 41 9e 00 34 beq- cr7,ffc17c8c return RTEMS_INVALID_ADDRESS; if ( !id ) ffc17c5c: 2f 88 00 00 cmpwi cr7,r8,0 ffc17c60: 41 9e 00 2c beq- cr7,ffc17c8c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc17c64: 2f 85 00 00 cmpwi cr7,r5,0 ffc17c68: 41 9e 00 4c beq- cr7,ffc17cb4 ffc17c6c: 2f 86 00 00 cmpwi cr7,r6,0 ffc17c70: 41 9e 00 44 beq- cr7,ffc17cb4 ffc17c74: 7f 85 30 40 cmplw cr7,r5,r6 ffc17c78: 41 9c 00 3c blt- cr7,ffc17cb4 ffc17c7c: 70 c0 00 07 andi. r0,r6,7 ffc17c80: 40 82 00 34 bne- ffc17cb4 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc17c84: 70 9b 00 07 andi. r27,r4,7 ffc17c88: 41 82 00 54 beq- ffc17cdc 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc17c8c: 38 60 00 09 li r3,9 } ffc17c90: 80 01 00 34 lwz r0,52(r1) ffc17c94: 83 61 00 1c lwz r27,28(r1) ffc17c98: 7c 08 03 a6 mtlr r0 ffc17c9c: 83 81 00 20 lwz r28,32(r1) ffc17ca0: 83 a1 00 24 lwz r29,36(r1) ffc17ca4: 83 c1 00 28 lwz r30,40(r1) ffc17ca8: 83 e1 00 2c lwz r31,44(r1) ffc17cac: 38 21 00 30 addi r1,r1,48 ffc17cb0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17cb4: 80 01 00 34 lwz r0,52(r1) 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc17cb8: 38 60 00 08 li r3,8 } ffc17cbc: 83 61 00 1c lwz r27,28(r1) ffc17cc0: 7c 08 03 a6 mtlr r0 ffc17cc4: 83 81 00 20 lwz r28,32(r1) ffc17cc8: 83 a1 00 24 lwz r29,36(r1) ffc17ccc: 83 c1 00 28 lwz r30,40(r1) ffc17cd0: 83 e1 00 2c lwz r31,44(r1) ffc17cd4: 38 21 00 30 addi r1,r1,48 ffc17cd8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17cdc: 3d 20 00 00 lis r9,0 ffc17ce0: 81 69 28 24 lwz r11,10276(r9) ffc17ce4: 38 0b 00 01 addi r0,r11,1 ffc17ce8: 90 09 28 24 stw r0,10276(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 ); ffc17cec: 3f 80 00 00 lis r28,0 ffc17cf0: 90 81 00 08 stw r4,8(r1) ffc17cf4: 3b 9c 6e 6c addi r28,r28,28268 ffc17cf8: 7f 83 e3 78 mr r3,r28 ffc17cfc: 90 c1 00 0c stw r6,12(r1) ffc17d00: 90 e1 00 10 stw r7,16(r1) ffc17d04: 91 01 00 14 stw r8,20(r1) ffc17d08: 48 00 5b a9 bl ffc1d8b0 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc17d0c: 7c 7d 1b 79 mr. r29,r3 ffc17d10: 80 81 00 08 lwz r4,8(r1) ffc17d14: 80 c1 00 0c lwz r6,12(r1) ffc17d18: 80 e1 00 10 lwz r7,16(r1) ffc17d1c: 81 01 00 14 lwz r8,20(r1) ffc17d20: 41 82 00 50 beq- ffc17d70 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, ffc17d24: 7c be 33 96 divwu r5,r30,r6 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; ffc17d28: 90 fd 00 1c stw r7,28(r29) _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc17d2c: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc17d30: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; ffc17d34: 93 7d 00 20 stw r27,32(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc17d38: 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; _Chain_Initialize( &the_partition->Memory, starting_address, ffc17d3c: 91 01 00 14 stw r8,20(r1) ffc17d40: 38 7d 00 24 addi r3,r29,36 ffc17d44: 48 00 41 f9 bl ffc1bf3c <_Chain_Initialize> <== ALWAYS TAKEN ffc17d48: 80 1d 00 08 lwz r0,8(r29) ffc17d4c: 81 7c 00 1c lwz r11,28(r28) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc17d50: 81 01 00 14 lwz r8,20(r1) ffc17d54: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc17d58: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc17d5c: 7f ab 49 2e stwx r29,r11,r9 ffc17d60: 90 08 00 00 stw r0,0(r8) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc17d64: 48 00 6d d5 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc17d68: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc17d6c: 4b ff ff 24 b ffc17c90 <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); ffc17d70: 48 00 6d c9 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc17d74: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc17d78: 4b ff ff 18 b ffc17c90 <== ALWAYS TAKEN ffc17d7c : */ rtems_status_code rtems_partition_delete( rtems_id id ) { ffc17d7c: 94 21 ff e0 stwu r1,-32(r1) ffc17d80: 7c 08 02 a6 mflr r0 ffc17d84: 7c 64 1b 78 mr r4,r3 ffc17d88: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc17d8c: 3f e0 00 00 lis r31,0 ffc17d90: 3b ff 6e 6c addi r31,r31,28268 ffc17d94: 7f e3 fb 78 mr r3,r31 ffc17d98: 90 01 00 24 stw r0,36(r1) ffc17d9c: 38 a1 00 08 addi r5,r1,8 ffc17da0: 93 c1 00 18 stw r30,24(r1) ffc17da4: 48 00 61 55 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN ffc17da8: 7c 7e 1b 78 mr r30,r3 register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc17dac: 80 01 00 08 lwz r0,8(r1) ffc17db0: 38 60 00 04 li r3,4 ffc17db4: 2f 80 00 00 cmpwi cr7,r0,0 ffc17db8: 40 9e 00 18 bne- cr7,ffc17dd0 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { ffc17dbc: 80 1e 00 20 lwz r0,32(r30) ffc17dc0: 2f 80 00 00 cmpwi cr7,r0,0 ffc17dc4: 41 9e 00 24 beq- cr7,ffc17de8 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc17dc8: 48 00 6d 71 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc17dcc: 38 60 00 0c li r3,12 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17dd0: 80 01 00 24 lwz r0,36(r1) ffc17dd4: 83 c1 00 18 lwz r30,24(r1) ffc17dd8: 7c 08 03 a6 mtlr r0 ffc17ddc: 83 e1 00 1c lwz r31,28(r1) ffc17de0: 38 21 00 20 addi r1,r1,32 ffc17de4: 4e 80 00 20 blr <== ALWAYS TAKEN the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); ffc17de8: 7f e3 fb 78 mr r3,r31 ffc17dec: 7f c4 f3 78 mr r4,r30 ffc17df0: 48 00 5b 89 bl ffc1d978 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); ffc17df4: 7f e3 fb 78 mr r3,r31 ffc17df8: 7f c4 f3 78 mr r4,r30 ffc17dfc: 48 00 5e d5 bl ffc1dcd0 <_Objects_Free> <== ALWAYS TAKEN 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); ffc17e00: 48 00 6d 39 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17e04: 80 01 00 24 lwz r0,36(r1) 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); ffc17e08: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17e0c: 83 c1 00 18 lwz r30,24(r1) ffc17e10: 7c 08 03 a6 mtlr r0 ffc17e14: 83 e1 00 1c lwz r31,28(r1) ffc17e18: 38 21 00 20 addi r1,r1,32 ffc17e1c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17e20 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { ffc17e20: 94 21 ff d8 stwu r1,-40(r1) ffc17e24: 7c 08 02 a6 mflr r0 ffc17e28: 93 e1 00 24 stw r31,36(r1) register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) ffc17e2c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { ffc17e30: 7c 64 1b 78 mr r4,r3 ffc17e34: 90 01 00 2c stw r0,44(r1) register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) ffc17e38: 38 60 00 09 li r3,9 rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { ffc17e3c: 93 a1 00 1c stw r29,28(r1) ffc17e40: 93 c1 00 20 stw r30,32(r1) register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) ffc17e44: 41 82 00 50 beq- ffc17e94 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc17e48: 3c 60 00 00 lis r3,0 ffc17e4c: 38 63 6e 6c addi r3,r3,28268 ffc17e50: 38 a1 00 08 addi r5,r1,8 ffc17e54: 48 00 60 a5 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc17e58: 80 01 00 08 lwz r0,8(r1) ffc17e5c: 7c 7e 1b 78 mr r30,r3 ffc17e60: 2f 80 00 00 cmpwi cr7,r0,0 ffc17e64: 38 60 00 04 li r3,4 ffc17e68: 40 9e 00 2c bne- cr7,ffc17e94 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); ffc17e6c: 38 7e 00 24 addi r3,r30,36 ffc17e70: 48 00 40 89 bl ffc1bef8 <_Chain_Get> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { ffc17e74: 7c 7d 1b 79 mr. r29,r3 ffc17e78: 41 82 00 38 beq- ffc17eb0 the_partition->number_of_used_blocks += 1; ffc17e7c: 81 3e 00 20 lwz r9,32(r30) ffc17e80: 38 09 00 01 addi r0,r9,1 ffc17e84: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc17e88: 48 00 6c b1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *buffer = the_buffer; ffc17e8c: 93 bf 00 00 stw r29,0(r31) ffc17e90: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17e94: 80 01 00 2c lwz r0,44(r1) ffc17e98: 83 a1 00 1c lwz r29,28(r1) ffc17e9c: 7c 08 03 a6 mtlr r0 ffc17ea0: 83 c1 00 20 lwz r30,32(r1) ffc17ea4: 83 e1 00 24 lwz r31,36(r1) ffc17ea8: 38 21 00 28 addi r1,r1,40 ffc17eac: 4e 80 00 20 blr <== ALWAYS TAKEN the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc17eb0: 48 00 6c 89 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc17eb4: 38 60 00 0d li r3,13 return RTEMS_UNSATISFIED; ffc17eb8: 4b ff ff dc b ffc17e94 <== ALWAYS TAKEN ffc17ebc : rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc17ebc: 94 21 ff f8 stwu r1,-8(r1) ffc17ec0: 7c 08 02 a6 mflr r0 ffc17ec4: 7c 69 1b 78 mr r9,r3 ffc17ec8: 90 01 00 0c stw r0,12(r1) Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); ffc17ecc: 3c 60 00 00 lis r3,0 rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc17ed0: 7c 80 23 78 mr r0,r4 ffc17ed4: 7c a6 2b 78 mr r6,r5 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); ffc17ed8: 7d 24 4b 78 mr r4,r9 ffc17edc: 7c 05 03 78 mr r5,r0 ffc17ee0: 38 63 6e 6c addi r3,r3,28268 ffc17ee4: 48 00 62 61 bl ffc1e144 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN return _Status_Object_name_errors_to_status[ status ]; } ffc17ee8: 80 01 00 0c lwz r0,12(r1) ffc17eec: 3d 20 ff c4 lis r9,-60 ffc17ef0: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); ffc17ef4: 54 63 10 3a rlwinm r3,r3,2,0,29 return _Status_Object_name_errors_to_status[ status ]; } ffc17ef8: 39 29 bd 9c addi r9,r9,-16996 ffc17efc: 7c 69 18 2e lwzx r3,r9,r3 ffc17f00: 38 21 00 08 addi r1,r1,8 ffc17f04: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17f08 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc17f08: 94 21 ff e0 stwu r1,-32(r1) ffc17f0c: 7c 08 02 a6 mflr r0 ffc17f10: 90 01 00 24 stw r0,36(r1) ffc17f14: 7c 60 1b 78 mr r0,r3 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc17f18: 3c 60 00 00 lis r3,0 ffc17f1c: 93 e1 00 1c stw r31,28(r1) ffc17f20: 38 63 6e 6c addi r3,r3,28268 ffc17f24: 7c 9f 23 78 mr r31,r4 ffc17f28: 38 a1 00 08 addi r5,r1,8 ffc17f2c: 93 c1 00 18 stw r30,24(r1) ffc17f30: 7c 04 03 78 mr r4,r0 ffc17f34: 48 00 5f c5 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc17f38: 80 01 00 08 lwz r0,8(r1) ffc17f3c: 7c 7e 1b 78 mr r30,r3 ffc17f40: 2f 80 00 00 cmpwi cr7,r0,0 ffc17f44: 38 60 00 04 li r3,4 ffc17f48: 40 9e 00 58 bne- cr7,ffc17fa0 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc17f4c: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc17f50: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc17f54: 7f 9f 00 40 cmplw cr7,r31,r0 ffc17f58: 41 9c 00 60 blt- cr7,ffc17fb8 ffc17f5c: 7d 20 4a 14 add r9,r0,r9 ffc17f60: 7f 9f 48 40 cmplw cr7,r31,r9 ffc17f64: 41 9d 00 54 bgt- cr7,ffc17fb8 <== NEVER TAKEN return ( ffc17f68: 81 3e 00 18 lwz r9,24(r30) ffc17f6c: 7c 00 f8 50 subf r0,r0,r31 ffc17f70: 7d 60 4b 96 divwu r11,r0,r9 ffc17f74: 7d 2b 49 d6 mullw r9,r11,r9 ffc17f78: 7f 80 48 00 cmpw cr7,r0,r9 ffc17f7c: 40 9e 00 3c bne- cr7,ffc17fb8 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc17f80: 38 7e 00 24 addi r3,r30,36 ffc17f84: 7f e4 fb 78 mr r4,r31 ffc17f88: 48 00 3f 41 bl ffc1bec8 <_Chain_Append> <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; ffc17f8c: 81 3e 00 20 lwz r9,32(r30) ffc17f90: 38 09 ff ff addi r0,r9,-1 ffc17f94: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc17f98: 48 00 6b a1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc17f9c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17fa0: 80 01 00 24 lwz r0,36(r1) ffc17fa4: 83 c1 00 18 lwz r30,24(r1) ffc17fa8: 7c 08 03 a6 mtlr r0 ffc17fac: 83 e1 00 1c lwz r31,28(r1) ffc17fb0: 38 21 00 20 addi r1,r1,32 ffc17fb4: 4e 80 00 20 blr <== ALWAYS TAKEN _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc17fb8: 48 00 6b 81 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17fbc: 80 01 00 24 lwz r0,36(r1) _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc17fc0: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17fc4: 83 c1 00 18 lwz r30,24(r1) ffc17fc8: 7c 08 03 a6 mtlr r0 ffc17fcc: 83 e1 00 1c lwz r31,28(r1) ffc17fd0: 38 21 00 20 addi r1,r1,32 ffc17fd4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16e14 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { ffc16e14: 94 21 ff e0 stwu r1,-32(r1) ffc16e18: 7c 08 02 a6 mflr r0 ffc16e1c: 93 e1 00 1c stw r31,28(r1) register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) ffc16e20: 7c 7f 1b 79 mr. r31,r3 ffc16e24: 38 60 00 03 li r3,3 void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { ffc16e28: 90 01 00 24 stw r0,36(r1) ffc16e2c: 93 c1 00 18 stw r30,24(r1) register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) ffc16e30: 41 82 00 1c beq- ffc16e4c return RTEMS_INVALID_NAME; if ( !id ) ffc16e34: 2f 87 00 00 cmpwi cr7,r7,0 ffc16e38: 41 9e 00 10 beq- cr7,ffc16e48 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || ffc16e3c: 7c a0 23 78 or r0,r5,r4 ffc16e40: 70 09 00 07 andi. r9,r0,7 ffc16e44: 41 82 00 20 beq- ffc16e64 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc16e48: 38 60 00 09 li r3,9 } ffc16e4c: 80 01 00 24 lwz r0,36(r1) ffc16e50: 83 c1 00 18 lwz r30,24(r1) ffc16e54: 7c 08 03 a6 mtlr r0 ffc16e58: 83 e1 00 1c lwz r31,28(r1) ffc16e5c: 38 21 00 20 addi r1,r1,32 ffc16e60: 4e 80 00 20 blr <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc16e64: 3d 20 00 00 lis r9,0 ffc16e68: 81 69 28 24 lwz r11,10276(r9) ffc16e6c: 38 0b 00 01 addi r0,r11,1 ffc16e70: 90 09 28 24 stw r0,10276(r9) * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) ffc16e74: 3f c0 00 00 lis r30,0 ffc16e78: 90 81 00 08 stw r4,8(r1) ffc16e7c: 3b de 6e 2c addi r30,r30,28204 ffc16e80: 7f c3 f3 78 mr r3,r30 ffc16e84: 90 a1 00 0c stw r5,12(r1) ffc16e88: 90 c1 00 10 stw r6,16(r1) ffc16e8c: 90 e1 00 14 stw r7,20(r1) ffc16e90: 48 00 6a 21 bl ffc1d8b0 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { ffc16e94: 2c 03 00 00 cmpwi r3,0 ffc16e98: 80 81 00 08 lwz r4,8(r1) ffc16e9c: 80 a1 00 0c lwz r5,12(r1) ffc16ea0: 80 c1 00 10 lwz r6,16(r1) ffc16ea4: 80 e1 00 14 lwz r7,20(r1) ffc16ea8: 41 82 00 4c beq- ffc16ef4 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc16eac: 80 03 00 08 lwz r0,8(r3) return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; ffc16eb0: 38 c6 ff ff addi r6,r6,-1 ffc16eb4: 81 7e 00 1c lwz r11,28(r30) ffc16eb8: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc16ebc: 93 e3 00 0c stw r31,12(r3) ffc16ec0: 90 c3 00 18 stw r6,24(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc16ec4: 7c 6b 49 2e stwx r3,r11,r9 &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; ffc16ec8: 90 07 00 00 stw r0,0(r7) if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; ffc16ecc: 90 83 00 10 stw r4,16(r3) the_port->external_base = external_start; ffc16ed0: 90 a3 00 14 stw r5,20(r3) &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); ffc16ed4: 48 00 7c 65 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc16ed8: 80 01 00 24 lwz r0,36(r1) &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); ffc16edc: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc16ee0: 83 c1 00 18 lwz r30,24(r1) ffc16ee4: 7c 08 03 a6 mtlr r0 ffc16ee8: 83 e1 00 1c lwz r31,28(r1) ffc16eec: 38 21 00 20 addi r1,r1,32 ffc16ef0: 4e 80 00 20 blr <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); ffc16ef4: 48 00 7c 45 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16ef8: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc16efc: 4b ff ff 50 b ffc16e4c <== ALWAYS TAKEN ffc16f00 : */ rtems_status_code rtems_port_delete( rtems_id id ) { ffc16f00: 94 21 ff e0 stwu r1,-32(r1) ffc16f04: 7c 08 02 a6 mflr r0 ffc16f08: 7c 64 1b 78 mr r4,r3 ffc16f0c: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) ffc16f10: 3f e0 00 00 lis r31,0 ffc16f14: 3b ff 6e 2c addi r31,r31,28204 ffc16f18: 7f e3 fb 78 mr r3,r31 ffc16f1c: 90 01 00 24 stw r0,36(r1) ffc16f20: 38 a1 00 08 addi r5,r1,8 ffc16f24: 93 c1 00 18 stw r30,24(r1) ffc16f28: 48 00 6f d1 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN ffc16f2c: 7c 7e 1b 78 mr r30,r3 register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { ffc16f30: 80 01 00 08 lwz r0,8(r1) ffc16f34: 38 60 00 04 li r3,4 ffc16f38: 2f 80 00 00 cmpwi cr7,r0,0 ffc16f3c: 40 9e 00 24 bne- cr7,ffc16f60 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); ffc16f40: 7f e3 fb 78 mr r3,r31 ffc16f44: 7f c4 f3 78 mr r4,r30 ffc16f48: 48 00 6a 31 bl ffc1d978 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); ffc16f4c: 7f e3 fb 78 mr r3,r31 ffc16f50: 7f c4 f3 78 mr r4,r30 ffc16f54: 48 00 6d 7d bl ffc1dcd0 <_Objects_Free> <== ALWAYS TAKEN _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); ffc16f58: 48 00 7b e1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16f5c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16f60: 80 01 00 24 lwz r0,36(r1) ffc16f64: 83 c1 00 18 lwz r30,24(r1) ffc16f68: 7c 08 03 a6 mtlr r0 ffc16f6c: 83 e1 00 1c lwz r31,28(r1) ffc16f70: 38 21 00 20 addi r1,r1,32 ffc16f74: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16f78 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { ffc16f78: 94 21 ff e0 stwu r1,-32(r1) ffc16f7c: 7c 08 02 a6 mflr r0 ffc16f80: 93 c1 00 18 stw r30,24(r1) register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) ffc16f84: 7c be 2b 79 mr. r30,r5 rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { ffc16f88: 90 01 00 24 stw r0,36(r1) ffc16f8c: 7c 60 1b 78 mr r0,r3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) ffc16f90: 38 60 00 09 li r3,9 rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { ffc16f94: 93 e1 00 1c stw r31,28(r1) ffc16f98: 7c 9f 23 78 mr r31,r4 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) ffc16f9c: 41 82 00 2c beq- ffc16fc8 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) ffc16fa0: 3c 60 00 00 lis r3,0 ffc16fa4: 7c 04 03 78 mr r4,r0 ffc16fa8: 38 63 6e 2c addi r3,r3,28204 ffc16fac: 38 a1 00 08 addi r5,r1,8 ffc16fb0: 48 00 6f 49 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { ffc16fb4: 80 01 00 08 lwz r0,8(r1) ffc16fb8: 7c 69 1b 78 mr r9,r3 ffc16fbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc16fc0: 38 60 00 04 li r3,4 ffc16fc4: 41 9e 00 1c beq- cr7,ffc16fe0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16fc8: 80 01 00 24 lwz r0,36(r1) ffc16fcc: 83 c1 00 18 lwz r30,24(r1) ffc16fd0: 7c 08 03 a6 mtlr r0 ffc16fd4: 83 e1 00 1c lwz r31,28(r1) ffc16fd8: 38 21 00 20 addi r1,r1,32 ffc16fdc: 4e 80 00 20 blr <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); ffc16fe0: 80 09 00 14 lwz r0,20(r9) if ( ending > the_port->length ) ffc16fe4: 81 69 00 18 lwz r11,24(r9) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); ffc16fe8: 7c 00 f8 50 subf r0,r0,r31 if ( ending > the_port->length ) ffc16fec: 7f 80 58 40 cmplw cr7,r0,r11 ffc16ff0: 41 9d 00 30 bgt- cr7,ffc17020 *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ffc16ff4: 81 29 00 10 lwz r9,16(r9) ffc16ff8: 7c 09 02 14 add r0,r9,r0 ffc16ffc: 90 1e 00 00 stw r0,0(r30) ending ); _Thread_Enable_dispatch(); ffc17000: 48 00 7b 39 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17004: 80 01 00 24 lwz r0,36(r1) if ( ending > the_port->length ) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); ffc17008: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1700c: 83 c1 00 18 lwz r30,24(r1) ffc17010: 7c 08 03 a6 mtlr r0 ffc17014: 83 e1 00 1c lwz r31,28(r1) ffc17018: 38 21 00 20 addi r1,r1,32 ffc1701c: 4e 80 00 20 blr <== ALWAYS TAKEN the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; ffc17020: 93 fe 00 00 stw r31,0(r30) ffc17024: 4b ff ff dc b ffc17000 <== ALWAYS TAKEN ffc17028 : rtems_status_code rtems_port_ident( rtems_name name, rtems_id *id ) { ffc17028: 94 21 ff f8 stwu r1,-8(r1) ffc1702c: 7c 08 02 a6 mflr r0 ffc17030: 7c 86 23 78 mr r6,r4 ffc17034: 90 01 00 0c stw r0,12(r1) ffc17038: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1703c: 3c 60 00 00 lis r3,0 ffc17040: 7c 04 03 78 mr r4,r0 ffc17044: 38 63 6e 2c addi r3,r3,28204 ffc17048: 38 a0 00 00 li r5,0 ffc1704c: 48 00 70 f9 bl ffc1e144 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_ALL_NODES, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc17050: 80 01 00 0c lwz r0,12(r1) ffc17054: 3d 20 ff c4 lis r9,-60 ffc17058: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1705c: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_ALL_NODES, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc17060: 39 29 bd 9c addi r9,r9,-16996 ffc17064: 7c 69 18 2e lwzx r3,r9,r3 ffc17068: 38 21 00 08 addi r1,r1,8 ffc1706c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17070 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { ffc17070: 94 21 ff e0 stwu r1,-32(r1) ffc17074: 7c 08 02 a6 mflr r0 ffc17078: 93 c1 00 18 stw r30,24(r1) register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) ffc1707c: 7c be 2b 79 mr. r30,r5 rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { ffc17080: 90 01 00 24 stw r0,36(r1) ffc17084: 7c 60 1b 78 mr r0,r3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) ffc17088: 38 60 00 09 li r3,9 rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { ffc1708c: 93 e1 00 1c stw r31,28(r1) ffc17090: 7c 9f 23 78 mr r31,r4 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) ffc17094: 41 82 00 2c beq- ffc170c0 ffc17098: 3c 60 00 00 lis r3,0 ffc1709c: 7c 04 03 78 mr r4,r0 ffc170a0: 38 63 6e 2c addi r3,r3,28204 ffc170a4: 38 a1 00 08 addi r5,r1,8 ffc170a8: 48 00 6e 51 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { ffc170ac: 80 01 00 08 lwz r0,8(r1) ffc170b0: 7c 69 1b 78 mr r9,r3 ffc170b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc170b8: 38 60 00 04 li r3,4 ffc170bc: 41 9e 00 1c beq- cr7,ffc170d8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc170c0: 80 01 00 24 lwz r0,36(r1) ffc170c4: 83 c1 00 18 lwz r30,24(r1) ffc170c8: 7c 08 03 a6 mtlr r0 ffc170cc: 83 e1 00 1c lwz r31,28(r1) ffc170d0: 38 21 00 20 addi r1,r1,32 ffc170d4: 4e 80 00 20 blr <== ALWAYS TAKEN the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); ffc170d8: 80 09 00 10 lwz r0,16(r9) if ( ending > the_port->length ) ffc170dc: 81 69 00 18 lwz r11,24(r9) the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); ffc170e0: 7c 00 f8 50 subf r0,r0,r31 if ( ending > the_port->length ) ffc170e4: 7f 80 58 40 cmplw cr7,r0,r11 ffc170e8: 41 9d 00 30 bgt- cr7,ffc17118 *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ffc170ec: 81 29 00 14 lwz r9,20(r9) ffc170f0: 7c 09 02 14 add r0,r9,r0 ffc170f4: 90 1e 00 00 stw r0,0(r30) ending ); _Thread_Enable_dispatch(); ffc170f8: 48 00 7a 41 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc170fc: 80 01 00 24 lwz r0,36(r1) if ( ending > the_port->length ) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); ffc17100: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc17104: 83 c1 00 18 lwz r30,24(r1) ffc17108: 7c 08 03 a6 mtlr r0 ffc1710c: 83 e1 00 1c lwz r31,28(r1) ffc17110: 38 21 00 20 addi r1,r1,32 ffc17114: 4e 80 00 20 blr <== ALWAYS TAKEN switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; ffc17118: 93 fe 00 00 stw r31,0(r30) ffc1711c: 4b ff ff dc b ffc170f8 <== ALWAYS TAKEN ffc17fd8 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { ffc17fd8: 94 21 ff e0 stwu r1,-32(r1) ffc17fdc: 7c 08 02 a6 mflr r0 ffc17fe0: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc17fe4: 3c 60 00 00 lis r3,0 ffc17fe8: 93 c1 00 18 stw r30,24(r1) ffc17fec: 38 63 6e ac addi r3,r3,28332 ffc17ff0: 38 a1 00 08 addi r5,r1,8 ffc17ff4: 93 e1 00 1c stw r31,28(r1) ffc17ff8: 90 01 00 24 stw r0,36(r1) ffc17ffc: 48 00 5e fd bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN ffc18000: 7c 7e 1b 78 mr r30,r3 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc18004: 83 e1 00 08 lwz r31,8(r1) ffc18008: 38 60 00 04 li r3,4 ffc1800c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc18010: 40 9e 00 20 bne- cr7,ffc18030 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc18014: 3d 20 00 00 lis r9,0 ffc18018: 80 09 28 64 lwz r0,10340(r9) ffc1801c: 81 3e 00 40 lwz r9,64(r30) ffc18020: 7f 89 00 00 cmpw cr7,r9,r0 ffc18024: 41 9e 00 24 beq- cr7,ffc18048 _Thread_Enable_dispatch(); ffc18028: 48 00 6b 11 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1802c: 38 60 00 17 li r3,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18030: 80 01 00 24 lwz r0,36(r1) ffc18034: 83 c1 00 18 lwz r30,24(r1) ffc18038: 7c 08 03 a6 mtlr r0 ffc1803c: 83 e1 00 1c lwz r31,28(r1) ffc18040: 38 21 00 20 addi r1,r1,32 ffc18044: 4e 80 00 20 blr <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); ffc18048: 38 7e 00 10 addi r3,r30,16 ffc1804c: 48 00 88 05 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_INACTIVE; ffc18050: 93 fe 00 38 stw r31,56(r30) _Thread_Enable_dispatch(); ffc18054: 48 00 6a e5 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18058: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1805c: 4b ff ff d4 b ffc18030 <== ALWAYS TAKEN ffc09654 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { ffc09654: 94 21 ff e8 stwu r1,-24(r1) ffc09658: 7c 08 02 a6 mflr r0 ffc0965c: 93 81 00 08 stw r28,8(r1) Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) ffc09660: 7c 7c 1b 79 mr. r28,r3 ffc09664: 38 60 00 03 li r3,3 rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { ffc09668: 93 c1 00 10 stw r30,16(r1) ffc0966c: 7c 9e 23 78 mr r30,r4 ffc09670: 90 01 00 1c stw r0,28(r1) ffc09674: 93 a1 00 0c stw r29,12(r1) ffc09678: 93 e1 00 14 stw r31,20(r1) Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) ffc0967c: 41 82 00 a4 beq- ffc09720 return RTEMS_INVALID_NAME; if ( !id ) ffc09680: 2f 84 00 00 cmpwi cr7,r4,0 ffc09684: 38 60 00 09 li r3,9 ffc09688: 41 9e 00 98 beq- cr7,ffc09720 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0968c: 3d 20 00 00 lis r9,0 ffc09690: 81 69 27 b0 lwz r11,10160(r9) ffc09694: 38 0b 00 01 addi r0,r11,1 ffc09698: 90 09 27 b0 stw r0,10160(r9) * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) ffc0969c: 3f a0 00 00 lis r29,0 ffc096a0: 3b bd 2b ec addi r29,r29,11244 ffc096a4: 7f a3 eb 78 mr r3,r29 ffc096a8: 48 00 29 1d bl ffc0bfc4 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { ffc096ac: 7c 7f 1b 79 mr. r31,r3 ffc096b0: 41 82 00 90 beq- ffc09740 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; ffc096b4: 3d 20 00 00 lis r9,0 ffc096b8: 81 29 27 f0 lwz r9,10224(r9) the_period->state = RATE_MONOTONIC_INACTIVE; ffc096bc: 38 00 00 00 li r0,0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc096c0: 90 1f 00 34 stw r0,52(r31) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); ffc096c4: 38 80 00 00 li r4,0 ffc096c8: 38 a0 00 38 li r5,56 if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; ffc096cc: 91 3f 00 40 stw r9,64(r31) the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); ffc096d0: 38 7f 00 54 addi r3,r31,84 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; the_period->state = RATE_MONOTONIC_INACTIVE; ffc096d4: 90 1f 00 38 stw r0,56(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc096d8: 90 1f 00 18 stw r0,24(r31) the_watchdog->routine = routine; ffc096dc: 90 1f 00 2c stw r0,44(r31) the_watchdog->id = id; ffc096e0: 90 1f 00 30 stw r0,48(r31) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); ffc096e4: 48 00 b5 69 bl ffc14c4c <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc096e8: 81 3f 00 08 lwz r9,8(r31) ffc096ec: 81 5d 00 1c lwz r10,28(r29) ffc096f0: 3c 00 7f ff lis r0,32767 ffc096f4: 60 00 ff ff ori r0,r0,65535 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc096f8: 93 9f 00 0c stw r28,12(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc096fc: 55 2b 13 ba rlwinm r11,r9,2,14,29 ffc09700: 90 1f 00 78 stw r0,120(r31) ffc09704: 90 1f 00 5c stw r0,92(r31) ffc09708: 90 1f 00 60 stw r0,96(r31) ffc0970c: 90 1f 00 74 stw r0,116(r31) ffc09710: 7f ea 59 2e stwx r31,r10,r11 &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; ffc09714: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc09718: 48 00 3b 65 bl ffc0d27c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0971c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc09720: 80 01 00 1c lwz r0,28(r1) ffc09724: 83 81 00 08 lwz r28,8(r1) ffc09728: 7c 08 03 a6 mtlr r0 ffc0972c: 83 a1 00 0c lwz r29,12(r1) ffc09730: 83 c1 00 10 lwz r30,16(r1) ffc09734: 83 e1 00 14 lwz r31,20(r1) ffc09738: 38 21 00 18 addi r1,r1,24 ffc0973c: 4e 80 00 20 blr <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); ffc09740: 48 00 3b 3d bl ffc0d27c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc09744: 80 01 00 1c lwz r0,28(r1) _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); ffc09748: 38 60 00 05 li r3,5 ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc0974c: 83 81 00 08 lwz r28,8(r1) ffc09750: 7c 08 03 a6 mtlr r0 ffc09754: 83 a1 00 0c lwz r29,12(r1) ffc09758: 83 c1 00 10 lwz r30,16(r1) ffc0975c: 83 e1 00 14 lwz r31,20(r1) ffc09760: 38 21 00 18 addi r1,r1,24 ffc09764: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18174 : */ rtems_status_code rtems_rate_monotonic_delete( rtems_id id ) { ffc18174: 94 21 ff d8 stwu r1,-40(r1) ffc18178: 7c 08 02 a6 mflr r0 ffc1817c: 7c 64 1b 78 mr r4,r3 ffc18180: 93 e1 00 24 stw r31,36(r1) RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc18184: 3f e0 00 00 lis r31,0 ffc18188: 3b ff 6e ac addi r31,r31,28332 ffc1818c: 7f e3 fb 78 mr r3,r31 ffc18190: 93 a1 00 1c stw r29,28(r1) ffc18194: 38 a1 00 08 addi r5,r1,8 ffc18198: 93 c1 00 20 stw r30,32(r1) ffc1819c: 90 01 00 2c stw r0,44(r1) ffc181a0: 48 00 5d 59 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN ffc181a4: 7c 7e 1b 78 mr r30,r3 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc181a8: 83 a1 00 08 lwz r29,8(r1) ffc181ac: 38 60 00 04 li r3,4 ffc181b0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc181b4: 40 9e 00 30 bne- cr7,ffc181e4 case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); ffc181b8: 7f c4 f3 78 mr r4,r30 ffc181bc: 7f e3 fb 78 mr r3,r31 ffc181c0: 48 00 57 b9 bl ffc1d978 <_Objects_Close> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_period->Timer ); ffc181c4: 38 7e 00 10 addi r3,r30,16 ffc181c8: 48 00 86 89 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_INACTIVE; ffc181cc: 93 be 00 38 stw r29,56(r30) */ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); ffc181d0: 7f e3 fb 78 mr r3,r31 ffc181d4: 7f c4 f3 78 mr r4,r30 ffc181d8: 48 00 5a f9 bl ffc1dcd0 <_Objects_Free> <== ALWAYS TAKEN _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); ffc181dc: 48 00 69 5d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc181e0: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc181e4: 80 01 00 2c lwz r0,44(r1) ffc181e8: 83 a1 00 1c lwz r29,28(r1) ffc181ec: 7c 08 03 a6 mtlr r0 ffc181f0: 83 c1 00 20 lwz r30,32(r1) ffc181f4: 83 e1 00 24 lwz r31,36(r1) ffc181f8: 38 21 00 28 addi r1,r1,40 ffc181fc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc46290 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { ffc46290: 94 21 ff e0 stwu r1,-32(r1) ffc46294: 7c 08 02 a6 mflr r0 ffc46298: 93 e1 00 1c stw r31,28(r1) Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) ffc4629c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { ffc462a0: 7c 64 1b 78 mr r4,r3 ffc462a4: 90 01 00 24 stw r0,36(r1) Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) ffc462a8: 38 60 00 09 li r3,9 ffc462ac: 41 82 00 28 beq- ffc462d4 ffc462b0: 3c 60 00 00 lis r3,0 ffc462b4: 38 63 68 c4 addi r3,r3,26820 ffc462b8: 38 a1 00 08 addi r5,r1,8 ffc462bc: 4b fc a3 a1 bl ffc1065c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc462c0: 80 01 00 08 lwz r0,8(r1) ffc462c4: 7c 69 1b 78 mr r9,r3 ffc462c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc462cc: 38 60 00 04 li r3,4 ffc462d0: 41 9e 00 18 beq- cr7,ffc462e8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc462d4: 80 01 00 24 lwz r0,36(r1) ffc462d8: 83 e1 00 1c lwz r31,28(r1) ffc462dc: 38 21 00 20 addi r1,r1,32 ffc462e0: 7c 08 03 a6 mtlr r0 ffc462e4: 4e 80 00 20 blr <== ALWAYS TAKEN switch ( location ) { case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; ffc462e8: 80 09 00 54 lwz r0,84(r9) ffc462ec: 90 1f 00 00 stw r0,0(r31) dst->missed_count = src->missed_count; ffc462f0: 80 09 00 58 lwz r0,88(r9) ffc462f4: 90 1f 00 04 stw r0,4(r31) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time ); ffc462f8: 81 69 00 5c lwz r11,92(r9) ffc462fc: 81 89 00 60 lwz r12,96(r9) ffc46300: 91 7f 00 08 stw r11,8(r31) ffc46304: 91 9f 00 0c stw r12,12(r31) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); ffc46308: 81 69 00 64 lwz r11,100(r9) ffc4630c: 81 89 00 68 lwz r12,104(r9) ffc46310: 91 7f 00 10 stw r11,16(r31) ffc46314: 91 9f 00 14 stw r12,20(r31) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); ffc46318: 81 69 00 6c lwz r11,108(r9) ffc4631c: 81 89 00 70 lwz r12,112(r9) ffc46320: 91 7f 00 18 stw r11,24(r31) ffc46324: 91 9f 00 1c stw r12,28(r31) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); ffc46328: 81 69 00 74 lwz r11,116(r9) ffc4632c: 81 89 00 78 lwz r12,120(r9) ffc46330: 91 7f 00 20 stw r11,32(r31) ffc46334: 91 9f 00 24 stw r12,36(r31) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); ffc46338: 81 69 00 7c lwz r11,124(r9) ffc4633c: 81 89 00 80 lwz r12,128(r9) ffc46340: 91 7f 00 28 stw r11,40(r31) ffc46344: 91 9f 00 2c stw r12,44(r31) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); ffc46348: 81 49 00 88 lwz r10,136(r9) ffc4634c: 81 29 00 84 lwz r9,132(r9) ffc46350: 91 5f 00 34 stw r10,52(r31) ffc46354: 91 3f 00 30 stw r9,48(r31) dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); ffc46358: 4b fc af bd bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc4635c: 80 01 00 24 lwz r0,36(r1) dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); ffc46360: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc46364: 83 e1 00 1c lwz r31,28(r1) ffc46368: 7c 08 03 a6 mtlr r0 ffc4636c: 38 21 00 20 addi r1,r1,32 ffc46370: 4e 80 00 20 blr <== ALWAYS TAKEN ffc46374 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { ffc46374: 94 21 ff d0 stwu r1,-48(r1) ffc46378: 7c 08 02 a6 mflr r0 ffc4637c: 93 e1 00 2c stw r31,44(r1) Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) ffc46380: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { ffc46384: 7c 64 1b 78 mr r4,r3 ffc46388: 90 01 00 34 stw r0,52(r1) Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) ffc4638c: 38 00 00 09 li r0,9 ffc46390: 41 82 00 24 beq- ffc463b4 ffc46394: 3c 60 00 00 lis r3,0 ffc46398: 38 63 68 c4 addi r3,r3,26820 ffc4639c: 38 a1 00 08 addi r5,r1,8 ffc463a0: 4b fc a2 bd bl ffc1065c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc463a4: 81 61 00 08 lwz r11,8(r1) ffc463a8: 38 00 00 04 li r0,4 ffc463ac: 2f 8b 00 00 cmpwi cr7,r11,0 ffc463b0: 41 9e 00 1c beq- cr7,ffc463cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc463b4: 7c 03 03 78 mr r3,r0 ffc463b8: 80 01 00 34 lwz r0,52(r1) ffc463bc: 83 e1 00 2c lwz r31,44(r1) ffc463c0: 38 21 00 30 addi r1,r1,48 ffc463c4: 7c 08 03 a6 mtlr r0 ffc463c8: 4e 80 00 20 blr <== ALWAYS TAKEN the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; status->state = the_period->state; ffc463cc: 80 03 00 38 lwz r0,56(r3) the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; ffc463d0: 81 23 00 40 lwz r9,64(r3) status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { ffc463d4: 2f 80 00 00 cmpwi cr7,r0,0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; status->state = the_period->state; ffc463d8: 90 1f 00 04 stw r0,4(r31) the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; ffc463dc: 81 29 00 08 lwz r9,8(r9) ffc463e0: 91 3f 00 00 stw r9,0(r31) status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { ffc463e4: 40 9e 00 34 bne- cr7,ffc46418 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); ffc463e8: 90 1f 00 14 stw r0,20(r31) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); ffc463ec: 90 1f 00 08 stw r0,8(r31) ffc463f0: 90 1f 00 0c stw r0,12(r31) _Timespec_Set_to_zero( &status->executed_since_last_period ); ffc463f4: 90 1f 00 10 stw r0,16(r31) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); ffc463f8: 4b fc af 1d bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc463fc: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc46400: 7c 03 03 78 mr r3,r0 ffc46404: 80 01 00 34 lwz r0,52(r1) ffc46408: 83 e1 00 2c lwz r31,44(r1) ffc4640c: 38 21 00 30 addi r1,r1,48 ffc46410: 7c 08 03 a6 mtlr r0 ffc46414: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( ffc46418: 38 81 00 14 addi r4,r1,20 ffc4641c: 38 a1 00 0c addi r5,r1,12 ffc46420: 48 00 00 f5 bl ffc46514 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { ffc46424: 2f 83 00 00 cmpwi cr7,r3,0 ffc46428: 41 9e 00 28 beq- cr7,ffc46450 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( ffc4642c: 81 21 00 14 lwz r9,20(r1) ffc46430: 81 41 00 18 lwz r10,24(r1) ffc46434: 91 3f 00 08 stw r9,8(r31) ffc46438: 91 5f 00 0c stw r10,12(r31) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( ffc4643c: 81 21 00 0c lwz r9,12(r1) ffc46440: 81 41 00 10 lwz r10,16(r1) ffc46444: 91 3f 00 10 stw r9,16(r31) ffc46448: 91 5f 00 14 stw r10,20(r31) ffc4644c: 4b ff ff ac b ffc463f8 <== ALWAYS TAKEN valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); ffc46450: 4b fc ae c5 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc46454: 38 00 00 0b li r0,11 return RTEMS_NOT_DEFINED; ffc46458: 4b ff ff 5c b ffc463b4 <== ALWAYS TAKEN ffc09768 : rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id ) { ffc09768: 94 21 ff f8 stwu r1,-8(r1) ffc0976c: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc09770: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id ) { ffc09774: 90 01 00 0c stw r0,12(r1) ffc09778: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0977c: 3c 60 00 00 lis r3,0 rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id ) { ffc09780: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc09784: 38 63 2b ec addi r3,r3,11244 ffc09788: 7c 04 03 78 mr r4,r0 ffc0978c: 60 a5 ff ff ori r5,r5,65535 ffc09790: 48 00 30 f9 bl ffc0c888 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc09794: 80 01 00 0c lwz r0,12(r1) ffc09798: 3d 20 ff c2 lis r9,-62 ffc0979c: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc097a0: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc097a4: 39 29 36 20 addi r9,r9,13856 ffc097a8: 7c 69 18 2e lwzx r3,r9,r3 ffc097ac: 38 21 00 08 addi r1,r1,8 ffc097b0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc4674c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc4674c: 94 21 ff d0 stwu r1,-48(r1) ffc46750: 7c 08 02 a6 mflr r0 ffc46754: 93 e1 00 2c stw r31,44(r1) ffc46758: 7c 7f 1b 78 mr r31,r3 ffc4675c: 3c 60 00 00 lis r3,0 ffc46760: 93 c1 00 28 stw r30,40(r1) ffc46764: 38 63 68 c4 addi r3,r3,26820 ffc46768: 7c 9e 23 78 mr r30,r4 ffc4676c: 38 a1 00 08 addi r5,r1,8 ffc46770: 90 01 00 34 stw r0,52(r1) <== ALWAYS TAKEN ffc46774: 7f e4 fb 78 mr r4,r31 ffc46778: 93 a1 00 24 stw r29,36(r1) ffc4677c: 93 61 00 1c stw r27,28(r1) ffc46780: 93 81 00 20 stw r28,32(r1) ffc46784: 4b fc 9e d9 bl ffc1065c <_Objects_Get> <== ALWAYS TAKEN ffc46788: 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 ) { ffc4678c: 80 01 00 08 lwz r0,8(r1) ffc46790: 2f 80 00 00 cmpwi cr7,r0,0 ffc46794: 40 9e 00 48 bne- cr7,ffc467dc case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc46798: 3f 80 00 00 lis r28,0 ffc4679c: 81 23 00 40 lwz r9,64(r3) ffc467a0: 80 1c 36 14 lwz r0,13844(r28) ffc467a4: 7f 89 00 00 cmpw cr7,r9,r0 ffc467a8: 41 9e 00 60 beq- cr7,ffc46808 _Thread_Enable_dispatch(); ffc467ac: 4b fc ab 69 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc467b0: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc467b4: 80 01 00 34 lwz r0,52(r1) ffc467b8: 7f e3 fb 78 mr r3,r31 ffc467bc: 83 61 00 1c lwz r27,28(r1) ffc467c0: 7c 08 03 a6 mtlr r0 ffc467c4: 83 81 00 20 lwz r28,32(r1) ffc467c8: 83 a1 00 24 lwz r29,36(r1) ffc467cc: 83 c1 00 28 lwz r30,40(r1) ffc467d0: 83 e1 00 2c lwz r31,44(r1) ffc467d4: 38 21 00 30 addi r1,r1,48 ffc467d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc467dc: 80 01 00 34 lwz r0,52(r1) the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc467e0: 3b e0 00 04 li r31,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc467e4: 7f e3 fb 78 mr r3,r31 ffc467e8: 83 61 00 1c lwz r27,28(r1) ffc467ec: 7c 08 03 a6 mtlr r0 ffc467f0: 83 81 00 20 lwz r28,32(r1) ffc467f4: 83 a1 00 24 lwz r29,36(r1) ffc467f8: 83 c1 00 28 lwz r30,40(r1) ffc467fc: 83 e1 00 2c lwz r31,44(r1) ffc46800: 38 21 00 30 addi r1,r1,48 ffc46804: 4e 80 00 20 blr <== ALWAYS TAKEN if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { ffc46808: 2f 9e 00 00 cmpwi cr7,r30,0 ffc4680c: 41 9e 00 b4 beq- cr7,ffc468c0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc46810: 7f 60 00 a6 mfmsr r27 ffc46814: 7c 10 42 a6 mfsprg r0,0 ffc46818: 7f 60 00 78 andc r0,r27,r0 ffc4681c: 7c 00 01 24 mtmsr r0 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); switch ( the_period->state ) { ffc46820: 80 03 00 38 lwz r0,56(r3) ffc46824: 2f 80 00 02 cmpwi cr7,r0,2 ffc46828: 41 9e 00 c0 beq- cr7,ffc468e8 ffc4682c: 2f 80 00 04 cmpwi cr7,r0,4 ffc46830: 41 9e 00 5c beq- cr7,ffc4688c ffc46834: 2f 80 00 00 cmpwi cr7,r0,0 ffc46838: 40 be ff a4 bne- cr7,ffc467dc <== NEVER TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc4683c: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc46840: 4b ff fc 1d bl ffc4645c <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; ffc46844: 39 20 00 02 li r9,2 ffc46848: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc4684c: 3d 20 ff c4 lis r9,-60 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc46850: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc46854: 39 29 69 58 addi r9,r9,26968 the_watchdog->id = id; ffc46858: 93 fd 00 30 stw r31,48(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc4685c: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc46860: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc46864: 38 63 65 68 addi r3,r3,25960 ffc46868: 38 9d 00 10 addi r4,r29,16 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc4686c: 90 1d 00 34 stw r0,52(r29) ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc46870: 3b e0 00 00 li r31,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc46874: 93 dd 00 1c stw r30,28(r29) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc46878: 90 1d 00 18 stw r0,24(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc4687c: 93 dd 00 3c stw r30,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc46880: 4b fc c1 3d bl ffc129bc <_Watchdog_Insert> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc46884: 4b fc aa 91 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; ffc46888: 4b ff ff 2c b ffc467b4 <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc4688c: 4b ff fd 79 bl ffc46604 <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN ffc46890: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc46894: 38 00 00 02 li r0,2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc46898: 93 dd 00 1c stw r30,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc4689c: 3c 60 00 00 lis r3,0 ffc468a0: 90 1d 00 38 stw r0,56(r29) ffc468a4: 38 63 65 68 addi r3,r3,25960 ffc468a8: 38 9d 00 10 addi r4,r29,16 the_period->next_length = length; ffc468ac: 93 dd 00 3c stw r30,60(r29) _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc468b0: 3b e0 00 06 li r31,6 ffc468b4: 4b fc c1 09 bl ffc129bc <_Watchdog_Insert> <== ALWAYS TAKEN ffc468b8: 4b fc aa 5d bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_TIMEOUT; ffc468bc: 4b ff fe f8 b ffc467b4 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc468c0: 80 03 00 38 lwz r0,56(r3) ffc468c4: 3b e0 00 00 li r31,0 ffc468c8: 2b 80 00 04 cmplwi cr7,r0,4 ffc468cc: 41 bd ff b8 bgt- cr7,ffc46884 <== NEVER TAKEN ffc468d0: 3d 20 ff c7 lis r9,-57 ffc468d4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc468d8: 39 29 22 68 addi r9,r9,8808 ffc468dc: 7f e9 00 2e lwzx r31,r9,r0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc468e0: 4b fc aa 35 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc468e4: 4b ff fe d0 b ffc467b4 <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc468e8: 4b ff fd 1d bl ffc46604 <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN /* * 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; ffc468ec: 38 00 00 01 li r0,1 the_period->next_length = length; ffc468f0: 93 dd 00 3c stw r30,60(r29) /* * 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; ffc468f4: 90 1d 00 38 stw r0,56(r29) ffc468f8: 7f 60 01 24 mtmsr r27 the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc468fc: 81 3c 36 14 lwz r9,13844(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc46900: 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; ffc46904: 80 1d 00 08 lwz r0,8(r29) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc46908: 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; ffc4690c: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc46910: 4b fc b5 81 bl ffc11e90 <_Thread_Set_state> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc46914: 7d 20 00 a6 mfmsr r9 ffc46918: 7c 10 42 a6 mfsprg r0,0 ffc4691c: 7d 20 00 78 andc r0,r9,r0 ffc46920: 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; ffc46924: 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; ffc46928: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc4692c: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc46930: 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 ) ffc46934: 2f 80 00 03 cmpwi cr7,r0,3 ffc46938: 41 9e 00 10 beq- cr7,ffc46948 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc4693c: 4b fc a9 d9 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc46940: 3b e0 00 00 li r31,0 return RTEMS_SUCCESSFUL; ffc46944: 4b ff fe 70 b ffc467b4 <== ALWAYS TAKEN /* * 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 ); ffc46948: 80 7c 36 14 lwz r3,13844(r28) <== NOT EXECUTED ffc4694c: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc46950: 4b fc a4 b1 bl ffc10e00 <_Thread_Clear_state> <== NOT EXECUTED ffc46954: 4b ff ff e8 b ffc4693c <== NOT EXECUTED ffc31d64 : } } void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); ffc31d64: 3c 80 ff c1 lis r4,-63 ffc31d68: 38 84 a5 50 addi r4,r4,-23216 ffc31d6c: 38 60 00 00 li r3,0 ffc31d70: 4b ff fc f8 b ffc31a68 <== ALWAYS TAKEN ffc31a68 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc31a68: 94 21 ff 58 stwu r1,-168(r1) ffc31a6c: 7c 08 02 a6 mflr r0 ffc31a70: 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 ) ffc31a74: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc31a78: 93 a1 00 9c stw r29,156(r1) ffc31a7c: 7c 7d 1b 78 mr r29,r3 ffc31a80: 92 41 00 70 stw r18,112(r1) ffc31a84: 92 61 00 74 stw r19,116(r1) ffc31a88: 92 81 00 78 stw r20,120(r1) ffc31a8c: 92 a1 00 7c stw r21,124(r1) ffc31a90: 92 c1 00 80 stw r22,128(r1) ffc31a94: 92 e1 00 84 stw r23,132(r1) ffc31a98: 93 01 00 88 stw r24,136(r1) ffc31a9c: 93 21 00 8c stw r25,140(r1) ffc31aa0: 93 41 00 90 stw r26,144(r1) ffc31aa4: 93 61 00 94 stw r27,148(r1) ffc31aa8: 93 81 00 98 stw r28,152(r1) ffc31aac: 93 c1 00 a0 stw r30,160(r1) ffc31ab0: 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 ) ffc31ab4: 90 01 00 68 stw r0,104(r1) ffc31ab8: 41 82 01 88 beq- ffc31c40 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc31abc: 3c 80 ff c7 lis r4,-57 ffc31ac0: 7c 09 03 a6 mtctr r0 ffc31ac4: 38 84 e8 7c addi r4,r4,-6020 /* * 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 ; ffc31ac8: 3f c0 00 00 lis r30,0 ffc31acc: 3b de 68 c4 addi r30,r30,26820 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc31ad0: 4c c6 31 82 crclr 4*cr1+eq ffc31ad4: 4e 80 04 21 bctrl <== ALWAYS TAKEN #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc31ad8: 80 01 00 68 lwz r0,104(r1) ffc31adc: 3c 80 ff c7 lis r4,-57 ffc31ae0: 7c 09 03 a6 mtctr r0 ffc31ae4: 38 84 e8 9c addi r4,r4,-5988 ffc31ae8: 7f a3 eb 78 mr r3,r29 ffc31aec: 4c c6 31 82 crclr 4*cr1+eq ffc31af0: 4e 80 04 21 bctrl <== ALWAYS TAKEN (*print)( context, "--- Wall times are in seconds ---\n" ); ffc31af4: 80 01 00 68 lwz r0,104(r1) ffc31af8: 3c 80 ff c7 lis r4,-57 ffc31afc: 7c 09 03 a6 mtctr r0 ffc31b00: 38 84 e8 c0 addi r4,r4,-5952 ffc31b04: 7f a3 eb 78 mr r3,r29 ffc31b08: 4c c6 31 82 crclr 4*cr1+eq ffc31b0c: 4e 80 04 21 bctrl <== ALWAYS TAKEN Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc31b10: 80 01 00 68 lwz r0,104(r1) ffc31b14: 3c 80 ff c7 lis r4,-57 ffc31b18: 7c 09 03 a6 mtctr r0 ffc31b1c: 38 84 e8 e4 addi r4,r4,-5916 ffc31b20: 7f a3 eb 78 mr r3,r29 ffc31b24: 4c c6 31 82 crclr 4*cr1+eq ffc31b28: 4e 80 04 21 bctrl <== ALWAYS TAKEN #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc31b2c: 80 01 00 68 lwz r0,104(r1) ffc31b30: 3c 80 ff c7 lis r4,-57 ffc31b34: 7c 09 03 a6 mtctr r0 ffc31b38: 38 84 e9 30 addi r4,r4,-5840 ffc31b3c: 7f a3 eb 78 mr r3,r29 ffc31b40: 4c c6 31 82 crclr 4*cr1+eq ffc31b44: 4e 80 04 21 bctrl <== ALWAYS TAKEN /* * 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 ; ffc31b48: 83 fe 00 08 lwz r31,8(r30) ffc31b4c: 80 1e 00 0c lwz r0,12(r30) ffc31b50: 7f 9f 00 40 cmplw cr7,r31,r0 ffc31b54: 41 9d 00 ec bgt- cr7,ffc31c40 <== 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, ffc31b58: 3e a0 ff c7 lis r21,-57 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, ffc31b5c: 3e 60 ff c7 lis r19,-57 ffc31b60: 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, ffc31b64: 3e 80 ff c7 lis r20,-57 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc31b68: 3e c0 ff c7 lis r22,-57 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc31b6c: 3a b5 e9 7c addi r21,r21,-5764 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, ffc31b70: 3a 73 e9 94 addi r19,r19,-5740 ffc31b74: 63 7b 4d d3 ori r27,r27,19923 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, ffc31b78: 3a 94 e9 b4 addi r20,r20,-5708 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc31b7c: 3a d6 03 14 addi r22,r22,788 ffc31b80: 3b 81 00 30 addi r28,r1,48 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); ffc31b84: 3a e1 00 18 addi r23,r1,24 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc31b88: 3b 41 00 08 addi r26,r1,8 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 ); ffc31b8c: 3b 01 00 48 addi r24,r1,72 ffc31b90: 3b 21 00 10 addi r25,r1,16 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); ffc31b94: 3a 41 00 60 addi r18,r1,96 ffc31b98: 48 00 00 14 b ffc31bac <== ALWAYS TAKEN /* * 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 ; ffc31b9c: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc31ba0: 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 ; ffc31ba4: 7f 80 f8 40 cmplw cr7,r0,r31 ffc31ba8: 41 9c 00 98 blt- cr7,ffc31c40 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc31bac: 7f e3 fb 78 mr r3,r31 ffc31bb0: 7f 84 e3 78 mr r4,r28 ffc31bb4: 48 01 46 dd bl ffc46290 <== ALWAYS TAKEN if ( status != RTEMS_SUCCESSFUL ) ffc31bb8: 2f 83 00 00 cmpwi cr7,r3,0 ffc31bbc: 40 9e ff e0 bne+ cr7,ffc31b9c continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); ffc31bc0: 7e e4 bb 78 mr r4,r23 ffc31bc4: 7f e3 fb 78 mr r3,r31 ffc31bc8: 48 01 47 ad bl ffc46374 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc31bcc: 80 61 00 18 lwz r3,24(r1) ffc31bd0: 7f 45 d3 78 mr r5,r26 ffc31bd4: 38 80 00 05 li r4,5 ffc31bd8: 4b fd c6 49 bl ffc0e220 <== ALWAYS TAKEN /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc31bdc: 80 01 00 68 lwz r0,104(r1) ffc31be0: 7e a4 ab 78 mr r4,r21 ffc31be4: 80 e1 00 30 lwz r7,48(r1) ffc31be8: 7f e5 fb 78 mr r5,r31 ffc31bec: 7c 09 03 a6 mtctr r0 ffc31bf0: 7f a3 eb 78 mr r3,r29 ffc31bf4: 81 01 00 34 lwz r8,52(r1) ffc31bf8: 7f 46 d3 78 mr r6,r26 ffc31bfc: 4c c6 31 82 crclr 4*cr1+eq ffc31c00: 4e 80 04 21 bctrl <== ALWAYS TAKEN ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc31c04: 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 ); ffc31c08: 7f 03 c3 78 mr r3,r24 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc31c0c: 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 ); ffc31c10: 7f 25 cb 78 mr r5,r25 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc31c14: 7e c4 b3 78 mr r4,r22 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc31c18: 40 9e 00 70 bne- cr7,ffc31c88 (*print)( context, "\n" ); ffc31c1c: 80 01 00 68 lwz r0,104(r1) ffc31c20: 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++ ) { ffc31c24: 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" ); ffc31c28: 7c 09 03 a6 mtctr r0 ffc31c2c: 4c c6 31 82 crclr 4*cr1+eq ffc31c30: 4e 80 04 21 bctrl <== ALWAYS TAKEN /* * 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 ; ffc31c34: 80 1e 00 0c lwz r0,12(r30) ffc31c38: 7f 80 f8 40 cmplw cr7,r0,r31 ffc31c3c: 40 9c ff 70 bge+ cr7,ffc31bac <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc31c40: 80 01 00 ac lwz r0,172(r1) ffc31c44: 82 41 00 70 lwz r18,112(r1) ffc31c48: 7c 08 03 a6 mtlr r0 ffc31c4c: 82 61 00 74 lwz r19,116(r1) ffc31c50: 82 81 00 78 lwz r20,120(r1) ffc31c54: 82 a1 00 7c lwz r21,124(r1) ffc31c58: 82 c1 00 80 lwz r22,128(r1) ffc31c5c: 82 e1 00 84 lwz r23,132(r1) ffc31c60: 83 01 00 88 lwz r24,136(r1) ffc31c64: 83 21 00 8c lwz r25,140(r1) ffc31c68: 83 41 00 90 lwz r26,144(r1) ffc31c6c: 83 61 00 94 lwz r27,148(r1) ffc31c70: 83 81 00 98 lwz r28,152(r1) ffc31c74: 83 a1 00 9c lwz r29,156(r1) ffc31c78: 83 c1 00 a0 lwz r30,160(r1) ffc31c7c: 83 e1 00 a4 lwz r31,164(r1) ffc31c80: 38 21 00 a8 addi r1,r1,168 ffc31c84: 4e 80 00 20 blr <== ALWAYS TAKEN 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 ); ffc31c88: 7c 04 03 78 mr r4,r0 ffc31c8c: 48 00 1c c9 bl ffc33954 <_Timespec_Divide_by_integer> <== ALWAYS TAKEN (*print)( context, ffc31c90: 80 01 00 14 lwz r0,20(r1) ffc31c94: 80 81 00 3c lwz r4,60(r1) ffc31c98: 7f a3 eb 78 mr r3,r29 ffc31c9c: 81 61 00 44 lwz r11,68(r1) ffc31ca0: 7d 40 d8 96 mulhw r10,r0,r27 ffc31ca4: 80 e1 00 40 lwz r7,64(r1) ffc31ca8: 7c c4 d8 96 mulhw r6,r4,r27 ffc31cac: 81 21 00 10 lwz r9,16(r1) ffc31cb0: 80 a1 00 38 lwz r5,56(r1) ffc31cb4: 7d 0b d8 96 mulhw r8,r11,r27 ffc31cb8: 7c 00 fe 70 srawi r0,r0,31 ffc31cbc: 7d 4a 36 70 srawi r10,r10,6 ffc31cc0: 7d 40 50 50 subf r10,r0,r10 ffc31cc4: 80 01 00 68 lwz r0,104(r1) ffc31cc8: 7d 6b fe 70 srawi r11,r11,31 ffc31ccc: 7c 84 fe 70 srawi r4,r4,31 ffc31cd0: 7c 09 03 a6 mtctr r0 ffc31cd4: 7c c6 36 70 srawi r6,r6,6 ffc31cd8: 7d 08 36 70 srawi r8,r8,6 ffc31cdc: 7c c4 30 50 subf r6,r4,r6 ffc31ce0: 7d 0b 40 50 subf r8,r11,r8 ffc31ce4: 7e 64 9b 78 mr r4,r19 ffc31ce8: 4c c6 31 82 crclr 4*cr1+eq ffc31cec: 4e 80 04 21 bctrl <== ALWAYS TAKEN 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); ffc31cf0: 80 81 00 30 lwz r4,48(r1) ffc31cf4: 7e 43 93 78 mr r3,r18 ffc31cf8: 7f 25 cb 78 mr r5,r25 ffc31cfc: 48 00 1c 59 bl ffc33954 <_Timespec_Divide_by_integer> <== ALWAYS TAKEN (*print)( context, ffc31d00: 80 01 00 14 lwz r0,20(r1) ffc31d04: 80 81 00 54 lwz r4,84(r1) ffc31d08: 7f a3 eb 78 mr r3,r29 ffc31d0c: 81 61 00 5c lwz r11,92(r1) ffc31d10: 7d 40 d8 96 mulhw r10,r0,r27 ffc31d14: 80 a1 00 50 lwz r5,80(r1) ffc31d18: 7c c4 d8 96 mulhw r6,r4,r27 ffc31d1c: 80 e1 00 58 lwz r7,88(r1) ffc31d20: 81 21 00 10 lwz r9,16(r1) ffc31d24: 7d 0b d8 96 mulhw r8,r11,r27 ffc31d28: 7c 00 fe 70 srawi r0,r0,31 ffc31d2c: 7d 4a 36 70 srawi r10,r10,6 ffc31d30: 7d 40 50 50 subf r10,r0,r10 ffc31d34: 80 01 00 68 lwz r0,104(r1) ffc31d38: 7c 84 fe 70 srawi r4,r4,31 ffc31d3c: 7d 6b fe 70 srawi r11,r11,31 ffc31d40: 7c 09 03 a6 mtctr r0 ffc31d44: 7c c6 36 70 srawi r6,r6,6 ffc31d48: 7d 08 36 70 srawi r8,r8,6 ffc31d4c: 7c c4 30 50 subf r6,r4,r6 ffc31d50: 7d 0b 40 50 subf r8,r11,r8 ffc31d54: 7e 84 a3 78 mr r4,r20 ffc31d58: 4c c6 31 82 crclr 4*cr1+eq ffc31d5c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc31d60: 4b ff fe 3c b ffc31b9c <== ALWAYS TAKEN ffc31d74 : ffc31d74: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc31d78: 94 21 ff f0 stwu r1,-16(r1) ffc31d7c: 7c 08 02 a6 mflr r0 ffc31d80: 81 69 35 d4 lwz r11,13780(r9) ffc31d84: 90 01 00 14 stw r0,20(r1) ffc31d88: 38 0b 00 01 addi r0,r11,1 ffc31d8c: 93 c1 00 08 stw r30,8(r1) ffc31d90: 93 e1 00 0c stw r31,12(r1) ffc31d94: 90 09 35 d4 stw r0,13780(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 ; ffc31d98: 3f c0 00 00 lis r30,0 ffc31d9c: 3b de 68 c4 addi r30,r30,26820 ffc31da0: 83 fe 00 08 lwz r31,8(r30) ffc31da4: 80 1e 00 0c lwz r0,12(r30) ffc31da8: 7f 9f 00 40 cmplw cr7,r31,r0 ffc31dac: 41 9d 00 1c bgt- cr7,ffc31dc8 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); ffc31db0: 7f e3 fb 78 mr r3,r31 ffc31db4: 48 00 00 31 bl ffc31de4 <== ALWAYS TAKEN /* * 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 ; ffc31db8: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc31dbc: 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 ; ffc31dc0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc31dc4: 40 9c ff ec bge+ cr7,ffc31db0 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc31dc8: 4b fd f5 4d bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc31dcc: 80 01 00 14 lwz r0,20(r1) ffc31dd0: 83 c1 00 08 lwz r30,8(r1) ffc31dd4: 7c 08 03 a6 mtlr r0 ffc31dd8: 83 e1 00 0c lwz r31,12(r1) ffc31ddc: 38 21 00 10 addi r1,r1,16 ffc31de0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc31de4 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { ffc31de4: 94 21 ff e0 stwu r1,-32(r1) ffc31de8: 7c 08 02 a6 mflr r0 ffc31dec: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc31df0: 3c 60 00 00 lis r3,0 ffc31df4: 90 01 00 24 stw r0,36(r1) ffc31df8: 38 63 68 c4 addi r3,r3,26820 ffc31dfc: 38 a1 00 08 addi r5,r1,8 ffc31e00: 93 e1 00 1c stw r31,28(r1) ffc31e04: 4b fd e8 59 bl ffc1065c <_Objects_Get> <== ALWAYS TAKEN Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc31e08: 80 01 00 08 lwz r0,8(r1) ffc31e0c: 7c 7f 1b 78 mr r31,r3 ffc31e10: 38 60 00 04 li r3,4 ffc31e14: 2f 80 00 00 cmpwi cr7,r0,0 ffc31e18: 40 9e 00 34 bne- cr7,ffc31e4c case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); ffc31e1c: 38 80 00 00 li r4,0 ffc31e20: 38 a0 00 38 li r5,56 ffc31e24: 38 7f 00 54 addi r3,r31,84 ffc31e28: 48 01 e9 0d bl ffc50734 <== ALWAYS TAKEN ffc31e2c: 3c 00 7f ff lis r0,32767 ffc31e30: 60 00 ff ff ori r0,r0,65535 ffc31e34: 90 1f 00 78 stw r0,120(r31) ffc31e38: 90 1f 00 5c stw r0,92(r31) ffc31e3c: 90 1f 00 60 stw r0,96(r31) ffc31e40: 90 1f 00 74 stw r0,116(r31) _Thread_Enable_dispatch(); ffc31e44: 4b fd f4 d1 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc31e48: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc31e4c: 80 01 00 24 lwz r0,36(r1) ffc31e50: 83 e1 00 1c lwz r31,28(r1) ffc31e54: 38 21 00 20 addi r1,r1,32 ffc31e58: 7c 08 03 a6 mtlr r0 ffc31e5c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc189dc : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { ffc189dc: 94 21 ff c8 stwu r1,-56(r1) ffc189e0: 7c 08 02 a6 mflr r0 ffc189e4: 93 81 00 28 stw r28,40(r1) rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) ffc189e8: 7c 7c 1b 79 mr. r28,r3 uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { ffc189ec: 93 61 00 24 stw r27,36(r1) rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) ffc189f0: 3b 60 00 03 li r27,3 uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { ffc189f4: 93 a1 00 2c stw r29,44(r1) ffc189f8: 7c bd 2b 78 mr r29,r5 ffc189fc: 93 c1 00 30 stw r30,48(r1) ffc18a00: 7c de 33 78 mr r30,r6 ffc18a04: 93 e1 00 34 stw r31,52(r1) ffc18a08: 7c 9f 23 78 mr r31,r4 ffc18a0c: 90 01 00 3c stw r0,60(r1) ffc18a10: 92 e1 00 14 stw r23,20(r1) ffc18a14: 93 01 00 18 stw r24,24(r1) ffc18a18: 93 21 00 1c stw r25,28(r1) ffc18a1c: 93 41 00 20 stw r26,32(r1) rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) ffc18a20: 41 82 00 20 beq- ffc18a40 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc18a24: 2f 84 00 00 cmpwi cr7,r4,0 ffc18a28: 41 9e 00 14 beq- cr7,ffc18a3c return RTEMS_INVALID_ADDRESS; if ( !id ) ffc18a2c: 2f 88 00 00 cmpwi cr7,r8,0 ffc18a30: 41 9e 00 0c beq- cr7,ffc18a3c return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) ffc18a34: 70 98 00 07 andi. r24,r4,7 ffc18a38: 41 82 00 40 beq- ffc18a78 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; ffc18a3c: 3b 60 00 09 li r27,9 } ffc18a40: 80 01 00 3c lwz r0,60(r1) ffc18a44: 7f 63 db 78 mr r3,r27 ffc18a48: 82 e1 00 14 lwz r23,20(r1) ffc18a4c: 7c 08 03 a6 mtlr r0 ffc18a50: 83 01 00 18 lwz r24,24(r1) ffc18a54: 83 21 00 1c lwz r25,28(r1) ffc18a58: 83 41 00 20 lwz r26,32(r1) ffc18a5c: 83 61 00 24 lwz r27,36(r1) ffc18a60: 83 81 00 28 lwz r28,40(r1) ffc18a64: 83 a1 00 2c lwz r29,44(r1) ffc18a68: 83 c1 00 30 lwz r30,48(r1) ffc18a6c: 83 e1 00 34 lwz r31,52(r1) ffc18a70: 38 21 00 38 addi r1,r1,56 ffc18a74: 4e 80 00 20 blr <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ ffc18a78: 3f 20 00 00 lis r25,0 ffc18a7c: 90 e1 00 08 stw r7,8(r1) * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); ffc18a80: 3e e0 00 00 lis r23,0 ffc18a84: 80 79 28 5c lwz r3,10332(r25) ffc18a88: 3a f7 6e ec addi r23,r23,28396 ffc18a8c: 91 01 00 0c stw r8,12(r1) the_region = _Region_Allocate(); if ( !the_region ) ffc18a90: 3b 60 00 05 li r27,5 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ ffc18a94: 48 00 33 75 bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc18a98: 7e e3 bb 78 mr r3,r23 ffc18a9c: 48 00 4e 15 bl ffc1d8b0 <_Objects_Allocate> <== ALWAYS TAKEN the_region = _Region_Allocate(); if ( !the_region ) ffc18aa0: 7c 7a 1b 79 mr. r26,r3 ffc18aa4: 41 82 00 3c beq- ffc18ae0 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( ffc18aa8: 38 7a 00 68 addi r3,r26,104 ffc18aac: 7f e4 fb 78 mr r4,r31 ffc18ab0: 7f a5 eb 78 mr r5,r29 ffc18ab4: 7f c6 f3 78 mr r6,r30 ffc18ab8: 48 00 47 cd bl ffc1d284 <_Heap_Initialize> <== ALWAYS TAKEN &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { ffc18abc: 80 e1 00 08 lwz r7,8(r1) ffc18ac0: 2f 83 00 00 cmpwi cr7,r3,0 if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( ffc18ac4: 90 7a 00 5c stw r3,92(r26) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { ffc18ac8: 81 01 00 0c lwz r8,12(r1) ffc18acc: 40 9e 00 54 bne- cr7,ffc18b20 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); ffc18ad0: 7e e3 bb 78 mr r3,r23 ffc18ad4: 7f 44 d3 78 mr r4,r26 ffc18ad8: 48 00 51 f9 bl ffc1dcd0 <_Objects_Free> <== ALWAYS TAKEN ffc18adc: 3b 60 00 08 li r27,8 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); ffc18ae0: 80 79 28 5c lwz r3,10332(r25) ffc18ae4: 48 00 33 a5 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc18ae8: 80 01 00 3c lwz r0,60(r1) ffc18aec: 7f 63 db 78 mr r3,r27 ffc18af0: 82 e1 00 14 lwz r23,20(r1) ffc18af4: 7c 08 03 a6 mtlr r0 ffc18af8: 83 01 00 18 lwz r24,24(r1) ffc18afc: 83 21 00 1c lwz r25,28(r1) ffc18b00: 83 41 00 20 lwz r26,32(r1) ffc18b04: 83 61 00 24 lwz r27,36(r1) ffc18b08: 83 81 00 28 lwz r28,40(r1) ffc18b0c: 83 a1 00 2c lwz r29,44(r1) ffc18b10: 83 c1 00 30 lwz r30,48(r1) ffc18b14: 83 e1 00 34 lwz r31,52(r1) ffc18b18: 38 21 00 38 addi r1,r1,56 ffc18b1c: 4e 80 00 20 blr <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; ffc18b20: 93 fa 00 50 stw r31,80(r26) the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( ffc18b24: 54 e4 f7 fe rlwinm r4,r7,30,31,31 ffc18b28: 38 7a 00 10 addi r3,r26,16 } else { the_region->starting_address = starting_address; the_region->length = length; ffc18b2c: 93 ba 00 54 stw r29,84(r26) the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( ffc18b30: 38 a0 00 40 li r5,64 ffc18b34: 38 c0 00 06 li r6,6 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; ffc18b38: 93 da 00 58 stw r30,88(r26) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; ffc18b3c: 3b 60 00 00 li r27,0 the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; ffc18b40: 93 1a 00 64 stw r24,100(r26) else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; ffc18b44: 90 fa 00 60 stw r7,96(r26) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( ffc18b48: 91 01 00 0c stw r8,12(r1) ffc18b4c: 48 00 6a 09 bl ffc1f554 <_Thread_queue_Initialize> <== ALWAYS TAKEN ffc18b50: 80 1a 00 08 lwz r0,8(r26) ffc18b54: 81 77 00 1c lwz r11,28(r23) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; ffc18b58: 81 01 00 0c lwz r8,12(r1) ffc18b5c: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc18b60: 93 9a 00 0c stw r28,12(r26) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc18b64: 7f 4b 49 2e stwx r26,r11,r9 ffc18b68: 90 08 00 00 stw r0,0(r8) ffc18b6c: 4b ff ff 74 b ffc18ae0 <== ALWAYS TAKEN ffc18b70 : */ rtems_status_code rtems_region_delete( rtems_id id ) { ffc18b70: 94 21 ff d8 stwu r1,-40(r1) ffc18b74: 7c 08 02 a6 mflr r0 ffc18b78: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); ffc18b7c: 3f e0 00 00 lis r31,0 */ rtems_status_code rtems_region_delete( rtems_id id ) { ffc18b80: 93 81 00 18 stw r28,24(r1) ffc18b84: 7c 7c 1b 78 mr r28,r3 ffc18b88: 93 a1 00 1c stw r29,28(r1) RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) ffc18b8c: 3f a0 00 00 lis r29,0 ffc18b90: 3b bd 6e ec addi r29,r29,28396 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); ffc18b94: 80 7f 28 5c lwz r3,10332(r31) */ rtems_status_code rtems_region_delete( rtems_id id ) { ffc18b98: 90 01 00 2c stw r0,44(r1) ffc18b9c: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); ffc18ba0: 48 00 32 69 bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc18ba4: 7f 84 e3 78 mr r4,r28 ffc18ba8: 7f a3 eb 78 mr r3,r29 ffc18bac: 38 a1 00 08 addi r5,r1,8 ffc18bb0: 48 00 53 01 bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc18bb4: 80 01 00 08 lwz r0,8(r1) ffc18bb8: 3b c0 00 04 li r30,4 ffc18bbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc18bc0: 7c 7c 1b 78 mr r28,r3 ffc18bc4: 40 9e 00 14 bne- cr7,ffc18bd8 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) ffc18bc8: 80 03 00 64 lwz r0,100(r3) ffc18bcc: 3b c0 00 0c li r30,12 ffc18bd0: 2f 80 00 00 cmpwi cr7,r0,0 ffc18bd4: 41 9e 00 30 beq- cr7,ffc18c04 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc18bd8: 80 7f 28 5c lwz r3,10332(r31) ffc18bdc: 48 00 32 ad bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc18be0: 80 01 00 2c lwz r0,44(r1) ffc18be4: 7f c3 f3 78 mr r3,r30 ffc18be8: 83 81 00 18 lwz r28,24(r1) ffc18bec: 7c 08 03 a6 mtlr r0 ffc18bf0: 83 a1 00 1c lwz r29,28(r1) ffc18bf4: 83 c1 00 20 lwz r30,32(r1) ffc18bf8: 83 e1 00 24 lwz r31,36(r1) ffc18bfc: 38 21 00 28 addi r1,r1,40 ffc18c00: 4e 80 00 20 blr <== ALWAYS TAKEN case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); ffc18c04: 7f a3 eb 78 mr r3,r29 ffc18c08: 7f 84 e3 78 mr r4,r28 ffc18c0c: 48 00 4d 6d bl ffc1d978 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); ffc18c10: 7f a3 eb 78 mr r3,r29 ffc18c14: 7f 84 e3 78 mr r4,r28 ffc18c18: 48 00 50 b9 bl ffc1dcd0 <_Objects_Free> <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc18c1c: 80 7f 28 5c lwz r3,10332(r31) ffc18c20: 3b c0 00 00 li r30,0 ffc18c24: 48 00 32 65 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc18c28: 80 01 00 2c lwz r0,44(r1) ffc18c2c: 7f c3 f3 78 mr r3,r30 ffc18c30: 83 81 00 18 lwz r28,24(r1) ffc18c34: 7c 08 03 a6 mtlr r0 ffc18c38: 83 a1 00 1c lwz r29,28(r1) ffc18c3c: 83 c1 00 20 lwz r30,32(r1) ffc18c40: 83 e1 00 24 lwz r31,36(r1) ffc18c44: 38 21 00 28 addi r1,r1,40 ffc18c48: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18c4c : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { ffc18c4c: 94 21 ff d0 stwu r1,-48(r1) ffc18c50: 7c 08 02 a6 mflr r0 ffc18c54: 93 61 00 1c stw r27,28(r1) Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) ffc18c58: 7c 9b 23 79 mr. r27,r4 rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { ffc18c5c: 93 81 00 20 stw r28,32(r1) ffc18c60: 7c bc 2b 78 mr r28,r5 ffc18c64: 93 a1 00 24 stw r29,36(r1) Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) ffc18c68: 3b a0 00 09 li r29,9 rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { ffc18c6c: 93 c1 00 28 stw r30,40(r1) ffc18c70: 7c 7e 1b 78 mr r30,r3 ffc18c74: 90 01 00 34 stw r0,52(r1) ffc18c78: 93 e1 00 2c stw r31,44(r1) Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) ffc18c7c: 41 82 00 40 beq- ffc18cbc return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ ffc18c80: 3f e0 00 00 lis r31,0 ffc18c84: 80 7f 28 5c lwz r3,10332(r31) the_region = _Region_Get( id, &location ); switch ( location ) { ffc18c88: 3b a0 00 04 li r29,4 Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ ffc18c8c: 48 00 31 7d bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) ffc18c90: 3c 60 00 00 lis r3,0 ffc18c94: 7f c4 f3 78 mr r4,r30 ffc18c98: 38 63 6e ec addi r3,r3,28396 ffc18c9c: 38 a1 00 0c addi r5,r1,12 ffc18ca0: 48 00 52 11 bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc18ca4: 80 01 00 0c lwz r0,12(r1) ffc18ca8: 7c 7e 1b 78 mr r30,r3 ffc18cac: 2f 80 00 00 cmpwi cr7,r0,0 ffc18cb0: 41 9e 00 34 beq- cr7,ffc18ce4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc18cb4: 80 7f 28 5c lwz r3,10332(r31) ffc18cb8: 48 00 31 d1 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc18cbc: 80 01 00 34 lwz r0,52(r1) ffc18cc0: 7f a3 eb 78 mr r3,r29 ffc18cc4: 83 61 00 1c lwz r27,28(r1) ffc18cc8: 7c 08 03 a6 mtlr r0 ffc18ccc: 83 81 00 20 lwz r28,32(r1) ffc18cd0: 83 a1 00 24 lwz r29,36(r1) ffc18cd4: 83 c1 00 28 lwz r30,40(r1) ffc18cd8: 83 e1 00 2c lwz r31,44(r1) ffc18cdc: 38 21 00 30 addi r1,r1,48 ffc18ce0: 4e 80 00 20 blr <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( ffc18ce4: 7f 64 db 78 mr r4,r27 ffc18ce8: 7f 85 e3 78 mr r5,r28 ffc18cec: 38 63 00 68 addi r3,r3,104 ffc18cf0: 38 c1 00 08 addi r6,r1,8 ffc18cf4: 48 00 41 f5 bl ffc1cee8 <_Heap_Extend> <== ALWAYS TAKEN starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { ffc18cf8: 2c 03 00 00 cmpwi r3,0 ffc18cfc: 40 82 00 28 bne- ffc18d24 the_region->length += amount_extended; ffc18d00: 80 01 00 08 lwz r0,8(r1) the_region->maximum_segment_size += amount_extended; ffc18d04: 3b a0 00 00 li r29,0 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; ffc18d08: 81 3e 00 54 lwz r9,84(r30) the_region->maximum_segment_size += amount_extended; ffc18d0c: 81 7e 00 5c lwz r11,92(r30) length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; ffc18d10: 7d 29 02 14 add r9,r9,r0 the_region->maximum_segment_size += amount_extended; ffc18d14: 7c 0b 02 14 add r0,r11,r0 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; ffc18d18: 91 3e 00 54 stw r9,84(r30) the_region->maximum_segment_size += amount_extended; ffc18d1c: 90 1e 00 5c stw r0,92(r30) ffc18d20: 4b ff ff 94 b ffc18cb4 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { ffc18d24: 68 7d 00 01 xori r29,r3,1 ffc18d28: 33 bd ff ff addic r29,r29,-1 ffc18d2c: 7f bd e9 10 subfe r29,r29,r29 ffc18d30: 57 bd 07 f6 rlwinm r29,r29,0,31,27 ffc18d34: 3b bd 00 18 addi r29,r29,24 ffc18d38: 4b ff ff 7c b ffc18cb4 <== ALWAYS TAKEN ffc18d3c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { ffc18d3c: 94 21 ff d8 stwu r1,-40(r1) ffc18d40: 7c 08 02 a6 mflr r0 ffc18d44: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc18d48: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { ffc18d4c: 93 81 00 18 stw r28,24(r1) ffc18d50: 7c 7c 1b 78 mr r28,r3 ffc18d54: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc18d58: 3b e0 00 09 li r31,9 rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { ffc18d5c: 90 01 00 2c stw r0,44(r1) ffc18d60: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc18d64: 41 82 00 3c beq- ffc18da0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc18d68: 3f c0 00 00 lis r30,0 ffc18d6c: 80 7e 28 5c lwz r3,10332(r30) the_region = _Region_Get( id, &location ); switch ( location ) { ffc18d70: 3b e0 00 04 li r31,4 register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc18d74: 48 00 30 95 bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc18d78: 3c 60 00 00 lis r3,0 ffc18d7c: 38 63 6e ec addi r3,r3,28396 ffc18d80: 7f 84 e3 78 mr r4,r28 ffc18d84: 38 a1 00 08 addi r5,r1,8 ffc18d88: 48 00 51 29 bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc18d8c: 80 01 00 08 lwz r0,8(r1) ffc18d90: 2f 80 00 00 cmpwi cr7,r0,0 ffc18d94: 41 9e 00 30 beq- cr7,ffc18dc4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc18d98: 80 7e 28 5c lwz r3,10332(r30) ffc18d9c: 48 00 30 ed bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc18da0: 80 01 00 2c lwz r0,44(r1) ffc18da4: 7f e3 fb 78 mr r3,r31 ffc18da8: 83 81 00 18 lwz r28,24(r1) ffc18dac: 7c 08 03 a6 mtlr r0 ffc18db0: 83 a1 00 1c lwz r29,28(r1) ffc18db4: 83 c1 00 20 lwz r30,32(r1) ffc18db8: 83 e1 00 24 lwz r31,36(r1) ffc18dbc: 38 21 00 28 addi r1,r1,40 ffc18dc0: 4e 80 00 20 blr <== ALWAYS TAKEN case OBJECTS_LOCAL: the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; ffc18dc4: 90 1d 00 10 stw r0,16(r29) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); ffc18dc8: 38 63 00 68 addi r3,r3,104 ffc18dcc: 7f a4 eb 78 mr r4,r29 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; ffc18dd0: 90 1d 00 0c stw r0,12(r29) the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); ffc18dd4: 3b e0 00 00 li r31,0 switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; the_info->Used.total = 0; ffc18dd8: 90 1d 00 14 stw r0,20(r29) the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); ffc18ddc: 48 00 43 b1 bl ffc1d18c <_Heap_Get_free_information> <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; break; ffc18de0: 4b ff ff b8 b ffc18d98 <== ALWAYS TAKEN ffc18de4 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { ffc18de4: 94 21 ff d8 stwu r1,-40(r1) ffc18de8: 7c 08 02 a6 mflr r0 ffc18dec: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc18df0: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { ffc18df4: 93 81 00 18 stw r28,24(r1) ffc18df8: 7c 7c 1b 78 mr r28,r3 ffc18dfc: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc18e00: 3b e0 00 09 li r31,9 rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { ffc18e04: 90 01 00 2c stw r0,44(r1) ffc18e08: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc18e0c: 41 82 00 3c beq- ffc18e48 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc18e10: 3f c0 00 00 lis r30,0 ffc18e14: 80 7e 28 5c lwz r3,10332(r30) the_region = _Region_Get( id, &location ); switch ( location ) { ffc18e18: 3b e0 00 04 li r31,4 register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc18e1c: 48 00 2f ed bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc18e20: 3c 60 00 00 lis r3,0 ffc18e24: 38 63 6e ec addi r3,r3,28396 ffc18e28: 7f 84 e3 78 mr r4,r28 ffc18e2c: 38 a1 00 08 addi r5,r1,8 ffc18e30: 48 00 50 81 bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc18e34: 80 01 00 08 lwz r0,8(r1) ffc18e38: 2f 80 00 00 cmpwi cr7,r0,0 ffc18e3c: 41 9e 00 30 beq- cr7,ffc18e6c default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc18e40: 80 7e 28 5c lwz r3,10332(r30) ffc18e44: 48 00 30 45 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc18e48: 80 01 00 2c lwz r0,44(r1) ffc18e4c: 7f e3 fb 78 mr r3,r31 ffc18e50: 83 81 00 18 lwz r28,24(r1) ffc18e54: 7c 08 03 a6 mtlr r0 ffc18e58: 83 a1 00 1c lwz r29,28(r1) ffc18e5c: 83 c1 00 20 lwz r30,32(r1) ffc18e60: 83 e1 00 24 lwz r31,36(r1) ffc18e64: 38 21 00 28 addi r1,r1,40 ffc18e68: 4e 80 00 20 blr <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); ffc18e6c: 38 63 00 68 addi r3,r3,104 ffc18e70: 7f a4 eb 78 mr r4,r29 ffc18e74: 48 00 43 7d bl ffc1d1f0 <_Heap_Get_information> <== ALWAYS TAKEN ffc18e78: 3b e0 00 00 li r31,0 return_status = RTEMS_SUCCESSFUL; break; ffc18e7c: 4b ff ff c4 b ffc18e40 <== ALWAYS TAKEN ffc18e80 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { ffc18e80: 94 21 ff c0 stwu r1,-64(r1) ffc18e84: 7c 08 02 a6 mflr r0 ffc18e88: 93 c1 00 38 stw r30,56(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) ffc18e8c: 7c fe 3b 79 mr. r30,r7 uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { ffc18e90: 92 e1 00 1c stw r23,28(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) ffc18e94: 3a e0 00 09 li r23,9 uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { ffc18e98: 93 41 00 28 stw r26,40(r1) ffc18e9c: 7c da 33 78 mr r26,r6 ffc18ea0: 93 61 00 2c stw r27,44(r1) ffc18ea4: 7c bb 2b 78 mr r27,r5 ffc18ea8: 93 a1 00 34 stw r29,52(r1) ffc18eac: 7c 7d 1b 78 mr r29,r3 ffc18eb0: 93 e1 00 3c stw r31,60(r1) ffc18eb4: 7c 9f 23 78 mr r31,r4 ffc18eb8: 90 01 00 44 stw r0,68(r1) ffc18ebc: 93 01 00 20 stw r24,32(r1) ffc18ec0: 93 21 00 24 stw r25,36(r1) ffc18ec4: 93 81 00 30 stw r28,48(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) ffc18ec8: 41 82 00 18 beq- ffc18ee0 return RTEMS_INVALID_ADDRESS; *segment = NULL; if ( size == 0 ) ffc18ecc: 2f 84 00 00 cmpwi cr7,r4,0 void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; *segment = NULL; ffc18ed0: 38 00 00 00 li r0,0 ffc18ed4: 90 1e 00 00 stw r0,0(r30) if ( size == 0 ) ffc18ed8: 3a e0 00 08 li r23,8 ffc18edc: 40 9e 00 3c bne- cr7,ffc18f18 break; } _RTEMS_Unlock_allocator(); return return_status; } ffc18ee0: 80 01 00 44 lwz r0,68(r1) ffc18ee4: 7e e3 bb 78 mr r3,r23 ffc18ee8: 83 01 00 20 lwz r24,32(r1) ffc18eec: 7c 08 03 a6 mtlr r0 ffc18ef0: 82 e1 00 1c lwz r23,28(r1) ffc18ef4: 83 21 00 24 lwz r25,36(r1) ffc18ef8: 83 41 00 28 lwz r26,40(r1) ffc18efc: 83 61 00 2c lwz r27,44(r1) ffc18f00: 83 81 00 30 lwz r28,48(r1) ffc18f04: 83 a1 00 34 lwz r29,52(r1) ffc18f08: 83 c1 00 38 lwz r30,56(r1) ffc18f0c: 83 e1 00 3c lwz r31,60(r1) ffc18f10: 38 21 00 40 addi r1,r1,64 ffc18f14: 4e 80 00 20 blr <== ALWAYS TAKEN *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); ffc18f18: 3f 80 00 00 lis r28,0 ffc18f1c: 80 7c 28 5c lwz r3,10332(r28) _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; ffc18f20: 3a e0 00 04 li r23,4 *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); ffc18f24: 48 00 2e e5 bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc18f28: 3c 60 00 00 lis r3,0 executing = _Thread_Executing; ffc18f2c: 3d 20 00 00 lis r9,0 ffc18f30: 38 63 6e ec addi r3,r3,28396 ffc18f34: 83 09 28 64 lwz r24,10340(r9) ffc18f38: 7f a4 eb 78 mr r4,r29 ffc18f3c: 38 a1 00 08 addi r5,r1,8 ffc18f40: 48 00 4f 71 bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc18f44: 80 01 00 08 lwz r0,8(r1) ffc18f48: 7c 79 1b 78 mr r25,r3 ffc18f4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc18f50: 40 9e 00 14 bne- cr7,ffc18f64 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) ffc18f54: 80 03 00 5c lwz r0,92(r3) ffc18f58: 3a e0 00 08 li r23,8 ffc18f5c: 7f 9f 00 40 cmplw cr7,r31,r0 ffc18f60: 40 9d 00 44 ble- cr7,ffc18fa4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc18f64: 80 7c 28 5c lwz r3,10332(r28) ffc18f68: 48 00 2f 21 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc18f6c: 80 01 00 44 lwz r0,68(r1) ffc18f70: 7e e3 bb 78 mr r3,r23 ffc18f74: 83 01 00 20 lwz r24,32(r1) ffc18f78: 7c 08 03 a6 mtlr r0 ffc18f7c: 82 e1 00 1c lwz r23,28(r1) ffc18f80: 83 21 00 24 lwz r25,36(r1) ffc18f84: 83 41 00 28 lwz r26,40(r1) ffc18f88: 83 61 00 2c lwz r27,44(r1) ffc18f8c: 83 81 00 30 lwz r28,48(r1) ffc18f90: 83 a1 00 34 lwz r29,52(r1) ffc18f94: 83 c1 00 38 lwz r30,56(r1) ffc18f98: 83 e1 00 3c lwz r31,60(r1) ffc18f9c: 38 21 00 40 addi r1,r1,64 ffc18fa0: 4e 80 00 20 blr <== ALWAYS TAKEN * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc18fa4: 38 63 00 68 addi r3,r3,104 ffc18fa8: 7f e4 fb 78 mr r4,r31 ffc18fac: 38 a0 00 00 li r5,0 ffc18fb0: 38 c0 00 00 li r6,0 ffc18fb4: 48 00 3d 31 bl ffc1cce4 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { ffc18fb8: 2c 03 00 00 cmpwi r3,0 ffc18fbc: 41 82 00 1c beq- ffc18fd8 the_region->number_of_used_blocks += 1; ffc18fc0: 81 39 00 64 lwz r9,100(r25) *segment = the_segment; ffc18fc4: 3a e0 00 00 li r23,0 ffc18fc8: 90 7e 00 00 stw r3,0(r30) the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { the_region->number_of_used_blocks += 1; ffc18fcc: 38 09 00 01 addi r0,r9,1 ffc18fd0: 90 19 00 64 stw r0,100(r25) ffc18fd4: 4b ff ff 90 b ffc18f64 <== ALWAYS TAKEN *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { ffc18fd8: 73 60 00 01 andi. r0,r27,1 ffc18fdc: 3a e0 00 0d li r23,13 ffc18fe0: 40 82 ff 84 bne+ ffc18f64 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc18fe4: 3d 20 00 00 lis r9,0 ffc18fe8: 81 69 28 24 lwz r11,10276(r9) ffc18fec: 38 0b 00 01 addi r0,r11,1 ffc18ff0: 90 09 28 24 stw r0,10276(r9) * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); ffc18ff4: 80 7c 28 5c lwz r3,10332(r28) ffc18ff8: 48 00 2e 91 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN executing->Wait.queue = &the_region->Wait_queue; ffc18ffc: 38 19 00 10 addi r0,r25,16 <== ALWAYS TAKEN 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; ffc19000: 39 20 00 01 li r9,1 ffc19004: 90 18 00 44 stw r0,68(r24) executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); ffc19008: 3c a0 ff c2 lis r5,-62 ffc1900c: 91 39 00 40 stw r9,64(r25) ffc19010: 7c 03 03 78 mr r3,r0 ffc19014: 7f 44 d3 78 mr r4,r26 */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; executing->Wait.id = id; ffc19018: 93 b8 00 20 stw r29,32(r24) executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); ffc1901c: 38 a5 f6 60 addi r5,r5,-2464 _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; executing->Wait.id = id; executing->Wait.count = size; ffc19020: 93 f8 00 24 stw r31,36(r24) executing->Wait.return_argument = segment; ffc19024: 93 d8 00 28 stw r30,40(r24) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); ffc19028: 48 00 61 d9 bl ffc1f200 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc1902c: 48 00 5b 0d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return (rtems_status_code) executing->Wait.return_code; ffc19030: 82 f8 00 34 lwz r23,52(r24) ffc19034: 4b ff fe ac b ffc18ee0 <== ALWAYS TAKEN ffc19038 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { ffc19038: 94 21 ff d8 stwu r1,-40(r1) ffc1903c: 7c 08 02 a6 mflr r0 ffc19040: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) ffc19044: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { ffc19048: 93 81 00 18 stw r28,24(r1) ffc1904c: 7c 7c 1b 78 mr r28,r3 ffc19050: 93 c1 00 20 stw r30,32(r1) ffc19054: 7c be 2b 78 mr r30,r5 ffc19058: 90 01 00 2c stw r0,44(r1) ffc1905c: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) ffc19060: 41 82 00 94 beq- ffc190f4 return RTEMS_INVALID_ADDRESS; if ( !size ) ffc19064: 2f 85 00 00 cmpwi cr7,r5,0 ffc19068: 41 9e 00 8c beq- cr7,ffc190f4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc1906c: 3f e0 00 00 lis r31,0 ffc19070: 80 7f 28 5c lwz r3,10332(r31) ffc19074: 48 00 2d 95 bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc19078: 3c 60 00 00 lis r3,0 ffc1907c: 38 63 6e ec addi r3,r3,28396 ffc19080: 7f 84 e3 78 mr r4,r28 ffc19084: 38 a1 00 08 addi r5,r1,8 ffc19088: 48 00 4e 29 bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc1908c: 80 01 00 08 lwz r0,8(r1) ffc19090: 2f 80 00 00 cmpwi cr7,r0,0 ffc19094: 40 9e 00 50 bne- cr7,ffc190e4 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) ffc19098: 7f c5 f3 78 mr r5,r30 ffc1909c: 38 63 00 68 addi r3,r3,104 ffc190a0: 7f a4 eb 78 mr r4,r29 ffc190a4: 48 00 47 41 bl ffc1d7e4 <_Heap_Size_of_alloc_area> <== ALWAYS TAKEN ffc190a8: 3b c0 00 09 li r30,9 ffc190ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc190b0: 41 9e 00 08 beq- cr7,ffc190b8 <== NEVER TAKEN ffc190b4: 3b c0 00 00 li r30,0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc190b8: 80 7f 28 5c lwz r3,10332(r31) ffc190bc: 48 00 2d cd bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc190c0: 80 01 00 2c lwz r0,44(r1) ffc190c4: 7f c3 f3 78 mr r3,r30 ffc190c8: 83 81 00 18 lwz r28,24(r1) ffc190cc: 7c 08 03 a6 mtlr r0 ffc190d0: 83 a1 00 1c lwz r29,28(r1) ffc190d4: 83 c1 00 20 lwz r30,32(r1) ffc190d8: 83 e1 00 24 lwz r31,36(r1) ffc190dc: 38 21 00 28 addi r1,r1,40 ffc190e0: 4e 80 00 20 blr <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { ffc190e4: 2f 80 00 01 cmpwi cr7,r0,1 ffc190e8: 3b c0 00 04 li r30,4 ffc190ec: 40 9e ff c8 bne+ cr7,ffc190b4 <== NEVER TAKEN ffc190f0: 4b ff ff c8 b ffc190b8 <== ALWAYS TAKEN break; } _RTEMS_Unlock_allocator(); return return_status; } ffc190f4: 80 01 00 2c lwz r0,44(r1) return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; ffc190f8: 3b c0 00 09 li r30,9 } ffc190fc: 7f c3 f3 78 mr r3,r30 ffc19100: 83 81 00 18 lwz r28,24(r1) ffc19104: 7c 08 03 a6 mtlr r0 ffc19108: 83 a1 00 1c lwz r29,28(r1) ffc1910c: 83 c1 00 20 lwz r30,32(r1) ffc19110: 83 e1 00 24 lwz r31,36(r1) ffc19114: 38 21 00 28 addi r1,r1,40 ffc19118: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1911c : rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id ) { ffc1911c: 94 21 ff f8 stwu r1,-8(r1) ffc19120: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc19124: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id ) { ffc19128: 90 01 00 0c stw r0,12(r1) ffc1912c: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc19130: 3c 60 00 00 lis r3,0 rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id ) { ffc19134: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc19138: 38 63 6e ec addi r3,r3,28396 ffc1913c: 7c 04 03 78 mr r4,r0 ffc19140: 60 a5 ff ff ori r5,r5,65535 ffc19144: 48 00 50 01 bl ffc1e144 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc19148: 80 01 00 0c lwz r0,12(r1) ffc1914c: 3d 20 ff c4 lis r9,-60 ffc19150: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc19154: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc19158: 39 29 bd 9c addi r9,r9,-16996 ffc1915c: 7c 69 18 2e lwzx r3,r9,r3 ffc19160: 38 21 00 08 addi r1,r1,8 ffc19164: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19168 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { ffc19168: 94 21 ff d0 stwu r1,-48(r1) ffc1916c: 7c 08 02 a6 mflr r0 ffc19170: 93 c1 00 28 stw r30,40(r1) uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) ffc19174: 7c de 33 79 mr. r30,r6 rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { ffc19178: 93 61 00 1c stw r27,28(r1) ffc1917c: 7c 9b 23 78 mr r27,r4 ffc19180: 93 81 00 20 stw r28,32(r1) ffc19184: 7c bc 2b 78 mr r28,r5 ffc19188: 93 a1 00 24 stw r29,36(r1) ffc1918c: 7c 7d 1b 78 mr r29,r3 ffc19190: 90 01 00 34 stw r0,52(r1) ffc19194: 93 e1 00 2c stw r31,44(r1) uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) ffc19198: 41 82 00 d0 beq- ffc19268 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc1919c: 3f e0 00 00 lis r31,0 ffc191a0: 80 7f 28 5c lwz r3,10332(r31) ffc191a4: 48 00 2c 65 bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc191a8: 3c 60 00 00 lis r3,0 ffc191ac: 7f a4 eb 78 mr r4,r29 ffc191b0: 38 63 6e ec addi r3,r3,28396 ffc191b4: 38 a1 00 0c addi r5,r1,12 ffc191b8: 48 00 4c f9 bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc191bc: 80 01 00 0c lwz r0,12(r1) ffc191c0: 7c 7d 1b 78 mr r29,r3 ffc191c4: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc191c8: 41 9e 00 34 beq- cr7,ffc191fc default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc191cc: 80 7f 28 5c lwz r3,10332(r31) ffc191d0: 48 00 2c b9 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc191d4: 38 60 00 04 li r3,4 return return_status; } ffc191d8: 80 01 00 34 lwz r0,52(r1) ffc191dc: 83 61 00 1c lwz r27,28(r1) ffc191e0: 7c 08 03 a6 mtlr r0 ffc191e4: 83 81 00 20 lwz r28,32(r1) ffc191e8: 83 a1 00 24 lwz r29,36(r1) ffc191ec: 83 c1 00 28 lwz r30,40(r1) ffc191f0: 83 e1 00 2c lwz r31,44(r1) ffc191f4: 38 21 00 30 addi r1,r1,48 ffc191f8: 4e 80 00 20 blr <== ALWAYS TAKEN case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( ffc191fc: 7f 85 e3 78 mr r5,r28 ffc19200: 7f 64 db 78 mr r4,r27 ffc19204: 38 63 00 68 addi r3,r3,104 ffc19208: 38 c1 00 10 addi r6,r1,16 ffc1920c: 38 e1 00 08 addi r7,r1,8 ffc19210: 48 00 44 75 bl ffc1d684 <_Heap_Resize_block> <== ALWAYS TAKEN segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; ffc19214: 80 01 00 10 lwz r0,16(r1) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) ffc19218: 7c 7c 1b 79 mr. r28,r3 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; ffc1921c: 90 1e 00 00 stw r0,0(r30) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) ffc19220: 40 82 00 34 bne- ffc19254 _Region_Process_queue( the_region ); /* unlocks allocator */ ffc19224: 7f a3 eb 78 mr r3,r29 ffc19228: 48 00 96 79 bl ffc228a0 <_Region_Process_queue> <== ALWAYS TAKEN break; } _RTEMS_Unlock_allocator(); return return_status; } ffc1922c: 80 01 00 34 lwz r0,52(r1) *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ ffc19230: 38 60 00 00 li r3,0 break; } _RTEMS_Unlock_allocator(); return return_status; } ffc19234: 83 61 00 1c lwz r27,28(r1) ffc19238: 7c 08 03 a6 mtlr r0 ffc1923c: 83 81 00 20 lwz r28,32(r1) ffc19240: 83 a1 00 24 lwz r29,36(r1) ffc19244: 83 c1 00 28 lwz r30,40(r1) ffc19248: 83 e1 00 2c lwz r31,44(r1) ffc1924c: 38 21 00 30 addi r1,r1,48 ffc19250: 4e 80 00 20 blr <== ALWAYS TAKEN _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); ffc19254: 80 7f 28 5c lwz r3,10332(r31) ffc19258: 48 00 2c 31 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) ffc1925c: 2f 9c 00 01 cmpwi cr7,r28,1 ffc19260: 38 60 00 0d li r3,13 ffc19264: 41 be ff 74 beq- cr7,ffc191d8 break; } _RTEMS_Unlock_allocator(); return return_status; } ffc19268: 80 01 00 34 lwz r0,52(r1) return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; ffc1926c: 38 60 00 09 li r3,9 } ffc19270: 83 61 00 1c lwz r27,28(r1) ffc19274: 7c 08 03 a6 mtlr r0 ffc19278: 83 81 00 20 lwz r28,32(r1) ffc1927c: 83 a1 00 24 lwz r29,36(r1) ffc19280: 83 c1 00 28 lwz r30,40(r1) ffc19284: 83 e1 00 2c lwz r31,44(r1) ffc19288: 38 21 00 30 addi r1,r1,48 ffc1928c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19290 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc19290: 94 21 ff d8 stwu r1,-40(r1) ffc19294: 7c 08 02 a6 mflr r0 ffc19298: 93 e1 00 24 stw r31,36(r1) uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); ffc1929c: 3f e0 00 00 lis r31,0 rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc192a0: 93 a1 00 1c stw r29,28(r1) ffc192a4: 7c 7d 1b 78 mr r29,r3 uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); ffc192a8: 80 7f 28 5c lwz r3,10332(r31) rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc192ac: 90 01 00 2c stw r0,44(r1) ffc192b0: 93 81 00 18 stw r28,24(r1) register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { ffc192b4: 3b 80 00 04 li r28,4 rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc192b8: 93 c1 00 20 stw r30,32(r1) ffc192bc: 7c 9e 23 78 mr r30,r4 <== ALWAYS TAKEN uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); ffc192c0: 48 00 2b 49 bl ffc1be08 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc192c4: 3c 60 00 00 lis r3,0 ffc192c8: 7f a4 eb 78 mr r4,r29 ffc192cc: 38 63 6e ec addi r3,r3,28396 ffc192d0: 38 a1 00 08 addi r5,r1,8 ffc192d4: 48 00 4b dd bl ffc1deb0 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc192d8: 80 01 00 08 lwz r0,8(r1) ffc192dc: 7c 7d 1b 78 mr r29,r3 ffc192e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc192e4: 40 9e 00 1c bne- cr7,ffc19300 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); ffc192e8: 7f c4 f3 78 mr r4,r30 ffc192ec: 38 63 00 68 addi r3,r3,104 ffc192f0: 48 00 3c f1 bl ffc1cfe0 <_Heap_Free> <== ALWAYS TAKEN else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; ffc192f4: 3b 80 00 09 li r28,9 #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) ffc192f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc192fc: 40 9e 00 30 bne- cr7,ffc1932c default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc19300: 80 7f 28 5c lwz r3,10332(r31) ffc19304: 48 00 2b 85 bl ffc1be88 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc19308: 80 01 00 2c lwz r0,44(r1) ffc1930c: 7f 83 e3 78 mr r3,r28 ffc19310: 83 a1 00 1c lwz r29,28(r1) ffc19314: 7c 08 03 a6 mtlr r0 ffc19318: 83 81 00 18 lwz r28,24(r1) ffc1931c: 83 c1 00 20 lwz r30,32(r1) ffc19320: 83 e1 00 24 lwz r31,36(r1) ffc19324: 38 21 00 28 addi r1,r1,40 ffc19328: 4e 80 00 20 blr <== ALWAYS TAKEN _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; ffc1932c: 81 3d 00 64 lwz r9,100(r29) _Region_Process_queue(the_region); /* unlocks allocator */ ffc19330: 7f a3 eb 78 mr r3,r29 ffc19334: 3b 80 00 00 li r28,0 _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; ffc19338: 38 09 ff ff addi r0,r9,-1 ffc1933c: 90 1d 00 64 stw r0,100(r29) _Region_Process_queue(the_region); /* unlocks allocator */ ffc19340: 48 00 95 61 bl ffc228a0 <_Region_Process_queue> <== ALWAYS TAKEN break; } _RTEMS_Unlock_allocator(); return return_status; } ffc19344: 80 01 00 2c lwz r0,44(r1) ffc19348: 7f 83 e3 78 mr r3,r28 ffc1934c: 83 a1 00 1c lwz r29,28(r1) ffc19350: 7c 08 03 a6 mtlr r0 ffc19354: 83 81 00 18 lwz r28,24(r1) ffc19358: 83 c1 00 20 lwz r30,32(r1) ffc1935c: 83 e1 00 24 lwz r31,36(r1) ffc19360: 38 21 00 28 addi r1,r1,40 ffc19364: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08288 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { ffc08288: 94 21 ff b8 stwu r1,-72(r1) ffc0828c: 7c 08 02 a6 mflr r0 ffc08290: 93 e1 00 44 stw r31,68(r1) register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) ffc08294: 7c 7f 1b 79 mr. r31,r3 ffc08298: 38 60 00 03 li r3,3 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { ffc0829c: 90 01 00 4c stw r0,76(r1) ffc082a0: 93 81 00 38 stw r28,56(r1) <== ALWAYS TAKEN ffc082a4: 93 a1 00 3c stw r29,60(r1) ffc082a8: 93 c1 00 40 stw r30,64(r1) register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) ffc082ac: 41 82 00 28 beq- ffc082d4 return RTEMS_INVALID_NAME; if ( !id ) ffc082b0: 2f 87 00 00 cmpwi cr7,r7,0 <== ALWAYS TAKEN ffc082b4: 38 60 00 09 li r3,9 ffc082b8: 41 9e 00 1c beq- cr7,ffc082d4 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || ffc082bc: 70 a9 00 c0 andi. r9,r5,192 ffc082c0: 41 82 01 1c beq- ffc083dc _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && ffc082c4: 54 a0 06 b6 rlwinm r0,r5,0,26,27 ffc082c8: 2f 80 00 10 cmpwi cr7,r0,16 ffc082cc: 41 9e 00 28 beq- cr7,ffc082f4 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc082d0: 38 60 00 0b li r3,11 } ffc082d4: 80 01 00 4c lwz r0,76(r1) ffc082d8: 83 81 00 38 lwz r28,56(r1) ffc082dc: 7c 08 03 a6 mtlr r0 ffc082e0: 83 a1 00 3c lwz r29,60(r1) ffc082e4: 83 c1 00 40 lwz r30,64(r1) ffc082e8: 83 e1 00 44 lwz r31,68(r1) ffc082ec: 38 21 00 48 addi r1,r1,72 ffc082f0: 4e 80 00 20 blr <== ALWAYS TAKEN #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && ffc082f4: 70 a0 00 04 andi. r0,r5,4 ffc082f8: 41 a2 ff d8 beq- ffc082d0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && ffc082fc: 2f 89 00 c0 cmpwi cr7,r9,192 ffc08300: 3b 80 00 10 li r28,16 ffc08304: 41 be ff cc beq- cr7,ffc082d0 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) ffc08308: 2b 84 00 01 cmplwi cr7,r4,1 ffc0830c: 38 60 00 0a li r3,10 ffc08310: 41 9d ff c4 bgt+ cr7,ffc082d4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08314: 3d 20 00 00 lis r9,0 ffc08318: 81 69 27 2c lwz r11,10028(r9) ffc0831c: 38 0b 00 01 addi r0,r11,1 ffc08320: 90 09 27 2c stw r0,10028(r9) * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); ffc08324: 3f a0 00 00 lis r29,0 ffc08328: 90 81 00 28 stw r4,40(r1) ffc0832c: 3b bd 2a ec addi r29,r29,10988 ffc08330: 7f a3 eb 78 mr r3,r29 ffc08334: 90 a1 00 2c stw r5,44(r1) <== ALWAYS TAKEN ffc08338: 90 c1 00 30 stw r6,48(r1) ffc0833c: 90 e1 00 34 stw r7,52(r1) ffc08340: 48 00 1a ad bl ffc09dec <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { ffc08344: 7c 7e 1b 79 mr. r30,r3 ffc08348: 80 81 00 28 lwz r4,40(r1) <== ALWAYS TAKEN ffc0834c: 80 a1 00 2c lwz r5,44(r1) ffc08350: 80 c1 00 30 lwz r6,48(r1) <== ALWAYS TAKEN ffc08354: 80 e1 00 34 lwz r7,52(r1) ffc08358: 41 82 00 e0 beq- ffc08438 the_semaphore->attribute_set = attribute_set; /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { ffc0835c: 2f 9c 00 00 cmpwi cr7,r28,0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; ffc08360: 90 be 00 10 stw r5,16(r30) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { ffc08364: 41 9e 00 84 beq- cr7,ffc083e8 } else { /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) ffc08368: 70 a0 00 04 andi. r0,r5,4 ffc0836c: 41 82 00 bc beq- ffc08428 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; ffc08370: 38 00 00 01 li r0,1 ffc08374: 90 01 00 18 stw r0,24(r1) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { ffc08378: 2f 9c 00 10 cmpwi cr7,r28,16 ffc0837c: 41 9e 00 c8 beq- cr7,ffc08444 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; ffc08380: 38 00 00 02 li r0,2 ffc08384: 90 01 00 10 stw r0,16(r1) the_mutex_attr.only_owner_release = false; ffc08388: 38 00 00 00 li r0,0 ffc0838c: 98 01 00 14 stb r0,20(r1) } mutex_status = _CORE_mutex_Initialize( ffc08390: 68 85 00 01 xori r5,r4,1 ffc08394: 90 e1 00 34 stw r7,52(r1) ffc08398: 7c a5 00 34 cntlzw r5,r5 ffc0839c: 54 a5 d9 7e rlwinm r5,r5,27,5,31 ffc083a0: 38 7e 00 14 addi r3,r30,20 ffc083a4: 38 81 00 10 addi r4,r1,16 ffc083a8: 48 00 0f f5 bl ffc0939c <_CORE_mutex_Initialize> <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { ffc083ac: 80 e1 00 34 lwz r7,52(r1) ffc083b0: 2f 83 00 06 cmpwi cr7,r3,6 ffc083b4: 41 9e 00 c4 beq- cr7,ffc08478 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc083b8: 80 1e 00 08 lwz r0,8(r30) <== ALWAYS TAKEN ffc083bc: 81 7d 00 1c lwz r11,28(r29) <== ALWAYS TAKEN ffc083c0: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc083c4: 93 fe 00 0c stw r31,12(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc083c8: 7f cb 49 2e stwx r30,r11,r9 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; ffc083cc: 90 07 00 00 stw r0,0(r7) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc083d0: 48 00 2b a9 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc083d4: 38 60 00 00 li r3,0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; ffc083d8: 4b ff fe fc b ffc082d4 <== ALWAYS TAKEN if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) ffc083dc: 70 bc 00 30 andi. r28,r5,48 ffc083e0: 40 82 ff 28 bne+ ffc08308 ffc083e4: 4b ff ff 30 b ffc08314 <== ALWAYS TAKEN /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) ffc083e8: 70 a0 00 04 andi. r0,r5,4 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; ffc083ec: 38 00 ff ff li r0,-1 ffc083f0: 90 01 00 08 stw r0,8(r1) if ( _Attributes_Is_priority( attribute_set ) ) ffc083f4: 41 82 00 3c beq- ffc08430 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; ffc083f8: 38 00 00 01 li r0,1 ffc083fc: 90 01 00 0c stw r0,12(r1) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc08400: 38 00 00 00 li r0,0 the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( ffc08404: 90 e1 00 34 stw r7,52(r1) ffc08408: 7c 85 23 78 mr r5,r4 ffc0840c: 38 7e 00 14 addi r3,r30,20 /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; ffc08410: 90 01 00 1c stw r0,28(r1) _CORE_semaphore_Initialize( ffc08414: 38 81 00 08 addi r4,r1,8 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc08418: 90 01 00 10 stw r0,16(r1) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( ffc0841c: 48 00 13 c9 bl ffc097e4 <_CORE_semaphore_Initialize> <== ALWAYS TAKEN ffc08420: 80 e1 00 34 lwz r7,52(r1) ffc08424: 4b ff ff 94 b ffc083b8 <== ALWAYS TAKEN * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; ffc08428: 90 01 00 18 stw r0,24(r1) ffc0842c: 4b ff ff 4c b ffc08378 <== ALWAYS TAKEN the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; else the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; ffc08430: 93 81 00 0c stw r28,12(r1) ffc08434: 4b ff ff cc b ffc08400 <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); ffc08438: 48 00 2b 41 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0843c: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc08440: 4b ff fe 94 b ffc082d4 <== ALWAYS TAKEN if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { ffc08444: 81 21 00 18 lwz r9,24(r1) <== ALWAYS TAKEN else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc08448: 38 00 00 00 li r0,0 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; ffc0844c: 90 c1 00 1c stw r6,28(r1) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { ffc08450: 2f 89 00 01 cmpwi cr7,r9,1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; ffc08454: 98 01 00 14 stb r0,20(r1) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc08458: 90 01 00 10 stw r0,16(r1) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { ffc0845c: 40 9e ff 34 bne+ cr7,ffc08390 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { ffc08460: 70 a0 00 40 andi. r0,r5,64 ffc08464: 41 82 00 2c beq- ffc08490 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ffc08468: 38 00 00 02 li r0,2 the_mutex_attr.only_owner_release = true; ffc0846c: 99 21 00 14 stb r9,20(r1) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ffc08470: 90 01 00 18 stw r0,24(r1) ffc08474: 4b ff ff 1c b ffc08390 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); ffc08478: 7f a3 eb 78 mr r3,r29 ffc0847c: 7f c4 f3 78 mr r4,r30 ffc08480: 48 00 1d 8d bl ffc0a20c <_Objects_Free> <== ALWAYS TAKEN (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); ffc08484: 48 00 2a f5 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08488: 38 60 00 13 li r3,19 return RTEMS_INVALID_PRIORITY; ffc0848c: 4b ff fe 48 b ffc082d4 <== ALWAYS TAKEN if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { ffc08490: 70 a0 00 80 andi. r0,r5,128 ffc08494: 41 a2 fe fc beq- ffc08390 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; ffc08498: 38 00 00 03 li r0,3 the_mutex_attr.only_owner_release = true; ffc0849c: 99 21 00 14 stb r9,20(r1) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; ffc084a0: 90 01 00 18 stw r0,24(r1) ffc084a4: 4b ff fe ec b ffc08390 <== ALWAYS TAKEN ffc084a8 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { ffc084a8: 94 21 ff e0 stwu r1,-32(r1) <== ALWAYS TAKEN ffc084ac: 7c 08 02 a6 mflr r0 ffc084b0: 7c 64 1b 78 mr r4,r3 ffc084b4: 93 c1 00 18 stw r30,24(r1) <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) ffc084b8: 3f c0 00 00 lis r30,0 <== ALWAYS TAKEN ffc084bc: 3b de 2a ec addi r30,r30,10988 ffc084c0: 7f c3 f3 78 mr r3,r30 <== ALWAYS TAKEN ffc084c4: 90 01 00 24 stw r0,36(r1) ffc084c8: 38 a1 00 08 addi r5,r1,8 ffc084cc: 93 e1 00 1c stw r31,28(r1) ffc084d0: 48 00 1f 1d bl ffc0a3ec <_Objects_Get> <== ALWAYS TAKEN ffc084d4: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { ffc084d8: 80 01 00 08 lwz r0,8(r1) ffc084dc: 38 60 00 04 li r3,4 <== ALWAYS TAKEN ffc084e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc084e4: 40 9e 00 2c bne- cr7,ffc08510 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); ffc084e8: 80 1f 00 10 lwz r0,16(r31) case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc084ec: 70 00 00 30 andi. r0,r0,48 <== ALWAYS TAKEN ffc084f0: 41 82 00 80 beq- ffc08570 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && ffc084f4: 81 3f 00 64 lwz r9,100(r31) ffc084f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc084fc: 40 9e 00 2c bne- cr7,ffc08528 ffc08500: 2f 80 00 20 cmpwi cr7,r0,32 ffc08504: 41 9e 00 24 beq- cr7,ffc08528 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); ffc08508: 48 00 2a 71 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0850c: 38 60 00 0c li r3,12 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08510: 80 01 00 24 lwz r0,36(r1) ffc08514: 83 c1 00 18 lwz r30,24(r1) ffc08518: 7c 08 03 a6 mtlr r0 ffc0851c: 83 e1 00 1c lwz r31,28(r1) ffc08520: 38 21 00 20 addi r1,r1,32 ffc08524: 4e 80 00 20 blr <== ALWAYS TAKEN !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( ffc08528: 38 7f 00 14 addi r3,r31,20 ffc0852c: 38 80 00 00 li r4,0 ffc08530: 38 a0 00 04 li r5,4 ffc08534: 48 00 0e 49 bl ffc0937c <_CORE_mutex_Flush> <== ALWAYS TAKEN SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); ffc08538: 7f c3 f3 78 mr r3,r30 ffc0853c: 7f e4 fb 78 mr r4,r31 ffc08540: 48 00 19 75 bl ffc09eb4 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); ffc08544: 7f c3 f3 78 mr r3,r30 ffc08548: 7f e4 fb 78 mr r4,r31 ffc0854c: 48 00 1c c1 bl ffc0a20c <_Objects_Free> <== ALWAYS TAKEN 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); ffc08550: 48 00 2a 29 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08554: 80 01 00 24 lwz r0,36(r1) 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); ffc08558: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0855c: 83 c1 00 18 lwz r30,24(r1) ffc08560: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc08564: 83 e1 00 1c lwz r31,28(r1) ffc08568: 38 21 00 20 addi r1,r1,32 ffc0856c: 4e 80 00 20 blr <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( ffc08570: 38 7f 00 14 addi r3,r31,20 ffc08574: 38 80 00 00 li r4,0 ffc08578: 38 a0 00 02 li r5,2 ffc0857c: 48 00 12 49 bl ffc097c4 <_CORE_semaphore_Flush> <== ALWAYS TAKEN ffc08580: 4b ff ff b8 b ffc08538 <== ALWAYS TAKEN ffc14da4 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { ffc14da4: 94 21 ff e8 stwu r1,-24(r1) ffc14da8: 7c 08 02 a6 mflr r0 ffc14dac: 7c 64 1b 78 mr r4,r3 ffc14db0: 3c 60 00 00 lis r3,0 ffc14db4: 90 01 00 1c stw r0,28(r1) ffc14db8: 38 63 2b ac addi r3,r3,11180 ffc14dbc: 38 a1 00 08 addi r5,r1,8 ffc14dc0: 4b ff 77 91 bl ffc0c550 <_Objects_Get> <== ALWAYS TAKEN register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { ffc14dc4: 81 21 00 08 lwz r9,8(r1) ffc14dc8: 38 00 00 04 li r0,4 ffc14dcc: 2f 89 00 00 cmpwi cr7,r9,0 ffc14dd0: 40 9e 00 28 bne- cr7,ffc14df8 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc14dd4: 80 03 00 10 lwz r0,16(r3) ffc14dd8: 70 09 00 30 andi. r9,r0,48 ffc14ddc: 40 82 00 30 bne- ffc14e0c &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( ffc14de0: 38 63 00 14 addi r3,r3,20 ffc14de4: 38 80 00 00 li r4,0 ffc14de8: 38 a0 00 01 li r5,1 ffc14dec: 4b ff 6b 35 bl ffc0b920 <_CORE_semaphore_Flush> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); ffc14df0: 4b ff 83 c1 bl ffc0d1b0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc14df4: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc14df8: 7c 03 03 78 mr r3,r0 ffc14dfc: 80 01 00 1c lwz r0,28(r1) ffc14e00: 38 21 00 18 addi r1,r1,24 ffc14e04: 7c 08 03 a6 mtlr r0 ffc14e08: 4e 80 00 20 blr <== ALWAYS TAKEN the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( ffc14e0c: 38 63 00 14 addi r3,r3,20 ffc14e10: 38 80 00 00 li r4,0 ffc14e14: 38 a0 00 01 li r5,1 ffc14e18: 4b ff 66 c1 bl ffc0b4d8 <_CORE_mutex_Flush> <== ALWAYS TAKEN ffc14e1c: 4b ff ff d4 b ffc14df0 <== ALWAYS TAKEN ffc19734 : rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc19734: 94 21 ff f8 stwu r1,-8(r1) ffc19738: 7c 08 02 a6 mflr r0 ffc1973c: 7c 69 1b 78 mr r9,r3 ffc19740: 90 01 00 0c stw r0,12(r1) Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); ffc19744: 3c 60 00 00 lis r3,0 rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc19748: 7c 80 23 78 mr r0,r4 ffc1974c: 7c a6 2b 78 mr r6,r5 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); ffc19750: 7d 24 4b 78 mr r4,r9 ffc19754: 7c 05 03 78 mr r5,r0 ffc19758: 38 63 6f 2c addi r3,r3,28460 ffc1975c: 48 00 49 e9 bl ffc1e144 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN return _Status_Object_name_errors_to_status[ status ]; } ffc19760: 80 01 00 0c lwz r0,12(r1) ffc19764: 3d 20 ff c4 lis r9,-60 ffc19768: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); ffc1976c: 54 63 10 3a rlwinm r3,r3,2,0,29 return _Status_Object_name_errors_to_status[ status ]; } ffc19770: 39 29 bd 9c addi r9,r9,-16996 ffc19774: 7c 69 18 2e lwzx r3,r9,r3 ffc19778: 38 21 00 08 addi r1,r1,8 ffc1977c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08584 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { ffc08584: 94 21 ff d8 stwu r1,-40(r1) ffc08588: 7c 08 02 a6 mflr r0 ffc0858c: 93 e1 00 24 stw r31,36(r1) ffc08590: 7c 7f 1b 78 mr r31,r3 Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) ffc08594: 3c 60 00 00 lis r3,0 ffc08598: 93 a1 00 1c stw r29,28(r1) ffc0859c: 38 63 2a ec addi r3,r3,10988 ffc085a0: 7c 9d 23 78 mr r29,r4 ffc085a4: 93 c1 00 20 stw r30,32(r1) ffc085a8: 7f e4 fb 78 mr r4,r31 ffc085ac: 7c be 2b 78 mr r30,r5 ffc085b0: 38 c1 00 0c addi r6,r1,12 ffc085b4: 90 01 00 2c stw r0,44(r1) ffc085b8: 38 a1 00 08 addi r5,r1,8 ffc085bc: 93 81 00 18 stw r28,24(r1) ffc085c0: 48 00 1d bd bl ffc0a37c <_Objects_Get_isr_disable> <== ALWAYS TAKEN ffc085c4: 7c 69 1b 78 mr r9,r3 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { ffc085c8: 80 01 00 08 lwz r0,8(r1) ffc085cc: 38 60 00 04 li r3,4 ffc085d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc085d4: 40 9e 00 3c bne- cr7,ffc08610 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc085d8: 80 09 00 10 lwz r0,16(r9) ffc085dc: 70 00 00 30 andi. r0,r0,48 ffc085e0: 41 82 00 50 beq- ffc08630 _CORE_mutex_Seize( ffc085e4: 6b a5 00 01 xori r5,r29,1 ffc085e8: 80 e1 00 0c lwz r7,12(r1) ffc085ec: 38 69 00 14 addi r3,r9,20 ffc085f0: 7f e4 fb 78 mr r4,r31 ffc085f4: 54 a5 07 fe clrlwi r5,r5,31 ffc085f8: 7f c6 f3 78 mr r6,r30 ffc085fc: 48 00 0f 35 bl ffc09530 <_CORE_mutex_Seize> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( ffc08600: 3d 20 00 00 lis r9,0 ffc08604: 81 29 27 6c lwz r9,10092(r9) <== ALWAYS TAKEN ffc08608: 80 69 00 34 lwz r3,52(r9) <== ALWAYS TAKEN ffc0860c: 48 00 01 89 bl ffc08794 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN break; } return RTEMS_INVALID_ID; } ffc08610: 80 01 00 2c lwz r0,44(r1) ffc08614: 83 81 00 18 lwz r28,24(r1) <== ALWAYS TAKEN ffc08618: 7c 08 03 a6 mtlr r0 ffc0861c: 83 a1 00 1c lwz r29,28(r1) ffc08620: 83 c1 00 20 lwz r30,32(r1) <== ALWAYS TAKEN ffc08624: 83 e1 00 24 lwz r31,36(r1) ffc08628: 38 21 00 28 addi r1,r1,40 ffc0862c: 4e 80 00 20 blr <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc08630: 3f 80 00 00 lis r28,0 ffc08634: 81 7c 27 6c lwz r11,10092(r28) executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc08638: 90 0b 00 34 stw r0,52(r11) if ( the_semaphore->count != 0 ) { ffc0863c: 81 49 00 5c lwz r10,92(r9) ffc08640: 2f 8a 00 00 cmpwi cr7,r10,0 ffc08644: 40 9e 00 48 bne- cr7,ffc0868c the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { ffc08648: 73 a0 00 01 andi. r0,r29,1 ffc0864c: 41 82 00 54 beq- ffc086a0 ffc08650: 80 01 00 0c lwz r0,12(r1) ffc08654: 7c 00 01 24 mtmsr r0 _ISR_Enable( *level_p ); executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; ffc08658: 38 00 00 01 li r0,1 ffc0865c: 90 0b 00 34 stw r0,52(r11) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( ffc08660: 81 3c 27 6c lwz r9,10092(r28) ffc08664: 80 69 00 34 lwz r3,52(r9) ffc08668: 48 00 01 41 bl ffc087a8 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN break; } return RTEMS_INVALID_ID; } ffc0866c: 80 01 00 2c lwz r0,44(r1) ffc08670: 83 81 00 18 lwz r28,24(r1) ffc08674: 7c 08 03 a6 mtlr r0 ffc08678: 83 a1 00 1c lwz r29,28(r1) ffc0867c: 83 c1 00 20 lwz r30,32(r1) <== ALWAYS TAKEN ffc08680: 83 e1 00 24 lwz r31,36(r1) ffc08684: 38 21 00 28 addi r1,r1,40 ffc08688: 4e 80 00 20 blr <== ALWAYS TAKEN /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; ffc0868c: 39 4a ff ff addi r10,r10,-1 ffc08690: 91 49 00 5c stw r10,92(r9) ffc08694: 80 01 00 0c lwz r0,12(r1) ffc08698: 7c 00 01 24 mtmsr r0 ffc0869c: 4b ff ff c4 b ffc08660 <== ALWAYS TAKEN ffc086a0: 3d 40 00 00 lis r10,0 ffc086a4: 81 0a 27 2c lwz r8,10028(r10) ffc086a8: 38 08 00 01 addi r0,r8,1 ffc086ac: 90 0a 27 2c stw r0,10028(r10) 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; ffc086b0: 38 00 00 01 li r0,1 ffc086b4: 90 09 00 44 stw r0,68(r9) <== ALWAYS TAKEN return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; ffc086b8: 38 69 00 14 addi r3,r9,20 executing->Wait.id = id; ffc086bc: 93 eb 00 20 stw r31,32(r11) <== ALWAYS TAKEN return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; ffc086c0: 90 6b 00 44 stw r3,68(r11) ffc086c4: 80 01 00 0c lwz r0,12(r1) ffc086c8: 7c 00 01 24 mtmsr r0 executing->Wait.id = id; _ISR_Enable( *level_p ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); ffc086cc: 3c a0 ff c1 lis r5,-63 ffc086d0: 7f c4 f3 78 mr r4,r30 ffc086d4: 38 a5 ba 54 addi r5,r5,-17836 ffc086d8: 48 00 2f 1d bl ffc0b5f4 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc086dc: 48 00 28 9d bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc086e0: 4b ff ff 80 b ffc08660 <== ALWAYS TAKEN ffc086e4 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { ffc086e4: 94 21 ff d8 stwu r1,-40(r1) ffc086e8: 7c 08 02 a6 mflr r0 ffc086ec: 93 e1 00 24 stw r31,36(r1) ffc086f0: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) ffc086f4: 3c 60 00 00 lis r3,0 <== ALWAYS TAKEN ffc086f8: 38 63 2a ec addi r3,r3,10988 ffc086fc: 90 01 00 2c stw r0,44(r1) ffc08700: 7f e4 fb 78 mr r4,r31 ffc08704: 38 a1 00 08 addi r5,r1,8 ffc08708: 48 00 1c e5 bl ffc0a3ec <_Objects_Get> <== ALWAYS TAKEN Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { ffc0870c: 80 01 00 08 lwz r0,8(r1) ffc08710: 7c 69 1b 78 mr r9,r3 ffc08714: 2f 80 00 00 cmpwi cr7,r0,0 ffc08718: 38 60 00 04 li r3,4 ffc0871c: 40 9e 00 30 bne- cr7,ffc0874c case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc08720: 80 09 00 10 lwz r0,16(r9) ffc08724: 70 0b 00 30 andi. r11,r0,48 ffc08728: 40 82 00 38 bne- ffc08760 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( ffc0872c: 7f e4 fb 78 mr r4,r31 ffc08730: 38 69 00 14 addi r3,r9,20 ffc08734: 38 a0 00 00 li r5,0 ffc08738: 48 00 10 f9 bl ffc09830 <_CORE_semaphore_Surrender> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); ffc0873c: 90 61 00 18 stw r3,24(r1) ffc08740: 48 00 28 39 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); ffc08744: 80 61 00 18 lwz r3,24(r1) ffc08748: 48 00 00 61 bl ffc087a8 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0874c: 80 01 00 2c lwz r0,44(r1) ffc08750: 83 e1 00 24 lwz r31,36(r1) ffc08754: 38 21 00 28 addi r1,r1,40 ffc08758: 7c 08 03 a6 mtlr r0 ffc0875c: 4e 80 00 20 blr <== ALWAYS TAKEN the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( ffc08760: 7f e4 fb 78 mr r4,r31 ffc08764: 38 69 00 14 addi r3,r9,20 ffc08768: 38 a0 00 00 li r5,0 ffc0876c: 48 00 0e e5 bl ffc09650 <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); ffc08770: 90 61 00 18 stw r3,24(r1) ffc08774: 48 00 28 05 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Semaphore_Translate_core_mutex_return_code( mutex_status ); ffc08778: 80 61 00 18 lwz r3,24(r1) <== ALWAYS TAKEN ffc0877c: 48 00 00 19 bl ffc08794 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08780: 80 01 00 2c lwz r0,44(r1) ffc08784: 83 e1 00 24 lwz r31,36(r1) ffc08788: 38 21 00 28 addi r1,r1,40 ffc0878c: 7c 08 03 a6 mtlr r0 ffc08790: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1c98c : */ void rtems_shutdown_executive( uint32_t result ) { ffc1c98c: 7c 08 02 a6 mflr r0 ffc1c990: 94 21 ff f8 stwu r1,-8(r1) <== ALWAYS TAKEN if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { ffc1c994: 3d 20 00 00 lis r9,0 */ void rtems_shutdown_executive( uint32_t result ) { ffc1c998: 90 01 00 0c stw r0,12(r1) if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { ffc1c99c: 80 09 27 90 lwz r0,10128(r9) ffc1c9a0: 2f 80 00 04 cmpwi cr7,r0,4 ffc1c9a4: 41 9e 00 18 beq- cr7,ffc1c9bc * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); ffc1c9a8: 3c 60 00 00 lis r3,0 ffc1c9ac: 38 00 00 04 li r0,4 ffc1c9b0: 38 63 2b 94 addi r3,r3,11156 ffc1c9b4: 90 09 27 90 stw r0,10128(r9) <== ALWAYS TAKEN ffc1c9b8: 4b ff fa 29 bl ffc1c3e0 <_CPU_Context_restore> <== ALWAYS TAKEN _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } ffc1c9bc: 80 01 00 0c lwz r0,12(r1) ffc1c9c0: 38 21 00 08 addi r1,r1,8 ffc1c9c4: 7c 08 03 a6 mtlr r0 ffc1c9c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09d08 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { ffc09d08: 7c 08 02 a6 mflr r0 ffc09d0c: 3d 20 00 00 lis r9,0 ffc09d10: 94 21 ff f8 stwu r1,-8(r1) RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; ffc09d14: 3d 60 00 00 lis r11,0 ffc09d18: 81 49 27 60 lwz r10,10080(r9) rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { ffc09d1c: 90 01 00 0c stw r0,12(r1) ffc09d20: 38 0a 00 01 addi r0,r10,1 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; ffc09d24: 81 6b 27 a0 lwz r11,10144(r11) ffc09d28: 90 09 27 60 stw r0,10080(r9) ffc09d2c: 81 2b 01 40 lwz r9,320(r11) asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { ffc09d30: 2f 83 00 00 cmpwi cr7,r3,0 ffc09d34: 41 9e 00 24 beq- cr7,ffc09d58 asr->mode_set = mode_set; asr->handler = asr_handler; ffc09d38: 90 69 00 0c stw r3,12(r9) _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { asr->mode_set = mode_set; ffc09d3c: 90 89 00 10 stw r4,16(r9) asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); ffc09d40: 48 00 2d 39 bl ffc0ca78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc09d44: 80 01 00 0c lwz r0,12(r1) ffc09d48: 38 60 00 00 li r3,0 ffc09d4c: 7c 08 03 a6 mtlr r0 ffc09d50: 38 21 00 08 addi r1,r1,8 ffc09d54: 4e 80 00 20 blr <== ALWAYS TAKEN information->is_enabled = false; information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; information->signals_posted = 0; information->signals_pending = 0; information->nest_level = 0; ffc09d58: 90 69 00 1c stw r3,28(r9) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; ffc09d5c: 98 69 00 08 stb r3,8(r9) information->handler = NULL; ffc09d60: 90 69 00 0c stw r3,12(r9) information->mode_set = RTEMS_DEFAULT_MODES; ffc09d64: 90 69 00 10 stw r3,16(r9) information->signals_posted = 0; ffc09d68: 90 69 00 14 stw r3,20(r9) information->signals_pending = 0; ffc09d6c: 90 69 00 18 stw r3,24(r9) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); ffc09d70: 48 00 2d 09 bl ffc0ca78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc09d74: 80 01 00 0c lwz r0,12(r1) ffc09d78: 38 60 00 00 li r3,0 ffc09d7c: 7c 08 03 a6 mtlr r0 ffc09d80: 38 21 00 08 addi r1,r1,8 ffc09d84: 4e 80 00 20 blr <== ALWAYS TAKEN ffc199bc : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc199bc: 94 21 ff e0 stwu r1,-32(r1) ffc199c0: 7c 08 02 a6 mflr r0 ffc199c4: 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 ) ffc199c8: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc199cc: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc199d0: 38 00 00 0a li r0,10 ffc199d4: 40 82 00 1c bne- ffc199f0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc199d8: 7c 03 03 78 mr r3,r0 ffc199dc: 80 01 00 24 lwz r0,36(r1) ffc199e0: 83 e1 00 1c lwz r31,28(r1) ffc199e4: 38 21 00 20 addi r1,r1,32 ffc199e8: 7c 08 03 a6 mtlr r0 ffc199ec: 4e 80 00 20 blr <== ALWAYS TAKEN ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc199f0: 38 81 00 08 addi r4,r1,8 ffc199f4: 48 00 51 b1 bl ffc1eba4 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc199f8: 81 21 00 08 lwz r9,8(r1) ffc199fc: 38 00 00 04 li r0,4 ffc19a00: 2f 89 00 00 cmpwi cr7,r9,0 ffc19a04: 40 be ff d4 bne- cr7,ffc199d8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc19a08: 81 23 01 40 lwz r9,320(r3) asr = &api->Signal; ffc19a0c: 80 09 00 0c lwz r0,12(r9) ffc19a10: 2f 80 00 00 cmpwi cr7,r0,0 ffc19a14: 41 9e 00 a4 beq- cr7,ffc19ab8 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { ffc19a18: 88 09 00 08 lbz r0,8(r9) ffc19a1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc19a20: 41 9e 00 58 beq- cr7,ffc19a78 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc19a24: 7c 00 00 a6 mfmsr r0 ffc19a28: 7d 70 42 a6 mfsprg r11,0 ffc19a2c: 7c 0b 58 78 andc r11,r0,r11 ffc19a30: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc19a34: 81 69 00 14 lwz r11,20(r9) ffc19a38: 7d 7f fb 78 or r31,r11,r31 ffc19a3c: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19a40: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc19a44: 3d 20 00 00 lis r9,0 ffc19a48: 81 29 28 4c lwz r9,10316(r9) if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; ffc19a4c: 38 00 00 01 li r0,1 ffc19a50: 98 03 00 74 stb r0,116(r3) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc19a54: 2f 89 00 00 cmpwi cr7,r9,0 ffc19a58: 41 9e 00 40 beq- cr7,ffc19a98 ffc19a5c: 3d 20 00 00 lis r9,0 ffc19a60: 81 29 28 64 lwz r9,10340(r9) ffc19a64: 7f 83 48 00 cmpw cr7,r3,r9 ffc19a68: 40 be 00 30 bne+ cr7,ffc19a98 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; ffc19a6c: 3d 20 00 00 lis r9,0 ffc19a70: 98 09 28 80 stb r0,10368(r9) ffc19a74: 48 00 00 24 b ffc19a98 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc19a78: 7c 00 00 a6 mfmsr r0 ffc19a7c: 7d 70 42 a6 mfsprg r11,0 ffc19a80: 7c 0b 58 78 andc r11,r0,r11 ffc19a84: 7d 60 01 24 mtmsr r11 ffc19a88: 81 69 00 18 lwz r11,24(r9) ffc19a8c: 7d 7f fb 78 or r31,r11,r31 ffc19a90: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19a94: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc19a98: 48 00 50 a1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc19a9c: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19aa0: 7c 03 03 78 mr r3,r0 ffc19aa4: 80 01 00 24 lwz r0,36(r1) ffc19aa8: 83 e1 00 1c lwz r31,28(r1) ffc19aac: 38 21 00 20 addi r1,r1,32 ffc19ab0: 7c 08 03 a6 mtlr r0 ffc19ab4: 4e 80 00 20 blr <== ALWAYS TAKEN _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc19ab8: 48 00 50 81 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc19abc: 38 00 00 0b li r0,11 return RTEMS_NOT_DEFINED; ffc19ac0: 4b ff ff 18 b ffc199d8 <== ALWAYS TAKEN ffc087c0 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { ffc087c0: 94 21 ff c0 stwu r1,-64(r1) ffc087c4: 7c 08 02 a6 mflr r0 ffc087c8: 93 a1 00 34 stw r29,52(r1) Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) ffc087cc: 7d 1d 43 79 mr. r29,r8 size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { ffc087d0: 93 61 00 2c stw r27,44(r1) ffc087d4: 7c 7b 1b 78 mr r27,r3 <== ALWAYS TAKEN Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) ffc087d8: 38 60 00 09 li r3,9 size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { ffc087dc: 93 e1 00 3c stw r31,60(r1) ffc087e0: 7c df 33 78 mr r31,r6 ffc087e4: 90 01 00 44 stw r0,68(r1) ffc087e8: 93 41 00 28 stw r26,40(r1) ffc087ec: 93 81 00 30 stw r28,48(r1) ffc087f0: 93 c1 00 38 stw r30,56(r1) Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) ffc087f4: 41 82 00 d4 beq- ffc088c8 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) ffc087f8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc087fc: 38 60 00 03 li r3,3 ffc08800: 41 9e 00 c8 beq- cr7,ffc088c8 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { ffc08804: 70 e0 80 00 andi. r0,r7,32768 ffc08808: 40 82 00 1c bne- ffc08824 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc0880c: 2f 84 00 00 cmpwi cr7,r4,0 ffc08810: 41 9e 00 e0 beq- cr7,ffc088f0 ffc08814: 3d 20 00 00 lis r9,0 ffc08818: 88 09 26 64 lbz r0,9828(r9) ffc0881c: 7f 84 00 40 cmplw cr7,r4,r0 <== ALWAYS TAKEN ffc08820: 41 9d 00 d0 bgt- cr7,ffc088f0 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); ffc08824: 3f 80 00 00 lis r28,0 ffc08828: 90 81 00 1c stw r4,28(r1) * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); ffc0882c: 3f 40 00 00 lis r26,0 ffc08830: 80 7c 27 64 lwz r3,10084(r28) ffc08834: 3b 5a 2b 2c addi r26,r26,11052 ffc08838: 90 a1 00 20 stw r5,32(r1) ffc0883c: 48 00 0a 0d bl ffc09248 <_API_Mutex_Lock> <== ALWAYS TAKEN ffc08840: 7f 43 d3 78 mr r3,r26 <== ALWAYS TAKEN ffc08844: 48 00 15 a9 bl ffc09dec <_Objects_Allocate> <== ALWAYS TAKEN * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { ffc08848: 80 81 00 1c lwz r4,28(r1) ffc0884c: 7c 7e 1b 79 mr. r30,r3 ffc08850: 80 a1 00 20 lwz r5,32(r1) ffc08854: 41 82 01 0c beq- ffc08960 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( ffc08858: 7c 2b 0b 78 mr r11,r1 <== ALWAYS TAKEN ffc0885c: 97 6b 00 18 stwu r27,24(r11) <== ALWAYS TAKEN ffc08860: 6b e9 01 00 xori r9,r31,256 <== ALWAYS TAKEN ffc08864: 7c a6 2b 78 mr r6,r5 ffc08868: 7c 88 23 78 mr r8,r4 <== ALWAYS TAKEN ffc0886c: 91 61 00 10 stw r11,16(r1) <== ALWAYS TAKEN ffc08870: 57 e0 07 fe clrlwi r0,r31,31 ffc08874: 39 80 00 00 li r12,0 ffc08878: 90 01 00 0c stw r0,12(r1) ffc0887c: 7f 43 d3 78 mr r3,r26 <== ALWAYS TAKEN ffc08880: 55 29 c7 fe rlwinm r9,r9,24,31,31 <== ALWAYS TAKEN ffc08884: 91 81 00 08 stw r12,8(r1) ffc08888: 7f c4 f3 78 mr r4,r30 <== ALWAYS TAKEN ffc0888c: 38 a0 00 00 li r5,0 ffc08890: 38 e0 00 01 li r7,1 ffc08894: 57 ea bf fe rlwinm r10,r31,23,31,31 ffc08898: 48 00 27 cd bl ffc0b064 <_Thread_Initialize> <== ALWAYS TAKEN NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { ffc0889c: 2f 83 00 00 cmpwi cr7,r3,0 ffc088a0: 41 9e 00 7c beq- cr7,ffc0891c api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; *id = the_thread->Object.id; ffc088a4: 80 1e 00 08 lwz r0,8(r30) <== ALWAYS TAKEN } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; ffc088a8: 6b ff 04 00 xori r31,r31,1024 ffc088ac: 81 3e 01 40 lwz r9,320(r30) ffc088b0: 57 ff b7 fe rlwinm r31,r31,22,31,31 ); } #endif _RTEMS_Unlock_allocator(); ffc088b4: 80 7c 27 64 lwz r3,10084(r28) } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; ffc088b8: 9b e9 00 08 stb r31,8(r9) <== ALWAYS TAKEN *id = the_thread->Object.id; ffc088bc: 90 1d 00 00 stw r0,0(r29) ); } #endif _RTEMS_Unlock_allocator(); ffc088c0: 48 00 0a 09 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc088c4: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc088c8: 80 01 00 44 lwz r0,68(r1) <== ALWAYS TAKEN ffc088cc: 83 41 00 28 lwz r26,40(r1) ffc088d0: 7c 08 03 a6 mtlr r0 ffc088d4: 83 61 00 2c lwz r27,44(r1) ffc088d8: 83 81 00 30 lwz r28,48(r1) ffc088dc: 83 a1 00 34 lwz r29,52(r1) ffc088e0: 83 c1 00 38 lwz r30,56(r1) ffc088e4: 83 e1 00 3c lwz r31,60(r1) <== ALWAYS TAKEN ffc088e8: 38 21 00 40 addi r1,r1,64 ffc088ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc088f0: 80 01 00 44 lwz r0,68(r1) } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; ffc088f4: 38 60 00 13 li r3,19 } ffc088f8: 83 41 00 28 lwz r26,40(r1) ffc088fc: 7c 08 03 a6 mtlr r0 ffc08900: 83 61 00 2c lwz r27,44(r1) ffc08904: 83 81 00 30 lwz r28,48(r1) ffc08908: 83 a1 00 34 lwz r29,52(r1) ffc0890c: 83 c1 00 38 lwz r30,56(r1) ffc08910: 83 e1 00 3c lwz r31,60(r1) ffc08914: 38 21 00 40 addi r1,r1,64 ffc08918: 4e 80 00 20 blr <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( ffc0891c: 80 7e 00 08 lwz r3,8(r30) ffc08920: 48 00 19 ad bl ffc0a2cc <_Objects_Get_information_id> <== ALWAYS TAKEN ffc08924: 7f c4 f3 78 mr r4,r30 ffc08928: 48 00 18 e5 bl ffc0a20c <_Objects_Free> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc0892c: 80 7c 27 64 lwz r3,10084(r28) ffc08930: 48 00 09 99 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } ffc08934: 80 01 00 44 lwz r0,68(r1) #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc08938: 38 60 00 0d li r3,13 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } ffc0893c: 83 41 00 28 lwz r26,40(r1) ffc08940: 7c 08 03 a6 mtlr r0 ffc08944: 83 61 00 2c lwz r27,44(r1) ffc08948: 83 81 00 30 lwz r28,48(r1) ffc0894c: 83 a1 00 34 lwz r29,52(r1) ffc08950: 83 c1 00 38 lwz r30,56(r1) ffc08954: 83 e1 00 3c lwz r31,60(r1) ffc08958: 38 21 00 40 addi r1,r1,64 ffc0895c: 4e 80 00 20 blr <== ALWAYS TAKEN */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); ffc08960: 80 7c 27 64 lwz r3,10084(r28) ffc08964: 48 00 09 65 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } ffc08968: 80 01 00 44 lwz r0,68(r1) */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); ffc0896c: 38 60 00 05 li r3,5 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } ffc08970: 83 41 00 28 lwz r26,40(r1) ffc08974: 7c 08 03 a6 mtlr r0 ffc08978: 83 61 00 2c lwz r27,44(r1) ffc0897c: 83 81 00 30 lwz r28,48(r1) ffc08980: 83 a1 00 34 lwz r29,52(r1) ffc08984: 83 c1 00 38 lwz r30,56(r1) ffc08988: 83 e1 00 3c lwz r31,60(r1) ffc0898c: 38 21 00 40 addi r1,r1,64 ffc08990: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08994 : */ rtems_status_code rtems_task_delete( rtems_id id ) { ffc08994: 94 21 ff e0 stwu r1,-32(r1) ffc08998: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0899c: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); ffc089a0: 3f e0 00 00 lis r31,0 */ rtems_status_code rtems_task_delete( rtems_id id ) { ffc089a4: 93 c1 00 18 stw r30,24(r1) ffc089a8: 7c 7e 1b 78 mr r30,r3 register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); ffc089ac: 80 7f 27 64 lwz r3,10084(r31) */ rtems_status_code rtems_task_delete( rtems_id id ) { ffc089b0: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); ffc089b4: 48 00 08 95 bl ffc09248 <_API_Mutex_Lock> <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); ffc089b8: 7f c3 f3 78 mr r3,r30 <== ALWAYS TAKEN ffc089bc: 38 81 00 08 addi r4,r1,8 ffc089c0: 48 00 25 d9 bl ffc0af98 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc089c4: 80 01 00 08 lwz r0,8(r1) Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); ffc089c8: 7c 7e 1b 78 mr r30,r3 switch ( location ) { ffc089cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc089d0: 40 9e 00 4c bne- cr7,ffc08a1c case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); ffc089d4: 80 63 00 08 lwz r3,8(r3) ffc089d8: 48 00 18 f5 bl ffc0a2cc <_Objects_Get_information_id> <== ALWAYS TAKEN 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); ffc089dc: 7f c4 f3 78 mr r4,r30 <== ALWAYS TAKEN ffc089e0: 48 00 21 51 bl ffc0ab30 <_Thread_Close> <== ALWAYS TAKEN ffc089e4: 80 7e 00 08 lwz r3,8(r30) ffc089e8: 48 00 18 e5 bl ffc0a2cc <_Objects_Get_information_id> <== ALWAYS TAKEN ffc089ec: 7f c4 f3 78 mr r4,r30 ffc089f0: 48 00 18 1d bl ffc0a20c <_Objects_Free> <== ALWAYS TAKEN _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc089f4: 80 7f 27 64 lwz r3,10084(r31) ffc089f8: 48 00 08 d1 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc089fc: 48 00 25 7d bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } ffc08a00: 80 01 00 24 lwz r0,36(r1) _Thread_Close( the_information, the_thread ); _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); ffc08a04: 38 60 00 00 li r3,0 break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } ffc08a08: 83 c1 00 18 lwz r30,24(r1) ffc08a0c: 7c 08 03 a6 mtlr r0 ffc08a10: 83 e1 00 1c lwz r31,28(r1) ffc08a14: 38 21 00 20 addi r1,r1,32 ffc08a18: 4e 80 00 20 blr <== ALWAYS TAKEN case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); ffc08a1c: 80 7f 27 64 lwz r3,10084(r31) ffc08a20: 48 00 08 a9 bl ffc092c8 <_API_Mutex_Unlock> <== ALWAYS TAKEN return RTEMS_INVALID_ID; } ffc08a24: 80 01 00 24 lwz r0,36(r1) case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); ffc08a28: 38 60 00 04 li r3,4 return RTEMS_INVALID_ID; } ffc08a2c: 83 c1 00 18 lwz r30,24(r1) ffc08a30: 7c 08 03 a6 mtlr r0 ffc08a34: 83 e1 00 1c lwz r31,28(r1) ffc08a38: 38 21 00 20 addi r1,r1,32 ffc08a3c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ae5c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0ae5c: 94 21 ff d8 stwu r1,-40(r1) ffc0ae60: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0ae64: 3d 20 00 00 lis r9,0 rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0ae68: 90 01 00 2c stw r0,44(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0ae6c: 88 09 20 94 lbz r0,8340(r9) rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0ae70: 93 e1 00 24 stw r31,36(r1) ffc0ae74: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0ae78: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ae7c: 38 00 00 16 li r0,22 ffc0ae80: 41 9e 00 74 beq- cr7,ffc0aef4 return RTEMS_NOT_CONFIGURED; if ( !note ) ffc0ae84: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ae88: 38 00 00 09 li r0,9 ffc0ae8c: 41 9e 00 68 beq- cr7,ffc0aef4 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) ffc0ae90: 2b 84 00 0f cmplwi cr7,r4,15 ffc0ae94: 38 00 00 0a li r0,10 ffc0ae98: 41 9d 00 5c bgt- cr7,ffc0aef4 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0ae9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0aea0: 41 9e 00 6c beq- cr7,ffc0af0c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { ffc0aea4: 3d 60 00 00 lis r11,0 ffc0aea8: 81 6b 27 b0 lwz r11,10160(r11) /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0aeac: 80 0b 00 08 lwz r0,8(r11) ffc0aeb0: 7f 83 00 00 cmpw cr7,r3,r0 ffc0aeb4: 41 9e 00 60 beq- cr7,ffc0af14 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); ffc0aeb8: 38 81 00 08 addi r4,r1,8 ffc0aebc: 90 a1 00 18 stw r5,24(r1) ffc0aec0: 48 00 2a 2d bl ffc0d8ec <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0aec4: 38 00 00 04 li r0,4 ffc0aec8: 81 21 00 08 lwz r9,8(r1) ffc0aecc: 80 a1 00 18 lwz r5,24(r1) ffc0aed0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0aed4: 40 9e 00 20 bne- cr7,ffc0aef4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; ffc0aed8: 81 23 01 40 lwz r9,320(r3) ffc0aedc: 3b ff 00 08 addi r31,r31,8 ffc0aee0: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0aee4: 7c 09 f8 2e lwzx r0,r9,r31 ffc0aee8: 90 05 00 00 stw r0,0(r5) _Thread_Enable_dispatch(); ffc0aeec: 48 00 29 e1 bl ffc0d8cc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0aef0: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0aef4: 7c 03 03 78 mr r3,r0 ffc0aef8: 80 01 00 2c lwz r0,44(r1) ffc0aefc: 83 e1 00 24 lwz r31,36(r1) ffc0af00: 38 21 00 28 addi r1,r1,40 ffc0af04: 7c 08 03 a6 mtlr r0 ffc0af08: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0af0c: 3d 20 00 00 lis r9,0 ffc0af10: 81 69 27 b0 lwz r11,10160(r9) _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; ffc0af14: 38 00 00 00 li r0,0 ffc0af18: 81 2b 01 40 lwz r9,320(r11) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0af1c: 7c 03 03 78 mr r3,r0 ffc0af20: 80 01 00 2c lwz r0,44(r1) */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; ffc0af24: 3b ff 00 08 addi r31,r31,8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0af28: 7c 08 03 a6 mtlr r0 */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; ffc0af2c: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0af30: 7d 29 f8 2e lwzx r9,r9,r31 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0af34: 83 e1 00 24 lwz r31,36(r1) ffc0af38: 38 21 00 28 addi r1,r1,40 */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; ffc0af3c: 91 25 00 00 stw r9,0(r5) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0af40: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08a40 : rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) ffc08a40: 7c a6 2b 79 mr. r6,r5 rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc08a44: 7c 08 02 a6 mflr r0 ffc08a48: 94 21 ff f8 stwu r1,-8(r1) ffc08a4c: 7c 85 23 78 mr r5,r4 ffc08a50: 90 01 00 0c stw r0,12(r1) ffc08a54: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; if ( !id ) ffc08a58: 38 60 00 09 li r3,9 ffc08a5c: 41 82 00 20 beq- ffc08a7c return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { ffc08a60: 2f 80 00 00 cmpwi cr7,r0,0 ffc08a64: 40 9e 00 28 bne- cr7,ffc08a8c *id = _Thread_Executing->Object.id; ffc08a68: 3d 20 00 00 lis r9,0 ffc08a6c: 81 29 27 6c lwz r9,10092(r9) ffc08a70: 38 60 00 00 li r3,0 ffc08a74: 80 09 00 08 lwz r0,8(r9) ffc08a78: 90 06 00 00 stw r0,0(r6) } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc08a7c: 80 01 00 0c lwz r0,12(r1) ffc08a80: 38 21 00 08 addi r1,r1,8 ffc08a84: 7c 08 03 a6 mtlr r0 ffc08a88: 4e 80 00 20 blr <== ALWAYS TAKEN if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); ffc08a8c: 3c 60 00 00 lis r3,0 ffc08a90: 7c 04 03 78 mr r4,r0 ffc08a94: 38 63 2b 2c addi r3,r3,11052 ffc08a98: 48 00 1a ed bl ffc0a584 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN return _Status_Object_name_errors_to_status[ status ]; } ffc08a9c: 80 01 00 0c lwz r0,12(r1) return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; ffc08aa0: 3d 20 ff c2 lis r9,-62 } ffc08aa4: 7c 08 03 a6 mtlr r0 return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; ffc08aa8: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc08aac: 39 29 de 80 addi r9,r9,-8576 ffc08ab0: 7c 69 18 2e lwzx r3,r9,r3 } ffc08ab4: 38 21 00 08 addi r1,r1,8 ffc08ab8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19f68 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { ffc19f68: 94 21 ff e8 stwu r1,-24(r1) ffc19f6c: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc19f70: 38 81 00 08 addi r4,r1,8 */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { ffc19f74: 90 01 00 1c stw r0,28(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc19f78: 48 00 4c 2d bl ffc1eba4 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc19f7c: 38 00 00 04 li r0,4 ffc19f80: 81 21 00 08 lwz r9,8(r1) ffc19f84: 2f 89 00 00 cmpwi cr7,r9,0 ffc19f88: 40 9e 00 18 bne- cr7,ffc19fa0 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { ffc19f8c: 80 03 00 10 lwz r0,16(r3) ffc19f90: 70 09 00 02 andi. r9,r0,2 ffc19f94: 41 82 00 20 beq- ffc19fb4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc19f98: 48 00 4b a1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc19f9c: 38 00 00 0f li r0,15 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19fa0: 7c 03 03 78 mr r3,r0 ffc19fa4: 80 01 00 1c lwz r0,28(r1) ffc19fa8: 38 21 00 18 addi r1,r1,24 ffc19fac: 7c 08 03 a6 mtlr r0 ffc19fb0: 4e 80 00 20 blr <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); ffc19fb4: 48 00 4b 85 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc19fb8: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19fbc: 7c 03 03 78 mr r3,r0 ffc19fc0: 80 01 00 1c lwz r0,28(r1) ffc19fc4: 38 21 00 18 addi r1,r1,24 ffc19fc8: 7c 08 03 a6 mtlr r0 ffc19fcc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10c9c : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc10c9c: 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 ) { ffc10ca0: 94 21 ff f0 stwu r1,-16(r1) ffc10ca4: 7c 08 02 a6 mflr r0 ffc10ca8: 93 e1 00 0c stw r31,12(r1) ffc10cac: 90 01 00 14 stw r0,20(r1) ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc10cb0: 38 00 00 09 li r0,9 ffc10cb4: 41 82 01 1c beq- ffc10dd0 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc10cb8: 3d 20 00 00 lis r9,0 ffc10cbc: 81 29 27 6c lwz r9,10092(r9) 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 ) ffc10cc0: 80 09 00 7c lwz r0,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; ffc10cc4: 89 49 00 75 lbz r10,117(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc10cc8: 2f 80 00 00 cmpwi cr7,r0,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc10ccc: 81 69 01 40 lwz r11,320(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc10cd0: 7d 4a 00 34 cntlzw r10,r10 ffc10cd4: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc10cd8: 55 48 40 2e rlwinm r8,r10,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc10cdc: 40 9e 01 0c bne- cr7,ffc10de8 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc10ce0: 89 4b 00 08 lbz r10,8(r11) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc10ce4: 38 00 00 00 li r0,0 ffc10ce8: 7d 4a 00 34 cntlzw r10,r10 ffc10cec: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc10cf0: 55 4a 50 2a rlwinm r10,r10,10,0,21 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; ffc10cf4: 7d 48 43 78 or r8,r10,r8 ffc10cf8: 7c 00 00 a6 mfmsr r0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc10cfc: 70 8a 01 00 andi. r10,r4,256 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; ffc10d00: 68 00 80 00 xori r0,r0,32768 ffc10d04: 54 00 8f fe rlwinm r0,r0,17,31,31 ffc10d08: 7d 08 03 78 or r8,r8,r0 ffc10d0c: 91 05 00 00 stw r8,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc10d10: 41 82 00 10 beq- ffc10d20 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc10d14: 68 60 01 00 xori r0,r3,256 ffc10d18: 54 00 c7 fe rlwinm r0,r0,24,31,31 ffc10d1c: 98 09 00 75 stb r0,117(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc10d20: 70 80 02 00 andi. r0,r4,512 ffc10d24: 41 82 00 20 beq- ffc10d44 if ( _Modes_Is_timeslice(mode_set) ) { ffc10d28: 70 60 02 00 andi. r0,r3,512 ffc10d2c: 41 82 01 08 beq- ffc10e34 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc10d30: 3d 40 00 00 lis r10,0 ffc10d34: 80 0a 27 24 lwz r0,10020(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; ffc10d38: 39 40 00 01 li r10,1 ffc10d3c: 91 49 00 7c stw r10,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc10d40: 90 09 00 78 stw r0,120(r9) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc10d44: 70 8a 00 01 andi. r10,r4,1 ffc10d48: 41 82 00 20 beq- ffc10d68 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc10d4c: 38 00 00 00 li r0,0 ffc10d50: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc10d54: 70 6a 00 01 andi. r10,r3,1 ffc10d58: 40 82 00 cc bne- ffc10e24 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc10d5c: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc10d60: 7d 40 03 78 or r0,r10,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc10d64: 7c 00 01 24 mtmsr r0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc10d68: 70 80 04 00 andi. r0,r4,1024 ffc10d6c: 41 82 00 4c beq- ffc10db8 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc10d70: 68 63 04 00 xori r3,r3,1024 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc10d74: 88 0b 00 08 lbz r0,8(r11) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc10d78: 54 63 b7 fe rlwinm r3,r3,22,31,31 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc10d7c: 7f 80 18 00 cmpw cr7,r0,r3 ffc10d80: 41 9e 00 38 beq- cr7,ffc10db8 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 ) { asr->is_enabled = is_asr_enabled; ffc10d84: 98 6b 00 08 stb r3,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc10d88: 7c 00 00 a6 mfmsr r0 ffc10d8c: 7d 50 42 a6 mfsprg r10,0 ffc10d90: 7c 0a 50 78 andc r10,r0,r10 ffc10d94: 7d 40 01 24 mtmsr r10 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc10d98: 81 0b 00 18 lwz r8,24(r11) information->signals_pending = information->signals_posted; ffc10d9c: 81 4b 00 14 lwz r10,20(r11) information->signals_posted = _signals; ffc10da0: 91 0b 00 14 stw r8,20(r11) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc10da4: 91 4b 00 18 stw r10,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc10da8: 7c 00 01 24 mtmsr r0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc10dac: 80 0b 00 14 lwz r0,20(r11) ffc10db0: 2f 80 00 00 cmpwi cr7,r0,0 ffc10db4: 40 9e 00 c4 bne- cr7,ffc10e78 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; ffc10db8: 3b e0 00 00 li r31,0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) ffc10dbc: 3d 20 00 00 lis r9,0 ffc10dc0: 80 09 27 90 lwz r0,10128(r9) ffc10dc4: 2f 80 00 03 cmpwi cr7,r0,3 ffc10dc8: 41 9e 00 7c beq- cr7,ffc10e44 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); ffc10dcc: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc10dd0: 7c 03 03 78 mr r3,r0 ffc10dd4: 80 01 00 14 lwz r0,20(r1) ffc10dd8: 83 e1 00 0c lwz r31,12(r1) ffc10ddc: 38 21 00 10 addi r1,r1,16 ffc10de0: 7c 08 03 a6 mtlr r0 ffc10de4: 4e 80 00 20 blr <== ALWAYS TAKEN if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc10de8: 89 4b 00 08 lbz r10,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; ffc10dec: 61 08 02 00 ori r8,r8,512 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc10df0: 38 00 00 00 li r0,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc10df4: 7d 4a 00 34 cntlzw r10,r10 ffc10df8: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc10dfc: 55 4a 50 2a rlwinm r10,r10,10,0,21 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; ffc10e00: 7d 48 43 78 or r8,r10,r8 ffc10e04: 7c 00 00 a6 mfmsr r0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc10e08: 70 8a 01 00 andi. r10,r4,256 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; ffc10e0c: 68 00 80 00 xori r0,r0,32768 ffc10e10: 54 00 8f fe rlwinm r0,r0,17,31,31 ffc10e14: 7d 08 03 78 or r8,r8,r0 ffc10e18: 91 05 00 00 stw r8,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc10e1c: 41 a2 ff 04 beq- ffc10d20 ffc10e20: 4b ff fe f4 b ffc10d14 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc10e24: 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(); ffc10e28: 7c 00 50 78 andc r0,r0,r10 } _CPU_MSR_SET(msr); ffc10e2c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); ffc10e30: 4b ff ff 38 b ffc10d68 <== ALWAYS TAKEN /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc10e34: 70 8a 00 01 andi. r10,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; ffc10e38: 90 09 00 7c stw r0,124(r9) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc10e3c: 41 a2 ff 2c beq- ffc10d68 ffc10e40: 4b ff ff 0c b ffc10d4c <== ALWAYS TAKEN } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) ffc10e44: 48 00 03 59 bl ffc1119c <_Thread_Evaluate_mode> <== ALWAYS TAKEN ffc10e48: 2f 83 00 00 cmpwi cr7,r3,0 ffc10e4c: 40 9e 00 0c bne- cr7,ffc10e58 ffc10e50: 2f 9f 00 00 cmpwi cr7,r31,0 ffc10e54: 41 be ff 78 beq- cr7,ffc10dcc _Thread_Dispatch(); ffc10e58: 4b ff 9f 19 bl ffc0ad70 <_Thread_Dispatch> <== ALWAYS TAKEN ffc10e5c: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc10e60: 7c 03 03 78 mr r3,r0 ffc10e64: 80 01 00 14 lwz r0,20(r1) ffc10e68: 83 e1 00 0c lwz r31,12(r1) ffc10e6c: 38 21 00 10 addi r1,r1,16 ffc10e70: 7c 08 03 a6 mtlr r0 ffc10e74: 4e 80 00 20 blr <== ALWAYS TAKEN if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; ffc10e78: 38 00 00 01 li r0,1 ffc10e7c: 98 09 00 74 stb r0,116(r9) ffc10e80: 3b e0 00 01 li r31,1 ffc10e84: 4b ff ff 38 b ffc10dbc <== ALWAYS TAKEN ffc09a34 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { ffc09a34: 94 21 ff e0 stwu r1,-32(r1) ffc09a38: 7c 08 02 a6 mflr r0 ffc09a3c: 93 e1 00 1c stw r31,28(r1) ffc09a40: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc09a44: 38 81 00 08 addi r4,r1,8 rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { ffc09a48: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc09a4c: 48 00 25 89 bl ffc0bfd4 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc09a50: 38 00 00 04 li r0,4 ffc09a54: 81 21 00 08 lwz r9,8(r1) ffc09a58: 2f 89 00 00 cmpwi cr7,r9,0 ffc09a5c: 40 9e 00 20 bne- cr7,ffc09a7c case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { ffc09a60: 7f e5 fb 78 mr r5,r31 ffc09a64: 38 80 00 00 li r4,0 ffc09a68: 48 00 30 6d bl ffc0cad4 <_Thread_Restart> <== ALWAYS TAKEN ffc09a6c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09a70: 40 9e 00 24 bne- cr7,ffc09a94 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc09a74: 48 00 25 41 bl ffc0bfb4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc09a78: 38 00 00 0e li r0,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc09a7c: 7c 03 03 78 mr r3,r0 ffc09a80: 80 01 00 24 lwz r0,36(r1) ffc09a84: 83 e1 00 1c lwz r31,28(r1) ffc09a88: 38 21 00 20 addi r1,r1,32 ffc09a8c: 7c 08 03 a6 mtlr r0 ffc09a90: 4e 80 00 20 blr <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); ffc09a94: 48 00 25 21 bl ffc0bfb4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc09a98: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc09a9c: 7c 03 03 78 mr r3,r0 ffc09aa0: 80 01 00 24 lwz r0,36(r1) ffc09aa4: 83 e1 00 1c lwz r31,28(r1) ffc09aa8: 38 21 00 20 addi r1,r1,32 ffc09aac: 7c 08 03 a6 mtlr r0 ffc09ab0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d420 : */ rtems_status_code rtems_task_resume( rtems_id id ) { ffc0d420: 94 21 ff e8 stwu r1,-24(r1) ffc0d424: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d428: 38 81 00 08 addi r4,r1,8 */ rtems_status_code rtems_task_resume( rtems_id id ) { ffc0d42c: 90 01 00 1c stw r0,28(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d430: 48 00 26 09 bl ffc0fa38 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0d434: 38 00 00 04 li r0,4 ffc0d438: 81 21 00 08 lwz r9,8(r1) ffc0d43c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d440: 40 9e 00 18 bne- cr7,ffc0d458 case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { ffc0d444: 80 03 00 10 lwz r0,16(r3) ffc0d448: 70 09 00 02 andi. r9,r0,2 ffc0d44c: 40 82 00 20 bne- ffc0d46c _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc0d450: 48 00 25 7d bl ffc0f9cc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0d454: 38 00 00 0e li r0,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0d458: 7c 03 03 78 mr r3,r0 ffc0d45c: 80 01 00 1c lwz r0,28(r1) ffc0d460: 38 21 00 18 addi r1,r1,24 ffc0d464: 7c 08 03 a6 mtlr r0 ffc0d468: 4e 80 00 20 blr <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); ffc0d46c: 38 80 00 01 li r4,1 ffc0d470: 48 00 30 c9 bl ffc10538 <_Thread_Resume> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc0d474: 48 00 25 59 bl ffc0f9cc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0d478: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0d47c: 7c 03 03 78 mr r3,r0 ffc0d480: 80 01 00 1c lwz r0,28(r1) ffc0d484: 38 21 00 18 addi r1,r1,24 ffc0d488: 7c 08 03 a6 mtlr r0 ffc0d48c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc15054 : #include #include rtems_id rtems_task_self(void) { ffc15054: 3d 20 00 00 lis r9,0 ffc15058: 81 29 27 8c lwz r9,10124(r9) return _Thread_Executing->Object.id; } ffc1505c: 80 69 00 08 lwz r3,8(r9) ffc15060: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b110 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0b110: 94 21 ff d8 stwu r1,-40(r1) ffc0b114: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0b118: 3d 20 00 00 lis r9,0 rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0b11c: 90 01 00 2c stw r0,44(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0b120: 88 09 20 94 lbz r0,8340(r9) rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0b124: 93 e1 00 24 stw r31,36(r1) ffc0b128: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0b12c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b130: 38 00 00 16 li r0,22 ffc0b134: 41 9e 00 64 beq- cr7,ffc0b198 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) ffc0b138: 2b 84 00 0f cmplwi cr7,r4,15 ffc0b13c: 38 00 00 0a li r0,10 ffc0b140: 41 9d 00 58 bgt- cr7,ffc0b198 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0b144: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b148: 41 9e 00 68 beq- cr7,ffc0b1b0 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { ffc0b14c: 3d 60 00 00 lis r11,0 ffc0b150: 81 6b 27 b0 lwz r11,10160(r11) /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0b154: 80 0b 00 08 lwz r0,8(r11) ffc0b158: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b15c: 41 9e 00 5c beq- cr7,ffc0b1b8 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); ffc0b160: 38 81 00 08 addi r4,r1,8 ffc0b164: 90 a1 00 18 stw r5,24(r1) ffc0b168: 48 00 27 85 bl ffc0d8ec <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0b16c: 38 00 00 04 li r0,4 ffc0b170: 81 21 00 08 lwz r9,8(r1) ffc0b174: 80 a1 00 18 lwz r5,24(r1) ffc0b178: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b17c: 40 9e 00 1c bne- cr7,ffc0b198 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; ffc0b180: 81 23 01 40 lwz r9,320(r3) ffc0b184: 3b ff 00 08 addi r31,r31,8 ffc0b188: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0b18c: 7c a9 f9 2e stwx r5,r9,r31 _Thread_Enable_dispatch(); ffc0b190: 48 00 27 3d bl ffc0d8cc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0b194: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0b198: 7c 03 03 78 mr r3,r0 ffc0b19c: 80 01 00 2c lwz r0,44(r1) ffc0b1a0: 83 e1 00 24 lwz r31,36(r1) ffc0b1a4: 38 21 00 28 addi r1,r1,40 ffc0b1a8: 7c 08 03 a6 mtlr r0 ffc0b1ac: 4e 80 00 20 blr <== ALWAYS TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0b1b0: 3d 20 00 00 lis r9,0 ffc0b1b4: 81 69 27 b0 lwz r11,10160(r9) _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; ffc0b1b8: 38 00 00 00 li r0,0 ffc0b1bc: 81 2b 01 40 lwz r9,320(r11) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0b1c0: 7c 03 03 78 mr r3,r0 ffc0b1c4: 80 01 00 2c lwz r0,44(r1) */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; ffc0b1c8: 3b ff 00 08 addi r31,r31,8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0b1cc: 7c 08 03 a6 mtlr r0 */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; ffc0b1d0: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0b1d4: 7c a9 f9 2e stwx r5,r9,r31 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0b1d8: 83 e1 00 24 lwz r31,36(r1) ffc0b1dc: 38 21 00 28 addi r1,r1,40 ffc0b1e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0eb10 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0eb10: 7d 80 00 26 mfcr r12 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb14: 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 ) { ffc0eb18: 94 21 ff d8 stwu r1,-40(r1) ffc0eb1c: 7c 08 02 a6 mflr r0 ffc0eb20: 93 c1 00 20 stw r30,32(r1) ffc0eb24: 7c be 2b 78 mr r30,r5 ffc0eb28: 93 e1 00 24 stw r31,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb2c: 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 ) { ffc0eb30: 90 01 00 2c stw r0,44(r1) ffc0eb34: 91 81 00 1c stw r12,28(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb38: 41 92 00 18 beq- cr4,ffc0eb50 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc0eb3c: 3d 20 00 00 lis r9,0 ffc0eb40: 89 29 26 a4 lbz r9,9892(r9) ffc0eb44: 38 00 00 13 li r0,19 ffc0eb48: 7f 84 48 40 cmplw cr7,r4,r9 ffc0eb4c: 41 9d 00 64 bgt- cr7,ffc0ebb0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0eb50: 2f 9e 00 00 cmpwi cr7,r30,0 <== ALWAYS TAKEN ffc0eb54: 38 00 00 09 li r0,9 ffc0eb58: 41 9e 00 58 beq- cr7,ffc0ebb0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0eb5c: 38 81 00 08 addi r4,r1,8 ffc0eb60: 48 00 28 5d bl ffc113bc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0eb64: 81 21 00 08 lwz r9,8(r1) ffc0eb68: 38 00 00 04 li r0,4 ffc0eb6c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0eb70: 40 9e 00 40 bne- cr7,ffc0ebb0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0eb74: 80 03 00 14 lwz r0,20(r3) ffc0eb78: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0eb7c: 41 92 00 2c beq- cr4,ffc0eba8 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0eb80: 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; ffc0eb84: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0eb88: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eb8c: 41 9e 00 10 beq- cr7,ffc0eb9c the_thread->current_priority > new_priority ) ffc0eb90: 80 03 00 14 lwz r0,20(r3) ffc0eb94: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0eb98: 40 9c 00 10 bge- cr7,ffc0eba8 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); ffc0eb9c: 7f e4 fb 78 mr r4,r31 ffc0eba0: 38 a0 00 00 li r5,0 <== ALWAYS TAKEN ffc0eba4: 48 00 20 a1 bl ffc10c44 <_Thread_Change_priority> <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc0eba8: 48 00 27 a9 bl ffc11350 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0ebac: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0ebb0: 7c 03 03 78 mr r3,r0 <== ALWAYS TAKEN ffc0ebb4: 80 01 00 2c lwz r0,44(r1) ffc0ebb8: 81 81 00 1c lwz r12,28(r1) ffc0ebbc: 7c 08 03 a6 mtlr r0 ffc0ebc0: 83 c1 00 20 lwz r30,32(r1) ffc0ebc4: 83 e1 00 24 lwz r31,36(r1) ffc0ebc8: 7d 80 81 20 mtcrf 8,r12 ffc0ebcc: 38 21 00 28 addi r1,r1,40 ffc0ebd0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08b7c : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { ffc08b7c: 94 21 ff e0 stwu r1,-32(r1) <== ALWAYS TAKEN ffc08b80: 7c 08 02 a6 mflr r0 ffc08b84: 93 c1 00 18 stw r30,24(r1) register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) ffc08b88: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { ffc08b8c: 90 01 00 24 stw r0,36(r1) <== ALWAYS TAKEN register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) ffc08b90: 38 00 00 09 li r0,9 rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { ffc08b94: 93 e1 00 1c stw r31,28(r1) ffc08b98: 7c bf 2b 78 mr r31,r5 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) ffc08b9c: 41 82 00 40 beq- ffc08bdc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc08ba0: 38 81 00 08 addi r4,r1,8 ffc08ba4: 48 00 23 f5 bl ffc0af98 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc08ba8: 81 21 00 08 lwz r9,8(r1) ffc08bac: 38 00 00 04 li r0,4 ffc08bb0: 2f 89 00 00 cmpwi cr7,r9,0 ffc08bb4: 40 9e 00 28 bne- cr7,ffc08bdc case OBJECTS_LOCAL: if ( _Thread_Start( ffc08bb8: 7f c5 f3 78 mr r5,r30 ffc08bbc: 7f e7 fb 78 mr r7,r31 ffc08bc0: 38 80 00 00 li r4,0 ffc08bc4: 38 c0 00 00 li r6,0 ffc08bc8: 48 00 32 61 bl ffc0be28 <_Thread_Start> <== ALWAYS TAKEN ffc08bcc: 2f 83 00 00 cmpwi cr7,r3,0 ffc08bd0: 40 9e 00 28 bne- cr7,ffc08bf8 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc08bd4: 48 00 23 a5 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08bd8: 38 00 00 0e li r0,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08bdc: 7c 03 03 78 mr r3,r0 ffc08be0: 80 01 00 24 lwz r0,36(r1) ffc08be4: 83 c1 00 18 lwz r30,24(r1) ffc08be8: 7c 08 03 a6 mtlr r0 ffc08bec: 83 e1 00 1c lwz r31,28(r1) ffc08bf0: 38 21 00 20 addi r1,r1,32 ffc08bf4: 4e 80 00 20 blr <== ALWAYS TAKEN switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); ffc08bf8: 48 00 23 81 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08bfc: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08c00: 7c 03 03 78 mr r3,r0 ffc08c04: 80 01 00 24 lwz r0,36(r1) ffc08c08: 83 c1 00 18 lwz r30,24(r1) ffc08c0c: 7c 08 03 a6 mtlr r0 ffc08c10: 83 e1 00 1c lwz r31,28(r1) ffc08c14: 38 21 00 20 addi r1,r1,32 ffc08c18: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c1c : */ rtems_status_code rtems_task_suspend( rtems_id id ) { ffc08c1c: 94 21 ff e8 stwu r1,-24(r1) ffc08c20: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc08c24: 38 81 00 08 addi r4,r1,8 */ rtems_status_code rtems_task_suspend( rtems_id id ) { ffc08c28: 90 01 00 1c stw r0,28(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc08c2c: 48 00 23 6d bl ffc0af98 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc08c30: 38 00 00 04 li r0,4 ffc08c34: 81 21 00 08 lwz r9,8(r1) ffc08c38: 2f 89 00 00 cmpwi cr7,r9,0 ffc08c3c: 40 9e 00 18 bne- cr7,ffc08c54 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { ffc08c40: 80 03 00 10 lwz r0,16(r3) ffc08c44: 70 09 00 02 andi. r9,r0,2 ffc08c48: 41 82 00 20 beq- ffc08c68 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc08c4c: 48 00 23 2d bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08c50: 38 00 00 0f li r0,15 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08c54: 7c 03 03 78 mr r3,r0 ffc08c58: 80 01 00 1c lwz r0,28(r1) ffc08c5c: 38 21 00 18 addi r1,r1,24 ffc08c60: 7c 08 03 a6 mtlr r0 ffc08c64: 4e 80 00 20 blr <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); ffc08c68: 48 00 32 25 bl ffc0be8c <_Thread_Suspend> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc08c6c: 48 00 23 0d bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08c70: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08c74: 7c 03 03 78 mr r3,r0 ffc08c78: 80 01 00 1c lwz r0,28(r1) ffc08c7c: 38 21 00 18 addi r1,r1,24 ffc08c80: 7c 08 03 a6 mtlr r0 ffc08c84: 4e 80 00 20 blr <== ALWAYS TAKEN ffc32490 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { ffc32490: 94 21 ff d8 stwu r1,-40(r1) ffc32494: 7c 08 02 a6 mflr r0 ffc32498: 93 e1 00 24 stw r31,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) ffc3249c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { ffc324a0: 90 01 00 2c stw r0,44(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) ffc324a4: 38 00 00 09 li r0,9 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { ffc324a8: 93 c1 00 20 stw r30,32(r1) ffc324ac: 7c be 2b 78 mr r30,r5 ffc324b0: 93 a1 00 1c stw r29,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) ffc324b4: 41 82 00 20 beq- ffc324d4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc324b8: 38 81 00 08 addi r4,r1,8 ffc324bc: 4b fd ee 79 bl ffc11334 <_Thread_Get> <== ALWAYS TAKEN switch (location) { ffc324c0: 81 21 00 08 lwz r9,8(r1) rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc324c4: 7c 7d 1b 78 mr r29,r3 switch (location) { ffc324c8: 2f 89 00 00 cmpwi cr7,r9,0 ffc324cc: 38 00 00 04 li r0,4 ffc324d0: 41 9e 00 24 beq- cr7,ffc324f4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc324d4: 7c 03 03 78 mr r3,r0 ffc324d8: 80 01 00 2c lwz r0,44(r1) ffc324dc: 83 a1 00 1c lwz r29,28(r1) ffc324e0: 7c 08 03 a6 mtlr r0 ffc324e4: 83 c1 00 20 lwz r30,32(r1) ffc324e8: 83 e1 00 24 lwz r31,36(r1) ffc324ec: 38 21 00 28 addi r1,r1,40 ffc324f0: 4e 80 00 20 blr <== ALWAYS TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; ffc324f4: 81 23 01 50 lwz r9,336(r3) while (tvp) { ffc324f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc324fc: 40 be 00 64 bne+ cr7,ffc32560 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) ffc32500: 38 60 00 14 li r3,20 ffc32504: 4b fe 08 71 bl ffc12d74 <_Workspace_Allocate> <== ALWAYS TAKEN _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { ffc32508: 2c 03 00 00 cmpwi r3,0 ffc3250c: 41 82 00 8c beq- ffc32598 } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; ffc32510: 80 1d 01 50 lwz r0,336(r29) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; ffc32514: 81 3f 00 00 lwz r9,0(r31) new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; ffc32518: 90 7d 01 50 stw r3,336(r29) if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; new->ptr = ptr; ffc3251c: 93 e3 00 04 stw r31,4(r3) new->dtor = dtor; ffc32520: 93 c3 00 10 stw r30,16(r3) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; ffc32524: 90 03 00 00 stw r0,0(r3) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; ffc32528: 91 23 00 08 stw r9,8(r3) new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; _Thread_Enable_dispatch(); ffc3252c: 4b fd ed e9 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc32530: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc32534: 7c 03 03 78 mr r3,r0 ffc32538: 80 01 00 2c lwz r0,44(r1) ffc3253c: 83 a1 00 1c lwz r29,28(r1) ffc32540: 7c 08 03 a6 mtlr r0 ffc32544: 83 c1 00 20 lwz r30,32(r1) ffc32548: 83 e1 00 24 lwz r31,36(r1) ffc3254c: 38 21 00 28 addi r1,r1,40 ffc32550: 4e 80 00 20 blr <== ALWAYS TAKEN if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc32554: 81 29 00 00 lwz r9,0(r9) case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { ffc32558: 2f 89 00 00 cmpwi cr7,r9,0 ffc3255c: 41 be ff a4 beq- cr7,ffc32500 if (tvp->ptr == ptr) { ffc32560: 80 09 00 04 lwz r0,4(r9) ffc32564: 7f 80 f8 00 cmpw cr7,r0,r31 ffc32568: 40 9e ff ec bne+ cr7,ffc32554 tvp->dtor = dtor; ffc3256c: 93 c9 00 10 stw r30,16(r9) _Thread_Enable_dispatch(); ffc32570: 4b fd ed a5 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc32574: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc32578: 7c 03 03 78 mr r3,r0 ffc3257c: 80 01 00 2c lwz r0,44(r1) ffc32580: 83 a1 00 1c lwz r29,28(r1) ffc32584: 7c 08 03 a6 mtlr r0 ffc32588: 83 c1 00 20 lwz r30,32(r1) ffc3258c: 83 e1 00 24 lwz r31,36(r1) ffc32590: 38 21 00 28 addi r1,r1,40 ffc32594: 4e 80 00 20 blr <== ALWAYS TAKEN * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); ffc32598: 4b fd ed 7d bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc3259c: 38 00 00 1a li r0,26 return RTEMS_NO_MEMORY; ffc325a0: 4b ff ff 34 b ffc324d4 <== ALWAYS TAKEN ffc325a4 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc325a4: 94 21 ff e0 stwu r1,-32(r1) ffc325a8: 7c 08 02 a6 mflr r0 ffc325ac: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc325b0: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc325b4: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc325b8: 38 00 00 09 li r0,9 ffc325bc: 41 82 00 1c beq- ffc325d8 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc325c0: 38 81 00 08 addi r4,r1,8 ffc325c4: 4b fd ed 71 bl ffc11334 <_Thread_Get> <== ALWAYS TAKEN switch (location) { ffc325c8: 81 21 00 08 lwz r9,8(r1) ffc325cc: 38 00 00 04 li r0,4 ffc325d0: 2f 89 00 00 cmpwi cr7,r9,0 ffc325d4: 41 9e 00 1c beq- cr7,ffc325f0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc325d8: 7c 03 03 78 mr r3,r0 ffc325dc: 80 01 00 24 lwz r0,36(r1) ffc325e0: 83 e1 00 1c lwz r31,28(r1) ffc325e4: 38 21 00 20 addi r1,r1,32 ffc325e8: 7c 08 03 a6 mtlr r0 ffc325ec: 4e 80 00 20 blr <== ALWAYS TAKEN the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc325f0: 80 83 01 50 lwz r4,336(r3) while (tvp) { ffc325f4: 2f 84 00 00 cmpwi cr7,r4,0 ffc325f8: 41 9e 00 30 beq- cr7,ffc32628 if (tvp->ptr == ptr) { ffc325fc: 80 04 00 04 lwz r0,4(r4) ffc32600: 7f 80 f8 00 cmpw cr7,r0,r31 ffc32604: 40 be 00 14 bne+ cr7,ffc32618 ffc32608: 48 00 00 6c b ffc32674 <== ALWAYS TAKEN ffc3260c: 80 04 00 04 lwz r0,4(r4) ffc32610: 7f 80 f8 00 cmpw cr7,r0,r31 ffc32614: 41 9e 00 34 beq- cr7,ffc32648 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc32618: 7c 89 23 78 mr r9,r4 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; ffc3261c: 80 84 00 00 lwz r4,0(r4) the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { ffc32620: 2f 84 00 00 cmpwi cr7,r4,0 ffc32624: 40 9e ff e8 bne+ cr7,ffc3260c <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc32628: 4b fd ec ed bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc3262c: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc32630: 7c 03 03 78 mr r3,r0 ffc32634: 80 01 00 24 lwz r0,36(r1) ffc32638: 83 e1 00 1c lwz r31,28(r1) ffc3263c: 38 21 00 20 addi r1,r1,32 ffc32640: 7c 08 03 a6 mtlr r0 ffc32644: 4e 80 00 20 blr <== ALWAYS TAKEN case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; ffc32648: 80 04 00 00 lwz r0,0(r4) ffc3264c: 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 ); ffc32650: 48 00 01 01 bl ffc32750 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc32654: 4b fd ec c1 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc32658: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc3265c: 7c 03 03 78 mr r3,r0 ffc32660: 80 01 00 24 lwz r0,36(r1) ffc32664: 83 e1 00 1c lwz r31,28(r1) ffc32668: 38 21 00 20 addi r1,r1,32 ffc3266c: 7c 08 03 a6 mtlr r0 ffc32670: 4e 80 00 20 blr <== ALWAYS TAKEN while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc32674: 80 04 00 00 lwz r0,0(r4) ffc32678: 90 03 01 50 stw r0,336(r3) ffc3267c: 4b ff ff d4 b ffc32650 <== ALWAYS TAKEN ffc32680 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc32680: 94 21 ff e0 stwu r1,-32(r1) ffc32684: 7c 08 02 a6 mflr r0 ffc32688: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc3268c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc32690: 93 c1 00 18 stw r30,24(r1) ffc32694: 7c be 2b 78 mr r30,r5 ffc32698: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc3269c: 41 82 00 78 beq- ffc32714 return RTEMS_INVALID_ADDRESS; if ( !result ) ffc326a0: 2f 85 00 00 cmpwi cr7,r5,0 ffc326a4: 41 9e 00 70 beq- cr7,ffc32714 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc326a8: 38 81 00 08 addi r4,r1,8 <== ALWAYS TAKEN ffc326ac: 4b fd ec 89 bl ffc11334 <_Thread_Get> <== ALWAYS TAKEN switch (location) { ffc326b0: 80 01 00 08 lwz r0,8(r1) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc326b4: 7c 69 1b 78 mr r9,r3 switch (location) { ffc326b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc326bc: 38 60 00 04 li r3,4 ffc326c0: 40 9e 00 3c bne- cr7,ffc326fc case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc326c4: 81 29 01 50 lwz r9,336(r9) while (tvp) { ffc326c8: 2f 89 00 00 cmpwi cr7,r9,0 ffc326cc: 40 be 00 14 bne+ cr7,ffc326e0 ffc326d0: 48 00 00 60 b ffc32730 <== ALWAYS TAKEN */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc326d4: 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) { ffc326d8: 2f 89 00 00 cmpwi cr7,r9,0 ffc326dc: 41 9e 00 54 beq- cr7,ffc32730 <== NEVER TAKEN if (tvp->ptr == ptr) { ffc326e0: 80 09 00 04 lwz r0,4(r9) ffc326e4: 7f 80 f8 00 cmpw cr7,r0,r31 ffc326e8: 40 9e ff ec bne+ cr7,ffc326d4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc326ec: 80 09 00 0c lwz r0,12(r9) ffc326f0: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc326f4: 4b fd ec 21 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc326f8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc326fc: 80 01 00 24 lwz r0,36(r1) ffc32700: 83 c1 00 18 lwz r30,24(r1) ffc32704: 7c 08 03 a6 mtlr r0 ffc32708: 83 e1 00 1c lwz r31,28(r1) ffc3270c: 38 21 00 20 addi r1,r1,32 ffc32710: 4e 80 00 20 blr <== ALWAYS TAKEN ffc32714: 80 01 00 24 lwz r0,36(r1) return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; ffc32718: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc3271c: 83 c1 00 18 lwz r30,24(r1) ffc32720: 7c 08 03 a6 mtlr r0 ffc32724: 83 e1 00 1c lwz r31,28(r1) ffc32728: 38 21 00 20 addi r1,r1,32 ffc3272c: 4e 80 00 20 blr <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc32730: 4b fd eb e5 bl ffc11314 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc32734: 80 01 00 24 lwz r0,36(r1) _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc32738: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc3273c: 83 c1 00 18 lwz r30,24(r1) ffc32740: 7c 08 03 a6 mtlr r0 ffc32744: 83 e1 00 1c lwz r31,28(r1) ffc32748: 38 21 00 20 addi r1,r1,32 ffc3274c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c88 : ffc08c88: 3d 20 00 00 lis r9,0 */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { ffc08c8c: 94 21 ff f0 stwu r1,-16(r1) ffc08c90: 7c 08 02 a6 mflr r0 ffc08c94: 81 69 27 2c lwz r11,10028(r9) ffc08c98: 93 e1 00 0c stw r31,12(r1) ffc08c9c: 7c 7f 1b 78 mr r31,r3 ffc08ca0: 39 6b 00 01 addi r11,r11,1 ffc08ca4: 90 01 00 14 stw r0,20(r1) ffc08ca8: 93 c1 00 08 stw r30,8(r1) ffc08cac: 91 69 27 2c stw r11,10028(r9) _Thread_Disable_dispatch(); if ( ticks == 0 ) { ffc08cb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc08cb4: 41 9e 00 6c beq- cr7,ffc08d20 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); ffc08cb8: 3f c0 00 00 lis r30,0 ffc08cbc: 80 7e 27 6c lwz r3,10092(r30) <== ALWAYS TAKEN ffc08cc0: 38 80 00 08 li r4,8 ffc08cc4: 48 00 2e 31 bl ffc0baf4 <_Thread_Set_state> <== ALWAYS TAKEN _Watchdog_Initialize( &_Thread_Executing->Timer, ffc08cc8: 81 3e 27 6c lwz r9,10092(r30) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08ccc: 3d 40 ff c1 lis r10,-63 _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( ffc08cd0: 81 69 00 08 lwz r11,8(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08cd4: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc08cd8: 39 4a ad 24 addi r10,r10,-21212 the_watchdog->id = id; the_watchdog->user_data = user_data; ffc08cdc: 90 09 00 6c stw r0,108(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08ce0: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08ce4: 93 e9 00 54 stw r31,84(r9) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08ce8: 38 63 2c a8 addi r3,r3,11432 ffc08cec: 38 89 00 48 addi r4,r9,72 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08cf0: 90 09 00 50 stw r0,80(r9) the_watchdog->routine = routine; ffc08cf4: 91 49 00 64 stw r10,100(r9) the_watchdog->id = id; ffc08cf8: 91 69 00 68 stw r11,104(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08cfc: 48 00 39 25 bl ffc0c620 <_Watchdog_Insert> <== ALWAYS TAKEN _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); ffc08d00: 48 00 22 79 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc08d04: 80 01 00 14 lwz r0,20(r1) ffc08d08: 38 60 00 00 li r3,0 ffc08d0c: 83 c1 00 08 lwz r30,8(r1) ffc08d10: 7c 08 03 a6 mtlr r0 ffc08d14: 83 e1 00 0c lwz r31,12(r1) ffc08d18: 38 21 00 10 addi r1,r1,16 ffc08d1c: 4e 80 00 20 blr <== ALWAYS TAKEN rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); ffc08d20: 48 00 33 0d bl ffc0c02c <_Thread_Yield_processor> <== ALWAYS TAKEN _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); ffc08d24: 48 00 22 55 bl ffc0af78 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc08d28: 80 01 00 14 lwz r0,20(r1) ffc08d2c: 38 60 00 00 li r3,0 ffc08d30: 83 c1 00 08 lwz r30,8(r1) ffc08d34: 7c 08 03 a6 mtlr r0 ffc08d38: 83 e1 00 0c lwz r31,12(r1) ffc08d3c: 38 21 00 10 addi r1,r1,16 ffc08d40: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a0c0 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc0a0c0: 94 21 ff e8 stwu r1,-24(r1) ffc0a0c4: 7c 08 02 a6 mflr r0 Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc0a0c8: 3d 20 00 00 lis r9,0 */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc0a0cc: 90 01 00 1c stw r0,28(r1) Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc0a0d0: 88 09 27 b8 lbz r0,10168(r9) */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc0a0d4: 93 c1 00 10 stw r30,16(r1) ffc0a0d8: 7c 7e 1b 78 mr r30,r3 Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc0a0dc: 2f 80 00 00 cmpwi cr7,r0,0 */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc0a0e0: 93 81 00 08 stw r28,8(r1) Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc0a0e4: 38 00 00 0b li r0,11 */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc0a0e8: 93 a1 00 0c stw r29,12(r1) ffc0a0ec: 93 e1 00 14 stw r31,20(r1) Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc0a0f0: 41 9e 00 28 beq- cr7,ffc0a118 return RTEMS_NOT_DEFINED; if ( !time_buffer ) ffc0a0f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a0f8: 38 00 00 09 li r0,9 ffc0a0fc: 41 9e 00 1c beq- cr7,ffc0a118 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; ffc0a100: 3b e0 00 00 li r31,0 ffc0a104: 93 e3 00 18 stw r31,24(r3) if ( !_TOD_Validate( time_buffer ) ) ffc0a108: 4b ff ef b5 bl ffc090bc <_TOD_Validate> <== ALWAYS TAKEN ffc0a10c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a110: 40 9e 00 2c bne- cr7,ffc0a13c _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc0a114: 38 00 00 14 li r0,20 } ffc0a118: 7c 03 03 78 mr r3,r0 ffc0a11c: 80 01 00 1c lwz r0,28(r1) ffc0a120: 83 81 00 08 lwz r28,8(r1) ffc0a124: 7c 08 03 a6 mtlr r0 ffc0a128: 83 a1 00 0c lwz r29,12(r1) ffc0a12c: 83 c1 00 10 lwz r30,16(r1) ffc0a130: 83 e1 00 14 lwz r31,20(r1) ffc0a134: 38 21 00 18 addi r1,r1,24 ffc0a138: 4e 80 00 20 blr <== ALWAYS TAKEN time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); ffc0a13c: 7f c3 f3 78 mr r3,r30 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc0a140: 3f a0 00 00 lis r29,0 time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); ffc0a144: 4b ff ee d5 bl ffc09018 <_TOD_To_seconds> <== ALWAYS TAKEN if ( seconds <= _TOD_Seconds_since_epoch() ) ffc0a148: 80 1d 27 d0 lwz r0,10192(r29) time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); ffc0a14c: 7c 7e 1b 78 mr r30,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc0a150: 7f 83 00 40 cmplw cr7,r3,r0 ffc0a154: 40 9d ff c0 ble+ cr7,ffc0a114 ffc0a158: 3d 20 00 00 lis r9,0 ffc0a15c: 81 69 27 b0 lwz r11,10160(r9) ffc0a160: 38 0b 00 01 addi r0,r11,1 ffc0a164: 90 09 27 b0 stw r0,10160(r9) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); ffc0a168: 3f 80 00 00 lis r28,0 ffc0a16c: 80 7c 27 f0 lwz r3,10224(r28) ffc0a170: 38 80 00 10 li r4,16 ffc0a174: 48 00 2f bd bl ffc0d130 <_Thread_Set_state> <== ALWAYS TAKEN _Watchdog_Initialize( &_Thread_Executing->Timer, ffc0a178: 81 3c 27 f0 lwz r9,10224(r28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a17c: 3d 60 ff c1 lis r11,-63 if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( ffc0a180: 80 09 00 08 lwz r0,8(r9) ffc0a184: 39 6b c3 60 addi r11,r11,-15520 ffc0a188: 91 69 00 64 stw r11,100(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc0a18c: 3c 60 00 00 lis r3,0 ffc0a190: 38 63 2d 5c addi r3,r3,11612 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc0a194: 90 09 00 68 stw r0,104(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc0a198: 38 89 00 48 addi r4,r9,72 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a19c: 80 1d 27 d0 lwz r0,10192(r29) ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0a1a0: 93 e9 00 6c stw r31,108(r9) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a1a4: 7f c0 f0 50 subf r30,r0,r30 ffc0a1a8: 93 c9 00 54 stw r30,84(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a1ac: 93 e9 00 50 stw r31,80(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc0a1b0: 48 00 3b cd bl ffc0dd7c <_Watchdog_Insert> <== ALWAYS TAKEN ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); ffc0a1b4: 48 00 24 01 bl ffc0c5b4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0a1b8: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc0a1bc: 4b ff ff 5c b ffc0a118 <== ALWAYS TAKEN ffc1a70c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc1a70c: 94 21 ff e8 stwu r1,-24(r1) ffc1a710: 7c 08 02 a6 mflr r0 ffc1a714: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc1a718: 3c 60 00 00 lis r3,0 ffc1a71c: 90 01 00 1c stw r0,28(r1) ffc1a720: 38 63 72 44 addi r3,r3,29252 ffc1a724: 38 a1 00 08 addi r5,r1,8 ffc1a728: 48 00 37 d1 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1a72c: 81 21 00 08 lwz r9,8(r1) ffc1a730: 38 00 00 04 li r0,4 ffc1a734: 2f 89 00 00 cmpwi cr7,r9,0 ffc1a738: 40 9e 00 20 bne- cr7,ffc1a758 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc1a73c: 80 03 00 38 lwz r0,56(r3) ffc1a740: 2f 80 00 04 cmpwi cr7,r0,4 ffc1a744: 41 9e 00 0c beq- cr7,ffc1a750 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1a748: 38 63 00 10 addi r3,r3,16 ffc1a74c: 48 00 61 05 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc1a750: 48 00 43 e9 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1a754: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a758: 7c 03 03 78 mr r3,r0 ffc1a75c: 80 01 00 1c lwz r0,28(r1) ffc1a760: 38 21 00 18 addi r1,r1,24 ffc1a764: 7c 08 03 a6 mtlr r0 ffc1a768: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1a76c : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { ffc1a76c: 94 21 ff e8 stwu r1,-24(r1) ffc1a770: 7c 08 02 a6 mflr r0 ffc1a774: 93 e1 00 14 stw r31,20(r1) Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) ffc1a778: 7c 7f 1b 79 mr. r31,r3 ffc1a77c: 38 60 00 03 li r3,3 rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { ffc1a780: 93 c1 00 10 stw r30,16(r1) ffc1a784: 7c 9e 23 78 mr r30,r4 ffc1a788: 90 01 00 1c stw r0,28(r1) ffc1a78c: 93 a1 00 0c stw r29,12(r1) Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) ffc1a790: 41 82 00 74 beq- ffc1a804 return RTEMS_INVALID_NAME; if ( !id ) ffc1a794: 2f 84 00 00 cmpwi cr7,r4,0 <== ALWAYS TAKEN ffc1a798: 38 60 00 09 li r3,9 ffc1a79c: 41 9e 00 68 beq- cr7,ffc1a804 ffc1a7a0: 3d 20 00 00 lis r9,0 ffc1a7a4: 81 69 28 24 lwz r11,10276(r9) ffc1a7a8: 38 0b 00 01 addi r0,r11,1 ffc1a7ac: 90 09 28 24 stw r0,10276(r9) * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); ffc1a7b0: 3f a0 00 00 lis r29,0 ffc1a7b4: 3b bd 72 44 addi r29,r29,29252 ffc1a7b8: 7f a3 eb 78 mr r3,r29 ffc1a7bc: 48 00 30 f5 bl ffc1d8b0 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { ffc1a7c0: 2c 03 00 00 cmpwi r3,0 ffc1a7c4: 41 82 00 5c beq- ffc1a820 ffc1a7c8: 81 23 00 08 lwz r9,8(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1a7cc: 38 00 00 00 li r0,0 ffc1a7d0: 81 5d 00 1c lwz r10,28(r29) ffc1a7d4: 55 2b 13 ba rlwinm r11,r9,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc1a7d8: 93 e3 00 0c stw r31,12(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc1a7dc: 7c 6a 59 2e stwx r3,r10,r11 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; ffc1a7e0: 39 60 00 04 li r11,4 the_watchdog->routine = routine; the_watchdog->id = id; ffc1a7e4: 90 03 00 30 stw r0,48(r3) ffc1a7e8: 91 63 00 38 stw r11,56(r3) the_watchdog->user_data = user_data; ffc1a7ec: 90 03 00 34 stw r0,52(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1a7f0: 90 03 00 18 stw r0,24(r3) the_watchdog->routine = routine; ffc1a7f4: 90 03 00 2c stw r0,44(r3) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; ffc1a7f8: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc1a7fc: 48 00 43 3d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1a800: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc1a804: 80 01 00 1c lwz r0,28(r1) ffc1a808: 83 a1 00 0c lwz r29,12(r1) ffc1a80c: 7c 08 03 a6 mtlr r0 ffc1a810: 83 c1 00 10 lwz r30,16(r1) ffc1a814: 83 e1 00 14 lwz r31,20(r1) ffc1a818: 38 21 00 18 addi r1,r1,24 ffc1a81c: 4e 80 00 20 blr <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); ffc1a820: 48 00 43 19 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc1a824: 80 01 00 1c lwz r0,28(r1) _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); ffc1a828: 38 60 00 05 li r3,5 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc1a82c: 83 a1 00 0c lwz r29,12(r1) ffc1a830: 7c 08 03 a6 mtlr r0 ffc1a834: 83 c1 00 10 lwz r30,16(r1) ffc1a838: 83 e1 00 14 lwz r31,20(r1) ffc1a83c: 38 21 00 18 addi r1,r1,24 ffc1a840: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1a844 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { ffc1a844: 94 21 ff e0 stwu r1,-32(r1) ffc1a848: 7c 08 02 a6 mflr r0 ffc1a84c: 7c 64 1b 78 mr r4,r3 ffc1a850: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc1a854: 3f e0 00 00 lis r31,0 ffc1a858: 3b ff 72 44 addi r31,r31,29252 ffc1a85c: 7f e3 fb 78 mr r3,r31 ffc1a860: 90 01 00 24 stw r0,36(r1) ffc1a864: 38 a1 00 08 addi r5,r1,8 ffc1a868: 93 c1 00 18 stw r30,24(r1) ffc1a86c: 48 00 36 8d bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN ffc1a870: 7c 7e 1b 78 mr r30,r3 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1a874: 80 01 00 08 lwz r0,8(r1) ffc1a878: 38 60 00 04 li r3,4 ffc1a87c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a880: 40 9e 00 2c bne- cr7,ffc1a8ac case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); ffc1a884: 7f c4 f3 78 mr r4,r30 ffc1a888: 7f e3 fb 78 mr r3,r31 ffc1a88c: 48 00 30 ed bl ffc1d978 <_Objects_Close> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1a890: 38 7e 00 10 addi r3,r30,16 ffc1a894: 48 00 5f bd bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); ffc1a898: 7f e3 fb 78 mr r3,r31 ffc1a89c: 7f c4 f3 78 mr r4,r30 ffc1a8a0: 48 00 34 31 bl ffc1dcd0 <_Objects_Free> <== ALWAYS TAKEN _Timer_Free( the_timer ); _Thread_Enable_dispatch(); ffc1a8a4: 48 00 42 95 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1a8a8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a8ac: 80 01 00 24 lwz r0,36(r1) ffc1a8b0: 83 c1 00 18 lwz r30,24(r1) ffc1a8b4: 7c 08 03 a6 mtlr r0 ffc1a8b8: 83 e1 00 1c lwz r31,28(r1) ffc1a8bc: 38 21 00 20 addi r1,r1,32 ffc1a8c0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1a8c4 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1a8c4: 94 21 ff d0 stwu r1,-48(r1) ffc1a8c8: 7c 08 02 a6 mflr r0 ffc1a8cc: 93 a1 00 24 stw r29,36(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) ffc1a8d0: 7c 9d 23 79 mr. r29,r4 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1a8d4: 93 81 00 20 stw r28,32(r1) ffc1a8d8: 7c dc 33 78 mr r28,r6 ffc1a8dc: 93 c1 00 28 stw r30,40(r1) ffc1a8e0: 7c 7e 1b 78 mr r30,r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) ffc1a8e4: 38 60 00 0a li r3,10 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1a8e8: 93 e1 00 2c stw r31,44(r1) ffc1a8ec: 7c bf 2b 78 mr r31,r5 ffc1a8f0: 90 01 00 34 stw r0,52(r1) ffc1a8f4: 93 41 00 18 stw r26,24(r1) ffc1a8f8: 93 61 00 1c stw r27,28(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) ffc1a8fc: 41 82 00 38 beq- ffc1a934 return RTEMS_INVALID_NUMBER; if ( !routine ) ffc1a900: 2f 85 00 00 cmpwi cr7,r5,0 ffc1a904: 38 60 00 09 li r3,9 ffc1a908: 41 9e 00 2c beq- cr7,ffc1a934 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc1a90c: 3c 60 00 00 lis r3,0 ffc1a910: 38 63 72 44 addi r3,r3,29252 ffc1a914: 7f c4 f3 78 mr r4,r30 ffc1a918: 38 a1 00 08 addi r5,r1,8 ffc1a91c: 48 00 35 dd bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1a920: 80 01 00 08 lwz r0,8(r1) ffc1a924: 7c 7b 1b 78 mr r27,r3 ffc1a928: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a92c: 38 60 00 04 li r3,4 ffc1a930: 41 9e 00 2c beq- cr7,ffc1a95c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a934: 80 01 00 34 lwz r0,52(r1) ffc1a938: 83 41 00 18 lwz r26,24(r1) ffc1a93c: 7c 08 03 a6 mtlr r0 ffc1a940: 83 61 00 1c lwz r27,28(r1) ffc1a944: 83 81 00 20 lwz r28,32(r1) ffc1a948: 83 a1 00 24 lwz r29,36(r1) ffc1a94c: 83 c1 00 28 lwz r30,40(r1) ffc1a950: 83 e1 00 2c lwz r31,44(r1) ffc1a954: 38 21 00 30 addi r1,r1,48 ffc1a958: 4e 80 00 20 blr <== ALWAYS TAKEN the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1a95c: 3b 5b 00 10 addi r26,r27,16 ffc1a960: 7f 43 d3 78 mr r3,r26 ffc1a964: 48 00 5e ed bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a968: 7d 20 00 a6 mfmsr r9 ffc1a96c: 7c 10 42 a6 mfsprg r0,0 ffc1a970: 7d 20 00 78 andc r0,r9,r0 ffc1a974: 7c 00 01 24 mtmsr r0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { ffc1a978: 80 1b 00 18 lwz r0,24(r27) ffc1a97c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a980: 40 9e 00 60 bne- cr7,ffc1a9e0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1a984: 90 1b 00 18 stw r0,24(r27) the_watchdog->routine = routine; ffc1a988: 93 fb 00 2c stw r31,44(r27) the_watchdog->id = id; ffc1a98c: 93 db 00 30 stw r30,48(r27) the_watchdog->user_data = user_data; ffc1a990: 93 9b 00 34 stw r28,52(r27) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; ffc1a994: 90 1b 00 38 stw r0,56(r27) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a998: 7d 20 01 24 mtmsr r9 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1a99c: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc1a9a0: 93 bb 00 1c stw r29,28(r27) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1a9a4: 38 63 70 e8 addi r3,r3,28904 ffc1a9a8: 7f 44 d3 78 mr r4,r26 ffc1a9ac: 48 00 5c dd bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); ffc1a9b0: 48 00 41 89 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a9b4: 80 01 00 34 lwz r0,52(r1) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); ffc1a9b8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a9bc: 83 41 00 18 lwz r26,24(r1) ffc1a9c0: 7c 08 03 a6 mtlr r0 ffc1a9c4: 83 61 00 1c lwz r27,28(r1) ffc1a9c8: 83 81 00 20 lwz r28,32(r1) ffc1a9cc: 83 a1 00 24 lwz r29,36(r1) ffc1a9d0: 83 c1 00 28 lwz r30,40(r1) ffc1a9d4: 83 e1 00 2c lwz r31,44(r1) ffc1a9d8: 38 21 00 30 addi r1,r1,48 ffc1a9dc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1a9e0: 7d 20 01 24 mtmsr r9 * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); _Thread_Enable_dispatch(); ffc1a9e4: 48 00 41 55 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1a9e8: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1a9ec: 4b ff ff 48 b ffc1a934 <== ALWAYS TAKEN ffc1a9f0 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1a9f0: 94 21 ff c0 stwu r1,-64(r1) ffc1a9f4: 7c 08 02 a6 mflr r0 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc1a9f8: 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 ) { ffc1a9fc: 90 01 00 44 stw r0,68(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc1aa00: 88 09 28 2c lbz r0,10284(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1aa04: 93 a1 00 34 stw r29,52(r1) ffc1aa08: 7c dd 33 78 mr r29,r6 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc1aa0c: 2f 80 00 00 cmpwi cr7,r0,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1aa10: 93 c1 00 38 stw r30,56(r1) ffc1aa14: 7c 7e 1b 78 mr r30,r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc1aa18: 38 60 00 0b li r3,11 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1aa1c: 93 e1 00 3c stw r31,60(r1) ffc1aa20: 7c bf 2b 78 mr r31,r5 ffc1aa24: 93 01 00 20 stw r24,32(r1) ffc1aa28: 93 21 00 24 stw r25,36(r1) ffc1aa2c: 93 41 00 28 stw r26,40(r1) ffc1aa30: 93 61 00 2c stw r27,44(r1) ffc1aa34: 93 81 00 30 stw r28,48(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc1aa38: 40 9e 00 34 bne- cr7,ffc1aa6c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1aa3c: 80 01 00 44 lwz r0,68(r1) ffc1aa40: 83 01 00 20 lwz r24,32(r1) ffc1aa44: 7c 08 03 a6 mtlr r0 ffc1aa48: 83 21 00 24 lwz r25,36(r1) ffc1aa4c: 83 41 00 28 lwz r26,40(r1) ffc1aa50: 83 61 00 2c lwz r27,44(r1) ffc1aa54: 83 81 00 30 lwz r28,48(r1) ffc1aa58: 83 a1 00 34 lwz r29,52(r1) ffc1aa5c: 83 c1 00 38 lwz r30,56(r1) ffc1aa60: 83 e1 00 3c lwz r31,60(r1) ffc1aa64: 38 21 00 40 addi r1,r1,64 ffc1aa68: 4e 80 00 20 blr <== ALWAYS TAKEN rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) ffc1aa6c: 7c 83 23 78 mr r3,r4 ffc1aa70: 90 81 00 18 stw r4,24(r1) ffc1aa74: 4b ff c2 e1 bl ffc16d54 <_TOD_Validate> <== ALWAYS TAKEN ffc1aa78: 2f 83 00 00 cmpwi cr7,r3,0 ffc1aa7c: 80 81 00 18 lwz r4,24(r1) ffc1aa80: 41 9e 00 2c beq- cr7,ffc1aaac return RTEMS_INVALID_CLOCK; if ( !routine ) ffc1aa84: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1aa88: 38 60 00 09 li r3,9 ffc1aa8c: 41 be ff b0 beq- cr7,ffc1aa3c return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); ffc1aa90: 7c 83 23 78 mr r3,r4 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1aa94: 3f 60 00 00 lis r27,0 <== ALWAYS TAKEN return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); ffc1aa98: 4b ff c2 19 bl ffc16cb0 <_TOD_To_seconds> <== ALWAYS TAKEN if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1aa9c: 80 1b 28 44 lwz r0,10308(r27) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); ffc1aaa0: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1aaa4: 7f 83 00 40 cmplw cr7,r3,r0 ffc1aaa8: 41 9d 00 38 bgt- cr7,ffc1aae0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1aaac: 80 01 00 44 lwz r0,68(r1) _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1aab0: 38 60 00 14 li r3,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1aab4: 83 01 00 20 lwz r24,32(r1) ffc1aab8: 7c 08 03 a6 mtlr r0 ffc1aabc: 83 21 00 24 lwz r25,36(r1) ffc1aac0: 83 41 00 28 lwz r26,40(r1) ffc1aac4: 83 61 00 2c lwz r27,44(r1) ffc1aac8: 83 81 00 30 lwz r28,48(r1) ffc1aacc: 83 a1 00 34 lwz r29,52(r1) ffc1aad0: 83 c1 00 38 lwz r30,56(r1) ffc1aad4: 83 e1 00 3c lwz r31,60(r1) ffc1aad8: 38 21 00 40 addi r1,r1,64 ffc1aadc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1aae0: 3c 60 00 00 lis r3,0 ffc1aae4: 38 63 72 44 addi r3,r3,29252 ffc1aae8: 7f c4 f3 78 mr r4,r30 ffc1aaec: 38 a1 00 08 addi r5,r1,8 ffc1aaf0: 48 00 34 09 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1aaf4: 83 21 00 08 lwz r25,8(r1) ffc1aaf8: 7c 7a 1b 78 mr r26,r3 ffc1aafc: 2f 99 00 00 cmpwi cr7,r25,0 ffc1ab00: 38 60 00 04 li r3,4 ffc1ab04: 40 be ff 38 bne- cr7,ffc1aa3c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1ab08: 3b 1a 00 10 addi r24,r26,16 ffc1ab0c: 7f 03 c3 78 mr r3,r24 ffc1ab10: 48 00 5d 41 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc1ab14: 93 da 00 30 stw r30,48(r26) the_timer->the_class = TIMER_TIME_OF_DAY; ffc1ab18: 39 20 00 02 li r9,2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc1ab1c: 80 1b 28 44 lwz r0,10308(r27) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc1ab20: 3c 60 00 00 lis r3,0 ffc1ab24: 91 3a 00 38 stw r9,56(r26) ffc1ab28: 38 63 70 dc addi r3,r3,28892 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc1ab2c: 7f 80 e0 50 subf r28,r0,r28 ffc1ab30: 93 9a 00 1c stw r28,28(r26) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc1ab34: 7f 04 c3 78 mr r4,r24 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1ab38: 93 3a 00 18 stw r25,24(r26) the_watchdog->routine = routine; ffc1ab3c: 93 fa 00 2c stw r31,44(r26) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc1ab40: 93 ba 00 34 stw r29,52(r26) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc1ab44: 48 00 5b 45 bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); ffc1ab48: 48 00 3f f1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1ab4c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1ab50: 4b ff fe ec b ffc1aa3c <== ALWAYS TAKEN ffc1ab54 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { ffc1ab54: 94 21 ff e0 stwu r1,-32(r1) ffc1ab58: 7c 08 02 a6 mflr r0 ffc1ab5c: 93 e1 00 1c stw r31,28(r1) Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) ffc1ab60: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { ffc1ab64: 7c 64 1b 78 mr r4,r3 ffc1ab68: 90 01 00 24 stw r0,36(r1) Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) ffc1ab6c: 38 60 00 09 li r3,9 ffc1ab70: 41 82 00 28 beq- ffc1ab98 ffc1ab74: 3c 60 00 00 lis r3,0 ffc1ab78: 38 63 72 44 addi r3,r3,29252 ffc1ab7c: 38 a1 00 08 addi r5,r1,8 ffc1ab80: 48 00 33 79 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1ab84: 80 01 00 08 lwz r0,8(r1) ffc1ab88: 7c 69 1b 78 mr r9,r3 ffc1ab8c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ab90: 38 60 00 04 li r3,4 ffc1ab94: 41 9e 00 18 beq- cr7,ffc1abac case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1ab98: 80 01 00 24 lwz r0,36(r1) ffc1ab9c: 83 e1 00 1c lwz r31,28(r1) ffc1aba0: 38 21 00 20 addi r1,r1,32 ffc1aba4: 7c 08 03 a6 mtlr r0 ffc1aba8: 4e 80 00 20 blr <== ALWAYS TAKEN the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; ffc1abac: 80 09 00 1c lwz r0,28(r9) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; ffc1abb0: 81 69 00 38 lwz r11,56(r9) the_info->initial = the_timer->Ticker.initial; ffc1abb4: 90 1f 00 04 stw r0,4(r31) the_info->start_time = the_timer->Ticker.start_time; ffc1abb8: 80 09 00 24 lwz r0,36(r9) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; ffc1abbc: 91 7f 00 00 stw r11,0(r31) the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; ffc1abc0: 90 1f 00 08 stw r0,8(r31) the_info->stop_time = the_timer->Ticker.stop_time; ffc1abc4: 80 09 00 28 lwz r0,40(r9) ffc1abc8: 90 1f 00 0c stw r0,12(r31) _Thread_Enable_dispatch(); ffc1abcc: 48 00 3f 6d bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1abd0: 80 01 00 24 lwz r0,36(r1) case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; the_info->stop_time = the_timer->Ticker.stop_time; _Thread_Enable_dispatch(); ffc1abd4: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1abd8: 83 e1 00 1c lwz r31,28(r1) ffc1abdc: 7c 08 03 a6 mtlr r0 ffc1abe0: 38 21 00 20 addi r1,r1,32 ffc1abe4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1abe8 : rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id ) { ffc1abe8: 94 21 ff f8 stwu r1,-8(r1) ffc1abec: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1abf0: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id ) { ffc1abf4: 90 01 00 0c stw r0,12(r1) ffc1abf8: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1abfc: 3c 60 00 00 lis r3,0 rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id ) { ffc1ac00: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1ac04: 38 63 72 44 addi r3,r3,29252 ffc1ac08: 7c 04 03 78 mr r4,r0 ffc1ac0c: 60 a5 ff ff ori r5,r5,65535 ffc1ac10: 48 00 35 35 bl ffc1e144 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc1ac14: 80 01 00 0c lwz r0,12(r1) ffc1ac18: 3d 20 ff c4 lis r9,-60 ffc1ac1c: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1ac20: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc1ac24: 39 29 bd 9c addi r9,r9,-16996 ffc1ac28: 7c 69 18 2e lwzx r3,r9,r3 ffc1ac2c: 38 21 00 08 addi r1,r1,8 ffc1ac30: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1af68 : ffc1af68: 2c 03 00 00 cmpwi r3,0 rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { ffc1af6c: 94 21 ff d0 stwu r1,-48(r1) ffc1af70: 7c 08 02 a6 mflr r0 ffc1af74: 93 61 00 1c stw r27,28(r1) ffc1af78: 7c bb 2b 78 mr r27,r5 ffc1af7c: 93 81 00 20 stw r28,32(r1) ffc1af80: 7c 9c 23 78 mr r28,r4 ffc1af84: 90 01 00 34 stw r0,52(r1) ffc1af88: 93 41 00 18 stw r26,24(r1) ffc1af8c: 93 a1 00 24 stw r29,36(r1) ffc1af90: 93 c1 00 28 stw r30,40(r1) ffc1af94: 93 e1 00 2c stw r31,44(r1) ffc1af98: 40 82 00 34 bne- ffc1afcc if (status) { initialized = false; } #endif return status; ffc1af9c: 38 00 00 13 li r0,19 } ffc1afa0: 7c 03 03 78 mr r3,r0 ffc1afa4: 80 01 00 34 lwz r0,52(r1) ffc1afa8: 83 41 00 18 lwz r26,24(r1) ffc1afac: 7c 08 03 a6 mtlr r0 ffc1afb0: 83 61 00 1c lwz r27,28(r1) ffc1afb4: 83 81 00 20 lwz r28,32(r1) ffc1afb8: 83 a1 00 24 lwz r29,36(r1) ffc1afbc: 83 c1 00 28 lwz r30,40(r1) ffc1afc0: 83 e1 00 2c lwz r31,44(r1) ffc1afc4: 38 21 00 30 addi r1,r1,48 ffc1afc8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1afcc: 3d 20 00 00 lis r9,0 ffc1afd0: 88 09 26 e4 lbz r0,9956(r9) ffc1afd4: 7f 83 00 40 cmplw cr7,r3,r0 ffc1afd8: 40 9d 00 9c ble- cr7,ffc1b074 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) ffc1afdc: 2f 83 ff ff cmpwi cr7,r3,-1 ffc1afe0: 3b 40 00 00 li r26,0 ffc1afe4: 40 be ff b8 bne- cr7,ffc1af9c ffc1afe8: 3d 20 00 00 lis r9,0 ffc1afec: 81 69 28 24 lwz r11,10276(r9) ffc1aff0: 38 0b 00 01 addi r0,r11,1 ffc1aff4: 90 09 28 24 stw r0,10276(r9) /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; ffc1aff8: 3f c0 00 00 lis r30,0 ffc1affc: 8b be 29 f0 lbz r29,10736(r30) <== ALWAYS TAKEN initialized = true; ffc1b000: 38 00 00 01 li r0,1 ffc1b004: 98 1e 29 f0 stb r0,10736(r30) _Thread_Enable_dispatch(); ffc1b008: 48 00 3b 31 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN if ( tmpInitialized ) ffc1b00c: 2f 9d 00 00 cmpwi cr7,r29,0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; ffc1b010: 3b fe 29 f0 addi r31,r30,10736 initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) ffc1b014: 38 00 00 0e li r0,14 ffc1b018: 40 9e ff 88 bne+ cr7,ffc1afa0 * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( ffc1b01c: 3c 60 54 49 lis r3,21577 ffc1b020: 60 63 4d 45 ori r3,r3,19781 ffc1b024: 7f 44 d3 78 mr r4,r26 ffc1b028: 7f 85 e3 78 mr r5,r28 ffc1b02c: 63 67 80 00 ori r7,r27,32768 ffc1b030: 38 c0 01 00 li r6,256 ffc1b034: 39 01 00 08 addi r8,r1,8 ffc1b038: 4b ff ea 8d bl ffc19ac4 <== ALWAYS TAKEN /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { ffc1b03c: 7c 60 1b 79 mr. r0,r3 ffc1b040: 41 82 00 3c beq- ffc1b07c initialized = false; } #endif return status; } ffc1b044: 7c 03 03 78 mr r3,r0 ffc1b048: 80 01 00 34 lwz r0,52(r1) /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; ffc1b04c: 9b be 29 f0 stb r29,10736(r30) initialized = false; } #endif return status; } ffc1b050: 7c 08 03 a6 mtlr r0 ffc1b054: 83 41 00 18 lwz r26,24(r1) ffc1b058: 83 61 00 1c lwz r27,28(r1) ffc1b05c: 83 81 00 20 lwz r28,32(r1) ffc1b060: 83 a1 00 24 lwz r29,36(r1) ffc1b064: 83 c1 00 28 lwz r30,40(r1) ffc1b068: 83 e1 00 2c lwz r31,44(r1) ffc1b06c: 38 21 00 30 addi r1,r1,48 ffc1b070: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b074: 7c 7a 1b 78 mr r26,r3 ffc1b078: 4b ff ff 70 b ffc1afe8 <== ALWAYS TAKEN /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( ffc1b07c: 81 61 00 08 lwz r11,8(r1) ffc1b080: 3d 20 00 00 lis r9,0 ffc1b084: 81 49 6f 88 lwz r10,28552(r9) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1b088: 38 ff 00 70 addi r7,r31,112 ffc1b08c: 55 69 13 ba rlwinm r9,r11,2,14,29 the_chain->permanent_null = NULL; ffc1b090: 90 1f 00 38 stw r0,56(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1b094: 3b bf 00 38 addi r29,r31,56 ffc1b098: 7d 4a 48 2e lwzx r10,r10,r9 ffc1b09c: 7f e9 fb 78 mr r9,r31 the_chain->permanent_null = NULL; ffc1b0a0: 90 1f 00 70 stw r0,112(r31) _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( ffc1b0a4: 3c 80 ff c2 lis r4,-62 ffc1b0a8: 7d 63 5b 78 mr r3,r11 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( ffc1b0ac: 95 49 00 04 stwu r10,4(r9) * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ffc1b0b0: 3d 40 00 00 lis r10,0 _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( ffc1b0b4: 38 84 b2 60 addi r4,r4,-19872 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ffc1b0b8: 83 8a 28 7c lwz r28,10364(r10) the_chain->last = _Chain_Head(the_chain); ffc1b0bc: 39 09 00 68 addi r8,r9,104 ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1b0c0: 3d 40 00 00 lis r10,0 ffc1b0c4: 91 1f 00 74 stw r8,116(r31) /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ffc1b0c8: 3d 00 ff c2 lis r8,-62 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1b0cc: 83 ca 28 44 lwz r30,10308(r10) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc1b0d0: 3d 40 ff c2 lis r10,-62 ffc1b0d4: 39 4a e8 e4 addi r10,r10,-5916 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ffc1b0d8: 93 9f 00 40 stw r28,64(r31) ffc1b0dc: 38 c9 00 30 addi r6,r9,48 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ffc1b0e0: 39 08 b4 b8 addi r8,r8,-19272 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1b0e4: 93 df 00 78 stw r30,120(r31) _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( ffc1b0e8: 7d 25 4b 78 mr r5,r9 ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; ffc1b0ec: 90 1f 00 7c stw r0,124(r31) /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ffc1b0f0: 91 1f 00 08 stw r8,8(r31) ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; ffc1b0f4: 3d 00 00 00 lis r8,0 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; ts->active = false; ffc1b0f8: 98 1f 00 80 stb r0,128(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1b0fc: 90 1f 00 14 stw r0,20(r31) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc1b100: 90 1f 00 30 stw r0,48(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1b104: 90 1f 00 4c stw r0,76(r31) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc1b108: 90 1f 00 68 stw r0,104(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1b10c: 93 bf 00 34 stw r29,52(r31) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc1b110: 90 df 00 3c stw r6,60(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1b114: 90 ff 00 6c stw r7,108(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc1b118: 91 5f 00 60 stw r10,96(r31) ffc1b11c: 91 5f 00 28 stw r10,40(r31) the_watchdog->id = id; ffc1b120: 91 7f 00 2c stw r11,44(r31) ffc1b124: 91 7f 00 64 stw r11,100(r31) /* * The default timer server is now available. */ _Timer_server = ts; ffc1b128: 91 28 28 a4 stw r9,10404(r8) /* * Start the timer server */ status = rtems_task_start( ffc1b12c: 4b ff f3 19 bl ffc1a444 <== ALWAYS TAKEN ffc1b130: 7c 60 1b 78 mr r0,r3 if (status) { initialized = false; } #endif return status; ffc1b134: 4b ff fe 6c b ffc1afa0 <== ALWAYS TAKEN ffc1ac34 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { ffc1ac34: 94 21 ff e0 stwu r1,-32(r1) ffc1ac38: 7c 08 02 a6 mflr r0 ffc1ac3c: 7c 64 1b 78 mr r4,r3 ffc1ac40: 3c 60 00 00 lis r3,0 ffc1ac44: 90 01 00 24 stw r0,36(r1) ffc1ac48: 38 63 72 44 addi r3,r3,29252 ffc1ac4c: 38 a1 00 08 addi r5,r1,8 ffc1ac50: 93 c1 00 18 stw r30,24(r1) ffc1ac54: 93 e1 00 1c stw r31,28(r1) ffc1ac58: 48 00 32 a1 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN ffc1ac5c: 7c 7e 1b 78 mr r30,r3 Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1ac60: 80 01 00 08 lwz r0,8(r1) ffc1ac64: 3b e0 00 04 li r31,4 ffc1ac68: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ac6c: 40 9e 00 20 bne- cr7,ffc1ac8c case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { ffc1ac70: 80 03 00 38 lwz r0,56(r3) ffc1ac74: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ac78: 41 9e 00 30 beq- cr7,ffc1aca8 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1ac7c: 2f 80 00 01 cmpwi cr7,r0,1 ffc1ac80: 3b e0 00 0b li r31,11 ffc1ac84: 41 9e 00 4c beq- cr7,ffc1acd0 * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); ffc1ac88: 48 00 3e b1 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1ac8c: 80 01 00 24 lwz r0,36(r1) ffc1ac90: 7f e3 fb 78 mr r3,r31 ffc1ac94: 83 c1 00 18 lwz r30,24(r1) ffc1ac98: 7c 08 03 a6 mtlr r0 ffc1ac9c: 83 e1 00 1c lwz r31,28(r1) ffc1aca0: 38 21 00 20 addi r1,r1,32 ffc1aca4: 4e 80 00 20 blr <== ALWAYS TAKEN the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); ffc1aca8: 3b c3 00 10 addi r30,r3,16 ffc1acac: 7f c3 f3 78 mr r3,r30 ffc1acb0: 48 00 5b a1 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); ffc1acb4: 3c 60 00 00 lis r3,0 ffc1acb8: 38 63 70 e8 addi r3,r3,28904 ffc1acbc: 7f c4 f3 78 mr r4,r30 ffc1acc0: 48 00 59 c9 bl ffc20688 <_Watchdog_Insert> <== ALWAYS TAKEN ffc1acc4: 3b e0 00 00 li r31,0 * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); ffc1acc8: 48 00 3e 71 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1accc: 4b ff ff c0 b ffc1ac8c <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; ffc1acd0: 3d 20 00 00 lis r9,0 ffc1acd4: 83 e9 28 a4 lwz r31,10404(r9) if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); ffc1acd8: 38 63 00 10 addi r3,r3,16 ffc1acdc: 48 00 5b 75 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1ace0: 7f c4 f3 78 mr r4,r30 ffc1ace4: 80 1f 00 04 lwz r0,4(r31) ffc1ace8: 7f e3 fb 78 mr r3,r31 ffc1acec: 3b e0 00 00 li r31,0 ffc1acf0: 7c 09 03 a6 mtctr r0 ffc1acf4: 4e 80 04 21 bctrl <== ALWAYS TAKEN * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); ffc1acf8: 48 00 3e 41 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1acfc: 4b ff ff 90 b ffc1ac8c <== ALWAYS TAKEN ffc1ad00 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ad00: 94 21 ff d0 stwu r1,-48(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; ffc1ad04: 3d 20 00 00 lis r9,0 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ad08: 7c 08 02 a6 mflr r0 ffc1ad0c: 93 e1 00 2c stw r31,44(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; ffc1ad10: 83 e9 28 a4 lwz r31,10404(r9) rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ad14: 93 61 00 1c stw r27,28(r1) ffc1ad18: 7c db 33 78 mr r27,r6 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1ad1c: 2f 9f 00 00 cmpwi cr7,r31,0 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ad20: 93 81 00 20 stw r28,32(r1) ffc1ad24: 7c 7c 1b 78 mr r28,r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1ad28: 38 60 00 0e li r3,14 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ad2c: 93 a1 00 24 stw r29,36(r1) ffc1ad30: 7c 9d 23 78 mr r29,r4 ffc1ad34: 93 c1 00 28 stw r30,40(r1) ffc1ad38: 7c be 2b 78 mr r30,r5 ffc1ad3c: 90 01 00 34 stw r0,52(r1) ffc1ad40: 93 41 00 18 stw r26,24(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1ad44: 41 9e 00 1c beq- cr7,ffc1ad60 return RTEMS_INCORRECT_STATE; if ( !routine ) ffc1ad48: 2f 85 00 00 cmpwi cr7,r5,0 ffc1ad4c: 38 60 00 09 li r3,9 ffc1ad50: 41 9e 00 10 beq- cr7,ffc1ad60 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) ffc1ad54: 2f 84 00 00 cmpwi cr7,r4,0 ffc1ad58: 38 60 00 0a li r3,10 ffc1ad5c: 40 9e 00 2c bne- cr7,ffc1ad88 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1ad60: 80 01 00 34 lwz r0,52(r1) ffc1ad64: 83 41 00 18 lwz r26,24(r1) ffc1ad68: 7c 08 03 a6 mtlr r0 ffc1ad6c: 83 61 00 1c lwz r27,28(r1) ffc1ad70: 83 81 00 20 lwz r28,32(r1) ffc1ad74: 83 a1 00 24 lwz r29,36(r1) ffc1ad78: 83 c1 00 28 lwz r30,40(r1) ffc1ad7c: 83 e1 00 2c lwz r31,44(r1) ffc1ad80: 38 21 00 30 addi r1,r1,48 ffc1ad84: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1ad88: 3c 60 00 00 lis r3,0 ffc1ad8c: 38 63 72 44 addi r3,r3,29252 ffc1ad90: 7f 84 e3 78 mr r4,r28 ffc1ad94: 38 a1 00 08 addi r5,r1,8 ffc1ad98: 48 00 31 61 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1ad9c: 80 01 00 08 lwz r0,8(r1) ffc1ada0: 7c 7a 1b 78 mr r26,r3 <== ALWAYS TAKEN ffc1ada4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ada8: 38 60 00 04 li r3,4 ffc1adac: 40 be ff b4 bne- cr7,ffc1ad60 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1adb0: 38 7a 00 10 addi r3,r26,16 ffc1adb4: 48 00 5a 9d bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1adb8: 7d 20 00 a6 mfmsr r9 ffc1adbc: 7c 10 42 a6 mfsprg r0,0 ffc1adc0: 7d 20 00 78 andc r0,r9,r0 ffc1adc4: 7c 00 01 24 mtmsr r0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { ffc1adc8: 80 1a 00 18 lwz r0,24(r26) ffc1adcc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1add0: 40 9e 00 44 bne- cr7,ffc1ae14 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; ffc1add4: 39 60 00 01 li r11,1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1add8: 90 1a 00 18 stw r0,24(r26) ffc1addc: 91 7a 00 38 stw r11,56(r26) the_watchdog->routine = routine; ffc1ade0: 93 da 00 2c stw r30,44(r26) the_watchdog->id = id; ffc1ade4: 93 9a 00 30 stw r28,48(r26) the_watchdog->user_data = user_data; ffc1ade8: 93 7a 00 34 stw r27,52(r26) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; ffc1adec: 93 ba 00 1c stw r29,28(r26) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1adf0: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1adf4: 80 1f 00 04 lwz r0,4(r31) ffc1adf8: 7f e3 fb 78 mr r3,r31 ffc1adfc: 7f 44 d3 78 mr r4,r26 ffc1ae00: 7c 09 03 a6 mtctr r0 ffc1ae04: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc1ae08: 48 00 3d 31 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1ae0c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1ae10: 4b ff ff 50 b ffc1ad60 <== ALWAYS TAKEN ffc1ae14: 7d 20 01 24 mtmsr r9 * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); _Thread_Enable_dispatch(); ffc1ae18: 48 00 3d 21 bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1ae1c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1ae20: 4b ff ff 40 b ffc1ad60 <== ALWAYS TAKEN ffc1ae24 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ae24: 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; ffc1ae28: 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 ) { ffc1ae2c: 7c 08 02 a6 mflr r0 ffc1ae30: 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; ffc1ae34: 83 e9 28 a4 lwz r31,10404(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ae38: 93 61 00 24 stw r27,36(r1) ffc1ae3c: 7c db 33 78 mr r27,r6 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1ae40: 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 ) { ffc1ae44: 93 81 00 28 stw r28,40(r1) ffc1ae48: 7c 9c 23 78 mr r28,r4 ffc1ae4c: 93 a1 00 2c stw r29,44(r1) ffc1ae50: 7c 7d 1b 78 mr r29,r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1ae54: 38 60 00 0e li r3,14 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1ae58: 93 c1 00 30 stw r30,48(r1) ffc1ae5c: 7c be 2b 78 mr r30,r5 ffc1ae60: 90 01 00 3c stw r0,60(r1) ffc1ae64: 93 01 00 18 stw r24,24(r1) ffc1ae68: 93 21 00 1c stw r25,28(r1) ffc1ae6c: 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 ) ffc1ae70: 41 9e 00 38 beq- cr7,ffc1aea8 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1ae74: 3d 20 00 00 lis r9,0 ffc1ae78: 88 09 28 2c lbz r0,10284(r9) ffc1ae7c: 38 60 00 0b li r3,11 ffc1ae80: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ae84: 41 9e 00 24 beq- cr7,ffc1aea8 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc1ae88: 2f 85 00 00 cmpwi cr7,r5,0 ffc1ae8c: 38 60 00 09 li r3,9 ffc1ae90: 41 9e 00 18 beq- cr7,ffc1aea8 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1ae94: 7c 83 23 78 mr r3,r4 ffc1ae98: 4b ff be bd bl ffc16d54 <_TOD_Validate> <== ALWAYS TAKEN ffc1ae9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc1aea0: 40 9e 00 38 bne- cr7,ffc1aed8 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1aea4: 38 60 00 14 li r3,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1aea8: 80 01 00 3c lwz r0,60(r1) ffc1aeac: 83 01 00 18 lwz r24,24(r1) ffc1aeb0: 7c 08 03 a6 mtlr r0 ffc1aeb4: 83 21 00 1c lwz r25,28(r1) ffc1aeb8: 83 41 00 20 lwz r26,32(r1) ffc1aebc: 83 61 00 24 lwz r27,36(r1) ffc1aec0: 83 81 00 28 lwz r28,40(r1) ffc1aec4: 83 a1 00 2c lwz r29,44(r1) ffc1aec8: 83 c1 00 30 lwz r30,48(r1) ffc1aecc: 83 e1 00 34 lwz r31,52(r1) ffc1aed0: 38 21 00 38 addi r1,r1,56 ffc1aed4: 4e 80 00 20 blr <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1aed8: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1aedc: 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 ); ffc1aee0: 4b ff bd d1 bl ffc16cb0 <_TOD_To_seconds> <== ALWAYS TAKEN if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1aee4: 80 1a 28 44 lwz r0,10308(r26) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1aee8: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1aeec: 7f 83 00 40 cmplw cr7,r3,r0 ffc1aef0: 40 bd ff b4 ble- cr7,ffc1aea4 ffc1aef4: 3c 60 00 00 lis r3,0 ffc1aef8: 38 63 72 44 addi r3,r3,29252 ffc1aefc: 7f a4 eb 78 mr r4,r29 ffc1af00: 38 a1 00 08 addi r5,r1,8 ffc1af04: 48 00 2f f5 bl ffc1def8 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1af08: 83 01 00 08 lwz r24,8(r1) ffc1af0c: 7c 79 1b 78 mr r25,r3 ffc1af10: 2f 98 00 00 cmpwi cr7,r24,0 ffc1af14: 38 60 00 04 li r3,4 ffc1af18: 40 be ff 90 bne- cr7,ffc1aea8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1af1c: 38 79 00 10 addi r3,r25,16 ffc1af20: 48 00 59 31 bl ffc20850 <_Watchdog_Remove> <== ALWAYS TAKEN void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc1af24: 93 b9 00 30 stw r29,48(r25) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1af28: 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(); ffc1af2c: 80 1a 28 44 lwz r0,10308(r26) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1af30: 7f e3 fb 78 mr r3,r31 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; ffc1af34: 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 ); ffc1af38: 7f 24 cb 78 mr r4,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(); ffc1af3c: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1af40: 80 1f 00 04 lwz r0,4(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1af44: 93 19 00 18 stw r24,24(r25) ffc1af48: 7c 09 03 a6 mtctr r0 the_watchdog->routine = routine; ffc1af4c: 93 d9 00 2c stw r30,44(r25) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc1af50: 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(); ffc1af54: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1af58: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc1af5c: 48 00 3b dd bl ffc1eb38 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1af60: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1af64: 4b ff ff 44 b ffc1aea8 <== ALWAYS TAKEN ffc090d4 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { ffc090d4: 94 21 ff f0 stwu r1,-16(r1) ffc090d8: 7c 08 02 a6 mflr r0 ffc090dc: 93 e1 00 0c stw r31,12(r1) void *ptr; /* * check the arguments */ if ( !pointer ) ffc090e0: 7c 9f 23 79 mr. r31,r4 */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { ffc090e4: 7c 64 1b 78 mr r4,r3 ffc090e8: 90 01 00 14 stw r0,20(r1) void *ptr; /* * check the arguments */ if ( !pointer ) ffc090ec: 41 82 00 0c beq- ffc090f8 return false; if ( !bytes ) ffc090f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc090f4: 40 9e 00 1c bne- cr7,ffc09110 if (!ptr) return false; *pointer = ptr; return true; } ffc090f8: 80 01 00 14 lwz r0,20(r1) ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) return false; *pointer = ptr; return true; ffc090fc: 38 60 00 00 li r3,0 } ffc09100: 83 e1 00 0c lwz r31,12(r1) ffc09104: 38 21 00 10 addi r1,r1,16 ffc09108: 7c 08 03 a6 mtlr r0 ffc0910c: 4e 80 00 20 blr <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc09110: 3c 60 00 00 lis r3,0 ffc09114: 38 63 2c 0c addi r3,r3,11276 ffc09118: 38 a0 00 00 li r5,0 ffc0911c: 38 c0 00 00 li r6,0 ffc09120: 48 00 19 f5 bl ffc0ab14 <_Protected_heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) ffc09124: 2c 03 00 00 cmpwi r3,0 ffc09128: 41 a2 ff d0 beq- ffc090f8 return false; *pointer = ptr; return true; } ffc0912c: 80 01 00 14 lwz r0,20(r1) */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) return false; *pointer = ptr; ffc09130: 90 7f 00 00 stw r3,0(r31) ffc09134: 38 60 00 01 li r3,1 return true; } ffc09138: 7c 08 03 a6 mtlr r0 ffc0913c: 83 e1 00 0c lwz r31,12(r1) ffc09140: 38 21 00 10 addi r1,r1,16 ffc09144: 4e 80 00 20 blr <== ALWAYS TAKEN ffc090a8 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { ffc090a8: 94 21 ff f8 stwu r1,-8(r1) ffc090ac: 7c 08 02 a6 mflr r0 ffc090b0: 7c 64 1b 78 mr r4,r3 return _Protected_heap_Free( &_Workspace_Area, pointer ); ffc090b4: 3c 60 00 00 lis r3,0 * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { ffc090b8: 90 01 00 0c stw r0,12(r1) return _Protected_heap_Free( &_Workspace_Area, pointer ); ffc090bc: 38 63 2c 0c addi r3,r3,11276 ffc090c0: 48 00 1a c1 bl ffc0ab80 <_Protected_heap_Free> <== ALWAYS TAKEN } ffc090c4: 80 01 00 0c lwz r0,12(r1) ffc090c8: 38 21 00 08 addi r1,r1,8 ffc090cc: 7c 08 03 a6 mtlr r0 ffc090d0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09148 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) ffc09148: 7c 64 1b 79 mr. r4,r3 #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { ffc0914c: 94 21 ff f8 stwu r1,-8(r1) ffc09150: 7c 08 02 a6 mflr r0 if ( !the_info ) ffc09154: 38 60 00 00 li r3,0 #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { ffc09158: 90 01 00 0c stw r0,12(r1) if ( !the_info ) ffc0915c: 41 82 00 10 beq- ffc0916c return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); ffc09160: 3c 60 00 00 lis r3,0 ffc09164: 38 63 2c 0c addi r3,r3,11276 ffc09168: 48 00 1a 75 bl ffc0abdc <_Protected_heap_Get_information> <== ALWAYS TAKEN } ffc0916c: 80 01 00 0c lwz r0,12(r1) ffc09170: 38 21 00 08 addi r1,r1,8 ffc09174: 7c 08 03 a6 mtlr r0 ffc09178: 4e 80 00 20 blr <== ALWAYS TAKEN