400074c0 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 400074c0: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400074c4: 23 10 00 75 sethi %hi(0x4001d400), %l1 400074c8: e0 04 61 44 ld [ %l1 + 0x144 ], %l0 ! 4001d544 <_API_extensions_List> 400074cc: a2 14 61 44 or %l1, 0x144, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400074d0: a2 04 60 04 add %l1, 4, %l1 400074d4: 80 a4 00 11 cmp %l0, %l1 400074d8: 02 80 00 09 be 400074fc <_API_extensions_Run_postdriver+0x3c> 400074dc: 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)(); 400074e0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400074e4: 9f c0 40 00 call %g1 400074e8: 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 ) { 400074ec: 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 ; 400074f0: 80 a4 00 11 cmp %l0, %l1 400074f4: 32 bf ff fc bne,a 400074e4 <_API_extensions_Run_postdriver+0x24> 400074f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400074fc: 81 c7 e0 08 ret 40007500: 81 e8 00 00 restore 40007504 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40007504: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007508: 23 10 00 75 sethi %hi(0x4001d400), %l1 4000750c: e0 04 61 44 ld [ %l1 + 0x144 ], %l0 ! 4001d544 <_API_extensions_List> 40007510: a2 14 61 44 or %l1, 0x144, %l1 40007514: a2 04 60 04 add %l1, 4, %l1 40007518: 80 a4 00 11 cmp %l0, %l1 4000751c: 02 80 00 0a be 40007544 <_API_extensions_Run_postswitch+0x40> 40007520: 25 10 00 74 sethi %hi(0x4001d000), %l2 40007524: a4 14 a3 bc or %l2, 0x3bc, %l2 ! 4001d3bc <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 40007528: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000752c: 9f c0 40 00 call %g1 40007530: 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 ) { 40007534: 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 ; 40007538: 80 a4 00 11 cmp %l0, %l1 4000753c: 32 bf ff fc bne,a 4000752c <_API_extensions_Run_postswitch+0x28> 40007540: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40007544: 81 c7 e0 08 ret 40007548: 81 e8 00 00 restore 4000c8c4 <_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 ) { 4000c8c4: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000c8c8: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000c8cc: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 4001d3bc <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000c8d0: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000c8d4: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000c8d8: 80 a0 a0 00 cmp %g2, 0 4000c8dc: 22 80 00 13 be,a 4000c928 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000c8e0: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000c8e4: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000c8e8: 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; 4000c8ec: 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; 4000c8f0: 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; 4000c8f4: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000c8f8: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000c8fc: 80 a0 a0 02 cmp %g2, 2 4000c900: 02 80 00 0f be 4000c93c <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000c904: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000c908: 80 a0 a0 03 cmp %g2, 3 4000c90c: 22 80 00 1f be,a 4000c988 <_CORE_mutex_Seize_interrupt_trylock+0xc4> 4000c910: da 00 60 1c ld [ %g1 + 0x1c ], %o5 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000c914: d0 06 40 00 ld [ %i1 ], %o0 4000c918: 7f ff d5 43 call 40001e24 4000c91c: b0 10 20 00 clr %i0 4000c920: 81 c7 e0 08 ret 4000c924: 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 ) ) { 4000c928: 80 a0 40 02 cmp %g1, %g2 4000c92c: 22 80 00 0c be,a 4000c95c <_CORE_mutex_Seize_interrupt_trylock+0x98> 4000c930: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000c934: 81 c7 e0 08 ret 4000c938: 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++; 4000c93c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000c940: 84 00 a0 01 inc %g2 4000c944: c4 20 60 1c st %g2, [ %g1 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4000c948: d0 06 40 00 ld [ %i1 ], %o0 4000c94c: 7f ff d5 36 call 40001e24 4000c950: b0 10 20 00 clr %i0 4000c954: 81 c7 e0 08 ret 4000c958: 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 ) { 4000c95c: 80 a0 a0 00 cmp %g2, 0 4000c960: 12 80 00 2b bne 4000ca0c <_CORE_mutex_Seize_interrupt_trylock+0x148> 4000c964: 80 a0 a0 01 cmp %g2, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000c968: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000c96c: 82 00 60 01 inc %g1 4000c970: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000c974: d0 06 40 00 ld [ %i1 ], %o0 4000c978: 7f ff d5 2b call 40001e24 4000c97c: b0 10 20 00 clr %i0 4000c980: 81 c7 e0 08 ret 4000c984: 81 e8 00 00 restore { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000c988: 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++; 4000c98c: 88 03 60 01 add %o5, 1, %g4 4000c990: c8 20 60 1c st %g4, [ %g1 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000c994: c8 06 20 4c ld [ %i0 + 0x4c ], %g4 current = executing->current_priority; if ( current == ceiling ) { 4000c998: 80 a1 00 02 cmp %g4, %g2 4000c99c: 02 80 00 24 be 4000ca2c <_CORE_mutex_Seize_interrupt_trylock+0x168> 4000c9a0: 01 00 00 00 nop _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4000c9a4: 1a 80 00 11 bcc 4000c9e8 <_CORE_mutex_Seize_interrupt_trylock+0x124> 4000c9a8: 84 10 20 06 mov 6, %g2 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000c9ac: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000c9b0: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001d300 <_Thread_Dispatch_disable_level> 4000c9b4: 84 00 a0 01 inc %g2 4000c9b8: c4 20 63 00 st %g2, [ %g1 + 0x300 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000c9bc: 7f ff d5 1a call 40001e24 4000c9c0: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000c9c4: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000c9c8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000c9cc: 94 10 20 00 clr %o2 4000c9d0: 7f ff ef c1 call 400088d4 <_Thread_Change_priority> 4000c9d4: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000c9d8: 7f ff f1 3f call 40008ed4 <_Thread_Enable_dispatch> 4000c9dc: 01 00 00 00 nop 4000c9e0: 81 c7 e0 08 ret 4000c9e4: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000c9e8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000c9ec: c6 26 20 50 st %g3, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ 4000c9f0: c0 26 20 54 clr [ %i0 + 0x54 ] executing->resource_count--; /* undo locking above */ 4000c9f4: da 20 60 1c st %o5, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000c9f8: d0 06 40 00 ld [ %i1 ], %o0 4000c9fc: 7f ff d5 0a call 40001e24 4000ca00: b0 10 20 00 clr %i0 4000ca04: 81 c7 e0 08 ret 4000ca08: 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 ) { 4000ca0c: 12 bf ff ca bne 4000c934 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000ca10: 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; 4000ca14: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED _ISR_Enable( *level_p ); 4000ca18: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 4000ca1c: 7f ff d5 02 call 40001e24 <== NOT EXECUTED 4000ca20: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ca24: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca28: 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 ); 4000ca2c: d0 06 40 00 ld [ %i1 ], %o0 4000ca30: 7f ff d4 fd call 40001e24 4000ca34: b0 10 20 00 clr %i0 4000ca38: 81 c7 e0 08 ret 4000ca3c: 81 e8 00 00 restore 4000cb38 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000cb38: 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; 4000cb3c: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000cb40: 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 ) { 4000cb44: 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; 4000cb48: e4 06 20 08 ld [ %i0 + 8 ], %l2 4000cb4c: 18 80 00 75 bgu 4000cd20 <_Heap_Allocate_aligned_with_boundary+0x1e8> 4000cb50: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000cb54: 80 a6 e0 00 cmp %i3, 0 4000cb58: 12 80 00 70 bne 4000cd18 <_Heap_Allocate_aligned_with_boundary+0x1e0> 4000cb5c: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cb60: 80 a4 00 12 cmp %l0, %l2 4000cb64: 02 80 00 72 be 4000cd2c <_Heap_Allocate_aligned_with_boundary+0x1f4> 4000cb68: 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; 4000cb6c: 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; 4000cb70: 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; 4000cb74: 82 20 40 19 sub %g1, %i1, %g1 4000cb78: 10 80 00 09 b 4000cb9c <_Heap_Allocate_aligned_with_boundary+0x64> 4000cb7c: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 4000cb80: 80 a6 20 00 cmp %i0, 0 4000cb84: 32 80 00 57 bne,a 4000cce0 <_Heap_Allocate_aligned_with_boundary+0x1a8> 4000cb88: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 4000cb8c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cb90: 80 a4 00 12 cmp %l0, %l2 4000cb94: 22 80 00 5a be,a 4000ccfc <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000cb98: 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 ) { 4000cb9c: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000cba0: 80 a5 00 13 cmp %l4, %l3 4000cba4: 1a bf ff fa bcc 4000cb8c <_Heap_Allocate_aligned_with_boundary+0x54> 4000cba8: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000cbac: 80 a6 a0 00 cmp %i2, 0 4000cbb0: 02 bf ff f4 be 4000cb80 <_Heap_Allocate_aligned_with_boundary+0x48> 4000cbb4: 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; 4000cbb8: 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; 4000cbbc: 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; 4000cbc0: a6 0c ff fe and %l3, -2, %l3 4000cbc4: 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; 4000cbc8: 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; 4000cbcc: 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); 4000cbd0: 90 10 00 18 mov %i0, %o0 4000cbd4: a6 00 40 13 add %g1, %l3, %l3 4000cbd8: 40 00 2f 8f call 40018a14 <.urem> 4000cbdc: 92 10 00 1a mov %i2, %o1 4000cbe0: 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 ) { 4000cbe4: 80 a4 c0 18 cmp %l3, %i0 4000cbe8: 1a 80 00 06 bcc 4000cc00 <_Heap_Allocate_aligned_with_boundary+0xc8> 4000cbec: ac 04 a0 08 add %l2, 8, %l6 4000cbf0: 90 10 00 13 mov %l3, %o0 4000cbf4: 40 00 2f 88 call 40018a14 <.urem> 4000cbf8: 92 10 00 1a mov %i2, %o1 4000cbfc: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000cc00: 80 a6 e0 00 cmp %i3, 0 4000cc04: 02 80 00 26 be 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc08: 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; 4000cc0c: a6 06 00 19 add %i0, %i1, %l3 4000cc10: 92 10 00 1b mov %i3, %o1 4000cc14: 40 00 2f 80 call 40018a14 <.urem> 4000cc18: 90 10 00 13 mov %l3, %o0 4000cc1c: 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 ) { 4000cc20: 80 a4 c0 08 cmp %l3, %o0 4000cc24: 08 80 00 1e bleu 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc28: 80 a5 80 18 cmp %l6, %i0 4000cc2c: 80 a6 00 08 cmp %i0, %o0 4000cc30: 1a 80 00 1b bcc 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc34: 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; 4000cc38: 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 ) { 4000cc3c: 80 a5 40 08 cmp %l5, %o0 4000cc40: 28 80 00 0a bleu,a 4000cc68 <_Heap_Allocate_aligned_with_boundary+0x130> 4000cc44: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 4000cc48: 10 bf ff d2 b 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000cc4c: 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 ) { 4000cc50: 1a 80 00 13 bcc 4000cc9c <_Heap_Allocate_aligned_with_boundary+0x164> 4000cc54: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 4000cc58: 80 a5 40 08 cmp %l5, %o0 4000cc5c: 38 bf ff cd bgu,a 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000cc60: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 4000cc64: b0 22 00 19 sub %o0, %i1, %i0 4000cc68: 92 10 00 1a mov %i2, %o1 4000cc6c: 40 00 2f 6a call 40018a14 <.urem> 4000cc70: 90 10 00 18 mov %i0, %o0 4000cc74: 92 10 00 1b mov %i3, %o1 4000cc78: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000cc7c: a6 06 00 19 add %i0, %i1, %l3 4000cc80: 40 00 2f 65 call 40018a14 <.urem> 4000cc84: 90 10 00 13 mov %l3, %o0 4000cc88: 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 ) { 4000cc8c: 80 a4 c0 08 cmp %l3, %o0 4000cc90: 18 bf ff f0 bgu 4000cc50 <_Heap_Allocate_aligned_with_boundary+0x118> 4000cc94: 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 ) { 4000cc98: 80 a5 80 18 cmp %l6, %i0 4000cc9c: 18 bf ff bc bgu 4000cb8c <_Heap_Allocate_aligned_with_boundary+0x54> 4000cca0: 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; 4000cca4: 90 10 00 18 mov %i0, %o0 4000cca8: a6 20 40 12 sub %g1, %l2, %l3 4000ccac: 92 10 00 1d mov %i5, %o1 4000ccb0: 40 00 2f 59 call 40018a14 <.urem> 4000ccb4: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 4000ccb8: 90 a4 c0 08 subcc %l3, %o0, %o0 4000ccbc: 02 bf ff b2 be 4000cb84 <_Heap_Allocate_aligned_with_boundary+0x4c> 4000ccc0: 80 a6 20 00 cmp %i0, 0 4000ccc4: 80 a5 c0 08 cmp %l7, %o0 4000ccc8: 38 bf ff b2 bgu,a 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000cccc: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 4000ccd0: 80 a6 20 00 cmp %i0, 0 4000ccd4: 22 bf ff af be,a 4000cb90 <_Heap_Allocate_aligned_with_boundary+0x58> 4000ccd8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000ccdc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000cce0: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000cce4: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000cce8: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000ccec: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000ccf0: 90 10 00 10 mov %l0, %o0 4000ccf4: 7f ff ec 3d call 40007de8 <_Heap_Block_allocate> 4000ccf8: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000ccfc: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 4000cd00: 80 a0 40 11 cmp %g1, %l1 4000cd04: 1a 80 00 08 bcc 4000cd24 <_Heap_Allocate_aligned_with_boundary+0x1ec> 4000cd08: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000cd0c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 4000cd10: 81 c7 e0 08 ret 4000cd14: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4000cd18: 08 80 00 07 bleu 4000cd34 <_Heap_Allocate_aligned_with_boundary+0x1fc> 4000cd1c: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4000cd20: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 4000cd24: 81 c7 e0 08 ret 4000cd28: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000cd2c: 10 bf ff f4 b 4000ccfc <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000cd30: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000cd34: 22 bf ff 8b be,a 4000cb60 <_Heap_Allocate_aligned_with_boundary+0x28> 4000cd38: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 4000cd3c: 10 bf ff 8a b 4000cb64 <_Heap_Allocate_aligned_with_boundary+0x2c> 4000cd40: 80 a4 00 12 cmp %l0, %l2 40008d6c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 40008d6c: 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; 40008d70: 25 10 00 24 sethi %hi(0x40009000), %l2 40008d74: 80 8e a0 ff btst 0xff, %i2 40008d78: a4 14 a3 6c or %l2, 0x36c, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 40008d7c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 40008d80: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 40008d84: 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; 40008d88: 12 80 00 04 bne 40008d98 <_Heap_Walk+0x2c> 40008d8c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40008d90: 25 10 00 23 sethi %hi(0x40008c00), %l2 40008d94: a4 14 a1 64 or %l2, 0x164, %l2 ! 40008d64 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 40008d98: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40008d9c: c2 00 60 90 ld [ %g1 + 0x90 ], %g1 ! 4001fc90 <_System_state_Current> 40008da0: 80 a0 60 03 cmp %g1, 3 40008da4: 22 80 00 04 be,a 40008db4 <_Heap_Walk+0x48> 40008da8: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 40008dac: 81 c7 e0 08 ret 40008db0: 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)( 40008db4: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008db8: c4 06 20 08 ld [ %i0 + 8 ], %g2 40008dbc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40008dc0: 90 10 00 19 mov %i1, %o0 40008dc4: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 40008dc8: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 40008dcc: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40008dd0: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40008dd4: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40008dd8: 92 10 20 00 clr %o1 40008ddc: 15 10 00 73 sethi %hi(0x4001cc00), %o2 40008de0: 96 10 00 15 mov %l5, %o3 40008de4: 94 12 a3 c8 or %o2, 0x3c8, %o2 40008de8: 9f c4 80 00 call %l2 40008dec: 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 ) { 40008df0: 80 a5 60 00 cmp %l5, 0 40008df4: 02 80 00 36 be 40008ecc <_Heap_Walk+0x160> 40008df8: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40008dfc: 12 80 00 3c bne 40008eec <_Heap_Walk+0x180> 40008e00: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40008e04: 7f ff e3 30 call 40001ac4 <.urem> 40008e08: 92 10 00 15 mov %l5, %o1 40008e0c: 80 a2 20 00 cmp %o0, 0 40008e10: 12 80 00 40 bne 40008f10 <_Heap_Walk+0x1a4> 40008e14: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 40008e18: 7f ff e3 2b call 40001ac4 <.urem> 40008e1c: 92 10 00 15 mov %l5, %o1 40008e20: 80 a2 20 00 cmp %o0, 0 40008e24: 32 80 00 44 bne,a 40008f34 <_Heap_Walk+0x1c8> 40008e28: 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; 40008e2c: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 40008e30: ae 8d a0 01 andcc %l6, 1, %l7 40008e34: 22 80 00 48 be,a 40008f54 <_Heap_Walk+0x1e8> 40008e38: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 40008e3c: d6 04 00 00 ld [ %l0 ], %o3 40008e40: 80 a5 40 0b cmp %l5, %o3 40008e44: 32 80 00 1a bne,a 40008eac <_Heap_Walk+0x140> 40008e48: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40008e4c: c2 05 20 04 ld [ %l4 + 4 ], %g1 40008e50: 82 08 7f fe and %g1, -2, %g1 40008e54: 82 05 00 01 add %l4, %g1, %g1 40008e58: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008e5c: 80 88 60 01 btst 1, %g1 40008e60: 22 80 01 23 be,a 400092ec <_Heap_Walk+0x580> 40008e64: 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; 40008e68: 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 ) { 40008e6c: 80 a6 00 11 cmp %i0, %l1 40008e70: 02 80 00 6f be 4000902c <_Heap_Walk+0x2c0> 40008e74: 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; 40008e78: 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 40008e7c: 80 a7 00 11 cmp %i4, %l1 40008e80: 28 80 00 3c bleu,a 40008f70 <_Heap_Walk+0x204> 40008e84: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 40008e88: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008e8c: 96 10 00 11 mov %l1, %o3 40008e90: 92 10 20 01 mov 1, %o1 40008e94: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008e98: b0 10 20 00 clr %i0 40008e9c: 9f c4 80 00 call %l2 40008ea0: 94 12 a1 70 or %o2, 0x170, %o2 40008ea4: 81 c7 e0 08 ret 40008ea8: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 40008eac: 98 10 00 15 mov %l5, %o4 40008eb0: 92 10 20 01 mov 1, %o1 40008eb4: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008eb8: b0 10 20 00 clr %i0 40008ebc: 9f c4 80 00 call %l2 40008ec0: 94 12 a1 28 or %o2, 0x128, %o2 40008ec4: 81 c7 e0 08 ret 40008ec8: 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" ); 40008ecc: 90 10 00 19 mov %i1, %o0 40008ed0: 92 10 20 01 mov 1, %o1 40008ed4: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008ed8: b0 10 20 00 clr %i0 40008edc: 9f c4 80 00 call %l2 40008ee0: 94 12 a0 60 or %o2, 0x60, %o2 40008ee4: 81 c7 e0 08 ret 40008ee8: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 40008eec: 90 10 00 19 mov %i1, %o0 40008ef0: 96 10 00 15 mov %l5, %o3 40008ef4: 92 10 20 01 mov 1, %o1 40008ef8: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008efc: b0 10 20 00 clr %i0 40008f00: 9f c4 80 00 call %l2 40008f04: 94 12 a0 78 or %o2, 0x78, %o2 40008f08: 81 c7 e0 08 ret 40008f0c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 40008f10: 90 10 00 19 mov %i1, %o0 40008f14: 96 10 00 13 mov %l3, %o3 40008f18: 92 10 20 01 mov 1, %o1 40008f1c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f20: b0 10 20 00 clr %i0 40008f24: 9f c4 80 00 call %l2 40008f28: 94 12 a0 98 or %o2, 0x98, %o2 40008f2c: 81 c7 e0 08 ret 40008f30: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 40008f34: 96 10 00 10 mov %l0, %o3 40008f38: 92 10 20 01 mov 1, %o1 40008f3c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f40: b0 10 20 00 clr %i0 40008f44: 9f c4 80 00 call %l2 40008f48: 94 12 a0 c0 or %o2, 0xc0, %o2 40008f4c: 81 c7 e0 08 ret 40008f50: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 40008f54: 92 10 20 01 mov 1, %o1 40008f58: 15 10 00 74 sethi %hi(0x4001d000), %o2 40008f5c: b0 10 20 00 clr %i0 40008f60: 9f c4 80 00 call %l2 40008f64: 94 12 a0 f8 or %o2, 0xf8, %o2 40008f68: 81 c7 e0 08 ret 40008f6c: 81 e8 00 00 restore 40008f70: 80 a6 c0 11 cmp %i3, %l1 40008f74: 0a bf ff c6 bcs 40008e8c <_Heap_Walk+0x120> 40008f78: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 40008f7c: 90 04 60 08 add %l1, 8, %o0 40008f80: 7f ff e2 d1 call 40001ac4 <.urem> 40008f84: 92 10 00 1a mov %i2, %o1 40008f88: 80 a2 20 00 cmp %o0, 0 40008f8c: 12 80 00 df bne 40009308 <_Heap_Walk+0x59c> 40008f90: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40008f94: c2 04 60 04 ld [ %l1 + 4 ], %g1 40008f98: 82 08 7f fe and %g1, -2, %g1 40008f9c: 82 04 40 01 add %l1, %g1, %g1 40008fa0: c2 00 60 04 ld [ %g1 + 4 ], %g1 40008fa4: 80 88 60 01 btst 1, %g1 40008fa8: 12 80 00 ea bne 40009350 <_Heap_Walk+0x5e4> 40008fac: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 40008fb0: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40008fb4: 80 a6 00 0c cmp %i0, %o4 40008fb8: 02 80 00 19 be 4000901c <_Heap_Walk+0x2b0> 40008fbc: ba 10 00 11 mov %l1, %i5 40008fc0: 30 80 00 dc b,a 40009330 <_Heap_Walk+0x5c4> <== NOT EXECUTED 40008fc4: 0a bf ff b2 bcs 40008e8c <_Heap_Walk+0x120> 40008fc8: 90 10 00 19 mov %i1, %o0 40008fcc: 80 a6 c0 11 cmp %i3, %l1 40008fd0: 0a bf ff b0 bcs 40008e90 <_Heap_Walk+0x124> 40008fd4: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 40008fd8: 90 04 60 08 add %l1, 8, %o0 40008fdc: 7f ff e2 ba call 40001ac4 <.urem> 40008fe0: 92 10 00 1a mov %i2, %o1 40008fe4: 80 a2 20 00 cmp %o0, 0 40008fe8: 32 80 00 c8 bne,a 40009308 <_Heap_Walk+0x59c> 40008fec: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 40008ff0: c2 04 60 04 ld [ %l1 + 4 ], %g1 40008ff4: 82 08 7f fe and %g1, -2, %g1 40008ff8: 82 00 40 11 add %g1, %l1, %g1 40008ffc: c2 00 60 04 ld [ %g1 + 4 ], %g1 40009000: 80 88 60 01 btst 1, %g1 40009004: 32 80 00 d2 bne,a 4000934c <_Heap_Walk+0x5e0> 40009008: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 4000900c: d8 04 60 0c ld [ %l1 + 0xc ], %o4 40009010: 80 a3 00 1d cmp %o4, %i5 40009014: 12 80 00 c5 bne 40009328 <_Heap_Walk+0x5bc> 40009018: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 4000901c: 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 ) { 40009020: 80 a6 00 11 cmp %i0, %l1 40009024: 12 bf ff e8 bne 40008fc4 <_Heap_Walk+0x258> 40009028: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 4000902c: 80 a5 00 10 cmp %l4, %l0 40009030: 02 bf ff 5f be 40008dac <_Heap_Walk+0x40> 40009034: 37 10 00 74 sethi %hi(0x4001d000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40009038: 35 10 00 74 sethi %hi(0x4001d000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 4000903c: 39 10 00 74 sethi %hi(0x4001d000), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40009040: 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)( 40009044: b6 16 e2 18 or %i3, 0x218, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40009048: b4 16 a2 30 or %i2, 0x230, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 4000904c: b8 17 23 c8 or %i4, 0x3c8, %i4 40009050: 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; 40009054: 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 ) { 40009058: 80 a5 e0 00 cmp %l7, 0 4000905c: 02 80 00 16 be 400090b4 <_Heap_Walk+0x348> 40009060: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 40009064: 90 10 00 19 mov %i1, %o0 40009068: 92 10 20 00 clr %o1 4000906c: 94 10 00 1b mov %i3, %o2 40009070: 96 10 00 10 mov %l0, %o3 40009074: 9f c4 80 00 call %l2 40009078: 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 4000907c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40009080: 80 a0 40 11 cmp %g1, %l1 40009084: 28 80 00 18 bleu,a 400090e4 <_Heap_Walk+0x378> 40009088: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 4000908c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40009090: 96 10 00 10 mov %l0, %o3 40009094: 98 10 00 11 mov %l1, %o4 40009098: 92 10 20 01 mov 1, %o1 4000909c: 15 10 00 74 sethi %hi(0x4001d000), %o2 400090a0: b0 10 20 00 clr %i0 400090a4: 9f c4 80 00 call %l2 400090a8: 94 12 a2 58 or %o2, 0x258, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 400090ac: 81 c7 e0 08 ret 400090b0: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 400090b4: da 04 00 00 ld [ %l0 ], %o5 400090b8: 90 10 00 19 mov %i1, %o0 400090bc: 92 10 20 00 clr %o1 400090c0: 94 10 00 1a mov %i2, %o2 400090c4: 96 10 00 10 mov %l0, %o3 400090c8: 9f c4 80 00 call %l2 400090cc: 98 10 00 16 mov %l6, %o4 400090d0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 400090d4: 80 a0 40 11 cmp %g1, %l1 400090d8: 18 bf ff ee bgu 40009090 <_Heap_Walk+0x324> 400090dc: 90 10 00 19 mov %i1, %o0 400090e0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400090e4: 80 a0 40 11 cmp %g1, %l1 400090e8: 0a bf ff ea bcs 40009090 <_Heap_Walk+0x324> 400090ec: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 400090f0: 90 10 00 16 mov %l6, %o0 400090f4: 7f ff e2 74 call 40001ac4 <.urem> 400090f8: 92 10 00 1d mov %i5, %o1 400090fc: 80 a2 20 00 cmp %o0, 0 40009100: 12 80 00 5d bne 40009274 <_Heap_Walk+0x508> 40009104: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 40009108: 18 80 00 65 bgu 4000929c <_Heap_Walk+0x530> 4000910c: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 40009110: 3a 80 00 6e bcc,a 400092c8 <_Heap_Walk+0x55c> 40009114: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 40009118: c2 04 60 04 ld [ %l1 + 4 ], %g1 4000911c: 80 88 60 01 btst 1, %g1 40009120: 12 80 00 40 bne 40009220 <_Heap_Walk+0x4b4> 40009124: 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; 40009128: 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)( 4000912c: 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; 40009130: 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; 40009134: 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; 40009138: 1b 10 00 74 sethi %hi(0x4001d000), %o5 4000913c: 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; 40009140: 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); 40009144: 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; 40009148: 02 80 00 07 be 40009164 <_Heap_Walk+0x3f8> 4000914c: 9a 13 63 20 or %o5, 0x320, %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)" : ""), 40009150: 1b 10 00 74 sethi %hi(0x4001d000), %o5 40009154: 80 a3 00 18 cmp %o4, %i0 40009158: 02 80 00 03 be 40009164 <_Heap_Walk+0x3f8> 4000915c: 9a 13 63 30 or %o5, 0x330, %o5 40009160: 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)( 40009164: c2 04 20 08 ld [ %l0 + 8 ], %g1 40009168: 05 10 00 74 sethi %hi(0x4001d000), %g2 4000916c: 80 a0 c0 01 cmp %g3, %g1 40009170: 02 80 00 07 be 4000918c <_Heap_Walk+0x420> 40009174: 84 10 a3 40 or %g2, 0x340, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40009178: 05 10 00 74 sethi %hi(0x4001d000), %g2 4000917c: 80 a0 40 18 cmp %g1, %i0 40009180: 02 80 00 03 be 4000918c <_Heap_Walk+0x420> 40009184: 84 10 a3 50 or %g2, 0x350, %g2 40009188: 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)( 4000918c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40009190: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 40009194: 90 10 00 19 mov %i1, %o0 40009198: 92 10 20 00 clr %o1 4000919c: 15 10 00 74 sethi %hi(0x4001d000), %o2 400091a0: 96 10 00 10 mov %l0, %o3 400091a4: 9f c4 80 00 call %l2 400091a8: 94 12 a3 60 or %o2, 0x360, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 400091ac: da 05 c0 00 ld [ %l7 ], %o5 400091b0: 80 a5 80 0d cmp %l6, %o5 400091b4: 02 80 00 0c be 400091e4 <_Heap_Walk+0x478> 400091b8: 90 10 00 19 mov %i1, %o0 (*printer)( 400091bc: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 400091c0: 96 10 00 10 mov %l0, %o3 400091c4: 98 10 00 16 mov %l6, %o4 400091c8: 92 10 20 01 mov 1, %o1 400091cc: 15 10 00 74 sethi %hi(0x4001d000), %o2 400091d0: b0 10 20 00 clr %i0 400091d4: 9f c4 80 00 call %l2 400091d8: 94 12 a3 90 or %o2, 0x390, %o2 400091dc: 81 c7 e0 08 ret 400091e0: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 400091e4: 80 8d 20 01 btst 1, %l4 400091e8: 02 80 00 1c be 40009258 <_Heap_Walk+0x4ec> 400091ec: 96 10 00 10 mov %l0, %o3 400091f0: 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 ) { 400091f4: 80 a0 40 18 cmp %g1, %i0 400091f8: 12 80 00 07 bne 40009214 <_Heap_Walk+0x4a8> 400091fc: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40009200: 10 80 00 0f b 4000923c <_Heap_Walk+0x4d0> <== NOT EXECUTED 40009204: 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 ) { 40009208: 80 a0 40 18 cmp %g1, %i0 4000920c: 02 80 00 0a be 40009234 <_Heap_Walk+0x4c8> 40009210: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 40009214: 32 bf ff fd bne,a 40009208 <_Heap_Walk+0x49c> 40009218: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 4000921c: 80 a5 40 11 cmp %l5, %l1 40009220: 02 bf fe e3 be 40008dac <_Heap_Walk+0x40> 40009224: 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 ) { 40009228: ec 04 60 04 ld [ %l1 + 4 ], %l6 4000922c: 10 bf ff 8a b 40009054 <_Heap_Walk+0x2e8> 40009230: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40009234: 90 10 00 19 mov %i1, %o0 40009238: 96 10 00 10 mov %l0, %o3 4000923c: 92 10 20 01 mov 1, %o1 40009240: 15 10 00 75 sethi %hi(0x4001d400), %o2 40009244: b0 10 20 00 clr %i0 40009248: 9f c4 80 00 call %l2 4000924c: 94 12 a0 00 mov %o2, %o2 40009250: 81 c7 e0 08 ret 40009254: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 40009258: 92 10 20 01 mov 1, %o1 4000925c: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009260: b0 10 20 00 clr %i0 40009264: 9f c4 80 00 call %l2 40009268: 94 12 a3 d0 or %o2, 0x3d0, %o2 4000926c: 81 c7 e0 08 ret 40009270: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 40009274: 90 10 00 19 mov %i1, %o0 40009278: 96 10 00 10 mov %l0, %o3 4000927c: 98 10 00 16 mov %l6, %o4 40009280: 92 10 20 01 mov 1, %o1 40009284: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009288: b0 10 20 00 clr %i0 4000928c: 9f c4 80 00 call %l2 40009290: 94 12 a2 88 or %o2, 0x288, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 40009294: 81 c7 e0 08 ret 40009298: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 4000929c: 90 10 00 19 mov %i1, %o0 400092a0: 96 10 00 10 mov %l0, %o3 400092a4: 98 10 00 16 mov %l6, %o4 400092a8: 9a 10 00 13 mov %l3, %o5 400092ac: 92 10 20 01 mov 1, %o1 400092b0: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092b4: b0 10 20 00 clr %i0 400092b8: 9f c4 80 00 call %l2 400092bc: 94 12 a2 b8 or %o2, 0x2b8, %o2 block, block_size, min_block_size ); return false; 400092c0: 81 c7 e0 08 ret 400092c4: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 400092c8: 96 10 00 10 mov %l0, %o3 400092cc: 98 10 00 11 mov %l1, %o4 400092d0: 92 10 20 01 mov 1, %o1 400092d4: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092d8: b0 10 20 00 clr %i0 400092dc: 9f c4 80 00 call %l2 400092e0: 94 12 a2 e8 or %o2, 0x2e8, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 400092e4: 81 c7 e0 08 ret 400092e8: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 400092ec: 92 10 20 01 mov 1, %o1 400092f0: 15 10 00 74 sethi %hi(0x4001d000), %o2 400092f4: b0 10 20 00 clr %i0 400092f8: 9f c4 80 00 call %l2 400092fc: 94 12 a1 58 or %o2, 0x158, %o2 40009300: 81 c7 e0 08 ret 40009304: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 40009308: 96 10 00 11 mov %l1, %o3 4000930c: 92 10 20 01 mov 1, %o1 40009310: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009314: b0 10 20 00 clr %i0 40009318: 9f c4 80 00 call %l2 4000931c: 94 12 a1 90 or %o2, 0x190, %o2 40009320: 81 c7 e0 08 ret 40009324: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 40009328: 90 10 00 19 mov %i1, %o0 4000932c: 96 10 00 11 mov %l1, %o3 40009330: 92 10 20 01 mov 1, %o1 40009334: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009338: b0 10 20 00 clr %i0 4000933c: 9f c4 80 00 call %l2 40009340: 94 12 a1 e0 or %o2, 0x1e0, %o2 40009344: 81 c7 e0 08 ret 40009348: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 4000934c: 96 10 00 11 mov %l1, %o3 40009350: 92 10 20 01 mov 1, %o1 40009354: 15 10 00 74 sethi %hi(0x4001d000), %o2 40009358: b0 10 20 00 clr %i0 4000935c: 9f c4 80 00 call %l2 40009360: 94 12 a1 c0 or %o2, 0x1c0, %o2 40009364: 81 c7 e0 08 ret 40009368: 81 e8 00 00 restore 400080a8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 400080a8: 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 ) 400080ac: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 400080b0: 80 a5 20 00 cmp %l4, 0 400080b4: 02 80 00 ab be 40008360 <_Objects_Extend_information+0x2b8> 400080b8: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 400080bc: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 400080c0: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 400080c4: ab 2d 60 10 sll %l5, 0x10, %l5 400080c8: 92 10 00 12 mov %l2, %o1 400080cc: 40 00 41 a6 call 40018764 <.udiv> 400080d0: 91 35 60 10 srl %l5, 0x10, %o0 400080d4: 91 2a 20 10 sll %o0, 0x10, %o0 400080d8: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 400080dc: 80 a7 20 00 cmp %i4, 0 400080e0: 02 80 00 a7 be 4000837c <_Objects_Extend_information+0x2d4> 400080e4: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 400080e8: c2 05 00 00 ld [ %l4 ], %g1 400080ec: 80 a0 60 00 cmp %g1, 0 400080f0: 02 80 00 a4 be 40008380 <_Objects_Extend_information+0x2d8> 400080f4: a2 10 00 13 mov %l3, %l1 400080f8: 10 80 00 06 b 40008110 <_Objects_Extend_information+0x68> 400080fc: a0 10 20 00 clr %l0 40008100: c2 05 00 01 ld [ %l4 + %g1 ], %g1 40008104: 80 a0 60 00 cmp %g1, 0 40008108: 22 80 00 08 be,a 40008128 <_Objects_Extend_information+0x80> 4000810c: 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++ ) { 40008110: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008114: 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++ ) { 40008118: 80 a7 00 10 cmp %i4, %l0 4000811c: 18 bf ff f9 bgu 40008100 <_Objects_Extend_information+0x58> 40008120: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40008124: 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 ) { 40008128: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 4000812c: 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 ) { 40008130: 82 10 63 ff or %g1, 0x3ff, %g1 40008134: 80 a5 40 01 cmp %l5, %g1 40008138: 18 80 00 96 bgu 40008390 <_Objects_Extend_information+0x2e8> 4000813c: 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; 40008140: 40 00 41 4f call 4001867c <.umul> 40008144: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 40008148: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 4000814c: 80 a0 60 00 cmp %g1, 0 40008150: 12 80 00 6d bne 40008304 <_Objects_Extend_information+0x25c> 40008154: 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 ); 40008158: 40 00 08 92 call 4000a3a0 <_Workspace_Allocate_or_fatal_error> 4000815c: 01 00 00 00 nop 40008160: 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 ) { 40008164: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008168: 80 a4 40 01 cmp %l1, %g1 4000816c: 2a 80 00 43 bcs,a 40008278 <_Objects_Extend_information+0x1d0> 40008170: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 40008174: 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 ); 40008178: 91 2d 20 01 sll %l4, 1, %o0 4000817c: 90 02 00 14 add %o0, %l4, %o0 40008180: 90 05 40 08 add %l5, %o0, %o0 40008184: 90 02 00 13 add %o0, %l3, %o0 40008188: 40 00 08 95 call 4000a3dc <_Workspace_Allocate> 4000818c: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 40008190: ac 92 20 00 orcc %o0, 0, %l6 40008194: 02 80 00 7d be 40008388 <_Objects_Extend_information+0x2e0> 40008198: 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 ) { 4000819c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400081a0: 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); 400081a4: ae 05 80 14 add %l6, %l4, %l7 400081a8: 0a 80 00 5e bcs 40008320 <_Objects_Extend_information+0x278> 400081ac: 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++ ) { 400081b0: 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, 400081b4: 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++ ) { 400081b8: 02 80 00 08 be 400081d8 <_Objects_Extend_information+0x130> 400081bc: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 400081c0: 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++ ) { 400081c4: 82 00 60 01 inc %g1 400081c8: 80 a4 c0 01 cmp %l3, %g1 400081cc: 18 bf ff fd bgu 400081c0 <_Objects_Extend_information+0x118> 400081d0: c0 20 80 14 clr [ %g2 + %l4 ] 400081d4: 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 ); 400081d8: 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; 400081dc: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 400081e0: 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 ; 400081e4: 80 a4 40 03 cmp %l1, %g3 400081e8: 1a 80 00 0a bcc 40008210 <_Objects_Extend_information+0x168> 400081ec: c0 25 80 1d clr [ %l6 + %i5 ] 400081f0: 85 2c 60 02 sll %l1, 2, %g2 400081f4: 82 10 00 11 mov %l1, %g1 400081f8: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 400081fc: 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++ ) { 40008200: 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 ; 40008204: 80 a0 40 03 cmp %g1, %g3 40008208: 0a bf ff fd bcs 400081fc <_Objects_Extend_information+0x154> 4000820c: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40008210: 7f ff e7 01 call 40001e14 40008214: 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( 40008218: c6 06 00 00 ld [ %i0 ], %g3 4000821c: 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; 40008220: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40008224: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40008228: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 4000822c: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40008230: 87 28 e0 18 sll %g3, 0x18, %g3 40008234: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40008238: 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( 4000823c: ab 2d 60 10 sll %l5, 0x10, %l5 40008240: 03 00 00 40 sethi %hi(0x10000), %g1 40008244: ab 35 60 10 srl %l5, 0x10, %l5 40008248: 82 10 c0 01 or %g3, %g1, %g1 4000824c: 82 10 40 02 or %g1, %g2, %g1 40008250: 82 10 40 15 or %g1, %l5, %g1 40008254: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40008258: 7f ff e6 f3 call 40001e24 4000825c: 01 00 00 00 nop if ( old_tables ) 40008260: 80 a4 e0 00 cmp %l3, 0 40008264: 22 80 00 05 be,a 40008278 <_Objects_Extend_information+0x1d0> 40008268: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 4000826c: 40 00 08 65 call 4000a400 <_Workspace_Free> 40008270: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008274: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008278: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 4000827c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 40008280: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40008284: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40008288: 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; 4000828c: 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( 40008290: 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( 40008294: a4 07 bf f4 add %fp, -12, %l2 40008298: 40 00 11 7d call 4000c88c <_Chain_Initialize> 4000829c: 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 ) { 400082a0: 30 80 00 0c b,a 400082d0 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 400082a4: c4 16 20 04 lduh [ %i0 + 4 ], %g2 400082a8: 83 28 60 18 sll %g1, 0x18, %g1 400082ac: 85 28 a0 1b sll %g2, 0x1b, %g2 400082b0: 82 10 40 14 or %g1, %l4, %g1 400082b4: 82 10 40 02 or %g1, %g2, %g1 400082b8: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400082bc: 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( 400082c0: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 400082c4: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 400082c8: 7f ff fc e2 call 40007650 <_Chain_Append> 400082cc: 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 ) { 400082d0: 40 00 11 5c call 4000c840 <_Chain_Get> 400082d4: 90 10 00 12 mov %l2, %o0 400082d8: 80 a2 20 00 cmp %o0, 0 400082dc: 32 bf ff f2 bne,a 400082a4 <_Objects_Extend_information+0x1fc> 400082e0: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 400082e4: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400082e8: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 400082ec: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 400082f0: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 400082f4: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 400082f8: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 400082fc: 81 c7 e0 08 ret 40008300: 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 ); 40008304: 40 00 08 36 call 4000a3dc <_Workspace_Allocate> 40008308: 01 00 00 00 nop if ( !new_object_block ) 4000830c: a4 92 20 00 orcc %o0, 0, %l2 40008310: 32 bf ff 96 bne,a 40008168 <_Objects_Extend_information+0xc0> 40008314: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008318: 81 c7 e0 08 ret 4000831c: 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, 40008320: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40008324: 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, 40008328: 40 00 1d b9 call 4000fa0c 4000832c: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008330: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40008334: 94 10 00 1d mov %i5, %o2 40008338: 40 00 1d b5 call 4000fa0c 4000833c: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40008340: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40008344: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40008348: 94 04 c0 0a add %l3, %o2, %o2 4000834c: 90 10 00 14 mov %l4, %o0 40008350: 40 00 1d af call 4000fa0c 40008354: 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 ); 40008358: 10 bf ff a1 b 400081dc <_Objects_Extend_information+0x134> 4000835c: 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 ) 40008360: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40008364: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 40008368: ab 2d 60 10 sll %l5, 0x10, %l5 4000836c: a2 10 00 13 mov %l3, %l1 40008370: a0 10 20 00 clr %l0 40008374: 10 bf ff 6c b 40008124 <_Objects_Extend_information+0x7c> 40008378: 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 ) 4000837c: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 40008380: 10 bf ff 69 b 40008124 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 40008384: 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 ); 40008388: 40 00 08 1e call 4000a400 <_Workspace_Free> 4000838c: 90 10 00 12 mov %l2, %o0 return; 40008390: 81 c7 e0 08 ret 40008394: 81 e8 00 00 restore 400085ac <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 400085ac: 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; 400085b0: 05 10 00 74 sethi %hi(0x4001d000), %g2 400085b4: 83 2e 60 02 sll %i1, 2, %g1 400085b8: 84 10 a2 60 or %g2, 0x260, %g2 400085bc: 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; 400085c0: 85 2f 20 10 sll %i4, 0x10, %g2 400085c4: 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; 400085c8: 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; 400085cc: 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; 400085d0: 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; 400085d4: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400085d8: 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; 400085dc: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 400085e0: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 400085e4: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 400085e8: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 400085ec: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 400085f0: 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; 400085f4: 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 = 400085f8: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 400085fc: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 40008600: 80 a0 a0 00 cmp %g2, 0 40008604: 02 80 00 05 be 40008618 <_Objects_Initialize_information+0x6c> 40008608: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 4000860c: 80 a6 e0 00 cmp %i3, 0 40008610: 02 80 00 28 be 400086b0 <_Objects_Initialize_information+0x104> 40008614: 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; 40008618: 07 10 00 73 sethi %hi(0x4001cc00), %g3 4000861c: 86 10 e3 6c or %g3, 0x36c, %g3 ! 4001cf6c /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 40008620: 80 a0 00 1b cmp %g0, %i3 40008624: b3 2e 60 18 sll %i1, 0x18, %i1 40008628: 84 40 20 00 addx %g0, 0, %g2 4000862c: 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; 40008630: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 40008634: 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 = 40008638: 07 00 00 40 sethi %hi(0x10000), %g3 4000863c: b2 16 40 03 or %i1, %g3, %i1 40008640: b4 16 40 1a or %i1, %i2, %i2 40008644: b4 16 80 02 or %i2, %g2, %i2 40008648: 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) & 4000864c: 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) ) 40008650: 80 88 60 03 btst 3, %g1 40008654: 02 80 00 0c be 40008684 <_Objects_Initialize_information+0xd8> 40008658: 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); 4000865c: 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; 40008660: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED 40008664: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED the_chain->permanent_null = NULL; 40008668: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 4000866c: 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 ) { 40008670: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40008674: 12 80 00 0d bne 400086a8 <_Objects_Initialize_information+0xfc> <== NOT EXECUTED 40008678: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 4000867c: 81 c7 e0 08 ret 40008680: 81 e8 00 00 restore /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 40008684: 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); 40008688: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 4000868c: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 40008690: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 40008694: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 40008698: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 4000869c: 80 a6 e0 00 cmp %i3, 0 400086a0: 02 bf ff f7 be 4000867c <_Objects_Initialize_information+0xd0> 400086a4: 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 ); 400086a8: 7f ff fe 80 call 400080a8 <_Objects_Extend_information> 400086ac: 81 e8 00 00 restore /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 400086b0: 92 10 20 01 mov 1, %o1 400086b4: 7f ff fe 1e call 40007f2c <_Internal_error_Occurred> 400086b8: 94 10 20 14 mov 0x14, %o2 400086bc: 01 00 00 00 nop 4000877c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 4000877c: 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 ); 40008780: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 40008784: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 40008788: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 4000878c: 92 10 00 11 mov %l1, %o1 40008790: 40 00 3f f5 call 40018764 <.udiv> 40008794: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40008798: 80 a2 20 00 cmp %o0, 0 4000879c: 02 80 00 12 be 400087e4 <_Objects_Shrink_information+0x68> 400087a0: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 400087a4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 400087a8: c4 00 c0 00 ld [ %g3 ], %g2 400087ac: 80 a4 40 02 cmp %l1, %g2 400087b0: 12 80 00 09 bne 400087d4 <_Objects_Shrink_information+0x58> 400087b4: 82 10 20 00 clr %g1 400087b8: 10 80 00 0d b 400087ec <_Objects_Shrink_information+0x70> <== NOT EXECUTED 400087bc: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400087c0: 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 ] == 400087c4: 80 a4 40 02 cmp %l1, %g2 400087c8: 02 80 00 09 be 400087ec <_Objects_Shrink_information+0x70> 400087cc: 84 04 a0 04 add %l2, 4, %g2 400087d0: 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++ ) { 400087d4: 82 00 60 01 inc %g1 400087d8: 80 a2 00 01 cmp %o0, %g1 400087dc: 38 bf ff f9 bgu,a 400087c0 <_Objects_Shrink_information+0x44> 400087e0: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 400087e4: 81 c7 e0 08 ret 400087e8: 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; 400087ec: 10 80 00 06 b 40008804 <_Objects_Shrink_information+0x88> 400087f0: 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 ); 400087f4: 80 a4 60 00 cmp %l1, 0 400087f8: 22 80 00 12 be,a 40008840 <_Objects_Shrink_information+0xc4> 400087fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40008800: 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 ); 40008804: 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) && 40008808: 80 a0 40 10 cmp %g1, %l0 4000880c: 0a bf ff fa bcs 400087f4 <_Objects_Shrink_information+0x78> 40008810: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 40008814: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 40008818: 84 04 00 02 add %l0, %g2, %g2 4000881c: 80 a0 40 02 cmp %g1, %g2 40008820: 1a bf ff f6 bcc 400087f8 <_Objects_Shrink_information+0x7c> 40008824: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 40008828: 40 00 0f fc call 4000c818 <_Chain_Extract> 4000882c: 01 00 00 00 nop } } while ( the_object ); 40008830: 80 a4 60 00 cmp %l1, 0 40008834: 12 bf ff f4 bne 40008804 <_Objects_Shrink_information+0x88> 40008838: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4000883c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40008840: 40 00 06 f0 call 4000a400 <_Workspace_Free> 40008844: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008848: 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; 4000884c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 40008850: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 40008854: 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; 40008858: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 4000885c: 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; 40008860: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008864: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 40008868: 81 c7 e0 08 ret 4000886c: 81 e8 00 00 restore 4000c5c8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000c5c8: 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 ]; 4000c5cc: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 if ( !api ) 4000c5d0: 80 a4 20 00 cmp %l0, 0 4000c5d4: 02 80 00 1f be 4000c650 <_RTEMS_tasks_Post_switch_extension+0x88> 4000c5d8: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000c5dc: 7f ff d6 0e call 40001e14 4000c5e0: 01 00 00 00 nop signal_set = asr->signals_posted; 4000c5e4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 4000c5e8: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 4000c5ec: 7f ff d6 0e call 40001e24 4000c5f0: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000c5f4: 80 a4 60 00 cmp %l1, 0 4000c5f8: 32 80 00 04 bne,a 4000c608 <_RTEMS_tasks_Post_switch_extension+0x40> 4000c5fc: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 4000c600: 81 c7 e0 08 ret <== NOT EXECUTED 4000c604: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c608: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c60c: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c610: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000c614: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c618: 94 10 00 12 mov %l2, %o2 4000c61c: 27 00 00 3f sethi %hi(0xfc00), %l3 4000c620: 40 00 07 c5 call 4000e534 4000c624: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000c628: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000c62c: 9f c0 40 00 call %g1 4000c630: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 4000c634: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c638: 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; 4000c63c: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c640: 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; 4000c644: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000c648: 40 00 07 bb call 4000e534 4000c64c: 94 10 00 12 mov %l2, %o2 4000c650: 81 c7 e0 08 ret 4000c654: 81 e8 00 00 restore 400088d4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 400088d4: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 400088d8: 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 ); 400088dc: 40 00 04 41 call 400099e0 <_Thread_Set_transient> 400088e0: 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 ) 400088e4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400088e8: 80 a0 40 19 cmp %g1, %i1 400088ec: 02 80 00 05 be 40008900 <_Thread_Change_priority+0x2c> 400088f0: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 400088f4: 92 10 00 19 mov %i1, %o1 400088f8: 40 00 03 be call 400097f0 <_Thread_Set_priority> 400088fc: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 40008900: 7f ff e5 45 call 40001e14 40008904: 01 00 00 00 nop 40008908: 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; 4000890c: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 40008910: 80 a4 a0 04 cmp %l2, 4 40008914: 02 80 00 18 be 40008974 <_Thread_Change_priority+0xa0> 40008918: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 4000891c: 02 80 00 0b be 40008948 <_Thread_Change_priority+0x74> 40008920: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 40008924: 7f ff e5 40 call 40001e24 <== NOT EXECUTED 40008928: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 4000892c: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 40008930: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 40008934: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 40008938: 32 80 00 0d bne,a 4000896c <_Thread_Change_priority+0x98> <== NOT EXECUTED 4000893c: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 40008940: 81 c7 e0 08 ret 40008944: 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 ); 40008948: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 4000894c: 7f ff e5 36 call 40001e24 40008950: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 40008954: 03 00 00 ef sethi %hi(0x3bc00), %g1 40008958: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000895c: 80 8c 80 01 btst %l2, %g1 40008960: 02 bf ff f8 be 40008940 <_Thread_Change_priority+0x6c> 40008964: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 40008968: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 4000896c: 40 00 03 71 call 40009730 <_Thread_queue_Requeue> 40008970: 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 ) ) { 40008974: 12 80 00 14 bne 400089c4 <_Thread_Change_priority+0xf0> 40008978: 23 10 00 74 sethi %hi(0x4001d000), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000897c: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 40008980: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 40008984: 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 ); 40008988: c0 24 20 10 clr [ %l0 + 0x10 ] 4000898c: 84 10 c0 02 or %g3, %g2, %g2 40008990: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 40008994: c4 14 63 b0 lduh [ %l1 + 0x3b0 ], %g2 40008998: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 4000899c: 80 8e a0 ff btst 0xff, %i2 400089a0: 82 10 80 01 or %g2, %g1, %g1 400089a4: c2 34 63 b0 sth %g1, [ %l1 + 0x3b0 ] 400089a8: 02 80 00 48 be 40008ac8 <_Thread_Change_priority+0x1f4> 400089ac: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400089b0: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400089b4: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 400089b8: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 400089bc: 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; 400089c0: 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 ); 400089c4: 7f ff e5 18 call 40001e24 400089c8: 90 10 00 18 mov %i0, %o0 400089cc: 7f ff e5 12 call 40001e14 400089d0: 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 ); 400089d4: c2 14 63 b0 lduh [ %l1 + 0x3b0 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 400089d8: 05 10 00 74 sethi %hi(0x4001d000), %g2 400089dc: 83 28 60 10 sll %g1, 0x10, %g1 400089e0: da 00 a2 54 ld [ %g2 + 0x254 ], %o5 400089e4: 85 30 60 10 srl %g1, 0x10, %g2 400089e8: 80 a0 a0 ff cmp %g2, 0xff 400089ec: 08 80 00 27 bleu 40008a88 <_Thread_Change_priority+0x1b4> 400089f0: 07 10 00 6e sethi %hi(0x4001b800), %g3 400089f4: 83 30 60 18 srl %g1, 0x18, %g1 400089f8: 86 10 e3 78 or %g3, 0x378, %g3 400089fc: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a00: 09 10 00 75 sethi %hi(0x4001d400), %g4 40008a04: 85 28 a0 10 sll %g2, 0x10, %g2 40008a08: 88 11 20 30 or %g4, 0x30, %g4 40008a0c: 83 30 a0 0f srl %g2, 0xf, %g1 40008a10: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008a14: 83 28 60 10 sll %g1, 0x10, %g1 40008a18: 89 30 60 10 srl %g1, 0x10, %g4 40008a1c: 80 a1 20 ff cmp %g4, 0xff 40008a20: 18 80 00 28 bgu 40008ac0 <_Thread_Change_priority+0x1ec> 40008a24: 83 30 60 18 srl %g1, 0x18, %g1 40008a28: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008a2c: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008a30: 85 30 a0 0c srl %g2, 0xc, %g2 40008a34: 83 28 60 10 sll %g1, 0x10, %g1 40008a38: 83 30 60 10 srl %g1, 0x10, %g1 40008a3c: 82 00 40 02 add %g1, %g2, %g1 40008a40: 85 28 60 04 sll %g1, 4, %g2 40008a44: 83 28 60 02 sll %g1, 2, %g1 40008a48: 82 20 80 01 sub %g2, %g1, %g1 40008a4c: 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 ); 40008a50: 05 10 00 74 sethi %hi(0x4001d000), %g2 40008a54: c4 00 a3 bc ld [ %g2 + 0x3bc ], %g2 ! 4001d3bc <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 40008a58: 07 10 00 74 sethi %hi(0x4001d000), %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() && 40008a5c: 80 a0 40 02 cmp %g1, %g2 40008a60: 02 80 00 08 be 40008a80 <_Thread_Change_priority+0x1ac> 40008a64: c2 20 e3 8c st %g1, [ %g3 + 0x38c ] _Thread_Executing->is_preemptible ) 40008a68: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 40008a6c: 80 a0 60 00 cmp %g1, 0 40008a70: 02 80 00 04 be 40008a80 <_Thread_Change_priority+0x1ac> 40008a74: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 40008a78: 03 10 00 74 sethi %hi(0x4001d000), %g1 40008a7c: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> _ISR_Enable( level ); 40008a80: 7f ff e4 e9 call 40001e24 40008a84: 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 ); 40008a88: 86 10 e3 78 or %g3, 0x378, %g3 40008a8c: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a90: 09 10 00 75 sethi %hi(0x4001d400), %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 ); 40008a94: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 40008a98: 88 11 20 30 or %g4, 0x30, %g4 40008a9c: 85 28 a0 10 sll %g2, 0x10, %g2 40008aa0: 83 30 a0 0f srl %g2, 0xf, %g1 40008aa4: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 40008aa8: 83 28 60 10 sll %g1, 0x10, %g1 40008aac: 89 30 60 10 srl %g1, 0x10, %g4 40008ab0: 80 a1 20 ff cmp %g4, 0xff 40008ab4: 28 bf ff de bleu,a 40008a2c <_Thread_Change_priority+0x158> 40008ab8: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 40008abc: 83 30 60 18 srl %g1, 0x18, %g1 40008ac0: 10 bf ff dc b 40008a30 <_Thread_Change_priority+0x15c> 40008ac4: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008ac8: 84 00 60 04 add %g1, 4, %g2 40008acc: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 40008ad0: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 40008ad4: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008ad8: 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; 40008adc: 10 bf ff ba b 400089c4 <_Thread_Change_priority+0xf0> 40008ae0: e0 20 80 00 st %l0, [ %g2 ] 4000d380 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000d380: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000d384: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000d388: e0 00 63 bc ld [ %g1 + 0x3bc ], %l0 ! 4001d3bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000d38c: 7f ff d2 a2 call 40001e14 4000d390: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000d394: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000d398: c4 04 40 00 ld [ %l1 ], %g2 4000d39c: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000d3a0: 80 a0 80 01 cmp %g2, %g1 4000d3a4: 02 80 00 1f be 4000d420 <_Thread_Reset_timeslice+0xa0> 4000d3a8: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d3ac: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 4000d3b0: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000d3b4: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d3b8: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d3bc: 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; 4000d3c0: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000d3c4: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d3c8: 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; 4000d3cc: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000d3d0: 7f ff d2 95 call 40001e24 4000d3d4: 01 00 00 00 nop 4000d3d8: 7f ff d2 8f call 40001e14 4000d3dc: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000d3e0: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000d3e4: c4 00 63 8c ld [ %g1 + 0x38c ], %g2 ! 4001d38c <_Thread_Heir> 4000d3e8: 80 a4 00 02 cmp %l0, %g2 4000d3ec: 02 80 00 06 be 4000d404 <_Thread_Reset_timeslice+0x84> 4000d3f0: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4000d3f4: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000d3f8: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000d3fc: 7f ff d2 8a call 40001e24 <== NOT EXECUTED 4000d400: 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; 4000d404: c4 04 40 00 ld [ %l1 ], %g2 4000d408: c4 20 63 8c st %g2, [ %g1 + 0x38c ] _Context_Switch_necessary = true; 4000d40c: 84 10 20 01 mov 1, %g2 4000d410: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000d414: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> _ISR_Enable( level ); 4000d418: 7f ff d2 83 call 40001e24 4000d41c: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000d420: 7f ff d2 81 call 40001e24 4000d424: 81 e8 00 00 restore 4000d428: 01 00 00 00 nop 40009c0c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 40009c0c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 40009c10: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c14: e0 00 63 bc ld [ %g1 + 0x3bc ], %l0 ! 4001d3bc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 40009c18: 7f ff e0 7f call 40001e14 40009c1c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40009c20: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40009c24: c4 04 40 00 ld [ %l1 ], %g2 40009c28: c2 04 60 08 ld [ %l1 + 8 ], %g1 40009c2c: 80 a0 80 01 cmp %g2, %g1 40009c30: 02 80 00 19 be 40009c94 <_Thread_Yield_processor+0x88> 40009c34: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40009c38: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40009c3c: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40009c40: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009c44: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40009c48: 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; 40009c4c: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40009c50: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40009c54: 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; 40009c58: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40009c5c: 7f ff e0 72 call 40001e24 40009c60: 01 00 00 00 nop 40009c64: 7f ff e0 6c call 40001e14 40009c68: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40009c6c: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c70: c4 00 63 8c ld [ %g1 + 0x38c ], %g2 ! 4001d38c <_Thread_Heir> 40009c74: 80 a4 00 02 cmp %l0, %g2 40009c78: 22 80 00 0e be,a 40009cb0 <_Thread_Yield_processor+0xa4> 40009c7c: 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; 40009c80: 84 10 20 01 mov 1, %g2 40009c84: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c88: c4 28 63 cc stb %g2, [ %g1 + 0x3cc ] ! 4001d3cc <_Context_Switch_necessary> _ISR_Enable( level ); 40009c8c: 7f ff e0 66 call 40001e24 40009c90: 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 ) ) 40009c94: 03 10 00 74 sethi %hi(0x4001d000), %g1 40009c98: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 4001d38c <_Thread_Heir> 40009c9c: 80 a4 00 01 cmp %l0, %g1 40009ca0: 32 bf ff f9 bne,a 40009c84 <_Thread_Yield_processor+0x78> 40009ca4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 40009ca8: 7f ff e0 5f call 40001e24 40009cac: 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; 40009cb0: 10 bf ff f4 b 40009c80 <_Thread_Yield_processor+0x74> 40009cb4: c4 20 63 8c st %g2, [ %g1 + 0x38c ] 40009474 <_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 ) { 40009474: 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; 40009478: 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); 4000947c: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40009480: 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); 40009484: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009488: 82 06 60 38 add %i1, 0x38, %g1 4000948c: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 40009490: 2d 10 00 72 sethi %hi(0x4001c800), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40009494: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40009498: 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 ]; 4000949c: ab 28 60 04 sll %g1, 4, %l5 400094a0: ac 15 a0 c4 or %l6, 0xc4, %l6 400094a4: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 400094a8: 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 ]; 400094ac: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 400094b0: 12 80 00 24 bne 40009540 <_Thread_queue_Enqueue_priority+0xcc> 400094b4: 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; 400094b8: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 400094bc: 7f ff e2 56 call 40001e14 400094c0: 01 00 00 00 nop 400094c4: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 400094c8: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 400094cc: 80 a0 40 16 cmp %g1, %l6 400094d0: 02 80 00 3a be 400095b8 <_Thread_queue_Enqueue_priority+0x144> 400094d4: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 400094d8: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 400094dc: 80 a4 00 13 cmp %l0, %l3 400094e0: 18 80 00 0b bgu 4000950c <_Thread_queue_Enqueue_priority+0x98> 400094e4: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400094e8: 10 80 00 36 b 400095c0 <_Thread_queue_Enqueue_priority+0x14c> 400094ec: 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 ) ) { 400094f0: 80 a4 40 16 cmp %l1, %l6 400094f4: 02 80 00 32 be 400095bc <_Thread_queue_Enqueue_priority+0x148> 400094f8: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 400094fc: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 40009500: 80 a4 00 13 cmp %l0, %l3 40009504: 28 80 00 2f bleu,a 400095c0 <_Thread_queue_Enqueue_priority+0x14c> 40009508: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4000950c: 7f ff e2 46 call 40001e24 40009510: 90 10 00 12 mov %l2, %o0 40009514: 7f ff e2 40 call 40001e14 40009518: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000951c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40009520: 80 8d 00 01 btst %l4, %g1 40009524: 32 bf ff f3 bne,a 400094f0 <_Thread_queue_Enqueue_priority+0x7c> 40009528: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 4000952c: 7f ff e2 3e call 40001e24 <== NOT EXECUTED 40009530: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40009534: 30 bf ff e2 b,a 400094bc <_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 ); 40009538: 7f ff e2 3b call 40001e24 4000953c: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40009540: 7f ff e2 35 call 40001e14 40009544: 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; 40009548: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 4000954c: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 40009550: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40009554: 80 a0 40 15 cmp %g1, %l5 40009558: 02 80 00 20 be 400095d8 <_Thread_queue_Enqueue_priority+0x164> 4000955c: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 40009560: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 40009564: 80 a4 00 13 cmp %l0, %l3 40009568: 0a 80 00 0b bcs 40009594 <_Thread_queue_Enqueue_priority+0x120> 4000956c: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40009570: 10 80 00 1b b 400095dc <_Thread_queue_Enqueue_priority+0x168> 40009574: 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 ) ) { 40009578: 80 a4 40 15 cmp %l1, %l5 4000957c: 02 80 00 17 be 400095d8 <_Thread_queue_Enqueue_priority+0x164> 40009580: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 40009584: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 40009588: 80 a4 00 13 cmp %l0, %l3 4000958c: 3a 80 00 14 bcc,a 400095dc <_Thread_queue_Enqueue_priority+0x168> 40009590: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40009594: 7f ff e2 24 call 40001e24 40009598: 90 10 00 12 mov %l2, %o0 4000959c: 7f ff e2 1e call 40001e14 400095a0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400095a4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 400095a8: 80 8d 00 01 btst %l4, %g1 400095ac: 32 bf ff f3 bne,a 40009578 <_Thread_queue_Enqueue_priority+0x104> 400095b0: e2 04 60 04 ld [ %l1 + 4 ], %l1 400095b4: 30 bf ff e1 b,a 40009538 <_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 ) ) { 400095b8: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400095bc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400095c0: 80 a0 a0 01 cmp %g2, 1 400095c4: 02 80 00 17 be 40009620 <_Thread_queue_Enqueue_priority+0x1ac> 400095c8: 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; 400095cc: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 400095d0: 81 c7 e0 08 ret 400095d4: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400095d8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400095dc: 80 a0 a0 01 cmp %g2, 1 400095e0: 32 bf ff fc bne,a 400095d0 <_Thread_queue_Enqueue_priority+0x15c> 400095e4: 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 ) 400095e8: 80 a4 00 13 cmp %l0, %l3 400095ec: 02 80 00 1a be 40009654 <_Thread_queue_Enqueue_priority+0x1e0> 400095f0: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400095f4: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400095f8: 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; 400095fc: 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; 40009600: 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; 40009604: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 40009608: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000960c: b0 10 20 01 mov 1, %i0 40009610: 7f ff e2 05 call 40001e24 40009614: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009618: 81 c7 e0 08 ret 4000961c: 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 ) 40009620: 02 80 00 0d be 40009654 <_Thread_queue_Enqueue_priority+0x1e0> 40009624: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009628: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000962c: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40009630: 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; 40009634: 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; 40009638: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 4000963c: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009640: b0 10 20 01 mov 1, %i0 40009644: 7f ff e1 f8 call 40001e24 40009648: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4000964c: 81 c7 e0 08 ret 40009650: 81 e8 00 00 restore 40009654: 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; 40009658: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000965c: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40009660: 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; 40009664: 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; 40009668: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 4000966c: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009670: b0 10 20 01 mov 1, %i0 40009674: 7f ff e1 ec call 40001e24 40009678: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4000967c: 81 c7 e0 08 ret 40009680: 81 e8 00 00 restore 40009730 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40009730: 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 ) 40009734: 80 a6 20 00 cmp %i0, 0 40009738: 02 80 00 13 be 40009784 <_Thread_queue_Requeue+0x54> 4000973c: 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 ) { 40009740: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40009744: 80 a4 60 01 cmp %l1, 1 40009748: 02 80 00 04 be 40009758 <_Thread_queue_Requeue+0x28> 4000974c: 01 00 00 00 nop 40009750: 81 c7 e0 08 ret <== NOT EXECUTED 40009754: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40009758: 7f ff e1 af call 40001e14 4000975c: 01 00 00 00 nop 40009760: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40009764: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40009768: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000976c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40009770: 80 88 80 01 btst %g2, %g1 40009774: 12 80 00 06 bne 4000978c <_Thread_queue_Requeue+0x5c> 40009778: 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 ); 4000977c: 7f ff e1 aa call 40001e24 40009780: 90 10 00 10 mov %l0, %o0 40009784: 81 c7 e0 08 ret 40009788: 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 ); 4000978c: 92 10 00 19 mov %i1, %o1 40009790: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 40009794: 40 00 0e 59 call 4000d0f8 <_Thread_queue_Extract_priority_helper> 40009798: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4000979c: 90 10 00 18 mov %i0, %o0 400097a0: 92 10 00 19 mov %i1, %o1 400097a4: 7f ff ff 34 call 40009474 <_Thread_queue_Enqueue_priority> 400097a8: 94 07 bf fc add %fp, -4, %o2 400097ac: 30 bf ff f4 b,a 4000977c <_Thread_queue_Requeue+0x4c> 40016cd0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40016cd0: 9d e3 bf 88 save %sp, -120, %sp 40016cd4: 2d 10 00 f6 sethi %hi(0x4003d800), %l6 40016cd8: ba 07 bf f4 add %fp, -12, %i5 40016cdc: a8 07 bf f8 add %fp, -8, %l4 40016ce0: a4 07 bf e8 add %fp, -24, %l2 40016ce4: ae 07 bf ec add %fp, -20, %l7 40016ce8: 2b 10 00 f6 sethi %hi(0x4003d800), %l5 40016cec: 39 10 00 f5 sethi %hi(0x4003d400), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40016cf0: c0 27 bf f8 clr [ %fp + -8 ] 40016cf4: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40016cf8: 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); 40016cfc: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40016d00: 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); 40016d04: ee 27 bf e8 st %l7, [ %fp + -24 ] 40016d08: ac 15 a0 d4 or %l6, 0xd4, %l6 40016d0c: aa 15 60 10 or %l5, 0x10, %l5 40016d10: b8 17 23 80 or %i4, 0x380, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d14: 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 ); 40016d18: 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 ); 40016d1c: 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 ); 40016d20: 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; 40016d24: 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; 40016d28: 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; 40016d2c: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40016d30: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d34: 90 10 00 11 mov %l1, %o0 40016d38: 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; 40016d3c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016d40: 40 00 11 c0 call 4001b440 <_Watchdog_Adjust_to_chain> 40016d44: 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; 40016d48: 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(); 40016d4c: 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 ) { 40016d50: 80 a4 00 09 cmp %l0, %o1 40016d54: 38 80 00 2f bgu,a 40016e10 <_Timer_server_Body+0x140> 40016d58: 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 ) { 40016d5c: 80 a4 00 09 cmp %l0, %o1 40016d60: 0a 80 00 30 bcs 40016e20 <_Timer_server_Body+0x150> 40016d64: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 40016d68: 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 ); 40016d6c: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40016d70: 40 00 02 98 call 400177d0 <_Chain_Get> 40016d74: 01 00 00 00 nop if ( timer == NULL ) { 40016d78: 80 a2 20 00 cmp %o0, 0 40016d7c: 02 80 00 10 be 40016dbc <_Timer_server_Body+0xec> 40016d80: 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 ) { 40016d84: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40016d88: 80 a0 60 01 cmp %g1, 1 40016d8c: 02 80 00 29 be 40016e30 <_Timer_server_Body+0x160> 40016d90: 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 ) { 40016d94: 12 bf ff f6 bne 40016d6c <_Timer_server_Body+0x9c> 40016d98: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40016d9c: 40 00 11 df call 4001b518 <_Watchdog_Insert> 40016da0: 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 ); 40016da4: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40016da8: 40 00 02 8a call 400177d0 <_Chain_Get> 40016dac: 01 00 00 00 nop if ( timer == NULL ) { 40016db0: 80 a2 20 00 cmp %o0, 0 40016db4: 32 bf ff f5 bne,a 40016d88 <_Timer_server_Body+0xb8> 40016db8: 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 ); 40016dbc: 7f ff df 71 call 4000eb80 40016dc0: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40016dc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40016dc8: 80 a5 00 01 cmp %l4, %g1 40016dcc: 02 80 00 1d be 40016e40 <_Timer_server_Body+0x170> 40016dd0: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40016dd4: 7f ff df 6f call 4000eb90 <== NOT EXECUTED 40016dd8: 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; 40016ddc: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 40016de0: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016de4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40016de8: 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; 40016dec: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 40016df0: 40 00 11 94 call 4001b440 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 40016df4: 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; 40016df8: 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(); 40016dfc: 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 ) { 40016e00: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 40016e04: 08 bf ff d7 bleu 40016d60 <_Timer_server_Body+0x90> <== NOT EXECUTED 40016e08: 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 ); 40016e0c: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 40016e10: 90 10 00 13 mov %l3, %o0 40016e14: 40 00 11 8b call 4001b440 <_Watchdog_Adjust_to_chain> 40016e18: 94 10 00 12 mov %l2, %o2 40016e1c: 30 bf ff d3 b,a 40016d68 <_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 ); 40016e20: 90 10 00 13 mov %l3, %o0 40016e24: 40 00 11 57 call 4001b380 <_Watchdog_Adjust> 40016e28: 92 10 20 01 mov 1, %o1 40016e2c: 30 bf ff cf b,a 40016d68 <_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 ); 40016e30: 92 02 20 10 add %o0, 0x10, %o1 40016e34: 40 00 11 b9 call 4001b518 <_Watchdog_Insert> 40016e38: 90 10 00 11 mov %l1, %o0 40016e3c: 30 bf ff cc b,a 40016d6c <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 40016e40: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40016e44: 7f ff df 53 call 4000eb90 40016e48: 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 ) ) { 40016e4c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40016e50: 80 a5 c0 01 cmp %l7, %g1 40016e54: 12 80 00 0c bne 40016e84 <_Timer_server_Body+0x1b4> 40016e58: 01 00 00 00 nop 40016e5c: 30 80 00 13 b,a 40016ea8 <_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; 40016e60: 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; 40016e64: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 40016e68: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 40016e6c: 7f ff df 49 call 4000eb90 40016e70: 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 ); 40016e74: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 40016e78: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 40016e7c: 9f c0 40 00 call %g1 40016e80: 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 ); 40016e84: 7f ff df 3f call 4000eb80 40016e88: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40016e8c: 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)) 40016e90: 80 a5 c0 10 cmp %l7, %l0 40016e94: 32 bf ff f3 bne,a 40016e60 <_Timer_server_Body+0x190> 40016e98: 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 ); 40016e9c: 7f ff df 3d call 4000eb90 40016ea0: 01 00 00 00 nop 40016ea4: 30 bf ff a1 b,a 40016d28 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 40016ea8: c0 2e 20 7c clrb [ %i0 + 0x7c ] 40016eac: c2 07 00 00 ld [ %i4 ], %g1 40016eb0: 82 00 60 01 inc %g1 40016eb4: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 40016eb8: d0 06 00 00 ld [ %i0 ], %o0 40016ebc: 40 00 0e 90 call 4001a8fc <_Thread_Set_state> 40016ec0: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40016ec4: 7f ff ff 59 call 40016c28 <_Timer_server_Reset_interval_system_watchdog> 40016ec8: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40016ecc: 7f ff ff 6c call 40016c7c <_Timer_server_Reset_tod_system_watchdog> 40016ed0: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40016ed4: 40 00 0b c1 call 40019dd8 <_Thread_Enable_dispatch> 40016ed8: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40016edc: 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; 40016ee0: 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 ); 40016ee4: 40 00 11 fa call 4001b6cc <_Watchdog_Remove> 40016ee8: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40016eec: 40 00 11 f8 call 4001b6cc <_Watchdog_Remove> 40016ef0: 90 10 00 1a mov %i2, %o0 40016ef4: 30 bf ff 8d b,a 40016d28 <_Timer_server_Body+0x58> 4000c2a8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000c2a8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000c2ac: 7f ff da a7 call 40002d48 4000c2b0: 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)); 4000c2b4: 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; 4000c2b8: 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 ) ) { 4000c2bc: 80 a0 40 11 cmp %g1, %l1 4000c2c0: 02 80 00 1f be 4000c33c <_Watchdog_Adjust+0x94> 4000c2c4: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000c2c8: 12 80 00 1f bne 4000c344 <_Watchdog_Adjust+0x9c> 4000c2cc: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000c2d0: 80 a6 a0 00 cmp %i2, 0 4000c2d4: 02 80 00 1a be 4000c33c <_Watchdog_Adjust+0x94> 4000c2d8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c2dc: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c2e0: 80 a6 80 19 cmp %i2, %i1 4000c2e4: 1a 80 00 0b bcc 4000c310 <_Watchdog_Adjust+0x68> 4000c2e8: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 4000c2ec: 10 80 00 1d b 4000c360 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000c2f0: 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 ) { 4000c2f4: b4 a6 80 19 subcc %i2, %i1, %i2 4000c2f8: 02 80 00 11 be 4000c33c <_Watchdog_Adjust+0x94> 4000c2fc: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000c300: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000c304: 80 a6 40 1a cmp %i1, %i2 4000c308: 38 80 00 16 bgu,a 4000c360 <_Watchdog_Adjust+0xb8> 4000c30c: 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; 4000c310: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 4000c314: 7f ff da 91 call 40002d58 4000c318: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000c31c: 40 00 00 b6 call 4000c5f4 <_Watchdog_Tickle> 4000c320: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000c324: 7f ff da 89 call 40002d48 4000c328: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c32c: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 4000c330: 80 a4 40 02 cmp %l1, %g2 4000c334: 12 bf ff f0 bne 4000c2f4 <_Watchdog_Adjust+0x4c> 4000c338: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 4000c33c: 7f ff da 87 call 40002d58 4000c340: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000c344: 12 bf ff fe bne 4000c33c <_Watchdog_Adjust+0x94> 4000c348: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000c34c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000c350: b4 00 80 1a add %g2, %i2, %i2 4000c354: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 4000c358: 7f ff da 80 call 40002d58 4000c35c: 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; 4000c360: 10 bf ff f7 b 4000c33c <_Watchdog_Adjust+0x94> 4000c364: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 40009320 : 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 ) { 40009320: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 40009324: 03 10 00 8e sethi %hi(0x40023800), %g1 40009328: c2 00 63 28 ld [ %g1 + 0x328 ], %g1 ! 40023b28 <_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; 4000932c: 09 10 00 8f sethi %hi(0x40023c00), %g4 if ( rtems_interrupt_is_in_progress() ) 40009330: 80 a0 60 00 cmp %g1, 0 40009334: 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 ) { 40009338: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 4000933c: 12 80 00 49 bne 40009460 40009340: c6 01 21 90 ld [ %g4 + 0x190 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 40009344: 80 a6 a0 00 cmp %i2, 0 40009348: 02 80 00 4b be 40009474 4000934c: 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 ) 40009350: 02 80 00 49 be 40009474 40009354: 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; 40009358: c4 06 40 00 ld [ %i1 ], %g2 4000935c: 80 a0 a0 00 cmp %g2, 0 40009360: 22 80 00 42 be,a 40009468 40009364: 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 ) 40009368: 80 a0 c0 18 cmp %g3, %i0 4000936c: 08 80 00 3d bleu 40009460 40009370: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009374: 05 10 00 8e sethi %hi(0x40023800), %g2 40009378: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 ! 40023a90 <_Thread_Dispatch_disable_level> 4000937c: 86 00 e0 01 inc %g3 40009380: c6 20 a2 90 st %g3, [ %g2 + 0x290 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 40009384: 80 a6 20 00 cmp %i0, 0 40009388: 12 80 00 2b bne 40009434 4000938c: 05 10 00 8f sethi %hi(0x40023c00), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 40009390: da 01 21 90 ld [ %g4 + 0x190 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 40009394: 80 a3 60 00 cmp %o5, 0 40009398: 02 80 00 3a be 40009480 4000939c: d8 00 a1 94 ld [ %g2 + 0x194 ], %o4 400093a0: 10 80 00 05 b 400093b4 400093a4: 86 10 00 0c mov %o4, %g3 400093a8: 80 a3 40 18 cmp %o5, %i0 400093ac: 08 80 00 0b bleu 400093d8 400093b0: 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; 400093b4: c8 00 c0 00 ld [ %g3 ], %g4 400093b8: 80 a1 20 00 cmp %g4, 0 400093bc: 32 bf ff fb bne,a 400093a8 400093c0: b0 06 20 01 inc %i0 400093c4: c8 00 e0 04 ld [ %g3 + 4 ], %g4 400093c8: 80 a1 20 00 cmp %g4, 0 400093cc: 32 bf ff f7 bne,a 400093a8 400093d0: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 400093d4: 80 a3 40 18 cmp %o5, %i0 400093d8: 02 80 00 2b be 40009484 400093dc: f0 26 80 00 st %i0, [ %i2 ] 400093e0: 85 2e 20 03 sll %i0, 3, %g2 400093e4: 87 2e 20 05 sll %i0, 5, %g3 400093e8: 84 20 c0 02 sub %g3, %g2, %g2 400093ec: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400093f0: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 400093f4: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 400093f8: c6 20 80 00 st %g3, [ %g2 ] 400093fc: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40009400: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 40009404: c6 20 a0 04 st %g3, [ %g2 + 4 ] 40009408: c6 00 60 08 ld [ %g1 + 8 ], %g3 4000940c: c6 20 a0 08 st %g3, [ %g2 + 8 ] 40009410: c6 00 60 0c ld [ %g1 + 0xc ], %g3 40009414: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 40009418: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 4000941c: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 40009420: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 40009424: 40 00 07 2f call 4000b0e0 <_Thread_Enable_dispatch> 40009428: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 4000942c: 40 00 24 16 call 40012484 40009430: 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; 40009434: c6 00 a1 94 ld [ %g2 + 0x194 ], %g3 40009438: 89 2e 20 05 sll %i0, 5, %g4 4000943c: 85 2e 20 03 sll %i0, 3, %g2 40009440: 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; 40009444: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 40009448: 80 a1 20 00 cmp %g4, 0 4000944c: 02 80 00 12 be 40009494 40009450: 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(); 40009454: 40 00 07 23 call 4000b0e0 <_Thread_Enable_dispatch> 40009458: 01 00 00 00 nop 4000945c: 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 ); } 40009460: 81 c7 e0 08 ret 40009464: 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; 40009468: 80 a0 a0 00 cmp %g2, 0 4000946c: 12 bf ff c0 bne 4000936c 40009470: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 40009474: 84 10 20 09 mov 9, %g2 } 40009478: 81 c7 e0 08 ret 4000947c: 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; 40009480: 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(); 40009484: 40 00 07 17 call 4000b0e0 <_Thread_Enable_dispatch> 40009488: 01 00 00 00 nop return sc; 4000948c: 10 bf ff f5 b 40009460 40009490: 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; 40009494: c6 00 a0 04 ld [ %g2 + 4 ], %g3 40009498: 80 a0 e0 00 cmp %g3, 0 4000949c: 12 bf ff ee bne 40009454 400094a0: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 400094a4: 10 bf ff d3 b 400093f0 400094a8: f0 26 80 00 st %i0, [ %i2 ] 40009bf0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40009bf0: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40009bf4: 80 a6 20 00 cmp %i0, 0 40009bf8: 02 80 00 23 be 40009c84 40009bfc: 25 10 00 ad sethi %hi(0x4002b400), %l2 40009c00: a4 14 a1 f4 or %l2, 0x1f4, %l2 ! 4002b5f4 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 40009c04: 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 ] ) 40009c08: c2 04 80 00 ld [ %l2 ], %g1 40009c0c: 80 a0 60 00 cmp %g1, 0 40009c10: 22 80 00 1a be,a 40009c78 40009c14: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40009c18: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 40009c1c: 80 a4 60 00 cmp %l1, 0 40009c20: 22 80 00 16 be,a 40009c78 40009c24: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40009c28: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40009c2c: 84 90 60 00 orcc %g1, 0, %g2 40009c30: 22 80 00 12 be,a 40009c78 40009c34: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 40009c38: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40009c3c: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40009c40: 83 2c 20 02 sll %l0, 2, %g1 40009c44: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 40009c48: 90 90 60 00 orcc %g1, 0, %o0 40009c4c: 02 80 00 05 be 40009c60 40009c50: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40009c54: 9f c6 00 00 call %i0 40009c58: 01 00 00 00 nop 40009c5c: 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++ ) { 40009c60: 83 28 a0 10 sll %g2, 0x10, %g1 40009c64: 83 30 60 10 srl %g1, 0x10, %g1 40009c68: 80 a0 40 10 cmp %g1, %l0 40009c6c: 3a bf ff f5 bcc,a 40009c40 40009c70: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 40009c74: 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++ ) { 40009c78: 80 a4 80 13 cmp %l2, %l3 40009c7c: 32 bf ff e4 bne,a 40009c0c 40009c80: c2 04 80 00 ld [ %l2 ], %g1 40009c84: 81 c7 e0 08 ret 40009c88: 81 e8 00 00 restore