400062bc <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 400062bc: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400062c0: 23 10 00 70 sethi %hi(0x4001c000), %l1 400062c4: e0 04 62 44 ld [ %l1 + 0x244 ], %l0 ! 4001c244 <_API_extensions_List> 400062c8: a2 14 62 44 or %l1, 0x244, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400062cc: a2 04 60 04 add %l1, 4, %l1 400062d0: 80 a4 00 11 cmp %l0, %l1 400062d4: 02 80 00 09 be 400062f8 <_API_extensions_Run_postdriver+0x3c> 400062d8: 01 00 00 00 nop * 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)(); 400062dc: c2 04 20 08 ld [ %l0 + 8 ], %g1 400062e0: 9f c0 40 00 call %g1 400062e4: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 400062e8: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400062ec: 80 a4 00 11 cmp %l0, %l1 400062f0: 32 bf ff fc bne,a 400062e0 <_API_extensions_Run_postdriver+0x24> 400062f4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400062f8: 81 c7 e0 08 ret 400062fc: 81 e8 00 00 restore 40006300 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40006300: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006304: 23 10 00 70 sethi %hi(0x4001c000), %l1 40006308: e0 04 62 44 ld [ %l1 + 0x244 ], %l0 ! 4001c244 <_API_extensions_List> 4000630c: a2 14 62 44 or %l1, 0x244, %l1 40006310: a2 04 60 04 add %l1, 4, %l1 40006314: 80 a4 00 11 cmp %l0, %l1 40006318: 02 80 00 0a be 40006340 <_API_extensions_Run_postswitch+0x40> 4000631c: 25 10 00 70 sethi %hi(0x4001c000), %l2 40006320: a4 14 a0 bc or %l2, 0xbc, %l2 ! 4001c0bc <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 40006324: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40006328: 9f c0 40 00 call %g1 4000632c: d0 04 80 00 ld [ %l2 ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40006330: e0 04 00 00 ld [ %l0 ], %l0 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40006334: 80 a4 00 11 cmp %l0, %l1 40006338: 32 bf ff fc bne,a 40006328 <_API_extensions_Run_postswitch+0x28> 4000633c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40006340: 81 c7 e0 08 ret 40006344: 81 e8 00 00 restore 4000b6c0 <_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 ) { 4000b6c0: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000b6c4: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b6c8: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 4001c0bc <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000b6cc: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000b6d0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000b6d4: 80 a0 a0 00 cmp %g2, 0 4000b6d8: 22 80 00 13 be,a 4000b724 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000b6dc: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000b6e0: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b6e4: c6 00 60 08 ld [ %g1 + 8 ], %g3 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000b6e8: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b6ec: c6 26 20 60 st %g3, [ %i0 + 0x60 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000b6f0: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000b6f4: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000b6f8: 80 a0 a0 02 cmp %g2, 2 4000b6fc: 02 80 00 0f be 4000b738 <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000b700: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000b704: 80 a0 a0 03 cmp %g2, 3 4000b708: 22 80 00 1f be,a 4000b784 <_CORE_mutex_Seize_interrupt_trylock+0xc4> 4000b70c: da 00 60 1c ld [ %g1 + 0x1c ], %o5 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000b710: d0 06 40 00 ld [ %i1 ], %o0 4000b714: 7f ff d9 76 call 40001cec 4000b718: b0 10 20 00 clr %i0 4000b71c: 81 c7 e0 08 ret 4000b720: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000b724: 80 a0 40 02 cmp %g1, %g2 4000b728: 22 80 00 0c be,a 4000b758 <_CORE_mutex_Seize_interrupt_trylock+0x98> 4000b72c: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000b730: 81 c7 e0 08 ret 4000b734: 91 e8 20 01 restore %g0, 1, %o0 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b738: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000b73c: 84 00 a0 01 inc %g2 4000b740: c4 20 60 1c st %g2, [ %g1 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000b744: d0 06 40 00 ld [ %i1 ], %o0 4000b748: 7f ff d9 69 call 40001cec 4000b74c: b0 10 20 00 clr %i0 4000b750: 81 c7 e0 08 ret 4000b754: 81 e8 00 00 restore * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000b758: 80 a0 a0 00 cmp %g2, 0 4000b75c: 12 80 00 2b bne 4000b808 <_CORE_mutex_Seize_interrupt_trylock+0x148> 4000b760: 80 a0 a0 01 cmp %g2, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000b764: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000b768: 82 00 60 01 inc %g1 4000b76c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000b770: d0 06 40 00 ld [ %i1 ], %o0 4000b774: 7f ff d9 5e call 40001cec 4000b778: b0 10 20 00 clr %i0 4000b77c: 81 c7 e0 08 ret 4000b780: 81 e8 00 00 restore { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000b784: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b788: 88 03 60 01 add %o5, 1, %g4 4000b78c: c8 20 60 1c st %g4, [ %g1 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000b790: c8 06 20 4c ld [ %i0 + 0x4c ], %g4 current = executing->current_priority; if ( current == ceiling ) { 4000b794: 80 a1 00 02 cmp %g4, %g2 4000b798: 02 80 00 24 be 4000b828 <_CORE_mutex_Seize_interrupt_trylock+0x168> 4000b79c: 01 00 00 00 nop _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4000b7a0: 1a 80 00 11 bcc 4000b7e4 <_CORE_mutex_Seize_interrupt_trylock+0x124> 4000b7a4: 84 10 20 06 mov 6, %g2 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b7a8: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b7ac: c4 00 60 00 ld [ %g1 ], %g2 4000b7b0: 84 00 a0 01 inc %g2 4000b7b4: c4 20 60 00 st %g2, [ %g1 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000b7b8: 7f ff d9 4d call 40001cec 4000b7bc: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000b7c0: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000b7c4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000b7c8: 94 10 20 00 clr %o2 4000b7cc: 7f ff ef c1 call 400076d0 <_Thread_Change_priority> 4000b7d0: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000b7d4: 7f ff f1 3f call 40007cd0 <_Thread_Enable_dispatch> 4000b7d8: 01 00 00 00 nop 4000b7dc: 81 c7 e0 08 ret 4000b7e0: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000b7e4: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000b7e8: c6 26 20 50 st %g3, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ 4000b7ec: c0 26 20 54 clr [ %i0 + 0x54 ] executing->resource_count--; /* undo locking above */ 4000b7f0: da 20 60 1c st %o5, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000b7f4: d0 06 40 00 ld [ %i1 ], %o0 4000b7f8: 7f ff d9 3d call 40001cec 4000b7fc: b0 10 20 00 clr %i0 4000b800: 81 c7 e0 08 ret 4000b804: 81 e8 00 00 restore * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000b808: 12 bf ff ca bne 4000b730 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000b80c: 84 10 20 02 mov 2, %g2 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; 4000b810: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED _ISR_Enable( *level_p ); 4000b814: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 4000b818: 7f ff d9 35 call 40001cec <== NOT EXECUTED 4000b81c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000b820: 81 c7 e0 08 ret <== NOT EXECUTED 4000b824: 81 e8 00 00 restore <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4000b828: d0 06 40 00 ld [ %i1 ], %o0 4000b82c: 7f ff d9 30 call 40001cec 4000b830: b0 10 20 00 clr %i0 4000b834: 81 c7 e0 08 ret 4000b838: 81 e8 00 00 restore 4000b934 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000b934: 9d e3 bf 98 save %sp, -104, %sp 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; 4000b938: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000b93c: a0 10 00 18 mov %i0, %l0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4000b940: 80 a6 40 14 cmp %i1, %l4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4000b944: e4 06 20 08 ld [ %i0 + 8 ], %l2 4000b948: 18 80 00 75 bgu 4000bb1c <_Heap_Allocate_aligned_with_boundary+0x1e8> 4000b94c: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000b950: 80 a6 e0 00 cmp %i3, 0 4000b954: 12 80 00 70 bne 4000bb14 <_Heap_Allocate_aligned_with_boundary+0x1e0> 4000b958: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000b95c: 80 a4 00 12 cmp %l0, %l2 4000b960: 02 80 00 72 be 4000bb28 <_Heap_Allocate_aligned_with_boundary+0x1f4> 4000b964: a2 10 20 00 clr %l1 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; 4000b968: 82 10 20 04 mov 4, %g1 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; 4000b96c: b8 07 60 07 add %i5, 7, %i4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000b970: 82 20 40 19 sub %g1, %i1, %g1 4000b974: 10 80 00 09 b 4000b998 <_Heap_Allocate_aligned_with_boundary+0x64> 4000b978: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 4000b97c: 80 a6 20 00 cmp %i0, 0 4000b980: 32 80 00 57 bne,a 4000badc <_Heap_Allocate_aligned_with_boundary+0x1a8> 4000b984: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 4000b988: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000b98c: 80 a4 00 12 cmp %l0, %l2 4000b990: 22 80 00 5a be,a 4000baf8 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000b994: b0 10 20 00 clr %i0 /* * 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 ) { 4000b998: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000b99c: 80 a5 00 13 cmp %l4, %l3 4000b9a0: 1a bf ff fa bcc 4000b988 <_Heap_Allocate_aligned_with_boundary+0x54> 4000b9a4: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000b9a8: 80 a6 a0 00 cmp %i2, 0 4000b9ac: 02 bf ff f4 be 4000b97c <_Heap_Allocate_aligned_with_boundary+0x48> 4000b9b0: b0 04 a0 08 add %l2, 8, %i0 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; 4000b9b4: c2 07 bf fc ld [ %fp + -4 ], %g1 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4000b9b8: ee 04 20 14 ld [ %l0 + 0x14 ], %l7 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; 4000b9bc: a6 0c ff fe and %l3, -2, %l3 4000b9c0: a6 04 80 13 add %l2, %l3, %l3 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; 4000b9c4: b0 00 40 13 add %g1, %l3, %i0 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; 4000b9c8: 82 27 00 17 sub %i4, %l7, %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4000b9cc: 90 10 00 18 mov %i0, %o0 4000b9d0: a6 00 40 13 add %g1, %l3, %l3 4000b9d4: 40 00 2f 8f call 40017810 <.urem> 4000b9d8: 92 10 00 1a mov %i2, %o1 4000b9dc: b0 26 00 08 sub %i0, %o0, %i0 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 ) { 4000b9e0: 80 a4 c0 18 cmp %l3, %i0 4000b9e4: 1a 80 00 06 bcc 4000b9fc <_Heap_Allocate_aligned_with_boundary+0xc8> 4000b9e8: ac 04 a0 08 add %l2, 8, %l6 4000b9ec: 90 10 00 13 mov %l3, %o0 4000b9f0: 40 00 2f 88 call 40017810 <.urem> 4000b9f4: 92 10 00 1a mov %i2, %o1 4000b9f8: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000b9fc: 80 a6 e0 00 cmp %i3, 0 4000ba00: 02 80 00 26 be 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba04: 80 a5 80 18 cmp %l6, %i0 /* 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; 4000ba08: a6 06 00 19 add %i0, %i1, %l3 4000ba0c: 92 10 00 1b mov %i3, %o1 4000ba10: 40 00 2f 80 call 40017810 <.urem> 4000ba14: 90 10 00 13 mov %l3, %o0 4000ba18: 90 24 c0 08 sub %l3, %o0, %o0 /* 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 ) { 4000ba1c: 80 a4 c0 08 cmp %l3, %o0 4000ba20: 08 80 00 1e bleu 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba24: 80 a5 80 18 cmp %l6, %i0 4000ba28: 80 a6 00 08 cmp %i0, %o0 4000ba2c: 1a 80 00 1b bcc 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba30: 80 a5 80 18 cmp %l6, %i0 alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4000ba34: aa 05 80 19 add %l6, %i1, %l5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4000ba38: 80 a5 40 08 cmp %l5, %o0 4000ba3c: 28 80 00 0a bleu,a 4000ba64 <_Heap_Allocate_aligned_with_boundary+0x130> 4000ba40: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 4000ba44: 10 bf ff d2 b 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000ba48: e4 04 a0 08 ld [ %l2 + 8 ], %l2 /* 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 ) { 4000ba4c: 1a 80 00 13 bcc 4000ba98 <_Heap_Allocate_aligned_with_boundary+0x164> 4000ba50: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 4000ba54: 80 a5 40 08 cmp %l5, %o0 4000ba58: 38 bf ff cd bgu,a 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000ba5c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 4000ba60: b0 22 00 19 sub %o0, %i1, %i0 4000ba64: 92 10 00 1a mov %i2, %o1 4000ba68: 40 00 2f 6a call 40017810 <.urem> 4000ba6c: 90 10 00 18 mov %i0, %o0 4000ba70: 92 10 00 1b mov %i3, %o1 4000ba74: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000ba78: a6 06 00 19 add %i0, %i1, %l3 4000ba7c: 40 00 2f 65 call 40017810 <.urem> 4000ba80: 90 10 00 13 mov %l3, %o0 4000ba84: 90 24 c0 08 sub %l3, %o0, %o0 /* 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 ) { 4000ba88: 80 a4 c0 08 cmp %l3, %o0 4000ba8c: 18 bf ff f0 bgu 4000ba4c <_Heap_Allocate_aligned_with_boundary+0x118> 4000ba90: 80 a6 00 08 cmp %i0, %o0 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 ) { 4000ba94: 80 a5 80 18 cmp %l6, %i0 4000ba98: 18 bf ff bc bgu 4000b988 <_Heap_Allocate_aligned_with_boundary+0x54> 4000ba9c: 82 10 3f f8 mov -8, %g1 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; 4000baa0: 90 10 00 18 mov %i0, %o0 4000baa4: a6 20 40 12 sub %g1, %l2, %l3 4000baa8: 92 10 00 1d mov %i5, %o1 4000baac: 40 00 2f 59 call 40017810 <.urem> 4000bab0: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 4000bab4: 90 a4 c0 08 subcc %l3, %o0, %o0 4000bab8: 02 bf ff b2 be 4000b980 <_Heap_Allocate_aligned_with_boundary+0x4c> 4000babc: 80 a6 20 00 cmp %i0, 0 4000bac0: 80 a5 c0 08 cmp %l7, %o0 4000bac4: 38 bf ff b2 bgu,a 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000bac8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 4000bacc: 80 a6 20 00 cmp %i0, 0 4000bad0: 22 bf ff af be,a 4000b98c <_Heap_Allocate_aligned_with_boundary+0x58> 4000bad4: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000bad8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000badc: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000bae0: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000bae4: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000bae8: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000baec: 90 10 00 10 mov %l0, %o0 4000baf0: 7f ff ec 3d call 40006be4 <_Heap_Block_allocate> 4000baf4: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000baf8: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 4000bafc: 80 a0 40 11 cmp %g1, %l1 4000bb00: 1a 80 00 08 bcc 4000bb20 <_Heap_Allocate_aligned_with_boundary+0x1ec> 4000bb04: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000bb08: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 4000bb0c: 81 c7 e0 08 ret 4000bb10: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4000bb14: 08 80 00 07 bleu 4000bb30 <_Heap_Allocate_aligned_with_boundary+0x1fc> 4000bb18: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000bb1c: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 4000bb20: 81 c7 e0 08 ret 4000bb24: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000bb28: 10 bf ff f4 b 4000baf8 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000bb2c: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000bb30: 22 bf ff 8b be,a 4000b95c <_Heap_Allocate_aligned_with_boundary+0x28> 4000bb34: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 4000bb38: 10 bf ff 8a b 4000b960 <_Heap_Allocate_aligned_with_boundary+0x2c> 4000bb3c: 80 a4 00 12 cmp %l0, %l2 40007b68 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 40007b68: 9d e3 bf 88 save %sp, -120, %sp 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; 40007b6c: 25 10 00 20 sethi %hi(0x40008000), %l2 40007b70: 80 8e a0 ff btst 0xff, %i2 40007b74: a4 14 a1 68 or %l2, 0x168, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 40007b78: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 40007b7c: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 40007b80: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 40007b84: 12 80 00 04 bne 40007b94 <_Heap_Walk+0x2c> 40007b88: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40007b8c: 25 10 00 1e sethi %hi(0x40007800), %l2 40007b90: a4 14 a3 60 or %l2, 0x360, %l2 ! 40007b60 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 40007b94: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007b98: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 4001e990 <_System_state_Current> 40007b9c: 80 a0 60 03 cmp %g1, 3 40007ba0: 22 80 00 04 be,a 40007bb0 <_Heap_Walk+0x48> 40007ba4: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 40007ba8: 81 c7 e0 08 ret 40007bac: 91 e8 20 01 restore %g0, 1, %o0 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)( 40007bb0: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40007bb4: c4 06 20 08 ld [ %i0 + 8 ], %g2 40007bb8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40007bbc: 90 10 00 19 mov %i1, %o0 40007bc0: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 40007bc4: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 40007bc8: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007bcc: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40007bd0: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40007bd4: 92 10 20 00 clr %o1 40007bd8: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007bdc: 96 10 00 15 mov %l5, %o3 40007be0: 94 12 a2 18 or %o2, 0x218, %o2 40007be4: 9f c4 80 00 call %l2 40007be8: 98 10 00 13 mov %l3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 40007bec: 80 a5 60 00 cmp %l5, 0 40007bf0: 02 80 00 36 be 40007cc8 <_Heap_Walk+0x160> 40007bf4: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40007bf8: 12 80 00 3c bne 40007ce8 <_Heap_Walk+0x180> 40007bfc: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40007c00: 7f ff e7 b1 call 40001ac4 <.urem> 40007c04: 92 10 00 15 mov %l5, %o1 40007c08: 80 a2 20 00 cmp %o0, 0 40007c0c: 12 80 00 40 bne 40007d0c <_Heap_Walk+0x1a4> 40007c10: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 40007c14: 7f ff e7 ac call 40001ac4 <.urem> 40007c18: 92 10 00 15 mov %l5, %o1 40007c1c: 80 a2 20 00 cmp %o0, 0 40007c20: 32 80 00 44 bne,a 40007d30 <_Heap_Walk+0x1c8> 40007c24: 90 10 00 19 mov %i1, %o0 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; 40007c28: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 40007c2c: ae 8d a0 01 andcc %l6, 1, %l7 40007c30: 22 80 00 48 be,a 40007d50 <_Heap_Walk+0x1e8> 40007c34: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 40007c38: d6 04 00 00 ld [ %l0 ], %o3 40007c3c: 80 a5 40 0b cmp %l5, %o3 40007c40: 32 80 00 1a bne,a 40007ca8 <_Heap_Walk+0x140> 40007c44: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40007c48: c2 05 20 04 ld [ %l4 + 4 ], %g1 40007c4c: 82 08 7f fe and %g1, -2, %g1 40007c50: 82 05 00 01 add %l4, %g1, %g1 40007c54: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007c58: 80 88 60 01 btst 1, %g1 40007c5c: 22 80 01 23 be,a 400080e8 <_Heap_Walk+0x580> 40007c60: 90 10 00 19 mov %i1, %o0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007c64: e2 06 20 08 ld [ %i0 + 8 ], %l1 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 ) { 40007c68: 80 a6 00 11 cmp %i0, %l1 40007c6c: 02 80 00 6f be 40007e28 <_Heap_Walk+0x2c0> 40007c70: f4 06 20 10 ld [ %i0 + 0x10 ], %i2 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; 40007c74: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 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 40007c78: 80 a7 00 11 cmp %i4, %l1 40007c7c: 28 80 00 3c bleu,a 40007d6c <_Heap_Walk+0x204> 40007c80: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 40007c84: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007c88: 96 10 00 11 mov %l1, %o3 40007c8c: 92 10 20 01 mov 1, %o1 40007c90: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007c94: b0 10 20 00 clr %i0 40007c98: 9f c4 80 00 call %l2 40007c9c: 94 12 a3 c0 or %o2, 0x3c0, %o2 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 40007ca8: 98 10 00 15 mov %l5, %o4 40007cac: 92 10 20 01 mov 1, %o1 40007cb0: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007cb4: b0 10 20 00 clr %i0 40007cb8: 9f c4 80 00 call %l2 40007cbc: 94 12 a3 78 or %o2, 0x378, %o2 40007cc0: 81 c7 e0 08 ret 40007cc4: 81 e8 00 00 restore first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 40007cc8: 90 10 00 19 mov %i1, %o0 40007ccc: 92 10 20 01 mov 1, %o1 40007cd0: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007cd4: b0 10 20 00 clr %i0 40007cd8: 9f c4 80 00 call %l2 40007cdc: 94 12 a2 b0 or %o2, 0x2b0, %o2 40007ce0: 81 c7 e0 08 ret 40007ce4: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 40007ce8: 90 10 00 19 mov %i1, %o0 40007cec: 96 10 00 15 mov %l5, %o3 40007cf0: 92 10 20 01 mov 1, %o1 40007cf4: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007cf8: b0 10 20 00 clr %i0 40007cfc: 9f c4 80 00 call %l2 40007d00: 94 12 a2 c8 or %o2, 0x2c8, %o2 40007d04: 81 c7 e0 08 ret 40007d08: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 40007d0c: 90 10 00 19 mov %i1, %o0 40007d10: 96 10 00 13 mov %l3, %o3 40007d14: 92 10 20 01 mov 1, %o1 40007d18: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007d1c: b0 10 20 00 clr %i0 40007d20: 9f c4 80 00 call %l2 40007d24: 94 12 a2 e8 or %o2, 0x2e8, %o2 40007d28: 81 c7 e0 08 ret 40007d2c: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 40007d30: 96 10 00 10 mov %l0, %o3 40007d34: 92 10 20 01 mov 1, %o1 40007d38: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007d3c: b0 10 20 00 clr %i0 40007d40: 9f c4 80 00 call %l2 40007d44: 94 12 a3 10 or %o2, 0x310, %o2 40007d48: 81 c7 e0 08 ret 40007d4c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 40007d50: 92 10 20 01 mov 1, %o1 40007d54: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40007d58: b0 10 20 00 clr %i0 40007d5c: 9f c4 80 00 call %l2 40007d60: 94 12 a3 48 or %o2, 0x348, %o2 40007d64: 81 c7 e0 08 ret 40007d68: 81 e8 00 00 restore 40007d6c: 80 a6 c0 11 cmp %i3, %l1 40007d70: 0a bf ff c6 bcs 40007c88 <_Heap_Walk+0x120> 40007d74: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 40007d78: 90 04 60 08 add %l1, 8, %o0 40007d7c: 7f ff e7 52 call 40001ac4 <.urem> 40007d80: 92 10 00 1a mov %i2, %o1 40007d84: 80 a2 20 00 cmp %o0, 0 40007d88: 12 80 00 df bne 40008104 <_Heap_Walk+0x59c> 40007d8c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40007d90: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007d94: 82 08 7f fe and %g1, -2, %g1 40007d98: 82 04 40 01 add %l1, %g1, %g1 40007d9c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007da0: 80 88 60 01 btst 1, %g1 40007da4: 12 80 00 ea bne 4000814c <_Heap_Walk+0x5e4> 40007da8: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 40007dac: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40007db0: 80 a6 00 0c cmp %i0, %o4 40007db4: 02 80 00 19 be 40007e18 <_Heap_Walk+0x2b0> 40007db8: ba 10 00 11 mov %l1, %i5 40007dbc: 30 80 00 dc b,a 4000812c <_Heap_Walk+0x5c4> <== NOT EXECUTED 40007dc0: 0a bf ff b2 bcs 40007c88 <_Heap_Walk+0x120> 40007dc4: 90 10 00 19 mov %i1, %o0 40007dc8: 80 a6 c0 11 cmp %i3, %l1 40007dcc: 0a bf ff b0 bcs 40007c8c <_Heap_Walk+0x124> 40007dd0: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 40007dd4: 90 04 60 08 add %l1, 8, %o0 40007dd8: 7f ff e7 3b call 40001ac4 <.urem> 40007ddc: 92 10 00 1a mov %i2, %o1 40007de0: 80 a2 20 00 cmp %o0, 0 40007de4: 32 80 00 c8 bne,a 40008104 <_Heap_Walk+0x59c> 40007de8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40007dec: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007df0: 82 08 7f fe and %g1, -2, %g1 40007df4: 82 00 40 11 add %g1, %l1, %g1 40007df8: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007dfc: 80 88 60 01 btst 1, %g1 40007e00: 32 80 00 d2 bne,a 40008148 <_Heap_Walk+0x5e0> 40007e04: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 40007e08: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40007e0c: 80 a3 00 1d cmp %o4, %i5 40007e10: 12 80 00 c5 bne 40008124 <_Heap_Walk+0x5bc> 40007e14: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 40007e18: e2 04 60 08 ld [ %l1 + 8 ], %l1 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 ) { 40007e1c: 80 a6 00 11 cmp %i0, %l1 40007e20: 12 bf ff e8 bne 40007dc0 <_Heap_Walk+0x258> 40007e24: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40007e28: 80 a5 00 10 cmp %l4, %l0 40007e2c: 02 bf ff 5f be 40007ba8 <_Heap_Walk+0x40> 40007e30: 37 10 00 70 sethi %hi(0x4001c000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007e34: 35 10 00 70 sethi %hi(0x4001c000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007e38: 39 10 00 70 sethi %hi(0x4001c000), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007e3c: ba 10 00 15 mov %l5, %i5 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)( 40007e40: b6 16 e0 68 or %i3, 0x68, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007e44: b4 16 a0 80 or %i2, 0x80, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007e48: b8 17 22 18 or %i4, 0x218, %i4 40007e4c: aa 10 00 14 mov %l4, %l5 - 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; 40007e50: ac 0d bf fe and %l6, -2, %l6 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 ) { 40007e54: 80 a5 e0 00 cmp %l7, 0 40007e58: 02 80 00 16 be 40007eb0 <_Heap_Walk+0x348> 40007e5c: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 40007e60: 90 10 00 19 mov %i1, %o0 40007e64: 92 10 20 00 clr %o1 40007e68: 94 10 00 1b mov %i3, %o2 40007e6c: 96 10 00 10 mov %l0, %o3 40007e70: 9f c4 80 00 call %l2 40007e74: 98 10 00 16 mov %l6, %o4 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 40007e78: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40007e7c: 80 a0 40 11 cmp %g1, %l1 40007e80: 28 80 00 18 bleu,a 40007ee0 <_Heap_Walk+0x378> 40007e84: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 40007e88: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007e8c: 96 10 00 10 mov %l0, %o3 40007e90: 98 10 00 11 mov %l1, %o4 40007e94: 92 10 20 01 mov 1, %o1 40007e98: 15 10 00 70 sethi %hi(0x4001c000), %o2 40007e9c: b0 10 20 00 clr %i0 40007ea0: 9f c4 80 00 call %l2 40007ea4: 94 12 a0 a8 or %o2, 0xa8, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 40007ea8: 81 c7 e0 08 ret 40007eac: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007eb0: da 04 00 00 ld [ %l0 ], %o5 40007eb4: 90 10 00 19 mov %i1, %o0 40007eb8: 92 10 20 00 clr %o1 40007ebc: 94 10 00 1a mov %i2, %o2 40007ec0: 96 10 00 10 mov %l0, %o3 40007ec4: 9f c4 80 00 call %l2 40007ec8: 98 10 00 16 mov %l6, %o4 40007ecc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40007ed0: 80 a0 40 11 cmp %g1, %l1 40007ed4: 18 bf ff ee bgu 40007e8c <_Heap_Walk+0x324> 40007ed8: 90 10 00 19 mov %i1, %o0 40007edc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40007ee0: 80 a0 40 11 cmp %g1, %l1 40007ee4: 0a bf ff ea bcs 40007e8c <_Heap_Walk+0x324> 40007ee8: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 40007eec: 90 10 00 16 mov %l6, %o0 40007ef0: 7f ff e6 f5 call 40001ac4 <.urem> 40007ef4: 92 10 00 1d mov %i5, %o1 40007ef8: 80 a2 20 00 cmp %o0, 0 40007efc: 12 80 00 5d bne 40008070 <_Heap_Walk+0x508> 40007f00: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 40007f04: 18 80 00 65 bgu 40008098 <_Heap_Walk+0x530> 40007f08: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 40007f0c: 3a 80 00 6e bcc,a 400080c4 <_Heap_Walk+0x55c> 40007f10: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 40007f14: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007f18: 80 88 60 01 btst 1, %g1 40007f1c: 12 80 00 40 bne 4000801c <_Heap_Walk+0x4b4> 40007f20: 80 a5 40 11 cmp %l5, %l1 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; 40007f24: e8 04 20 04 ld [ %l0 + 4 ], %l4 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)( 40007f28: d8 04 20 0c ld [ %l0 + 0xc ], %o4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007f2c: c2 06 20 08 ld [ %i0 + 8 ], %g1 - 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; 40007f30: ac 0d 3f fe and %l4, -2, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007f34: 1b 10 00 70 sethi %hi(0x4001c000), %o5 40007f38: 80 a0 40 0c cmp %g1, %o4 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 40007f3c: c6 06 20 0c ld [ %i0 + 0xc ], %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 40007f40: ae 04 00 16 add %l0, %l6, %l7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007f44: 02 80 00 07 be 40007f60 <_Heap_Walk+0x3f8> 40007f48: 9a 13 61 70 or %o5, 0x170, %o5 "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)" : ""), 40007f4c: 1b 10 00 70 sethi %hi(0x4001c000), %o5 40007f50: 80 a3 00 18 cmp %o4, %i0 40007f54: 02 80 00 03 be 40007f60 <_Heap_Walk+0x3f8> 40007f58: 9a 13 61 80 or %o5, 0x180, %o5 40007f5c: 9a 10 00 1c mov %i4, %o5 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)( 40007f60: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007f64: 05 10 00 70 sethi %hi(0x4001c000), %g2 40007f68: 80 a0 c0 01 cmp %g3, %g1 40007f6c: 02 80 00 07 be 40007f88 <_Heap_Walk+0x420> 40007f70: 84 10 a1 90 or %g2, 0x190, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007f74: 05 10 00 70 sethi %hi(0x4001c000), %g2 40007f78: 80 a0 40 18 cmp %g1, %i0 40007f7c: 02 80 00 03 be 40007f88 <_Heap_Walk+0x420> 40007f80: 84 10 a1 a0 or %g2, 0x1a0, %g2 40007f84: 84 10 00 1c mov %i4, %g2 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)( 40007f88: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40007f8c: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 40007f90: 90 10 00 19 mov %i1, %o0 40007f94: 92 10 20 00 clr %o1 40007f98: 15 10 00 70 sethi %hi(0x4001c000), %o2 40007f9c: 96 10 00 10 mov %l0, %o3 40007fa0: 9f c4 80 00 call %l2 40007fa4: 94 12 a1 b0 or %o2, 0x1b0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 40007fa8: da 05 c0 00 ld [ %l7 ], %o5 40007fac: 80 a5 80 0d cmp %l6, %o5 40007fb0: 02 80 00 0c be 40007fe0 <_Heap_Walk+0x478> 40007fb4: 90 10 00 19 mov %i1, %o0 (*printer)( 40007fb8: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 40007fbc: 96 10 00 10 mov %l0, %o3 40007fc0: 98 10 00 16 mov %l6, %o4 40007fc4: 92 10 20 01 mov 1, %o1 40007fc8: 15 10 00 70 sethi %hi(0x4001c000), %o2 40007fcc: b0 10 20 00 clr %i0 40007fd0: 9f c4 80 00 call %l2 40007fd4: 94 12 a1 e0 or %o2, 0x1e0, %o2 40007fd8: 81 c7 e0 08 ret 40007fdc: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 40007fe0: 80 8d 20 01 btst 1, %l4 40007fe4: 02 80 00 1c be 40008054 <_Heap_Walk+0x4ec> 40007fe8: 96 10 00 10 mov %l0, %o3 40007fec: c2 06 20 08 ld [ %i0 + 8 ], %g1 ) { 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 ) { 40007ff0: 80 a0 40 18 cmp %g1, %i0 40007ff4: 12 80 00 07 bne 40008010 <_Heap_Walk+0x4a8> 40007ff8: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40007ffc: 10 80 00 0f b 40008038 <_Heap_Walk+0x4d0> <== NOT EXECUTED 40008000: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED ) { 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 ) { 40008004: 80 a0 40 18 cmp %g1, %i0 40008008: 02 80 00 0a be 40008030 <_Heap_Walk+0x4c8> 4000800c: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 40008010: 32 bf ff fd bne,a 40008004 <_Heap_Walk+0x49c> 40008014: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40008018: 80 a5 40 11 cmp %l5, %l1 4000801c: 02 bf fe e3 be 40007ba8 <_Heap_Walk+0x40> 40008020: a0 10 00 11 mov %l1, %l0 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 ) { 40008024: ec 04 60 04 ld [ %l1 + 4 ], %l6 40008028: 10 bf ff 8a b 40007e50 <_Heap_Walk+0x2e8> 4000802c: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40008030: 90 10 00 19 mov %i1, %o0 40008034: 96 10 00 10 mov %l0, %o3 40008038: 92 10 20 01 mov 1, %o1 4000803c: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008040: b0 10 20 00 clr %i0 40008044: 9f c4 80 00 call %l2 40008048: 94 12 a2 50 or %o2, 0x250, %o2 4000804c: 81 c7 e0 08 ret 40008050: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 40008054: 92 10 20 01 mov 1, %o1 40008058: 15 10 00 70 sethi %hi(0x4001c000), %o2 4000805c: b0 10 20 00 clr %i0 40008060: 9f c4 80 00 call %l2 40008064: 94 12 a2 20 or %o2, 0x220, %o2 40008068: 81 c7 e0 08 ret 4000806c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 40008070: 90 10 00 19 mov %i1, %o0 40008074: 96 10 00 10 mov %l0, %o3 40008078: 98 10 00 16 mov %l6, %o4 4000807c: 92 10 20 01 mov 1, %o1 40008080: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008084: b0 10 20 00 clr %i0 40008088: 9f c4 80 00 call %l2 4000808c: 94 12 a0 d8 or %o2, 0xd8, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 40008090: 81 c7 e0 08 ret 40008094: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 40008098: 90 10 00 19 mov %i1, %o0 4000809c: 96 10 00 10 mov %l0, %o3 400080a0: 98 10 00 16 mov %l6, %o4 400080a4: 9a 10 00 13 mov %l3, %o5 400080a8: 92 10 20 01 mov 1, %o1 400080ac: 15 10 00 70 sethi %hi(0x4001c000), %o2 400080b0: b0 10 20 00 clr %i0 400080b4: 9f c4 80 00 call %l2 400080b8: 94 12 a1 08 or %o2, 0x108, %o2 block, block_size, min_block_size ); return false; 400080bc: 81 c7 e0 08 ret 400080c0: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 400080c4: 96 10 00 10 mov %l0, %o3 400080c8: 98 10 00 11 mov %l1, %o4 400080cc: 92 10 20 01 mov 1, %o1 400080d0: 15 10 00 70 sethi %hi(0x4001c000), %o2 400080d4: b0 10 20 00 clr %i0 400080d8: 9f c4 80 00 call %l2 400080dc: 94 12 a1 38 or %o2, 0x138, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 400080e0: 81 c7 e0 08 ret 400080e4: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 400080e8: 92 10 20 01 mov 1, %o1 400080ec: 15 10 00 6f sethi %hi(0x4001bc00), %o2 400080f0: b0 10 20 00 clr %i0 400080f4: 9f c4 80 00 call %l2 400080f8: 94 12 a3 a8 or %o2, 0x3a8, %o2 400080fc: 81 c7 e0 08 ret 40008100: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 40008104: 96 10 00 11 mov %l1, %o3 40008108: 92 10 20 01 mov 1, %o1 4000810c: 15 10 00 6f sethi %hi(0x4001bc00), %o2 40008110: b0 10 20 00 clr %i0 40008114: 9f c4 80 00 call %l2 40008118: 94 12 a3 e0 or %o2, 0x3e0, %o2 4000811c: 81 c7 e0 08 ret 40008120: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 40008124: 90 10 00 19 mov %i1, %o0 40008128: 96 10 00 11 mov %l1, %o3 4000812c: 92 10 20 01 mov 1, %o1 40008130: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008134: b0 10 20 00 clr %i0 40008138: 9f c4 80 00 call %l2 4000813c: 94 12 a0 30 or %o2, 0x30, %o2 40008140: 81 c7 e0 08 ret 40008144: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 40008148: 96 10 00 11 mov %l1, %o3 4000814c: 92 10 20 01 mov 1, %o1 40008150: 15 10 00 70 sethi %hi(0x4001c000), %o2 40008154: b0 10 20 00 clr %i0 40008158: 9f c4 80 00 call %l2 4000815c: 94 12 a0 10 or %o2, 0x10, %o2 40008160: 81 c7 e0 08 ret 40008164: 81 e8 00 00 restore 40006ea4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40006ea4: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 40006ea8: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 40006eac: 80 a5 20 00 cmp %l4, 0 40006eb0: 02 80 00 ab be 4000715c <_Objects_Extend_information+0x2b8> 40006eb4: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006eb8: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40006ebc: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 40006ec0: ab 2d 60 10 sll %l5, 0x10, %l5 40006ec4: 92 10 00 12 mov %l2, %o1 40006ec8: 40 00 41 a6 call 40017560 <.udiv> 40006ecc: 91 35 60 10 srl %l5, 0x10, %o0 40006ed0: 91 2a 20 10 sll %o0, 0x10, %o0 40006ed4: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 40006ed8: 80 a7 20 00 cmp %i4, 0 40006edc: 02 80 00 a7 be 40007178 <_Objects_Extend_information+0x2d4> 40006ee0: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 40006ee4: c2 05 00 00 ld [ %l4 ], %g1 40006ee8: 80 a0 60 00 cmp %g1, 0 40006eec: 02 80 00 a4 be 4000717c <_Objects_Extend_information+0x2d8> 40006ef0: a2 10 00 13 mov %l3, %l1 40006ef4: 10 80 00 06 b 40006f0c <_Objects_Extend_information+0x68> 40006ef8: a0 10 20 00 clr %l0 40006efc: c2 05 00 01 ld [ %l4 + %g1 ], %g1 40006f00: 80 a0 60 00 cmp %g1, 0 40006f04: 22 80 00 08 be,a 40006f24 <_Objects_Extend_information+0x80> 40006f08: ab 35 60 10 srl %l5, 0x10, %l5 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006f0c: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40006f10: a2 04 40 12 add %l1, %l2, %l1 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006f14: 80 a7 00 10 cmp %i4, %l0 40006f18: 18 bf ff f9 bgu 40006efc <_Objects_Extend_information+0x58> 40006f1c: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006f20: ab 35 60 10 srl %l5, 0x10, %l5 /* * 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 ) { 40006f24: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006f28: aa 05 40 08 add %l5, %o0, %l5 /* * 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 ) { 40006f2c: 82 10 63 ff or %g1, 0x3ff, %g1 40006f30: 80 a5 40 01 cmp %l5, %g1 40006f34: 18 80 00 96 bgu 4000718c <_Objects_Extend_information+0x2e8> 40006f38: 01 00 00 00 nop /* * 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; 40006f3c: 40 00 41 4f call 40017478 <.umul> 40006f40: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 40006f44: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006f48: 80 a0 60 00 cmp %g1, 0 40006f4c: 12 80 00 6d bne 40007100 <_Objects_Extend_information+0x25c> 40006f50: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 40006f54: 40 00 08 92 call 4000919c <_Workspace_Allocate_or_fatal_error> 40006f58: 01 00 00 00 nop 40006f5c: a4 10 00 08 mov %o0, %l2 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006f60: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006f64: 80 a4 40 01 cmp %l1, %g1 40006f68: 2a 80 00 43 bcs,a 40007074 <_Objects_Extend_information+0x1d0> 40006f6c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 40006f70: a8 07 20 01 add %i4, 1, %l4 * 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 ); 40006f74: 91 2d 20 01 sll %l4, 1, %o0 40006f78: 90 02 00 14 add %o0, %l4, %o0 40006f7c: 90 05 40 08 add %l5, %o0, %o0 40006f80: 90 02 00 13 add %o0, %l3, %o0 40006f84: 40 00 08 95 call 400091d8 <_Workspace_Allocate> 40006f88: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 40006f8c: ac 92 20 00 orcc %o0, 0, %l6 40006f90: 02 80 00 7d be 40007184 <_Objects_Extend_information+0x2e0> 40006f94: a9 2d 20 02 sll %l4, 2, %l4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40006f98: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006f9c: 80 a4 c0 01 cmp %l3, %g1 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 40006fa0: ae 05 80 14 add %l6, %l4, %l7 40006fa4: 0a 80 00 5e bcs 4000711c <_Objects_Extend_information+0x278> 40006fa8: a8 05 c0 14 add %l7, %l4, %l4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006fac: 80 a4 e0 00 cmp %l3, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006fb0: 82 10 20 00 clr %g1 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006fb4: 02 80 00 08 be 40006fd4 <_Objects_Extend_information+0x130> 40006fb8: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 40006fbc: 85 28 60 02 sll %g1, 2, %g2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006fc0: 82 00 60 01 inc %g1 40006fc4: 80 a4 c0 01 cmp %l3, %g1 40006fc8: 18 bf ff fd bgu 40006fbc <_Objects_Extend_information+0x118> 40006fcc: c0 20 80 14 clr [ %g2 + %l4 ] 40006fd0: bb 2f 20 02 sll %i4, 2, %i5 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006fd4: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006fd8: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006fdc: 86 04 40 03 add %l1, %g3, %g3 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 40006fe0: 80 a4 40 03 cmp %l1, %g3 40006fe4: 1a 80 00 0a bcc 4000700c <_Objects_Extend_information+0x168> 40006fe8: c0 25 80 1d clr [ %l6 + %i5 ] 40006fec: 85 2c 60 02 sll %l1, 2, %g2 40006ff0: 82 10 00 11 mov %l1, %g1 40006ff4: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 40006ff8: c0 20 80 00 clr [ %g2 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 40006ffc: 82 00 60 01 inc %g1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 40007000: 80 a0 40 03 cmp %g1, %g3 40007004: 0a bf ff fd bcs 40006ff8 <_Objects_Extend_information+0x154> 40007008: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 4000700c: 7f ff eb 34 call 40001cdc 40007010: 01 00 00 00 nop 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( 40007014: c6 06 00 00 ld [ %i0 ], %g3 40007018: c4 16 20 04 lduh [ %i0 + 4 ], %g2 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; 4000701c: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40007020: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40007024: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 40007028: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4000702c: 87 28 e0 18 sll %g3, 0x18, %g3 40007030: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40007034: ec 26 20 34 st %l6, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40007038: ab 2d 60 10 sll %l5, 0x10, %l5 4000703c: 03 00 00 40 sethi %hi(0x10000), %g1 40007040: ab 35 60 10 srl %l5, 0x10, %l5 40007044: 82 10 c0 01 or %g3, %g1, %g1 40007048: 82 10 40 02 or %g1, %g2, %g1 4000704c: 82 10 40 15 or %g1, %l5, %g1 40007050: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007054: 7f ff eb 26 call 40001cec 40007058: 01 00 00 00 nop if ( old_tables ) 4000705c: 80 a4 e0 00 cmp %l3, 0 40007060: 22 80 00 05 be,a 40007074 <_Objects_Extend_information+0x1d0> 40007064: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 40007068: 40 00 08 65 call 400091fc <_Workspace_Free> 4000706c: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40007070: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007074: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 40007078: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 4000707c: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40007080: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007084: a6 06 20 20 add %i0, 0x20, %l3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40007088: e4 20 40 10 st %l2, [ %g1 + %l0 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 4000708c: 29 00 00 40 sethi %hi(0x10000), %l4 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007090: a4 07 bf f4 add %fp, -12, %l2 40007094: 40 00 11 7d call 4000b688 <_Chain_Initialize> 40007098: 90 10 00 12 mov %l2, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 4000709c: 30 80 00 0c b,a 400070cc <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 400070a0: c4 16 20 04 lduh [ %i0 + 4 ], %g2 400070a4: 83 28 60 18 sll %g1, 0x18, %g1 400070a8: 85 28 a0 1b sll %g2, 0x1b, %g2 400070ac: 82 10 40 14 or %g1, %l4, %g1 400070b0: 82 10 40 02 or %g1, %g2, %g1 400070b4: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400070b8: 92 10 00 08 mov %o0, %o1 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 400070bc: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 400070c0: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400070c4: 7f ff fc e2 call 4000644c <_Chain_Append> 400070c8: 90 10 00 13 mov %l3, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 400070cc: 40 00 11 5c call 4000b63c <_Chain_Get> 400070d0: 90 10 00 12 mov %l2, %o0 400070d4: 80 a2 20 00 cmp %o0, 0 400070d8: 32 bf ff f2 bne,a 400070a0 <_Objects_Extend_information+0x1fc> 400070dc: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 400070e0: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400070e4: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 400070e8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 400070ec: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400070f0: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 400070f4: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400070f8: 81 c7 e0 08 ret 400070fc: 81 e8 00 00 restore * 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 ); 40007100: 40 00 08 36 call 400091d8 <_Workspace_Allocate> 40007104: 01 00 00 00 nop if ( !new_object_block ) 40007108: a4 92 20 00 orcc %o0, 0, %l2 4000710c: 32 bf ff 96 bne,a 40006f64 <_Objects_Extend_information+0xc0> 40007110: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40007114: 81 c7 e0 08 ret 40007118: 81 e8 00 00 restore /* * 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, 4000711c: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40007120: bb 2f 20 02 sll %i4, 2, %i5 /* * 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, 40007124: 40 00 1d b9 call 4000e808 40007128: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 4000712c: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40007130: 94 10 00 1d mov %i5, %o2 40007134: 40 00 1d b5 call 4000e808 40007138: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 4000713c: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40007140: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40007144: 94 04 c0 0a add %l3, %o2, %o2 40007148: 90 10 00 14 mov %l4, %o0 4000714c: 40 00 1d af call 4000e808 40007150: 95 2a a0 02 sll %o2, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007154: 10 bf ff a1 b 40006fd8 <_Objects_Extend_information+0x134> 40007158: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4000715c: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40007160: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 40007164: ab 2d 60 10 sll %l5, 0x10, %l5 40007168: a2 10 00 13 mov %l3, %l1 4000716c: a0 10 20 00 clr %l0 40007170: 10 bf ff 6c b 40006f20 <_Objects_Extend_information+0x7c> 40007174: b8 10 20 00 clr %i4 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40007178: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 4000717c: 10 bf ff 69 b 40006f20 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 40007180: a0 10 20 00 clr %l0 <== 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 ); 40007184: 40 00 08 1e call 400091fc <_Workspace_Free> 40007188: 90 10 00 12 mov %l2, %o0 return; 4000718c: 81 c7 e0 08 ret 40007190: 81 e8 00 00 restore 400073a8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 400073a8: 9d e3 bf a0 save %sp, -96, %sp information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400073ac: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400073b0: 83 2e 60 02 sll %i1, 2, %g1 400073b4: 84 10 a3 60 or %g2, 0x360, %g2 400073b8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 400073bc: 85 2f 20 10 sll %i4, 0x10, %g2 400073c0: 85 30 a0 10 srl %g2, 0x10, %g2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400073c4: 87 2e a0 02 sll %i2, 2, %g3 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 400073c8: c4 26 20 18 st %g2, [ %i0 + 0x18 ] information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 400073cc: f0 20 40 03 st %i0, [ %g1 + %g3 ] /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 400073d0: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400073d4: 03 20 00 00 sethi %hi(0x80000000), %g1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 400073d8: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 400073dc: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 400073e0: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 400073e4: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 400073e8: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 400073ec: c0 36 20 2c clrh [ %i0 + 0x2c ] /* * 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; 400073f0: c0 36 20 10 clrh [ %i0 + 0x10 ] _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 400073f4: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400073f8: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 400073fc: 80 a0 a0 00 cmp %g2, 0 40007400: 02 80 00 05 be 40007414 <_Objects_Initialize_information+0x6c> 40007404: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 40007408: 80 a6 e0 00 cmp %i3, 0 4000740c: 02 80 00 28 be 400074ac <_Objects_Initialize_information+0x104> 40007410: 90 10 20 00 clr %o0 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; 40007414: 07 10 00 6f sethi %hi(0x4001bc00), %g3 40007418: 86 10 e1 a8 or %g3, 0x1a8, %g3 ! 4001bda8 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4000741c: 80 a0 00 1b cmp %g0, %i3 40007420: b3 2e 60 18 sll %i1, 0x18, %i1 40007424: 84 40 20 00 addx %g0, 0, %g2 40007428: b5 2e a0 1b sll %i2, 0x1b, %i2 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; 4000742c: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 40007430: f6 36 20 14 sth %i3, [ %i0 + 0x14 ] /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 40007434: 07 00 00 40 sethi %hi(0x10000), %g3 40007438: b2 16 40 03 or %i1, %g3, %i1 4000743c: b4 16 40 1a or %i1, %i2, %i2 40007440: b4 16 80 02 or %i2, %g2, %i2 40007444: f4 26 20 08 st %i2, [ %i0 + 8 ] * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 40007448: 84 00 60 04 add %g1, 4, %g2 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 4000744c: 80 88 60 03 btst 3, %g1 40007450: 02 80 00 0c be 40007480 <_Objects_Initialize_information+0xd8> 40007454: 84 08 bf fc and %g2, -4, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007458: 82 06 20 24 add %i0, 0x24, %g1 <== NOT EXECUTED name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 4000745c: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED 40007460: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED the_chain->permanent_null = NULL; 40007464: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 40007468: 82 06 20 20 add %i0, 0x20, %g1 <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 4000746c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40007470: 12 80 00 0d bne 400074a4 <_Objects_Initialize_information+0xfc> <== NOT EXECUTED 40007474: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 40007478: 81 c7 e0 08 ret 4000747c: 81 e8 00 00 restore /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 40007480: 84 10 00 01 mov %g1, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007484: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 40007488: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 4000748c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 40007490: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 40007494: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 40007498: 80 a6 e0 00 cmp %i3, 0 4000749c: 02 bf ff f7 be 40007478 <_Objects_Initialize_information+0xd0> 400074a0: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* * 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 ); 400074a4: 7f ff fe 80 call 40006ea4 <_Objects_Extend_information> 400074a8: 81 e8 00 00 restore /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 400074ac: 92 10 20 01 mov 1, %o1 400074b0: 7f ff fe 1e call 40006d28 <_Internal_error_Occurred> 400074b4: 94 10 20 14 mov 0x14, %o2 400074b8: 01 00 00 00 nop 40007578 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40007578: 9d e3 bf a0 save %sp, -96, %sp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 4000757c: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 40007580: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 40007584: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40007588: 92 10 00 11 mov %l1, %o1 4000758c: 40 00 3f f5 call 40017560 <.udiv> 40007590: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40007594: 80 a2 20 00 cmp %o0, 0 40007598: 02 80 00 12 be 400075e0 <_Objects_Shrink_information+0x68> 4000759c: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 400075a0: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400075a4: c4 00 c0 00 ld [ %g3 ], %g2 400075a8: 80 a4 40 02 cmp %l1, %g2 400075ac: 12 80 00 09 bne 400075d0 <_Objects_Shrink_information+0x58> 400075b0: 82 10 20 00 clr %g1 400075b4: 10 80 00 0d b 400075e8 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 400075b8: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400075bc: a0 04 00 11 add %l0, %l1, %l0 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 ] == 400075c0: 80 a4 40 02 cmp %l1, %g2 400075c4: 02 80 00 09 be 400075e8 <_Objects_Shrink_information+0x70> 400075c8: 84 04 a0 04 add %l2, 4, %g2 400075cc: a4 10 00 02 mov %g2, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 400075d0: 82 00 60 01 inc %g1 400075d4: 80 a2 00 01 cmp %o0, %g1 400075d8: 38 bf ff f9 bgu,a 400075bc <_Objects_Shrink_information+0x44> 400075dc: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 400075e0: 81 c7 e0 08 ret 400075e4: 81 e8 00 00 restore information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 400075e8: 10 80 00 06 b 40007600 <_Objects_Shrink_information+0x88> 400075ec: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 400075f0: 80 a4 60 00 cmp %l1, 0 400075f4: 22 80 00 12 be,a 4000763c <_Objects_Shrink_information+0xc4> 400075f8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400075fc: 90 10 00 11 mov %l1, %o0 * 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 ); 40007600: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 40007604: 80 a0 40 10 cmp %g1, %l0 40007608: 0a bf ff fa bcs 400075f0 <_Objects_Shrink_information+0x78> 4000760c: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 40007610: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 40007614: 84 04 00 02 add %l0, %g2, %g2 40007618: 80 a0 40 02 cmp %g1, %g2 4000761c: 1a bf ff f6 bcc 400075f4 <_Objects_Shrink_information+0x7c> 40007620: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 40007624: 40 00 0f fc call 4000b614 <_Chain_Extract> 40007628: 01 00 00 00 nop } } while ( the_object ); 4000762c: 80 a4 60 00 cmp %l1, 0 40007630: 12 bf ff f4 bne 40007600 <_Objects_Shrink_information+0x88> 40007634: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40007638: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 4000763c: 40 00 06 f0 call 400091fc <_Workspace_Free> 40007640: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007644: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40007648: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 4000764c: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 40007650: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40007654: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 40007658: 84 20 c0 02 sub %g3, %g2, %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 4000765c: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40007660: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 40007664: 81 c7 e0 08 ret 40007668: 81 e8 00 00 restore 4000b3c4 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000b3c4: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4000b3c8: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 if ( !api ) 4000b3cc: 80 a4 20 00 cmp %l0, 0 4000b3d0: 02 80 00 1f be 4000b44c <_RTEMS_tasks_Post_switch_extension+0x88> 4000b3d4: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000b3d8: 7f ff da 41 call 40001cdc 4000b3dc: 01 00 00 00 nop signal_set = asr->signals_posted; 4000b3e0: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 4000b3e4: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 4000b3e8: 7f ff da 41 call 40001cec 4000b3ec: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000b3f0: 80 a4 60 00 cmp %l1, 0 4000b3f4: 32 80 00 04 bne,a 4000b404 <_RTEMS_tasks_Post_switch_extension+0x40> 4000b3f8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4000b3fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000b400: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b404: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b408: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b40c: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000b410: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b414: 94 10 00 12 mov %l2, %o2 4000b418: 27 00 00 3f sethi %hi(0xfc00), %l3 4000b41c: 40 00 07 c5 call 4000d330 4000b420: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000b424: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000b428: 9f c0 40 00 call %g1 4000b42c: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 4000b430: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b434: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b438: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b43c: 92 14 e3 ff or %l3, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000b440: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000b444: 40 00 07 bb call 4000d330 4000b448: 94 10 00 12 mov %l2, %o2 4000b44c: 81 c7 e0 08 ret 4000b450: 81 e8 00 00 restore 400076d0 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 400076d0: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 400076d4: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 /* * 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 ); 400076d8: 40 00 04 41 call 400087dc <_Thread_Set_transient> 400076dc: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 400076e0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400076e4: 80 a0 40 19 cmp %g1, %i1 400076e8: 02 80 00 05 be 400076fc <_Thread_Change_priority+0x2c> 400076ec: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 400076f0: 92 10 00 19 mov %i1, %o1 400076f4: 40 00 03 be call 400085ec <_Thread_Set_priority> 400076f8: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 400076fc: 7f ff e9 78 call 40001cdc 40007700: 01 00 00 00 nop 40007704: b0 10 00 08 mov %o0, %i0 /* * 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; 40007708: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 4000770c: 80 a4 a0 04 cmp %l2, 4 40007710: 02 80 00 18 be 40007770 <_Thread_Change_priority+0xa0> 40007714: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 40007718: 02 80 00 0b be 40007744 <_Thread_Change_priority+0x74> 4000771c: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 40007720: 7f ff e9 73 call 40001cec <== NOT EXECUTED 40007724: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 40007728: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 4000772c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 40007730: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 40007734: 32 80 00 0d bne,a 40007768 <_Thread_Change_priority+0x98> <== NOT EXECUTED 40007738: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 4000773c: 81 c7 e0 08 ret 40007740: 81 e8 00 00 restore */ 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 ); 40007744: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 40007748: 7f ff e9 69 call 40001cec 4000774c: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 40007750: 03 00 00 ef sethi %hi(0x3bc00), %g1 40007754: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40007758: 80 8c 80 01 btst %l2, %g1 4000775c: 02 bf ff f8 be 4000773c <_Thread_Change_priority+0x6c> 40007760: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 40007764: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 40007768: 40 00 03 71 call 4000852c <_Thread_queue_Requeue> 4000776c: 93 e8 00 10 restore %g0, %l0, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 40007770: 12 80 00 14 bne 400077c0 <_Thread_Change_priority+0xf0> 40007774: 23 10 00 70 sethi %hi(0x4001c000), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40007778: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 4000777c: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 40007780: c6 10 40 00 lduh [ %g1 ], %g3 * 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 ); 40007784: c0 24 20 10 clr [ %l0 + 0x10 ] 40007788: 84 10 c0 02 or %g3, %g2, %g2 4000778c: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 40007790: c4 14 60 b0 lduh [ %l1 + 0xb0 ], %g2 40007794: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 40007798: 80 8e a0 ff btst 0xff, %i2 4000779c: 82 10 80 01 or %g2, %g1, %g1 400077a0: c2 34 60 b0 sth %g1, [ %l1 + 0xb0 ] 400077a4: 02 80 00 48 be 400078c4 <_Thread_Change_priority+0x1f4> 400077a8: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400077ac: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400077b0: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 400077b4: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 400077b8: e0 20 a0 04 st %l0, [ %g2 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 400077bc: c4 24 00 00 st %g2, [ %l0 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 400077c0: 7f ff e9 4b call 40001cec 400077c4: 90 10 00 18 mov %i0, %o0 400077c8: 7f ff e9 45 call 40001cdc 400077cc: 01 00 00 00 nop 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 ); 400077d0: c2 14 60 b0 lduh [ %l1 + 0xb0 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 400077d4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400077d8: 83 28 60 10 sll %g1, 0x10, %g1 400077dc: da 00 a3 54 ld [ %g2 + 0x354 ], %o5 400077e0: 85 30 60 10 srl %g1, 0x10, %g2 400077e4: 80 a0 a0 ff cmp %g2, 0xff 400077e8: 08 80 00 27 bleu 40007884 <_Thread_Change_priority+0x1b4> 400077ec: 07 10 00 6a sethi %hi(0x4001a800), %g3 400077f0: 83 30 60 18 srl %g1, 0x18, %g1 400077f4: 86 10 e1 c8 or %g3, 0x1c8, %g3 400077f8: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 400077fc: 09 10 00 70 sethi %hi(0x4001c000), %g4 40007800: 85 28 a0 10 sll %g2, 0x10, %g2 40007804: 88 11 21 30 or %g4, 0x130, %g4 40007808: 83 30 a0 0f srl %g2, 0xf, %g1 4000780c: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40007810: 83 28 60 10 sll %g1, 0x10, %g1 40007814: 89 30 60 10 srl %g1, 0x10, %g4 40007818: 80 a1 20 ff cmp %g4, 0xff 4000781c: 18 80 00 28 bgu 400078bc <_Thread_Change_priority+0x1ec> 40007820: 83 30 60 18 srl %g1, 0x18, %g1 40007824: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40007828: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4000782c: 85 30 a0 0c srl %g2, 0xc, %g2 40007830: 83 28 60 10 sll %g1, 0x10, %g1 40007834: 83 30 60 10 srl %g1, 0x10, %g1 40007838: 82 00 40 02 add %g1, %g2, %g1 4000783c: 85 28 60 04 sll %g1, 4, %g2 40007840: 83 28 60 02 sll %g1, 2, %g1 40007844: 82 20 80 01 sub %g2, %g1, %g1 40007848: c2 03 40 01 ld [ %o5 + %g1 ], %g1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 4000784c: 05 10 00 70 sethi %hi(0x4001c000), %g2 40007850: c4 00 a0 bc ld [ %g2 + 0xbc ], %g2 ! 4001c0bc <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40007854: 07 10 00 70 sethi %hi(0x4001c000), %g3 * 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() && 40007858: 80 a0 40 02 cmp %g1, %g2 4000785c: 02 80 00 08 be 4000787c <_Thread_Change_priority+0x1ac> 40007860: c2 20 e0 8c st %g1, [ %g3 + 0x8c ] _Thread_Executing->is_preemptible ) 40007864: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 40007868: 80 a0 60 00 cmp %g1, 0 4000786c: 02 80 00 04 be 4000787c <_Thread_Change_priority+0x1ac> 40007870: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 40007874: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007878: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> _ISR_Enable( level ); 4000787c: 7f ff e9 1c call 40001cec 40007880: 81 e8 00 00 restore 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 ); 40007884: 86 10 e1 c8 or %g3, 0x1c8, %g3 40007888: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4000788c: 09 10 00 70 sethi %hi(0x4001c000), %g4 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 ); 40007890: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40007894: 88 11 21 30 or %g4, 0x130, %g4 40007898: 85 28 a0 10 sll %g2, 0x10, %g2 4000789c: 83 30 a0 0f srl %g2, 0xf, %g1 400078a0: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 400078a4: 83 28 60 10 sll %g1, 0x10, %g1 400078a8: 89 30 60 10 srl %g1, 0x10, %g4 400078ac: 80 a1 20 ff cmp %g4, 0xff 400078b0: 28 bf ff de bleu,a 40007828 <_Thread_Change_priority+0x158> 400078b4: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 400078b8: 83 30 60 18 srl %g1, 0x18, %g1 400078bc: 10 bf ff dc b 4000782c <_Thread_Change_priority+0x15c> 400078c0: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400078c4: 84 00 60 04 add %g1, 4, %g2 400078c8: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 400078cc: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 400078d0: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 400078d4: c4 24 20 04 st %g2, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 400078d8: 10 bf ff ba b 400077c0 <_Thread_Change_priority+0xf0> 400078dc: e0 20 80 00 st %l0, [ %g2 ] 4000c17c <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000c17c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000c180: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000c184: e0 00 60 bc ld [ %g1 + 0xbc ], %l0 ! 4001c0bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000c188: 7f ff d6 d5 call 40001cdc 4000c18c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000c190: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000c194: c4 04 40 00 ld [ %l1 ], %g2 4000c198: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000c19c: 80 a0 80 01 cmp %g2, %g1 4000c1a0: 02 80 00 1f be 4000c21c <_Thread_Reset_timeslice+0xa0> 4000c1a4: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000c1a8: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 4000c1ac: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000c1b0: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000c1b4: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000c1b8: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000c1bc: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000c1c0: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000c1c4: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000c1c8: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000c1cc: 7f ff d6 c8 call 40001cec 4000c1d0: 01 00 00 00 nop 4000c1d4: 7f ff d6 c2 call 40001cdc 4000c1d8: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000c1dc: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000c1e0: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 ! 4001c08c <_Thread_Heir> 4000c1e4: 80 a4 00 02 cmp %l0, %g2 4000c1e8: 02 80 00 06 be 4000c200 <_Thread_Reset_timeslice+0x84> 4000c1ec: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4000c1f0: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED 4000c1f4: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000c1f8: 7f ff d6 bd call 40001cec <== NOT EXECUTED 4000c1fc: 81 e8 00 00 restore <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4000c200: c4 04 40 00 ld [ %l1 ], %g2 4000c204: c4 20 60 8c st %g2, [ %g1 + 0x8c ] _Context_Switch_necessary = true; 4000c208: 84 10 20 01 mov 1, %g2 4000c20c: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000c210: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> _ISR_Enable( level ); 4000c214: 7f ff d6 b6 call 40001cec 4000c218: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000c21c: 7f ff d6 b4 call 40001cec 4000c220: 81 e8 00 00 restore 4000c224: 01 00 00 00 nop 40008a08 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 40008a08: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 40008a0c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a10: e0 00 60 bc ld [ %g1 + 0xbc ], %l0 ! 4001c0bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 40008a14: 7f ff e4 b2 call 40001cdc 40008a18: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40008a1c: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40008a20: c4 04 40 00 ld [ %l1 ], %g2 40008a24: c2 04 60 08 ld [ %l1 + 8 ], %g1 40008a28: 80 a0 80 01 cmp %g2, %g1 40008a2c: 02 80 00 19 be 40008a90 <_Thread_Yield_processor+0x88> 40008a30: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40008a34: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40008a38: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40008a3c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008a40: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008a44: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 40008a48: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40008a4c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008a50: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 40008a54: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40008a58: 7f ff e4 a5 call 40001cec 40008a5c: 01 00 00 00 nop 40008a60: 7f ff e4 9f call 40001cdc 40008a64: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40008a68: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a6c: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 ! 4001c08c <_Thread_Heir> 40008a70: 80 a4 00 02 cmp %l0, %g2 40008a74: 22 80 00 0e be,a 40008aac <_Thread_Yield_processor+0xa4> 40008a78: c4 04 40 00 ld [ %l1 ], %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 40008a7c: 84 10 20 01 mov 1, %g2 40008a80: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a84: c4 28 60 cc stb %g2, [ %g1 + 0xcc ] ! 4001c0cc <_Context_Switch_necessary> _ISR_Enable( level ); 40008a88: 7f ff e4 99 call 40001cec 40008a8c: 81 e8 00 00 restore if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 40008a90: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008a94: c2 00 60 8c ld [ %g1 + 0x8c ], %g1 ! 4001c08c <_Thread_Heir> 40008a98: 80 a4 00 01 cmp %l0, %g1 40008a9c: 32 bf ff f9 bne,a 40008a80 <_Thread_Yield_processor+0x78> 40008aa0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 40008aa4: 7f ff e4 92 call 40001cec 40008aa8: 81 e8 00 00 restore _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 40008aac: 10 bf ff f4 b 40008a7c <_Thread_Yield_processor+0x74> 40008ab0: c4 20 60 8c st %g2, [ %g1 + 0x8c ] 40008270 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 40008270: 9d e3 bf a0 save %sp, -96, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 40008274: e0 06 60 14 ld [ %i1 + 0x14 ], %l0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40008278: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 4000827c: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40008280: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40008284: 82 06 60 38 add %i1, 0x38, %g1 40008288: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 4000828c: 2d 10 00 6d sethi %hi(0x4001b400), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40008290: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40008294: 80 8c 20 20 btst 0x20, %l0 _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 ]; 40008298: ab 28 60 04 sll %g1, 4, %l5 4000829c: ac 15 a3 14 or %l6, 0x314, %l6 400082a0: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 400082a4: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 _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 ]; 400082a8: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 400082ac: 12 80 00 24 bne 4000833c <_Thread_queue_Enqueue_priority+0xcc> 400082b0: aa 06 00 15 add %i0, %l5, %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400082b4: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 400082b8: 7f ff e6 89 call 40001cdc 400082bc: 01 00 00 00 nop 400082c0: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 400082c4: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400082c8: 80 a0 40 16 cmp %g1, %l6 400082cc: 02 80 00 3a be 400083b4 <_Thread_queue_Enqueue_priority+0x144> 400082d0: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 400082d4: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 400082d8: 80 a4 00 13 cmp %l0, %l3 400082dc: 18 80 00 0b bgu 40008308 <_Thread_queue_Enqueue_priority+0x98> 400082e0: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400082e4: 10 80 00 36 b 400083bc <_Thread_queue_Enqueue_priority+0x14c> 400082e8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 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 ) ) { 400082ec: 80 a4 40 16 cmp %l1, %l6 400082f0: 02 80 00 32 be 400083b8 <_Thread_queue_Enqueue_priority+0x148> 400082f4: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 400082f8: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 400082fc: 80 a4 00 13 cmp %l0, %l3 40008300: 28 80 00 2f bleu,a 400083bc <_Thread_queue_Enqueue_priority+0x14c> 40008304: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 40008308: 7f ff e6 79 call 40001cec 4000830c: 90 10 00 12 mov %l2, %o0 40008310: 7f ff e6 73 call 40001cdc 40008314: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40008318: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 4000831c: 80 8d 00 01 btst %l4, %g1 40008320: 32 bf ff f3 bne,a 400082ec <_Thread_queue_Enqueue_priority+0x7c> 40008324: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40008328: 7f ff e6 71 call 40001cec <== NOT EXECUTED 4000832c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40008330: 30 bf ff e2 b,a 400082b8 <_Thread_queue_Enqueue_priority+0x48> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 40008334: 7f ff e6 6e call 40001cec 40008338: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4000833c: 7f ff e6 68 call 40001cdc 40008340: e6 0d 80 00 ldub [ %l6 ], %l3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40008344: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 40008348: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 4000834c: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40008350: 80 a0 40 15 cmp %g1, %l5 40008354: 02 80 00 20 be 400083d4 <_Thread_queue_Enqueue_priority+0x164> 40008358: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 4000835c: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 40008360: 80 a4 00 13 cmp %l0, %l3 40008364: 0a 80 00 0b bcs 40008390 <_Thread_queue_Enqueue_priority+0x120> 40008368: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4000836c: 10 80 00 1b b 400083d8 <_Thread_queue_Enqueue_priority+0x168> 40008370: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 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 ) ) { 40008374: 80 a4 40 15 cmp %l1, %l5 40008378: 02 80 00 17 be 400083d4 <_Thread_queue_Enqueue_priority+0x164> 4000837c: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 40008380: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 40008384: 80 a4 00 13 cmp %l0, %l3 40008388: 3a 80 00 14 bcc,a 400083d8 <_Thread_queue_Enqueue_priority+0x168> 4000838c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40008390: 7f ff e6 57 call 40001cec 40008394: 90 10 00 12 mov %l2, %o0 40008398: 7f ff e6 51 call 40001cdc 4000839c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400083a0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400083a4: 80 8d 00 01 btst %l4, %g1 400083a8: 32 bf ff f3 bne,a 40008374 <_Thread_queue_Enqueue_priority+0x104> 400083ac: e2 04 60 04 ld [ %l1 + 4 ], %l1 400083b0: 30 bf ff e1 b,a 40008334 <_Thread_queue_Enqueue_priority+0xc4> 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 ) ) { 400083b4: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400083b8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400083bc: 80 a0 a0 01 cmp %g2, 1 400083c0: 02 80 00 17 be 4000841c <_Thread_queue_Enqueue_priority+0x1ac> 400083c4: 80 a4 00 13 cmp %l0, %l3 * 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; 400083c8: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 400083cc: 81 c7 e0 08 ret 400083d0: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400083d4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400083d8: 80 a0 a0 01 cmp %g2, 1 400083dc: 32 bf ff fc bne,a 400083cc <_Thread_queue_Enqueue_priority+0x15c> 400083e0: e4 26 80 00 st %l2, [ %i2 ] THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 400083e4: 80 a4 00 13 cmp %l0, %l3 400083e8: 02 80 00 1a be 40008450 <_Thread_queue_Enqueue_priority+0x1e0> 400083ec: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400083f0: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400083f4: c2 26 60 04 st %g1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 400083f8: c4 26 40 00 st %g2, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 400083fc: f0 26 60 44 st %i0, [ %i1 + 0x44 ] 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; 40008400: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 40008404: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40008408: b0 10 20 01 mov 1, %i0 4000840c: 7f ff e6 38 call 40001cec 40008410: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008414: 81 c7 e0 08 ret 40008418: 81 e8 00 00 restore THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 4000841c: 02 80 00 0d be 40008450 <_Thread_queue_Enqueue_priority+0x1e0> 40008420: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40008424: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008428: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 4000842c: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40008430: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40008434: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40008438: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000843c: b0 10 20 01 mov 1, %i0 40008440: 7f ff e6 2b call 40001cec 40008444: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008448: 81 c7 e0 08 ret 4000844c: 81 e8 00 00 restore 40008450: a2 04 60 3c add %l1, 0x3c, %l1 _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; 40008454: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40008458: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 4000845c: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40008460: f0 26 60 44 st %i0, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40008464: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40008468: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000846c: b0 10 20 01 mov 1, %i0 40008470: 7f ff e6 1f call 40001cec 40008474: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40008478: 81 c7 e0 08 ret 4000847c: 81 e8 00 00 restore 4000852c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000852c: 9d e3 bf 98 save %sp, -104, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 40008530: 80 a6 20 00 cmp %i0, 0 40008534: 02 80 00 13 be 40008580 <_Thread_queue_Requeue+0x54> 40008538: 01 00 00 00 nop /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4000853c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40008540: 80 a4 60 01 cmp %l1, 1 40008544: 02 80 00 04 be 40008554 <_Thread_queue_Requeue+0x28> 40008548: 01 00 00 00 nop 4000854c: 81 c7 e0 08 ret <== NOT EXECUTED 40008550: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40008554: 7f ff e5 e2 call 40001cdc 40008558: 01 00 00 00 nop 4000855c: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40008560: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40008564: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008568: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000856c: 80 88 80 01 btst %g2, %g1 40008570: 12 80 00 06 bne 40008588 <_Thread_queue_Requeue+0x5c> 40008574: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 40008578: 7f ff e5 dd call 40001cec 4000857c: 90 10 00 10 mov %l0, %o0 40008580: 81 c7 e0 08 ret 40008584: 81 e8 00 00 restore ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 40008588: 92 10 00 19 mov %i1, %o1 4000858c: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 40008590: 40 00 0e 59 call 4000bef4 <_Thread_queue_Extract_priority_helper> 40008594: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40008598: 90 10 00 18 mov %i0, %o0 4000859c: 92 10 00 19 mov %i1, %o1 400085a0: 7f ff ff 34 call 40008270 <_Thread_queue_Enqueue_priority> 400085a4: 94 07 bf fc add %fp, -4, %o2 400085a8: 30 bf ff f4 b,a 40008578 <_Thread_queue_Requeue+0x4c> 40015acc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40015acc: 9d e3 bf 88 save %sp, -120, %sp 40015ad0: 2d 10 00 f1 sethi %hi(0x4003c400), %l6 40015ad4: ba 07 bf f4 add %fp, -12, %i5 40015ad8: a8 07 bf f8 add %fp, -8, %l4 40015adc: a4 07 bf e8 add %fp, -24, %l2 40015ae0: ae 07 bf ec add %fp, -20, %l7 40015ae4: 2b 10 00 f1 sethi %hi(0x4003c400), %l5 40015ae8: 39 10 00 f1 sethi %hi(0x4003c400), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40015aec: c0 27 bf f8 clr [ %fp + -8 ] 40015af0: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40015af4: fa 27 bf fc st %i5, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40015af8: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015afc: e4 27 bf f0 st %l2, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40015b00: ee 27 bf e8 st %l7, [ %fp + -24 ] 40015b04: ac 15 a1 c4 or %l6, 0x1c4, %l6 40015b08: aa 15 61 00 or %l5, 0x100, %l5 40015b0c: b8 17 20 70 or %i4, 0x70, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b10: a2 06 20 30 add %i0, 0x30, %l1 /* * 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 ); 40015b14: a6 06 20 68 add %i0, 0x68, %l3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015b18: b2 06 20 08 add %i0, 8, %i1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40015b1c: b4 06 20 40 add %i0, 0x40, %i2 _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; 40015b20: b6 10 20 01 mov 1, %i3 { /* * 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; 40015b24: fa 26 20 78 st %i5, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40015b28: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40015b2c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b30: 90 10 00 11 mov %l1, %o0 40015b34: 92 20 40 09 sub %g1, %o1, %o1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40015b38: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015b3c: 40 00 11 c0 call 4001a23c <_Watchdog_Adjust_to_chain> 40015b40: 94 10 00 12 mov %l2, %o2 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40015b44: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 40015b48: e0 05 40 00 ld [ %l5 ], %l0 /* * 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 ) { 40015b4c: 80 a4 00 09 cmp %l0, %o1 40015b50: 38 80 00 2f bgu,a 40015c0c <_Timer_server_Body+0x140> 40015b54: 92 24 00 09 sub %l0, %o1, %o1 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 40015b58: 80 a4 00 09 cmp %l0, %o1 40015b5c: 0a 80 00 30 bcs 40015c1c <_Timer_server_Body+0x150> 40015b60: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 40015b64: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 40015b68: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40015b6c: 40 00 02 98 call 400165cc <_Chain_Get> 40015b70: 01 00 00 00 nop if ( timer == NULL ) { 40015b74: 80 a2 20 00 cmp %o0, 0 40015b78: 02 80 00 10 be 40015bb8 <_Timer_server_Body+0xec> 40015b7c: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40015b80: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40015b84: 80 a0 60 01 cmp %g1, 1 40015b88: 02 80 00 29 be 40015c2c <_Timer_server_Body+0x160> 40015b8c: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40015b90: 12 bf ff f6 bne 40015b68 <_Timer_server_Body+0x9c> 40015b94: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40015b98: 40 00 11 df call 4001a314 <_Watchdog_Insert> 40015b9c: 90 10 00 13 mov %l3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 40015ba0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40015ba4: 40 00 02 8a call 400165cc <_Chain_Get> 40015ba8: 01 00 00 00 nop if ( timer == NULL ) { 40015bac: 80 a2 20 00 cmp %o0, 0 40015bb0: 32 bf ff f5 bne,a 40015b84 <_Timer_server_Body+0xb8> 40015bb4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 40015bb8: 7f ff e3 a4 call 4000ea48 40015bbc: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40015bc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40015bc4: 80 a5 00 01 cmp %l4, %g1 40015bc8: 02 80 00 1d be 40015c3c <_Timer_server_Body+0x170> 40015bcc: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40015bd0: 7f ff e3 a2 call 4000ea58 <== NOT EXECUTED 40015bd4: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 40015bd8: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40015bdc: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015be0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40015be4: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 40015be8: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40015bec: 40 00 11 94 call 4001a23c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 40015bf0: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 40015bf4: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== 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(); 40015bf8: e0 05 40 00 ld [ %l5 ], %l0 <== 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 ) { 40015bfc: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 40015c00: 08 bf ff d7 bleu 40015b5c <_Timer_server_Body+0x90> <== NOT EXECUTED 40015c04: 01 00 00 00 nop <== 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 ); 40015c08: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 40015c0c: 90 10 00 13 mov %l3, %o0 40015c10: 40 00 11 8b call 4001a23c <_Watchdog_Adjust_to_chain> 40015c14: 94 10 00 12 mov %l2, %o2 40015c18: 30 bf ff d3 b,a 40015b64 <_Timer_server_Body+0x98> /* * 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 ); 40015c1c: 90 10 00 13 mov %l3, %o0 40015c20: 40 00 11 57 call 4001a17c <_Watchdog_Adjust> 40015c24: 92 10 20 01 mov 1, %o1 40015c28: 30 bf ff cf b,a 40015b64 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 40015c2c: 92 02 20 10 add %o0, 0x10, %o1 40015c30: 40 00 11 b9 call 4001a314 <_Watchdog_Insert> 40015c34: 90 10 00 11 mov %l1, %o0 40015c38: 30 bf ff cc b,a 40015b68 <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 40015c3c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40015c40: 7f ff e3 86 call 4000ea58 40015c44: 01 00 00 00 nop _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 ) ) { 40015c48: c2 07 bf e8 ld [ %fp + -24 ], %g1 40015c4c: 80 a5 c0 01 cmp %l7, %g1 40015c50: 12 80 00 0c bne 40015c80 <_Timer_server_Body+0x1b4> 40015c54: 01 00 00 00 nop 40015c58: 30 80 00 13 b,a 40015ca4 <_Timer_server_Body+0x1d8> * 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; 40015c5c: c0 24 20 08 clr [ %l0 + 8 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 40015c60: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 40015c64: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 40015c68: 7f ff e3 7c call 4000ea58 40015c6c: 01 00 00 00 nop /* * 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 ); 40015c70: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 40015c74: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 40015c78: 9f c0 40 00 call %g1 40015c7c: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 40015c80: 7f ff e3 72 call 4000ea48 40015c84: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40015c88: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40015c8c: 80 a5 c0 10 cmp %l7, %l0 40015c90: 32 bf ff f3 bne,a 40015c5c <_Timer_server_Body+0x190> 40015c94: c2 04 00 00 ld [ %l0 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 40015c98: 7f ff e3 70 call 4000ea58 40015c9c: 01 00 00 00 nop 40015ca0: 30 bf ff a1 b,a 40015b24 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40015ca4: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40015ca8: c2 07 00 00 ld [ %i4 ], %g1 40015cac: 82 00 60 01 inc %g1 40015cb0: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40015cb4: d0 06 00 00 ld [ %i0 ], %o0 40015cb8: 40 00 0e 90 call 400196f8 <_Thread_Set_state> 40015cbc: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40015cc0: 7f ff ff 59 call 40015a24 <_Timer_server_Reset_interval_system_watchdog> 40015cc4: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40015cc8: 7f ff ff 6c call 40015a78 <_Timer_server_Reset_tod_system_watchdog> 40015ccc: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40015cd0: 40 00 0b c1 call 40018bd4 <_Thread_Enable_dispatch> 40015cd4: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015cd8: 90 10 00 19 mov %i1, %o0 _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; 40015cdc: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015ce0: 40 00 11 fa call 4001a4c8 <_Watchdog_Remove> 40015ce4: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40015ce8: 40 00 11 f8 call 4001a4c8 <_Watchdog_Remove> 40015cec: 90 10 00 1a mov %i2, %o0 40015cf0: 30 bf ff 8d b,a 40015b24 <_Timer_server_Body+0x58> 4000b0a4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000b0a4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000b0a8: 7f ff de da call 40002c10 4000b0ac: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000b0b0: c2 06 00 00 ld [ %i0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000b0b4: a2 06 20 04 add %i0, 4, %l1 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000b0b8: 80 a0 40 11 cmp %g1, %l1 4000b0bc: 02 80 00 1f be 4000b138 <_Watchdog_Adjust+0x94> 4000b0c0: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000b0c4: 12 80 00 1f bne 4000b140 <_Watchdog_Adjust+0x9c> 4000b0c8: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000b0cc: 80 a6 a0 00 cmp %i2, 0 4000b0d0: 02 80 00 1a be 4000b138 <_Watchdog_Adjust+0x94> 4000b0d4: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000b0d8: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000b0dc: 80 a6 80 19 cmp %i2, %i1 4000b0e0: 1a 80 00 0b bcc 4000b10c <_Watchdog_Adjust+0x68> 4000b0e4: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 4000b0e8: 10 80 00 1d b 4000b15c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000b0ec: b4 26 40 1a sub %i1, %i2, %i2 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000b0f0: b4 a6 80 19 subcc %i2, %i1, %i2 4000b0f4: 02 80 00 11 be 4000b138 <_Watchdog_Adjust+0x94> 4000b0f8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000b0fc: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000b100: 80 a6 40 1a cmp %i1, %i2 4000b104: 38 80 00 16 bgu,a 4000b15c <_Watchdog_Adjust+0xb8> 4000b108: b4 26 40 1a sub %i1, %i2, %i2 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4000b10c: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 4000b110: 7f ff de c4 call 40002c20 4000b114: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000b118: 40 00 00 b6 call 4000b3f0 <_Watchdog_Tickle> 4000b11c: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000b120: 7f ff de bc call 40002c10 4000b124: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000b128: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 4000b12c: 80 a4 40 02 cmp %l1, %g2 4000b130: 12 bf ff f0 bne 4000b0f0 <_Watchdog_Adjust+0x4c> 4000b134: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 4000b138: 7f ff de ba call 40002c20 4000b13c: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000b140: 12 bf ff fe bne 4000b138 <_Watchdog_Adjust+0x94> 4000b144: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000b148: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000b14c: b4 00 80 1a add %g2, %i2, %i2 4000b150: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 4000b154: 7f ff de b3 call 40002c20 4000b158: 91 e8 00 08 restore %g0, %o0, %o0 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; 4000b15c: 10 bf ff f7 b 4000b138 <_Watchdog_Adjust+0x94> 4000b160: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 40007fc0 : 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 ) { 40007fc0: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40007fc4: 03 10 00 88 sethi %hi(0x40022000), %g1 40007fc8: c2 00 63 38 ld [ %g1 + 0x338 ], %g1 ! 40022338 <_ISR_Nest_level> 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; 40007fcc: 09 10 00 89 sethi %hi(0x40022400), %g4 if ( rtems_interrupt_is_in_progress() ) 40007fd0: 80 a0 60 00 cmp %g1, 0 40007fd4: 84 10 20 12 mov 0x12, %g2 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 ) { 40007fd8: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40007fdc: 12 80 00 49 bne 40008100 40007fe0: c6 01 21 a0 ld [ %g4 + 0x1a0 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 40007fe4: 80 a6 a0 00 cmp %i2, 0 40007fe8: 02 80 00 4b be 40008114 40007fec: 80 a6 60 00 cmp %i1, 0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 40007ff0: 02 80 00 49 be 40008114 40007ff4: c6 26 80 00 st %g3, [ %i2 ] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40007ff8: c4 06 40 00 ld [ %i1 ], %g2 40007ffc: 80 a0 a0 00 cmp %g2, 0 40008000: 22 80 00 42 be,a 40008108 40008004: c4 06 60 04 ld [ %i1 + 4 ], %g2 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 40008008: 80 a0 c0 18 cmp %g3, %i0 4000800c: 08 80 00 3d bleu 40008100 40008010: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008014: 05 10 00 88 sethi %hi(0x40022000), %g2 40008018: c6 00 a2 a0 ld [ %g2 + 0x2a0 ], %g3 ! 400222a0 <_Thread_Dispatch_disable_level> 4000801c: 86 00 e0 01 inc %g3 40008020: c6 20 a2 a0 st %g3, [ %g2 + 0x2a0 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 40008024: 80 a6 20 00 cmp %i0, 0 40008028: 12 80 00 2b bne 400080d4 4000802c: 05 10 00 89 sethi %hi(0x40022400), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 40008030: da 01 21 a0 ld [ %g4 + 0x1a0 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 40008034: 80 a3 60 00 cmp %o5, 0 40008038: 02 80 00 3a be 40008120 4000803c: d8 00 a1 a4 ld [ %g2 + 0x1a4 ], %o4 40008040: 10 80 00 05 b 40008054 40008044: 86 10 00 0c mov %o4, %g3 40008048: 80 a3 40 18 cmp %o5, %i0 4000804c: 08 80 00 0b bleu 40008078 40008050: 86 00 e0 18 add %g3, 0x18, %g3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40008054: c8 00 c0 00 ld [ %g3 ], %g4 40008058: 80 a1 20 00 cmp %g4, 0 4000805c: 32 bf ff fb bne,a 40008048 40008060: b0 06 20 01 inc %i0 40008064: c8 00 e0 04 ld [ %g3 + 4 ], %g4 40008068: 80 a1 20 00 cmp %g4, 0 4000806c: 32 bf ff f7 bne,a 40008048 40008070: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 40008074: 80 a3 40 18 cmp %o5, %i0 40008078: 02 80 00 2b be 40008124 4000807c: f0 26 80 00 st %i0, [ %i2 ] 40008080: 85 2e 20 03 sll %i0, 3, %g2 40008084: 87 2e 20 05 sll %i0, 5, %g3 40008088: 84 20 c0 02 sub %g3, %g2, %g2 4000808c: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40008090: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40008094: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40008098: c6 20 80 00 st %g3, [ %g2 ] 4000809c: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 400080a0: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400080a4: c6 20 a0 04 st %g3, [ %g2 + 4 ] 400080a8: c6 00 60 08 ld [ %g1 + 8 ], %g3 400080ac: c6 20 a0 08 st %g3, [ %g2 + 8 ] 400080b0: c6 00 60 0c ld [ %g1 + 0xc ], %g3 400080b4: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 400080b8: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 400080bc: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 400080c0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 400080c4: 40 00 07 0d call 40009cf8 <_Thread_Enable_dispatch> 400080c8: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 400080cc: 40 00 23 ae call 40010f84 400080d0: 81 e8 00 00 restore _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 400080d4: c6 00 a1 a4 ld [ %g2 + 0x1a4 ], %g3 400080d8: 89 2e 20 05 sll %i0, 5, %g4 400080dc: 85 2e 20 03 sll %i0, 3, %g2 400080e0: 84 21 00 02 sub %g4, %g2, %g2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 400080e4: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 400080e8: 80 a1 20 00 cmp %g4, 0 400080ec: 02 80 00 12 be 40008134 400080f0: 84 00 c0 02 add %g3, %g2, %g2 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(); 400080f4: 40 00 07 01 call 40009cf8 <_Thread_Enable_dispatch> 400080f8: 01 00 00 00 nop 400080fc: 84 10 20 0c mov 0xc, %g2 ! c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 40008100: 81 c7 e0 08 ret 40008104: 91 e8 00 02 restore %g0, %g2, %o0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40008108: 80 a0 a0 00 cmp %g2, 0 4000810c: 12 bf ff c0 bne 4000800c 40008110: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40008114: 84 10 20 09 mov 9, %g2 } 40008118: 81 c7 e0 08 ret 4000811c: 91 e8 00 02 restore %g0, %g2, %o0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 40008120: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 40008124: 40 00 06 f5 call 40009cf8 <_Thread_Enable_dispatch> 40008128: 01 00 00 00 nop return sc; 4000812c: 10 bf ff f5 b 40008100 40008130: 84 10 20 05 mov 5, %g2 ! 5 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 40008134: c6 00 a0 04 ld [ %g2 + 4 ], %g3 40008138: 80 a0 e0 00 cmp %g3, 0 4000813c: 12 bf ff ee bne 400080f4 40008140: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 40008144: 10 bf ff d3 b 40008090 40008148: f0 26 80 00 st %i0, [ %i2 ] 400089ec : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 400089ec: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 400089f0: 80 a6 20 00 cmp %i0, 0 400089f4: 02 80 00 23 be 40008a80 400089f8: 25 10 00 a8 sethi %hi(0x4002a000), %l2 400089fc: a4 14 a2 f4 or %l2, 0x2f4, %l2 ! 4002a2f4 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 40008a00: a6 04 a0 10 add %l2, 0x10, %l3 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40008a04: c2 04 80 00 ld [ %l2 ], %g1 40008a08: 80 a0 60 00 cmp %g1, 0 40008a0c: 22 80 00 1a be,a 40008a74 40008a10: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40008a14: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 40008a18: 80 a4 60 00 cmp %l1, 0 40008a1c: 22 80 00 16 be,a 40008a74 40008a20: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40008a24: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40008a28: 84 90 60 00 orcc %g1, 0, %g2 40008a2c: 22 80 00 12 be,a 40008a74 40008a30: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 40008a34: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40008a38: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40008a3c: 83 2c 20 02 sll %l0, 2, %g1 40008a40: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 40008a44: 90 90 60 00 orcc %g1, 0, %o0 40008a48: 02 80 00 05 be 40008a5c 40008a4c: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40008a50: 9f c6 00 00 call %i0 40008a54: 01 00 00 00 nop 40008a58: c4 14 60 10 lduh [ %l1 + 0x10 ], %g2 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40008a5c: 83 28 a0 10 sll %g2, 0x10, %g1 40008a60: 83 30 60 10 srl %g1, 0x10, %g1 40008a64: 80 a0 40 10 cmp %g1, %l0 40008a68: 3a bf ff f5 bcc,a 40008a3c 40008a6c: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40008a70: a4 04 a0 04 add %l2, 4, %l2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 40008a74: 80 a4 80 13 cmp %l2, %l3 40008a78: 32 bf ff e4 bne,a 40008a08 40008a7c: c2 04 80 00 ld [ %l2 ], %g1 40008a80: 81 c7 e0 08 ret 40008a84: 81 e8 00 00 restore