02006878 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2006878: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 200687c: 23 00 80 6e sethi %hi(0x201b800), %l1 2006880: e0 04 60 54 ld [ %l1 + 0x54 ], %l0 ! 201b854 <_API_extensions_List> 2006884: a2 14 60 54 or %l1, 0x54, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2006888: a2 04 60 04 add %l1, 4, %l1 200688c: 80 a4 00 11 cmp %l0, %l1 2006890: 02 80 00 09 be 20068b4 <_API_extensions_Run_postdriver+0x3c> 2006894: 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)(); 2006898: c2 04 20 08 ld [ %l0 + 8 ], %g1 200689c: 9f c0 40 00 call %g1 20068a0: 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 ) { 20068a4: 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 ; 20068a8: 80 a4 00 11 cmp %l0, %l1 20068ac: 32 bf ff fc bne,a 200689c <_API_extensions_Run_postdriver+0x24> 20068b0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 20068b4: 81 c7 e0 08 ret 20068b8: 81 e8 00 00 restore 020068bc <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 20068bc: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20068c0: 23 00 80 6e sethi %hi(0x201b800), %l1 20068c4: e0 04 60 54 ld [ %l1 + 0x54 ], %l0 ! 201b854 <_API_extensions_List> 20068c8: a2 14 60 54 or %l1, 0x54, %l1 20068cc: a2 04 60 04 add %l1, 4, %l1 20068d0: 80 a4 00 11 cmp %l0, %l1 20068d4: 02 80 00 0a be 20068fc <_API_extensions_Run_postswitch+0x40> 20068d8: 25 00 80 6d sethi %hi(0x201b400), %l2 20068dc: a4 14 a2 d0 or %l2, 0x2d0, %l2 ! 201b6d0 <_Thread_Executing> * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 20068e0: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20068e4: 9f c0 40 00 call %g1 20068e8: 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 ) { 20068ec: 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 ; 20068f0: 80 a4 00 11 cmp %l0, %l1 20068f4: 32 bf ff fc bne,a 20068e4 <_API_extensions_Run_postswitch+0x28> 20068f8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 20068fc: 81 c7 e0 08 ret 2006900: 81 e8 00 00 restore 0200c0a8 <_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 ) { 200c0a8: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 200c0ac: 03 00 80 6d sethi %hi(0x201b400), %g1 200c0b0: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 201b6d0 <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200c0b4: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200c0b8: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 200c0bc: 80 a0 a0 00 cmp %g2, 0 200c0c0: 22 80 00 13 be,a 200c10c <_CORE_mutex_Seize_interrupt_trylock+0x64> 200c0c4: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 200c0c8: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200c0cc: 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; 200c0d0: 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; 200c0d4: 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; 200c0d8: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200c0dc: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200c0e0: 80 a0 a0 02 cmp %g2, 2 200c0e4: 02 80 00 0f be 200c120 <_CORE_mutex_Seize_interrupt_trylock+0x78> 200c0e8: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 200c0ec: 80 a0 a0 03 cmp %g2, 3 200c0f0: 22 80 00 1f be,a 200c16c <_CORE_mutex_Seize_interrupt_trylock+0xc4> 200c0f4: da 00 60 1c ld [ %g1 + 0x1c ], %o5 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 200c0f8: d0 06 40 00 ld [ %i1 ], %o0 200c0fc: 7f ff d8 70 call 20022bc 200c100: b0 10 20 00 clr %i0 200c104: 81 c7 e0 08 ret 200c108: 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 ) ) { 200c10c: 80 a0 40 02 cmp %g1, %g2 200c110: 22 80 00 0c be,a 200c140 <_CORE_mutex_Seize_interrupt_trylock+0x98> 200c114: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200c118: 81 c7 e0 08 ret 200c11c: 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++; 200c120: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 200c124: 84 00 a0 01 inc %g2 200c128: c4 20 60 1c st %g2, [ %g1 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 200c12c: d0 06 40 00 ld [ %i1 ], %o0 200c130: 7f ff d8 63 call 20022bc 200c134: b0 10 20 00 clr %i0 200c138: 81 c7 e0 08 ret 200c13c: 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 ) { 200c140: 80 a0 a0 00 cmp %g2, 0 200c144: 12 80 00 2b bne 200c1f0 <_CORE_mutex_Seize_interrupt_trylock+0x148> 200c148: 80 a0 a0 01 cmp %g2, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 200c14c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200c150: 82 00 60 01 inc %g1 200c154: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 200c158: d0 06 40 00 ld [ %i1 ], %o0 200c15c: 7f ff d8 58 call 20022bc 200c160: b0 10 20 00 clr %i0 200c164: 81 c7 e0 08 ret 200c168: 81 e8 00 00 restore { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 200c16c: 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++; 200c170: 88 03 60 01 add %o5, 1, %g4 200c174: c8 20 60 1c st %g4, [ %g1 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200c178: c8 06 20 4c ld [ %i0 + 0x4c ], %g4 current = executing->current_priority; if ( current == ceiling ) { 200c17c: 80 a1 00 02 cmp %g4, %g2 200c180: 02 80 00 24 be 200c210 <_CORE_mutex_Seize_interrupt_trylock+0x168> 200c184: 01 00 00 00 nop _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 200c188: 1a 80 00 11 bcc 200c1cc <_CORE_mutex_Seize_interrupt_trylock+0x124> 200c18c: 84 10 20 06 mov 6, %g2 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200c190: 03 00 80 6d sethi %hi(0x201b400), %g1 200c194: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 ! 201b610 <_Thread_Dispatch_disable_level> 200c198: 84 00 a0 01 inc %g2 200c19c: c4 20 62 10 st %g2, [ %g1 + 0x210 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 200c1a0: 7f ff d8 47 call 20022bc 200c1a4: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 200c1a8: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200c1ac: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200c1b0: 94 10 20 00 clr %o2 200c1b4: 7f ff ee b7 call 2007c90 <_Thread_Change_priority> 200c1b8: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 200c1bc: 7f ff f0 53 call 2008308 <_Thread_Enable_dispatch> 200c1c0: 01 00 00 00 nop 200c1c4: 81 c7 e0 08 ret 200c1c8: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200c1cc: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 200c1d0: c6 26 20 50 st %g3, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ 200c1d4: c0 26 20 54 clr [ %i0 + 0x54 ] executing->resource_count--; /* undo locking above */ 200c1d8: da 20 60 1c st %o5, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 200c1dc: d0 06 40 00 ld [ %i1 ], %o0 200c1e0: 7f ff d8 37 call 20022bc 200c1e4: b0 10 20 00 clr %i0 200c1e8: 81 c7 e0 08 ret 200c1ec: 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 ) { 200c1f0: 12 bf ff ca bne 200c118 <_CORE_mutex_Seize_interrupt_trylock+0x70> 200c1f4: 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; 200c1f8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED _ISR_Enable( *level_p ); 200c1fc: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 200c200: 7f ff d8 2f call 20022bc <== NOT EXECUTED 200c204: b0 10 20 00 clr %i0 <== NOT EXECUTED 200c208: 81 c7 e0 08 ret <== NOT EXECUTED 200c20c: 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 ); 200c210: d0 06 40 00 ld [ %i1 ], %o0 200c214: 7f ff d8 2a call 20022bc 200c218: b0 10 20 00 clr %i0 200c21c: 81 c7 e0 08 ret 200c220: 81 e8 00 00 restore 0200c31c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c31c: 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; 200c320: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c324: 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 ) { 200c328: 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; 200c32c: e4 06 20 08 ld [ %i0 + 8 ], %l2 200c330: 18 80 00 72 bgu 200c4f8 <_Heap_Allocate_aligned_with_boundary+0x1dc> 200c334: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200c338: 80 a6 e0 00 cmp %i3, 0 200c33c: 12 80 00 6d bne 200c4f0 <_Heap_Allocate_aligned_with_boundary+0x1d4> 200c340: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c344: 80 a4 00 12 cmp %l0, %l2 200c348: 02 80 00 6f be 200c504 <_Heap_Allocate_aligned_with_boundary+0x1e8> 200c34c: 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; 200c350: 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; 200c354: 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; 200c358: 82 20 40 19 sub %g1, %i1, %g1 200c35c: 10 80 00 09 b 200c380 <_Heap_Allocate_aligned_with_boundary+0x64> 200c360: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 200c364: 80 a6 20 00 cmp %i0, 0 200c368: 32 80 00 54 bne,a 200c4b8 <_Heap_Allocate_aligned_with_boundary+0x19c> 200c36c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 200c370: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c374: 80 a4 00 12 cmp %l0, %l2 200c378: 22 80 00 57 be,a 200c4d4 <_Heap_Allocate_aligned_with_boundary+0x1b8> 200c37c: 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 ) { 200c380: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200c384: 80 a5 00 13 cmp %l4, %l3 200c388: 1a bf ff fa bcc 200c370 <_Heap_Allocate_aligned_with_boundary+0x54> 200c38c: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200c390: 80 a6 a0 00 cmp %i2, 0 200c394: 02 bf ff f4 be 200c364 <_Heap_Allocate_aligned_with_boundary+0x48> 200c398: 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; 200c39c: 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; 200c3a0: 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; 200c3a4: a6 0c ff fe and %l3, -2, %l3 200c3a8: 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; 200c3ac: 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; 200c3b0: 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); 200c3b4: 90 10 00 18 mov %i0, %o0 200c3b8: a6 00 40 13 add %g1, %l3, %l3 200c3bc: 40 00 2f 40 call 20180bc <.urem> 200c3c0: 92 10 00 1a mov %i2, %o1 200c3c4: 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 ) { 200c3c8: 80 a4 c0 18 cmp %l3, %i0 200c3cc: 1a 80 00 06 bcc 200c3e4 <_Heap_Allocate_aligned_with_boundary+0xc8> 200c3d0: ac 04 a0 08 add %l2, 8, %l6 200c3d4: 90 10 00 13 mov %l3, %o0 200c3d8: 40 00 2f 39 call 20180bc <.urem> 200c3dc: 92 10 00 1a mov %i2, %o1 200c3e0: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200c3e4: 80 a6 e0 00 cmp %i3, 0 200c3e8: 02 80 00 24 be 200c478 <_Heap_Allocate_aligned_with_boundary+0x15c> 200c3ec: 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; 200c3f0: a6 06 00 19 add %i0, %i1, %l3 200c3f4: 92 10 00 1b mov %i3, %o1 200c3f8: 40 00 2f 31 call 20180bc <.urem> 200c3fc: 90 10 00 13 mov %l3, %o0 200c400: 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 ) { 200c404: 80 a4 c0 08 cmp %l3, %o0 200c408: 08 80 00 1b bleu 200c474 <_Heap_Allocate_aligned_with_boundary+0x158> 200c40c: 80 a6 00 08 cmp %i0, %o0 200c410: 1a 80 00 1a bcc 200c478 <_Heap_Allocate_aligned_with_boundary+0x15c> 200c414: 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; 200c418: 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 ) { 200c41c: 80 a5 40 08 cmp %l5, %o0 200c420: 28 80 00 09 bleu,a 200c444 <_Heap_Allocate_aligned_with_boundary+0x128> 200c424: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 200c428: 10 bf ff d3 b 200c374 <_Heap_Allocate_aligned_with_boundary+0x58> 200c42c: 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 ) { 200c430: 1a 80 00 11 bcc 200c474 <_Heap_Allocate_aligned_with_boundary+0x158> 200c434: 80 a5 40 08 cmp %l5, %o0 if ( boundary_line < boundary_floor ) { 200c438: 38 bf ff cf bgu,a 200c374 <_Heap_Allocate_aligned_with_boundary+0x58> 200c43c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 200c440: b0 22 00 19 sub %o0, %i1, %i0 200c444: 92 10 00 1a mov %i2, %o1 200c448: 40 00 2f 1d call 20180bc <.urem> 200c44c: 90 10 00 18 mov %i0, %o0 200c450: 92 10 00 1b mov %i3, %o1 200c454: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200c458: a6 06 00 19 add %i0, %i1, %l3 200c45c: 40 00 2f 18 call 20180bc <.urem> 200c460: 90 10 00 13 mov %l3, %o0 200c464: 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 ) { 200c468: 80 a4 c0 08 cmp %l3, %o0 200c46c: 18 bf ff f1 bgu 200c430 <_Heap_Allocate_aligned_with_boundary+0x114> 200c470: 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 ) { 200c474: 80 a5 80 18 cmp %l6, %i0 200c478: 18 bf ff be bgu 200c370 <_Heap_Allocate_aligned_with_boundary+0x54> 200c47c: 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; 200c480: 90 10 00 18 mov %i0, %o0 200c484: a6 20 40 12 sub %g1, %l2, %l3 200c488: 92 10 00 1d mov %i5, %o1 200c48c: 40 00 2f 0c call 20180bc <.urem> 200c490: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 200c494: 90 a4 c0 08 subcc %l3, %o0, %o0 200c498: 02 bf ff b4 be 200c368 <_Heap_Allocate_aligned_with_boundary+0x4c> 200c49c: 80 a6 20 00 cmp %i0, 0 200c4a0: 80 a5 c0 08 cmp %l7, %o0 200c4a4: 18 bf ff b3 bgu 200c370 <_Heap_Allocate_aligned_with_boundary+0x54> 200c4a8: 80 a6 20 00 cmp %i0, 0 boundary ); } } if ( alloc_begin != 0 ) { 200c4ac: 22 bf ff b2 be,a 200c374 <_Heap_Allocate_aligned_with_boundary+0x58> 200c4b0: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c4b4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c4b8: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c4bc: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c4c0: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c4c4: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c4c8: 90 10 00 10 mov %l0, %o0 200c4cc: 7f ff eb 35 call 20071a0 <_Heap_Block_allocate> 200c4d0: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200c4d4: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 200c4d8: 80 a0 40 11 cmp %g1, %l1 200c4dc: 1a 80 00 08 bcc 200c4fc <_Heap_Allocate_aligned_with_boundary+0x1e0> 200c4e0: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c4e4: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 200c4e8: 81 c7 e0 08 ret 200c4ec: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200c4f0: 08 80 00 07 bleu 200c50c <_Heap_Allocate_aligned_with_boundary+0x1f0> 200c4f4: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c4f8: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 200c4fc: 81 c7 e0 08 ret 200c500: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c504: 10 bf ff f4 b 200c4d4 <_Heap_Allocate_aligned_with_boundary+0x1b8> 200c508: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200c50c: 22 bf ff 8e be,a 200c344 <_Heap_Allocate_aligned_with_boundary+0x28> 200c510: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 200c514: 10 bf ff 8d b 200c348 <_Heap_Allocate_aligned_with_boundary+0x2c> 200c518: 80 a4 00 12 cmp %l0, %l2 02008118 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2008118: 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; 200811c: 25 00 80 21 sethi %hi(0x2008400), %l2 2008120: 80 8e a0 ff btst 0xff, %i2 2008124: a4 14 a3 18 or %l2, 0x318, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2008128: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 200812c: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 2008130: 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; 2008134: 12 80 00 04 bne 2008144 <_Heap_Walk+0x2c> 2008138: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 200813c: 25 00 80 20 sethi %hi(0x2008000), %l2 2008140: a4 14 a1 10 or %l2, 0x110, %l2 ! 2008110 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2008144: 03 00 80 77 sethi %hi(0x201dc00), %g1 2008148: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201dfb0 <_System_state_Current> 200814c: 80 a0 60 03 cmp %g1, 3 2008150: 22 80 00 04 be,a 2008160 <_Heap_Walk+0x48> 2008154: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 2008158: 81 c7 e0 08 ret 200815c: 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)( 2008160: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2008164: c4 06 20 08 ld [ %i0 + 8 ], %g2 2008168: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200816c: 90 10 00 19 mov %i1, %o0 2008170: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2008174: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2008178: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 200817c: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 2008180: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 2008184: 92 10 20 00 clr %o1 2008188: 15 00 80 6c sethi %hi(0x201b000), %o2 200818c: 96 10 00 15 mov %l5, %o3 2008190: 94 12 a1 50 or %o2, 0x150, %o2 2008194: 9f c4 80 00 call %l2 2008198: 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 ) { 200819c: 80 a5 60 00 cmp %l5, 0 20081a0: 02 80 00 36 be 2008278 <_Heap_Walk+0x160> 20081a4: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 20081a8: 12 80 00 3c bne 2008298 <_Heap_Walk+0x180> 20081ac: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 20081b0: 7f ff e6 45 call 2001ac4 <.urem> 20081b4: 92 10 00 15 mov %l5, %o1 20081b8: 80 a2 20 00 cmp %o0, 0 20081bc: 12 80 00 40 bne 20082bc <_Heap_Walk+0x1a4> 20081c0: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 20081c4: 7f ff e6 40 call 2001ac4 <.urem> 20081c8: 92 10 00 15 mov %l5, %o1 20081cc: 80 a2 20 00 cmp %o0, 0 20081d0: 32 80 00 44 bne,a 20082e0 <_Heap_Walk+0x1c8> 20081d4: 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; 20081d8: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 20081dc: ae 8d a0 01 andcc %l6, 1, %l7 20081e0: 22 80 00 48 be,a 2008300 <_Heap_Walk+0x1e8> 20081e4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 20081e8: d6 04 00 00 ld [ %l0 ], %o3 20081ec: 80 a5 40 0b cmp %l5, %o3 20081f0: 32 80 00 1a bne,a 2008258 <_Heap_Walk+0x140> 20081f4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 20081f8: c2 05 20 04 ld [ %l4 + 4 ], %g1 20081fc: 82 08 7f fe and %g1, -2, %g1 2008200: 82 05 00 01 add %l4, %g1, %g1 2008204: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008208: 80 88 60 01 btst 1, %g1 200820c: 22 80 01 23 be,a 2008698 <_Heap_Walk+0x580> 2008210: 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; 2008214: 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 ) { 2008218: 80 a6 00 11 cmp %i0, %l1 200821c: 02 80 00 6f be 20083d8 <_Heap_Walk+0x2c0> 2008220: 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; 2008224: 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 2008228: 80 a7 00 11 cmp %i4, %l1 200822c: 28 80 00 3c bleu,a 200831c <_Heap_Walk+0x204> 2008230: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 2008234: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2008238: 96 10 00 11 mov %l1, %o3 200823c: 92 10 20 01 mov 1, %o1 2008240: 15 00 80 6c sethi %hi(0x201b000), %o2 2008244: b0 10 20 00 clr %i0 2008248: 9f c4 80 00 call %l2 200824c: 94 12 a2 f8 or %o2, 0x2f8, %o2 2008250: 81 c7 e0 08 ret 2008254: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 2008258: 98 10 00 15 mov %l5, %o4 200825c: 92 10 20 01 mov 1, %o1 2008260: 15 00 80 6c sethi %hi(0x201b000), %o2 2008264: b0 10 20 00 clr %i0 2008268: 9f c4 80 00 call %l2 200826c: 94 12 a2 b0 or %o2, 0x2b0, %o2 2008270: 81 c7 e0 08 ret 2008274: 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" ); 2008278: 90 10 00 19 mov %i1, %o0 200827c: 92 10 20 01 mov 1, %o1 2008280: 15 00 80 6c sethi %hi(0x201b000), %o2 2008284: b0 10 20 00 clr %i0 2008288: 9f c4 80 00 call %l2 200828c: 94 12 a1 e8 or %o2, 0x1e8, %o2 2008290: 81 c7 e0 08 ret 2008294: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 2008298: 90 10 00 19 mov %i1, %o0 200829c: 96 10 00 15 mov %l5, %o3 20082a0: 92 10 20 01 mov 1, %o1 20082a4: 15 00 80 6c sethi %hi(0x201b000), %o2 20082a8: b0 10 20 00 clr %i0 20082ac: 9f c4 80 00 call %l2 20082b0: 94 12 a2 00 or %o2, 0x200, %o2 20082b4: 81 c7 e0 08 ret 20082b8: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 20082bc: 90 10 00 19 mov %i1, %o0 20082c0: 96 10 00 13 mov %l3, %o3 20082c4: 92 10 20 01 mov 1, %o1 20082c8: 15 00 80 6c sethi %hi(0x201b000), %o2 20082cc: b0 10 20 00 clr %i0 20082d0: 9f c4 80 00 call %l2 20082d4: 94 12 a2 20 or %o2, 0x220, %o2 20082d8: 81 c7 e0 08 ret 20082dc: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 20082e0: 96 10 00 10 mov %l0, %o3 20082e4: 92 10 20 01 mov 1, %o1 20082e8: 15 00 80 6c sethi %hi(0x201b000), %o2 20082ec: b0 10 20 00 clr %i0 20082f0: 9f c4 80 00 call %l2 20082f4: 94 12 a2 48 or %o2, 0x248, %o2 20082f8: 81 c7 e0 08 ret 20082fc: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 2008300: 92 10 20 01 mov 1, %o1 2008304: 15 00 80 6c sethi %hi(0x201b000), %o2 2008308: b0 10 20 00 clr %i0 200830c: 9f c4 80 00 call %l2 2008310: 94 12 a2 80 or %o2, 0x280, %o2 2008314: 81 c7 e0 08 ret 2008318: 81 e8 00 00 restore 200831c: 80 a6 c0 11 cmp %i3, %l1 2008320: 0a bf ff c6 bcs 2008238 <_Heap_Walk+0x120> 2008324: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 2008328: 90 04 60 08 add %l1, 8, %o0 200832c: 7f ff e5 e6 call 2001ac4 <.urem> 2008330: 92 10 00 1a mov %i2, %o1 2008334: 80 a2 20 00 cmp %o0, 0 2008338: 12 80 00 df bne 20086b4 <_Heap_Walk+0x59c> 200833c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2008340: c2 04 60 04 ld [ %l1 + 4 ], %g1 2008344: 82 08 7f fe and %g1, -2, %g1 2008348: 82 04 40 01 add %l1, %g1, %g1 200834c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2008350: 80 88 60 01 btst 1, %g1 2008354: 12 80 00 ea bne 20086fc <_Heap_Walk+0x5e4> 2008358: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 200835c: d8 04 60 0c ld [ %l1 + 0xc ], %o4 2008360: 80 a6 00 0c cmp %i0, %o4 2008364: 02 80 00 19 be 20083c8 <_Heap_Walk+0x2b0> 2008368: ba 10 00 11 mov %l1, %i5 200836c: 30 80 00 dc b,a 20086dc <_Heap_Walk+0x5c4> <== NOT EXECUTED 2008370: 0a bf ff b2 bcs 2008238 <_Heap_Walk+0x120> 2008374: 90 10 00 19 mov %i1, %o0 2008378: 80 a6 c0 11 cmp %i3, %l1 200837c: 0a bf ff b0 bcs 200823c <_Heap_Walk+0x124> 2008380: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 2008384: 90 04 60 08 add %l1, 8, %o0 2008388: 7f ff e5 cf call 2001ac4 <.urem> 200838c: 92 10 00 1a mov %i2, %o1 2008390: 80 a2 20 00 cmp %o0, 0 2008394: 32 80 00 c8 bne,a 20086b4 <_Heap_Walk+0x59c> 2008398: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200839c: c2 04 60 04 ld [ %l1 + 4 ], %g1 20083a0: 82 08 7f fe and %g1, -2, %g1 20083a4: 82 00 40 11 add %g1, %l1, %g1 20083a8: c2 00 60 04 ld [ %g1 + 4 ], %g1 20083ac: 80 88 60 01 btst 1, %g1 20083b0: 32 80 00 d2 bne,a 20086f8 <_Heap_Walk+0x5e0> 20083b4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 20083b8: d8 04 60 0c ld [ %l1 + 0xc ], %o4 20083bc: 80 a3 00 1d cmp %o4, %i5 20083c0: 12 80 00 c5 bne 20086d4 <_Heap_Walk+0x5bc> 20083c4: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 20083c8: 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 ) { 20083cc: 80 a6 00 11 cmp %i0, %l1 20083d0: 12 bf ff e8 bne 2008370 <_Heap_Walk+0x258> 20083d4: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 20083d8: 80 a5 00 10 cmp %l4, %l0 20083dc: 02 bf ff 5f be 2008158 <_Heap_Walk+0x40> 20083e0: 37 00 80 6c sethi %hi(0x201b000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20083e4: 35 00 80 6c sethi %hi(0x201b000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 20083e8: 39 00 80 6d sethi %hi(0x201b400), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 20083ec: 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)( 20083f0: b6 16 e3 a0 or %i3, 0x3a0, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20083f4: b4 16 a3 b8 or %i2, 0x3b8, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 20083f8: b8 17 20 b8 or %i4, 0xb8, %i4 20083fc: 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; 2008400: 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 ) { 2008404: 80 a5 e0 00 cmp %l7, 0 2008408: 02 80 00 16 be 2008460 <_Heap_Walk+0x348> 200840c: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 2008410: 90 10 00 19 mov %i1, %o0 2008414: 92 10 20 00 clr %o1 2008418: 94 10 00 1b mov %i3, %o2 200841c: 96 10 00 10 mov %l0, %o3 2008420: 9f c4 80 00 call %l2 2008424: 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 2008428: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 200842c: 80 a0 40 11 cmp %g1, %l1 2008430: 28 80 00 18 bleu,a 2008490 <_Heap_Walk+0x378> 2008434: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 2008438: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200843c: 96 10 00 10 mov %l0, %o3 2008440: 98 10 00 11 mov %l1, %o4 2008444: 92 10 20 01 mov 1, %o1 2008448: 15 00 80 6c sethi %hi(0x201b000), %o2 200844c: b0 10 20 00 clr %i0 2008450: 9f c4 80 00 call %l2 2008454: 94 12 a3 e0 or %o2, 0x3e0, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 2008458: 81 c7 e0 08 ret 200845c: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008460: da 04 00 00 ld [ %l0 ], %o5 2008464: 90 10 00 19 mov %i1, %o0 2008468: 92 10 20 00 clr %o1 200846c: 94 10 00 1a mov %i2, %o2 2008470: 96 10 00 10 mov %l0, %o3 2008474: 9f c4 80 00 call %l2 2008478: 98 10 00 16 mov %l6, %o4 200847c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2008480: 80 a0 40 11 cmp %g1, %l1 2008484: 18 bf ff ee bgu 200843c <_Heap_Walk+0x324> 2008488: 90 10 00 19 mov %i1, %o0 200848c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2008490: 80 a0 40 11 cmp %g1, %l1 2008494: 0a bf ff ea bcs 200843c <_Heap_Walk+0x324> 2008498: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 200849c: 90 10 00 16 mov %l6, %o0 20084a0: 7f ff e5 89 call 2001ac4 <.urem> 20084a4: 92 10 00 1d mov %i5, %o1 20084a8: 80 a2 20 00 cmp %o0, 0 20084ac: 12 80 00 5d bne 2008620 <_Heap_Walk+0x508> 20084b0: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 20084b4: 18 80 00 65 bgu 2008648 <_Heap_Walk+0x530> 20084b8: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 20084bc: 3a 80 00 6e bcc,a 2008674 <_Heap_Walk+0x55c> 20084c0: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 20084c4: c2 04 60 04 ld [ %l1 + 4 ], %g1 20084c8: 80 88 60 01 btst 1, %g1 20084cc: 12 80 00 40 bne 20085cc <_Heap_Walk+0x4b4> 20084d0: 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; 20084d4: 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)( 20084d8: 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; 20084dc: 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; 20084e0: 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; 20084e4: 1b 00 80 6d sethi %hi(0x201b400), %o5 20084e8: 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; 20084ec: 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); 20084f0: 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; 20084f4: 02 80 00 07 be 2008510 <_Heap_Walk+0x3f8> 20084f8: 9a 13 60 a8 or %o5, 0xa8, %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)" : ""), 20084fc: 1b 00 80 6d sethi %hi(0x201b400), %o5 2008500: 80 a3 00 18 cmp %o4, %i0 2008504: 02 80 00 03 be 2008510 <_Heap_Walk+0x3f8> 2008508: 9a 13 60 c0 or %o5, 0xc0, %o5 200850c: 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)( 2008510: c2 04 20 08 ld [ %l0 + 8 ], %g1 2008514: 05 00 80 6d sethi %hi(0x201b400), %g2 2008518: 80 a0 c0 01 cmp %g3, %g1 200851c: 02 80 00 07 be 2008538 <_Heap_Walk+0x420> 2008520: 84 10 a0 d0 or %g2, 0xd0, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2008524: 05 00 80 6d sethi %hi(0x201b400), %g2 2008528: 80 a0 40 18 cmp %g1, %i0 200852c: 02 80 00 03 be 2008538 <_Heap_Walk+0x420> 2008530: 84 10 a0 e0 or %g2, 0xe0, %g2 2008534: 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)( 2008538: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200853c: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2008540: 90 10 00 19 mov %i1, %o0 2008544: 92 10 20 00 clr %o1 2008548: 15 00 80 6d sethi %hi(0x201b400), %o2 200854c: 96 10 00 10 mov %l0, %o3 2008550: 9f c4 80 00 call %l2 2008554: 94 12 a0 f0 or %o2, 0xf0, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2008558: da 05 c0 00 ld [ %l7 ], %o5 200855c: 80 a5 80 0d cmp %l6, %o5 2008560: 02 80 00 0c be 2008590 <_Heap_Walk+0x478> 2008564: 90 10 00 19 mov %i1, %o0 (*printer)( 2008568: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 200856c: 96 10 00 10 mov %l0, %o3 2008570: 98 10 00 16 mov %l6, %o4 2008574: 92 10 20 01 mov 1, %o1 2008578: 15 00 80 6d sethi %hi(0x201b400), %o2 200857c: b0 10 20 00 clr %i0 2008580: 9f c4 80 00 call %l2 2008584: 94 12 a1 20 or %o2, 0x120, %o2 2008588: 81 c7 e0 08 ret 200858c: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 2008590: 80 8d 20 01 btst 1, %l4 2008594: 02 80 00 1c be 2008604 <_Heap_Walk+0x4ec> 2008598: 96 10 00 10 mov %l0, %o3 200859c: 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 ) { 20085a0: 80 a0 40 18 cmp %g1, %i0 20085a4: 12 80 00 07 bne 20085c0 <_Heap_Walk+0x4a8> 20085a8: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085ac: 10 80 00 0f b 20085e8 <_Heap_Walk+0x4d0> <== NOT EXECUTED 20085b0: 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 ) { 20085b4: 80 a0 40 18 cmp %g1, %i0 20085b8: 02 80 00 0a be 20085e0 <_Heap_Walk+0x4c8> 20085bc: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 20085c0: 32 bf ff fd bne,a 20085b4 <_Heap_Walk+0x49c> 20085c4: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 20085c8: 80 a5 40 11 cmp %l5, %l1 20085cc: 02 bf fe e3 be 2008158 <_Heap_Walk+0x40> 20085d0: 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 ) { 20085d4: ec 04 60 04 ld [ %l1 + 4 ], %l6 20085d8: 10 bf ff 8a b 2008400 <_Heap_Walk+0x2e8> 20085dc: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085e0: 90 10 00 19 mov %i1, %o0 20085e4: 96 10 00 10 mov %l0, %o3 20085e8: 92 10 20 01 mov 1, %o1 20085ec: 15 00 80 6d sethi %hi(0x201b400), %o2 20085f0: b0 10 20 00 clr %i0 20085f4: 9f c4 80 00 call %l2 20085f8: 94 12 a1 90 or %o2, 0x190, %o2 20085fc: 81 c7 e0 08 ret 2008600: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 2008604: 92 10 20 01 mov 1, %o1 2008608: 15 00 80 6d sethi %hi(0x201b400), %o2 200860c: b0 10 20 00 clr %i0 2008610: 9f c4 80 00 call %l2 2008614: 94 12 a1 60 or %o2, 0x160, %o2 2008618: 81 c7 e0 08 ret 200861c: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 2008620: 90 10 00 19 mov %i1, %o0 2008624: 96 10 00 10 mov %l0, %o3 2008628: 98 10 00 16 mov %l6, %o4 200862c: 92 10 20 01 mov 1, %o1 2008630: 15 00 80 6d sethi %hi(0x201b400), %o2 2008634: b0 10 20 00 clr %i0 2008638: 9f c4 80 00 call %l2 200863c: 94 12 a0 10 or %o2, 0x10, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 2008640: 81 c7 e0 08 ret 2008644: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 2008648: 90 10 00 19 mov %i1, %o0 200864c: 96 10 00 10 mov %l0, %o3 2008650: 98 10 00 16 mov %l6, %o4 2008654: 9a 10 00 13 mov %l3, %o5 2008658: 92 10 20 01 mov 1, %o1 200865c: 15 00 80 6d sethi %hi(0x201b400), %o2 2008660: b0 10 20 00 clr %i0 2008664: 9f c4 80 00 call %l2 2008668: 94 12 a0 40 or %o2, 0x40, %o2 block, block_size, min_block_size ); return false; 200866c: 81 c7 e0 08 ret 2008670: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 2008674: 96 10 00 10 mov %l0, %o3 2008678: 98 10 00 11 mov %l1, %o4 200867c: 92 10 20 01 mov 1, %o1 2008680: 15 00 80 6d sethi %hi(0x201b400), %o2 2008684: b0 10 20 00 clr %i0 2008688: 9f c4 80 00 call %l2 200868c: 94 12 a0 70 or %o2, 0x70, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 2008690: 81 c7 e0 08 ret 2008694: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 2008698: 92 10 20 01 mov 1, %o1 200869c: 15 00 80 6c sethi %hi(0x201b000), %o2 20086a0: b0 10 20 00 clr %i0 20086a4: 9f c4 80 00 call %l2 20086a8: 94 12 a2 e0 or %o2, 0x2e0, %o2 20086ac: 81 c7 e0 08 ret 20086b0: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 20086b4: 96 10 00 11 mov %l1, %o3 20086b8: 92 10 20 01 mov 1, %o1 20086bc: 15 00 80 6c sethi %hi(0x201b000), %o2 20086c0: b0 10 20 00 clr %i0 20086c4: 9f c4 80 00 call %l2 20086c8: 94 12 a3 18 or %o2, 0x318, %o2 20086cc: 81 c7 e0 08 ret 20086d0: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 20086d4: 90 10 00 19 mov %i1, %o0 20086d8: 96 10 00 11 mov %l1, %o3 20086dc: 92 10 20 01 mov 1, %o1 20086e0: 15 00 80 6c sethi %hi(0x201b000), %o2 20086e4: b0 10 20 00 clr %i0 20086e8: 9f c4 80 00 call %l2 20086ec: 94 12 a3 68 or %o2, 0x368, %o2 20086f0: 81 c7 e0 08 ret 20086f4: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 20086f8: 96 10 00 11 mov %l1, %o3 20086fc: 92 10 20 01 mov 1, %o1 2008700: 15 00 80 6c sethi %hi(0x201b000), %o2 2008704: b0 10 20 00 clr %i0 2008708: 9f c4 80 00 call %l2 200870c: 94 12 a3 48 or %o2, 0x348, %o2 2008710: 81 c7 e0 08 ret 2008714: 81 e8 00 00 restore 02007460 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2007460: 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 ) 2007464: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 2007468: 80 a5 20 00 cmp %l4, 0 200746c: 02 80 00 ab be 2007718 <_Objects_Extend_information+0x2b8> 2007470: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2007474: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2007478: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 200747c: ab 2d 60 10 sll %l5, 0x10, %l5 2007480: 92 10 00 12 mov %l2, %o1 2007484: 40 00 42 62 call 2017e0c <.udiv> 2007488: 91 35 60 10 srl %l5, 0x10, %o0 200748c: 91 2a 20 10 sll %o0, 0x10, %o0 2007490: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 2007494: 80 a7 20 00 cmp %i4, 0 2007498: 02 80 00 a7 be 2007734 <_Objects_Extend_information+0x2d4> 200749c: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 20074a0: c2 05 00 00 ld [ %l4 ], %g1 20074a4: 80 a0 60 00 cmp %g1, 0 20074a8: 02 80 00 a4 be 2007738 <_Objects_Extend_information+0x2d8> 20074ac: a2 10 00 13 mov %l3, %l1 20074b0: 10 80 00 06 b 20074c8 <_Objects_Extend_information+0x68> 20074b4: a0 10 20 00 clr %l0 20074b8: c2 05 00 01 ld [ %l4 + %g1 ], %g1 20074bc: 80 a0 60 00 cmp %g1, 0 20074c0: 22 80 00 08 be,a 20074e0 <_Objects_Extend_information+0x80> 20074c4: 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++ ) { 20074c8: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 20074cc: 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++ ) { 20074d0: 80 a7 00 10 cmp %i4, %l0 20074d4: 18 bf ff f9 bgu 20074b8 <_Objects_Extend_information+0x58> 20074d8: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 20074dc: 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 ) { 20074e0: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 20074e4: 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 ) { 20074e8: 82 10 63 ff or %g1, 0x3ff, %g1 20074ec: 80 a5 40 01 cmp %l5, %g1 20074f0: 18 80 00 96 bgu 2007748 <_Objects_Extend_information+0x2e8> 20074f4: 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; 20074f8: 40 00 42 0b call 2017d24 <.umul> 20074fc: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2007500: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2007504: 80 a0 60 00 cmp %g1, 0 2007508: 12 80 00 6d bne 20076bc <_Objects_Extend_information+0x25c> 200750c: 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 ); 2007510: 40 00 08 db call 200987c <_Workspace_Allocate_or_fatal_error> 2007514: 01 00 00 00 nop 2007518: 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 ) { 200751c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007520: 80 a4 40 01 cmp %l1, %g1 2007524: 2a 80 00 43 bcs,a 2007630 <_Objects_Extend_information+0x1d0> 2007528: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 200752c: 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 ); 2007530: 91 2d 20 01 sll %l4, 1, %o0 2007534: 90 02 00 14 add %o0, %l4, %o0 2007538: 90 05 40 08 add %l5, %o0, %o0 200753c: 90 02 00 13 add %o0, %l3, %o0 2007540: 40 00 08 de call 20098b8 <_Workspace_Allocate> 2007544: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 2007548: ac 92 20 00 orcc %o0, 0, %l6 200754c: 02 80 00 7d be 2007740 <_Objects_Extend_information+0x2e0> 2007550: 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 ) { 2007554: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007558: 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); 200755c: ae 05 80 14 add %l6, %l4, %l7 2007560: 0a 80 00 5e bcs 20076d8 <_Objects_Extend_information+0x278> 2007564: 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++ ) { 2007568: 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, 200756c: 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++ ) { 2007570: 02 80 00 08 be 2007590 <_Objects_Extend_information+0x130> 2007574: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 2007578: 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++ ) { 200757c: 82 00 60 01 inc %g1 2007580: 80 a4 c0 01 cmp %l3, %g1 2007584: 18 bf ff fd bgu 2007578 <_Objects_Extend_information+0x118> 2007588: c0 20 80 14 clr [ %g2 + %l4 ] 200758c: 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 ); 2007590: 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; 2007594: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2007598: 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 ; 200759c: 80 a4 40 03 cmp %l1, %g3 20075a0: 1a 80 00 0a bcc 20075c8 <_Objects_Extend_information+0x168> 20075a4: c0 25 80 1d clr [ %l6 + %i5 ] 20075a8: 85 2c 60 02 sll %l1, 2, %g2 20075ac: 82 10 00 11 mov %l1, %g1 20075b0: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 20075b4: 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++ ) { 20075b8: 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 ; 20075bc: 80 a0 40 03 cmp %g1, %g3 20075c0: 0a bf ff fd bcs 20075b4 <_Objects_Extend_information+0x154> 20075c4: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 20075c8: 7f ff eb 39 call 20022ac 20075cc: 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( 20075d0: c6 06 00 00 ld [ %i0 ], %g3 20075d4: 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; 20075d8: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 20075dc: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 20075e0: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 20075e4: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 20075e8: 87 28 e0 18 sll %g3, 0x18, %g3 20075ec: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 20075f0: 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( 20075f4: ab 2d 60 10 sll %l5, 0x10, %l5 20075f8: 03 00 00 40 sethi %hi(0x10000), %g1 20075fc: ab 35 60 10 srl %l5, 0x10, %l5 2007600: 82 10 c0 01 or %g3, %g1, %g1 2007604: 82 10 40 02 or %g1, %g2, %g1 2007608: 82 10 40 15 or %g1, %l5, %g1 200760c: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2007610: 7f ff eb 2b call 20022bc 2007614: 01 00 00 00 nop if ( old_tables ) 2007618: 80 a4 e0 00 cmp %l3, 0 200761c: 22 80 00 05 be,a 2007630 <_Objects_Extend_information+0x1d0> 2007620: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 2007624: 40 00 08 ae call 20098dc <_Workspace_Free> 2007628: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 200762c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2007630: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2007634: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2007638: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 200763c: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007640: 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; 2007644: 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( 2007648: 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( 200764c: a4 07 bf f4 add %fp, -12, %l2 2007650: 40 00 12 88 call 200c070 <_Chain_Initialize> 2007654: 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 ) { 2007658: 30 80 00 0c b,a 2007688 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 200765c: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2007660: 83 28 60 18 sll %g1, 0x18, %g1 2007664: 85 28 a0 1b sll %g2, 0x1b, %g2 2007668: 82 10 40 14 or %g1, %l4, %g1 200766c: 82 10 40 02 or %g1, %g2, %g1 2007670: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007674: 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( 2007678: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 200767c: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007680: 7f ff fc e2 call 2006a08 <_Chain_Append> 2007684: 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 ) { 2007688: 40 00 12 67 call 200c024 <_Chain_Get> 200768c: 90 10 00 12 mov %l2, %o0 2007690: 80 a2 20 00 cmp %o0, 0 2007694: 32 bf ff f2 bne,a 200765c <_Objects_Extend_information+0x1fc> 2007698: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 200769c: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20076a0: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 20076a4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 20076a8: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20076ac: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 20076b0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 20076b4: 81 c7 e0 08 ret 20076b8: 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 ); 20076bc: 40 00 08 7f call 20098b8 <_Workspace_Allocate> 20076c0: 01 00 00 00 nop if ( !new_object_block ) 20076c4: a4 92 20 00 orcc %o0, 0, %l2 20076c8: 32 bf ff 96 bne,a 2007520 <_Objects_Extend_information+0xc0> 20076cc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20076d0: 81 c7 e0 08 ret 20076d4: 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, 20076d8: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 20076dc: 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, 20076e0: 40 00 1e d3 call 200f22c 20076e4: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 20076e8: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 20076ec: 94 10 00 1d mov %i5, %o2 20076f0: 40 00 1e cf call 200f22c 20076f4: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 20076f8: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 20076fc: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2007700: 94 04 c0 0a add %l3, %o2, %o2 2007704: 90 10 00 14 mov %l4, %o0 2007708: 40 00 1e c9 call 200f22c 200770c: 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 ); 2007710: 10 bf ff a1 b 2007594 <_Objects_Extend_information+0x134> 2007714: 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 ) 2007718: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 200771c: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 2007720: ab 2d 60 10 sll %l5, 0x10, %l5 2007724: a2 10 00 13 mov %l3, %l1 2007728: a0 10 20 00 clr %l0 200772c: 10 bf ff 6c b 20074dc <_Objects_Extend_information+0x7c> 2007730: 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 ) 2007734: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 2007738: 10 bf ff 69 b 20074dc <_Objects_Extend_information+0x7c> <== NOT EXECUTED 200773c: 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 ); 2007740: 40 00 08 67 call 20098dc <_Workspace_Free> 2007744: 90 10 00 12 mov %l2, %o0 return; 2007748: 81 c7 e0 08 ret 200774c: 81 e8 00 00 restore 02007964 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 2007964: 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; 2007968: 05 00 80 6d sethi %hi(0x201b400), %g2 200796c: 83 2e 60 02 sll %i1, 2, %g1 2007970: 84 10 a1 70 or %g2, 0x170, %g2 2007974: 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; 2007978: 85 2f 20 10 sll %i4, 0x10, %g2 200797c: 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; 2007980: 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; 2007984: 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; 2007988: 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; 200798c: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 2007990: 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; 2007994: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 2007998: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 200799c: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 20079a0: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 20079a4: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 20079a8: 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; 20079ac: 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 = 20079b0: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 20079b4: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 20079b8: 80 a0 a0 00 cmp %g2, 0 20079bc: 02 80 00 05 be 20079d0 <_Objects_Initialize_information+0x6c> 20079c0: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 20079c4: 80 a6 e0 00 cmp %i3, 0 20079c8: 02 80 00 28 be 2007a68 <_Objects_Initialize_information+0x104> 20079cc: 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; 20079d0: 07 00 80 6c sethi %hi(0x201b000), %g3 20079d4: 86 10 e2 bc or %g3, 0x2bc, %g3 ! 201b2bc /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 20079d8: 80 a0 00 1b cmp %g0, %i3 20079dc: b3 2e 60 18 sll %i1, 0x18, %i1 20079e0: 84 40 20 00 addx %g0, 0, %g2 20079e4: 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; 20079e8: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 20079ec: 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 = 20079f0: 07 00 00 40 sethi %hi(0x10000), %g3 20079f4: b2 16 40 03 or %i1, %g3, %i1 20079f8: b4 16 40 1a or %i1, %i2, %i2 20079fc: b4 16 80 02 or %i2, %g2, %i2 2007a00: 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) & 2007a04: 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) ) 2007a08: 80 88 60 03 btst 3, %g1 2007a0c: 02 80 00 0c be 2007a3c <_Objects_Initialize_information+0xd8> 2007a10: 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); 2007a14: 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; 2007a18: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED 2007a1c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED the_chain->permanent_null = NULL; 2007a20: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 2007a24: 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 ) { 2007a28: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2007a2c: 12 80 00 0d bne 2007a60 <_Objects_Initialize_information+0xfc><== NOT EXECUTED 2007a30: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED 2007a34: 81 c7 e0 08 ret 2007a38: 81 e8 00 00 restore /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 2007a3c: 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); 2007a40: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 2007a44: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 2007a48: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 2007a4c: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 2007a50: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 2007a54: 80 a6 e0 00 cmp %i3, 0 2007a58: 02 bf ff f7 be 2007a34 <_Objects_Initialize_information+0xd0> 2007a5c: 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 ); 2007a60: 7f ff fe 80 call 2007460 <_Objects_Extend_information> 2007a64: 81 e8 00 00 restore /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 2007a68: 92 10 20 01 mov 1, %o1 2007a6c: 7f ff fe 1e call 20072e4 <_Internal_error_Occurred> 2007a70: 94 10 20 14 mov 0x14, %o2 02007b38 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 2007b38: 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 ); 2007b3c: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 2007b40: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 2007b44: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2007b48: 92 10 00 11 mov %l1, %o1 2007b4c: 40 00 40 b0 call 2017e0c <.udiv> 2007b50: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 2007b54: 80 a2 20 00 cmp %o0, 0 2007b58: 02 80 00 12 be 2007ba0 <_Objects_Shrink_information+0x68> 2007b5c: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 2007b60: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2007b64: c4 00 c0 00 ld [ %g3 ], %g2 2007b68: 80 a4 40 02 cmp %l1, %g2 2007b6c: 12 80 00 09 bne 2007b90 <_Objects_Shrink_information+0x58> 2007b70: 82 10 20 00 clr %g1 2007b74: 10 80 00 0d b 2007ba8 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 2007b78: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 2007b7c: 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 ] == 2007b80: 80 a4 40 02 cmp %l1, %g2 2007b84: 02 80 00 09 be 2007ba8 <_Objects_Shrink_information+0x70> 2007b88: 84 04 a0 04 add %l2, 4, %g2 2007b8c: 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++ ) { 2007b90: 82 00 60 01 inc %g1 2007b94: 80 a2 00 01 cmp %o0, %g1 2007b98: 38 bf ff f9 bgu,a 2007b7c <_Objects_Shrink_information+0x44> 2007b9c: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 2007ba0: 81 c7 e0 08 ret 2007ba4: 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; 2007ba8: 10 80 00 06 b 2007bc0 <_Objects_Shrink_information+0x88> 2007bac: 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 ); 2007bb0: 80 a4 60 00 cmp %l1, 0 2007bb4: 22 80 00 12 be,a 2007bfc <_Objects_Shrink_information+0xc4> 2007bb8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2007bbc: 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 ); 2007bc0: 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) && 2007bc4: 80 a0 40 10 cmp %g1, %l0 2007bc8: 0a bf ff fa bcs 2007bb0 <_Objects_Shrink_information+0x78> 2007bcc: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 2007bd0: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2007bd4: 84 04 00 02 add %l0, %g2, %g2 2007bd8: 80 a0 40 02 cmp %g1, %g2 2007bdc: 1a bf ff f6 bcc 2007bb4 <_Objects_Shrink_information+0x7c> 2007be0: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 2007be4: 40 00 11 06 call 200bffc <_Chain_Extract> 2007be8: 01 00 00 00 nop } } while ( the_object ); 2007bec: 80 a4 60 00 cmp %l1, 0 2007bf0: 12 bf ff f4 bne 2007bc0 <_Objects_Shrink_information+0x88> 2007bf4: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2007bf8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2007bfc: 40 00 07 38 call 20098dc <_Workspace_Free> 2007c00: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007c04: 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; 2007c08: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 2007c0c: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 2007c10: 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; 2007c14: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 2007c18: 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; 2007c1c: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007c20: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 2007c24: 81 c7 e0 08 ret 2007c28: 81 e8 00 00 restore 0200bdac <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200bdac: 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 ]; 200bdb0: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 200bdb4: 80 a4 20 00 cmp %l0, 0 200bdb8: 02 80 00 1f be 200be34 <_RTEMS_tasks_Post_switch_extension+0x88> 200bdbc: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200bdc0: 7f ff d9 3b call 20022ac 200bdc4: 01 00 00 00 nop signal_set = asr->signals_posted; 200bdc8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 asr->signals_posted = 0; 200bdcc: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 200bdd0: 7f ff d9 3b call 20022bc 200bdd4: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200bdd8: 80 a4 60 00 cmp %l1, 0 200bddc: 32 80 00 04 bne,a 200bdec <_RTEMS_tasks_Post_switch_extension+0x40> 200bde0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200bde4: 81 c7 e0 08 ret <== NOT EXECUTED 200bde8: 81 e8 00 00 restore <== NOT EXECUTED return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bdec: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200bdf0: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bdf4: a4 07 bf fc add %fp, -4, %l2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200bdf8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bdfc: 94 10 00 12 mov %l2, %o2 200be00: 27 00 00 3f sethi %hi(0xfc00), %l3 200be04: 40 00 07 c7 call 200dd20 200be08: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200be0c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 200be10: 9f c0 40 00 call %g1 200be14: 90 10 00 11 mov %l1, %o0 asr->nest_level -= 1; 200be18: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200be1c: 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; 200be20: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200be24: 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; 200be28: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200be2c: 40 00 07 bd call 200dd20 200be30: 94 10 00 12 mov %l2, %o2 200be34: 81 c7 e0 08 ret 200be38: 81 e8 00 00 restore 02007c90 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007c90: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 2007c94: 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 ); 2007c98: 40 00 04 84 call 2008ea8 <_Thread_Set_transient> 2007c9c: 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 ) 2007ca0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2007ca4: 80 a0 40 19 cmp %g1, %i1 2007ca8: 02 80 00 05 be 2007cbc <_Thread_Change_priority+0x2c> 2007cac: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 2007cb0: 92 10 00 19 mov %i1, %o1 2007cb4: 40 00 04 01 call 2008cb8 <_Thread_Set_priority> 2007cb8: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 2007cbc: 7f ff e9 7c call 20022ac 2007cc0: 01 00 00 00 nop 2007cc4: 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; 2007cc8: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 2007ccc: 80 a4 a0 04 cmp %l2, 4 2007cd0: 02 80 00 18 be 2007d30 <_Thread_Change_priority+0xa0> 2007cd4: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2007cd8: 02 80 00 0b be 2007d04 <_Thread_Change_priority+0x74> 2007cdc: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 2007ce0: 7f ff e9 77 call 20022bc <== NOT EXECUTED 2007ce4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007ce8: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 2007cec: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 2007cf0: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 2007cf4: 32 80 00 0d bne,a 2007d28 <_Thread_Change_priority+0x98> <== NOT EXECUTED 2007cf8: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 2007cfc: 81 c7 e0 08 ret 2007d00: 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 ); 2007d04: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 2007d08: 7f ff e9 6d call 20022bc 2007d0c: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007d10: 03 00 00 ef sethi %hi(0x3bc00), %g1 2007d14: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2007d18: 80 8c 80 01 btst %l2, %g1 2007d1c: 02 bf ff f8 be 2007cfc <_Thread_Change_priority+0x6c> 2007d20: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2007d24: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 2007d28: 40 00 03 b4 call 2008bf8 <_Thread_queue_Requeue> 2007d2c: 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 ) ) { 2007d30: 12 80 00 14 bne 2007d80 <_Thread_Change_priority+0xf0> 2007d34: 23 00 80 6d sethi %hi(0x201b400), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007d38: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 2007d3c: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 2007d40: 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 ); 2007d44: c0 24 20 10 clr [ %l0 + 0x10 ] 2007d48: 84 10 c0 02 or %g3, %g2, %g2 2007d4c: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 2007d50: c4 14 62 c4 lduh [ %l1 + 0x2c4 ], %g2 2007d54: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 2007d58: 80 8e a0 ff btst 0xff, %i2 2007d5c: 82 10 80 01 or %g2, %g1, %g1 2007d60: c2 34 62 c4 sth %g1, [ %l1 + 0x2c4 ] 2007d64: 02 80 00 48 be 2007e84 <_Thread_Change_priority+0x1f4> 2007d68: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2007d6c: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2007d70: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 2007d74: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 2007d78: 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; 2007d7c: 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 ); 2007d80: 7f ff e9 4f call 20022bc 2007d84: 90 10 00 18 mov %i0, %o0 2007d88: 7f ff e9 49 call 20022ac 2007d8c: 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 ); 2007d90: c2 14 62 c4 lduh [ %l1 + 0x2c4 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 2007d94: 05 00 80 6d sethi %hi(0x201b400), %g2 2007d98: 83 28 60 10 sll %g1, 0x10, %g1 2007d9c: da 00 a1 64 ld [ %g2 + 0x164 ], %o5 2007da0: 85 30 60 10 srl %g1, 0x10, %g2 2007da4: 80 a0 a0 ff cmp %g2, 0xff 2007da8: 08 80 00 27 bleu 2007e44 <_Thread_Change_priority+0x1b4> 2007dac: 07 00 80 67 sethi %hi(0x2019c00), %g3 2007db0: 83 30 60 18 srl %g1, 0x18, %g1 2007db4: 86 10 e1 00 or %g3, 0x100, %g3 2007db8: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007dbc: 09 00 80 6d sethi %hi(0x201b400), %g4 2007dc0: 85 28 a0 10 sll %g2, 0x10, %g2 2007dc4: 88 11 23 40 or %g4, 0x340, %g4 2007dc8: 83 30 a0 0f srl %g2, 0xf, %g1 2007dcc: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 2007dd0: 83 28 60 10 sll %g1, 0x10, %g1 2007dd4: 89 30 60 10 srl %g1, 0x10, %g4 2007dd8: 80 a1 20 ff cmp %g4, 0xff 2007ddc: 18 80 00 28 bgu 2007e7c <_Thread_Change_priority+0x1ec> 2007de0: 83 30 60 18 srl %g1, 0x18, %g1 2007de4: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2007de8: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007dec: 85 30 a0 0c srl %g2, 0xc, %g2 2007df0: 83 28 60 10 sll %g1, 0x10, %g1 2007df4: 83 30 60 10 srl %g1, 0x10, %g1 2007df8: 82 00 40 02 add %g1, %g2, %g1 2007dfc: 85 28 60 04 sll %g1, 4, %g2 2007e00: 83 28 60 02 sll %g1, 2, %g1 2007e04: 82 20 80 01 sub %g2, %g1, %g1 2007e08: 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 ); 2007e0c: 05 00 80 6d sethi %hi(0x201b400), %g2 2007e10: c4 00 a2 d0 ld [ %g2 + 0x2d0 ], %g2 ! 201b6d0 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007e14: 07 00 80 6d sethi %hi(0x201b400), %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() && 2007e18: 80 a0 40 02 cmp %g1, %g2 2007e1c: 02 80 00 08 be 2007e3c <_Thread_Change_priority+0x1ac> 2007e20: c2 20 e2 a0 st %g1, [ %g3 + 0x2a0 ] _Thread_Executing->is_preemptible ) 2007e24: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 2007e28: 80 a0 60 00 cmp %g1, 0 2007e2c: 02 80 00 04 be 2007e3c <_Thread_Change_priority+0x1ac> 2007e30: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 2007e34: 03 00 80 6d sethi %hi(0x201b400), %g1 2007e38: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary> _ISR_Enable( level ); 2007e3c: 7f ff e9 20 call 20022bc 2007e40: 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 ); 2007e44: 86 10 e1 00 or %g3, 0x100, %g3 2007e48: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007e4c: 09 00 80 6d sethi %hi(0x201b400), %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 ); 2007e50: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007e54: 88 11 23 40 or %g4, 0x340, %g4 2007e58: 85 28 a0 10 sll %g2, 0x10, %g2 2007e5c: 83 30 a0 0f srl %g2, 0xf, %g1 2007e60: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 2007e64: 83 28 60 10 sll %g1, 0x10, %g1 2007e68: 89 30 60 10 srl %g1, 0x10, %g4 2007e6c: 80 a1 20 ff cmp %g4, 0xff 2007e70: 28 bf ff de bleu,a 2007de8 <_Thread_Change_priority+0x158> 2007e74: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2007e78: 83 30 60 18 srl %g1, 0x18, %g1 2007e7c: 10 bf ff dc b 2007dec <_Thread_Change_priority+0x15c> 2007e80: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007e84: 84 00 60 04 add %g1, 4, %g2 2007e88: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 2007e8c: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 2007e90: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007e94: 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; 2007e98: 10 bf ff ba b 2007d80 <_Thread_Change_priority+0xf0> 2007e9c: e0 20 80 00 st %l0, [ %g2 ] 020083ec <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20083ec: 9d e3 bf a0 save %sp, -96, %sp 20083f0: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 20083f4: c0 26 61 60 clr [ %i1 + 0x160 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 20083f8: e2 00 40 00 ld [ %g1 ], %l1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 20083fc: c0 26 61 64 clr [ %i1 + 0x164 ] 2008400: c0 26 61 68 clr [ %i1 + 0x168 ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008404: c0 26 61 5c clr [ %i1 + 0x15c ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008408: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 200840c: 90 10 00 19 mov %i1, %o0 2008410: 40 00 02 ca call 2008f38 <_Thread_Stack_Allocate> 2008414: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2008418: 80 a6 c0 08 cmp %i3, %o0 200841c: 18 80 00 5a bgu 2008584 <_Thread_Initialize+0x198> 2008420: 80 a2 20 00 cmp %o0, 0 2008424: 02 80 00 58 be 2008584 <_Thread_Initialize+0x198> 2008428: 80 8f 20 ff btst 0xff, %i4 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200842c: c2 06 60 cc ld [ %i1 + 0xcc ], %g1 the_stack->size = size; 2008430: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008434: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2008438: 82 10 20 00 clr %g1 200843c: 12 80 00 54 bne 200858c <_Thread_Initialize+0x1a0> 2008440: a4 10 20 00 clr %l2 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008444: 27 00 80 6d sethi %hi(0x201b400), %l3 2008448: c4 04 e2 b0 ld [ %l3 + 0x2b0 ], %g2 ! 201b6b0 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 200844c: c2 26 60 c8 st %g1, [ %i1 + 0xc8 ] fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 2008450: c2 26 61 58 st %g1, [ %i1 + 0x158 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008454: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008458: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200845c: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008460: 80 a0 a0 00 cmp %g2, 0 2008464: 12 80 00 5a bne 20085cc <_Thread_Initialize+0x1e0> 2008468: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 200846c: c0 26 61 6c clr [ %i1 + 0x16c ] 2008470: b6 10 20 00 clr %i3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2008474: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008478: 92 10 00 1d mov %i5, %o1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 200847c: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ] the_thread->Start.budget_callout = budget_callout; 2008480: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2008484: 90 10 00 19 mov %i1, %o0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2008488: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200848c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008490: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008494: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2008498: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; 200849c: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 20084a0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 20084a4: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 20084a8: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 20084ac: 40 00 02 03 call 2008cb8 <_Thread_Set_priority> 20084b0: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 20084b4: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 20084b8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 20084bc: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 20084c0: e2 26 60 0c st %l1, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 20084c4: f2 20 80 01 st %i1, [ %g2 + %g1 ] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 20084c8: c0 26 60 84 clr [ %i1 + 0x84 ] 20084cc: c0 26 60 88 clr [ %i1 + 0x88 ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 20084d0: 90 10 00 19 mov %i1, %o0 20084d4: 40 00 03 c8 call 20093f4 <_User_extensions_Thread_create> 20084d8: b0 10 20 01 mov 1, %i0 if ( extension_status ) 20084dc: 80 8a 20 ff btst 0xff, %o0 20084e0: 12 80 00 27 bne 200857c <_Thread_Initialize+0x190> 20084e4: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 20084e8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 20084ec: 80 a2 20 00 cmp %o0, 0 20084f0: 22 80 00 05 be,a 2008504 <_Thread_Initialize+0x118> 20084f4: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 _Workspace_Free( the_thread->libc_reent ); 20084f8: 40 00 04 f9 call 20098dc <_Workspace_Free> 20084fc: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2008500: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 2008504: 80 a2 20 00 cmp %o0, 0 2008508: 22 80 00 05 be,a 200851c <_Thread_Initialize+0x130> 200850c: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008510: 40 00 04 f3 call 20098dc <_Workspace_Free> 2008514: 01 00 00 00 nop failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2008518: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 200851c: 80 a2 20 00 cmp %o0, 0 2008520: 22 80 00 05 be,a 2008534 <_Thread_Initialize+0x148> 2008524: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008528: 40 00 04 ed call 20098dc <_Workspace_Free> <== NOT EXECUTED 200852c: 01 00 00 00 nop <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2008530: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 <== NOT EXECUTED 2008534: 80 a2 20 00 cmp %o0, 0 2008538: 02 80 00 05 be 200854c <_Thread_Initialize+0x160> 200853c: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 2008540: 40 00 04 e7 call 20098dc <_Workspace_Free> <== NOT EXECUTED 2008544: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 2008548: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 200854c: 02 80 00 05 be 2008560 <_Thread_Initialize+0x174> 2008550: 80 a4 a0 00 cmp %l2, 0 (void) _Workspace_Free( extensions_area ); 2008554: 40 00 04 e2 call 20098dc <_Workspace_Free> 2008558: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 200855c: 80 a4 a0 00 cmp %l2, 0 2008560: 02 80 00 05 be 2008574 <_Thread_Initialize+0x188> 2008564: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( fp_area ); 2008568: 40 00 04 dd call 20098dc <_Workspace_Free> 200856c: 90 10 00 12 mov %l2, %o0 #endif _Thread_Stack_Free( the_thread ); 2008570: 90 10 00 19 mov %i1, %o0 2008574: 40 00 02 8c call 2008fa4 <_Thread_Stack_Free> 2008578: b0 10 20 00 clr %i0 return false; } 200857c: 81 c7 e0 08 ret 2008580: 81 e8 00 00 restore /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 2008584: 81 c7 e0 08 ret 2008588: 91 e8 20 00 restore %g0, 0, %o0 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200858c: 40 00 04 cb call 20098b8 <_Workspace_Allocate> 2008590: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008594: b6 10 20 00 clr %i3 2008598: a4 92 20 00 orcc %o0, 0, %l2 200859c: 02 bf ff d3 be 20084e8 <_Thread_Initialize+0xfc> 20085a0: 82 10 00 12 mov %l2, %g1 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 20085a4: 27 00 80 6d sethi %hi(0x201b400), %l3 20085a8: c4 04 e2 b0 ld [ %l3 + 0x2b0 ], %g2 ! 201b6b0 <_Thread_Maximum_extensions> if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 20085ac: c2 26 60 c8 st %g1, [ %i1 + 0xc8 ] fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 20085b0: c2 26 61 58 st %g1, [ %i1 + 0x158 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20085b4: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 20085b8: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 20085bc: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 20085c0: 80 a0 a0 00 cmp %g2, 0 20085c4: 02 bf ff aa be 200846c <_Thread_Initialize+0x80> 20085c8: c0 26 60 6c clr [ %i1 + 0x6c ] extensions_area = _Workspace_Allocate( 20085cc: 84 00 a0 01 inc %g2 20085d0: 40 00 04 ba call 20098b8 <_Workspace_Allocate> 20085d4: 91 28 a0 02 sll %g2, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 20085d8: b6 92 20 00 orcc %o0, 0, %i3 20085dc: 02 bf ff c3 be 20084e8 <_Thread_Initialize+0xfc> 20085e0: c8 04 e2 b0 ld [ %l3 + 0x2b0 ], %g4 goto failed; } the_thread->extensions = (void **) extensions_area; 20085e4: f6 26 61 6c st %i3, [ %i1 + 0x16c ] 20085e8: 86 10 00 1b mov %i3, %g3 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 20085ec: 84 10 20 00 clr %g2 20085f0: 10 80 00 03 b 20085fc <_Thread_Initialize+0x210> 20085f4: 82 10 20 00 clr %g1 20085f8: c6 06 61 6c ld [ %i1 + 0x16c ], %g3 the_thread->extensions[i] = NULL; 20085fc: 85 28 a0 02 sll %g2, 2, %g2 2008600: c0 20 c0 02 clr [ %g3 + %g2 ] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2008604: 82 00 60 01 inc %g1 2008608: 80 a1 00 01 cmp %g4, %g1 200860c: 1a bf ff fb bcc 20085f8 <_Thread_Initialize+0x20c> 2008610: 84 10 00 01 mov %g1, %g2 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 2008614: 10 bf ff 99 b 2008478 <_Thread_Initialize+0x8c> 2008618: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 0200cb78 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200cb78: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200cb7c: 03 00 80 6d sethi %hi(0x201b400), %g1 200cb80: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200cb84: 7f ff d5 ca call 20022ac 200cb88: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200cb8c: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200cb90: c4 04 40 00 ld [ %l1 ], %g2 200cb94: c2 04 60 08 ld [ %l1 + 8 ], %g1 200cb98: 80 a0 80 01 cmp %g2, %g1 200cb9c: 02 80 00 1f be 200cc18 <_Thread_Reset_timeslice+0xa0> 200cba0: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200cba4: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 200cba8: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200cbac: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200cbb0: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cbb4: 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; 200cbb8: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200cbbc: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200cbc0: 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; 200cbc4: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200cbc8: 7f ff d5 bd call 20022bc 200cbcc: 01 00 00 00 nop 200cbd0: 7f ff d5 b7 call 20022ac 200cbd4: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200cbd8: 03 00 80 6d sethi %hi(0x201b400), %g1 200cbdc: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir> 200cbe0: 80 a4 00 02 cmp %l0, %g2 200cbe4: 02 80 00 06 be 200cbfc <_Thread_Reset_timeslice+0x84> 200cbe8: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 200cbec: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED 200cbf0: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary><== NOT EXECUTED _ISR_Enable( level ); 200cbf4: 7f ff d5 b2 call 20022bc <== NOT EXECUTED 200cbf8: 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; 200cbfc: c4 04 40 00 ld [ %l1 ], %g2 200cc00: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ] _Context_Switch_necessary = true; 200cc04: 84 10 20 01 mov 1, %g2 200cc08: 03 00 80 6d sethi %hi(0x201b400), %g1 200cc0c: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary> _ISR_Enable( level ); 200cc10: 7f ff d5 ab call 20022bc 200cc14: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 200cc18: 7f ff d5 a9 call 20022bc 200cc1c: 81 e8 00 00 restore 020090e8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 20090e8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 20090ec: 03 00 80 6d sethi %hi(0x201b400), %g1 20090f0: e0 00 62 d0 ld [ %g1 + 0x2d0 ], %l0 ! 201b6d0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 20090f4: 7f ff e4 6e call 20022ac 20090f8: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 20090fc: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 2009100: c4 04 40 00 ld [ %l1 ], %g2 2009104: c2 04 60 08 ld [ %l1 + 8 ], %g1 2009108: 80 a0 80 01 cmp %g2, %g1 200910c: 02 80 00 19 be 2009170 <_Thread_Yield_processor+0x88> 2009110: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2009114: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2009118: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200911c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009120: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009124: 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; 2009128: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200912c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2009130: 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; 2009134: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2009138: 7f ff e4 61 call 20022bc 200913c: 01 00 00 00 nop 2009140: 7f ff e4 5b call 20022ac 2009144: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2009148: 03 00 80 6d sethi %hi(0x201b400), %g1 200914c: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201b6a0 <_Thread_Heir> 2009150: 80 a4 00 02 cmp %l0, %g2 2009154: 22 80 00 0e be,a 200918c <_Thread_Yield_processor+0xa4> 2009158: 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; 200915c: 84 10 20 01 mov 1, %g2 2009160: 03 00 80 6d sethi %hi(0x201b400), %g1 2009164: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] ! 201b6e0 <_Context_Switch_necessary> _ISR_Enable( level ); 2009168: 7f ff e4 55 call 20022bc 200916c: 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 ) ) 2009170: 03 00 80 6d sethi %hi(0x201b400), %g1 2009174: c2 00 62 a0 ld [ %g1 + 0x2a0 ], %g1 ! 201b6a0 <_Thread_Heir> 2009178: 80 a4 00 01 cmp %l0, %g1 200917c: 32 bf ff f9 bne,a 2009160 <_Thread_Yield_processor+0x78> 2009180: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 2009184: 7f ff e4 4e call 20022bc 2009188: 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; 200918c: 10 bf ff f4 b 200915c <_Thread_Yield_processor+0x74> 2009190: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ] 0200893c <_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 ) { 200893c: 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; 2008940: 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); 2008944: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2008948: 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); 200894c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2008950: 82 06 60 38 add %i1, 0x38, %g1 2008954: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 2008958: 2d 00 80 6a sethi %hi(0x201a800), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 200895c: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2008960: 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 ]; 2008964: ab 28 60 04 sll %g1, 4, %l5 2008968: ac 15 a3 74 or %l6, 0x374, %l6 200896c: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 2008970: 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 ]; 2008974: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2008978: 12 80 00 24 bne 2008a08 <_Thread_queue_Enqueue_priority+0xcc> 200897c: 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; 2008980: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 2008984: 7f ff e6 4a call 20022ac 2008988: 01 00 00 00 nop 200898c: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 2008990: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2008994: 80 a0 40 16 cmp %g1, %l6 2008998: 02 80 00 3a be 2008a80 <_Thread_queue_Enqueue_priority+0x144> 200899c: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 20089a0: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 20089a4: 80 a4 00 13 cmp %l0, %l3 20089a8: 18 80 00 0b bgu 20089d4 <_Thread_queue_Enqueue_priority+0x98> 20089ac: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 20089b0: 10 80 00 36 b 2008a88 <_Thread_queue_Enqueue_priority+0x14c> 20089b4: 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 ) ) { 20089b8: 80 a4 40 16 cmp %l1, %l6 20089bc: 02 80 00 32 be 2008a84 <_Thread_queue_Enqueue_priority+0x148> 20089c0: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 20089c4: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 20089c8: 80 a4 00 13 cmp %l0, %l3 20089cc: 28 80 00 2f bleu,a 2008a88 <_Thread_queue_Enqueue_priority+0x14c> 20089d0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 20089d4: 7f ff e6 3a call 20022bc 20089d8: 90 10 00 12 mov %l2, %o0 20089dc: 7f ff e6 34 call 20022ac 20089e0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20089e4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20089e8: 80 8d 00 01 btst %l4, %g1 20089ec: 32 bf ff f3 bne,a 20089b8 <_Thread_queue_Enqueue_priority+0x7c> 20089f0: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 20089f4: 7f ff e6 32 call 20022bc <== NOT EXECUTED 20089f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 20089fc: 30 bf ff e2 b,a 2008984 <_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 ); 2008a00: 7f ff e6 2f call 20022bc 2008a04: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 2008a08: 7f ff e6 29 call 20022ac 2008a0c: 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; 2008a10: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 2008a14: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 2008a18: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2008a1c: 80 a0 40 15 cmp %g1, %l5 2008a20: 02 80 00 20 be 2008aa0 <_Thread_queue_Enqueue_priority+0x164> 2008a24: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 2008a28: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 2008a2c: 80 a4 00 13 cmp %l0, %l3 2008a30: 0a 80 00 0b bcs 2008a5c <_Thread_queue_Enqueue_priority+0x120> 2008a34: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008a38: 10 80 00 1b b 2008aa4 <_Thread_queue_Enqueue_priority+0x168> 2008a3c: 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 ) ) { 2008a40: 80 a4 40 15 cmp %l1, %l5 2008a44: 02 80 00 17 be 2008aa0 <_Thread_queue_Enqueue_priority+0x164> 2008a48: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 2008a4c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 2008a50: 80 a4 00 13 cmp %l0, %l3 2008a54: 3a 80 00 14 bcc,a 2008aa4 <_Thread_queue_Enqueue_priority+0x168> 2008a58: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2008a5c: 7f ff e6 18 call 20022bc 2008a60: 90 10 00 12 mov %l2, %o0 2008a64: 7f ff e6 12 call 20022ac 2008a68: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008a6c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2008a70: 80 8d 00 01 btst %l4, %g1 2008a74: 32 bf ff f3 bne,a 2008a40 <_Thread_queue_Enqueue_priority+0x104> 2008a78: e2 04 60 04 ld [ %l1 + 4 ], %l1 2008a7c: 30 bf ff e1 b,a 2008a00 <_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 ) ) { 2008a80: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008a84: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008a88: 80 a0 a0 01 cmp %g2, 1 2008a8c: 02 80 00 17 be 2008ae8 <_Thread_queue_Enqueue_priority+0x1ac> 2008a90: 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; 2008a94: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 2008a98: 81 c7 e0 08 ret 2008a9c: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008aa0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008aa4: 80 a0 a0 01 cmp %g2, 1 2008aa8: 32 bf ff fc bne,a 2008a98 <_Thread_queue_Enqueue_priority+0x15c> 2008aac: 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 ) 2008ab0: 80 a4 00 13 cmp %l0, %l3 2008ab4: 02 80 00 1a be 2008b1c <_Thread_queue_Enqueue_priority+0x1e0> 2008ab8: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2008abc: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2008ac0: 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; 2008ac4: 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; 2008ac8: 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; 2008acc: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 2008ad0: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008ad4: b0 10 20 01 mov 1, %i0 2008ad8: 7f ff e5 f9 call 20022bc 2008adc: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008ae0: 81 c7 e0 08 ret 2008ae4: 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 ) 2008ae8: 02 80 00 0d be 2008b1c <_Thread_queue_Enqueue_priority+0x1e0> 2008aec: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008af0: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008af4: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2008af8: 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; 2008afc: 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; 2008b00: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 2008b04: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008b08: b0 10 20 01 mov 1, %i0 2008b0c: 7f ff e5 ec call 20022bc 2008b10: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008b14: 81 c7 e0 08 ret 2008b18: 81 e8 00 00 restore 2008b1c: 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; 2008b20: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008b24: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 2008b28: 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; 2008b2c: 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; 2008b30: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 2008b34: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008b38: b0 10 20 01 mov 1, %i0 2008b3c: 7f ff e5 e0 call 20022bc 2008b40: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 2008b44: 81 c7 e0 08 ret 2008b48: 81 e8 00 00 restore 02008bf8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 2008bf8: 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 ) 2008bfc: 80 a6 20 00 cmp %i0, 0 2008c00: 02 80 00 13 be 2008c4c <_Thread_queue_Requeue+0x54> 2008c04: 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 ) { 2008c08: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 2008c0c: 80 a4 60 01 cmp %l1, 1 2008c10: 02 80 00 04 be 2008c20 <_Thread_queue_Requeue+0x28> 2008c14: 01 00 00 00 nop 2008c18: 81 c7 e0 08 ret <== NOT EXECUTED 2008c1c: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2008c20: 7f ff e5 a3 call 20022ac 2008c24: 01 00 00 00 nop 2008c28: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2008c2c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2008c30: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008c34: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008c38: 80 88 80 01 btst %g2, %g1 2008c3c: 12 80 00 06 bne 2008c54 <_Thread_queue_Requeue+0x5c> 2008c40: 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 ); 2008c44: 7f ff e5 9e call 20022bc 2008c48: 90 10 00 10 mov %l0, %o0 2008c4c: 81 c7 e0 08 ret 2008c50: 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 ); 2008c54: 92 10 00 19 mov %i1, %o1 2008c58: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 2008c5c: 40 00 0f 25 call 200c8f0 <_Thread_queue_Extract_priority_helper> 2008c60: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2008c64: 90 10 00 18 mov %i0, %o0 2008c68: 92 10 00 19 mov %i1, %o1 2008c6c: 7f ff ff 34 call 200893c <_Thread_queue_Enqueue_priority> 2008c70: 94 07 bf fc add %fp, -4, %o2 2008c74: 30 bf ff f4 b,a 2008c44 <_Thread_queue_Requeue+0x4c> 020166ec <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20166ec: 9d e3 bf 88 save %sp, -120, %sp 20166f0: 2d 00 80 f3 sethi %hi(0x203cc00), %l6 20166f4: ba 07 bf f4 add %fp, -12, %i5 20166f8: a8 07 bf f8 add %fp, -8, %l4 20166fc: a4 07 bf e8 add %fp, -24, %l2 2016700: ae 07 bf ec add %fp, -20, %l7 2016704: 2b 00 80 f3 sethi %hi(0x203cc00), %l5 2016708: 39 00 80 f3 sethi %hi(0x203cc00), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 201670c: c0 27 bf f8 clr [ %fp + -8 ] 2016710: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 2016714: 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); 2016718: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 201671c: 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); 2016720: ee 27 bf e8 st %l7, [ %fp + -24 ] 2016724: ac 15 a2 14 or %l6, 0x214, %l6 2016728: aa 15 61 54 or %l5, 0x154, %l5 201672c: b8 17 20 c0 or %i4, 0xc0, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016730: 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 ); 2016734: 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 ); 2016738: 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 ); 201673c: 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; 2016740: 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; 2016744: 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; 2016748: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 201674c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016750: 90 10 00 11 mov %l1, %o0 2016754: 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; 2016758: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201675c: 40 00 12 10 call 201af9c <_Watchdog_Adjust_to_chain> 2016760: 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; 2016764: 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(); 2016768: 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 ) { 201676c: 80 a4 00 09 cmp %l0, %o1 2016770: 38 80 00 2f bgu,a 201682c <_Timer_server_Body+0x140> 2016774: 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 ) { 2016778: 80 a4 00 09 cmp %l0, %o1 201677c: 0a 80 00 30 bcs 201683c <_Timer_server_Body+0x150> 2016780: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2016784: 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 ); 2016788: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 201678c: 40 00 02 98 call 20171ec <_Chain_Get> 2016790: 01 00 00 00 nop if ( timer == NULL ) { 2016794: 80 a2 20 00 cmp %o0, 0 2016798: 02 80 00 10 be 20167d8 <_Timer_server_Body+0xec> 201679c: 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 ) { 20167a0: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20167a4: 80 a0 60 01 cmp %g1, 1 20167a8: 02 80 00 29 be 201684c <_Timer_server_Body+0x160> 20167ac: 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 ) { 20167b0: 12 bf ff f6 bne 2016788 <_Timer_server_Body+0x9c> 20167b4: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20167b8: 40 00 12 2f call 201b074 <_Watchdog_Insert> 20167bc: 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 ); 20167c0: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 20167c4: 40 00 02 8a call 20171ec <_Chain_Get> 20167c8: 01 00 00 00 nop if ( timer == NULL ) { 20167cc: 80 a2 20 00 cmp %o0, 0 20167d0: 32 bf ff f5 bne,a 20167a4 <_Timer_server_Body+0xb8> 20167d4: 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 ); 20167d8: 7f ff e3 aa call 200f680 20167dc: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 20167e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20167e4: 80 a5 00 01 cmp %l4, %g1 20167e8: 02 80 00 1d be 201685c <_Timer_server_Body+0x170> 20167ec: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20167f0: 7f ff e3 a8 call 200f690 <== NOT EXECUTED 20167f4: 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; 20167f8: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 20167fc: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2016800: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2016804: 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; 2016808: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201680c: 40 00 11 e4 call 201af9c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 2016810: 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; 2016814: 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(); 2016818: 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 ) { 201681c: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 2016820: 08 bf ff d7 bleu 201677c <_Timer_server_Body+0x90> <== NOT EXECUTED 2016824: 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 ); 2016828: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 201682c: 90 10 00 13 mov %l3, %o0 2016830: 40 00 11 db call 201af9c <_Watchdog_Adjust_to_chain> 2016834: 94 10 00 12 mov %l2, %o2 2016838: 30 bf ff d3 b,a 2016784 <_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 ); 201683c: 90 10 00 13 mov %l3, %o0 2016840: 40 00 11 a7 call 201aedc <_Watchdog_Adjust> 2016844: 92 10 20 01 mov 1, %o1 2016848: 30 bf ff cf b,a 2016784 <_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 ); 201684c: 92 02 20 10 add %o0, 0x10, %o1 2016850: 40 00 12 09 call 201b074 <_Watchdog_Insert> 2016854: 90 10 00 11 mov %l1, %o0 2016858: 30 bf ff cc b,a 2016788 <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 201685c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2016860: 7f ff e3 8c call 200f690 2016864: 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 ) ) { 2016868: c2 07 bf e8 ld [ %fp + -24 ], %g1 201686c: 80 a5 c0 01 cmp %l7, %g1 2016870: 12 80 00 0c bne 20168a0 <_Timer_server_Body+0x1b4> 2016874: 01 00 00 00 nop 2016878: 30 80 00 13 b,a 20168c4 <_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; 201687c: 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; 2016880: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 2016884: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 2016888: 7f ff e3 82 call 200f690 201688c: 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 ); 2016890: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 2016894: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2016898: 9f c0 40 00 call %g1 201689c: 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 ); 20168a0: 7f ff e3 78 call 200f680 20168a4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20168a8: 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)) 20168ac: 80 a5 c0 10 cmp %l7, %l0 20168b0: 32 bf ff f3 bne,a 201687c <_Timer_server_Body+0x190> 20168b4: 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 ); 20168b8: 7f ff e3 76 call 200f690 20168bc: 01 00 00 00 nop 20168c0: 30 bf ff a1 b,a 2016744 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 20168c4: c0 2e 20 7c clrb [ %i0 + 0x7c ] 20168c8: c2 07 00 00 ld [ %i4 ], %g1 20168cc: 82 00 60 01 inc %g1 20168d0: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 20168d4: d0 06 00 00 ld [ %i0 ], %o0 20168d8: 40 00 0e db call 201a444 <_Thread_Set_state> 20168dc: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 20168e0: 7f ff ff 59 call 2016644 <_Timer_server_Reset_interval_system_watchdog> 20168e4: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 20168e8: 7f ff ff 6c call 2016698 <_Timer_server_Reset_tod_system_watchdog> 20168ec: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 20168f0: 40 00 0b df call 201986c <_Thread_Enable_dispatch> 20168f4: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 20168f8: 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; 20168fc: 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 ); 2016900: 40 00 12 4a call 201b228 <_Watchdog_Remove> 2016904: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2016908: 40 00 12 48 call 201b228 <_Watchdog_Remove> 201690c: 90 10 00 1a mov %i2, %o0 2016910: 30 bf ff 8d b,a 2016744 <_Timer_server_Body+0x58> 0200b7d0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b7d0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b7d4: 7f ff de 97 call 2003230 200b7d8: 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)); 200b7dc: 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; 200b7e0: 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 ) ) { 200b7e4: 80 a0 40 11 cmp %g1, %l1 200b7e8: 02 80 00 1f be 200b864 <_Watchdog_Adjust+0x94> 200b7ec: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b7f0: 12 80 00 1f bne 200b86c <_Watchdog_Adjust+0x9c> 200b7f4: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b7f8: 80 a6 a0 00 cmp %i2, 0 200b7fc: 02 80 00 1a be 200b864 <_Watchdog_Adjust+0x94> 200b800: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b804: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b808: 80 a6 80 19 cmp %i2, %i1 200b80c: 1a 80 00 0b bcc 200b838 <_Watchdog_Adjust+0x68> 200b810: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 200b814: 10 80 00 1d b 200b888 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200b818: 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 ) { 200b81c: b4 a6 80 19 subcc %i2, %i1, %i2 200b820: 02 80 00 11 be 200b864 <_Watchdog_Adjust+0x94> 200b824: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b828: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b82c: 80 a6 40 1a cmp %i1, %i2 200b830: 38 80 00 16 bgu,a 200b888 <_Watchdog_Adjust+0xb8> 200b834: 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; 200b838: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 200b83c: 7f ff de 81 call 2003240 200b840: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b844: 40 00 00 b6 call 200bb1c <_Watchdog_Tickle> 200b848: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 200b84c: 7f ff de 79 call 2003230 200b850: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200b854: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 200b858: 80 a4 40 02 cmp %l1, %g2 200b85c: 12 bf ff f0 bne 200b81c <_Watchdog_Adjust+0x4c> 200b860: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 200b864: 7f ff de 77 call 2003240 200b868: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200b86c: 12 bf ff fe bne 200b864 <_Watchdog_Adjust+0x94> 200b870: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b874: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b878: b4 00 80 1a add %g2, %i2, %i2 200b87c: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200b880: 7f ff de 70 call 2003240 200b884: 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; 200b888: 10 bf ff f7 b 200b864 <_Watchdog_Adjust+0x94> 200b88c: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 02008558 : 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 ) { 2008558: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 200855c: 03 00 80 86 sethi %hi(0x2021800), %g1 2008560: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 ! 2021a6c <_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; 2008564: 09 00 80 87 sethi %hi(0x2021c00), %g4 if ( rtems_interrupt_is_in_progress() ) 2008568: 80 a0 60 00 cmp %g1, 0 200856c: 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 ) { 2008570: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 2008574: 12 80 00 49 bne 2008698 2008578: c6 01 20 d0 ld [ %g4 + 0xd0 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 200857c: 80 a6 a0 00 cmp %i2, 0 2008580: 02 80 00 4b be 20086ac 2008584: 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 ) 2008588: 02 80 00 49 be 20086ac 200858c: 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; 2008590: c4 06 40 00 ld [ %i1 ], %g2 2008594: 80 a0 a0 00 cmp %g2, 0 2008598: 22 80 00 42 be,a 20086a0 200859c: 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 ) 20085a0: 80 a0 c0 18 cmp %g3, %i0 20085a4: 08 80 00 3d bleu 2008698 20085a8: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20085ac: 05 00 80 86 sethi %hi(0x2021800), %g2 20085b0: c6 00 a1 d0 ld [ %g2 + 0x1d0 ], %g3 ! 20219d0 <_Thread_Dispatch_disable_level> 20085b4: 86 00 e0 01 inc %g3 20085b8: c6 20 a1 d0 st %g3, [ %g2 + 0x1d0 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 20085bc: 80 a6 20 00 cmp %i0, 0 20085c0: 12 80 00 2b bne 200866c 20085c4: 05 00 80 87 sethi %hi(0x2021c00), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 20085c8: da 01 20 d0 ld [ %g4 + 0xd0 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 20085cc: 80 a3 60 00 cmp %o5, 0 20085d0: 02 80 00 3a be 20086b8 20085d4: d8 00 a0 d4 ld [ %g2 + 0xd4 ], %o4 20085d8: 10 80 00 05 b 20085ec 20085dc: 86 10 00 0c mov %o4, %g3 20085e0: 80 a3 40 18 cmp %o5, %i0 20085e4: 08 80 00 0b bleu 2008610 20085e8: 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; 20085ec: c8 00 c0 00 ld [ %g3 ], %g4 20085f0: 80 a1 20 00 cmp %g4, 0 20085f4: 32 bf ff fb bne,a 20085e0 20085f8: b0 06 20 01 inc %i0 20085fc: c8 00 e0 04 ld [ %g3 + 4 ], %g4 2008600: 80 a1 20 00 cmp %g4, 0 2008604: 32 bf ff f7 bne,a 20085e0 2008608: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 200860c: 80 a3 40 18 cmp %o5, %i0 2008610: 02 80 00 2b be 20086bc 2008614: f0 26 80 00 st %i0, [ %i2 ] 2008618: 85 2e 20 03 sll %i0, 3, %g2 200861c: 87 2e 20 05 sll %i0, 5, %g3 2008620: 84 20 c0 02 sub %g3, %g2, %g2 2008624: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 2008628: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 200862c: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 2008630: c6 20 80 00 st %g3, [ %g2 ] 2008634: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 2008638: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 200863c: c6 20 a0 04 st %g3, [ %g2 + 4 ] 2008640: c6 00 60 08 ld [ %g1 + 8 ], %g3 2008644: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008648: c6 00 60 0c ld [ %g1 + 0xc ], %g3 200864c: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 2008650: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2008654: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 2008658: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 200865c: 40 00 07 2b call 200a308 <_Thread_Enable_dispatch> 2008660: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 2008664: 40 00 24 c9 call 2011988 2008668: 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; 200866c: c6 00 a0 d4 ld [ %g2 + 0xd4 ], %g3 2008670: 89 2e 20 05 sll %i0, 5, %g4 2008674: 85 2e 20 03 sll %i0, 3, %g2 2008678: 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; 200867c: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 2008680: 80 a1 20 00 cmp %g4, 0 2008684: 02 80 00 12 be 20086cc 2008688: 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(); 200868c: 40 00 07 1f call 200a308 <_Thread_Enable_dispatch> 2008690: 01 00 00 00 nop 2008694: 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 ); } 2008698: 81 c7 e0 08 ret 200869c: 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; 20086a0: 80 a0 a0 00 cmp %g2, 0 20086a4: 12 bf ff c0 bne 20085a4 20086a8: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 20086ac: 84 10 20 09 mov 9, %g2 } 20086b0: 81 c7 e0 08 ret 20086b4: 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; 20086b8: 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(); 20086bc: 40 00 07 13 call 200a308 <_Thread_Enable_dispatch> 20086c0: 01 00 00 00 nop return sc; 20086c4: 10 bf ff f5 b 2008698 20086c8: 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; 20086cc: c6 00 a0 04 ld [ %g2 + 4 ], %g3 20086d0: 80 a0 e0 00 cmp %g3, 0 20086d4: 12 bf ff ee bne 200868c 20086d8: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 20086dc: 10 bf ff d3 b 2008628 20086e0: f0 26 80 00 st %i0, [ %i2 ] 02008ff8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2008ff8: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2008ffc: 80 a6 20 00 cmp %i0, 0 2009000: 02 80 00 23 be 200908c 2009004: 25 00 80 a6 sethi %hi(0x2029800), %l2 2009008: a4 14 a3 04 or %l2, 0x304, %l2 ! 2029b04 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 200900c: 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 ] ) 2009010: c2 04 80 00 ld [ %l2 ], %g1 2009014: 80 a0 60 00 cmp %g1, 0 2009018: 22 80 00 1a be,a 2009080 200901c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2009020: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( !information ) 2009024: 80 a4 60 00 cmp %l1, 0 2009028: 22 80 00 16 be,a 2009080 200902c: a4 04 a0 04 add %l2, 4, %l2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 2009030: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 2009034: 84 90 60 00 orcc %g1, 0, %g2 2009038: 22 80 00 12 be,a 2009080 200903c: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 2009040: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 2009044: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 2009048: 83 2c 20 02 sll %l0, 2, %g1 200904c: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 if ( !the_thread ) 2009050: 90 90 60 00 orcc %g1, 0, %o0 2009054: 02 80 00 05 be 2009068 2009058: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 200905c: 9f c6 00 00 call %i0 2009060: 01 00 00 00 nop 2009064: 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++ ) { 2009068: 83 28 a0 10 sll %g2, 0x10, %g1 200906c: 83 30 60 10 srl %g1, 0x10, %g1 2009070: 80 a0 40 10 cmp %g1, %l0 2009074: 3a bf ff f5 bcc,a 2009048 2009078: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 200907c: 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++ ) { 2009080: 80 a4 80 13 cmp %l2, %l3 2009084: 32 bf ff e4 bne,a 2009014 2009088: c2 04 80 00 ld [ %l2 ], %g1 200908c: 81 c7 e0 08 ret 2009090: 81 e8 00 00 restore