0200c654 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c654: 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; 200c658: a8 06 60 04 add %i1, 4, %l4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c65c: 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 ) { 200c660: 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; 200c664: e4 06 20 08 ld [ %i0 + 8 ], %l2 200c668: 18 80 00 75 bgu 200c83c <_Heap_Allocate_aligned_with_boundary+0x1e8> 200c66c: fa 06 20 10 ld [ %i0 + 0x10 ], %i5 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200c670: 80 a6 e0 00 cmp %i3, 0 200c674: 12 80 00 70 bne 200c834 <_Heap_Allocate_aligned_with_boundary+0x1e0> 200c678: 80 a6 40 1b cmp %i1, %i3 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c67c: 80 a4 00 12 cmp %l0, %l2 200c680: 02 80 00 72 be 200c848 <_Heap_Allocate_aligned_with_boundary+0x1f4> 200c684: 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; 200c688: 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; 200c68c: 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; 200c690: 82 20 40 19 sub %g1, %i1, %g1 200c694: 10 80 00 09 b 200c6b8 <_Heap_Allocate_aligned_with_boundary+0x64> 200c698: c2 27 bf fc st %g1, [ %fp + -4 ] boundary ); } } if ( alloc_begin != 0 ) { 200c69c: 80 a6 20 00 cmp %i0, 0 200c6a0: 32 80 00 57 bne,a 200c7fc <_Heap_Allocate_aligned_with_boundary+0x1a8> 200c6a4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 break; } block = block->next; 200c6a8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c6ac: 80 a4 00 12 cmp %l0, %l2 200c6b0: 22 80 00 5a be,a 200c818 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200c6b4: 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 ) { 200c6b8: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200c6bc: 80 a5 00 13 cmp %l4, %l3 200c6c0: 1a bf ff fa bcc 200c6a8 <_Heap_Allocate_aligned_with_boundary+0x54> 200c6c4: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200c6c8: 80 a6 a0 00 cmp %i2, 0 200c6cc: 02 bf ff f4 be 200c69c <_Heap_Allocate_aligned_with_boundary+0x48> 200c6d0: 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; 200c6d4: 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; 200c6d8: 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; 200c6dc: a6 0c ff fe and %l3, -2, %l3 200c6e0: 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; 200c6e4: 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; 200c6e8: 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); 200c6ec: 90 10 00 18 mov %i0, %o0 200c6f0: a6 00 40 13 add %g1, %l3, %l3 200c6f4: 40 00 32 64 call 2019084 <.urem> 200c6f8: 92 10 00 1a mov %i2, %o1 200c6fc: 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 ) { 200c700: 80 a4 c0 18 cmp %l3, %i0 200c704: 1a 80 00 06 bcc 200c71c <_Heap_Allocate_aligned_with_boundary+0xc8> 200c708: ac 04 a0 08 add %l2, 8, %l6 200c70c: 90 10 00 13 mov %l3, %o0 200c710: 40 00 32 5d call 2019084 <.urem> 200c714: 92 10 00 1a mov %i2, %o1 200c718: b0 24 c0 08 sub %l3, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200c71c: 80 a6 e0 00 cmp %i3, 0 200c720: 02 80 00 26 be 200c7b8 <_Heap_Allocate_aligned_with_boundary+0x164> 200c724: 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; 200c728: a6 06 00 19 add %i0, %i1, %l3 200c72c: 92 10 00 1b mov %i3, %o1 200c730: 40 00 32 55 call 2019084 <.urem> 200c734: 90 10 00 13 mov %l3, %o0 200c738: 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 ) { 200c73c: 80 a4 c0 08 cmp %l3, %o0 200c740: 08 80 00 1e bleu 200c7b8 <_Heap_Allocate_aligned_with_boundary+0x164> 200c744: 80 a5 80 18 cmp %l6, %i0 200c748: 80 a6 00 08 cmp %i0, %o0 200c74c: 1a 80 00 1b bcc 200c7b8 <_Heap_Allocate_aligned_with_boundary+0x164> 200c750: 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; 200c754: 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 ) { 200c758: 80 a5 40 08 cmp %l5, %o0 200c75c: 28 80 00 0a bleu,a 200c784 <_Heap_Allocate_aligned_with_boundary+0x130> 200c760: b0 22 00 19 sub %o0, %i1, %i0 if ( alloc_begin != 0 ) { break; } block = block->next; 200c764: 10 bf ff d2 b 200c6ac <_Heap_Allocate_aligned_with_boundary+0x58> 200c768: 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 ) { 200c76c: 1a 80 00 13 bcc 200c7b8 <_Heap_Allocate_aligned_with_boundary+0x164> 200c770: 80 a5 80 18 cmp %l6, %i0 if ( boundary_line < boundary_floor ) { 200c774: 80 a5 40 08 cmp %l5, %o0 200c778: 38 bf ff cd bgu,a 200c6ac <_Heap_Allocate_aligned_with_boundary+0x58> 200c77c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; 200c780: b0 22 00 19 sub %o0, %i1, %i0 200c784: 92 10 00 1a mov %i2, %o1 200c788: 40 00 32 3f call 2019084 <.urem> 200c78c: 90 10 00 18 mov %i0, %o0 200c790: 92 10 00 1b mov %i3, %o1 200c794: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200c798: a6 06 00 19 add %i0, %i1, %l3 200c79c: 40 00 32 3a call 2019084 <.urem> 200c7a0: 90 10 00 13 mov %l3, %o0 200c7a4: 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 ) { 200c7a8: 80 a4 c0 08 cmp %l3, %o0 200c7ac: 18 bf ff f0 bgu 200c76c <_Heap_Allocate_aligned_with_boundary+0x118> 200c7b0: 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 ) { 200c7b4: 80 a5 80 18 cmp %l6, %i0 200c7b8: 18 bf ff bc bgu 200c6a8 <_Heap_Allocate_aligned_with_boundary+0x54> 200c7bc: 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; 200c7c0: 90 10 00 18 mov %i0, %o0 200c7c4: a6 20 40 12 sub %g1, %l2, %l3 200c7c8: 92 10 00 1d mov %i5, %o1 200c7cc: 40 00 32 2e call 2019084 <.urem> 200c7d0: a6 04 c0 18 add %l3, %i0, %l3 if ( free_size >= min_block_size || free_size == 0 ) { 200c7d4: 90 a4 c0 08 subcc %l3, %o0, %o0 200c7d8: 02 bf ff b2 be 200c6a0 <_Heap_Allocate_aligned_with_boundary+0x4c> 200c7dc: 80 a6 20 00 cmp %i0, 0 200c7e0: 80 a5 c0 08 cmp %l7, %o0 200c7e4: 38 bf ff b2 bgu,a 200c6ac <_Heap_Allocate_aligned_with_boundary+0x58> 200c7e8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 200c7ec: 80 a6 20 00 cmp %i0, 0 200c7f0: 22 bf ff af be,a 200c6ac <_Heap_Allocate_aligned_with_boundary+0x58> 200c7f4: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c7f8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c7fc: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c800: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c804: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c808: c2 24 20 4c st %g1, [ %l0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c80c: 90 10 00 10 mov %l0, %o0 200c810: 7f ff e9 37 call 2006cec <_Heap_Block_allocate> 200c814: 94 10 00 18 mov %i0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200c818: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 200c81c: 80 a0 40 11 cmp %g1, %l1 200c820: 1a 80 00 08 bcc 200c840 <_Heap_Allocate_aligned_with_boundary+0x1ec> 200c824: 01 00 00 00 nop ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c828: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 200c82c: 81 c7 e0 08 ret 200c830: 81 e8 00 00 restore /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200c834: 08 80 00 07 bleu 200c850 <_Heap_Allocate_aligned_with_boundary+0x1fc> 200c838: 80 a6 a0 00 cmp %i2, 0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 200c83c: b0 10 20 00 clr %i0 } return (void *) alloc_begin; } 200c840: 81 c7 e0 08 ret 200c844: 81 e8 00 00 restore if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c848: 10 bf ff f4 b 200c818 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200c84c: b0 10 20 00 clr %i0 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200c850: 22 bf ff 8b be,a 200c67c <_Heap_Allocate_aligned_with_boundary+0x28> 200c854: b4 10 00 1d mov %i5, %i2 alignment = page_size; } } while ( block != free_list_tail ) { 200c858: 10 bf ff 8a b 200c680 <_Heap_Allocate_aligned_with_boundary+0x2c> 200c85c: 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 00 ld [ %g1 + 0x300 ], %g1 ! 201ef00 <_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 80 or %o2, 0x80, %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 28 or %o2, 0x228, %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 a1 e0 or %o2, 0x1e0, %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 18 or %o2, 0x118, %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 30 or %o2, 0x130, %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 50 or %o2, 0x150, %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 78 or %o2, 0x178, %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 b0 or %o2, 0x1b0, %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 e2 d0 or %i3, 0x2d0, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007f4c: b4 16 a2 e8 or %i2, 0x2e8, %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 80 or %i4, 0x80, %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 10 or %o2, 0x310, %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 70 sethi %hi(0x201c000), %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 63 d8 or %o5, 0x3d8, %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 70 sethi %hi(0x201c000), %o5 2008058: 80 a3 00 18 cmp %o4, %i0 200805c: 02 80 00 03 be 2008068 <_Heap_Walk+0x3f8> 2008060: 9a 13 63 e8 or %o5, 0x3e8, %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 70 sethi %hi(0x201c000), %g2 2008070: 80 a0 c0 01 cmp %g3, %g1 2008074: 02 80 00 07 be 2008090 <_Heap_Walk+0x420> 2008078: 84 10 a3 f8 or %g2, 0x3f8, %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 08 or %g2, 8, %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 18 or %o2, 0x18, %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 48 or %o2, 0x48, %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 b8 or %o2, 0xb8, %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 88 or %o2, 0x88, %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 40 or %o2, 0x340, %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 70 or %o2, 0x370, %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 a0 or %o2, 0x3a0, %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 10 or %o2, 0x210, %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 48 or %o2, 0x248, %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 98 or %o2, 0x298, %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 78 or %o2, 0x278, %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 81 call 2018dd4 <.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 2a call 2018cec <.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 83 call 200c3a8 <_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 62 call 200c35c <_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 23 fd call 2010220 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 23 f9 call 2010220 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 f3 call 2010220 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 c3 call 2018dd4 <.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 f5 call 200c334 <_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 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 36 call 200ca5c <_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 ] 0200f554 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200f554: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200f558: 7f ff ca 06 call 2001d70 200f55c: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200f560: 85 2e 20 04 sll %i0, 4, %g2 200f564: 83 2e 20 02 sll %i0, 2, %g1 200f568: 82 20 80 01 sub %g2, %g1, %g1 200f56c: 05 00 80 72 sethi %hi(0x201c800), %g2 200f570: 84 10 a3 04 or %g2, 0x304, %g2 ! 201cb04 <_POSIX_signals_Vectors> 200f574: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200f578: 80 a0 a0 02 cmp %g2, 2 200f57c: 02 80 00 11 be 200f5c0 <_POSIX_signals_Clear_process_signals+0x6c> 200f580: 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; 200f584: 05 00 80 73 sethi %hi(0x201cc00), %g2 200f588: c6 00 a0 d0 ld [ %g2 + 0xd0 ], %g3 ! 201ccd0 <_POSIX_signals_Pending> 200f58c: b0 06 3f ff add %i0, -1, %i0 200f590: 82 10 20 01 mov 1, %g1 200f594: 83 28 40 18 sll %g1, %i0, %g1 200f598: 82 28 c0 01 andn %g3, %g1, %g1 if ( !_POSIX_signals_Pending ) 200f59c: 80 a0 60 00 cmp %g1, 0 200f5a0: 12 80 00 06 bne 200f5b8 <_POSIX_signals_Clear_process_signals+0x64> 200f5a4: c2 20 a0 d0 st %g1, [ %g2 + 0xd0 ] _Thread_Do_post_task_switch_extension--; 200f5a8: 03 00 80 71 sethi %hi(0x201c400), %g1 200f5ac: c4 00 62 14 ld [ %g1 + 0x214 ], %g2 ! 201c614 <_Thread_Do_post_task_switch_extension> 200f5b0: 84 00 bf ff add %g2, -1, %g2 200f5b4: c4 20 62 14 st %g2, [ %g1 + 0x214 ] } _ISR_Enable( level ); 200f5b8: 7f ff c9 f2 call 2001d80 200f5bc: 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 ] ) ) 200f5c0: 84 10 a0 d4 or %g2, 0xd4, %g2 200f5c4: c6 00 40 02 ld [ %g1 + %g2 ], %g3 200f5c8: 82 00 40 02 add %g1, %g2, %g1 200f5cc: 82 00 60 04 add %g1, 4, %g1 200f5d0: 80 a0 c0 01 cmp %g3, %g1 200f5d4: 02 bf ff ed be 200f588 <_POSIX_signals_Clear_process_signals+0x34> 200f5d8: 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 ); 200f5dc: 7f ff c9 e9 call 2001d80 <== NOT EXECUTED 200f5e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200f5e4: 01 00 00 00 nop 0200f628 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 200f628: 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 ) ) { 200f62c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200f630: 05 04 00 20 sethi %hi(0x10008000), %g2 200f634: 88 06 7f ff add %i1, -1, %g4 200f638: 9a 08 40 02 and %g1, %g2, %o5 200f63c: 86 10 20 01 mov 1, %g3 200f640: 80 a3 40 02 cmp %o5, %g2 200f644: 89 28 c0 04 sll %g3, %g4, %g4 200f648: 02 80 00 25 be 200f6dc <_POSIX_signals_Unblock_thread+0xb4> 200f64c: c4 06 21 6c ld [ %i0 + 0x16c ], %g2 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 200f650: c4 00 a0 c4 ld [ %g2 + 0xc4 ], %g2 200f654: 80 a9 00 02 andncc %g4, %g2, %g0 200f658: 02 80 00 1f be 200f6d4 <_POSIX_signals_Unblock_thread+0xac> 200f65c: 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 ) { 200f660: 80 88 40 02 btst %g1, %g2 200f664: 02 80 00 11 be 200f6a8 <_POSIX_signals_Unblock_thread+0x80> 200f668: c6 2e 20 74 stb %g3, [ %i0 + 0x74 ] the_thread->Wait.return_code = EINTR; 200f66c: 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) ){ 200f670: 80 88 60 08 btst 8, %g1 200f674: 02 80 00 18 be 200f6d4 <_POSIX_signals_Unblock_thread+0xac> 200f678: c4 26 20 34 st %g2, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200f67c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200f680: 80 a0 60 02 cmp %g1, 2 200f684: 02 80 00 36 be 200f75c <_POSIX_signals_Unblock_thread+0x134> 200f688: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 200f68c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200f690: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200f694: b0 10 20 00 clr %i0 200f698: 7f ff e0 e1 call 2007a1c <_Thread_Clear_state> 200f69c: 92 12 63 f8 or %o1, 0x3f8, %o1 200f6a0: 81 c7 e0 08 ret 200f6a4: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 200f6a8: 80 a0 60 00 cmp %g1, 0 200f6ac: 12 80 00 0a bne 200f6d4 <_POSIX_signals_Unblock_thread+0xac> 200f6b0: 03 00 80 71 sethi %hi(0x201c400), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 200f6b4: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 201c60c <_ISR_Nest_level> 200f6b8: 80 a0 60 00 cmp %g1, 0 200f6bc: 02 80 00 06 be 200f6d4 <_POSIX_signals_Unblock_thread+0xac> 200f6c0: 03 00 80 71 sethi %hi(0x201c400), %g1 200f6c4: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 201c630 <_Thread_Executing> 200f6c8: 80 a6 00 01 cmp %i0, %g1 200f6cc: 02 80 00 21 be 200f750 <_POSIX_signals_Unblock_thread+0x128> 200f6d0: 03 00 80 71 sethi %hi(0x201c400), %g1 _ISR_Signals_to_thread_executing = true; } } return false; } 200f6d4: 81 c7 e0 08 ret 200f6d8: 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) ) { 200f6dc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200f6e0: 80 89 00 01 btst %g4, %g1 200f6e4: 22 80 00 12 be,a 200f72c <_POSIX_signals_Unblock_thread+0x104> 200f6e8: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 the_thread->Wait.return_code = EINTR; 200f6ec: 82 10 20 04 mov 4, %g1 200f6f0: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 200f6f4: 80 a6 a0 00 cmp %i2, 0 200f6f8: 02 80 00 11 be 200f73c <_POSIX_signals_Unblock_thread+0x114> 200f6fc: 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; 200f700: c4 06 80 00 ld [ %i2 ], %g2 200f704: c4 20 40 00 st %g2, [ %g1 ] 200f708: c4 06 a0 04 ld [ %i2 + 4 ], %g2 200f70c: c4 20 60 04 st %g2, [ %g1 + 4 ] 200f710: c4 06 a0 08 ld [ %i2 + 8 ], %g2 200f714: c4 20 60 08 st %g2, [ %g1 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 200f718: 90 10 00 18 mov %i0, %o0 200f71c: 7f ff e3 ef call 20086d8 <_Thread_queue_Extract_with_proxy> 200f720: b0 10 20 01 mov 1, %i0 return true; 200f724: 81 c7 e0 08 ret 200f728: 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) ) { 200f72c: 80 a9 00 01 andncc %g4, %g1, %g0 200f730: 12 bf ff f0 bne 200f6f0 <_POSIX_signals_Unblock_thread+0xc8> 200f734: 82 10 20 04 mov 4, %g1 200f738: 30 bf ff e7 b,a 200f6d4 <_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; 200f73c: 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; 200f740: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 200f744: 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; 200f748: 10 bf ff f4 b 200f718 <_POSIX_signals_Unblock_thread+0xf0> 200f74c: 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; 200f750: c6 28 62 c8 stb %g3, [ %g1 + 0x2c8 ] 200f754: 81 c7 e0 08 ret 200f758: 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 ); 200f75c: 7f ff e6 dd call 20092d0 <_Watchdog_Remove> 200f760: 90 06 20 48 add %i0, 0x48, %o0 200f764: 10 bf ff cb b 200f690 <_POSIX_signals_Unblock_thread+0x68> 200f768: 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 24 lduh [ %l1 + 0x224 ], %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 24 sth %g1, [ %l1 + 0x224 ] 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 24 lduh [ %l1 + 0x224 ], %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 c4 ld [ %g2 + 0xc4 ], %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 40 or %g3, 0x40, %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 a0 or %g4, 0x2a0, %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 30 ld [ %g2 + 0x230 ], %g2 ! 201c630 <_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 00 st %g1, [ %g3 + 0x200 ] _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 40 stb %g2, [ %g1 + 0x240 ] ! 201c640 <_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 40 or %g3, 0x40, %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 a0 or %g4, 0x2a0, %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 ] 0200cebc <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200cebc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200cec0: 03 00 80 71 sethi %hi(0x201c400), %g1 200cec4: e0 00 62 30 ld [ %g1 + 0x230 ], %l0 ! 201c630 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200cec8: 7f ff d3 aa call 2001d70 200cecc: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200ced0: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200ced4: c4 04 40 00 ld [ %l1 ], %g2 200ced8: c2 04 60 08 ld [ %l1 + 8 ], %g1 200cedc: 80 a0 80 01 cmp %g2, %g1 200cee0: 02 80 00 1f be 200cf5c <_Thread_Reset_timeslice+0xa0> 200cee4: 86 04 60 04 add %l1, 4, %g3 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200cee8: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 200ceec: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200cef0: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200cef4: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200cef8: 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; 200cefc: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200cf00: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200cf04: 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; 200cf08: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200cf0c: 7f ff d3 9d call 2001d80 200cf10: 01 00 00 00 nop 200cf14: 7f ff d3 97 call 2001d70 200cf18: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200cf1c: 03 00 80 71 sethi %hi(0x201c400), %g1 200cf20: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 201c600 <_Thread_Heir> 200cf24: 80 a4 00 02 cmp %l0, %g2 200cf28: 02 80 00 06 be 200cf40 <_Thread_Reset_timeslice+0x84> 200cf2c: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 200cf30: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED 200cf34: c4 28 62 40 stb %g2, [ %g1 + 0x240 ] ! 201c640 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 200cf38: 7f ff d3 92 call 2001d80 <== NOT EXECUTED 200cf3c: 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; 200cf40: c4 04 40 00 ld [ %l1 ], %g2 200cf44: c4 20 62 00 st %g2, [ %g1 + 0x200 ] _Context_Switch_necessary = true; 200cf48: 84 10 20 01 mov 1, %g2 200cf4c: 03 00 80 71 sethi %hi(0x201c400), %g1 200cf50: c4 28 62 40 stb %g2, [ %g1 + 0x240 ] ! 201c640 <_Context_Switch_necessary> _ISR_Enable( level ); 200cf54: 7f ff d3 8b call 2001d80 200cf58: 81 e8 00 00 restore executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 200cf5c: 7f ff d3 89 call 2001d80 200cf60: 81 e8 00 00 restore 200cf64: 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 30 ld [ %g1 + 0x230 ], %l0 ! 201c630 <_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 00 ld [ %g1 + 0x200 ], %g2 ! 201c600 <_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 40 stb %g2, [ %g1 + 0x240 ] ! 201c640 <_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 00 ld [ %g1 + 0x200 ], %g1 ! 201c600 <_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 00 st %g2, [ %g1 + 0x200 ] 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 24 or %l6, 0x324, %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 13 call 200cc34 <_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 64 or %l6, 0x64, %l6 2015b9c: aa 15 63 a4 or %l5, 0x3a4, %l5 2015ba0: b8 17 23 10 or %i4, 0x310, %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 ] 0200f21c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 200f21c: 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() ) 200f220: 7f ff fb 71 call 200dfe4 200f224: 01 00 00 00 nop 200f228: 80 a2 00 18 cmp %o0, %i0 200f22c: 12 80 00 b6 bne 200f504 200f230: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 200f234: 02 80 00 ba be 200f51c 200f238: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 200f23c: 80 a0 60 1f cmp %g1, 0x1f 200f240: 18 80 00 b7 bgu 200f51c 200f244: 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 ) 200f248: a5 2e 60 02 sll %i1, 2, %l2 200f24c: a2 14 63 04 or %l1, 0x304, %l1 200f250: a7 2e 60 04 sll %i1, 4, %l3 200f254: 84 24 c0 12 sub %l3, %l2, %g2 200f258: 84 04 40 02 add %l1, %g2, %g2 200f25c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200f260: 80 a0 a0 01 cmp %g2, 1 200f264: 02 80 00 45 be 200f378 200f268: 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 ) ) 200f26c: 80 a6 60 04 cmp %i1, 4 200f270: 02 80 00 44 be 200f380 200f274: 80 a6 60 08 cmp %i1, 8 200f278: 02 80 00 42 be 200f380 200f27c: 80 a6 60 0b cmp %i1, 0xb 200f280: 02 80 00 40 be 200f380 200f284: a0 10 20 01 mov 1, %l0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 200f288: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 200f28c: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 200f290: 80 a6 a0 00 cmp %i2, 0 200f294: 02 80 00 41 be 200f398 200f298: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 200f29c: c2 06 80 00 ld [ %i2 ], %g1 200f2a0: c2 27 bf fc st %g1, [ %fp + -4 ] 200f2a4: 03 00 80 71 sethi %hi(0x201c400), %g1 200f2a8: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 201c570 <_Thread_Dispatch_disable_level> 200f2ac: 84 00 a0 01 inc %g2 200f2b0: c4 20 61 70 st %g2, [ %g1 + 0x170 ] /* * 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; 200f2b4: 03 00 80 71 sethi %hi(0x201c400), %g1 200f2b8: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 201c630 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200f2bc: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 200f2c0: c4 00 a0 c4 ld [ %g2 + 0xc4 ], %g2 200f2c4: 80 ac 00 02 andncc %l0, %g2, %g0 200f2c8: 12 80 00 1a bne 200f330 200f2cc: 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 ; 200f2d0: c4 01 20 90 ld [ %g4 + 0x90 ], %g2 ! 201cc90 <_POSIX_signals_Wait_queue> 200f2d4: 88 11 20 90 or %g4, 0x90, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200f2d8: 88 01 20 04 add %g4, 4, %g4 200f2dc: 80 a0 80 04 cmp %g2, %g4 200f2e0: 02 80 00 30 be 200f3a0 200f2e4: 82 10 00 02 mov %g2, %g1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200f2e8: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 200f2ec: 80 8c 00 03 btst %l0, %g3 200f2f0: 02 80 00 0c be 200f320 200f2f4: 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; 200f2f8: 10 80 00 0f b 200f334 200f2fc: 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 ; 200f300: 80 a0 80 04 cmp %g2, %g4 200f304: 22 80 00 28 be,a 200f3a4 200f308: 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) 200f30c: 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 ]; 200f310: 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) 200f314: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 200f318: 12 80 00 06 bne 200f330 <== NOT EXECUTED 200f31c: 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) 200f320: c6 00 e0 c4 ld [ %g3 + 0xc4 ], %g3 200f324: 80 ac 00 03 andncc %l0, %g3, %g0 200f328: 22 bf ff f6 be,a 200f300 200f32c: 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; 200f330: 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 ) ) { 200f334: 90 10 00 01 mov %g1, %o0 200f338: 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; 200f33c: 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 ) ) { 200f340: 40 00 00 ba call 200f628 <_POSIX_signals_Unblock_thread> 200f344: 94 07 bf f4 add %fp, -12, %o2 200f348: 80 8a 20 ff btst 0xff, %o0 200f34c: 12 80 00 5a bne 200f4b4 200f350: 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 ); 200f354: 40 00 00 a5 call 200f5e8 <_POSIX_signals_Set_process_signals> 200f358: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 200f35c: a4 24 c0 12 sub %l3, %l2, %l2 200f360: c2 04 40 12 ld [ %l1 + %l2 ], %g1 200f364: 80 a0 60 02 cmp %g1, 2 200f368: 02 80 00 57 be 200f4c4 200f36c: 11 00 80 73 sethi %hi(0x201cc00), %o0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 200f370: 7f ff e2 c5 call 2007e84 <_Thread_Enable_dispatch> 200f374: b0 10 20 00 clr %i0 return 0; } 200f378: 81 c7 e0 08 ret 200f37c: 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 ); 200f380: 40 00 01 38 call 200f860 200f384: 01 00 00 00 nop 200f388: 40 00 00 f9 call 200f76c 200f38c: 92 10 00 19 mov %i1, %o1 200f390: 81 c7 e0 08 ret 200f394: 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; 200f398: 10 bf ff c3 b 200f2a4 200f39c: c0 27 bf fc clr [ %fp + -4 ] * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 200f3a0: 03 00 80 6e sethi %hi(0x201b800), %g1 200f3a4: da 08 63 24 ldub [ %g1 + 0x324 ], %o5 ! 201bb24 200f3a8: 13 00 80 71 sethi %hi(0x201c400), %o1 200f3ac: 9a 03 60 01 inc %o5 200f3b0: 92 12 60 d8 or %o1, 0xd8, %o1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 200f3b4: 82 10 20 00 clr %g1 200f3b8: 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) ) { 200f3bc: 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 ] ) 200f3c0: c4 02 40 00 ld [ %o1 ], %g2 200f3c4: 80 a0 a0 00 cmp %g2, 0 200f3c8: 22 80 00 2d be,a 200f47c 200f3cc: 92 02 60 04 add %o1, 4, %o1 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 200f3d0: c4 00 a0 04 ld [ %g2 + 4 ], %g2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 200f3d4: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 200f3d8: 80 a3 20 00 cmp %o4, 0 200f3dc: 02 80 00 27 be 200f478 200f3e0: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3 200f3e4: 84 10 20 01 mov 1, %g2 the_thread = (Thread_Control *) object_table[ index ]; 200f3e8: 87 28 a0 02 sll %g2, 2, %g3 200f3ec: c6 02 c0 03 ld [ %o3 + %g3 ], %g3 if ( !the_thread ) 200f3f0: 80 a0 e0 00 cmp %g3, 0 200f3f4: 02 80 00 1e be 200f46c 200f3f8: 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 ) 200f3fc: c8 00 e0 14 ld [ %g3 + 0x14 ], %g4 200f400: 80 a1 00 0d cmp %g4, %o5 200f404: 18 80 00 1b bgu 200f470 200f408: 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 ]; 200f40c: d4 00 e1 6c ld [ %g3 + 0x16c ], %o2 200f410: d4 02 a0 c4 ld [ %o2 + 0xc4 ], %o2 200f414: 80 ac 00 0a andncc %l0, %o2, %g0 200f418: 02 80 00 16 be 200f470 200f41c: 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 ) { 200f420: 80 a1 00 0d cmp %g4, %o5 200f424: 2a 80 00 11 bcs,a 200f468 200f428: 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 ) ) { 200f42c: d4 00 60 10 ld [ %g1 + 0x10 ], %o2 200f430: 80 a2 a0 00 cmp %o2, 0 200f434: 02 80 00 0f be 200f470 200f438: 80 a3 00 02 cmp %o4, %g2 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 200f43c: de 00 e0 10 ld [ %g3 + 0x10 ], %o7 200f440: 80 a3 e0 00 cmp %o7, 0 200f444: 22 80 00 09 be,a 200f468 200f448: 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) ) { 200f44c: 80 8a 80 1a btst %o2, %i2 200f450: 12 80 00 08 bne 200f470 200f454: 80 a3 00 02 cmp %o4, %g2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 200f458: 80 8b c0 1a btst %o7, %i2 200f45c: 02 80 00 05 be 200f470 200f460: 80 a3 00 02 cmp %o4, %g2 200f464: 9a 10 00 04 mov %g4, %o5 200f468: 82 10 00 03 mov %g3, %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 200f46c: 80 a3 00 02 cmp %o4, %g2 200f470: 1a bf ff df bcc 200f3ec 200f474: 87 28 a0 02 sll %g2, 2, %g3 200f478: 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++) { 200f47c: 80 a2 40 08 cmp %o1, %o0 200f480: 32 bf ff d1 bne,a 200f3c4 200f484: c4 02 40 00 ld [ %o1 ], %g2 } } } } if ( interested ) { 200f488: 80 a0 60 00 cmp %g1, 0 200f48c: 02 bf ff b2 be 200f354 200f490: 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 ) ) { 200f494: 90 10 00 01 mov %g1, %o0 200f498: 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; 200f49c: 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 ) ) { 200f4a0: 40 00 00 62 call 200f628 <_POSIX_signals_Unblock_thread> 200f4a4: 94 07 bf f4 add %fp, -12, %o2 200f4a8: 80 8a 20 ff btst 0xff, %o0 200f4ac: 02 bf ff aa be 200f354 200f4b0: 01 00 00 00 nop _Thread_Enable_dispatch(); 200f4b4: 7f ff e2 74 call 2007e84 <_Thread_Enable_dispatch> 200f4b8: b0 10 20 00 clr %i0 ! 0 return 0; 200f4bc: 81 c7 e0 08 ret 200f4c0: 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 *) 200f4c4: 7f ff f3 a6 call 200c35c <_Chain_Get> 200f4c8: 90 12 20 84 or %o0, 0x84, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 200f4cc: 80 a2 20 00 cmp %o0, 0 200f4d0: 02 80 00 19 be 200f534 200f4d4: 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 ); 200f4d8: 92 10 00 08 mov %o0, %o1 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 200f4dc: c2 22 20 08 st %g1, [ %o0 + 8 ] 200f4e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 200f4e4: c2 22 20 0c st %g1, [ %o0 + 0xc ] 200f4e8: c2 07 bf fc ld [ %fp + -4 ], %g1 200f4ec: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 200f4f0: 11 00 80 73 sethi %hi(0x201cc00), %o0 200f4f4: 90 12 20 d4 or %o0, 0xd4, %o0 ! 201ccd4 <_POSIX_signals_Siginfo> 200f4f8: 7f ff dc 17 call 2006554 <_Chain_Append> 200f4fc: 90 02 00 12 add %o0, %l2, %o0 200f500: 30 bf ff 9c b,a 200f370 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 200f504: 40 00 01 0c call 200f934 <__errno> 200f508: b0 10 3f ff mov -1, %i0 200f50c: 82 10 20 03 mov 3, %g1 200f510: c2 22 00 00 st %g1, [ %o0 ] 200f514: 81 c7 e0 08 ret 200f518: 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 ); 200f51c: 40 00 01 06 call 200f934 <__errno> 200f520: b0 10 3f ff mov -1, %i0 200f524: 82 10 20 16 mov 0x16, %g1 200f528: c2 22 00 00 st %g1, [ %o0 ] 200f52c: 81 c7 e0 08 ret 200f530: 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(); 200f534: 7f ff e2 54 call 2007e84 <_Thread_Enable_dispatch> 200f538: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 200f53c: 40 00 00 fe call 200f934 <__errno> 200f540: 01 00 00 00 nop 200f544: 82 10 20 0b mov 0xb, %g1 ! b 200f548: c2 22 00 00 st %g1, [ %o0 ] 200f54c: 81 c7 e0 08 ret 200f550: 81 e8 00 00 restore 020063e0 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 20063e0: 9d e3 bf 98 save %sp, -104, %sp if ( !once_control || !init_routine ) 20063e4: 80 a6 60 00 cmp %i1, 0 20063e8: 02 80 00 19 be 200644c 20063ec: a0 10 00 18 mov %i0, %l0 20063f0: 80 a6 20 00 cmp %i0, 0 20063f4: 02 80 00 16 be 200644c 20063f8: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 20063fc: c2 06 20 04 ld [ %i0 + 4 ], %g1 2006400: 80 a0 60 00 cmp %g1, 0 2006404: 12 80 00 10 bne 2006444 2006408: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 200640c: a2 07 bf fc add %fp, -4, %l1 2006410: 90 10 21 00 mov 0x100, %o0 2006414: 92 10 21 00 mov 0x100, %o1 2006418: 40 00 03 01 call 200701c 200641c: 94 10 00 11 mov %l1, %o2 if ( !once_control->init_executed ) { 2006420: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006424: 80 a0 60 00 cmp %g1, 0 2006428: 02 80 00 0b be 2006454 200642c: 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); 2006430: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED 2006434: 94 10 00 11 mov %l1, %o2 2006438: 92 10 21 00 mov 0x100, %o1 200643c: 40 00 02 f8 call 200701c 2006440: b0 10 20 00 clr %i0 } return 0; } 2006444: 81 c7 e0 08 ret 2006448: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 200644c: 81 c7 e0 08 ret 2006450: 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; 2006454: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 2006458: 9f c6 40 00 call %i1 200645c: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 2006460: 10 bf ff f5 b 2006434 2006464: d0 07 bf fc ld [ %fp + -4 ], %o0 02005fdc : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 2005fdc: 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() ) 2005fe0: 03 00 80 78 sethi %hi(0x201e000), %g1 2005fe4: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201e37c <_ISR_Nest_level> 2005fe8: 80 a0 60 00 cmp %g1, 0 2005fec: 12 80 00 15 bne 2006040 2005ff0: 03 00 80 78 sethi %hi(0x201e000), %g1 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005ff4: 21 00 80 78 sethi %hi(0x201e000), %l0 2005ff8: c6 00 62 e0 ld [ %g1 + 0x2e0 ], %g3 2005ffc: c4 04 23 a0 ld [ %l0 + 0x3a0 ], %g2 2006000: 86 00 e0 01 inc %g3 2006004: c6 20 62 e0 st %g3, [ %g1 + 0x2e0 ] 2006008: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200600c: c4 00 60 cc ld [ %g1 + 0xcc ], %g2 2006010: 80 a0 a0 00 cmp %g2, 0 2006014: 12 80 00 0d bne 2006048 2006018: 01 00 00 00 nop thread_support->cancelation_requested ) 200601c: c2 00 60 d4 ld [ %g1 + 0xd4 ], %g1 2006020: 80 a0 60 00 cmp %g1, 0 2006024: 02 80 00 09 be 2006048 2006028: 01 00 00 00 nop cancel = true; _Thread_Enable_dispatch(); 200602c: 40 00 0a 56 call 2008984 <_Thread_Enable_dispatch> 2006030: b2 10 3f ff mov -1, %i1 ! ffffffff if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 2006034: f0 04 23 a0 ld [ %l0 + 0x3a0 ], %i0 2006038: 40 00 1a 12 call 200c880 <_POSIX_Thread_Exit> 200603c: 81 e8 00 00 restore 2006040: 81 c7 e0 08 ret <== NOT EXECUTED 2006044: 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(); 2006048: 40 00 0a 4f call 2008984 <_Thread_Enable_dispatch> 200604c: 81 e8 00 00 restore 2006050: 01 00 00 00 nop 02007fe0 : 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 ) { 2007fe0: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 2007fe4: 03 00 80 8a sethi %hi(0x2022800), %g1 2007fe8: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 ! 202290c <_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; 2007fec: 09 00 80 8c sethi %hi(0x2023000), %g4 if ( rtems_interrupt_is_in_progress() ) 2007ff0: 80 a0 60 00 cmp %g1, 0 2007ff4: 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 ) { 2007ff8: 82 10 00 19 mov %i1, %g1 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 2007ffc: 12 80 00 49 bne 2008120 2008000: c6 01 21 f4 ld [ %g4 + 0x1f4 ], %g3 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 2008004: 80 a6 a0 00 cmp %i2, 0 2008008: 02 80 00 4b be 2008134 200800c: 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 ) 2008010: 02 80 00 49 be 2008134 2008014: 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; 2008018: c4 06 40 00 ld [ %i1 ], %g2 200801c: 80 a0 a0 00 cmp %g2, 0 2008020: 22 80 00 42 be,a 2008128 2008024: 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 ) 2008028: 80 a0 c0 18 cmp %g3, %i0 200802c: 08 80 00 3d bleu 2008120 2008030: 84 10 20 0a mov 0xa, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2008034: 05 00 80 8a sethi %hi(0x2022800), %g2 2008038: c6 00 a0 70 ld [ %g2 + 0x70 ], %g3 ! 2022870 <_Thread_Dispatch_disable_level> 200803c: 86 00 e0 01 inc %g3 2008040: c6 20 a0 70 st %g3, [ %g2 + 0x70 ] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 2008044: 80 a6 20 00 cmp %i0, 0 2008048: 12 80 00 2b bne 20080f4 200804c: 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; 2008050: da 01 21 f4 ld [ %g4 + 0x1f4 ], %o5 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 2008054: 80 a3 60 00 cmp %o5, 0 2008058: 02 80 00 3a be 2008140 200805c: d8 00 a1 f8 ld [ %g2 + 0x1f8 ], %o4 2008060: 10 80 00 05 b 2008074 2008064: 86 10 00 0c mov %o4, %g3 2008068: 80 a3 40 18 cmp %o5, %i0 200806c: 08 80 00 0b bleu 2008098 2008070: 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; 2008074: c8 00 c0 00 ld [ %g3 ], %g4 2008078: 80 a1 20 00 cmp %g4, 0 200807c: 32 bf ff fb bne,a 2008068 2008080: b0 06 20 01 inc %i0 2008084: c8 00 e0 04 ld [ %g3 + 4 ], %g4 2008088: 80 a1 20 00 cmp %g4, 0 200808c: 32 bf ff f7 bne,a 2008068 2008090: b0 06 20 01 inc %i0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 2008094: 80 a3 40 18 cmp %o5, %i0 2008098: 02 80 00 2b be 2008144 200809c: f0 26 80 00 st %i0, [ %i2 ] 20080a0: 85 2e 20 03 sll %i0, 3, %g2 20080a4: 87 2e 20 05 sll %i0, 5, %g3 20080a8: 84 20 c0 02 sub %g3, %g2, %g2 20080ac: 84 03 00 02 add %o4, %g2, %g2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 20080b0: c6 00 40 00 ld [ %g1 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 20080b4: b2 10 20 00 clr %i1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 20080b8: c6 20 80 00 st %g3, [ %g2 ] 20080bc: c6 00 60 04 ld [ %g1 + 4 ], %g3 _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 20080c0: b4 10 20 00 clr %i2 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 20080c4: c6 20 a0 04 st %g3, [ %g2 + 4 ] 20080c8: c6 00 60 08 ld [ %g1 + 8 ], %g3 20080cc: c6 20 a0 08 st %g3, [ %g2 + 8 ] 20080d0: c6 00 60 0c ld [ %g1 + 0xc ], %g3 20080d4: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 20080d8: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 20080dc: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] 20080e0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 _Thread_Enable_dispatch(); 20080e4: 40 00 07 53 call 2009e30 <_Thread_Enable_dispatch> 20080e8: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return rtems_io_initialize( major, 0, NULL ); 20080ec: 40 00 26 f6 call 2011cc4 20080f0: 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; 20080f4: c6 00 a1 f8 ld [ %g2 + 0x1f8 ], %g3 20080f8: 89 2e 20 05 sll %i0, 5, %g4 20080fc: 85 2e 20 03 sll %i0, 3, %g2 2008100: 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; 2008104: c8 00 c0 02 ld [ %g3 + %g2 ], %g4 2008108: 80 a1 20 00 cmp %g4, 0 200810c: 02 80 00 12 be 2008154 2008110: 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(); 2008114: 40 00 07 47 call 2009e30 <_Thread_Enable_dispatch> 2008118: 01 00 00 00 nop 200811c: 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 ); } 2008120: 81 c7 e0 08 ret 2008124: 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; 2008128: 80 a0 a0 00 cmp %g2, 0 200812c: 12 bf ff c0 bne 200802c 2008130: 80 a0 c0 18 cmp %g3, %i0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 2008134: 84 10 20 09 mov 9, %g2 } 2008138: 81 c7 e0 08 ret 200813c: 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; 2008140: 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(); 2008144: 40 00 07 3b call 2009e30 <_Thread_Enable_dispatch> 2008148: 01 00 00 00 nop return sc; 200814c: 10 bf ff f5 b 2008120 2008150: 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; 2008154: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008158: 80 a0 e0 00 cmp %g3, 0 200815c: 12 bf ff ee bne 2008114 2008160: 01 00 00 00 nop if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 2008164: 10 bf ff d3 b 20080b0 2008168: 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 be call 200fc8c <_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 b9 call 200fc8c <_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 0200848c : #include int sigsuspend( const sigset_t *sigmask ) { 200848c: 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 ); 2008490: 90 10 20 01 mov 1, %o0 2008494: 92 10 00 18 mov %i0, %o1 2008498: a0 07 bf fc add %fp, -4, %l0 200849c: 7f ff ff f1 call 2008460 20084a0: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 20084a4: a2 07 bf f8 add %fp, -8, %l1 20084a8: 7f ff ff b7 call 2008384 20084ac: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 20084b0: 90 10 00 11 mov %l1, %o0 20084b4: 92 10 20 00 clr %o1 20084b8: 40 00 00 2b call 2008564 20084bc: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 20084c0: 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 ); 20084c4: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 20084c8: 94 10 20 00 clr %o2 20084cc: 7f ff ff e5 call 2008460 20084d0: 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 ) 20084d4: 80 a4 7f ff cmp %l1, -1 20084d8: 12 80 00 05 bne 20084ec 20084dc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 20084e0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20084e4: 81 c7 e0 08 ret <== NOT EXECUTED 20084e8: 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 ); 20084ec: 40 00 29 1e call 2012964 <__errno> 20084f0: b0 10 3f ff mov -1, %i0 20084f4: 82 10 20 04 mov 4, %g1 20084f8: c2 22 00 00 st %g1, [ %o0 ] 20084fc: 81 c7 e0 08 ret 2008500: 81 e8 00 00 restore