0200c678 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c678: 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; 200c67c: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c680: 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 ) { 200c684: 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; 200c688: e4 06 20 08 ld [ %i0 + 8 ], %l2 200c68c: 18 80 00 75 bgu 200c860 <_Heap_Allocate_aligned_with_boundary+0x1e8> 200c690: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200c694: 80 a6 e0 00 cmp %i3, 0 200c698: 12 80 00 70 bne 200c858 <_Heap_Allocate_aligned_with_boundary+0x1e0> 200c69c: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c6a0: 80 a4 00 12 cmp %l0, %l2 200c6a4: 02 80 00 72 be 200c86c <_Heap_Allocate_aligned_with_boundary+0x1f4> 200c6a8: 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; 200c6ac: 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; 200c6b0: 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; 200c6b4: 82 20 40 19 sub %g1, %i1, %g1 200c6b8: 10 80 00 09 b 200c6dc <_Heap_Allocate_aligned_with_boundary+0x64> 200c6bc: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 200c6c0: 80 a6 20 00 cmp %i0, 0 200c6c4: 32 80 00 57 bne,a 200c820 <_Heap_Allocate_aligned_with_boundary+0x1a8> 200c6c8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 200c6cc: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c6d0: 80 a4 00 12 cmp %l0, %l2 200c6d4: 22 80 00 5a be,a 200c83c <_Heap_Allocate_aligned_with_boundary+0x1c4> 200c6d8: 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 ) { 200c6dc: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200c6e0: 80 a5 00 13 cmp %l4, %l3 200c6e4: 1a bf ff fa bcc 200c6cc <_Heap_Allocate_aligned_with_boundary+0x54> 200c6e8: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200c6ec: 80 a6 a0 00 cmp %i2, 0 200c6f0: 02 bf ff f4 be 200c6c0 <_Heap_Allocate_aligned_with_boundary+0x48> 200c6f4: 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; 200c6f8: 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; 200c6fc: 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; 200c700: a6 0c ff fe and %l3, -2, %l3 200c704: 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; 200c708: 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; 200c70c: 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); 200c710: 90 10 00 18 mov %i0, %o0 200c714: a6 00 40 13 add %g1, %l3, %l3 200c718: 40 00 32 64 call 20190a8 <.urem> 200c71c: 92 10 00 1a mov %i2, %o1 200c720: 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 ) { 200c724: 80 a4 c0 18 cmp %l3, %i0 200c728: 1a 80 00 06 bcc 200c740 <_Heap_Allocate_aligned_with_boundary+0xc8> 200c72c: ac 04 a0 08 add %l2, 8, %l6 200c730: 90 10 00 13 mov %l3, %o0 200c734: 40 00 32 5d call 20190a8 <.urem> 200c738: 92 10 00 1a mov %i2, %o1 200c73c: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200c740: 80 a6 e0 00 cmp %i3, 0 200c744: 02 80 00 26 be 200c7dc <_Heap_Allocate_aligned_with_boundary+0x164> 200c748: 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; 200c74c: a6 06 00 19 add %i0, %i1, %l3 200c750: 92 10 00 1b mov %i3, %o1 200c754: 40 00 32 55 call 20190a8 <.urem> 200c758: 90 10 00 13 mov %l3, %o0 200c75c: 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 ) { 200c760: 80 a4 c0 08 cmp %l3, %o0 200c764: 08 80 00 1e bleu 200c7dc <_Heap_Allocate_aligned_with_boundary+0x164> 200c768: 80 a5 80 18 cmp %l6, %i0 200c76c: 80 a6 00 08 cmp %i0, %o0 200c770: 1a 80 00 1b bcc 200c7dc <_Heap_Allocate_aligned_with_boundary+0x164> 200c774: 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; 200c778: 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 ) { 200c77c: 80 a5 40 08 cmp %l5, %o0 200c780: 28 80 00 0a bleu,a 200c7a8 <_Heap_Allocate_aligned_with_boundary+0x130> 200c784: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 200c788: 10 bf ff d2 b 200c6d0 <_Heap_Allocate_aligned_with_boundary+0x58> 200c78c: 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 ) { 200c790: 1a 80 00 13 bcc 200c7dc <_Heap_Allocate_aligned_with_boundary+0x164> 200c794: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 200c798: 80 a5 40 08 cmp %l5, %o0 200c79c: 38 bf ff cd bgu,a 200c6d0 <_Heap_Allocate_aligned_with_boundary+0x58> 200c7a0: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 200c7a4: b0 22 00 19 sub %o0, %i1, %i0 200c7a8: 92 10 00 1a mov %i2, %o1 200c7ac: 40 00 32 3f call 20190a8 <.urem> 200c7b0: 90 10 00 18 mov %i0, %o0 200c7b4: 92 10 00 1b mov %i3, %o1 200c7b8: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200c7bc: a6 06 00 19 add %i0, %i1, %l3 200c7c0: 40 00 32 3a call 20190a8 <.urem> 200c7c4: 90 10 00 13 mov %l3, %o0 200c7c8: 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 ) { 200c7cc: 80 a4 c0 08 cmp %l3, %o0 200c7d0: 18 bf ff f0 bgu 200c790 <_Heap_Allocate_aligned_with_boundary+0x118> 200c7d4: 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 ) { 200c7d8: 80 a5 80 18 cmp %l6, %i0 200c7dc: 18 bf ff bc bgu 200c6cc <_Heap_Allocate_aligned_with_boundary+0x54> 200c7e0: 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; 200c7e4: 90 10 00 18 mov %i0, %o0 200c7e8: a6 20 40 12 sub %g1, %l2, %l3 200c7ec: 92 10 00 1d mov %i5, %o1 200c7f0: 40 00 32 2e call 20190a8 <.urem> 200c7f4: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 200c7f8: 90 a4 c0 08 subcc %l3, %o0, %o0 200c7fc: 02 bf ff b2 be 200c6c4 <_Heap_Allocate_aligned_with_boundary+0x4c> 200c800: 80 a6 20 00 cmp %i0, 0 200c804: 80 a5 c0 08 cmp %l7, %o0 200c808: 38 bf ff b2 bgu,a 200c6d0 <_Heap_Allocate_aligned_with_boundary+0x58> 200c80c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 200c810: 80 a6 20 00 cmp %i0, 0 200c814: 22 bf ff af be,a 200c6d0 <_Heap_Allocate_aligned_with_boundary+0x58> 200c818: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c81c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c820: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c824: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c828: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c82c: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c830: 90 10 00 10 mov %l0, %o0 200c834: 7f ff e9 2e call 2006cec <_Heap_Block_allocate> 200c838: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200c83c: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 200c840: 80 a0 40 11 cmp %g1, %l1 200c844: 1a 80 00 08 bcc 200c864 <_Heap_Allocate_aligned_with_boundary+0x1ec> 200c848: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c84c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 200c850: 81 c7 e0 08 ret 200c854: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200c858: 08 80 00 07 bleu 200c874 <_Heap_Allocate_aligned_with_boundary+0x1fc> 200c85c: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c860: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 200c864: 81 c7 e0 08 ret 200c868: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c86c: 10 bf ff f4 b 200c83c <_Heap_Allocate_aligned_with_boundary+0x1c4> 200c870: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200c874: 22 bf ff 8b be,a 200c6a0 <_Heap_Allocate_aligned_with_boundary+0x28> 200c878: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 200c87c: 10 bf ff 8a b 200c6a4 <_Heap_Allocate_aligned_with_boundary+0x2c> 200c880: 80 a4 00 12 cmp %l0, %l2 02007c70 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2007c70: 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; 2007c74: 25 00 80 20 sethi %hi(0x2008000), %l2 2007c78: 80 8e a0 ff btst 0xff, %i2 2007c7c: a4 14 a2 70 or %l2, 0x270, %l2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2007c80: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 uintptr_t const min_block_size = heap->min_block_size; 2007c84: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 2007c88: 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; 2007c8c: 12 80 00 04 bne 2007c9c <_Heap_Walk+0x2c> 2007c90: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2007c94: 25 00 80 1f sethi %hi(0x2007c00), %l2 2007c98: a4 14 a0 68 or %l2, 0x68, %l2 ! 2007c68 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2007c9c: 03 00 80 7b sethi %hi(0x201ec00), %g1 2007ca0: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 201ef40 <_System_state_Current> 2007ca4: 80 a0 60 03 cmp %g1, 3 2007ca8: 22 80 00 04 be,a 2007cb8 <_Heap_Walk+0x48> 2007cac: da 06 20 18 ld [ %i0 + 0x18 ], %o5 block = next_block; } return true; } 2007cb0: 81 c7 e0 08 ret 2007cb4: 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)( 2007cb8: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007cbc: c4 06 20 08 ld [ %i0 + 8 ], %g2 2007cc0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2007cc4: 90 10 00 19 mov %i1, %o0 2007cc8: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2007ccc: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2007cd0: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2007cd4: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 2007cd8: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 2007cdc: 92 10 20 00 clr %o1 2007ce0: 15 00 80 70 sethi %hi(0x201c000), %o2 2007ce4: 96 10 00 15 mov %l5, %o3 2007ce8: 94 12 a0 b0 or %o2, 0xb0, %o2 2007cec: 9f c4 80 00 call %l2 2007cf0: 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 ) { 2007cf4: 80 a5 60 00 cmp %l5, 0 2007cf8: 02 80 00 36 be 2007dd0 <_Heap_Walk+0x160> 2007cfc: 80 8d 60 07 btst 7, %l5 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2007d00: 12 80 00 3c bne 2007df0 <_Heap_Walk+0x180> 2007d04: 90 10 00 13 mov %l3, %o0 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2007d08: 7f ff e7 6f call 2001ac4 <.urem> 2007d0c: 92 10 00 15 mov %l5, %o1 2007d10: 80 a2 20 00 cmp %o0, 0 2007d14: 12 80 00 40 bne 2007e14 <_Heap_Walk+0x1a4> 2007d18: 90 04 20 08 add %l0, 8, %o0 ); return false; } if ( 2007d1c: 7f ff e7 6a call 2001ac4 <.urem> 2007d20: 92 10 00 15 mov %l5, %o1 2007d24: 80 a2 20 00 cmp %o0, 0 2007d28: 32 80 00 44 bne,a 2007e38 <_Heap_Walk+0x1c8> 2007d2c: 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; 2007d30: ec 04 20 04 ld [ %l0 + 4 ], %l6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2007d34: ae 8d a0 01 andcc %l6, 1, %l7 2007d38: 22 80 00 48 be,a 2007e58 <_Heap_Walk+0x1e8> 2007d3c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( first_block->prev_size != page_size ) { 2007d40: d6 04 00 00 ld [ %l0 ], %o3 2007d44: 80 a5 40 0b cmp %l5, %o3 2007d48: 32 80 00 1a bne,a 2007db0 <_Heap_Walk+0x140> 2007d4c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2007d50: c2 05 20 04 ld [ %l4 + 4 ], %g1 2007d54: 82 08 7f fe and %g1, -2, %g1 2007d58: 82 05 00 01 add %l4, %g1, %g1 2007d5c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2007d60: 80 88 60 01 btst 1, %g1 2007d64: 22 80 01 23 be,a 20081f0 <_Heap_Walk+0x580> 2007d68: 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; 2007d6c: 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 ) { 2007d70: 80 a6 00 11 cmp %i0, %l1 2007d74: 02 80 00 6f be 2007f30 <_Heap_Walk+0x2c0> 2007d78: 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; 2007d7c: 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 2007d80: 80 a7 00 11 cmp %i4, %l1 2007d84: 28 80 00 3c bleu,a 2007e74 <_Heap_Walk+0x204> 2007d88: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 2007d8c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007d90: 96 10 00 11 mov %l1, %o3 2007d94: 92 10 20 01 mov 1, %o1 2007d98: 15 00 80 70 sethi %hi(0x201c000), %o2 2007d9c: b0 10 20 00 clr %i0 2007da0: 9f c4 80 00 call %l2 2007da4: 94 12 a2 58 or %o2, 0x258, %o2 2007da8: 81 c7 e0 08 ret 2007dac: 81 e8 00 00 restore return false; } if ( first_block->prev_size != page_size ) { (*printer)( 2007db0: 98 10 00 15 mov %l5, %o4 2007db4: 92 10 20 01 mov 1, %o1 2007db8: 15 00 80 70 sethi %hi(0x201c000), %o2 2007dbc: b0 10 20 00 clr %i0 2007dc0: 9f c4 80 00 call %l2 2007dc4: 94 12 a2 10 or %o2, 0x210, %o2 2007dc8: 81 c7 e0 08 ret 2007dcc: 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" ); 2007dd0: 90 10 00 19 mov %i1, %o0 2007dd4: 92 10 20 01 mov 1, %o1 2007dd8: 15 00 80 70 sethi %hi(0x201c000), %o2 2007ddc: b0 10 20 00 clr %i0 2007de0: 9f c4 80 00 call %l2 2007de4: 94 12 a1 48 or %o2, 0x148, %o2 2007de8: 81 c7 e0 08 ret 2007dec: 81 e8 00 00 restore return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 2007df0: 90 10 00 19 mov %i1, %o0 2007df4: 96 10 00 15 mov %l5, %o3 2007df8: 92 10 20 01 mov 1, %o1 2007dfc: 15 00 80 70 sethi %hi(0x201c000), %o2 2007e00: b0 10 20 00 clr %i0 2007e04: 9f c4 80 00 call %l2 2007e08: 94 12 a1 60 or %o2, 0x160, %o2 2007e0c: 81 c7 e0 08 ret 2007e10: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 2007e14: 90 10 00 19 mov %i1, %o0 2007e18: 96 10 00 13 mov %l3, %o3 2007e1c: 92 10 20 01 mov 1, %o1 2007e20: 15 00 80 70 sethi %hi(0x201c000), %o2 2007e24: b0 10 20 00 clr %i0 2007e28: 9f c4 80 00 call %l2 2007e2c: 94 12 a1 80 or %o2, 0x180, %o2 2007e30: 81 c7 e0 08 ret 2007e34: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2007e38: 96 10 00 10 mov %l0, %o3 2007e3c: 92 10 20 01 mov 1, %o1 2007e40: 15 00 80 70 sethi %hi(0x201c000), %o2 2007e44: b0 10 20 00 clr %i0 2007e48: 9f c4 80 00 call %l2 2007e4c: 94 12 a1 a8 or %o2, 0x1a8, %o2 2007e50: 81 c7 e0 08 ret 2007e54: 81 e8 00 00 restore return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 2007e58: 92 10 20 01 mov 1, %o1 2007e5c: 15 00 80 70 sethi %hi(0x201c000), %o2 2007e60: b0 10 20 00 clr %i0 2007e64: 9f c4 80 00 call %l2 2007e68: 94 12 a1 e0 or %o2, 0x1e0, %o2 2007e6c: 81 c7 e0 08 ret 2007e70: 81 e8 00 00 restore 2007e74: 80 a6 c0 11 cmp %i3, %l1 2007e78: 0a bf ff c6 bcs 2007d90 <_Heap_Walk+0x120> 2007e7c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( 2007e80: 90 04 60 08 add %l1, 8, %o0 2007e84: 7f ff e7 10 call 2001ac4 <.urem> 2007e88: 92 10 00 1a mov %i2, %o1 2007e8c: 80 a2 20 00 cmp %o0, 0 2007e90: 12 80 00 df bne 200820c <_Heap_Walk+0x59c> 2007e94: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2007e98: c2 04 60 04 ld [ %l1 + 4 ], %g1 2007e9c: 82 08 7f fe and %g1, -2, %g1 2007ea0: 82 04 40 01 add %l1, %g1, %g1 2007ea4: c2 00 60 04 ld [ %g1 + 4 ], %g1 2007ea8: 80 88 60 01 btst 1, %g1 2007eac: 12 80 00 ea bne 2008254 <_Heap_Walk+0x5e4> 2007eb0: 96 10 00 11 mov %l1, %o3 ); return false; } if ( free_block->prev != prev_block ) { 2007eb4: d8 04 60 0c ld [ %l1 + 0xc ], %o4 2007eb8: 80 a6 00 0c cmp %i0, %o4 2007ebc: 02 80 00 19 be 2007f20 <_Heap_Walk+0x2b0> 2007ec0: ba 10 00 11 mov %l1, %i5 2007ec4: 30 80 00 dc b,a 2008234 <_Heap_Walk+0x5c4> <== NOT EXECUTED 2007ec8: 0a bf ff b2 bcs 2007d90 <_Heap_Walk+0x120> 2007ecc: 90 10 00 19 mov %i1, %o0 2007ed0: 80 a6 c0 11 cmp %i3, %l1 2007ed4: 0a bf ff b0 bcs 2007d94 <_Heap_Walk+0x124> 2007ed8: 96 10 00 11 mov %l1, %o3 ); return false; } if ( 2007edc: 90 04 60 08 add %l1, 8, %o0 2007ee0: 7f ff e6 f9 call 2001ac4 <.urem> 2007ee4: 92 10 00 1a mov %i2, %o1 2007ee8: 80 a2 20 00 cmp %o0, 0 2007eec: 32 80 00 c8 bne,a 200820c <_Heap_Walk+0x59c> 2007ef0: 90 10 00 19 mov %i1, %o0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2007ef4: c2 04 60 04 ld [ %l1 + 4 ], %g1 2007ef8: 82 08 7f fe and %g1, -2, %g1 2007efc: 82 00 40 11 add %g1, %l1, %g1 2007f00: c2 00 60 04 ld [ %g1 + 4 ], %g1 2007f04: 80 88 60 01 btst 1, %g1 2007f08: 32 80 00 d2 bne,a 2008250 <_Heap_Walk+0x5e0> 2007f0c: 90 10 00 19 mov %i1, %o0 ); return false; } if ( free_block->prev != prev_block ) { 2007f10: d8 04 60 0c ld [ %l1 + 0xc ], %o4 2007f14: 80 a3 00 1d cmp %o4, %i5 2007f18: 12 80 00 c5 bne 200822c <_Heap_Walk+0x5bc> 2007f1c: ba 10 00 11 mov %l1, %i5 return false; } prev_block = free_block; free_block = free_block->next; 2007f20: 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 ) { 2007f24: 80 a6 00 11 cmp %i0, %l1 2007f28: 12 bf ff e8 bne 2007ec8 <_Heap_Walk+0x258> 2007f2c: 80 a4 40 1c cmp %l1, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 2007f30: 80 a5 00 10 cmp %l4, %l0 2007f34: 02 bf ff 5f be 2007cb0 <_Heap_Walk+0x40> 2007f38: 37 00 80 70 sethi %hi(0x201c000), %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007f3c: 35 00 80 70 sethi %hi(0x201c000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007f40: 39 00 80 71 sethi %hi(0x201c400), %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2007f44: 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)( 2007f48: b6 16 e3 00 or %i3, 0x300, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007f4c: b4 16 a3 18 or %i2, 0x318, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007f50: b8 17 20 b0 or %i4, 0xb0, %i4 2007f54: 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; 2007f58: 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 ) { 2007f5c: 80 a5 e0 00 cmp %l7, 0 2007f60: 02 80 00 16 be 2007fb8 <_Heap_Walk+0x348> 2007f64: a2 05 80 10 add %l6, %l0, %l1 (*printer)( 2007f68: 90 10 00 19 mov %i1, %o0 2007f6c: 92 10 20 00 clr %o1 2007f70: 94 10 00 1b mov %i3, %o2 2007f74: 96 10 00 10 mov %l0, %o3 2007f78: 9f c4 80 00 call %l2 2007f7c: 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 2007f80: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2007f84: 80 a0 40 11 cmp %g1, %l1 2007f88: 28 80 00 18 bleu,a 2007fe8 <_Heap_Walk+0x378> 2007f8c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 2007f90: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007f94: 96 10 00 10 mov %l0, %o3 2007f98: 98 10 00 11 mov %l1, %o4 2007f9c: 92 10 20 01 mov 1, %o1 2007fa0: 15 00 80 70 sethi %hi(0x201c000), %o2 2007fa4: b0 10 20 00 clr %i0 2007fa8: 9f c4 80 00 call %l2 2007fac: 94 12 a3 40 or %o2, 0x340, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 2007fb0: 81 c7 e0 08 ret 2007fb4: 81 e8 00 00 restore "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007fb8: da 04 00 00 ld [ %l0 ], %o5 2007fbc: 90 10 00 19 mov %i1, %o0 2007fc0: 92 10 20 00 clr %o1 2007fc4: 94 10 00 1a mov %i2, %o2 2007fc8: 96 10 00 10 mov %l0, %o3 2007fcc: 9f c4 80 00 call %l2 2007fd0: 98 10 00 16 mov %l6, %o4 2007fd4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2007fd8: 80 a0 40 11 cmp %g1, %l1 2007fdc: 18 bf ff ee bgu 2007f94 <_Heap_Walk+0x324> 2007fe0: 90 10 00 19 mov %i1, %o0 2007fe4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2007fe8: 80 a0 40 11 cmp %g1, %l1 2007fec: 0a bf ff ea bcs 2007f94 <_Heap_Walk+0x324> 2007ff0: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 2007ff4: 90 10 00 16 mov %l6, %o0 2007ff8: 7f ff e6 b3 call 2001ac4 <.urem> 2007ffc: 92 10 00 1d mov %i5, %o1 2008000: 80 a2 20 00 cmp %o0, 0 2008004: 12 80 00 5d bne 2008178 <_Heap_Walk+0x508> 2008008: 80 a4 c0 16 cmp %l3, %l6 ); return false; } if ( block_size < min_block_size ) { 200800c: 18 80 00 65 bgu 20081a0 <_Heap_Walk+0x530> 2008010: 80 a4 00 11 cmp %l0, %l1 ); return false; } if ( next_block_begin <= block_begin ) { 2008014: 3a 80 00 6e bcc,a 20081cc <_Heap_Walk+0x55c> 2008018: 90 10 00 19 mov %i1, %o0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200801c: c2 04 60 04 ld [ %l1 + 4 ], %g1 2008020: 80 88 60 01 btst 1, %g1 2008024: 12 80 00 40 bne 2008124 <_Heap_Walk+0x4b4> 2008028: 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; 200802c: 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)( 2008030: 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; 2008034: 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; 2008038: 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; 200803c: 1b 00 80 71 sethi %hi(0x201c400), %o5 2008040: 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; 2008044: 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); 2008048: 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; 200804c: 02 80 00 07 be 2008068 <_Heap_Walk+0x3f8> 2008050: 9a 13 60 08 or %o5, 8, %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)" : ""), 2008054: 1b 00 80 71 sethi %hi(0x201c400), %o5 2008058: 80 a3 00 18 cmp %o4, %i0 200805c: 02 80 00 03 be 2008068 <_Heap_Walk+0x3f8> 2008060: 9a 13 60 18 or %o5, 0x18, %o5 2008064: 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)( 2008068: c2 04 20 08 ld [ %l0 + 8 ], %g1 200806c: 05 00 80 71 sethi %hi(0x201c400), %g2 2008070: 80 a0 c0 01 cmp %g3, %g1 2008074: 02 80 00 07 be 2008090 <_Heap_Walk+0x420> 2008078: 84 10 a0 28 or %g2, 0x28, %g2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 200807c: 05 00 80 71 sethi %hi(0x201c400), %g2 2008080: 80 a0 40 18 cmp %g1, %i0 2008084: 02 80 00 03 be 2008090 <_Heap_Walk+0x420> 2008088: 84 10 a0 38 or %g2, 0x38, %g2 200808c: 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)( 2008090: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2008094: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2008098: 90 10 00 19 mov %i1, %o0 200809c: 92 10 20 00 clr %o1 20080a0: 15 00 80 71 sethi %hi(0x201c400), %o2 20080a4: 96 10 00 10 mov %l0, %o3 20080a8: 9f c4 80 00 call %l2 20080ac: 94 12 a0 48 or %o2, 0x48, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 20080b0: da 05 c0 00 ld [ %l7 ], %o5 20080b4: 80 a5 80 0d cmp %l6, %o5 20080b8: 02 80 00 0c be 20080e8 <_Heap_Walk+0x478> 20080bc: 90 10 00 19 mov %i1, %o0 (*printer)( 20080c0: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 20080c4: 96 10 00 10 mov %l0, %o3 20080c8: 98 10 00 16 mov %l6, %o4 20080cc: 92 10 20 01 mov 1, %o1 20080d0: 15 00 80 71 sethi %hi(0x201c400), %o2 20080d4: b0 10 20 00 clr %i0 20080d8: 9f c4 80 00 call %l2 20080dc: 94 12 a0 78 or %o2, 0x78, %o2 20080e0: 81 c7 e0 08 ret 20080e4: 81 e8 00 00 restore ); return false; } if ( !prev_used ) { 20080e8: 80 8d 20 01 btst 1, %l4 20080ec: 02 80 00 1c be 200815c <_Heap_Walk+0x4ec> 20080f0: 96 10 00 10 mov %l0, %o3 20080f4: 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 ) { 20080f8: 80 a0 40 18 cmp %g1, %i0 20080fc: 12 80 00 07 bne 2008118 <_Heap_Walk+0x4a8> 2008100: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008104: 10 80 00 0f b 2008140 <_Heap_Walk+0x4d0> <== NOT EXECUTED 2008108: 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 ) { 200810c: 80 a0 40 18 cmp %g1, %i0 2008110: 02 80 00 0a be 2008138 <_Heap_Walk+0x4c8> 2008114: 80 a0 40 10 cmp %g1, %l0 if ( free_block == block ) { 2008118: 32 bf ff fd bne,a 200810c <_Heap_Walk+0x49c> 200811c: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 2008120: 80 a5 40 11 cmp %l5, %l1 2008124: 02 bf fe e3 be 2007cb0 <_Heap_Walk+0x40> 2008128: 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 ) { 200812c: ec 04 60 04 ld [ %l1 + 4 ], %l6 2008130: 10 bf ff 8a b 2007f58 <_Heap_Walk+0x2e8> 2008134: ae 0d a0 01 and %l6, 1, %l7 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008138: 90 10 00 19 mov %i1, %o0 200813c: 96 10 00 10 mov %l0, %o3 2008140: 92 10 20 01 mov 1, %o1 2008144: 15 00 80 71 sethi %hi(0x201c400), %o2 2008148: b0 10 20 00 clr %i0 200814c: 9f c4 80 00 call %l2 2008150: 94 12 a0 e8 or %o2, 0xe8, %o2 2008154: 81 c7 e0 08 ret 2008158: 81 e8 00 00 restore return false; } if ( !prev_used ) { (*printer)( 200815c: 92 10 20 01 mov 1, %o1 2008160: 15 00 80 71 sethi %hi(0x201c400), %o2 2008164: b0 10 20 00 clr %i0 2008168: 9f c4 80 00 call %l2 200816c: 94 12 a0 b8 or %o2, 0xb8, %o2 2008170: 81 c7 e0 08 ret 2008174: 81 e8 00 00 restore return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 2008178: 90 10 00 19 mov %i1, %o0 200817c: 96 10 00 10 mov %l0, %o3 2008180: 98 10 00 16 mov %l6, %o4 2008184: 92 10 20 01 mov 1, %o1 2008188: 15 00 80 70 sethi %hi(0x201c000), %o2 200818c: b0 10 20 00 clr %i0 2008190: 9f c4 80 00 call %l2 2008194: 94 12 a3 70 or %o2, 0x370, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 2008198: 81 c7 e0 08 ret 200819c: 81 e8 00 00 restore } if ( block_size < min_block_size ) { (*printer)( 20081a0: 90 10 00 19 mov %i1, %o0 20081a4: 96 10 00 10 mov %l0, %o3 20081a8: 98 10 00 16 mov %l6, %o4 20081ac: 9a 10 00 13 mov %l3, %o5 20081b0: 92 10 20 01 mov 1, %o1 20081b4: 15 00 80 70 sethi %hi(0x201c000), %o2 20081b8: b0 10 20 00 clr %i0 20081bc: 9f c4 80 00 call %l2 20081c0: 94 12 a3 a0 or %o2, 0x3a0, %o2 block, block_size, min_block_size ); return false; 20081c4: 81 c7 e0 08 ret 20081c8: 81 e8 00 00 restore } if ( next_block_begin <= block_begin ) { (*printer)( 20081cc: 96 10 00 10 mov %l0, %o3 20081d0: 98 10 00 11 mov %l1, %o4 20081d4: 92 10 20 01 mov 1, %o1 20081d8: 15 00 80 70 sethi %hi(0x201c000), %o2 20081dc: b0 10 20 00 clr %i0 20081e0: 9f c4 80 00 call %l2 20081e4: 94 12 a3 d0 or %o2, 0x3d0, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 20081e8: 81 c7 e0 08 ret 20081ec: 81 e8 00 00 restore return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 20081f0: 92 10 20 01 mov 1, %o1 20081f4: 15 00 80 70 sethi %hi(0x201c000), %o2 20081f8: b0 10 20 00 clr %i0 20081fc: 9f c4 80 00 call %l2 2008200: 94 12 a2 40 or %o2, 0x240, %o2 2008204: 81 c7 e0 08 ret 2008208: 81 e8 00 00 restore } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 200820c: 96 10 00 11 mov %l1, %o3 2008210: 92 10 20 01 mov 1, %o1 2008214: 15 00 80 70 sethi %hi(0x201c000), %o2 2008218: b0 10 20 00 clr %i0 200821c: 9f c4 80 00 call %l2 2008220: 94 12 a2 78 or %o2, 0x278, %o2 2008224: 81 c7 e0 08 ret 2008228: 81 e8 00 00 restore return false; } if ( free_block->prev != prev_block ) { (*printer)( 200822c: 90 10 00 19 mov %i1, %o0 2008230: 96 10 00 11 mov %l1, %o3 2008234: 92 10 20 01 mov 1, %o1 2008238: 15 00 80 70 sethi %hi(0x201c000), %o2 200823c: b0 10 20 00 clr %i0 2008240: 9f c4 80 00 call %l2 2008244: 94 12 a2 c8 or %o2, 0x2c8, %o2 2008248: 81 c7 e0 08 ret 200824c: 81 e8 00 00 restore return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 2008250: 96 10 00 11 mov %l1, %o3 2008254: 92 10 20 01 mov 1, %o1 2008258: 15 00 80 70 sethi %hi(0x201c000), %o2 200825c: b0 10 20 00 clr %i0 2008260: 9f c4 80 00 call %l2 2008264: 94 12 a2 a8 or %o2, 0x2a8, %o2 2008268: 81 c7 e0 08 ret 200826c: 81 e8 00 00 restore 02006fac <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2006fac: 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 ) 2006fb0: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 2006fb4: 80 a5 20 00 cmp %l4, 0 2006fb8: 02 80 00 ab be 2007264 <_Objects_Extend_information+0x2b8> 2006fbc: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006fc0: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2006fc4: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2 2006fc8: ab 2d 60 10 sll %l5, 0x10, %l5 2006fcc: 92 10 00 12 mov %l2, %o1 2006fd0: 40 00 47 8a call 2018df8 <.udiv> 2006fd4: 91 35 60 10 srl %l5, 0x10, %o0 2006fd8: 91 2a 20 10 sll %o0, 0x10, %o0 2006fdc: b9 32 20 10 srl %o0, 0x10, %i4 for ( ; block < block_count; block++ ) { 2006fe0: 80 a7 20 00 cmp %i4, 0 2006fe4: 02 80 00 a7 be 2007280 <_Objects_Extend_information+0x2d4> 2006fe8: 90 10 00 12 mov %l2, %o0 if ( information->object_blocks[ block ] == NULL ) 2006fec: c2 05 00 00 ld [ %l4 ], %g1 2006ff0: 80 a0 60 00 cmp %g1, 0 2006ff4: 02 80 00 a4 be 2007284 <_Objects_Extend_information+0x2d8> 2006ff8: a2 10 00 13 mov %l3, %l1 2006ffc: 10 80 00 06 b 2007014 <_Objects_Extend_information+0x68> 2007000: a0 10 20 00 clr %l0 2007004: c2 05 00 01 ld [ %l4 + %g1 ], %g1 2007008: 80 a0 60 00 cmp %g1, 0 200700c: 22 80 00 08 be,a 200702c <_Objects_Extend_information+0x80> 2007010: 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++ ) { 2007014: a0 04 20 01 inc %l0 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 2007018: 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++ ) { 200701c: 80 a7 00 10 cmp %i4, %l0 2007020: 18 bf ff f9 bgu 2007004 <_Objects_Extend_information+0x58> 2007024: 83 2c 20 02 sll %l0, 2, %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2007028: 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 ) { 200702c: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2007030: 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 ) { 2007034: 82 10 63 ff or %g1, 0x3ff, %g1 2007038: 80 a5 40 01 cmp %l5, %g1 200703c: 18 80 00 96 bgu 2007294 <_Objects_Extend_information+0x2e8> 2007040: 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; 2007044: 40 00 47 33 call 2018d10 <.umul> 2007048: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 200704c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2007050: 80 a0 60 00 cmp %g1, 0 2007054: 12 80 00 6d bne 2007208 <_Objects_Extend_information+0x25c> 2007058: 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 ); 200705c: 40 00 08 fd call 2009450 <_Workspace_Allocate_or_fatal_error> 2007060: 01 00 00 00 nop 2007064: 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 ) { 2007068: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200706c: 80 a4 40 01 cmp %l1, %g1 2007070: 2a 80 00 43 bcs,a 200717c <_Objects_Extend_information+0x1d0> 2007074: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 2007078: 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 ); 200707c: 91 2d 20 01 sll %l4, 1, %o0 2007080: 90 02 00 14 add %o0, %l4, %o0 2007084: 90 05 40 08 add %l5, %o0, %o0 2007088: 90 02 00 13 add %o0, %l3, %o0 200708c: 40 00 09 00 call 200948c <_Workspace_Allocate> 2007090: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 2007094: ac 92 20 00 orcc %o0, 0, %l6 2007098: 02 80 00 7d be 200728c <_Objects_Extend_information+0x2e0> 200709c: 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 ) { 20070a0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20070a4: 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); 20070a8: ae 05 80 14 add %l6, %l4, %l7 20070ac: 0a 80 00 5e bcs 2007224 <_Objects_Extend_information+0x278> 20070b0: 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++ ) { 20070b4: 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, 20070b8: 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++ ) { 20070bc: 02 80 00 08 be 20070dc <_Objects_Extend_information+0x130> 20070c0: bb 2f 20 02 sll %i4, 2, %i5 local_table[ index ] = NULL; 20070c4: 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++ ) { 20070c8: 82 00 60 01 inc %g1 20070cc: 80 a4 c0 01 cmp %l3, %g1 20070d0: 18 bf ff fd bgu 20070c4 <_Objects_Extend_information+0x118> 20070d4: c0 20 80 14 clr [ %g2 + %l4 ] 20070d8: 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 ); 20070dc: 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; 20070e0: c0 25 c0 1d clr [ %l7 + %i5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 20070e4: 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 ; 20070e8: 80 a4 40 03 cmp %l1, %g3 20070ec: 1a 80 00 0a bcc 2007114 <_Objects_Extend_information+0x168> 20070f0: c0 25 80 1d clr [ %l6 + %i5 ] 20070f4: 85 2c 60 02 sll %l1, 2, %g2 20070f8: 82 10 00 11 mov %l1, %g1 20070fc: 84 05 00 02 add %l4, %g2, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 2007100: 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++ ) { 2007104: 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 ; 2007108: 80 a0 40 03 cmp %g1, %g3 200710c: 0a bf ff fd bcs 2007100 <_Objects_Extend_information+0x154> 2007110: 84 00 a0 04 add %g2, 4, %g2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2007114: 7f ff eb 17 call 2001d70 2007118: 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( 200711c: c6 06 00 00 ld [ %i0 ], %g3 2007120: 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; 2007124: ea 36 20 10 sth %l5, [ %i0 + 0x10 ] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2007128: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 200712c: ee 26 20 30 st %l7, [ %i0 + 0x30 ] information->local_table = local_table; 2007130: e8 26 20 1c st %l4, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2007134: 87 28 e0 18 sll %g3, 0x18, %g3 2007138: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 200713c: 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( 2007140: ab 2d 60 10 sll %l5, 0x10, %l5 2007144: 03 00 00 40 sethi %hi(0x10000), %g1 2007148: ab 35 60 10 srl %l5, 0x10, %l5 200714c: 82 10 c0 01 or %g3, %g1, %g1 2007150: 82 10 40 02 or %g1, %g2, %g1 2007154: 82 10 40 15 or %g1, %l5, %g1 2007158: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 200715c: 7f ff eb 09 call 2001d80 2007160: 01 00 00 00 nop if ( old_tables ) 2007164: 80 a4 e0 00 cmp %l3, 0 2007168: 22 80 00 05 be,a 200717c <_Objects_Extend_information+0x1d0> 200716c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 2007170: 40 00 08 d0 call 20094b0 <_Workspace_Free> 2007174: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2007178: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 200717c: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2007180: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2007184: 92 10 00 12 mov %l2, %o1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2007188: a1 2c 20 02 sll %l0, 2, %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 200718c: 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; 2007190: 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( 2007194: 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( 2007198: a4 07 bf f4 add %fp, -12, %l2 200719c: 40 00 14 8c call 200c3cc <_Chain_Initialize> 20071a0: 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 ) { 20071a4: 30 80 00 0c b,a 20071d4 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( 20071a8: c4 16 20 04 lduh [ %i0 + 4 ], %g2 20071ac: 83 28 60 18 sll %g1, 0x18, %g1 20071b0: 85 28 a0 1b sll %g2, 0x1b, %g2 20071b4: 82 10 40 14 or %g1, %l4, %g1 20071b8: 82 10 40 02 or %g1, %g2, %g1 20071bc: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20071c0: 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( 20071c4: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 20071c8: a2 04 60 01 inc %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20071cc: 7f ff fc e2 call 2006554 <_Chain_Append> 20071d0: 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 ) { 20071d4: 40 00 14 6b call 200c380 <_Chain_Get> 20071d8: 90 10 00 12 mov %l2, %o0 20071dc: 80 a2 20 00 cmp %o0, 0 20071e0: 32 bf ff f2 bne,a 20071a8 <_Objects_Extend_information+0x1fc> 20071e4: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 20071e8: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20071ec: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 20071f0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 20071f4: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20071f8: c8 20 80 10 st %g4, [ %g2 + %l0 ] information->inactive = 20071fc: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2007200: 81 c7 e0 08 ret 2007204: 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 ); 2007208: 40 00 08 a1 call 200948c <_Workspace_Allocate> 200720c: 01 00 00 00 nop if ( !new_object_block ) 2007210: a4 92 20 00 orcc %o0, 0, %l2 2007214: 32 bf ff 96 bne,a 200706c <_Objects_Extend_information+0xc0> 2007218: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200721c: 81 c7 e0 08 ret 2007220: 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, 2007224: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 2007228: 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, 200722c: 40 00 24 06 call 2010244 2007230: 94 10 00 1d mov %i5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2007234: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2007238: 94 10 00 1d mov %i5, %o2 200723c: 40 00 24 02 call 2010244 2007240: 90 10 00 17 mov %l7, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2007244: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 2007248: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 200724c: 94 04 c0 0a add %l3, %o2, %o2 2007250: 90 10 00 14 mov %l4, %o0 2007254: 40 00 23 fc call 2010244 2007258: 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 ); 200725c: 10 bf ff a1 b 20070e0 <_Objects_Extend_information+0x134> 2007260: 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 ) 2007264: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2007268: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 200726c: ab 2d 60 10 sll %l5, 0x10, %l5 2007270: a2 10 00 13 mov %l3, %l1 2007274: a0 10 20 00 clr %l0 2007278: 10 bf ff 6c b 2007028 <_Objects_Extend_information+0x7c> 200727c: 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 ) 2007280: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED 2007284: 10 bf ff 69 b 2007028 <_Objects_Extend_information+0x7c> <== NOT EXECUTED 2007288: 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 ); 200728c: 40 00 08 89 call 20094b0 <_Workspace_Free> 2007290: 90 10 00 12 mov %l2, %o0 return; 2007294: 81 c7 e0 08 ret 2007298: 81 e8 00 00 restore 020076b4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 20076b4: 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 ); 20076b8: e0 16 20 0a lduh [ %i0 + 0xa ], %l0 block_count = (information->maximum - index_base) / 20076bc: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 20076c0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 20076c4: 92 10 00 11 mov %l1, %o1 20076c8: 40 00 45 cc call 2018df8 <.udiv> 20076cc: 90 22 00 10 sub %o0, %l0, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 20076d0: 80 a2 20 00 cmp %o0, 0 20076d4: 02 80 00 12 be 200771c <_Objects_Shrink_information+0x68> 20076d8: a4 10 20 04 mov 4, %l2 if ( information->inactive_per_block[ block ] == 20076dc: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 20076e0: c4 00 c0 00 ld [ %g3 ], %g2 20076e4: 80 a4 40 02 cmp %l1, %g2 20076e8: 12 80 00 09 bne 200770c <_Objects_Shrink_information+0x58> 20076ec: 82 10 20 00 clr %g1 20076f0: 10 80 00 0d b 2007724 <_Objects_Shrink_information+0x70> <== NOT EXECUTED 20076f4: a4 10 20 00 clr %l2 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 20076f8: 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 ] == 20076fc: 80 a4 40 02 cmp %l1, %g2 2007700: 02 80 00 09 be 2007724 <_Objects_Shrink_information+0x70> 2007704: 84 04 a0 04 add %l2, 4, %g2 2007708: 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++ ) { 200770c: 82 00 60 01 inc %g1 2007710: 80 a2 00 01 cmp %o0, %g1 2007714: 38 bf ff f9 bgu,a 20076f8 <_Objects_Shrink_information+0x44> 2007718: c4 00 c0 12 ld [ %g3 + %l2 ], %g2 200771c: 81 c7 e0 08 ret 2007720: 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; 2007724: 10 80 00 06 b 200773c <_Objects_Shrink_information+0x88> 2007728: 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 ); 200772c: 80 a4 60 00 cmp %l1, 0 2007730: 22 80 00 12 be,a 2007778 <_Objects_Shrink_information+0xc4> 2007734: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2007738: 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 ); 200773c: 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) && 2007740: 80 a0 40 10 cmp %g1, %l0 2007744: 0a bf ff fa bcs 200772c <_Objects_Shrink_information+0x78> 2007748: e2 02 00 00 ld [ %o0 ], %l1 (index < (index_base + information->allocation_size))) { 200774c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2007750: 84 04 00 02 add %l0, %g2, %g2 2007754: 80 a0 40 02 cmp %g1, %g2 2007758: 1a bf ff f6 bcc 2007730 <_Objects_Shrink_information+0x7c> 200775c: 80 a4 60 00 cmp %l1, 0 _Chain_Extract( &extract_me->Node ); 2007760: 40 00 12 fe call 200c358 <_Chain_Extract> 2007764: 01 00 00 00 nop } } while ( the_object ); 2007768: 80 a4 60 00 cmp %l1, 0 200776c: 12 bf ff f4 bne 200773c <_Objects_Shrink_information+0x88> 2007770: 90 10 00 11 mov %l1, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2007774: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2007778: 40 00 07 4e call 20094b0 <_Workspace_Free> 200777c: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2007780: 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; 2007784: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; 2007788: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 information->inactive -= information->allocation_size; 200778c: 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; 2007790: c0 21 00 12 clr [ %g4 + %l2 ] information->inactive -= information->allocation_size; 2007794: 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; 2007798: c0 20 40 12 clr [ %g1 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 200779c: c4 36 20 2c sth %g2, [ %i0 + 0x2c ] return; 20077a0: 81 c7 e0 08 ret 20077a4: 81 e8 00 00 restore 0200bb7c <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200bb7c: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200bb80: c6 00 a0 88 ld [ %g2 + 0x88 ], %g3 200bb84: 05 00 80 6e sethi %hi(0x201b800), %g2 200bb88: d2 08 a3 54 ldub [ %g2 + 0x354 ], %o1 ! 201bb54 */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200bb8c: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200bb90: 92 22 40 03 sub %o1, %g3, %o1 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 200bb94: 86 10 3f ff mov -1, %g3 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 200bb98: d2 22 20 18 st %o1, [ %o0 + 0x18 ] */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200bb9c: 80 a0 a0 00 cmp %g2, 0 200bba0: 12 80 00 06 bne 200bbb8 <_POSIX_Threads_Sporadic_budget_callout+0x3c> 200bba4: c6 22 20 78 st %g3, [ %o0 + 0x78 ] /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 200bba8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200bbac: 80 a0 40 09 cmp %g1, %o1 200bbb0: 0a 80 00 04 bcs 200bbc0 <_POSIX_Threads_Sporadic_budget_callout+0x44> 200bbb4: 94 10 20 01 mov 1, %o2 200bbb8: 81 c3 e0 08 retl <== NOT EXECUTED 200bbbc: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( the_thread, new_priority, true ); 200bbc0: 82 13 c0 00 mov %o7, %g1 200bbc4: 7f ff ef 12 call 200780c <_Thread_Change_priority> 200bbc8: 9e 10 40 00 mov %g1, %o7 200bbcc: 01 00 00 00 nop 02005d24 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 2005d24: 9d e3 bf a0 save %sp, -96, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2005d28: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2005d2c: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2005d30: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2005d34: 80 a0 60 00 cmp %g1, 0 2005d38: 12 80 00 0e bne 2005d70 <_POSIX_Timer_TSR+0x4c> 2005d3c: c4 26 60 68 st %g2, [ %i1 + 0x68 ] ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 2005d40: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 2005d44: 80 a0 60 00 cmp %g1, 0 2005d48: 32 80 00 0b bne,a 2005d74 <_POSIX_Timer_TSR+0x50> 2005d4c: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2005d50: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 2005d54: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 2005d58: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2005d5c: 40 00 1a 1b call 200c5c8 2005d60: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 2005d64: c0 26 60 68 clr [ %i1 + 0x68 ] 2005d68: 81 c7 e0 08 ret 2005d6c: 81 e8 00 00 restore ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 2005d70: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2005d74: d4 06 60 08 ld [ %i1 + 8 ], %o2 2005d78: 90 06 60 10 add %i1, 0x10, %o0 2005d7c: 17 00 80 17 sethi %hi(0x2005c00), %o3 2005d80: 98 10 00 19 mov %i1, %o4 2005d84: 40 00 1b 3f call 200ca80 <_POSIX_Timer_Insert_helper> 2005d88: 96 12 e1 24 or %o3, 0x124, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2005d8c: 80 8a 20 ff btst 0xff, %o0 2005d90: 02 bf ff f6 be 2005d68 <_POSIX_Timer_TSR+0x44> 2005d94: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 2005d98: 40 00 05 da call 2007500 <_TOD_Get> 2005d9c: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2005da0: 82 10 20 03 mov 3, %g1 /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2005da4: 10 bf ff ed b 2005d58 <_POSIX_Timer_TSR+0x34> 2005da8: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 0200f578 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200f578: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200f57c: 7f ff c9 fd call 2001d70 200f580: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200f584: 85 2e 20 04 sll %i0, 4, %g2 200f588: 83 2e 20 02 sll %i0, 2, %g1 200f58c: 82 20 80 01 sub %g2, %g1, %g1 200f590: 05 00 80 72 sethi %hi(0x201c800), %g2 200f594: 84 10 a3 34 or %g2, 0x334, %g2 ! 201cb34 <_POSIX_signals_Vectors> 200f598: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200f59c: 80 a0 a0 02 cmp %g2, 2 200f5a0: 02 80 00 11 be 200f5e4 <_POSIX_signals_Clear_process_signals+0x6c> 200f5a4: 05 00 80 73 sethi %hi(0x201cc00), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 200f5a8: 05 00 80 73 sethi %hi(0x201cc00), %g2 200f5ac: c6 00 a1 00 ld [ %g2 + 0x100 ], %g3 ! 201cd00 <_POSIX_signals_Pending> 200f5b0: b0 06 3f ff add %i0, -1, %i0 200f5b4: 82 10 20 01 mov 1, %g1 200f5b8: 83 28 40 18 sll %g1, %i0, %g1 200f5bc: 82 28 c0 01 andn %g3, %g1, %g1 if ( !_POSIX_signals_Pending ) 200f5c0: 80 a0 60 00 cmp %g1, 0 200f5c4: 12 80 00 06 bne 200f5dc <_POSIX_signals_Clear_process_signals+0x64> 200f5c8: c2 20 a1 00 st %g1, [ %g2 + 0x100 ] _Thread_Do_post_task_switch_extension--; 200f5cc: 03 00 80 71 sethi %hi(0x201c400), %g1 200f5d0: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 201c644 <_Thread_Do_post_task_switch_extension> 200f5d4: 84 00 bf ff add %g2, -1, %g2 200f5d8: c4 20 62 44 st %g2, [ %g1 + 0x244 ] } _ISR_Enable( level ); 200f5dc: 7f ff c9 e9 call 2001d80 200f5e0: 91 e8 00 08 restore %g0, %o0, %o0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200f5e4: 84 10 a1 04 or %g2, 0x104, %g2 200f5e8: c6 00 40 02 ld [ %g1 + %g2 ], %g3 200f5ec: 82 00 40 02 add %g1, %g2, %g1 200f5f0: 82 00 60 04 add %g1, 4, %g1 200f5f4: 80 a0 c0 01 cmp %g3, %g1 200f5f8: 02 bf ff ed be 200f5ac <_POSIX_signals_Clear_process_signals+0x34> 200f5fc: 05 00 80 73 sethi %hi(0x201cc00), %g2 if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 200f600: 7f ff c9 e0 call 2001d80 <== NOT EXECUTED 200f604: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200f608: 01 00 00 00 nop 0200f64c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 200f64c: 9d e3 bf a0 save %sp, -96, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 200f650: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200f654: 05 04 00 20 sethi %hi(0x10008000), %g2 200f658: 88 06 7f ff add %i1, -1, %g4 200f65c: 9a 08 40 02 and %g1, %g2, %o5 200f660: 86 10 20 01 mov 1, %g3 200f664: 80 a3 40 02 cmp %o5, %g2 200f668: 89 28 c0 04 sll %g3, %g4, %g4 200f66c: 02 80 00 25 be 200f700 <_POSIX_signals_Unblock_thread+0xb4> 200f670: c4 06 21 6c ld [ %i0 + 0x16c ], %g2 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 200f674: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 200f678: 80 a9 00 02 andncc %g4, %g2, %g0 200f67c: 02 80 00 1f be 200f6f8 <_POSIX_signals_Unblock_thread+0xac> 200f680: 05 04 00 00 sethi %hi(0x10000000), %g2 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 200f684: 80 88 40 02 btst %g1, %g2 200f688: 02 80 00 11 be 200f6cc <_POSIX_signals_Unblock_thread+0x80> 200f68c: c6 2e 20 74 stb %g3, [ %i0 + 0x74 ] the_thread->Wait.return_code = EINTR; 200f690: 84 10 20 04 mov 4, %g2 #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 200f694: 80 88 60 08 btst 8, %g1 200f698: 02 80 00 18 be 200f6f8 <_POSIX_signals_Unblock_thread+0xac> 200f69c: c4 26 20 34 st %g2, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200f6a0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200f6a4: 80 a0 60 02 cmp %g1, 2 200f6a8: 02 80 00 36 be 200f780 <_POSIX_signals_Unblock_thread+0x134> 200f6ac: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 200f6b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200f6b4: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200f6b8: b0 10 20 00 clr %i0 200f6bc: 7f ff e0 d8 call 2007a1c <_Thread_Clear_state> 200f6c0: 92 12 63 f8 or %o1, 0x3f8, %o1 200f6c4: 81 c7 e0 08 ret 200f6c8: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 200f6cc: 80 a0 60 00 cmp %g1, 0 200f6d0: 12 80 00 0a bne 200f6f8 <_POSIX_signals_Unblock_thread+0xac> 200f6d4: 03 00 80 71 sethi %hi(0x201c400), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 200f6d8: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 201c63c <_ISR_Nest_level> 200f6dc: 80 a0 60 00 cmp %g1, 0 200f6e0: 02 80 00 06 be 200f6f8 <_POSIX_signals_Unblock_thread+0xac> 200f6e4: 03 00 80 71 sethi %hi(0x201c400), %g1 200f6e8: c2 00 62 60 ld [ %g1 + 0x260 ], %g1 ! 201c660 <_Thread_Executing> 200f6ec: 80 a6 00 01 cmp %i0, %g1 200f6f0: 02 80 00 21 be 200f774 <_POSIX_signals_Unblock_thread+0x128> 200f6f4: 03 00 80 71 sethi %hi(0x201c400), %g1 _ISR_Signals_to_thread_executing = true; } } return false; } 200f6f8: 81 c7 e0 08 ret 200f6fc: 91 e8 20 00 restore %g0, 0, %o0 * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 200f700: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200f704: 80 89 00 01 btst %g4, %g1 200f708: 22 80 00 12 be,a 200f750 <_POSIX_signals_Unblock_thread+0x104> 200f70c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 the_thread->Wait.return_code = EINTR; 200f710: 82 10 20 04 mov 4, %g1 200f714: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 200f718: 80 a6 a0 00 cmp %i2, 0 200f71c: 02 80 00 11 be 200f760 <_POSIX_signals_Unblock_thread+0x114> 200f720: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 200f724: c4 06 80 00 ld [ %i2 ], %g2 200f728: c4 20 40 00 st %g2, [ %g1 ] 200f72c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 200f730: c4 20 60 04 st %g2, [ %g1 + 4 ] 200f734: c4 06 a0 08 ld [ %i2 + 8 ], %g2 200f738: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 200f73c: 90 10 00 18 mov %i0, %o0 200f740: 7f ff e3 e6 call 20086d8 <_Thread_queue_Extract_with_proxy> 200f744: b0 10 20 01 mov 1, %i0 return true; 200f748: 81 c7 e0 08 ret 200f74c: 81 e8 00 00 restore * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 200f750: 80 a9 00 01 andncc %g4, %g1, %g0 200f754: 12 bf ff f0 bne 200f714 <_POSIX_signals_Unblock_thread+0xc8> 200f758: 82 10 20 04 mov 4, %g1 200f75c: 30 bf ff e7 b,a 200f6f8 <_POSIX_signals_Unblock_thread+0xac> the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 200f760: 84 10 20 01 mov 1, %g2 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 200f764: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 200f768: c0 20 60 08 clr [ %g1 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 200f76c: 10 bf ff f4 b 200f73c <_POSIX_signals_Unblock_thread+0xf0> 200f770: c4 20 60 04 st %g2, [ %g1 + 4 ] (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 200f774: c6 28 62 f8 stb %g3, [ %g1 + 0x2f8 ] 200f778: 81 c7 e0 08 ret 200f77c: 91 e8 20 00 restore %g0, 0, %o0 _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 200f780: 7f ff e6 d4 call 20092d0 <_Watchdog_Remove> 200f784: 90 06 20 48 add %i0, 0x48, %o0 200f788: 10 bf ff cb b 200f6b4 <_POSIX_signals_Unblock_thread+0x68> 200f78c: 90 10 00 18 mov %i0, %o0 0200780c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 200780c: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 2007810: 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 ); 2007814: 40 00 04 88 call 2008a34 <_Thread_Set_transient> 2007818: 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 ) 200781c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2007820: 80 a0 40 19 cmp %g1, %i1 2007824: 02 80 00 05 be 2007838 <_Thread_Change_priority+0x2c> 2007828: a0 10 00 18 mov %i0, %l0 _Thread_Set_priority( the_thread, new_priority ); 200782c: 92 10 00 19 mov %i1, %o1 2007830: 40 00 04 05 call 2008844 <_Thread_Set_priority> 2007834: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 2007838: 7f ff e9 4e call 2001d70 200783c: 01 00 00 00 nop 2007840: 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; 2007844: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 2007848: 80 a4 a0 04 cmp %l2, 4 200784c: 02 80 00 18 be 20078ac <_Thread_Change_priority+0xa0> 2007850: 80 8c 60 04 btst 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2007854: 02 80 00 0b be 2007880 <_Thread_Change_priority+0x74> 2007858: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 200785c: 7f ff e9 49 call 2001d80 <== NOT EXECUTED 2007860: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007864: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 2007868: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED 200786c: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED 2007870: 32 80 00 0d bne,a 20078a4 <_Thread_Change_priority+0x98> <== NOT EXECUTED 2007874: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED 2007878: 81 c7 e0 08 ret 200787c: 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 ); 2007880: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 2007884: 7f ff e9 3f call 2001d80 2007888: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 200788c: 03 00 00 ef sethi %hi(0x3bc00), %g1 2007890: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2007894: 80 8c 80 01 btst %l2, %g1 2007898: 02 bf ff f8 be 2007878 <_Thread_Change_priority+0x6c> 200789c: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 20078a0: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 20078a4: 40 00 03 b8 call 2008784 <_Thread_queue_Requeue> 20078a8: 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 ) ) { 20078ac: 12 80 00 14 bne 20078fc <_Thread_Change_priority+0xf0> 20078b0: 23 00 80 71 sethi %hi(0x201c400), %l1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 20078b4: c2 04 20 90 ld [ %l0 + 0x90 ], %g1 20078b8: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2 20078bc: 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 ); 20078c0: c0 24 20 10 clr [ %l0 + 0x10 ] 20078c4: 84 10 c0 02 or %g3, %g2, %g2 20078c8: c4 30 40 00 sth %g2, [ %g1 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 20078cc: c4 14 62 54 lduh [ %l1 + 0x254 ], %g2 20078d0: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 20078d4: 80 8e a0 ff btst 0xff, %i2 20078d8: 82 10 80 01 or %g2, %g1, %g1 20078dc: c2 34 62 54 sth %g1, [ %l1 + 0x254 ] 20078e0: 02 80 00 48 be 2007a00 <_Thread_Change_priority+0x1f4> 20078e4: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 20078e8: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 20078ec: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 20078f0: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 20078f4: 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; 20078f8: 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 ); 20078fc: 7f ff e9 21 call 2001d80 2007900: 90 10 00 18 mov %i0, %o0 2007904: 7f ff e9 1b call 2001d70 2007908: 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 ); 200790c: c2 14 62 54 lduh [ %l1 + 0x254 ], %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 2007910: 05 00 80 71 sethi %hi(0x201c400), %g2 2007914: 83 28 60 10 sll %g1, 0x10, %g1 2007918: da 00 a0 f4 ld [ %g2 + 0xf4 ], %o5 200791c: 85 30 60 10 srl %g1, 0x10, %g2 2007920: 80 a0 a0 ff cmp %g2, 0xff 2007924: 08 80 00 27 bleu 20079c0 <_Thread_Change_priority+0x1b4> 2007928: 07 00 80 6b sethi %hi(0x201ac00), %g3 200792c: 83 30 60 18 srl %g1, 0x18, %g1 2007930: 86 10 e0 60 or %g3, 0x60, %g3 2007934: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007938: 09 00 80 71 sethi %hi(0x201c400), %g4 200793c: 85 28 a0 10 sll %g2, 0x10, %g2 2007940: 88 11 22 d0 or %g4, 0x2d0, %g4 2007944: 83 30 a0 0f srl %g2, 0xf, %g1 2007948: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 200794c: 83 28 60 10 sll %g1, 0x10, %g1 2007950: 89 30 60 10 srl %g1, 0x10, %g4 2007954: 80 a1 20 ff cmp %g4, 0xff 2007958: 18 80 00 28 bgu 20079f8 <_Thread_Change_priority+0x1ec> 200795c: 83 30 60 18 srl %g1, 0x18, %g1 2007960: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 2007964: 82 00 60 08 add %g1, 8, %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007968: 85 30 a0 0c srl %g2, 0xc, %g2 200796c: 83 28 60 10 sll %g1, 0x10, %g1 2007970: 83 30 60 10 srl %g1, 0x10, %g1 2007974: 82 00 40 02 add %g1, %g2, %g1 2007978: 85 28 60 04 sll %g1, 4, %g2 200797c: 83 28 60 02 sll %g1, 2, %g1 2007980: 82 20 80 01 sub %g2, %g1, %g1 2007984: 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 ); 2007988: 05 00 80 71 sethi %hi(0x201c400), %g2 200798c: c4 00 a2 60 ld [ %g2 + 0x260 ], %g2 ! 201c660 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007990: 07 00 80 71 sethi %hi(0x201c400), %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() && 2007994: 80 a0 40 02 cmp %g1, %g2 2007998: 02 80 00 08 be 20079b8 <_Thread_Change_priority+0x1ac> 200799c: c2 20 e2 30 st %g1, [ %g3 + 0x230 ] _Thread_Executing->is_preemptible ) 20079a0: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1 20079a4: 80 a0 60 00 cmp %g1, 0 20079a8: 02 80 00 04 be 20079b8 <_Thread_Change_priority+0x1ac> 20079ac: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 20079b0: 03 00 80 71 sethi %hi(0x201c400), %g1 20079b4: c4 28 62 70 stb %g2, [ %g1 + 0x270 ] ! 201c670 <_Context_Switch_necessary> _ISR_Enable( level ); 20079b8: 7f ff e8 f2 call 2001d80 20079bc: 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 ); 20079c0: 86 10 e0 60 or %g3, 0x60, %g3 20079c4: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 20079c8: 09 00 80 71 sethi %hi(0x201c400), %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 ); 20079cc: 84 00 a0 08 add %g2, 8, %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 20079d0: 88 11 22 d0 or %g4, 0x2d0, %g4 20079d4: 85 28 a0 10 sll %g2, 0x10, %g2 20079d8: 83 30 a0 0f srl %g2, 0xf, %g1 20079dc: c2 11 00 01 lduh [ %g4 + %g1 ], %g1 20079e0: 83 28 60 10 sll %g1, 0x10, %g1 20079e4: 89 30 60 10 srl %g1, 0x10, %g4 20079e8: 80 a1 20 ff cmp %g4, 0xff 20079ec: 28 bf ff de bleu,a 2007964 <_Thread_Change_priority+0x158> 20079f0: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1 20079f4: 83 30 60 18 srl %g1, 0x18, %g1 20079f8: 10 bf ff dc b 2007968 <_Thread_Change_priority+0x15c> 20079fc: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007a00: 84 00 60 04 add %g1, 4, %g2 2007a04: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 2007a08: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 2007a0c: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007a10: 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; 2007a14: 10 bf ff ba b 20078fc <_Thread_Change_priority+0xf0> 2007a18: e0 20 80 00 st %l0, [ %g2 ] 0200cee0 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200cee0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200cee4: 03 00 80 71 sethi %hi(0x201c400), %g1 200cee8: e0 00 62 60 ld [ %g1 + 0x260 ], %l0 ! 201c660 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200ceec: 7f ff d3 a1 call 2001d70 200cef0: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200cef4: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200cef8: c4 04 40 00 ld [ %l1 ], %g2 200cefc: c2 04 60 08 ld [ %l1 + 8 ], %g1 200cf00: 80 a0 80 01 cmp %g2, %g1 200cf04: 02 80 00 1f be 200cf80 <_Thread_Reset_timeslice+0xa0> 200cf08: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200cf0c: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 200cf10: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200cf14: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200cf18: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cf1c: 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; 200cf20: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200cf24: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200cf28: 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; 200cf2c: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200cf30: 7f ff d3 94 call 2001d80 200cf34: 01 00 00 00 nop 200cf38: 7f ff d3 8e call 2001d70 200cf3c: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200cf40: 03 00 80 71 sethi %hi(0x201c400), %g1 200cf44: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 201c630 <_Thread_Heir> 200cf48: 80 a4 00 02 cmp %l0, %g2 200cf4c: 02 80 00 06 be 200cf64 <_Thread_Reset_timeslice+0x84> 200cf50: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 200cf54: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED 200cf58: c4 28 62 70 stb %g2, [ %g1 + 0x270 ] ! 201c670 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 200cf5c: 7f ff d3 89 call 2001d80 <== NOT EXECUTED 200cf60: 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; 200cf64: c4 04 40 00 ld [ %l1 ], %g2 200cf68: c4 20 62 30 st %g2, [ %g1 + 0x230 ] _Context_Switch_necessary = true; 200cf6c: 84 10 20 01 mov 1, %g2 200cf70: 03 00 80 71 sethi %hi(0x201c400), %g1 200cf74: c4 28 62 70 stb %g2, [ %g1 + 0x270 ] ! 201c670 <_Context_Switch_necessary> _ISR_Enable( level ); 200cf78: 7f ff d3 82 call 2001d80 200cf7c: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 200cf80: 7f ff d3 80 call 2001d80 200cf84: 81 e8 00 00 restore 200cf88: 01 00 00 00 nop 02008cbc <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 2008cbc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 2008cc0: 03 00 80 71 sethi %hi(0x201c400), %g1 2008cc4: e0 00 62 60 ld [ %g1 + 0x260 ], %l0 ! 201c660 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 2008cc8: 7f ff e4 2a call 2001d70 2008ccc: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 2008cd0: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 2008cd4: c4 04 40 00 ld [ %l1 ], %g2 2008cd8: c2 04 60 08 ld [ %l1 + 8 ], %g1 2008cdc: 80 a0 80 01 cmp %g2, %g1 2008ce0: 02 80 00 19 be 2008d44 <_Thread_Yield_processor+0x88> 2008ce4: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2008ce8: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2008cec: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 2008cf0: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2008cf4: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2008cf8: 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; 2008cfc: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 2008d00: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2008d04: 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; 2008d08: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2008d0c: 7f ff e4 1d call 2001d80 2008d10: 01 00 00 00 nop 2008d14: 7f ff e4 17 call 2001d70 2008d18: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2008d1c: 03 00 80 71 sethi %hi(0x201c400), %g1 2008d20: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 201c630 <_Thread_Heir> 2008d24: 80 a4 00 02 cmp %l0, %g2 2008d28: 22 80 00 0e be,a 2008d60 <_Thread_Yield_processor+0xa4> 2008d2c: 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; 2008d30: 84 10 20 01 mov 1, %g2 2008d34: 03 00 80 71 sethi %hi(0x201c400), %g1 2008d38: c4 28 62 70 stb %g2, [ %g1 + 0x270 ] ! 201c670 <_Context_Switch_necessary> _ISR_Enable( level ); 2008d3c: 7f ff e4 11 call 2001d80 2008d40: 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 ) ) 2008d44: 03 00 80 71 sethi %hi(0x201c400), %g1 2008d48: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 201c630 <_Thread_Heir> 2008d4c: 80 a4 00 01 cmp %l0, %g1 2008d50: 32 bf ff f9 bne,a 2008d34 <_Thread_Yield_processor+0x78> 2008d54: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Context_Switch_necessary = true; _ISR_Enable( level ); 2008d58: 7f ff e4 0a call 2001d80 2008d5c: 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; 2008d60: 10 bf ff f4 b 2008d30 <_Thread_Yield_processor+0x74> 2008d64: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 020084c8 <_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 ) { 20084c8: 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; 20084cc: 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); 20084d0: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 20084d4: 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); 20084d8: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20084dc: 82 06 60 38 add %i1, 0x38, %g1 20084e0: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 20084e4: 2d 00 80 6e sethi %hi(0x201b800), %l6 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 20084e8: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 20084ec: 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 ]; 20084f0: ab 28 60 04 sll %g1, 4, %l5 20084f4: ac 15 a3 54 or %l6, 0x354, %l6 20084f8: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 20084fc: 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 ]; 2008500: aa 25 40 01 sub %l5, %g1, %l5 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 2008504: 12 80 00 24 bne 2008594 <_Thread_queue_Enqueue_priority+0xcc> 2008508: 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; 200850c: ac 05 60 04 add %l5, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 2008510: 7f ff e6 18 call 2001d70 2008514: 01 00 00 00 nop 2008518: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 200851c: c2 05 40 00 ld [ %l5 ], %g1 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 2008520: 80 a0 40 16 cmp %g1, %l6 2008524: 02 80 00 3a be 200860c <_Thread_queue_Enqueue_priority+0x144> 2008528: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 200852c: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority <= search_priority ) 2008530: 80 a4 00 13 cmp %l0, %l3 2008534: 18 80 00 0b bgu 2008560 <_Thread_queue_Enqueue_priority+0x98> 2008538: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 200853c: 10 80 00 36 b 2008614 <_Thread_queue_Enqueue_priority+0x14c> 2008540: 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 ) ) { 2008544: 80 a4 40 16 cmp %l1, %l6 2008548: 02 80 00 32 be 2008610 <_Thread_queue_Enqueue_priority+0x148> 200854c: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 2008550: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority <= search_priority ) 2008554: 80 a4 00 13 cmp %l0, %l3 2008558: 28 80 00 2f bleu,a 2008614 <_Thread_queue_Enqueue_priority+0x14c> 200855c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 2008560: 7f ff e6 08 call 2001d80 2008564: 90 10 00 12 mov %l2, %o0 2008568: 7f ff e6 02 call 2001d70 200856c: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008570: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2008574: 80 8d 00 01 btst %l4, %g1 2008578: 32 bf ff f3 bne,a 2008544 <_Thread_queue_Enqueue_priority+0x7c> 200857c: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 2008580: 7f ff e6 00 call 2001d80 <== NOT EXECUTED 2008584: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 2008588: 30 bf ff e2 b,a 2008510 <_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 ); 200858c: 7f ff e5 fd call 2001d80 2008590: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 2008594: 7f ff e5 f7 call 2001d70 2008598: 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; 200859c: a6 04 e0 01 inc %l3 _ISR_Disable( level ); 20085a0: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; 20085a4: c2 05 60 08 ld [ %l5 + 8 ], %g1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 20085a8: 80 a0 40 15 cmp %g1, %l5 20085ac: 02 80 00 20 be 200862c <_Thread_queue_Enqueue_priority+0x164> 20085b0: a2 10 00 01 mov %g1, %l1 search_priority = search_thread->current_priority; 20085b4: e6 00 60 14 ld [ %g1 + 0x14 ], %l3 if ( priority >= search_priority ) 20085b8: 80 a4 00 13 cmp %l0, %l3 20085bc: 0a 80 00 0b bcs 20085e8 <_Thread_queue_Enqueue_priority+0x120> 20085c0: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 20085c4: 10 80 00 1b b 2008630 <_Thread_queue_Enqueue_priority+0x168> 20085c8: 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 ) ) { 20085cc: 80 a4 40 15 cmp %l1, %l5 20085d0: 02 80 00 17 be 200862c <_Thread_queue_Enqueue_priority+0x164> 20085d4: 82 10 00 11 mov %l1, %g1 search_priority = search_thread->current_priority; 20085d8: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 if ( priority >= search_priority ) 20085dc: 80 a4 00 13 cmp %l0, %l3 20085e0: 3a 80 00 14 bcc,a 2008630 <_Thread_queue_Enqueue_priority+0x168> 20085e4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 20085e8: 7f ff e5 e6 call 2001d80 20085ec: 90 10 00 12 mov %l2, %o0 20085f0: 7f ff e5 e0 call 2001d70 20085f4: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20085f8: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20085fc: 80 8d 00 01 btst %l4, %g1 2008600: 32 bf ff f3 bne,a 20085cc <_Thread_queue_Enqueue_priority+0x104> 2008604: e2 04 60 04 ld [ %l1 + 4 ], %l1 2008608: 30 bf ff e1 b,a 200858c <_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 ) ) { 200860c: a6 10 3f ff mov -1, %l3 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008610: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008614: 80 a0 a0 01 cmp %g2, 1 2008618: 02 80 00 17 be 2008674 <_Thread_queue_Enqueue_priority+0x1ac> 200861c: 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; 2008620: e4 26 80 00 st %l2, [ %i2 ] return the_thread_queue->sync_state; } 2008624: 81 c7 e0 08 ret 2008628: 91 e8 00 02 restore %g0, %g2, %o0 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 200862c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 2008630: 80 a0 a0 01 cmp %g2, 1 2008634: 32 bf ff fc bne,a 2008624 <_Thread_queue_Enqueue_priority+0x15c> 2008638: 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 ) 200863c: 80 a4 00 13 cmp %l0, %l3 2008640: 02 80 00 1a be 20086a8 <_Thread_queue_Enqueue_priority+0x1e0> 2008644: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2008648: c4 00 40 00 ld [ %g1 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 200864c: 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; 2008650: 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; 2008654: 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; 2008658: f2 20 40 00 st %i1, [ %g1 ] next_node->previous = the_node; 200865c: f2 20 a0 04 st %i1, [ %g2 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008660: b0 10 20 01 mov 1, %i0 2008664: 7f ff e5 c7 call 2001d80 2008668: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 200866c: 81 c7 e0 08 ret 2008670: 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 ) 2008674: 02 80 00 0d be 20086a8 <_Thread_queue_Enqueue_priority+0x1e0> 2008678: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 200867c: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008680: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 2008684: 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; 2008688: 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; 200868c: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 2008690: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008694: b0 10 20 01 mov 1, %i0 2008698: 7f ff e5 ba call 2001d80 200869c: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 20086a0: 81 c7 e0 08 ret 20086a4: 81 e8 00 00 restore 20086a8: 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; 20086ac: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 20086b0: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 20086b4: 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; 20086b8: 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; 20086bc: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 20086c0: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20086c4: b0 10 20 01 mov 1, %i0 20086c8: 7f ff e5 ae call 2001d80 20086cc: 90 10 00 12 mov %l2, %o0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 20086d0: 81 c7 e0 08 ret 20086d4: 81 e8 00 00 restore 02008784 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 2008784: 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 ) 2008788: 80 a6 20 00 cmp %i0, 0 200878c: 02 80 00 13 be 20087d8 <_Thread_queue_Requeue+0x54> 2008790: 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 ) { 2008794: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 2008798: 80 a4 60 01 cmp %l1, 1 200879c: 02 80 00 04 be 20087ac <_Thread_queue_Requeue+0x28> 20087a0: 01 00 00 00 nop 20087a4: 81 c7 e0 08 ret <== NOT EXECUTED 20087a8: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 20087ac: 7f ff e5 71 call 2001d70 20087b0: 01 00 00 00 nop 20087b4: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 20087b8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 20087bc: 03 00 00 ef sethi %hi(0x3bc00), %g1 20087c0: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 20087c4: 80 88 80 01 btst %g2, %g1 20087c8: 12 80 00 06 bne 20087e0 <_Thread_queue_Requeue+0x5c> 20087cc: 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 ); 20087d0: 7f ff e5 6c call 2001d80 20087d4: 90 10 00 10 mov %l0, %o0 20087d8: 81 c7 e0 08 ret 20087dc: 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 ); 20087e0: 92 10 00 19 mov %i1, %o1 20087e4: e2 26 20 30 st %l1, [ %i0 + 0x30 ] 20087e8: 40 00 11 1c call 200cc58 <_Thread_queue_Extract_priority_helper> 20087ec: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 20087f0: 90 10 00 18 mov %i0, %o0 20087f4: 92 10 00 19 mov %i1, %o1 20087f8: 7f ff ff 34 call 20084c8 <_Thread_queue_Enqueue_priority> 20087fc: 94 07 bf fc add %fp, -4, %o2 2008800: 30 bf ff f4 b,a 20087d0 <_Thread_queue_Requeue+0x4c> 02015b60 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2015b60: 9d e3 bf 88 save %sp, -120, %sp 2015b64: 2d 00 80 f3 sethi %hi(0x203cc00), %l6 2015b68: ba 07 bf f4 add %fp, -12, %i5 2015b6c: a8 07 bf f8 add %fp, -8, %l4 2015b70: a4 07 bf e8 add %fp, -24, %l2 2015b74: ae 07 bf ec add %fp, -20, %l7 2015b78: 2b 00 80 f2 sethi %hi(0x203c800), %l5 2015b7c: 39 00 80 f2 sethi %hi(0x203c800), %i4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2015b80: c0 27 bf f8 clr [ %fp + -8 ] 2015b84: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 2015b88: 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); 2015b8c: e8 27 bf f4 st %l4, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2015b90: 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); 2015b94: ee 27 bf e8 st %l7, [ %fp + -24 ] 2015b98: ac 15 a0 94 or %l6, 0x94, %l6 2015b9c: aa 15 63 d4 or %l5, 0x3d4, %l5 2015ba0: b8 17 23 40 or %i4, 0x340, %i4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2015ba4: 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 ); 2015ba8: 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 ); 2015bac: 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 ); 2015bb0: 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; 2015bb4: 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; 2015bb8: 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; 2015bbc: c2 05 80 00 ld [ %l6 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2015bc0: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2015bc4: 90 10 00 11 mov %l1, %o0 2015bc8: 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; 2015bcc: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2015bd0: 40 00 12 84 call 201a5e0 <_Watchdog_Adjust_to_chain> 2015bd4: 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; 2015bd8: 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(); 2015bdc: 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 ) { 2015be0: 80 a4 00 09 cmp %l0, %o1 2015be4: 38 80 00 2f bgu,a 2015ca0 <_Timer_server_Body+0x140> 2015be8: 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 ) { 2015bec: 80 a4 00 09 cmp %l0, %o1 2015bf0: 0a 80 00 30 bcs 2015cb0 <_Timer_server_Body+0x150> 2015bf4: 94 22 40 10 sub %o1, %l0, %o2 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2015bf8: 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 ); 2015bfc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2015c00: 40 00 02 b5 call 20166d4 <_Chain_Get> 2015c04: 01 00 00 00 nop if ( timer == NULL ) { 2015c08: 80 a2 20 00 cmp %o0, 0 2015c0c: 02 80 00 10 be 2015c4c <_Timer_server_Body+0xec> 2015c10: 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 ) { 2015c14: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2015c18: 80 a0 60 01 cmp %g1, 1 2015c1c: 02 80 00 29 be 2015cc0 <_Timer_server_Body+0x160> 2015c20: 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 ) { 2015c24: 12 bf ff f6 bne 2015bfc <_Timer_server_Body+0x9c> 2015c28: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2015c2c: 40 00 12 a3 call 201a6b8 <_Watchdog_Insert> 2015c30: 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 ); 2015c34: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2015c38: 40 00 02 a7 call 20166d4 <_Chain_Get> 2015c3c: 01 00 00 00 nop if ( timer == NULL ) { 2015c40: 80 a2 20 00 cmp %o0, 0 2015c44: 32 bf ff f5 bne,a 2015c18 <_Timer_server_Body+0xb8> 2015c48: 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 ); 2015c4c: 7f ff e3 a4 call 200eadc 2015c50: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2015c54: c2 07 bf f4 ld [ %fp + -12 ], %g1 2015c58: 80 a5 00 01 cmp %l4, %g1 2015c5c: 02 80 00 1d be 2015cd0 <_Timer_server_Body+0x170> 2015c60: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2015c64: 7f ff e3 a2 call 200eaec <== NOT EXECUTED 2015c68: 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; 2015c6c: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2015c70: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2015c74: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2015c78: 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; 2015c7c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2015c80: 40 00 12 58 call 201a5e0 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED 2015c84: 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; 2015c88: 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(); 2015c8c: 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 ) { 2015c90: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED 2015c94: 08 bf ff d7 bleu 2015bf0 <_Timer_server_Body+0x90> <== NOT EXECUTED 2015c98: 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 ); 2015c9c: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED 2015ca0: 90 10 00 13 mov %l3, %o0 2015ca4: 40 00 12 4f call 201a5e0 <_Watchdog_Adjust_to_chain> 2015ca8: 94 10 00 12 mov %l2, %o2 2015cac: 30 bf ff d3 b,a 2015bf8 <_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 ); 2015cb0: 90 10 00 13 mov %l3, %o0 2015cb4: 40 00 12 1b call 201a520 <_Watchdog_Adjust> 2015cb8: 92 10 20 01 mov 1, %o1 2015cbc: 30 bf ff cf b,a 2015bf8 <_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 ); 2015cc0: 92 02 20 10 add %o0, 0x10, %o1 2015cc4: 40 00 12 7d call 201a6b8 <_Watchdog_Insert> 2015cc8: 90 10 00 11 mov %l1, %o0 2015ccc: 30 bf ff cc b,a 2015bfc <_Timer_server_Body+0x9c> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 2015cd0: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2015cd4: 7f ff e3 86 call 200eaec 2015cd8: 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 ) ) { 2015cdc: c2 07 bf e8 ld [ %fp + -24 ], %g1 2015ce0: 80 a5 c0 01 cmp %l7, %g1 2015ce4: 12 80 00 0c bne 2015d14 <_Timer_server_Body+0x1b4> 2015ce8: 01 00 00 00 nop 2015cec: 30 80 00 13 b,a 2015d38 <_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; 2015cf0: 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; 2015cf4: c2 27 bf e8 st %g1, [ %fp + -24 ] new_first->previous = _Chain_Head(the_chain); 2015cf8: e4 20 60 04 st %l2, [ %g1 + 4 ] _ISR_Enable( level ); 2015cfc: 7f ff e3 7c call 200eaec 2015d00: 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 ); 2015d04: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 2015d08: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 2015d0c: 9f c0 40 00 call %g1 2015d10: 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 ); 2015d14: 7f ff e3 72 call 200eadc 2015d18: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2015d1c: 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)) 2015d20: 80 a5 c0 10 cmp %l7, %l0 2015d24: 32 bf ff f3 bne,a 2015cf0 <_Timer_server_Body+0x190> 2015d28: 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 ); 2015d2c: 7f ff e3 70 call 200eaec 2015d30: 01 00 00 00 nop 2015d34: 30 bf ff a1 b,a 2015bb8 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2015d38: c0 2e 20 7c clrb [ %i0 + 0x7c ] 2015d3c: c2 07 00 00 ld [ %i4 ], %g1 2015d40: 82 00 60 01 inc %g1 2015d44: c2 27 00 00 st %g1, [ %i4 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2015d48: d0 06 00 00 ld [ %i0 ], %o0 2015d4c: 40 00 0f 3d call 2019a40 <_Thread_Set_state> 2015d50: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2015d54: 7f ff ff 59 call 2015ab8 <_Timer_server_Reset_interval_system_watchdog> 2015d58: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2015d5c: 7f ff ff 6c call 2015b0c <_Timer_server_Reset_tod_system_watchdog> 2015d60: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2015d64: 40 00 0c 3d call 2018e58 <_Thread_Enable_dispatch> 2015d68: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2015d6c: 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; 2015d70: 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 ); 2015d74: 40 00 12 be call 201a86c <_Watchdog_Remove> 2015d78: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2015d7c: 40 00 12 bc call 201a86c <_Watchdog_Remove> 2015d80: 90 10 00 1a mov %i2, %o0 2015d84: 30 bf ff 8d b,a 2015bb8 <_Timer_server_Body+0x58> 0200b378 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b378: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b37c: 7f ff de 4a call 2002ca4 200b380: 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)); 200b384: 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; 200b388: 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 ) ) { 200b38c: 80 a0 40 11 cmp %g1, %l1 200b390: 02 80 00 1f be 200b40c <_Watchdog_Adjust+0x94> 200b394: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b398: 12 80 00 1f bne 200b414 <_Watchdog_Adjust+0x9c> 200b39c: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b3a0: 80 a6 a0 00 cmp %i2, 0 200b3a4: 02 80 00 1a be 200b40c <_Watchdog_Adjust+0x94> 200b3a8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b3ac: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b3b0: 80 a6 80 19 cmp %i2, %i1 200b3b4: 1a 80 00 0b bcc 200b3e0 <_Watchdog_Adjust+0x68> 200b3b8: a4 10 20 01 mov 1, %l2 _Watchdog_First( header )->delta_interval -= units; 200b3bc: 10 80 00 1d b 200b430 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200b3c0: 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 ) { 200b3c4: b4 a6 80 19 subcc %i2, %i1, %i2 200b3c8: 02 80 00 11 be 200b40c <_Watchdog_Adjust+0x94> 200b3cc: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200b3d0: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b3d4: 80 a6 40 1a cmp %i1, %i2 200b3d8: 38 80 00 16 bgu,a 200b430 <_Watchdog_Adjust+0xb8> 200b3dc: 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; 200b3e0: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _ISR_Enable( level ); 200b3e4: 7f ff de 34 call 2002cb4 200b3e8: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b3ec: 40 00 00 b6 call 200b6c4 <_Watchdog_Tickle> 200b3f0: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 200b3f4: 7f ff de 2c call 2002ca4 200b3f8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200b3fc: c4 04 00 00 ld [ %l0 ], %g2 if ( _Chain_Is_empty( header ) ) 200b400: 80 a4 40 02 cmp %l1, %g2 200b404: 12 bf ff f0 bne 200b3c4 <_Watchdog_Adjust+0x4c> 200b408: 82 10 00 02 mov %g2, %g1 } break; } } _ISR_Enable( level ); 200b40c: 7f ff de 2a call 2002cb4 200b410: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200b414: 12 bf ff fe bne 200b40c <_Watchdog_Adjust+0x94> 200b418: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b41c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b420: b4 00 80 1a add %g2, %i2, %i2 200b424: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200b428: 7f ff de 23 call 2002cb4 200b42c: 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; 200b430: 10 bf ff f7 b 200b40c <_Watchdog_Adjust+0x94> 200b434: f4 20 60 10 st %i2, [ %g1 + 0x10 ] 0200f240 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 200f240: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 200f244: 7f ff fb 71 call 200e008 200f248: 01 00 00 00 nop 200f24c: 80 a2 00 18 cmp %o0, %i0 200f250: 12 80 00 b6 bne 200f528 200f254: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 200f258: 02 80 00 ba be 200f540 200f25c: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 200f260: 80 a0 60 1f cmp %g1, 0x1f 200f264: 18 80 00 b7 bgu 200f540 200f268: 23 00 80 72 sethi %hi(0x201c800), %l1 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 200f26c: a5 2e 60 02 sll %i1, 2, %l2 200f270: a2 14 63 34 or %l1, 0x334, %l1 200f274: a7 2e 60 04 sll %i1, 4, %l3 200f278: 84 24 c0 12 sub %l3, %l2, %g2 200f27c: 84 04 40 02 add %l1, %g2, %g2 200f280: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200f284: 80 a0 a0 01 cmp %g2, 1 200f288: 02 80 00 45 be 200f39c 200f28c: b0 10 20 00 clr %i0 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 200f290: 80 a6 60 04 cmp %i1, 4 200f294: 02 80 00 44 be 200f3a4 200f298: 80 a6 60 08 cmp %i1, 8 200f29c: 02 80 00 42 be 200f3a4 200f2a0: 80 a6 60 0b cmp %i1, 0xb 200f2a4: 02 80 00 40 be 200f3a4 200f2a8: a0 10 20 01 mov 1, %l0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 200f2ac: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 200f2b0: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 200f2b4: 80 a6 a0 00 cmp %i2, 0 200f2b8: 02 80 00 41 be 200f3bc 200f2bc: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 200f2c0: c2 06 80 00 ld [ %i2 ], %g1 200f2c4: c2 27 bf fc st %g1, [ %fp + -4 ] 200f2c8: 03 00 80 71 sethi %hi(0x201c400), %g1 200f2cc: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 ! 201c5a0 <_Thread_Dispatch_disable_level> 200f2d0: 84 00 a0 01 inc %g2 200f2d4: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ] /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 200f2d8: 03 00 80 71 sethi %hi(0x201c400), %g1 200f2dc: c2 00 62 60 ld [ %g1 + 0x260 ], %g1 ! 201c660 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200f2e0: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 200f2e4: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 200f2e8: 80 ac 00 02 andncc %l0, %g2, %g0 200f2ec: 12 80 00 1a bne 200f354 200f2f0: 09 00 80 73 sethi %hi(0x201cc00), %g4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 200f2f4: c4 01 20 c0 ld [ %g4 + 0xc0 ], %g2 ! 201ccc0 <_POSIX_signals_Wait_queue> 200f2f8: 88 11 20 c0 or %g4, 0xc0, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200f2fc: 88 01 20 04 add %g4, 4, %g4 200f300: 80 a0 80 04 cmp %g2, %g4 200f304: 02 80 00 30 be 200f3c4 200f308: 82 10 00 02 mov %g2, %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200f30c: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 200f310: 80 8c 00 03 btst %l0, %g3 200f314: 02 80 00 0c be 200f344 200f318: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f31c: 10 80 00 0f b 200f358 200f320: 84 10 20 01 mov 1, %g2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 200f324: 80 a0 80 04 cmp %g2, %g4 200f328: 22 80 00 28 be,a 200f3c8 200f32c: 03 00 80 6e sethi %hi(0x201b800), %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200f330: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200f334: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200f338: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 200f33c: 12 80 00 06 bne 200f354 <== NOT EXECUTED 200f340: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 200f344: c6 00 e0 cc ld [ %g3 + 0xcc ], %g3 200f348: 80 ac 00 03 andncc %l0, %g3, %g0 200f34c: 22 bf ff f6 be,a 200f324 200f350: c4 00 80 00 ld [ %g2 ], %g2 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f354: 84 10 20 01 mov 1, %g2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 200f358: 90 10 00 01 mov %g1, %o0 200f35c: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f360: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 200f364: 40 00 00 ba call 200f64c <_POSIX_signals_Unblock_thread> 200f368: 94 07 bf f4 add %fp, -12, %o2 200f36c: 80 8a 20 ff btst 0xff, %o0 200f370: 12 80 00 5a bne 200f4d8 200f374: 01 00 00 00 nop /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 200f378: 40 00 00 a5 call 200f60c <_POSIX_signals_Set_process_signals> 200f37c: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 200f380: a4 24 c0 12 sub %l3, %l2, %l2 200f384: c2 04 40 12 ld [ %l1 + %l2 ], %g1 200f388: 80 a0 60 02 cmp %g1, 2 200f38c: 02 80 00 57 be 200f4e8 200f390: 11 00 80 73 sethi %hi(0x201cc00), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 200f394: 7f ff e2 bc call 2007e84 <_Thread_Enable_dispatch> 200f398: b0 10 20 00 clr %i0 return 0; } 200f39c: 81 c7 e0 08 ret 200f3a0: 81 e8 00 00 restore * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 200f3a4: 40 00 01 38 call 200f884 200f3a8: 01 00 00 00 nop 200f3ac: 40 00 00 f9 call 200f790 200f3b0: 92 10 00 19 mov %i1, %o1 200f3b4: 81 c7 e0 08 ret 200f3b8: 91 e8 00 08 restore %g0, %o0, %o0 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 200f3bc: 10 bf ff c3 b 200f2c8 200f3c0: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 200f3c4: 03 00 80 6e sethi %hi(0x201b800), %g1 200f3c8: da 08 63 54 ldub [ %g1 + 0x354 ], %o5 ! 201bb54 200f3cc: 13 00 80 71 sethi %hi(0x201c400), %o1 200f3d0: 9a 03 60 01 inc %o5 200f3d4: 92 12 61 08 or %o1, 0x108, %o1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 200f3d8: 82 10 20 00 clr %g1 200f3dc: 90 02 60 0c add %o1, 0xc, %o0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 200f3e0: 35 04 00 00 sethi %hi(0x10000000), %i2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 200f3e4: c4 02 40 00 ld [ %o1 ], %g2 200f3e8: 80 a0 a0 00 cmp %g2, 0 200f3ec: 22 80 00 2d be,a 200f4a0 200f3f0: 92 02 60 04 add %o1, 4, %o1 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 200f3f4: c4 00 a0 04 ld [ %g2 + 4 ], %g2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 200f3f8: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 200f3fc: 80 a3 20 00 cmp %o4, 0 200f400: 02 80 00 27 be 200f49c 200f404: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3 200f408: 84 10 20 01 mov 1, %g2 the_thread = (Thread_Control *) object_table[ index ]; 200f40c: 87 28 a0 02 sll %g2, 2, %g3 200f410: c6 02 c0 03 ld [ %o3 + %g3 ], %g3 if ( !the_thread ) 200f414: 80 a0 e0 00 cmp %g3, 0 200f418: 02 80 00 1e be 200f490 200f41c: 84 00 a0 01 inc %g2 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 200f420: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4 200f424: 80 a1 00 0d cmp %g4, %o5 200f428: 18 80 00 1b bgu 200f494 200f42c: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200f430: d4 00 e1 6c ld [ %g3 + 0x16c ], %o2 200f434: d4 02 a0 cc ld [ %o2 + 0xcc ], %o2 200f438: 80 ac 00 0a andncc %l0, %o2, %g0 200f43c: 02 80 00 16 be 200f494 200f440: 80 a3 00 02 cmp %o4, %g2 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 200f444: 80 a1 00 0d cmp %g4, %o5 200f448: 2a 80 00 11 bcs,a 200f48c 200f44c: 9a 10 00 04 mov %g4, %o5 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 200f450: d4 00 60 10 ld [ %g1 + 0x10 ], %o2 200f454: 80 a2 a0 00 cmp %o2, 0 200f458: 02 80 00 0f be 200f494 200f45c: 80 a3 00 02 cmp %o4, %g2 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 200f460: de 00 e0 10 ld [ %g3 + 0x10 ], %o7 200f464: 80 a3 e0 00 cmp %o7, 0 200f468: 22 80 00 09 be,a 200f48c 200f46c: 9a 10 00 04 mov %g4, %o5 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 200f470: 80 8a 80 1a btst %o2, %i2 200f474: 12 80 00 08 bne 200f494 200f478: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 200f47c: 80 8b c0 1a btst %o7, %i2 200f480: 02 80 00 05 be 200f494 200f484: 80 a3 00 02 cmp %o4, %g2 200f488: 9a 10 00 04 mov %g4, %o5 200f48c: 82 10 00 03 mov %g3, %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 200f490: 80 a3 00 02 cmp %o4, %g2 200f494: 1a bf ff df bcc 200f410 200f498: 87 28 a0 02 sll %g2, 2, %g3 200f49c: 92 02 60 04 add %o1, 4, %o1 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 200f4a0: 80 a2 40 08 cmp %o1, %o0 200f4a4: 32 bf ff d1 bne,a 200f3e8 200f4a8: c4 02 40 00 ld [ %o1 ], %g2 } } } } if ( interested ) { 200f4ac: 80 a0 60 00 cmp %g1, 0 200f4b0: 02 bf ff b2 be 200f378 200f4b4: 84 10 20 01 mov 1, %g2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 200f4b8: 90 10 00 01 mov %g1, %o0 200f4bc: 92 10 00 19 mov %i1, %o1 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 200f4c0: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 200f4c4: 40 00 00 62 call 200f64c <_POSIX_signals_Unblock_thread> 200f4c8: 94 07 bf f4 add %fp, -12, %o2 200f4cc: 80 8a 20 ff btst 0xff, %o0 200f4d0: 02 bf ff aa be 200f378 200f4d4: 01 00 00 00 nop _Thread_Enable_dispatch(); 200f4d8: 7f ff e2 6b call 2007e84 <_Thread_Enable_dispatch> 200f4dc: b0 10 20 00 clr %i0 ! 0 return 0; 200f4e0: 81 c7 e0 08 ret 200f4e4: 81 e8 00 00 restore */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 200f4e8: 7f ff f3 a6 call 200c380 <_Chain_Get> 200f4ec: 90 12 20 b4 or %o0, 0xb4, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 200f4f0: 80 a2 20 00 cmp %o0, 0 200f4f4: 02 80 00 19 be 200f558 200f4f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 200f4fc: 92 10 00 08 mov %o0, %o1 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 200f500: c2 22 20 08 st %g1, [ %o0 + 8 ] 200f504: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f508: c2 22 20 0c st %g1, [ %o0 + 0xc ] 200f50c: c2 07 bf fc ld [ %fp + -4 ], %g1 200f510: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 200f514: 11 00 80 73 sethi %hi(0x201cc00), %o0 200f518: 90 12 21 04 or %o0, 0x104, %o0 ! 201cd04 <_POSIX_signals_Siginfo> 200f51c: 7f ff dc 0e call 2006554 <_Chain_Append> 200f520: 90 02 00 12 add %o0, %l2, %o0 200f524: 30 bf ff 9c b,a 200f394 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 200f528: 40 00 01 0c call 200f958 <__errno> 200f52c: b0 10 3f ff mov -1, %i0 200f530: 82 10 20 03 mov 3, %g1 200f534: c2 22 00 00 st %g1, [ %o0 ] 200f538: 81 c7 e0 08 ret 200f53c: 81 e8 00 00 restore */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 200f540: 40 00 01 06 call 200f958 <__errno> 200f544: b0 10 3f ff mov -1, %i0 200f548: 82 10 20 16 mov 0x16, %g1 200f54c: c2 22 00 00 st %g1, [ %o0 ] 200f550: 81 c7 e0 08 ret 200f554: 81 e8 00 00 restore if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 200f558: 7f ff e2 4b call 2007e84 <_Thread_Enable_dispatch> 200f55c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 200f560: 40 00 00 fe call 200f958 <__errno> 200f564: 01 00 00 00 nop 200f568: 82 10 20 0b mov 0xb, %g1 ! b 200f56c: c2 22 00 00 st %g1, [ %o0 ] 200f570: 81 c7 e0 08 ret 200f574: 81 e8 00 00 restore 0200641c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 200641c: 9d e3 bf 98 save %sp, -104, %sp if ( !once_control || !init_routine ) 2006420: 80 a6 60 00 cmp %i1, 0 2006424: 02 80 00 19 be 2006488 2006428: a0 10 00 18 mov %i0, %l0 200642c: 80 a6 20 00 cmp %i0, 0 2006430: 02 80 00 16 be 2006488 2006434: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 2006438: c2 06 20 04 ld [ %i0 + 4 ], %g1 200643c: 80 a0 60 00 cmp %g1, 0 2006440: 12 80 00 10 bne 2006480 2006444: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 2006448: a2 07 bf fc add %fp, -4, %l1 200644c: 90 10 21 00 mov 0x100, %o0 2006450: 92 10 21 00 mov 0x100, %o1 2006454: 40 00 03 0b call 2007080 2006458: 94 10 00 11 mov %l1, %o2 if ( !once_control->init_executed ) { 200645c: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006460: 80 a0 60 00 cmp %g1, 0 2006464: 02 80 00 0b be 2006490 2006468: 82 10 20 01 mov 1, %g1 once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 200646c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED 2006470: 94 10 00 11 mov %l1, %o2 2006474: 92 10 21 00 mov 0x100, %o1 2006478: 40 00 03 02 call 2007080 200647c: b0 10 20 00 clr %i0 } return 0; } 2006480: 81 c7 e0 08 ret 2006484: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 2006488: 81 c7 e0 08 ret 200648c: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; 2006490: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 2006494: 9f c6 40 00 call %i1 2006498: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 200649c: 10 bf ff f5 b 2006470 20064a0: d0 07 bf fc ld [ %fp + -4 ], %o0 02006018 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 2006018: 9d e3 bf a0 save %sp, -96, %sp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 200601c: 03 00 80 78 sethi %hi(0x201e000), %g1 2006020: c2 00 63 ac ld [ %g1 + 0x3ac ], %g1 ! 201e3ac <_ISR_Nest_level> 2006024: 80 a0 60 00 cmp %g1, 0 2006028: 12 80 00 15 bne 200607c 200602c: 03 00 80 78 sethi %hi(0x201e000), %g1 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2006030: 21 00 80 78 sethi %hi(0x201e000), %l0 2006034: c6 00 63 10 ld [ %g1 + 0x310 ], %g3 2006038: c4 04 23 d0 ld [ %l0 + 0x3d0 ], %g2 200603c: 86 00 e0 01 inc %g3 2006040: c6 20 63 10 st %g3, [ %g1 + 0x310 ] 2006044: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2006048: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 200604c: 80 a0 a0 00 cmp %g2, 0 2006050: 12 80 00 0d bne 2006084 2006054: 01 00 00 00 nop thread_support->cancelation_requested ) 2006058: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 200605c: 80 a0 60 00 cmp %g1, 0 2006060: 02 80 00 09 be 2006084 2006064: 01 00 00 00 nop cancel = true; _Thread_Enable_dispatch(); 2006068: 40 00 0a 56 call 20089c0 <_Thread_Enable_dispatch> 200606c: b2 10 3f ff mov -1, %i1 ! ffffffff if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 2006070: f0 04 23 d0 ld [ %l0 + 0x3d0 ], %i0 2006074: 40 00 1a 12 call 200c8bc <_POSIX_Thread_Exit> 2006078: 81 e8 00 00 restore 200607c: 81 c7 e0 08 ret <== NOT EXECUTED 2006080: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 2006084: 40 00 0a 4f call 20089c0 <_Thread_Enable_dispatch> 2006088: 81 e8 00 00 restore 200608c: 01 00 00 00 nop 02007fd8 : 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 ) { 2007fd8: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 2007fdc: 03 00 80 8a sethi %hi(0x2022800), %g1 2007fe0: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20228bc <_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; 2007fe4: 09 00 80 8c sethi %hi(0x2023000), %g4 if ( rtems_interrupt_is_in_progress() ) 2007fe8: 80 a0 60 00 cmp %g1, 0 2007fec: 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 ) { 2007ff0: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 2007ff4: 12 80 00 49 bne 2008118 2007ff8: c6 01 21 a4 ld [ %g4 + 0x1a4 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 2007ffc: 80 a6 a0 00 cmp %i2, 0 2008000: 02 80 00 4b be 200812c 2008004: 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 ) 2008008: 02 80 00 49 be 200812c 200800c: 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; 2008010: c4 06 40 00 ld [ %i1 ], %g2 2008014: 80 a0 a0 00 cmp %g2, 0 2008018: 22 80 00 42 be,a 2008120 200801c: 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 ) 2008020: 80 a0 c0 18 cmp %g3, %i0 2008024: 08 80 00 3d bleu 2008118 2008028: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200802c: 05 00 80 8a sethi %hi(0x2022800), %g2 2008030: c6 00 a0 20 ld [ %g2 + 0x20 ], %g3 ! 2022820 <_Thread_Dispatch_disable_level> 2008034: 86 00 e0 01 inc %g3 2008038: c6 20 a0 20 st %g3, [ %g2 + 0x20 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 200803c: 80 a6 20 00 cmp %i0, 0 2008040: 12 80 00 2b bne 20080ec 2008044: 05 00 80 8c sethi %hi(0x2023000), %g2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 2008048: da 01 21 a4 ld [ %g4 + 0x1a4 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 200804c: 80 a3 60 00 cmp %o5, 0 2008050: 02 80 00 3a be 2008138 2008054: d8 00 a1 a8 ld [ %g2 + 0x1a8 ], %o4 2008058: 10 80 00 05 b 200806c 200805c: 86 10 00 0c mov %o4, %g3 2008060: 80 a3 40 18 cmp %o5, %i0 2008064: 08 80 00 0b bleu 2008090 2008068: 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; 200806c: c8 00 c0 00 ld [ %g3 ], %g4 2008070: 80 a1 20 00 cmp %g4, 0 2008074: 32 bf ff fb bne,a 2008060 2008078: b0 06 20 01 inc %i0 200807c: c8 00 e0 04 ld [ %g3 + 4 ], %g4 2008080: 80 a1 20 00 cmp %g4, 0 2008084: 32 bf ff f7 bne,a 2008060 2008088: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 200808c: 80 a3 40 18 cmp %o5, %i0 2008090: 02 80 00 2b be 200813c 2008094: f0 26 80 00 st %i0, [ %i2 ] 2008098: 85 2e 20 03 sll %i0, 3, %g2 200809c: 87 2e 20 05 sll %i0, 5, %g3 20080a0: 84 20 c0 02 sub %g3, %g2, %g2 20080a4: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 20080a8: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 20080ac: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 20080b0: c6 20 80 00 st %g3, [ %g2 ] 20080b4: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 20080b8: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 20080bc: c6 20 a0 04 st %g3, [ %g2 + 4 ] 20080c0: c6 00 60 08 ld [ %g1 + 8 ], %g3 20080c4: c6 20 a0 08 st %g3, [ %g2 + 8 ] 20080c8: c6 00 60 0c ld [ %g1 + 0xc ], %g3 20080cc: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 20080d0: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 20080d4: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 20080d8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 20080dc: 40 00 07 53 call 2009e28 <_Thread_Enable_dispatch> 20080e0: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 20080e4: 40 00 26 e2 call 2011c6c 20080e8: 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; 20080ec: c6 00 a1 a8 ld [ %g2 + 0x1a8 ], %g3 20080f0: 89 2e 20 05 sll %i0, 5, %g4 20080f4: 85 2e 20 03 sll %i0, 3, %g2 20080f8: 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; 20080fc: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 2008100: 80 a1 20 00 cmp %g4, 0 2008104: 02 80 00 12 be 200814c 2008108: 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(); 200810c: 40 00 07 47 call 2009e28 <_Thread_Enable_dispatch> 2008110: 01 00 00 00 nop 2008114: 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 ); } 2008118: 81 c7 e0 08 ret 200811c: 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; 2008120: 80 a0 a0 00 cmp %g2, 0 2008124: 12 bf ff c0 bne 2008024 2008128: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 200812c: 84 10 20 09 mov 9, %g2 } 2008130: 81 c7 e0 08 ret 2008134: 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; 2008138: 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(); 200813c: 40 00 07 3b call 2009e28 <_Thread_Enable_dispatch> 2008140: 01 00 00 00 nop return sc; 2008144: 10 bf ff f5 b 2008118 2008148: 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; 200814c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008150: 80 a0 e0 00 cmp %g3, 0 2008154: 12 bf ff ee bne 200810c 2008158: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 200815c: 10 bf ff d3 b 20080a8 2008160: f0 26 80 00 st %i0, [ %i2 ] 02008d74 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 2008d74: 9d e3 bf 98 save %sp, -104, %sp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 2008d78: 90 10 00 19 mov %i1, %o0 2008d7c: 40 00 18 e5 call 200f110 <_POSIX_Absolute_timeout_to_ticks> 2008d80: 92 07 bf fc add %fp, -4, %o1 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 2008d84: 80 a2 20 03 cmp %o0, 3 2008d88: 02 80 00 07 be 2008da4 2008d8c: d4 07 bf fc ld [ %fp + -4 ], %o2 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 2008d90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2008d94: 40 00 1b cd call 200fcc8 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 2008d98: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 2008d9c: 81 c7 e0 08 ret <== NOT EXECUTED 2008da0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 2008da4: 90 10 00 18 mov %i0, %o0 2008da8: 40 00 1b c8 call 200fcc8 <_POSIX_Semaphore_Wait_support> 2008dac: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 2008db0: 81 c7 e0 08 ret 2008db4: 91 e8 00 08 restore %g0, %o0, %o0 020084c8 : #include int sigsuspend( const sigset_t *sigmask ) { 20084c8: 9d e3 bf 98 save %sp, -104, %sp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 20084cc: 90 10 20 01 mov 1, %o0 20084d0: 92 10 00 18 mov %i0, %o1 20084d4: a0 07 bf fc add %fp, -4, %l0 20084d8: 7f ff ff f1 call 200849c 20084dc: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 20084e0: a2 07 bf f8 add %fp, -8, %l1 20084e4: 7f ff ff b7 call 20083c0 20084e8: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 20084ec: 90 10 00 11 mov %l1, %o0 20084f0: 92 10 20 00 clr %o1 20084f4: 40 00 00 2b call 20085a0 20084f8: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 20084fc: 92 10 00 10 mov %l0, %o1 status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); (void) sigfillset( &all_signals ); status = sigtimedwait( &all_signals, NULL, NULL ); 2008500: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 2008504: 94 10 20 00 clr %o2 2008508: 7f ff ff e5 call 200849c 200850c: 90 10 20 00 clr %o0 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 2008510: 80 a4 7f ff cmp %l1, -1 2008514: 12 80 00 05 bne 2008528 2008518: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 200851c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2008520: 81 c7 e0 08 ret <== NOT EXECUTED 2008524: 81 e8 00 00 restore <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 2008528: 40 00 29 1e call 20129a0 <__errno> 200852c: b0 10 3f ff mov -1, %i0 2008530: 82 10 20 04 mov 4, %g1 2008534: c2 22 00 00 st %g1, [ %o0 ] 2008538: 81 c7 e0 08 ret 200853c: 81 e8 00 00 restore