00059828 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 59828: 4e56 ffe0 linkw %fp,#-32 5982c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59830: 266e 0008 moveal %fp@(8),%a3 59834: 282e 000c movel %fp@(12),%d4 59838: 242e 0010 movel %fp@(16),%d2 5983c: 2a2e 001c movel %fp@(28),%d5 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 59840: b4ab 004c cmpl %a3@(76),%d2 59844: 6262 bhis 598a8 <_CORE_message_queue_Broadcast+0x80> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 59846: 4aab 0048 tstl %a3@(72) 5984a: 664c bnes 59898 <_CORE_message_queue_Broadcast+0x70> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5984c: 2f0b movel %a3,%sp@- 5984e: 49f9 0005 bf74 lea 5bf74 <_Thread_queue_Dequeue>,%a4 59854: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59856: 4bf9 0006 30d8 lea 630d8 ,%a5 5985c: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5985e: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59860: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59862: 4a80 tstl %d0 59864: 6722 beqs 59888 <_CORE_message_queue_Broadcast+0x60> 59866: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59868: 5283 addql #1,%d3 5986a: 2f04 movel %d4,%sp@- 5986c: 2f2a 002c movel %a2@(44),%sp@- 59870: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59872: 206a 0028 moveal %a2@(40),%a0 59876: 4fef 000c lea %sp@(12),%sp 5987a: 2082 movel %d2,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5987c: 2f0b movel %a3,%sp@- 5987e: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59880: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59882: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59884: 4a80 tstl %d0 59886: 66de bnes 59866 <_CORE_message_queue_Broadcast+0x3e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 59888: 2045 moveal %d5,%a0 5988a: 4280 clrl %d0 5988c: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5988e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59894: 4e5e unlk %fp 59896: 4e75 rts * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 59898: 2045 moveal %d5,%a0 5989a: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5989c: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 598a2: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 598a4: 4e5e unlk %fp 598a6: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 598a8: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 598aa: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 598b0: 4e5e unlk %fp <== NOT EXECUTED 598b2: 4e75 rts 0004fe54 <_CORE_message_queue_Initialize>: /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe54: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4fe56: 4e56 fff4 linkw %fp,#-12 4fe5a: 202e 0014 movel %fp@(20),%d0 4fe5e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe62: 246e 0008 moveal %fp@(8),%a2 4fe66: 242e 0010 movel %fp@(16),%d2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe6a: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4fe6c: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4fe70: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4fe74: 2540 004c movel %d0,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4fe78: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 4fe7c: 42aa 0064 clrl %a2@(100) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe80: 4a81 tstl %d1 4fe82: 6620 bnes 4fea4 <_CORE_message_queue_Initialize+0x50> 4fe84: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4fe86: 2601 movel %d1,%d3 4fe88: 0683 0000 0014 addil #20,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4fe8e: 2003 movel %d3,%d0 4fe90: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4fe94: b280 cmpl %d0,%d1 4fe96: 631c blss 4feb4 <_CORE_message_queue_Initialize+0x60> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe98: 4200 clrb %d0 } 4fe9a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fea0: 4e5e unlk %fp 4fea2: 4e75 rts * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 4fea4: 2200 movel %d0,%d1 4fea6: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4fea8: 76fc moveq #-4,%d3 4feaa: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4feac: b280 cmpl %d0,%d1 4feae: 64d6 bccs 4fe86 <_CORE_message_queue_Initialize+0x32> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4feb0: 4200 clrb %d0 <== NOT EXECUTED 4feb2: 60e6 bras 4fe9a <_CORE_message_queue_Initialize+0x46> <== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4feb4: 2f00 movel %d0,%sp@- 4feb6: 4eb9 0005 2cd4 jsr 52cd4 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4febc: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4febe: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fec2: 67d4 beqs 4fe98 <_CORE_message_queue_Initialize+0x44> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4fec4: 2f03 movel %d3,%sp@- 4fec6: 2f02 movel %d2,%sp@- 4fec8: 2f00 movel %d0,%sp@- 4feca: 486a 0068 pea %a2@(104) 4fece: 4eb9 0005 5338 jsr 55338 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4fed4: 4878 0006 pea 6 4fed8: 7001 moveq #1,%d0 4feda: 206e 000c moveal %fp@(12),%a0 4fede: b090 cmpl %a0@,%d0 4fee0: 57c0 seq %d0 4fee2: 4878 0080 pea 80 4fee6: 49c0 extbl %d0 4fee8: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4feea: 41ea 0054 lea %a2@(84),%a0 4feee: 2f00 movel %d0,%sp@- 4fef0: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4fef4: 41ea 0050 lea %a2@(80),%a0 4fef8: 2548 0058 movel %a0,%a2@(88) 4fefc: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4fefe: 42aa 0054 clrl %a2@(84) 4ff02: 4eb9 0005 2074 jsr 52074 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff08: 4fef 0020 lea %sp@(32),%sp } 4ff0c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4ff12: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4ff14: 4e5e unlk %fp 4ff16: 4e75 rts 00046b6c <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 46b6c: 4e56 0000 linkw %fp,#0 46b70: 2f0a movel %a2,%sp@- 46b72: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b76: 2f0a movel %a2,%sp@- 46b78: 4eb9 0004 81a8 jsr 481a8 <_Thread_queue_Dequeue> 46b7e: 588f addql #4,%sp 46b80: 4a80 tstl %d0 46b82: 670a beqs 46b8e <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b84: 246e fffc moveal %fp@(-4),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b88: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b8a: 4e5e unlk %fp 46b8c: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b8e: 203c 0000 0700 movel #1792,%d0 46b94: 40c1 movew %sr,%d1 46b96: 8081 orl %d1,%d0 46b98: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b9a: 202a 0048 movel %a2@(72),%d0 46b9e: b0aa 0040 cmpl %a2@(64),%d0 46ba2: 6412 bccs 46bb6 <_CORE_semaphore_Surrender+0x4a> the_semaphore->count += 1; 46ba4: 5280 addql #1,%d0 46ba6: 2540 0048 movel %d0,%a2@(72) 46baa: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bac: 46c1 movew %d1,%sr } return status; } 46bae: 246e fffc moveal %fp@(-4),%a2 46bb2: 4e5e unlk %fp 46bb4: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46bb6: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bb8: 46c1 movew %d1,%sr <== NOT EXECUTED 46bba: 60f2 bras 46bae <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED 00050e38 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50e38: 4e56 fff4 linkw %fp,#-12 50e3c: 206e 0008 moveal %fp@(8),%a0 50e40: 202e 000c movel %fp@(12),%d0 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 50e44: 2228 001c movel %a0@(28),%d1 uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 50e48: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50e4c: 48d7 040c moveml %d2-%d3/%a2,%sp@ Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 50e50: b0a8 0018 cmpl %a0@(24),%d0 50e54: 6410 bccs 50e66 <_Heap_Extend+0x2e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 50e56: b280 cmpl %d0,%d1 50e58: 671c beqs 50e76 <_Heap_Extend+0x3e> 50e5a: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50e5c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50e62: 4e5e unlk %fp 50e64: 4e75 rts * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 50e66: b280 cmpl %d0,%d1 50e68: 63ec blss 50e56 <_Heap_Extend+0x1e> 50e6a: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50e6c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50e72: 4e5e unlk %fp 50e74: 4e75 rts { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 50e76: 2200 movel %d0,%d1 50e78: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 50e7c: 70f8 moveq #-8,%d0 50e7e: 9089 subl %a1,%d0 50e80: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 50e82: 2600 movel %d0,%d3 50e84: 4c68 3002 0010 remul %a0@(16),%d2,%d3 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 50e8a: 2141 001c movel %d1,%a0@(28) extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 50e8e: 246e 0014 moveal %fp@(20),%a2 50e92: 9082 subl %d2,%d0 50e94: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50e96: b0a8 0014 cmpl %a0@(20),%d0 50e9a: 640c bccs 50ea8 <_Heap_Extend+0x70> /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50e9c: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 50e9e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50ea4: 4e5e unlk %fp 50ea6: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50ea8: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 50eaa: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50eae: c4a9 0004 andl %a1@(4),%d2 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 50eb2: 2228 0020 movel %a0@(32),%d1 50eb6: 928a subl %a2,%d1 50eb8: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 50eba: 214a 0024 movel %a2,%a0@(36) 50ebe: 2342 0004 movel %d2,%a1@(4) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 50ec2: 7401 moveq #1,%d2 50ec4: 8481 orl %d1,%d2 50ec6: 2542 0004 movel %d2,%a2@(4) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50eca: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 50ece: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 50ed2: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 50ed6: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50eda: 2f08 movel %a0,%sp@- 50edc: 4eb9 0004 b578 jsr 4b578 <_Heap_Free> 50ee2: 508f addql #8,%sp 50ee4: 4280 clrl %d0 50ee6: 60b6 bras 50e9e <_Heap_Extend+0x66> 0007c1f4 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 7c1f4: 4e56 fff4 linkw %fp,#-12 7c1f8: 206e 0008 moveal %fp@(8),%a0 7c1fc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7c200: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 7c204: 2428 0024 movel %a0@(36),%d2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 7c208: 2268 0020 moveal %a0@(32),%a1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 7c20c: 4292 clrl %a2@ the_info->Free.total = 0; 7c20e: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 7c212: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 7c216: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 7c21a: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 7c21e: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 7c222: b489 cmpl %a1,%d2 7c224: 6746 beqs 7c26c <_Heap_Get_information+0x78> uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 7c226: 260a movel %a2,%d3 7c228: 0683 0000 000c addil #12,%d3 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7c22e: 2229 0004 movel %a1@(4),%d1 - 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; 7c232: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 7c234: 204a moveal %a2,%a0 7c236: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7c238: d3c0 addal %d0,%a1 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; 7c23a: 2229 0004 movel %a1@(4),%d1 7c23e: 0801 0000 btst #0,%d1 7c242: 6702 beqs 7c246 <_Heap_Get_information+0x52> 7c244: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 7c246: 5290 addql #1,%a0@ info->total += the_size; 7c248: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 7c24c: b0a8 0004 cmpl %a0@(4),%d0 7c250: 6304 blss 7c256 <_Heap_Get_information+0x62> info->largest = the_size; 7c252: 2140 0004 movel %d0,%a0@(4) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7c256: b3c2 cmpal %d2,%a1 7c258: 66d8 bnes 7c232 <_Heap_Get_information+0x3e> 7c25a: 202a 0014 movel %a2@(20),%d0 7c25e: 5080 addql #8,%d0 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7c260: 2540 0014 movel %d0,%a2@(20) } 7c264: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7c268: 4e5e unlk %fp 7c26a: 4e75 rts the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7c26c: 7008 moveq #8,%d0 <== NOT EXECUTED /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7c26e: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 7c272: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7c276: 4e5e unlk %fp <== NOT EXECUTED 7c278: 4e75 rts <== NOT EXECUTED ... 00046fcc <_Internal_error_Occurred>: _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fcc: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fce: 4e56 0000 linkw %fp,#0 46fd2: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fd6: 1001 moveb %d1,%d0 46fd8: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fda: 2f03 movel %d3,%sp@- 46fdc: 202e 0008 movel %fp@(8),%d0 46fe0: 2f02 movel %d2,%sp@- 46fe2: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fe6: 2f02 movel %d2,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46fe8: 13c1 0005 f1fe moveb %d1,5f1fe <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fee: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46ff0: 23c0 0005 f1fa movel %d0,5f1fa <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46ff6: 2f00 movel %d0,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46ff8: 23c2 0005 f200 movel %d2,5f200 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46ffe: 4eb9 0004 8de2 jsr 48de2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47004: 307c 0700 moveaw #1792,%a0 47008: 2608 movel %a0,%d3 4700a: 40c0 movew %sr,%d0 4700c: 8083 orl %d3,%d0 4700e: 46c0 movew %d0,%sr 47010: 2002 movel %d2,%d0 <== NOT EXECUTED 47012: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47018: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 4701a: 7005 moveq #5,%d0 4701c: 4fef 000c lea %sp@(12),%sp 47020: 23c0 0005 f2dc movel %d0,5f2dc <_System_state_Current> 47026: 60fe bras 47026 <_Internal_error_Occurred+0x5a> 00047090 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47090: 4e56 fff0 linkw %fp,#-16 47094: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47098: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 4709c: 4aaa 0014 tstl %a2@(20) 470a0: 660c bnes 470ae <_Objects_Allocate+0x1e> 470a2: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 470a4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470aa: 4e5e unlk %fp 470ac: 4e75 rts /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470ae: 240a movel %a2,%d2 470b0: 0682 0000 001c addil #28,%d2 470b6: 47f9 0004 baa4 lea 4baa4 <_Chain_Get>,%a3 470bc: 2f02 movel %d2,%sp@- 470be: 4e93 jsr %a3@ if ( information->auto_extend ) { 470c0: 588f addql #4,%sp 470c2: 4a2a 0010 tstb %a2@(16) 470c6: 67dc beqs 470a4 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 470c8: 4a80 tstl %d0 470ca: 6738 beqs 47104 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470cc: 2040 moveal %d0,%a0 470ce: 4281 clrl %d1 470d0: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470d2: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470d4: 362a 0008 movew %a2@(8),%d3 470d8: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470dc: 306a 0028 moveaw %a2@(40),%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470e0: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470e4: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470e6: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470e8: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 470ec: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470f0: 206a 002a moveal %a2@(42),%a0 470f4: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 470f6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470fc: 4e5e unlk %fp block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470fe: d1c1 addal %d1,%a0 47100: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 47102: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 47104: 2f0a movel %a2,%sp@- 47106: 4eb9 0004 714c jsr 4714c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 4710c: 2f02 movel %d2,%sp@- 4710e: 4e93 jsr %a3@ } if ( the_object ) { 47110: 508f addql #8,%sp 47112: 4a80 tstl %d0 47114: 66b6 bnes 470cc <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 47116: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4711c: 4e5e unlk %fp 4711e: 4e75 rts 0004714c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 4714c: 4e56 ffcc linkw %fp,#-52 47150: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47154: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 47158: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4715a: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 4715e: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47162: 4a88 tstl %a0 47164: 6700 022c beqw 47392 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47168: 322a 000e movew %a2@(14),%d1 4716c: 302a 0012 movew %a2@(18),%d0 47170: 3801 movew %d1,%d4 47172: 0284 0000 ffff andil #65535,%d4 47178: 88c0 divuw %d0,%d4 4717a: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47180: 6700 0224 beqw 473a6 <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47184: 4a90 tstl %a0@ 47186: 6700 021e beqw 473a6 <_Objects_Extend_information+0x25a> 4718a: 5888 addql #4,%a0 4718c: 2605 movel %d5,%d3 4718e: 4282 clrl %d2 47190: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 47196: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 47198: 5282 addql #1,%d2 4719a: b484 cmpl %d4,%d2 4719c: 6404 bccs 471a2 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 4719e: 4a98 tstl %a0@+ 471a0: 66f4 bnes 47196 <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 471a2: 0281 0000 ffff andil #65535,%d1 471a8: 2641 moveal %d1,%a3 471aa: d7c0 addal %d0,%a3 /* * 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 ) { 471ac: b7fc 0000 ffff cmpal #65535,%a3 471b2: 6200 0186 bhiw 4733a <_Objects_Extend_information+0x1ee> /* * 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; 471b6: 41ea 0014 lea %a2@(20),%a0 471ba: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 471be: 4a2a 0010 tstb %a2@(16) 471c2: 6700 0180 beqw 47344 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 471c6: 2f00 movel %d0,%sp@- 471c8: 4eb9 0004 91e4 jsr 491e4 <_Workspace_Allocate> if ( !new_object_block ) 471ce: 588f addql #4,%sp * 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 ); 471d0: 2c00 movel %d0,%d6 if ( !new_object_block ) 471d2: 6700 0166 beqw 4733a <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 471d6: 4280 clrl %d0 471d8: 302a 000e movew %a2@(14),%d0 471dc: b083 cmpl %d3,%d0 471de: 6200 00c4 bhiw 472a4 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 471e2: 2a44 moveal %d4,%a5 471e4: 528d addql #1,%a5 * 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 ); 471e6: 200b movel %a3,%d0 471e8: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 471ec: d088 addl %a0,%d0 471ee: d085 addl %d5,%d0 471f0: e588 lsll #2,%d0 471f2: 2f00 movel %d0,%sp@- 471f4: 4eb9 0004 91e4 jsr 491e4 <_Workspace_Allocate> if ( !object_blocks ) { 471fa: 588f addql #4,%sp * 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 ); 471fc: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471fe: 4a80 tstl %d0 47200: 6700 01b2 beqw 473b4 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47204: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47206: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47208: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 4720a: 302a 000e movew %a2@(14),%d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 4720e: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47212: de8d addl %a5,%d7 47214: b085 cmpl %d5,%d0 47216: 6200 013c bhiw 47354 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4721a: 4a85 tstl %d5 4721c: 670c beqs 4722a <_Objects_Extend_information+0xde> information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 4721e: 2047 moveal %d7,%a0 47220: 4280 clrl %d0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 47222: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47224: 5280 addql #1,%d0 47226: b085 cmpl %d5,%d0 47228: 65f8 bcss 47222 <_Objects_Extend_information+0xd6> 4722a: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4722c: 4281 clrl %d1 4722e: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 47232: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 47236: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 47238: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 4723c: b283 cmpl %d3,%d1 4723e: 6310 blss 47250 <_Objects_Extend_information+0x104> 47240: 2247 moveal %d7,%a1 47242: 2003 movel %d3,%d0 47244: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 47248: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 4724a: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 4724c: b280 cmpl %d0,%d1 4724e: 62f8 bhis 47248 <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 47250: 203c 0000 0700 movel #1792,%d0 47256: 40c4 movew %sr,%d4 47258: 8084 orl %d4,%d0 4725a: 46c0 movew %d0,%sr 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( 4725c: 2012 movel %a2@,%d0 4725e: 7218 moveq #24,%d1 47260: 4285 clrl %d5 47262: e3a8 lsll %d1,%d0 47264: 3a0b movew %a3,%d5 47266: 4281 clrl %d1 47268: 2245 moveal %d5,%a1 4726a: 7a1b moveq #27,%d5 4726c: 322a 0004 movew %a2@(4),%d1 47270: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47274: 206a 002e moveal %a2@(46),%a0 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( 47278: eba9 lsll %d5,%d1 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; 4727a: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 4727e: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47282: 8081 orl %d1,%d0 47284: 2209 movel %a1,%d1 47286: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 47288: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4728c: 2541 000a movel %d1,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 47290: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47294: 46c4 movew %d4,%sr if ( old_tables ) 47296: 4a88 tstl %a0 47298: 670a beqs 472a4 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4729a: 2f08 movel %a0,%sp@- 4729c: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 472a2: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472a4: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472a8: 4280 clrl %d0 472aa: 280e movel %fp,%d4 472ac: 0684 ffff fff4 addil #-12,%d4 472b2: 47f9 0004 baa4 lea 4baa4 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472b8: 2a0a movel %a2,%d5 472ba: 0685 0000 001c addil #28,%d5 472c0: 49f9 0004 6798 lea 46798 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472c6: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472c8: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472cc: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472d0: 2f2a 0014 movel %a2@(20),%sp@- 472d4: 2f00 movel %d0,%sp@- 472d6: 2f06 movel %d6,%sp@- 472d8: 2f04 movel %d4,%sp@- 472da: 4eb9 0004 bae0 jsr 4bae0 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 472e0: 4fef 0010 lea %sp@(16),%sp 472e4: 2f04 movel %d4,%sp@- 472e6: 4e93 jsr %a3@ 472e8: 588f addql #4,%sp 472ea: 4a80 tstl %d0 472ec: 6732 beqs 47320 <_Objects_Extend_information+0x1d4> the_object->id = _Objects_Build_id( 472ee: 2212 movel %a2@,%d1 472f0: 7c18 moveq #24,%d6 472f2: 7e1b moveq #27,%d7 472f4: 2040 moveal %d0,%a0 472f6: eda9 lsll %d6,%d1 472f8: 4286 clrl %d6 472fa: 3c2a 0004 movew %a2@(4),%d6 472fe: 08c1 0010 bset #16,%d1 47302: efae lsll %d7,%d6 47304: 8286 orl %d6,%d1 47306: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 47308: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 4730a: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4730e: 2f00 movel %d0,%sp@- 47310: 2f05 movel %d5,%sp@- 47312: 4e94 jsr %a4@ index++; 47314: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47316: 2f04 movel %d4,%sp@- 47318: 4e93 jsr %a3@ 4731a: 588f addql #4,%sp 4731c: 4a80 tstl %d0 4731e: 66ce bnes 472ee <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47320: 4280 clrl %d0 information->inactive = 47322: 322a 0028 movew %a2@(40),%d1 47326: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4732a: 206a 002a moveal %a2@(42),%a0 information->inactive = 4732e: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47330: 3009 movew %a1,%d0 information->inactive = 47332: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47336: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 4733a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47340: 4e5e unlk %fp 47342: 4e75 rts if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 47344: 2f00 movel %d0,%sp@- 47346: 4eb9 0004 91b0 jsr 491b0 <_Workspace_Allocate_or_fatal_error> 4734c: 588f addql #4,%sp 4734e: 2c00 movel %d0,%d6 47350: 6000 fe84 braw 471d6 <_Objects_Extend_information+0x8a> /* * 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, 47354: e58c lsll #2,%d4 47356: 2f04 movel %d4,%sp@- 47358: 2f2a 002e movel %a2@(46),%sp@- 4735c: 2f0c movel %a4,%sp@- 4735e: 4eb9 0004 f600 jsr 4f600 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47364: 2f04 movel %d4,%sp@- 47366: 2f2a 002a movel %a2@(42),%sp@- 4736a: 2f0d movel %a5,%sp@- 4736c: 4eb9 0004 f600 jsr 4f600 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47372: 4280 clrl %d0 47374: 302a 000e movew %a2@(14),%d0 47378: da80 addl %d0,%d5 4737a: e58d lsll #2,%d5 4737c: 2f05 movel %d5,%sp@- 4737e: 2f2a 0018 movel %a2@(24),%sp@- 47382: 2f07 movel %d7,%sp@- 47384: 4eb9 0004 f600 jsr 4f600 4738a: 4fef 0024 lea %sp@(36),%sp 4738e: 6000 fe9c braw 4722c <_Objects_Extend_information+0xe0> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47392: 4280 clrl %d0 47394: 2605 movel %d5,%d3 47396: 4282 clrl %d2 47398: 4284 clrl %d4 4739a: 322a 000e movew %a2@(14),%d1 4739e: 302a 0012 movew %a2@(18),%d0 473a2: 6000 fdfe braw 471a2 <_Objects_Extend_information+0x56> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 473a6: 2605 movel %d5,%d3 <== NOT EXECUTED 473a8: 4282 clrl %d2 <== NOT EXECUTED 473aa: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 473b0: 6000 fdf0 braw 471a2 <_Objects_Extend_information+0x56> <== 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 ); 473b4: 2f06 movel %d6,%sp@- 473b6: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> return; 473bc: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 473be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 473c4: 4e5e unlk %fp 473c6: 4e75 rts 00047acc <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47acc: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47ace: 4e56 fff0 linkw %fp,#-16 47ad2: 48d7 3c00 moveml %a2-%a5,%sp@ 47ad6: 286e 0008 moveal %fp@(8),%a4 47ada: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47ade: 302c 0034 movew %a4@(52),%d0 47ae2: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47ae4: 2a6e 000c moveal %fp@(12),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47ae8: 2f0a movel %a2,%sp@- 47aea: 4eb9 0005 0a80 jsr 50a80 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47af0: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47af2: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47af4: 4a2c 0032 tstb %a4@(50) 47af8: 6662 bnes 47b5c <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47afa: 7018 moveq #24,%d0 47afc: 1212 moveb %a2@,%d1 47afe: 49c1 extbl %d1 47b00: e1a9 lsll %d0,%d1 47b02: 103c 0001 moveb #1,%d0 47b06: b08b cmpl %a3,%d0 47b08: 643c bccs 47b46 <_Objects_Set_name+0x7a> 47b0a: 102a 0001 moveb %a2@(1),%d0 47b0e: 49c0 extbl %d0 47b10: 4840 swap %d0 47b12: 4240 clrw %d0 47b14: 8081 orl %d1,%d0 47b16: 7202 moveq #2,%d1 47b18: b28b cmpl %a3,%d1 47b1a: 6730 beqs 47b4c <_Objects_Set_name+0x80> 47b1c: 122a 0002 moveb %a2@(2),%d1 47b20: 49c1 extbl %d1 47b22: e189 lsll #8,%d1 47b24: 8081 orl %d1,%d0 47b26: 7203 moveq #3,%d1 47b28: b28b cmpl %a3,%d1 47b2a: 6700 0088 beqw 47bb4 <_Objects_Set_name+0xe8> 47b2e: 122a 0003 moveb %a2@(3),%d1 47b32: 49c1 extbl %d1 47b34: 8081 orl %d1,%d0 47b36: 2b40 000c movel %d0,%a5@(12) 47b3a: 7001 moveq #1,%d0 ); } return true; } 47b3c: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47b42: 4e5e unlk %fp 47b44: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47b46: 2001 movel %d1,%d0 47b48: 08c0 0015 bset #21,%d0 47b4c: 7220 moveq #32,%d1 47b4e: 08c0 000d bset #13,%d0 47b52: 8081 orl %d1,%d0 47b54: 2b40 000c movel %d0,%a5@(12) 47b58: 7001 moveq #1,%d0 47b5a: 60e0 bras 47b3c <_Objects_Set_name+0x70> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b5c: 486b 0001 pea %a3@(1) 47b60: 4eb9 0004 9650 jsr 49650 <_Workspace_Allocate> if ( !d ) 47b66: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b68: 2840 moveal %d0,%a4 if ( !d ) 47b6a: 4a80 tstl %d0 47b6c: 673a beqs 47ba8 <_Objects_Set_name+0xdc> return false; if ( the_object->name.name_p ) { 47b6e: 202d 000c movel %a5@(12),%d0 47b72: 670e beqs 47b82 <_Objects_Set_name+0xb6> _Workspace_Free( (void *)the_object->name.name_p ); 47b74: 2f00 movel %d0,%sp@- 47b76: 4eb9 0004 966c jsr 4966c <_Workspace_Free> the_object->name.name_p = NULL; 47b7c: 588f addql #4,%sp 47b7e: 42ad 000c clrl %a5@(12) } strncpy( d, name, length ); 47b82: 2f0b movel %a3,%sp@- 47b84: 2f0a movel %a2,%sp@- 47b86: 2f0c movel %a4,%sp@- 47b88: 4eb9 0005 09f8 jsr 509f8 d[length] = '\0'; the_object->name.name_p = d; 47b8e: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 47b92: 4200 clrb %d0 47b94: 1980 b800 moveb %d0,%a4@(00000000,%a3:l) the_object->name.name_p = d; 47b98: 7001 moveq #1,%d0 47b9a: 2b4c 000c movel %a4,%a5@(12) ); } return true; } 47b9e: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47ba4: 4e5e unlk %fp 47ba6: 4e75 rts 47ba8: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 47bae: 4200 clrb %d0 <== NOT EXECUTED ); } return true; } 47bb0: 4e5e unlk %fp <== NOT EXECUTED 47bb2: 4e75 rts <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47bb4: 123c 0020 moveb #32,%d1 47bb8: 8081 orl %d1,%d0 47bba: 2b40 000c movel %d0,%a5@(12) 47bbe: 7001 moveq #1,%d0 47bc0: 6000 ff7a braw 47b3c <_Objects_Set_name+0x70> 00047758 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 47758: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 4775a: 4e56 ffec linkw %fp,#-20 4775e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47762: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 47766: 4283 clrl %d3 block_count = (information->maximum - index_base) / 47768: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 4776a: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 4776e: 382a 000e movew %a2@(14),%d4 47772: 322a 0012 movew %a2@(18),%d1 47776: 9883 subl %d3,%d4 47778: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 4777c: 672c beqs 477aa <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 4777e: 226a 002a moveal %a2@(42),%a1 47782: b291 cmpl %a1@,%d1 47784: 672e beqs 477b4 <_Objects_Shrink_information+0x5c> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47786: 7404 moveq #4,%d2 47788: 4280 clrl %d0 } index_base += information->allocation_size; 4778a: 2042 moveal %d2,%a0 4778c: d681 addl %d1,%d3 4778e: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47790: 5280 addql #1,%d0 47792: b084 cmpl %d4,%d0 47794: 6414 bccs 477aa <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 47796: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4779a: 671a beqs 477b6 <_Objects_Shrink_information+0x5e> 4779c: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4779e: 2042 moveal %d2,%a0 477a0: d681 addl %d1,%d3 477a2: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 477a4: 5280 addql #1,%d0 477a6: b084 cmpl %d4,%d0 477a8: 65ec bcss 47796 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 477aa: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 477b0: 4e5e unlk %fp 477b2: 4e75 rts 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 ] == 477b4: 4282 clrl %d2 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 477b6: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 477ba: 47f9 0004 ba7c lea 4ba7c <_Chain_Extract>,%a3 * 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 ); 477c0: 4280 clrl %d0 477c2: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 477c6: 2810 movel %a0@,%d4 if ((index >= index_base) && 477c8: b680 cmpl %d0,%d3 477ca: 620c bhis 477d8 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 477cc: 4281 clrl %d1 477ce: 322a 0012 movew %a2@(18),%d1 477d2: d283 addl %d3,%d1 477d4: b280 cmpl %d0,%d1 477d6: 623e bhis 47816 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 477d8: 2044 moveal %d4,%a0 477da: 4a84 tstl %d4 477dc: 66e2 bnes 477c0 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 477de: 206a 002e moveal %a2@(46),%a0 477e2: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 477e6: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> information->object_blocks[ block ] = NULL; 477ec: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 477f0: 588f addql #4,%sp _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 477f2: 302a 0028 movew %a2@(40),%d0 477f6: 322a 0012 movew %a2@(18),%d1 * 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; 477fa: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 477fe: 9081 subl %d1,%d0 * 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; 47800: 42b1 2800 clrl %a1@(00000000,%d2:l) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 47804: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47808: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4780c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47812: 4e5e unlk %fp 47814: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 47816: 2f08 movel %a0,%sp@- 47818: 4e93 jsr %a3@ 4781a: 588f addql #4,%sp } } while ( the_object ); 4781c: 2044 moveal %d4,%a0 4781e: 4a84 tstl %d4 47820: 669e bnes 477c0 <_Objects_Shrink_information+0x68> 47822: 60ba bras 477de <_Objects_Shrink_information+0x86> 00046bc8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bc8: 4e56 ffe8 linkw %fp,#-24 46bcc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46bd0: 240e movel %fp,%d2 46bd2: 5982 subql #4,%d2 46bd4: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bd6: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46bda: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bdc: 266e 0008 moveal %fp@(8),%a3 46be0: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46be4: 4eb9 0004 6dbe jsr 46dbe <_POSIX_Mutex_Get> 46bea: 508f addql #8,%sp 46bec: 4a80 tstl %d0 46bee: 6764 beqs 46c54 <_POSIX_Condition_variables_Wait_support+0x8c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46bf0: 2039 0006 1b74 movel 61b74 <_Thread_Dispatch_disable_level>,%d0 46bf6: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46bf8: 2f02 movel %d2,%sp@- 46bfa: 23c0 0006 1b74 movel %d0,61b74 <_Thread_Dispatch_disable_level> 46c00: 2f0b movel %a3,%sp@- 46c02: 4eb9 0004 69b4 jsr 469b4 <_POSIX_Condition_variables_Get> switch ( location ) { 46c08: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46c0a: 2840 moveal %d0,%a4 switch ( location ) { 46c0c: 4aae fffc tstl %fp@(-4) 46c10: 6642 bnes 46c54 <_POSIX_Condition_variables_Wait_support+0x8c> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 46c12: 202c 0014 movel %a4@(20),%d0 46c16: 6718 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> 46c18: b092 cmpl %a2@,%d0 46c1a: 6714 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> _Thread_Enable_dispatch(); 46c1c: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c22: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c24: 2002 movel %d2,%d0 46c26: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c2c: 4e5e unlk %fp 46c2e: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 46c30: 2f0a movel %a2,%sp@- 46c32: 4eb9 0004 700c jsr 4700c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 46c38: 588f addql #4,%sp 46c3a: 4a03 tstb %d3 46c3c: 6724 beqs 46c62 <_POSIX_Condition_variables_Wait_support+0x9a> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 46c3e: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c44: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 46c46: 2f0a movel %a2,%sp@- 46c48: 4eb9 0004 6f70 jsr 46f70 if ( mutex_status ) 46c4e: 588f addql #4,%sp 46c50: 4a80 tstl %d0 46c52: 67d0 beqs 46c24 <_POSIX_Condition_variables_Wait_support+0x5c> 46c54: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c56: 2002 movel %d2,%d0 46c58: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c5e: 4e5e unlk %fp 46c60: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 46c62: 2952 0014 movel %a2@,%a4@(20) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 46c66: 200c movel %a4,%d0 46c68: 0680 0000 0018 addil #24,%d0 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 46c6e: 7201 moveq #1,%d1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 46c70: 2079 0006 1c2e moveal 61c2e <_Thread_Executing>,%a0 46c76: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 46c7a: 2153 0020 movel %a3@,%a0@(32) if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 46c7e: 2140 0044 movel %d0,%a0@(68) 46c82: 2941 0048 movel %d1,%a4@(72) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 46c86: 4879 0004 a910 pea 4a910 <_Thread_queue_Timeout> 46c8c: 2f2e 0010 movel %fp@(16),%sp@- 46c90: 2f00 movel %d0,%sp@- 46c92: 4eb9 0004 a554 jsr 4a554 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 46c98: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 46c9e: 2079 0006 1c2e moveal 61c2e <_Thread_Executing>,%a0 if ( status && status != ETIMEDOUT ) 46ca4: 4fef 000c lea %sp@(12),%sp /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 46ca8: 2428 0034 movel %a0@(52),%d2 if ( status && status != ETIMEDOUT ) 46cac: 6798 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> 46cae: 7074 moveq #116,%d0 46cb0: b082 cmpl %d2,%d0 46cb2: 6792 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> case OBJECTS_ERROR: break; } return EINVAL; } 46cb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46cb6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 46cbc: 4e5e unlk %fp <== NOT EXECUTED 46cbe: 4e75 rts 0004b8a0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4b8a0: 4e56 ffe8 linkw %fp,#-24 4b8a4: 48d7 041c moveml %d2-%d4/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4b8a8: 486e fffc pea %fp@(-4) 4b8ac: 242e 0008 movel %fp@(8),%d2 4b8b0: 2f02 movel %d2,%sp@- 4b8b2: 4879 0006 8f4c pea 68f4c <_POSIX_Message_queue_Information_fds> 4b8b8: 246e 0014 moveal %fp@(20),%a2 4b8bc: 262e 0018 movel %fp@(24),%d3 4b8c0: 4eb9 0004 ecb4 jsr 4ecb4 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4b8c6: 4fef 000c lea %sp@(12),%sp 4b8ca: 2040 moveal %d0,%a0 4b8cc: 4aae fffc tstl %fp@(-4) 4b8d0: 671a beqs 4b8ec <_POSIX_Message_queue_Receive_support+0x4c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b8d2: 4eb9 0005 66b4 jsr 566b4 <__errno> 4b8d8: 72ff moveq #-1,%d1 4b8da: 2040 moveal %d0,%a0 4b8dc: 7009 moveq #9,%d0 } 4b8de: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b8e4: 2080 movel %d0,%a0@ } 4b8e6: 2001 movel %d1,%d0 4b8e8: 4e5e unlk %fp 4b8ea: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4b8ec: 2028 0014 movel %a0@(20),%d0 4b8f0: 7203 moveq #3,%d1 4b8f2: 7801 moveq #1,%d4 4b8f4: c280 andl %d0,%d1 4b8f6: b881 cmpl %d1,%d4 4b8f8: 6700 00f2 beqw 4b9ec <_POSIX_Message_queue_Receive_support+0x14c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4b8fc: 2068 0010 moveal %a0@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4b900: 222e 0010 movel %fp@(16),%d1 4b904: b2a8 0066 cmpl %a0@(102),%d1 4b908: 6500 0098 bcsw 4b9a2 <_POSIX_Message_queue_Receive_support+0x102> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4b90c: 4a03 tstb %d3 4b90e: 6756 beqs 4b966 <_POSIX_Message_queue_Receive_support+0xc6> 4b910: 720e moveq #14,%d1 4b912: e2a8 lsrl %d1,%d0 4b914: 7801 moveq #1,%d4 4b916: b980 eorl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b918: 2f2e 001c movel %fp@(28),%sp@- length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4b91c: c084 andl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b91e: 2f00 movel %d0,%sp@- 4b920: 486e fff8 pea %fp@(-8) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b924: 70ff moveq #-1,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b926: 2f2e 000c movel %fp@(12),%sp@- 4b92a: 2f02 movel %d2,%sp@- 4b92c: 4868 001a pea %a0@(26) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b930: 2d40 fff8 movel %d0,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b934: 4eb9 0004 dc1c jsr 4dc1c <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4b93a: 4eb9 0004 f594 jsr 4f594 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4b940: 2079 0006 8bca moveal 68bca <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4b946: 24a8 0024 movel %a0@(36),%a2@ 4b94a: 6d4e blts 4b99a <_POSIX_Message_queue_Receive_support+0xfa> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4b94c: 4fef 0018 lea %sp@(24),%sp 4b950: 4aa8 0034 tstl %a0@(52) 4b954: 666c bnes 4b9c2 <_POSIX_Message_queue_Receive_support+0x122> return length_out; 4b956: 222e fff8 movel %fp@(-8),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b95a: 2001 movel %d1,%d0 4b95c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b962: 4e5e unlk %fp 4b964: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b966: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4b96a: 4280 clrl %d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b96c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b96e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b972: 70ff moveq #-1,%d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b974: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4b978: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b97a: 4868 001a pea %a0@(26) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b97e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b982: 4eb9 0004 dc1c jsr 4dc1c <_CORE_message_queue_Seize> <== NOT EXECUTED &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4b988: 4eb9 0004 f594 jsr 4f594 <_Thread_Enable_dispatch> <== NOT EXECUTED *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4b98e: 2079 0006 8bca moveal 68bca <_Thread_Executing>,%a0 <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4b994: 24a8 0024 movel %a0@(36),%a2@ <== NOT EXECUTED 4b998: 6cb2 bges 4b94c <_POSIX_Message_queue_Receive_support+0xac> <== NOT EXECUTED 4b99a: 2212 movel %a2@,%d1 4b99c: 4481 negl %d1 4b99e: 2481 movel %d1,%a2@ 4b9a0: 60aa bras 4b94c <_POSIX_Message_queue_Receive_support+0xac> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 4b9a2: 4eb9 0004 f594 jsr 4f594 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4b9a8: 747a moveq #122,%d2 4b9aa: 4eb9 0005 66b4 jsr 566b4 <__errno> 4b9b0: 72ff moveq #-1,%d1 4b9b2: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9b4: 2001 movel %d1,%d0 the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4b9b6: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9b8: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b9be: 4e5e unlk %fp 4b9c0: 4e75 rts _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4b9c2: 4eb9 0005 66b4 jsr 566b4 <__errno> 4b9c8: 2079 0006 8bca moveal 68bca <_Thread_Executing>,%a0 4b9ce: 2440 moveal %d0,%a2 4b9d0: 2f28 0034 movel %a0@(52),%sp@- 4b9d4: 4eb9 0004 bca0 jsr 4bca0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4b9da: 588f addql #4,%sp 4b9dc: 72ff moveq #-1,%d1 4b9de: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9e0: 2001 movel %d1,%d0 4b9e2: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b9e8: 4e5e unlk %fp 4b9ea: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 4b9ec: 4eb9 0004 f594 jsr 4f594 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4b9f2: 7609 moveq #9,%d3 4b9f4: 4eb9 0005 66b4 jsr 566b4 <__errno> 4b9fa: 72ff moveq #-1,%d1 4b9fc: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9fe: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4ba00: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4ba02: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4ba08: 4e5e unlk %fp 4ba0a: 4e75 rts 0004b31c <_POSIX_Threads_Sporadic_budget_callout>: RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4b31c: 4280 clrl %d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4b31e: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4b320: 4e56 0000 linkw %fp,#0 4b324: 206e 0008 moveal %fp@(8),%a0 4b328: 1039 0005 d9a2 moveb 5d9a2 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b32e: 2268 010e moveal %a0@(270),%a1 4b332: 90a9 0088 subl %a1@(136),%d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4b336: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4b33a: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4b33e: 4aa8 001c tstl %a0@(28) 4b342: 6606 bnes 4b34a <_POSIX_Threads_Sporadic_budget_callout+0x2e> /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4b344: b0a8 0014 cmpl %a0@(20),%d0 4b348: 6204 bhis 4b34e <_POSIX_Threads_Sporadic_budget_callout+0x32> #if 0 printk( "lower priority\n" ); #endif } } } 4b34a: 4e5e unlk %fp <== NOT EXECUTED 4b34c: 4e75 rts <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4b34e: 4878 0001 pea 1 4b352: 2f00 movel %d0,%sp@- 4b354: 2f08 movel %a0,%sp@- 4b356: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 4b35c: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4b360: 4e5e unlk %fp 4b362: 4e75 rts 00045cb4 <_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) { 45cb4: 4e56 0000 linkw %fp,#0 45cb8: 2f0a movel %a2,%sp@- 45cba: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 45cbe: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45cc2: 4aaa 0052 tstl %a2@(82) 45cc6: 6606 bnes 45cce <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 45cc8: 4aaa 0056 tstl %a2@(86) 45ccc: 672a beqs 45cf8 <_POSIX_Timer_TSR+0x44> activated = _POSIX_Timer_Insert_helper( 45cce: 2f0a movel %a2,%sp@- 45cd0: 4879 0004 5cb4 pea 45cb4 <_POSIX_Timer_TSR> 45cd6: 2f2a 0008 movel %a2@(8),%sp@- 45cda: 2f2a 0062 movel %a2@(98),%sp@- 45cde: 486a 0010 pea %a2@(16) 45ce2: 4eb9 0004 bed0 jsr 4bed0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 45ce8: 4fef 0014 lea %sp@(20),%sp 45cec: 4a00 tstb %d0 45cee: 662a bnes 45d1a <_POSIX_Timer_TSR+0x66> /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 45cf0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 45cf4: 4e5e unlk %fp <== NOT EXECUTED 45cf6: 4e75 rts <== NOT EXECUTED /* 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; 45cf8: 7004 moveq #4,%d0 <== NOT EXECUTED 45cfa: 1540 003c moveb %d0,%a2@(60) <== 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 ) ) { 45cfe: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 45d02: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 45d06: 4eb9 0004 b9e4 jsr 4b9e4 <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d0c: 508f addql #8,%sp <== NOT EXECUTED 45d0e: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 45d12: 246e fffc moveal %fp@(-4),%a2 45d16: 4e5e unlk %fp 45d18: 4e75 rts ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 45d1a: 486a 006a pea %a2@(106) 45d1e: 4eb9 0004 7464 jsr 47464 <_TOD_Get> /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45d24: 588f addql #4,%sp /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45d26: 7003 moveq #3,%d0 45d28: 1540 003c moveb %d0,%a2@(60) /* * 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 ) ) { 45d2c: 2f2a 0042 movel %a2@(66),%sp@- 45d30: 2f2a 0038 movel %a2@(56),%sp@- 45d34: 4eb9 0004 b9e4 jsr 4b9e4 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d3a: 508f addql #8,%sp 45d3c: 42aa 0066 clrl %a2@(102) 45d40: 60d0 bras 45d12 <_POSIX_Timer_TSR+0x5e> ... 0004eac8 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4eac8: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4eace: 4e56 0000 linkw %fp,#0 4ead2: 222e 0008 movel %fp@(8),%d1 4ead6: 2f03 movel %d3,%sp@- 4ead8: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4eada: 40c2 movew %sr,%d2 4eadc: 8082 orl %d2,%d0 4eade: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4eae0: 2601 movel %d1,%d3 4eae2: 2001 movel %d1,%d0 4eae4: 41f9 0005 f602 lea 5f602 <_POSIX_signals_Vectors>,%a0 4eaea: e58b lsll #2,%d3 4eaec: e988 lsll #4,%d0 4eaee: 9083 subl %d3,%d0 4eaf0: 7602 moveq #2,%d3 4eaf2: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4eaf6: 6726 beqs 4eb1e <_POSIX_signals_Clear_process_signals+0x56> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4eaf8: 5381 subql #1,%d1 4eafa: 7001 moveq #1,%d0 4eafc: e3a8 lsll %d1,%d0 4eafe: 4680 notl %d0 4eb00: c0b9 0005 f7ce andl 5f7ce <_POSIX_signals_Pending>,%d0 4eb06: 23c0 0005 f7ce movel %d0,5f7ce <_POSIX_signals_Pending> if ( !_POSIX_signals_Pending ) 4eb0c: 6606 bnes 4eb14 <_POSIX_signals_Clear_process_signals+0x4c> _Thread_Do_post_task_switch_extension--; 4eb0e: 53b9 0005 f1f6 subql #1,5f1f6 <_Thread_Do_post_task_switch_extension> } _ISR_Enable( level ); 4eb14: 46c2 movew %d2,%sr } 4eb16: 241f movel %sp@+,%d2 4eb18: 261f movel %sp@+,%d3 4eb1a: 4e5e unlk %fp 4eb1c: 4e75 rts ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4eb1e: 0680 0005 f7d2 addil #391122,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4eb24: 2040 moveal %d0,%a0 4eb26: 5888 addql #4,%a0 4eb28: 2240 moveal %d0,%a1 4eb2a: b1d1 cmpal %a1@,%a0 4eb2c: 67ca beqs 4eaf8 <_POSIX_signals_Clear_process_signals+0x30> if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 4eb2e: 46c2 movew %d2,%sr <== NOT EXECUTED } 4eb30: 241f movel %sp@+,%d2 <== NOT EXECUTED 4eb32: 261f movel %sp@+,%d3 <== NOT EXECUTED 4eb34: 4e5e unlk %fp <== NOT EXECUTED 4eb36: 4e75 rts 0004eb68 <_POSIX_signals_Unblock_thread>: 4eb68: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4eb6a: 4e56 fff4 linkw %fp,#-12 4eb6e: 222e 000c movel %fp@(12),%d1 4eb72: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4eb76: 246e 0008 moveal %fp@(8),%a2 4eb7a: 2601 movel %d1,%d3 4eb7c: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4eb7e: 242a 0010 movel %a2@(16),%d2 4eb82: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4eb88: 226e 0010 moveal %fp@(16),%a1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4eb8c: 206a 010e moveal %a2@(270),%a0 4eb90: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4eb92: 0c82 1000 8000 cmpil #268468224,%d2 4eb98: 6772 beqs 4ec0c <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 4eb9a: 2228 00cc movel %a0@(204),%d1 4eb9e: 4681 notl %d1 4eba0: c081 andl %d1,%d0 4eba2: 675c beqs 4ec00 <_POSIX_signals_Unblock_thread+0x98> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4eba4: 202a 0010 movel %a2@(16),%d0 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 4eba8: 7201 moveq #1,%d1 4ebaa: 1541 0074 moveb %d1,%a2@(116) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4ebae: 0800 001c btst #28,%d0 4ebb2: 6736 beqs 4ebea <_POSIX_signals_Unblock_thread+0x82> the_thread->Wait.return_code = EINTR; 4ebb4: 7004 moveq #4,%d0 4ebb6: 2540 0034 movel %d0,%a2@(52) #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) ){ 4ebba: 103c 0008 moveb #8,%d0 4ebbe: c0aa 0010 andl %a2@(16),%d0 4ebc2: 673c beqs 4ec00 <_POSIX_signals_Unblock_thread+0x98> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4ebc4: 7202 moveq #2,%d1 4ebc6: b2aa 0050 cmpl %a2@(80),%d1 4ebca: 6700 00a4 beqw 4ec70 <_POSIX_signals_Unblock_thread+0x108> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4ebce: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 4ebd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ebd6: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> <== NOT EXECUTED 4ebdc: 508f addql #8,%sp <== NOT EXECUTED 4ebde: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4ebe0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ebe6: 4e5e unlk %fp 4ebe8: 4e75 rts if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 4ebea: 4a80 tstl %d0 4ebec: 6612 bnes 4ec00 <_POSIX_signals_Unblock_thread+0x98> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ebee: 2039 0005 f1ee movel 5f1ee <_ISR_Nest_level>,%d0 4ebf4: 670a beqs 4ec00 <_POSIX_signals_Unblock_thread+0x98> 4ebf6: b5f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a2 4ebfc: 6700 0094 beqw 4ec92 <_POSIX_signals_Unblock_thread+0x12a> _ISR_Signals_to_thread_executing = true; } } return false; } 4ec00: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 (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; 4ec06: 4200 clrb %d0 } } return false; } 4ec08: 4e5e unlk %fp 4ec0a: 4e75 rts * 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) ) { 4ec0c: 2400 movel %d0,%d2 4ec0e: c4aa 0030 andl %a2@(48),%d2 4ec12: 672a beqs 4ec3e <_POSIX_signals_Unblock_thread+0xd6> the_thread->Wait.return_code = EINTR; 4ec14: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4ec16: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4ec1a: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4ec1e: 4a89 tstl %a1 4ec20: 6734 beqs 4ec56 <_POSIX_signals_Unblock_thread+0xee> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 4ec22: 20d9 movel %a1@+,%a0@+ 4ec24: 20d9 movel %a1@+,%a0@+ 4ec26: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 4ec28: 2f0a movel %a2,%sp@- 4ec2a: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy> return true; 4ec30: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ec32: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4ec34: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ec3a: 4e5e unlk %fp 4ec3c: 4e75 rts * 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) ) { 4ec3e: 2428 00cc movel %a0@(204),%d2 4ec42: 4682 notl %d2 4ec44: c082 andl %d2,%d0 4ec46: 67b8 beqs 4ec00 <_POSIX_signals_Unblock_thread+0x98> the_thread->Wait.return_code = EINTR; 4ec48: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4ec4a: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4ec4e: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4ec52: 4a89 tstl %a1 4ec54: 66cc bnes 4ec22 <_POSIX_signals_Unblock_thread+0xba> the_info->si_signo = signo; 4ec56: 2081 movel %d1,%a0@ the_info->si_code = SI_USER; 4ec58: 7201 moveq #1,%d1 the_info->si_value.sival_int = 0; 4ec5a: 42a8 0008 clrl %a0@(8) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 4ec5e: 2141 0004 movel %d1,%a0@(4) the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ec62: 2f0a movel %a2,%sp@- 4ec64: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy> return true; 4ec6a: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ec6c: 7001 moveq #1,%d0 4ec6e: 60c4 bras 4ec34 <_POSIX_signals_Unblock_thread+0xcc> _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 ); 4ec70: 486a 0048 pea %a2@(72) 4ec74: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4ec7a: 588f addql #4,%sp 4ec7c: 2f3c 1003 fff8 movel #268697592,%sp@- 4ec82: 2f0a movel %a2,%sp@- 4ec84: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> 4ec8a: 508f addql #8,%sp 4ec8c: 4200 clrb %d0 4ec8e: 6000 ff50 braw 4ebe0 <_POSIX_signals_Unblock_thread+0x78> _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; 4ec92: 7001 moveq #1,%d0 } } return false; } 4ec94: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ec9a: 4e5e unlk %fp (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; 4ec9c: 13c0 0005 f29c moveb %d0,5f29c <_ISR_Signals_to_thread_executing> 4eca2: 4200 clrb %d0 } } return false; } 4eca4: 4e75 rts ... 000479e8 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 479e8: 327c 0700 moveaw #1792,%a1 479ec: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 479ee: 4e56 ffec linkw %fp,#-20 479f2: 206e 0008 moveal %fp@(8),%a0 479f6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 479fa: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 479fe: 40c3 movew %sr,%d3 47a00: 8083 orl %d3,%d0 47a02: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47a04: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47a08: 2002 movel %d2,%d0 47a0a: c081 andl %d1,%d0 47a0c: 6776 beqs 47a84 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 47a0e: 2002 movel %d2,%d0 47a10: 4680 notl %d0 47a12: c081 andl %d1,%d0 current_state = 47a14: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47a18: 666a bnes 47a84 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 47a1a: 2868 008e moveal %a0@(142),%a4 47a1e: 3028 0094 movew %a0@(148),%d0 47a22: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 47a24: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47a28: 240a movel %a2,%d2 47a2a: 5882 addql #4,%d2 47a2c: 8081 orl %d1,%d0 47a2e: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 47a30: 266a 0008 moveal %a2@(8),%a3 47a34: 3880 movew %d0,%a4@ the_chain->last = the_node; 47a36: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 47a3a: 3239 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d1 47a40: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 47a44: 214b 0004 movel %a3,%a0@(4) 47a48: 8081 orl %d1,%d0 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; 47a4a: 2688 movel %a0,%a3@ 47a4c: 33c0 0005 f204 movew %d0,5f204 <_Priority_Major_bit_map> _ISR_Flash( level ); 47a52: 2009 movel %a1,%d0 47a54: 46c3 movew %d3,%sr 47a56: 8083 orl %d3,%d0 47a58: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 47a5a: 2028 0014 movel %a0@(20),%d0 47a5e: 2279 0005 f1e2 moveal 5f1e2 <_Thread_Heir>,%a1 47a64: b0a9 0014 cmpl %a1@(20),%d0 47a68: 641a bccs 47a84 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 47a6a: 23c8 0005 f1e2 movel %a0,5f1e2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 47a70: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 47a76: 4a28 0075 tstb %a0@(117) 47a7a: 6712 beqs 47a8e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a7c: 7001 moveq #1,%d0 47a7e: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a84: 46c3 movew %d3,%sr } 47a86: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a8a: 4e5e unlk %fp 47a8c: 4e75 rts * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47a8e: 4a80 tstl %d0 47a90: 66f2 bnes 47a84 <_Thread_Clear_state+0x9c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a92: 7001 moveq #1,%d0 <== NOT EXECUTED 47a94: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> <== NOT EXECUTED 47a9a: 60e8 bras 47a84 <_Thread_Clear_state+0x9c> <== NOT EXECUTED 00047a9c <_Thread_Close>: 47a9c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a9e: 4e56 0000 linkw %fp,#0 47aa2: 2f0b movel %a3,%sp@- 47aa4: 266e 0008 moveal %fp@(8),%a3 47aa8: 2f0a movel %a2,%sp@- 47aaa: 246e 000c moveal %fp@(12),%a2 47aae: 206b 0018 moveal %a3@(24),%a0 47ab2: 302a 000a movew %a2@(10),%d0 47ab6: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47aba: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 47ac0: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 47ac2: 2f0a movel %a2,%sp@- 47ac4: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> 47aca: 4eb9 0004 8e80 jsr 48e80 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47ad0: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 47ad6: 5280 addql #1,%d0 47ad8: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 47ade: 2f0a movel %a2,%sp@- 47ae0: 2f0b movel %a3,%sp@- 47ae2: 4eb9 0004 7120 jsr 47120 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 47ae8: 4878 0001 pea 1 47aec: 2f0a movel %a2,%sp@- 47aee: 4eb9 0004 8710 jsr 48710 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy> 47afc: 4fef 0018 lea %sp@(24),%sp 47b00: 4a00 tstb %d0 47b02: 6608 bnes 47b0c <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47b04: 7002 moveq #2,%d0 47b06: b0aa 0050 cmpl %a2@(80),%d0 47b0a: 6756 beqs 47b62 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47b0c: b5f9 0005 f1da cmpal 5f1da <_Thread_Allocated_fp>,%a2 47b12: 6746 beqs 47b5a <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47b14: 202a 00c6 movel %a2@(198),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 47b18: 42aa 0102 clrl %a2@(258) if ( the_thread->Start.fp_context ) 47b1c: 4a80 tstl %d0 47b1e: 670a beqs 47b2a <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47b20: 2f00 movel %d0,%sp@- 47b22: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 47b28: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 47b2a: 2f0a movel %a2,%sp@- 47b2c: 4eb9 0004 890c jsr 4890c <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47b32: 202a 0116 movel %a2@(278),%d0 47b36: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 47b38: 42aa 00ca clrl %a2@(202) if ( the_thread->extensions ) 47b3c: 4a80 tstl %d0 47b3e: 670a beqs 47b4a <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47b40: 2f00 movel %d0,%sp@- 47b42: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 47b48: 588f addql #4,%sp the_thread->extensions = NULL; 47b4a: 42aa 0116 clrl %a2@(278) } 47b4e: 246e fff8 moveal %fp@(-8),%a2 47b52: 266e fffc moveal %fp@(-4),%a3 47b56: 4e5e unlk %fp 47b58: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47b5a: 42b9 0005 f1da clrl 5f1da <_Thread_Allocated_fp> 47b60: 60b2 bras 47b14 <_Thread_Close+0x78> */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 47b62: 486a 0048 pea %a2@(72) 47b66: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 47b6c: 588f addql #4,%sp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47b6e: b5f9 0005 f1da cmpal 5f1da <_Thread_Allocated_fp>,%a2 47b74: 669e bnes 47b14 <_Thread_Close+0x78> 47b76: 60e2 bras 47b5a <_Thread_Close+0xbe> <== NOT EXECUTED 0004e1ec <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e1ec: 4e56 0000 linkw %fp,#0 4e1f0: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4e1f2: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e1f8: 2f02 movel %d2,%sp@- /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4e1fa: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4e1fe: 40c0 movew %sr,%d0 4e200: e189 lsll #8,%d1 4e202: 0280 0000 f8ff andil #63743,%d0 4e208: 8081 orl %d1,%d0 4e20a: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4e20c: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4e20e: 1439 0005 e904 moveb 5e904 ,%d2 doneConstructors = 1; 4e214: 13c0 0005 e904 moveb %d0,5e904 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4e21a: 4aaa 0102 tstl %a2@(258) 4e21e: 6720 beqs 4e240 <_Thread_Handler+0x54> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 4e220: 2079 0005 f1da moveal 5f1da <_Thread_Allocated_fp>,%a0 4e226: b1ca cmpal %a2,%a0 4e228: 6716 beqs 4e240 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4e22a: 4a88 tstl %a0 4e22c: 670c beqs 4e23a <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4e22e: 4868 0102 pea %a0@(258) 4e232: 4eb9 0004 93b6 jsr 493b6 <_CPU_Context_save_fp> 4e238: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4e23a: 23ca 0005 f1da movel %a2,5f1da <_Thread_Allocated_fp> /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4e240: 2f0a movel %a2,%sp@- 4e242: 4eb9 0004 8d64 jsr 48d64 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4e248: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 4e24e: 588f addql #4,%sp 4e250: 4a02 tstb %d2 4e252: 6724 beqs 4e278 <_Thread_Handler+0x8c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e254: 202a 009e movel %a2@(158),%d0 4e258: 672a beqs 4e284 <_Thread_Handler+0x98> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4e25a: 7201 moveq #1,%d1 4e25c: b280 cmpl %d0,%d1 4e25e: 674c beqs 4e2ac <_Thread_Handler+0xc0> * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4e260: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e262: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4e268: 4878 0006 pea 6 <== NOT EXECUTED 4e26c: 4878 0001 pea 1 <== NOT EXECUTED 4e270: 42a7 clrl %sp@- <== NOT EXECUTED 4e272: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4e278: 4eb9 0005 be18 jsr 5be18 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e27e: 202a 009e movel %a2@(158),%d0 4e282: 66d6 bnes 4e25a <_Thread_Handler+0x6e> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4e284: 2f2a 00a6 movel %a2@(166),%sp@- 4e288: 206a 009a moveal %a2@(154),%a0 4e28c: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4e28e: 588f addql #4,%sp 4e290: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4e294: 2f0a movel %a2,%sp@- 4e296: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e29c: 4878 0006 pea 6 4e2a0: 4878 0001 pea 1 4e2a4: 42a7 clrl %sp@- 4e2a6: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4e2ac: 2f2a 00a2 movel %a2@(162),%sp@- 4e2b0: 206a 009a moveal %a2@(154),%a0 4e2b4: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4e2b6: 588f addql #4,%sp 4e2b8: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4e2bc: 2f0a movel %a2,%sp@- 4e2be: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e2c4: 4878 0006 pea 6 <== NOT EXECUTED 4e2c8: 4878 0001 pea 1 <== NOT EXECUTED 4e2cc: 42a7 clrl %sp@- <== NOT EXECUTED 4e2ce: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED 00049258 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 49258: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4925a: 4e56 0000 linkw %fp,#0 4925e: 2f0a movel %a2,%sp@- 49260: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 49264: c0aa 0010 andl %a2@(16),%d0 49268: 4a00 tstb %d0 4926a: 670a beqs 49276 <_Thread_Restart+0x1e> return true; } return false; } 4926c: 246e fffc moveal %fp@(-4),%a2 49270: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 49272: 4200 clrb %d0 return true; } return false; } 49274: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 49276: 2f0a movel %a2,%sp@- 49278: 4eb9 0004 9468 jsr 49468 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4927e: 2f2e 0010 movel %fp@(16),%sp@- 49282: 2f2e 000c movel %fp@(12),%sp@- 49286: 2f0a movel %a2,%sp@- 49288: 4eb9 0004 d188 jsr 4d188 <_Thread_Reset> _Thread_Load_environment( the_thread ); 4928e: 2f0a movel %a2,%sp@- 49290: 4eb9 0004 cddc jsr 4cddc <_Thread_Load_environment> _Thread_Ready( the_thread ); 49296: 2f0a movel %a2,%sp@- 49298: 4eb9 0004 d0c8 jsr 4d0c8 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 4929e: 2f0a movel %a2,%sp@- 492a0: 4eb9 0004 9b0c jsr 49b0c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 492a6: 4fef 001c lea %sp@(28),%sp 492aa: b5f9 0006 0146 cmpal 60146 <_Thread_Executing>,%a2 492b0: 670a beqs 492bc <_Thread_Restart+0x64> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 492b2: 7001 moveq #1,%d0 return true; } return false; } 492b4: 246e fffc moveal %fp@(-4),%a2 492b8: 4e5e unlk %fp 492ba: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 492bc: 4aaa 0102 tstl %a2@(258) 492c0: 6712 beqs 492d4 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 492c2: 486a 0102 pea %a2@(258) 492c6: 4eb9 0004 a076 jsr 4a076 <_CPU_Context_restore_fp> 492cc: 2479 0006 0146 moveal 60146 <_Thread_Executing>,%a2 492d2: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 492d4: 486a 00ce pea %a2@(206) 492d8: 4eb9 0004 9f1e jsr 49f1e <_CPU_Context_Restart_self> 492de: 588f addql #4,%sp <== NOT EXECUTED 492e0: 7001 moveq #1,%d0 <== NOT EXECUTED 492e2: 60d0 bras 492b4 <_Thread_Restart+0x5c> <== NOT EXECUTED 0004c7c0 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c7c0: 327c 0700 moveaw #1792,%a1 4c7c4: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c7c6: 4e56 ffec linkw %fp,#-20 4c7ca: 206e 0008 moveal %fp@(8),%a0 4c7ce: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c7d2: 40c1 movew %sr,%d1 4c7d4: 8081 orl %d1,%d0 4c7d6: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c7d8: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c7dc: 0800 0001 btst #1,%d0 4c7e0: 6774 beqs 4c856 <_Thread_Resume+0x96> 4c7e2: 74fd moveq #-3,%d2 4c7e4: c082 andl %d2,%d0 current_state = 4c7e6: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c7ea: 666a bnes 4c856 <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c7ec: 2868 008e moveal %a0@(142),%a4 4c7f0: 3028 0094 movew %a0@(148),%d0 4c7f4: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c7f6: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c7fa: 260a movel %a2,%d3 4c7fc: 5883 addql #4,%d3 4c7fe: 8082 orl %d2,%d0 4c800: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c802: 266a 0008 moveal %a2@(8),%a3 4c806: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c808: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c80c: 3439 0006 4e7c movew 64e7c <_Priority_Major_bit_map>,%d2 4c812: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c816: 214b 0004 movel %a3,%a0@(4) 4c81a: 8082 orl %d2,%d0 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; 4c81c: 2688 movel %a0,%a3@ 4c81e: 33c0 0006 4e7c movew %d0,64e7c <_Priority_Major_bit_map> _ISR_Flash( level ); 4c824: 2009 movel %a1,%d0 4c826: 46c1 movew %d1,%sr 4c828: 8081 orl %d1,%d0 4c82a: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c82c: 2028 0014 movel %a0@(20),%d0 4c830: 2279 0006 4e5a moveal 64e5a <_Thread_Heir>,%a1 4c836: b0a9 0014 cmpl %a1@(20),%d0 4c83a: 641a bccs 4c856 <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c83c: 23c8 0006 4e5a movel %a0,64e5a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c842: 2079 0006 4e86 moveal 64e86 <_Thread_Executing>,%a0 4c848: 4a28 0075 tstb %a0@(117) 4c84c: 6712 beqs 4c860 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c84e: 7001 moveq #1,%d0 4c850: 13c0 0006 4e96 moveb %d0,64e96 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c856: 46c1 movew %d1,%sr } 4c858: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c85c: 4e5e unlk %fp 4c85e: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c860: 4a80 tstl %d0 4c862: 66f2 bnes 4c856 <_Thread_Resume+0x96> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c864: 7001 moveq #1,%d0 <== NOT EXECUTED 4c866: 13c0 0006 4e96 moveb %d0,64e96 <_Context_Switch_necessary> <== NOT EXECUTED 4c86c: 60e8 bras 4c856 <_Thread_Resume+0x96> <== NOT EXECUTED ... 00048b78 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b78: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48b7c: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b82: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48b86: 243c 0000 0700 movel #1792,%d2 48b8c: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48b8e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48b92: 40c1 movew %sr,%d1 48b94: 8081 orl %d1,%d0 48b96: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48b98: 2029 0008 movel %a1@(8),%d0 48b9c: b091 cmpl %a1@,%d0 48b9e: 6750 beqs 48bf0 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48ba0: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48ba2: 2009 movel %a1,%d0 48ba4: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48ba6: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48baa: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48bac: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48bb0: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48bb2: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48bb6: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48bba: 214a 0004 movel %a2,%a0@(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; 48bbe: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48bc0: 46c1 movew %d1,%sr 48bc2: 8481 orl %d1,%d2 48bc4: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48bc6: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 48bcc: 6712 beqs 48be0 <_Thread_Yield_processor+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48bce: 7001 moveq #1,%d0 <== NOT EXECUTED 48bd0: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48bd6: 46c1 movew %d1,%sr } 48bd8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48bdc: 4e5e unlk %fp 48bde: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48be0: 23d1 0005 f1e2 movel %a1@,5f1e2 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48be6: 7001 moveq #1,%d0 48be8: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> 48bee: 60e6 bras 48bd6 <_Thread_Yield_processor+0x5e> if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48bf0: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 48bf6: 67de beqs 48bd6 <_Thread_Yield_processor+0x5e> _Context_Switch_necessary = true; 48bf8: 7001 moveq #1,%d0 <== NOT EXECUTED 48bfa: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> <== NOT EXECUTED 48c00: 60d4 bras 48bd6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... 000483a4 <_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 ) { 483a4: 4e56 ffe4 linkw %fp,#-28 483a8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 483ac: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 483b0: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 483b4: 263c 0000 0700 movel #1792,%d3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 483ba: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 483be: 2401 movel %d1,%d2 483c0: ec8a lsrl #6,%d2 483c2: 2002 movel %d2,%d0 483c4: e58a lsll #2,%d2 483c6: e988 lsll #4,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 483c8: 286e 0008 moveal %fp@(8),%a4 _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 ]; 483cc: 9082 subl %d2,%d0 483ce: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 483d2: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 483d6: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 483da: 242c 0038 movel %a4@(56),%d2 483de: 2748 0040 movel %a0,%a3@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 483e2: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 483e6: 0801 0005 btst #5,%d1 483ea: 6656 bnes 48442 <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 483ec: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 483ee: 2803 movel %d3,%d4 483f0: 5885 addql #4,%d5 483f2: 2004 movel %d4,%d0 483f4: 40c3 movew %sr,%d3 483f6: 8083 orl %d3,%d0 483f8: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 483fa: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 483fc: ba88 cmpl %a0,%d5 483fe: 6700 010a beqw 4850a <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 48402: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 48406: b3c1 cmpal %d1,%a1 48408: 6418 bccs 48422 <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4840a: 2004 movel %d4,%d0 4840c: 46c3 movew %d3,%sr 4840e: 8083 orl %d3,%d0 48410: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48412: 2002 movel %d2,%d0 48414: c0a8 0010 andl %a0@(16),%d0 48418: 6700 0092 beqw 484ac <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 4841c: 2050 moveal %a0@,%a0 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 ) ) { 4841e: ba88 cmpl %a0,%d5 48420: 66e0 bnes 48402 <_Thread_queue_Enqueue_priority+0x5e> 48422: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48424: 7001 moveq #1,%d0 48426: b0ac 0030 cmpl %a4@(48),%d0 4842a: 6700 0094 beqw 484c0 <_Thread_queue_Enqueue_priority+0x11c> * 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; 4842e: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 48432: 202c 0030 movel %a4@(48),%d0 * 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; 48436: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48438: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4843c: 4e5e unlk %fp 4843e: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48440: 46c4 movew %d4,%sr the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48442: 4284 clrl %d4 48444: 1839 0005 d9a2 moveb 5d9a2 ,%d4 _ISR_Disable( level ); 4844a: 2003 movel %d3,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4844c: 2244 moveal %d4,%a1 4844e: 5289 addql #1,%a1 _ISR_Disable( level ); 48450: 40c4 movew %sr,%d4 48452: 8084 orl %d4,%d0 48454: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 48456: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4845a: b5c8 cmpal %a0,%a2 4845c: 6720 beqs 4847e <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 4845e: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 48462: b3c1 cmpal %d1,%a1 48464: 6318 blss 4847e <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 48466: 2003 movel %d3,%d0 48468: 46c4 movew %d4,%sr 4846a: 8084 orl %d4,%d0 4846c: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4846e: 2002 movel %d2,%d0 48470: c0a8 0010 andl %a0@(16),%d0 48474: 67ca beqs 48440 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 48476: 2068 0004 moveal %a0@(4),%a0 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 ) ) { 4847a: b5c8 cmpal %a0,%a2 4847c: 66e0 bnes 4845e <_Thread_queue_Enqueue_priority+0xba> 4847e: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48480: 7001 moveq #1,%d0 48482: b0ac 0030 cmpl %a4@(48),%d0 48486: 66a6 bnes 4842e <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48488: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 4848c: b3c1 cmpal %d1,%a1 4848e: 6756 beqs 484e6 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48490: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 48492: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 48496: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48498: 274c 0044 movel %a4,%a3@(68) 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; 4849c: 208b movel %a3,%a0@ next_node->previous = the_node; 4849e: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484a2: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484a4: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484a8: 4e5e unlk %fp 484aa: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 484ac: 46c3 movew %d3,%sr <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 484ae: 2004 movel %d4,%d0 <== NOT EXECUTED 484b0: 40c3 movew %sr,%d3 <== NOT EXECUTED 484b2: 8083 orl %d3,%d0 <== NOT EXECUTED 484b4: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 484b6: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 484b8: ba88 cmpl %a0,%d5 <== NOT EXECUTED 484ba: 6600 ff46 bnew 48402 <_Thread_queue_Enqueue_priority+0x5e> <== NOT EXECUTED 484be: 604a bras 4850a <_Thread_queue_Enqueue_priority+0x166> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 484c0: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 484c4: b3c1 cmpal %d1,%a1 484c6: 671e beqs 484e6 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 484c8: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484cc: 2688 movel %a0,%a3@ the_node->previous = previous_node; 484ce: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 484d2: 274c 0044 movel %a4,%a3@(68) 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; 484d6: 228b movel %a3,%a1@ search_node->previous = the_node; 484d8: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484dc: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484de: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484e2: 4e5e unlk %fp 484e4: 4e75 rts 484e6: 41e8 003c lea %a0@(60),%a0 _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; 484ea: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484ee: 2688 movel %a0,%a3@ the_node->previous = previous_node; 484f0: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 484f4: 274c 0044 movel %a4,%a3@(68) 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; 484f8: 228b movel %a3,%a1@ search_node->previous = the_node; 484fa: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484fe: 46c2 movew %d2,%sr 48500: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48502: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48506: 4e5e unlk %fp 48508: 4e75 rts 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 ) ) { 4850a: 2403 movel %d3,%d2 4850c: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48510: 7001 moveq #1,%d0 48512: b0ac 0030 cmpl %a4@(48),%d0 48516: 6600 ff16 bnew 4842e <_Thread_queue_Enqueue_priority+0x8a> 4851a: 60a4 bras 484c0 <_Thread_queue_Enqueue_priority+0x11c> 000485f4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 485f4: 4e56 fff0 linkw %fp,#-16 485f8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 485fc: 246e 0008 moveal %fp@(8),%a2 48600: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 48604: 4a8a tstl %a2 48606: 6708 beqs 48610 <_Thread_queue_Requeue+0x1c> /* * 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 ) { 48608: 7001 moveq #1,%d0 4860a: b0aa 0034 cmpl %a2@(52),%d0 4860e: 670a beqs 4861a <_Thread_queue_Requeue+0x26> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 48610: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 48616: 4e5e unlk %fp <== NOT EXECUTED 48618: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 4861a: 303c 0700 movew #1792,%d0 4861e: 40c2 movew %sr,%d2 48620: 8082 orl %d2,%d0 48622: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48624: 202b 0010 movel %a3@(16),%d0 48628: 0280 0003 bee0 andil #245472,%d0 4862e: 660c bnes 4863c <_Thread_queue_Requeue+0x48> _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 ); 48630: 46c2 movew %d2,%sr <== NOT EXECUTED } } 48632: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48638: 4e5e unlk %fp 4863a: 4e75 rts 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 ); 4863c: 4878 0001 pea 1 48640: 7001 moveq #1,%d0 48642: 2f0b movel %a3,%sp@- 48644: 2540 0030 movel %d0,%a2@(48) 48648: 2f0a movel %a2,%sp@- 4864a: 4eb9 0004 c308 jsr 4c308 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48650: 486e fffc pea %fp@(-4) 48654: 2f0b movel %a3,%sp@- 48656: 2f0a movel %a2,%sp@- 48658: 4eb9 0004 83a4 jsr 483a4 <_Thread_queue_Enqueue_priority> 4865e: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 48662: 46c2 movew %d2,%sr 48664: 60cc bras 48632 <_Thread_queue_Requeue+0x3e> ... 00058ce8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 58ce8: 4e56 ffb0 linkw %fp,#-80 58cec: 41ee ffec lea %fp@(-20),%a0 58cf0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58cf4: 246e 0008 moveal %fp@(8),%a2 58cf8: 2c0e movel %fp,%d6 58cfa: 260e movel %fp,%d3 58cfc: 5186 subql #8,%d6 58cfe: 0683 ffff ffe8 addil #-24,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d04: 240a movel %a2,%d2 /* * 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 ); 58d06: 2a0a movel %a2,%d5 58d08: 4bf9 0005 cf94 lea 5cf94 <_Watchdog_Adjust_to_chain>,%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d0e: 0682 0000 0030 addil #48,%d2 /* * 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 ); 58d14: 0685 0000 0068 addil #104,%d5 58d1a: 47f9 0005 97a4 lea 597a4 <_Chain_Get>,%a3 58d20: 49f9 0005 d024 lea 5d024 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 58d26: 283c 0000 0700 movel #1792,%d4 58d2c: 2d48 ffd8 movel %a0,%fp@(-40) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 58d30: 41ea 0008 lea %a2@(8),%a0 58d34: 2d48 ffe0 movel %a0,%fp@(-32) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 58d38: 41ea 0040 lea %a2@(64),%a0 58d3c: 2d48 ffe4 movel %a0,%fp@(-28) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 58d40: 41ee fff4 lea %fp@(-12),%a0 58d44: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d48: 41ee ffec lea %fp@(-20),%a0 58d4c: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 58d50: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d54: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 58d58: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 58d5c: 2d43 fff0 movel %d3,%fp@(-16) { /* * 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; 58d60: 41ee fff4 lea %fp@(-12),%a0 58d64: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 58d68: 2039 0007 e38c movel 7e38c <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58d6e: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 58d72: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d76: 9081 subl %d1,%d0 58d78: 2f03 movel %d3,%sp@- 58d7a: 2f00 movel %d0,%sp@- 58d7c: 2f02 movel %d2,%sp@- 58d7e: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58d80: 2039 0007 e2da movel 7e2da <_TOD_Now>,%d0 /* * 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 ) { 58d86: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 58d8a: 222a 0074 movel %a2@(116),%d1 /* * 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 ) { 58d8e: b280 cmpl %d0,%d1 58d90: 6500 0086 bcsw 58e18 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 58d94: b280 cmpl %d0,%d1 58d96: 6200 00a4 bhiw 58e3c <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58d9a: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58d9e: 202a 0078 movel %a2@(120),%d0 58da2: 2f00 movel %d0,%sp@- 58da4: 4e93 jsr %a3@ if ( timer == NULL ) { 58da6: 588f addql #4,%sp 58da8: 4a80 tstl %d0 58daa: 672e beqs 58dda <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58dac: 2040 moveal %d0,%a0 <== NOT EXECUTED 58dae: 7e01 moveq #1,%d7 <== NOT EXECUTED 58db0: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 58db4: be81 cmpl %d1,%d7 <== NOT EXECUTED 58db6: 6700 00a8 beqw 58e60 <_Timer_server_Body+0x178> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 58dba: 7e03 moveq #3,%d7 <== NOT EXECUTED 58dbc: be81 cmpl %d1,%d7 <== NOT EXECUTED 58dbe: 66de bnes 58d9e <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58dc0: 2040 moveal %d0,%a0 <== NOT EXECUTED 58dc2: 4868 0010 pea %a0@(16) <== NOT EXECUTED 58dc6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 58dc8: 4e94 jsr %a4@ <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dca: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58dce: 508f addql #8,%sp <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dd0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 58dd2: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 58dd4: 588f addql #4,%sp <== NOT EXECUTED 58dd6: 4a80 tstl %d0 <== NOT EXECUTED 58dd8: 66d2 bnes 58dac <_Timer_server_Body+0xc4> <== 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 ); 58dda: 2004 movel %d4,%d0 58ddc: 40c1 movew %sr,%d1 58dde: 8081 orl %d1,%d0 58de0: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 58de2: bcae fff4 cmpl %fp@(-12),%d6 58de6: 6700 0086 beqw 58e6e <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 58dea: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 58dec: 2039 0007 e38c movel 7e38c <_Watchdog_Ticks_since_boot>,%d0 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58df2: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 58df6: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58dfa: 9081 subl %d1,%d0 <== NOT EXECUTED 58dfc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 58dfe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 58e00: 2f02 movel %d2,%sp@- <== NOT EXECUTED 58e02: 4e95 jsr %a5@ <== 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(); 58e04: 2039 0007 e2da movel 7e2da <_TOD_Now>,%d0 <== 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 ) { 58e0a: 4fef 000c lea %sp@(12),%sp <== 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; 58e0e: 222a 0074 movel %a2@(116),%d1 <== 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 ) { 58e12: b280 cmpl %d0,%d1 <== NOT EXECUTED 58e14: 6400 ff7e bccw 58d94 <_Timer_server_Body+0xac> <== 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 ); 58e18: 2f03 movel %d3,%sp@- 58e1a: 2e00 movel %d0,%d7 58e1c: 9e81 subl %d1,%d7 58e1e: 2f07 movel %d7,%sp@- 58e20: 2d40 ffdc movel %d0,%fp@(-36) 58e24: 2f05 movel %d5,%sp@- 58e26: 4eb9 0005 cf94 jsr 5cf94 <_Watchdog_Adjust_to_chain> 58e2c: 202e ffdc movel %fp@(-36),%d0 58e30: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58e34: 2540 0074 movel %d0,%a2@(116) 58e38: 6000 ff64 braw 58d9e <_Timer_server_Body+0xb6> /* * 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 ); 58e3c: 9280 subl %d0,%d1 58e3e: 2f01 movel %d1,%sp@- 58e40: 4878 0001 pea 1 58e44: 2d40 ffdc movel %d0,%fp@(-36) 58e48: 2f05 movel %d5,%sp@- 58e4a: 4eb9 0005 cf00 jsr 5cf00 <_Watchdog_Adjust> 58e50: 202e ffdc movel %fp@(-36),%d0 58e54: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 58e58: 2540 0074 movel %d0,%a2@(116) 58e5c: 6000 ff40 braw 58d9e <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 58e60: 4868 0010 pea %a0@(16) <== NOT EXECUTED 58e64: 2f02 movel %d2,%sp@- <== NOT EXECUTED 58e66: 4e94 jsr %a4@ <== NOT EXECUTED 58e68: 508f addql #8,%sp <== NOT EXECUTED 58e6a: 6000 ff32 braw 58d9e <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 58e6e: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 58e72: 46c1 movew %d1,%sr _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 ) ) { 58e74: 202e ffd8 movel %fp@(-40),%d0 58e78: b0ae ffe8 cmpl %fp@(-24),%d0 58e7c: 6752 beqs 58ed0 <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 58e7e: 2204 movel %d4,%d1 58e80: 40c0 movew %sr,%d0 58e82: 8280 orl %d0,%d1 58e84: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58e86: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58e8a: b1ee ffd8 cmpal %fp@(-40),%a0 58e8e: 6732 beqs 58ec2 <_Timer_server_Body+0x1da> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 58e90: 2250 moveal %a0@,%a1 the_chain->first = new_first; 58e92: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 58e96: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 58e9a: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 58e9e: 46c0 movew %d0,%sr /* * 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 ); 58ea0: 2f28 0024 movel %a0@(36),%sp@- 58ea4: 2f28 0020 movel %a0@(32),%sp@- 58ea8: 2068 001c moveal %a0@(28),%a0 58eac: 4e90 jsr %a0@ } 58eae: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 58eb0: 2204 movel %d4,%d1 58eb2: 40c0 movew %sr,%d0 58eb4: 8280 orl %d0,%d1 58eb6: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58eb8: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58ebc: b1ee ffd8 cmpal %fp@(-40),%a0 58ec0: 66ce bnes 58e90 <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 58ec2: 46c0 movew %d0,%sr { /* * 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; 58ec4: 41ee fff4 lea %fp@(-12),%a0 58ec8: 2548 0078 movel %a0,%a2@(120) 58ecc: 6000 fe9a braw 58d68 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 58ed0: 4207 clrb %d7 58ed2: 1547 007c moveb %d7,%a2@(124) 58ed6: 2039 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d0 58edc: 5280 addql #1,%d0 58ede: 23c0 0007 e248 movel %d0,7e248 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 58ee4: 4878 0008 pea 8 58ee8: 2f12 movel %a2@,%sp@- 58eea: 4eb9 0005 c618 jsr 5c618 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 58ef0: 2f0a movel %a2,%sp@- 58ef2: 4eba fd1c jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 58ef6: 2f0a movel %a2,%sp@- 58ef8: 4eba fd80 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 58efc: 4eb9 0005 bb58 jsr 5bb58 <_Thread_Enable_dispatch> ts->active = true; 58f02: 7001 moveq #1,%d0 58f04: 1540 007c moveb %d0,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 58f08: 2f2e ffe0 movel %fp@(-32),%sp@- 58f0c: 4eb9 0005 d16c jsr 5d16c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 58f12: 2f2e ffe4 movel %fp@(-28),%sp@- 58f16: 4eb9 0005 d16c jsr 5d16c <_Watchdog_Remove> 58f1c: 4fef 0018 lea %sp@(24),%sp 58f20: 6000 fe3e braw 58d60 <_Timer_server_Body+0x78> 00058f24 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 58f24: 4e56 fff0 linkw %fp,#-16 58f28: 206e 000c moveal %fp@(12),%a0 58f2c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58f30: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 58f34: 202a 0078 movel %a2@(120),%d0 58f38: 671a beqs 58f54 <_Timer_server_Schedule_operation_method+0x30> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f3a: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 58f3e: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 58f42: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f48: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 58f4c: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f4e: 4ef9 0005 976c jmp 5976c <_Chain_Append> <== NOT EXECUTED 58f54: 2039 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d0 58f5a: 5280 addql #1,%d0 58f5c: 23c0 0007 e248 movel %d0,7e248 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f62: 2028 0038 movel %a0@(56),%d0 58f66: 7201 moveq #1,%d1 58f68: b280 cmpl %d0,%d1 58f6a: 6700 0088 beqw 58ff4 <_Timer_server_Schedule_operation_method+0xd0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 58f6e: 7203 moveq #3,%d1 58f70: b280 cmpl %d0,%d1 58f72: 670e beqs 58f82 <_Timer_server_Schedule_operation_method+0x5e> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 58f74: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58f7a: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58f7c: 4ef9 0005 bb58 jmp 5bb58 <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 58f82: 203c 0000 0700 movel #1792,%d0 58f88: 40c2 movew %sr,%d2 58f8a: 8082 orl %d2,%d0 58f8c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58f8e: 260a movel %a2,%d3 58f90: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58f96: 2039 0007 e2da movel 7e2da <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 58f9c: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58fa0: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58fa4: b689 cmpl %a1,%d3 58fa6: 671a beqs 58fc2 <_Timer_server_Schedule_operation_method+0x9e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 58fa8: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 58fac: b280 cmpl %d0,%d1 58fae: 6400 00b8 bccw 59068 <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 58fb2: 2800 movel %d0,%d4 58fb4: 9881 subl %d1,%d4 if (delta_interval > delta) { 58fb6: b883 cmpl %d3,%d4 58fb8: 6500 00ba bcsw 59074 <_Timer_server_Schedule_operation_method+0x150> 58fbc: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 58fbe: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 58fc2: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 58fc6: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58fc8: 4868 0010 pea %a0@(16) 58fcc: 486a 0068 pea %a2@(104) 58fd0: 4eb9 0005 d024 jsr 5d024 <_Watchdog_Insert> if ( !ts->active ) { 58fd6: 508f addql #8,%sp 58fd8: 102a 007c moveb %a2@(124),%d0 58fdc: 6696 bnes 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 58fde: 2f0a movel %a2,%sp@- 58fe0: 4eba fc98 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) 58fe4: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 58fe6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58fec: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58fee: 4ef9 0005 bb58 jmp 5bb58 <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 58ff4: 203c 0000 0700 movel #1792,%d0 58ffa: 40c3 movew %sr,%d3 58ffc: 8083 orl %d3,%d0 58ffe: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59000: 2039 0007 e38c movel 7e38c <_Watchdog_Ticks_since_boot>,%d0 59006: 240a movel %a2,%d2 59008: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 5900e: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59012: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59016: b489 cmpl %a1,%d2 59018: 6712 beqs 5902c <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5901a: 2800 movel %d0,%d4 5901c: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 5901e: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59022: b484 cmpl %d4,%d2 59024: 623a bhis 59060 <_Timer_server_Schedule_operation_method+0x13c> 59026: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59028: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 5902c: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59030: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59032: 4868 0010 pea %a0@(16) 59036: 486a 0030 pea %a2@(48) 5903a: 4eb9 0005 d024 jsr 5d024 <_Watchdog_Insert> if ( !ts->active ) { 59040: 508f addql #8,%sp 59042: 102a 007c moveb %a2@(124),%d0 59046: 6600 ff2c bnew 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 5904a: 2f0a movel %a2,%sp@- 5904c: 4eba fbc2 jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) 59050: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 59052: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59058: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5905a: 4ef9 0005 bb58 jmp 5bb58 <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 59060: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59062: 2342 0010 movel %d2,%a1@(16) 59066: 60c4 bras 5902c <_Timer_server_Schedule_operation_method+0x108> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 59068: d283 addl %d3,%d1 delta_interval += delta; 5906a: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 5906c: 2341 0010 movel %d1,%a1@(16) 59070: 6000 ff50 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 59074: 9684 subl %d4,%d3 59076: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59078: 2341 0010 movel %d1,%a1@(16) 5907c: 6000 ff44 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> 0004e830 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4e830: 4e56 ffd0 linkw %fp,#-48 4e834: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4e838: 262e 000c movel %fp@(12),%d3 4e83c: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4e840: 4eb9 0004 d6c8 jsr 4d6c8 4e846: b0ae 0008 cmpl %fp@(8),%d0 4e84a: 6600 022c bnew 4ea78 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 4e84e: 4a83 tstl %d3 4e850: 6700 023e beqw 4ea90 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4e854: 2003 movel %d3,%d0 4e856: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4e858: 721f moveq #31,%d1 4e85a: b280 cmpl %d0,%d1 4e85c: 6500 0232 bcsw 4ea90 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 ) 4e860: 2203 movel %d3,%d1 4e862: 2803 movel %d3,%d4 4e864: 7e01 moveq #1,%d7 4e866: e589 lsll #2,%d1 4e868: e98c lsll #4,%d4 4e86a: 9881 subl %d1,%d4 4e86c: 2044 moveal %d4,%a0 4e86e: d1fc 0005 f60a addal #390666,%a0 4e874: be90 cmpl %a0@,%d7 4e876: 6700 00d4 beqw 4e94c /* * 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 ) ) 4e87a: 7208 moveq #8,%d1 4e87c: b283 cmpl %d3,%d1 4e87e: 6700 00d8 beqw 4e958 4e882: 7e04 moveq #4,%d7 4e884: be83 cmpl %d3,%d7 4e886: 6700 00d0 beqw 4e958 4e88a: 123c 000b moveb #11,%d1 4e88e: b283 cmpl %d3,%d1 4e890: 6700 00c6 beqw 4e958 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4e894: 7401 moveq #1,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 4e896: 7e01 moveq #1,%d7 4e898: e1aa lsll %d0,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4e89a: 2d43 fff4 movel %d3,%fp@(-12) siginfo->si_code = SI_USER; 4e89e: 2d47 fff8 movel %d7,%fp@(-8) if ( !value ) { 4e8a2: 4a8a tstl %a2 4e8a4: 6700 01ca beqw 4ea70 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 4e8a8: 2d52 fffc movel %a2@,%fp@(-4) 4e8ac: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 4e8b2: 5280 addql #1,%d0 4e8b4: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> /* * 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; 4e8ba: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e8c0: 206a 010e moveal %a2@(270),%a0 4e8c4: 2028 00cc movel %a0@(204),%d0 4e8c8: 4680 notl %d0 4e8ca: c082 andl %d2,%d0 4e8cc: 6642 bnes 4e910 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e8ce: 2079 0005 f78e moveal 5f78e <_POSIX_signals_Wait_queue>,%a0 4e8d4: b1fc 0005 f792 cmpal #391058,%a0 4e8da: 6700 00ec beqw 4e9c8 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e8de: 2002 movel %d2,%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 4e8e0: 2448 moveal %a0,%a2 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e8e2: c0a8 0030 andl %a0@(48),%d0 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 ]; 4e8e6: 2268 010e moveal %a0@(270),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e8ea: 6624 bnes 4e910 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 4e8ec: 2029 00cc movel %a1@(204),%d0 4e8f0: 4680 notl %d0 4e8f2: c082 andl %d2,%d0 4e8f4: 661a bnes 4e910 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4e8f6: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 4e8f8: 2448 moveal %a0,%a2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e8fa: b1fc 0005 f792 cmpal #391058,%a0 4e900: 6700 00c6 beqw 4e9c8 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e904: 2002 movel %d2,%d0 <== NOT EXECUTED 4e906: c0a8 0030 andl %a0@(48),%d0 <== 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 ]; 4e90a: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e90e: 67dc beqs 4e8ec <== NOT EXECUTED * 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; 4e910: 7001 moveq #1,%d0 4e912: 1540 0074 moveb %d0,%a2@(116) /* * 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 ) ) { 4e916: 486e fff4 pea %fp@(-12) 4e91a: 2f03 movel %d3,%sp@- 4e91c: 2f0a movel %a2,%sp@- 4e91e: 4eb9 0004 eb68 jsr 4eb68 <_POSIX_signals_Unblock_thread> 4e924: 4fef 000c lea %sp@(12),%sp 4e928: 4a00 tstb %d0 4e92a: 6600 008a bnew 4e9b6 /* * 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 ); 4e92e: 2f02 movel %d2,%sp@- 4e930: 4eb9 0004 eb38 jsr 4eb38 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4e936: 588f addql #4,%sp 4e938: 41f9 0005 f602 lea 5f602 <_POSIX_signals_Vectors>,%a0 4e93e: 7202 moveq #2,%d1 4e940: b2b0 4800 cmpl %a0@(00000000,%d4:l),%d1 4e944: 672e beqs 4e974 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e946: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e94c: 4280 clrl %d0 return 0; } 4e94e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e954: 4e5e unlk %fp 4e956: 4e75 rts * 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 ); 4e958: 4eb9 0004 ed84 jsr 4ed84 4e95e: 2f03 movel %d3,%sp@- 4e960: 2f00 movel %d0,%sp@- 4e962: 4eb9 0004 eca8 jsr 4eca8 4e968: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e96a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e970: 4e5e unlk %fp 4e972: 4e75 rts */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e974: 4879 0005 f782 pea 5f782 <_POSIX_signals_Inactive_siginfo> 4e97a: 4eb9 0004 baa4 jsr 4baa4 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e980: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e982: 2040 moveal %d0,%a0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e984: 4a80 tstl %d0 4e986: 6700 0120 beqw 4eaa8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e98a: 216e fff4 0008 movel %fp@(-12),%a0@(8) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e990: 0684 0005 f7d2 addil #391122,%d4 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e996: 216e fff8 000c movel %fp@(-8),%a0@(12) 4e99c: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e9a2: 2f00 movel %d0,%sp@- 4e9a4: 2f04 movel %d4,%sp@- 4e9a6: 4eb9 0004 6798 jsr 46798 <_Chain_Append> 4e9ac: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e9ae: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e9b4: 6096 bras 4e94c /* * 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 ) ) { _Thread_Enable_dispatch(); 4e9b6: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e9bc: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e9be: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e9c4: 4e5e unlk %fp 4e9c6: 4e75 rts * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e9c8: 4285 clrl %d5 4e9ca: 1a39 0005 d9a2 moveb 5d9a2 ,%d5 4e9d0: 49f9 0005 f114 lea 5f114 <_Objects_Information_table+0x8>,%a4 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4e9d6: 95ca subal %a2,%a2 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e9d8: 5285 addql #1,%d5 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 ] ) 4e9da: 2054 moveal %a4@,%a0 4e9dc: 4a88 tstl %a0 4e9de: 675e beqs 4ea3e continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4e9e0: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 4e9e4: 4286 clrl %d6 4e9e6: 3c28 000e movew %a0@(14),%d6 object_table = the_info->local_table; 4e9ea: 2268 0018 moveal %a0@(24),%a1 for ( index = 1 ; index <= maximum ; index++ ) { 4e9ee: 4a86 tstl %d6 4e9f0: 674c beqs 4ea3e 4e9f2: 5889 addql #4,%a1 4e9f4: 7001 moveq #1,%d0 the_thread = (Thread_Control *) object_table[ index ]; 4e9f6: 2051 moveal %a1@,%a0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4e9f8: 5280 addql #1,%d0 4e9fa: 5889 addql #4,%a1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 4e9fc: 4a88 tstl %a0 4e9fe: 673a beqs 4ea3a /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4ea00: 2228 0014 movel %a0@(20),%d1 4ea04: ba81 cmpl %d1,%d5 4ea06: 6532 bcss 4ea3a DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4ea08: 2668 010e moveal %a0@(270),%a3 4ea0c: 2e2b 00cc movel %a3@(204),%d7 4ea10: 4687 notl %d7 4ea12: ce82 andl %d2,%d7 4ea14: 6724 beqs 4ea3a * * 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 ) { 4ea16: ba81 cmpl %d1,%d5 4ea18: 621c bhis 4ea36 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 4ea1a: 2e2a 0010 movel %a2@(16),%d7 4ea1e: 671a beqs 4ea3a /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4ea20: 2668 0010 moveal %a0@(16),%a3 4ea24: 4a8b tstl %a3 4ea26: 670e beqs 4ea36 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4ea28: 0807 001c btst #28,%d7 4ea2c: 660c bnes 4ea3a DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4ea2e: 2e0b movel %a3,%d7 4ea30: 0807 001c btst #28,%d7 4ea34: 6704 beqs 4ea3a 4ea36: 2a01 movel %d1,%d5 4ea38: 2448 moveal %a0,%a2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4ea3a: b086 cmpl %d6,%d0 4ea3c: 63b8 blss 4e9f6 4ea3e: 588c addql #4,%a4 * + 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++) { 4ea40: b9fc 0005 f120 cmpal #389408,%a4 4ea46: 6692 bnes 4e9da } } } } if ( interested ) { 4ea48: 4a8a tstl %a2 4ea4a: 6700 fee2 beqw 4e92e * 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; 4ea4e: 7001 moveq #1,%d0 4ea50: 1540 0074 moveb %d0,%a2@(116) /* * 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 ) ) { 4ea54: 486e fff4 pea %fp@(-12) 4ea58: 2f03 movel %d3,%sp@- 4ea5a: 2f0a movel %a2,%sp@- 4ea5c: 4eb9 0004 eb68 jsr 4eb68 <_POSIX_signals_Unblock_thread> 4ea62: 4fef 000c lea %sp@(12),%sp 4ea66: 4a00 tstb %d0 4ea68: 6700 fec4 beqw 4e92e 4ea6c: 6000 ff48 braw 4e9b6 <== NOT EXECUTED */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 4ea70: 42ae fffc clrl %fp@(-4) 4ea74: 6000 fe36 braw 4e8ac /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 4ea78: 4eb9 0004 ede0 jsr 4ede0 <__errno> 4ea7e: 7603 moveq #3,%d3 4ea80: 2040 moveal %d0,%a0 4ea82: 70ff moveq #-1,%d0 4ea84: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4ea86: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4ea8c: 4e5e unlk %fp 4ea8e: 4e75 rts */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4ea90: 4eb9 0004 ede0 jsr 4ede0 <__errno> 4ea96: 7416 moveq #22,%d2 4ea98: 2040 moveal %d0,%a0 4ea9a: 70ff moveq #-1,%d0 4ea9c: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4ea9e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4eaa4: 4e5e unlk %fp 4eaa6: 4e75 rts 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(); 4eaa8: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 4eaae: 4eb9 0004 ede0 jsr 4ede0 <__errno> 4eab4: 720b moveq #11,%d1 4eab6: 2040 moveal %d0,%a0 4eab8: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4eaba: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 4eac0: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4eac2: 4e5e unlk %fp 4eac4: 4e75 rts ... 000460fc : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 460fc: 4e56 ffe0 linkw %fp,#-32 46100: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46104: 246e 0008 moveal %fp@(8),%a2 46108: 262e 000c movel %fp@(12),%d3 4610c: 242e 0010 movel %fp@(16),%d2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 46110: 4a8a tstl %a2 46112: 677a beqs 4618e return EINVAL; if ( count == 0 ) 46114: 4a82 tstl %d2 46116: 6776 beqs 4618e return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46118: 4a83 tstl %d3 4611a: 6700 0090 beqw 461ac 4611e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46120: 4a90 tstl %a0@ 46122: 676a beqs 4618e return EINVAL; switch ( the_attr->process_shared ) { 46124: 4aa8 0004 tstl %a0@(4) 46128: 6664 bnes 4618e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4612a: 2039 0006 0898 movel 60898 <_Thread_Dispatch_disable_level>,%d0 46130: 5280 addql #1,%d0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 46132: 2d42 fffc movel %d2,%fp@(-4) 46136: 23c0 0006 0898 movel %d0,60898 <_Thread_Dispatch_disable_level> } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4613c: 42ae fff8 clrl %fp@(-8) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 46140: 4879 0006 0bda pea 60bda <_POSIX_Barrier_Information> 46146: 4eb9 0004 83e0 jsr 483e0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 4614c: 588f addql #4,%sp 4614e: 2640 moveal %d0,%a3 46150: 4a80 tstl %d0 46152: 6746 beqs 4619a _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 46154: 486e fff8 pea %fp@(-8) 46158: 486b 0010 pea %a3@(16) 4615c: 4eb9 0004 7a50 jsr 47a50 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46162: 202b 0008 movel %a3@(8),%d0 46166: 4281 clrl %d1 46168: 2079 0006 0bf2 moveal 60bf2 <_POSIX_Barrier_Information+0x18>,%a0 4616e: 3200 movew %d0,%d1 46170: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46174: 42ab 000c clrl %a3@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 46178: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4617a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> return 0; 46180: 508f addql #8,%sp /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); 46182: 4280 clrl %d0 return 0; } 46184: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 4618a: 4e5e unlk %fp 4618c: 4e75 rts /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 4618e: 7016 moveq #22,%d0 } 46190: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46196: 4e5e unlk %fp 46198: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 4619a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> 461a0: 700b moveq #11,%d0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 461a2: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 461a8: 4e5e unlk %fp 461aa: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 461ac: 260e movel %fp,%d3 461ae: 0683 ffff fff0 addil #-16,%d3 461b4: 2f03 movel %d3,%sp@- 461b6: 4eb9 0004 6038 jsr 46038 461bc: 588f addql #4,%sp 461be: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 461c0: 4a90 tstl %a0@ 461c2: 6600 ff60 bnew 46124 461c6: 60c6 bras 4618e <== NOT EXECUTED 0004dae8 : } void pthread_exit( void *value_ptr ) { 4dae8: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4daec: 2f2e 0008 movel %fp@(8),%sp@- 4daf0: 2f39 0005 f20e movel 5f20e <_Thread_Executing>,%sp@- 4daf6: 4eb9 0004 da78 jsr 4da78 <_POSIX_Thread_Exit> 4dafc: 508f addql #8,%sp <== NOT EXECUTED } 4dafe: 4e5e unlk %fp <== NOT EXECUTED 4db00: 4e75 rts <== NOT EXECUTED ... 00046768 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 46768: 4e56 ffec linkw %fp,#-20 4676c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 46770: 246e 0008 moveal %fp@(8),%a2 46774: 266e 000c moveal %fp@(12),%a3 if ( !once_control || !init_routine ) 46778: 4a8a tstl %a2 4677a: 6766 beqs 467e2 4677c: 4a8b tstl %a3 4677e: 6762 beqs 467e2 return EINVAL; if ( !once_control->init_executed ) { 46780: 4aaa 0004 tstl %a2@(4) 46784: 670c beqs 46792 if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 46786: 4280 clrl %d0 } return 0; } 46788: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 4678e: 4e5e unlk %fp 46790: 4e75 rts if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 46792: 240e movel %fp,%d2 46794: 5982 subql #4,%d2 46796: 49f9 0004 7428 lea 47428 ,%a4 4679c: 2f02 movel %d2,%sp@- 4679e: 4878 0100 pea 100 467a2: 4878 0100 pea 100 467a6: 4e94 jsr %a4@ if ( !once_control->init_executed ) { 467a8: 4fef 000c lea %sp@(12),%sp 467ac: 4aaa 0004 tstl %a2@(4) 467b0: 6714 beqs 467c6 once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 467b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 467b4: 4878 0100 pea 100 <== NOT EXECUTED 467b8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 467bc: 4e94 jsr %a4@ <== NOT EXECUTED 467be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 467c2: 4280 clrl %d0 467c4: 60c2 bras 46788 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; 467c6: 7001 moveq #1,%d0 467c8: 2540 0004 movel %d0,%a2@(4) 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; 467cc: 2480 movel %d0,%a2@ once_control->init_executed = true; (*init_routine)(); 467ce: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 467d0: 2f02 movel %d2,%sp@- 467d2: 4878 0100 pea 100 467d6: 2f2e fffc movel %fp@(-4),%sp@- 467da: 4e94 jsr %a4@ 467dc: 4fef 000c lea %sp@(12),%sp 467e0: 60e0 bras 467c2 467e2: 7016 moveq #22,%d0 } return 0; } 467e4: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 467ea: 4e5e unlk %fp 467ec: 4e75 rts ... 0004897c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 4897c: 4e56 ffe0 linkw %fp,#-32 48980: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 48984: 282e 000c movel %fp@(12),%d4 48988: 242e 0010 movel %fp@(16),%d2 int rc; /* * Check all the parameters */ if ( !param ) 4898c: 6700 00c4 beqw 48a52 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 48990: 486e fff8 pea %fp@(-8) 48994: 486e fffc pea %fp@(-4) 48998: 2f02 movel %d2,%sp@- 4899a: 2f04 movel %d4,%sp@- 4899c: 4eb9 0004 e798 jsr 4e798 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 489a2: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 489a6: 2600 movel %d0,%d3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 489a8: 670c beqs 489b6 case OBJECTS_ERROR: break; } return ESRCH; } 489aa: 2003 movel %d3,%d0 489ac: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 489b2: 4e5e unlk %fp 489b4: 4e75 rts 489b6: 486e fff4 pea %fp@(-12) 489ba: 2f2e 0008 movel %fp@(8),%sp@- 489be: 4879 0006 45da pea 645da <_POSIX_Threads_Information> 489c4: 4eb9 0004 aab8 jsr 4aab8 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 489ca: 4fef 000c lea %sp@(12),%sp 489ce: 2440 moveal %d0,%a2 489d0: 4aae fff4 tstl %fp@(-12) 489d4: 6600 008a bnew 48a60 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 489d8: 266a 010e moveal %a2@(270),%a3 if ( api->schedpolicy == SCHED_SPORADIC ) 489dc: 7004 moveq #4,%d0 489de: b0ab 0080 cmpl %a3@(128),%d0 489e2: 6700 00ba beqw 48a9e (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 489e6: 2242 moveal %d2,%a1 489e8: 41eb 0084 lea %a3@(132),%a0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 489ec: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 489f0: 20d9 movel %a1@+,%a0@+ 489f2: 20d9 movel %a1@+,%a0@+ 489f4: 20d9 movel %a1@+,%a0@+ 489f6: 20d9 movel %a1@+,%a0@+ 489f8: 20d9 movel %a1@+,%a0@+ 489fa: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; 489fc: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48a02: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 48a04: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 48a0a: 4a84 tstl %d4 48a0c: 6d32 blts 48a40 48a0e: 7002 moveq #2,%d0 48a10: b084 cmpl %d4,%d0 48a12: 6d5c blts 48a70 48a14: 4280 clrl %d0 48a16: 1039 0006 2c06 moveb 62c06 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 48a1c: 41f9 0006 43a4 lea 643a4 <_Thread_Ticks_per_timeslice>,%a0 48a22: 90ab 0084 subl %a3@(132),%d0 48a26: 2550 0076 movel %a0@,%a2@(118) the_thread->real_priority = 48a2a: 2540 0018 movel %d0,%a2@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 48a2e: 4878 0001 pea 1 48a32: 2f00 movel %d0,%sp@- 48a34: 2f0a movel %a2,%sp@- 48a36: 4eb9 0004 ada8 jsr 4ada8 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 48a3c: 4fef 000c lea %sp@(12),%sp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 48a40: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 48a46: 2003 movel %d3,%d0 48a48: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a4e: 4e5e unlk %fp 48a50: 4e75 rts int rc; /* * Check all the parameters */ if ( !param ) 48a52: 7616 moveq #22,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a54: 2003 movel %d3,%d0 48a56: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a5c: 4e5e unlk %fp 48a5e: 4e75 rts /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 48a60: 163c 0003 moveb #3,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a64: 2003 movel %d3,%d0 48a66: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a6c: 4e5e unlk %fp 48a6e: 4e75 rts api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48a70: 103c 0004 moveb #4,%d0 48a74: b084 cmpl %d4,%d0 48a76: 66c8 bnes 48a40 true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 48a78: 276b 0084 00a0 movel %a3@(132),%a3@(160) _Watchdog_Remove( &api->Sporadic_timer ); 48a7e: 486b 00a4 pea %a3@(164) 48a82: 4eb9 0004 c738 jsr 4c738 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 48a88: 2f0a movel %a2,%sp@- 48a8a: 42a7 clrl %sp@- 48a8c: 4eb9 0004 88c0 jsr 488c0 <_POSIX_Threads_Sporadic_budget_TSR> 48a92: 4fef 000c lea %sp@(12),%sp break; } _Thread_Enable_dispatch(); 48a96: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> 48a9c: 60a8 bras 48a46 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48a9e: 486b 00a4 pea %a3@(164) 48aa2: 4eb9 0004 c738 jsr 4c738 <_Watchdog_Remove> api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 48aa8: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48aae: 2242 moveal %d2,%a1 48ab0: 41eb 0084 lea %a3@(132),%a0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48ab4: 588f addql #4,%sp api->schedpolicy = policy; 48ab6: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 48aba: 20d9 movel %a1@+,%a0@+ 48abc: 20d9 movel %a1@+,%a0@+ 48abe: 20d9 movel %a1@+,%a0@+ 48ac0: 20d9 movel %a1@+,%a0@+ 48ac2: 20d9 movel %a1@+,%a0@+ 48ac4: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 48ac6: 256e fff8 007e movel %fp@(-8),%a2@(126) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48acc: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48ace: 4a84 tstl %d4 48ad0: 6c00 ff3c bgew 48a0e 48ad4: 6000 ff6a braw 48a40 <== NOT EXECUTED 00046434 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 46434: 4e56 0000 linkw %fp,#0 * 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() ) 46438: 2039 0006 03aa movel 603aa <_ISR_Nest_level>,%d0 4643e: 663c bnes 4647c return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46440: 2079 0006 03ca moveal 603ca <_Thread_Executing>,%a0 46446: 2039 0006 0310 movel 60310 <_Thread_Dispatch_disable_level>,%d0 4644c: 5280 addql #1,%d0 4644e: 2068 010e moveal %a0@(270),%a0 46452: 23c0 0006 0310 movel %d0,60310 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 46458: 4aa8 00d4 tstl %a0@(212) 4645c: 6622 bnes 46480 thread_support->cancelation_requested ) 4645e: 4aa8 00dc tstl %a0@(220) 46462: 671c beqs 46480 cancel = true; _Thread_Enable_dispatch(); 46464: 4eb9 0004 8b08 jsr 48b08 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 4646a: 4878 ffff pea ffffffff 4646e: 2f39 0006 03ca movel 603ca <_Thread_Executing>,%sp@- 46474: 4eb9 0004 c160 jsr 4c160 <_POSIX_Thread_Exit> 4647a: 508f addql #8,%sp <== NOT EXECUTED } 4647c: 4e5e unlk %fp <== NOT EXECUTED 4647e: 4e75 rts <== NOT EXECUTED 46480: 4e5e unlk %fp _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 46482: 4ef9 0004 8b08 jmp 48b08 <_Thread_Enable_dispatch> 000482d4 : 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 ) { 482d4: 4e56 fff4 linkw %fp,#-12 482d8: 226e 000c moveal %fp@(12),%a1 482dc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482e0: 242e 0008 movel %fp@(8),%d2 482e4: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 482e8: 2039 0006 5b2e movel 65b2e <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 482ee: 2239 0006 5336 movel 65336 <_ISR_Nest_level>,%d1 482f4: 6600 009c bnew 48392 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 482f8: 4a8a tstl %a2 482fa: 6700 00ea beqw 483e6 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 482fe: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 48300: 4a89 tstl %a1 48302: 6700 00e2 beqw 483e6 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48306: 4a91 tstl %a1@ 48308: 6700 00d4 beqw 483de return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4830c: b480 cmpl %d0,%d2 4830e: 6476 bccs 48386 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48310: 2039 0006 529c movel 6529c <_Thread_Dispatch_disable_level>,%d0 48316: 5280 addql #1,%d0 48318: 23c0 0006 529c movel %d0,6529c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 4831e: 4a82 tstl %d2 48320: 667c bnes 4839e static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 48322: 2039 0006 5b2e movel 65b2e <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48328: 6700 00fc beqw 48426 4832c: 2239 0006 5b32 movel 65b32 <_IO_Driver_address_table>,%d1 48332: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48334: 4a90 tstl %a0@ 48336: 6700 008e beqw 483c6 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 4833a: 5282 addql #1,%d2 4833c: 41e8 0018 lea %a0@(24),%a0 48340: b480 cmpl %d0,%d2 48342: 65f0 bcss 48334 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48344: 2482 movel %d2,%a2@ if ( m != n ) 48346: b480 cmpl %d0,%d2 48348: 6700 00de beqw 48428 4834c: 2602 movel %d2,%d3 4834e: 2002 movel %d2,%d0 48350: 2041 moveal %d1,%a0 48352: e78b lsll #3,%d3 48354: eb88 lsll #5,%d0 48356: 9083 subl %d3,%d0 48358: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 4835a: 20d9 movel %a1@+,%a0@+ 4835c: 20d9 movel %a1@+,%a0@+ 4835e: 20d9 movel %a1@+,%a0@+ 48360: 20d9 movel %a1@+,%a0@+ 48362: 20d9 movel %a1@+,%a0@+ 48364: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 48366: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4836c: 2d42 0008 movel %d2,%fp@(8) } 48370: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48376: 42ae 0010 clrl %fp@(16) 4837a: 42ae 000c clrl %fp@(12) } 4837e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48380: 4ef9 0005 13e8 jmp 513e8 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48386: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48388: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4838e: 4e5e unlk %fp 48390: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 48392: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48394: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4839a: 4e5e unlk %fp 4839c: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 4839e: 2202 movel %d2,%d1 483a0: 2002 movel %d2,%d0 483a2: e789 lsll #3,%d1 483a4: eb88 lsll #5,%d0 483a6: 2079 0006 5b32 moveal 65b32 <_IO_Driver_address_table>,%a0 483ac: 9081 subl %d1,%d0 483ae: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483b0: 4a90 tstl %a0@ 483b2: 673e beqs 483f2 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(); 483b4: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 483ba: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483bc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483c2: 4e5e unlk %fp 483c4: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483c6: 4aa8 0004 tstl %a0@(4) 483ca: 6700 ff78 beqw 48344 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 483ce: 5282 addql #1,%d2 483d0: 41e8 0018 lea %a0@(24),%a0 483d4: b480 cmpl %d0,%d2 483d6: 6500 ff5c bcsw 48334 483da: 6000 ff68 braw 48344 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483de: 4aa9 0004 tstl %a1@(4) 483e2: 6600 ff28 bnew 4830c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483e6: 7009 moveq #9,%d0 } 483e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ee: 4e5e unlk %fp 483f0: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483f2: 4aa8 0004 tstl %a0@(4) 483f6: 66bc bnes 483b4 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 483f8: 20d9 movel %a1@+,%a0@+ 483fa: 20d9 movel %a1@+,%a0@+ 483fc: 20d9 movel %a1@+,%a0@+ 483fe: 20d9 movel %a1@+,%a0@+ 48400: 20d9 movel %a1@+,%a0@+ 48402: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 48404: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 48406: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4840c: 2d42 0008 movel %d2,%fp@(8) } 48410: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48416: 42ae 0010 clrl %fp@(16) 4841a: 42ae 000c clrl %fp@(12) } 4841e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48420: 4ef9 0005 13e8 jmp 513e8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48426: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 48428: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 4842e: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48430: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48436: 4e5e unlk %fp 48438: 4e75 rts ... 000476f4 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 476f4: 4e56 0000 linkw %fp,#0 476f8: 2f0a movel %a2,%sp@- 476fa: 246e 0010 moveal %fp@(16),%a2 476fe: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 47700: 4a8a tstl %a2 47702: 6766 beqs 4776a return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47704: 2f2e 000c movel %fp@(12),%sp@- 47708: 2f2e 0008 movel %fp@(8),%sp@- 4770c: 4eb9 0004 9300 jsr 49300 <_Objects_Get_information> if ( !obj_info ) 47712: 508f addql #8,%sp * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47714: 2040 moveal %d0,%a0 if ( !obj_info ) 47716: 4a80 tstl %d0 47718: 675e beqs 47778 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 4771a: 24a8 0006 movel %a0@(6),%a2@ info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 4771e: 4282 clrl %d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 47720: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 47726: 3428 000e movew %a0@(14),%d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 4772a: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 47730: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47734: 6750 beqs 47786 47736: 2068 0018 moveal %a0@(24),%a0 4773a: 7201 moveq #1,%d1 4773c: 7001 moveq #1,%d0 4773e: 93c9 subal %a1,%a1 47740: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 47742: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 47746: 6718 beqs 47760 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47748: 2200 movel %d0,%d1 4774a: b082 cmpl %d2,%d0 4774c: 63f2 blss 47740 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 4774e: 2549 000e movel %a1,%a2@(14) 47752: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 47754: 242e fff8 movel %fp@(-8),%d2 47758: 246e fffc moveal %fp@(-4),%a2 4775c: 4e5e unlk %fp 4775e: 4e75 rts info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; 47760: 5289 addql #1,%a1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47762: 2200 movel %d0,%d1 47764: b082 cmpl %d2,%d0 47766: 63d8 blss 47740 47768: 60e4 bras 4774e unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 4776a: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 4776e: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 47770: 246e fffc moveal %fp@(-4),%a2 47774: 4e5e unlk %fp 47776: 4e75 rts 47778: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 4777c: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 4777e: 246e fffc moveal %fp@(-4),%a2 47782: 4e5e unlk %fp 47784: 4e75 rts info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47786: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 47788: 4280 clrl %d0 <== NOT EXECUTED 4778a: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 4778e: 60c4 bras 47754 <== NOT EXECUTED 0007ba1c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7ba1c: 4e56 ffec linkw %fp,#-20 7ba20: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7ba24: 486e fffc pea %fp@(-4) 7ba28: 242e 0008 movel %fp@(8),%d2 7ba2c: 2f02 movel %d2,%sp@- 7ba2e: 4879 000a 777c pea a777c <_Rate_monotonic_Information> 7ba34: 4eb9 0004 daf8 jsr 4daf8 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7ba3a: 4fef 000c lea %sp@(12),%sp 7ba3e: 2440 moveal %d0,%a2 7ba40: 4aae fffc tstl %fp@(-4) 7ba44: 661e bnes 7ba64 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7ba46: 2039 000a 6d92 movel a6d92 <_Thread_Executing>,%d0 7ba4c: b0aa 0040 cmpl %a2@(64),%d0 7ba50: 671e beqs 7ba70 _Thread_Enable_dispatch(); 7ba52: 4eb9 0004 e438 jsr 4e438 <_Thread_Enable_dispatch> 7ba58: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7ba5a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7ba60: 4e5e unlk %fp 7ba62: 4e75 rts the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 7ba64: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7ba66: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7ba6c: 4e5e unlk %fp 7ba6e: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 7ba70: 4aae 000c tstl %fp@(12) 7ba74: 6700 00ce beqw 7bb44 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 7ba78: 203c 0000 0700 movel #1792,%d0 7ba7e: 40c3 movew %sr,%d3 7ba80: 8083 orl %d3,%d0 7ba82: 46c0 movew %d0,%sr switch ( the_period->state ) { 7ba84: 202a 0038 movel %a2@(56),%d0 7ba88: 7202 moveq #2,%d1 7ba8a: b280 cmpl %d0,%d1 7ba8c: 6700 00dc beqw 7bb6a 7ba90: 123c 0004 moveb #4,%d1 7ba94: b280 cmpl %d0,%d1 7ba96: 6762 beqs 7bafa 7ba98: 4a80 tstl %d0 7ba9a: 66c8 bnes 7ba64 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7ba9c: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7ba9e: 2f0a movel %a2,%sp@- 7baa0: 2d40 fff8 movel %d0,%fp@(-8) 7baa4: 4eb9 0007 b7d4 jsr 7b7d4 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7baaa: 223c 0007 bc08 movel #506888,%d1 the_watchdog->id = id; 7bab0: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7bab4: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7bab8: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 7babc: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7babe: 2542 001c movel %d2,%a2@(28) 7bac2: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 7bac6: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 7baca: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 7bace: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7bad2: 486a 0010 pea %a2@(16) 7bad6: 4879 000a 6db0 pea a6db0 <_Watchdog_Ticks_chain> 7badc: 4eb9 0004 f5c8 jsr 4f5c8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7bae2: 4eb9 0004 e438 jsr 4e438 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 7bae8: 202e fff8 movel %fp@(-8),%d0 7baec: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7baf0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7baf6: 4e5e unlk %fp 7baf8: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7bafa: 2f0a movel %a2,%sp@- 7bafc: 4eb9 0007 b902 jsr 7b902 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 7bb02: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 7bb04: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7bb06: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7bb08: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7bb0c: 2541 0038 movel %d1,%a2@(56) 7bb10: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 7bb14: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7bb18: 486a 0010 pea %a2@(16) 7bb1c: 4879 000a 6db0 pea a6db0 <_Watchdog_Ticks_chain> 7bb22: 2d40 fff8 movel %d0,%fp@(-8) 7bb26: 4eb9 0004 f5c8 jsr 4f5c8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7bb2c: 4eb9 0004 e438 jsr 4e438 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 7bb32: 202e fff8 movel %fp@(-8),%d0 7bb36: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7bb3a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7bb40: 4e5e unlk %fp 7bb42: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7bb44: 202a 0038 movel %a2@(56),%d0 7bb48: 7204 moveq #4,%d1 7bb4a: b280 cmpl %d0,%d1 7bb4c: 6400 009c bccw 7bbea 7bb50: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7bb52: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7bb56: 4eb9 0004 e438 jsr 4e438 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 7bb5c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7bb60: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7bb66: 4e5e unlk %fp 7bb68: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7bb6a: 2f0a movel %a2,%sp@- 7bb6c: 4eb9 0007 b902 jsr 7b902 <_Rate_monotonic_Update_statistics> * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; 7bb72: 242e 000c movel %fp@(12),%d2 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7bb76: 7001 moveq #1,%d0 the_period->next_length = length; 7bb78: 2542 003c movel %d2,%a2@(60) /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7bb7c: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7bb80: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 7bb82: 2079 000a 6d92 moveal a6d92 <_Thread_Executing>,%a0 7bb88: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7bb8e: 4878 4000 pea 4000 7bb92: 2f08 movel %a0,%sp@- 7bb94: 4eb9 0004 ed8c jsr 4ed8c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7bb9a: 203c 0000 0700 movel #1792,%d0 7bba0: 40c1 movew %sr,%d1 7bba2: 8081 orl %d1,%d0 7bba4: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 7bba6: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7bba8: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7bbac: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 7bbb0: 46c1 movew %d1,%sr /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 7bbb2: 7203 moveq #3,%d1 7bbb4: 4fef 000c lea %sp@(12),%sp 7bbb8: b280 cmpl %d0,%d1 7bbba: 6712 beqs 7bbce _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 7bbbc: 4eb9 0004 e438 jsr 4e438 <_Thread_Enable_dispatch> 7bbc2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7bbc4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7bbca: 4e5e unlk %fp 7bbcc: 4e75 rts /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7bbce: 4878 4000 pea 4000 7bbd2: 2f39 000a 6d92 movel a6d92 <_Thread_Executing>,%sp@- 7bbd8: 4eb9 0004 e064 jsr 4e064 <_Thread_Clear_state> 7bbde: 508f addql #8,%sp _Thread_Enable_dispatch(); 7bbe0: 4eb9 0004 e438 jsr 4e438 <_Thread_Enable_dispatch> 7bbe6: 4280 clrl %d0 7bbe8: 60da bras 7bbc4 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7bbea: 41f9 000a 0d0e lea a0d0e ,%a0 7bbf0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7bbf4: 2d40 fff8 movel %d0,%fp@(-8) 7bbf8: 4eb9 0004 e438 jsr 4e438 <_Thread_Enable_dispatch> return( return_value ); 7bbfe: 202e fff8 movel %fp@(-8),%d0 7bc02: 6000 ff5c braw 7bb60 ... 0006a084 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 6a084: 4e56 ff78 linkw %fp,#-136 6a088: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 6a08c: 262e 0008 movel %fp@(8),%d3 6a090: 246e 000c moveal %fp@(12),%a2 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 6a094: 4a8a tstl %a2 6a096: 6700 0082 beqw 6a11a return; (*print)( context, "Period information by period\n" ); 6a09a: 4879 0009 d910 pea 9d910 <_TOD_Days_per_month+0x68> 6a0a0: 2f03 movel %d3,%sp@- 6a0a2: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 6a0a4: 4879 0009 d92e pea 9d92e <_TOD_Days_per_month+0x86> 6a0aa: 2f03 movel %d3,%sp@- 6a0ac: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 6a0ae: 4879 0009 d950 pea 9d950 <_TOD_Days_per_month+0xa8> 6a0b4: 2f03 movel %d3,%sp@- 6a0b6: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 6a0b8: 4879 0009 d973 pea 9d973 <_TOD_Days_per_month+0xcb> 6a0be: 2f03 movel %d3,%sp@- 6a0c0: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 6a0c2: 4fef 001c lea %sp@(28),%sp 6a0c6: 2ebc 0009 d9be movel #645566,%sp@ 6a0cc: 2f03 movel %d3,%sp@- 6a0ce: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6a0d0: 2439 000a 7782 movel a7782 <_Rate_monotonic_Information+0x6>,%d2 6a0d6: 508f addql #8,%sp 6a0d8: b4b9 000a 7786 cmpl a7786 <_Rate_monotonic_Information+0xa>,%d2 6a0de: 623a bhis 6a11a 6a0e0: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6a0e2: 2a0e movel %fp,%d5 6a0e4: 0684 ffff ffa2 addil #-94,%d4 6a0ea: 47f9 0007 b64c lea 7b64c ,%a3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 6a0f0: 4bf9 0007 b70c lea 7b70c ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6a0f6: 5b85 subql #5,%d5 6a0f8: 49f9 0004 be3c lea 4be3c ,%a4 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6a0fe: 2e3c 0006 b8d4 movel #440532,%d7 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 6a104: 2f04 movel %d4,%sp@- 6a106: 2f02 movel %d2,%sp@- 6a108: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 6a10a: 508f addql #8,%sp 6a10c: 4a80 tstl %d0 6a10e: 6714 beqs 6a124 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 6a110: 5282 addql #1,%d2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6a112: b4b9 000a 7786 cmpl a7786 <_Rate_monotonic_Information+0xa>,%d2 6a118: 63ea blss 6a104 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 6a11a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 6a120: 4e5e unlk %fp 6a122: 4e75 rts status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 6a124: 486e ffda pea %fp@(-38) 6a128: 2f02 movel %d2,%sp@- 6a12a: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6a12c: 2f05 movel %d5,%sp@- 6a12e: 4878 0005 pea 5 6a132: 2f2e ffda movel %fp@(-38),%sp@- 6a136: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 6a138: 2f2e ffa6 movel %fp@(-90),%sp@- 6a13c: 2f2e ffa2 movel %fp@(-94),%sp@- 6a140: 2f05 movel %d5,%sp@- 6a142: 2f02 movel %d2,%sp@- 6a144: 4879 0009 da0a pea 9da0a <_TOD_Days_per_month+0x162> 6a14a: 2f03 movel %d3,%sp@- 6a14c: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 6a14e: 202e ffa2 movel %fp@(-94),%d0 6a152: 4fef 002c lea %sp@(44),%sp 6a156: 6618 bnes 6a170 (*print)( context, "\n" ); 6a158: 4879 0009 f201 pea 9f201 <__FUNCTION__.5956+0x5d> * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 6a15e: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 6a160: 2f03 movel %d3,%sp@- 6a162: 4e92 jsr %a2@ continue; 6a164: 508f addql #8,%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6a166: b4b9 000a 7786 cmpl a7786 <_Rate_monotonic_Information+0xa>,%d2 6a16c: 6396 blss 6a104 6a16e: 60aa bras 6a11a <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6a170: 486e fff2 pea %fp@(-14) 6a174: 2047 moveal %d7,%a0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 6a176: 5282 addql #1,%d2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6a178: 2f00 movel %d0,%sp@- 6a17a: 486e ffba pea %fp@(-70) 6a17e: 4e90 jsr %a0@ (*print)( context, 6a180: 202e fff6 movel %fp@(-10),%d0 6a184: 223c 0000 03e8 movel #1000,%d1 6a18a: 4c41 0800 remsl %d1,%d0,%d0 6a18e: 2c2e ffb6 movel %fp@(-74),%d6 6a192: 2f00 movel %d0,%sp@- 6a194: 2001 movel %d1,%d0 6a196: 2f2e fff2 movel %fp@(-14),%sp@- 6a19a: 4c40 6806 remsl %d0,%d6,%d6 6a19e: 202e ffae movel %fp@(-82),%d0 6a1a2: 2246 moveal %d6,%a1 6a1a4: 223c 0000 03e8 movel #1000,%d1 6a1aa: 2f09 movel %a1,%sp@- 6a1ac: 2f2e ffb2 movel %fp@(-78),%sp@- 6a1b0: 4c41 0800 remsl %d1,%d0,%d0 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 6a1b4: 2c3c 0000 03e8 movel #1000,%d6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 6a1ba: 2f00 movel %d0,%sp@- 6a1bc: 2f2e ffaa movel %fp@(-86),%sp@- 6a1c0: 4879 0009 da21 pea 9da21 <_TOD_Days_per_month+0x179> 6a1c6: 2f03 movel %d3,%sp@- 6a1c8: 4e92 jsr %a2@ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 6a1ca: 4fef 002c lea %sp@(44),%sp 6a1ce: 2047 moveal %d7,%a0 6a1d0: 486e fff2 pea %fp@(-14) 6a1d4: 2f2e ffa2 movel %fp@(-94),%sp@- 6a1d8: 486e ffd2 pea %fp@(-46) 6a1dc: 4e90 jsr %a0@ (*print)( context, 6a1de: 202e fff6 movel %fp@(-10),%d0 6a1e2: 4c46 0800 remsl %d6,%d0,%d0 6a1e6: 222e ffce movel %fp@(-50),%d1 6a1ea: 2f00 movel %d0,%sp@- 6a1ec: 2f2e fff2 movel %fp@(-14),%sp@- 6a1f0: 4c46 1801 remsl %d6,%d1,%d1 6a1f4: 202e ffc6 movel %fp@(-58),%d0 6a1f8: 2241 moveal %d1,%a1 6a1fa: 2f09 movel %a1,%sp@- 6a1fc: 2f2e ffca movel %fp@(-54),%sp@- 6a200: 4c46 0800 remsl %d6,%d0,%d0 6a204: 2f00 movel %d0,%sp@- 6a206: 2f2e ffc2 movel %fp@(-62),%sp@- 6a20a: 4879 0009 da40 pea 9da40 <_TOD_Days_per_month+0x198> 6a210: 2f03 movel %d3,%sp@- 6a212: 4e92 jsr %a2@ 6a214: 4fef 002c lea %sp@(44),%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6a218: b4b9 000a 7786 cmpl a7786 <_Rate_monotonic_Information+0xa>,%d2 6a21e: 6300 fee4 blsw 6a104 6a222: 6000 fef6 braw 6a11a <== NOT EXECUTED 0005725c : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 5725c: 4e56 fffc linkw %fp,#-4 57260: 2f03 movel %d3,%sp@- 57262: 262e 0010 movel %fp@(16),%d3 57266: 2f02 movel %d2,%sp@- 57268: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 5726c: 6700 0092 beqw 57300 return RTEMS_INVALID_ADDRESS; if ( !size ) 57270: 4a83 tstl %d3 57272: 6700 008c beqw 57300 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 57276: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 5727c: 4eb9 0005 96d8 jsr 596d8 <_API_Mutex_Lock> 57282: 486e fffc pea %fp@(-4) 57286: 2f2e 0008 movel %fp@(8),%sp@- 5728a: 4879 0007 e146 pea 7e146 <_Region_Information> 57290: 4eb9 0005 b200 jsr 5b200 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57296: 222e fffc movel %fp@(-4),%d1 5729a: 4fef 0010 lea %sp@(16),%sp 5729e: 6636 bnes 572d6 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572a0: 2f03 movel %d3,%sp@- 572a2: 2040 moveal %d0,%a0 572a4: 2f02 movel %d2,%sp@- 572a6: 4868 0068 pea %a0@(104) 572aa: 4eb9 0005 ac3c jsr 5ac3c <_Heap_Size_of_alloc_area> 572b0: 4fef 000c lea %sp@(12),%sp 572b4: 4a00 tstb %d0 572b6: 6624 bnes 572dc case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572b8: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572be: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572c0: 4eb9 0005 9738 jsr 59738 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 572c6: 588f addql #4,%sp <== NOT EXECUTED } 572c8: 2002 movel %d2,%d0 572ca: 242e fff4 movel %fp@(-12),%d2 572ce: 262e fff8 movel %fp@(-8),%d3 572d2: 4e5e unlk %fp 572d4: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572d6: 7001 moveq #1,%d0 572d8: b081 cmpl %d1,%d0 572da: 6712 beqs 572ee case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572dc: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572e2: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572e4: 4eb9 0005 9738 jsr 59738 <_API_Mutex_Unlock> return return_status; 572ea: 588f addql #4,%sp 572ec: 60da bras 572c8 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572ee: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572f4: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572f6: 4eb9 0005 9738 jsr 59738 <_API_Mutex_Unlock> return return_status; 572fc: 588f addql #4,%sp 572fe: 60c8 bras 572c8 57300: 7409 moveq #9,%d2 } 57302: 2002 movel %d2,%d0 57304: 242e fff4 movel %fp@(-12),%d2 57308: 262e fff8 movel %fp@(-8),%d3 5730c: 4e5e unlk %fp 5730e: 4e75 rts 0005895c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5895c: 4e56 ffec linkw %fp,#-20 58960: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 58964: 242e 000c movel %fp@(12),%d2 58968: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 5896c: 2479 0007 eaee moveal 7eaee <_Timer_server>,%a2 if ( !timer_server ) 58972: 4a8a tstl %a2 58974: 6700 00c8 beqw 58a3e return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58978: 4a39 0007 e25c tstb 7e25c <_TOD_Is_set> 5897e: 6700 00a6 beqw 58a26 return RTEMS_NOT_DEFINED; if ( !routine ) 58982: 4a83 tstl %d3 58984: 6700 00ac beqw 58a32 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 58988: 2f02 movel %d2,%sp@- 5898a: 4eb9 0005 5630 jsr 55630 <_TOD_Validate> 58990: 588f addql #4,%sp 58992: 4a00 tstb %d0 58994: 660c bnes 589a2 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58996: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58998: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5899e: 4e5e unlk %fp 589a0: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589a2: 2f02 movel %d2,%sp@- 589a4: 4eb9 0005 5520 jsr 55520 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 589aa: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589ac: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 589ae: b0b9 0007 e2da cmpl 7e2da <_TOD_Now>,%d0 589b4: 63e0 blss 58996 589b6: 486e fffc pea %fp@(-4) 589ba: 2f2e 0008 movel %fp@(8),%sp@- 589be: 4879 0007 eab4 pea 7eab4 <_Timer_Information> 589c4: 4eb9 0005 b23c jsr 5b23c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 589ca: 4fef 000c lea %sp@(12),%sp 589ce: 2640 moveal %d0,%a3 589d0: 4aae fffc tstl %fp@(-4) 589d4: 6674 bnes 58a4a case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 589d6: 486b 0010 pea %a3@(16) 589da: 4eb9 0005 d16c jsr 5d16c <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 589e0: 202e 0008 movel %fp@(8),%d0 589e4: 2740 0030 movel %d0,%a3@(48) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 589e8: 94b9 0007 e2da subl 7e2da <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 589ee: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 589f0: 276e 0014 0034 movel %fp@(20),%a3@(52) 589f6: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 589fa: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 589fe: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58a02: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 58a06: 2f0b movel %a3,%sp@- 58a08: 2f0a movel %a2,%sp@- 58a0a: 206a 0004 moveal %a2@(4),%a0 58a0e: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 58a10: 4eb9 0005 bb58 jsr 5bb58 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58a16: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 58a1a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a1c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a22: 4e5e unlk %fp 58a24: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58a26: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a28: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 58a2e: 4e5e unlk %fp <== NOT EXECUTED 58a30: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 58a32: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a34: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a3a: 4e5e unlk %fp 58a3c: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 58a3e: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a40: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a46: 4e5e unlk %fp 58a48: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58a4a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a4c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a52: 4e5e unlk %fp 58a54: 4e75 rts ... 00048a40 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48a40: 4e56 fffc linkw %fp,#-4 48a44: 2f02 movel %d2,%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 ); 48a46: 486e fffc pea %fp@(-4) 48a4a: 2f2e 000c movel %fp@(12),%sp@- int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48a4e: 242e 0008 movel %fp@(8),%d2 * * 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 ); 48a52: 4eb9 0004 e3b0 jsr 4e3b0 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 48a58: 508f addql #8,%sp 48a5a: 7203 moveq #3,%d1 48a5c: b280 cmpl %d0,%d1 48a5e: 671a beqs 48a7a do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48a60: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 48a64: 42a7 clrl %sp@- <== NOT EXECUTED 48a66: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48a68: 4eb9 0004 f014 jsr 4f014 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 48a6e: 242e fff8 movel %fp@(-8),%d2 <== 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 ); 48a72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED break; } } return lock_status; } 48a76: 4e5e unlk %fp <== NOT EXECUTED 48a78: 4e75 rts <== 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 ); 48a7a: 2f2e fffc movel %fp@(-4),%sp@- 48a7e: 4878 0001 pea 1 48a82: 2f02 movel %d2,%sp@- 48a84: 4eb9 0004 f014 jsr 4f014 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 48a8a: 242e fff8 movel %fp@(-8),%d2 */ 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 ); 48a8e: 4fef 000c lea %sp@(12),%sp break; } } return lock_status; } 48a92: 4e5e unlk %fp 48a94: 4e75 rts ... 0004899c : #include int sigsuspend( const sigset_t *sigmask ) { 4899c: 4e56 ffec linkw %fp,#-20 489a0: 48d7 040c moveml %d2-%d3/%a2,%sp@ int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 489a4: 240e movel %fp,%d2 489a6: 5982 subql #4,%d2 489a8: 45f9 0004 8974 lea 48974 ,%a2 (void) sigfillset( &all_signals ); 489ae: 260e movel %fp,%d3 489b0: 5183 subql #8,%d3 int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 489b2: 2f02 movel %d2,%sp@- 489b4: 2f2e 0008 movel %fp@(8),%sp@- 489b8: 4878 0001 pea 1 489bc: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 489be: 2f03 movel %d3,%sp@- 489c0: 4eb9 0004 88d0 jsr 488d0 status = sigtimedwait( &all_signals, NULL, NULL ); 489c6: 42a7 clrl %sp@- 489c8: 42a7 clrl %sp@- 489ca: 2f03 movel %d3,%sp@- 489cc: 4eb9 0004 8a58 jsr 48a58 489d2: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 489d4: 42a7 clrl %sp@- 489d6: 2f02 movel %d2,%sp@- 489d8: 42a7 clrl %sp@- 489da: 4e92 jsr %a2@ /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 489dc: 4fef 0028 lea %sp@(40),%sp 489e0: 70ff moveq #-1,%d0 489e2: b083 cmpl %d3,%d0 489e4: 660c bnes 489f2 rtems_set_errno_and_return_minus_one( EINTR ); return status; } 489e6: 70ff moveq #-1,%d0 <== NOT EXECUTED 489e8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 489ee: 4e5e unlk %fp <== NOT EXECUTED 489f0: 4e75 rts <== 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 ); 489f2: 4eb9 0005 2010 jsr 52010 <__errno> 489f8: 2040 moveal %d0,%a0 489fa: 7004 moveq #4,%d0 return status; } 489fc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 /* * 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 ); 48a02: 2080 movel %d0,%a0@ return status; } 48a04: 70ff moveq #-1,%d0 48a06: 4e5e unlk %fp 48a08: 4e75 rts ... 0004b49c : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 4b49c: 4e56 ffe8 linkw %fp,#-24 4b4a0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4b4a4: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 4b4a8: 4ab9 0005 f96e tstl 5f96e <_POSIX_signals_Ualarm_timer+0x1c> 4b4ae: 6700 0086 beqw 4b536 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 4b4b2: 4879 0005 f952 pea 5f952 <_POSIX_signals_Ualarm_timer> 4b4b8: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 4b4be: 588f addql #4,%sp 4b4c0: 7201 moveq #1,%d1 4b4c2: 5580 subql #2,%d0 4b4c4: b280 cmpl %d0,%d1 4b4c6: 6400 0098 bccw 4b560 4b4ca: 4283 clrl %d3 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 4b4cc: 4a82 tstl %d2 <== NOT EXECUTED 4b4ce: 660c bnes 4b4dc <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 4b4d0: 2003 movel %d3,%d0 4b4d2: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b4d8: 4e5e unlk %fp 4b4da: 4e75 rts if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 4b4dc: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4b4de: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 4b4e4: 5184 subql #8,%d4 4b4e6: 45f9 0004 c5c0 lea 4c5c0 <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4b4ec: 4c41 2000 remul %d1,%d0,%d2 4b4f0: 4c41 2002 remul %d1,%d2,%d2 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4b4f4: 223c 0000 03e8 movel #1000,%d1 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4b4fa: 2d42 fff8 movel %d2,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4b4fe: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 4b502: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4b504: 2d41 fffc movel %d1,%fp@(-4) ticks = _Timespec_To_ticks( &tp ); 4b508: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 4b50a: 2f04 movel %d4,%sp@- 4b50c: 4e92 jsr %a2@ 4b50e: 4879 0005 f952 pea 5f952 <_POSIX_signals_Ualarm_timer> 4b514: 4879 0005 f22c pea 5f22c <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4b51a: 23c0 0005 f95e movel %d0,5f95e <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b520: 4eb9 0004 8f4c jsr 48f4c <_Watchdog_Insert> 4b526: 4fef 0010 lea %sp@(16),%sp } return remaining; } 4b52a: 2003 movel %d3,%d0 4b52c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b532: 4e5e unlk %fp 4b534: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4b536: 42b9 0005 f95a clrl 5f95a <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4b53c: 4283 clrl %d3 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b53e: 203c 0004 b5a8 movel #308648,%d0 the_watchdog->id = id; 4b544: 42b9 0005 f972 clrl 5f972 <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b54a: 23c0 0005 f96e movel %d0,5f96e <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 4b550: 42b9 0005 f976 clrl 5f976 <_POSIX_signals_Ualarm_timer+0x24> /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 4b556: 4a82 tstl %d2 4b558: 6700 ff76 beqw 4b4d0 4b55c: 6000 ff7e braw 4b4dc * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 4b560: 2039 0005 f966 movel 5f966 <_POSIX_signals_Ualarm_timer+0x14>,%d0 4b566: d0b9 0005 f95e addl 5f95e <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 4b56c: 486e fff8 pea %fp@(-8) 4b570: 90b9 0005 f96a subl 5f96a <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4b576: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 4b57c: 2f00 movel %d0,%sp@- 4b57e: 4eb9 0004 c584 jsr 4c584 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4b584: 202e fff8 movel %fp@(-8),%d0 4b588: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 4b58c: 283c 0000 03e8 movel #1000,%d4 4b592: 508f addql #8,%sp 4b594: 262e fffc movel %fp@(-4),%d3 4b598: 4c44 3803 remsl %d4,%d3,%d3 4b59c: d680 addl %d0,%d3 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 4b59e: 4a82 tstl %d2 4b5a0: 6700 ff2e beqw 4b4d0 4b5a4: 6000 ff36 braw 4b4dc <== NOT EXECUTED