=============================================================================== 00046708 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 46708: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4670c: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 46712: 5280 addql #1,%d0 46714: 206e 0008 moveal %fp@(8),%a0 46718: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 4671e: 42a7 clrl %sp@- 46720: 2f28 0008 movel %a0@(8),%sp@- 46724: 4868 0010 pea %a0@(16) 46728: 4eb9 0004 69ac jsr 469ac <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4672e: 4fef 000c lea %sp@(12),%sp } 46732: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46734: 4ef9 0004 7d3c jmp 47d3c <_Thread_Enable_dispatch> ... =============================================================================== 000465c8 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 465c8: 4e56 0000 linkw %fp,#0 465cc: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 465ce: 2479 0005 db62 moveal 5db62 <_API_extensions_List>,%a2 465d4: b5fc 0005 db66 cmpal #383846,%a2 465da: 6710 beqs 465ec <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 465dc: 206a 0008 moveal %a2@(8),%a0 465e0: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 465e2: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 465e4: b5fc 0005 db66 cmpal #383846,%a2 465ea: 66f0 bnes 465dc <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 465ec: 246e fffc moveal %fp@(-4),%a2 465f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000465f4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 465f4: 4e56 0000 linkw %fp,#0 465f8: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 465fa: 2479 0005 db62 moveal 5db62 <_API_extensions_List>,%a2 46600: b5fc 0005 db66 cmpal #383846,%a2 46606: 6718 beqs 46620 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 46608: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 4660e: 206a 000c moveal %a2@(12),%a0 46612: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 46614: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46616: 588f addql #4,%sp 46618: b5fc 0005 db66 cmpal #383846,%a2 4661e: 66e8 bnes 46608 <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 46620: 246e fffc moveal %fp@(-4),%a2 46624: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d144 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4d144: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d14a: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4d14e: 2279 0005 da82 moveal 5da82 <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d154: 48d7 001c moveml %d2-%d4,%sp@ 4d158: 242e 000c movel %fp@(12),%d2 4d15c: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4d160: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d164: 206e 0008 moveal %fp@(8),%a0 4d168: 282e 0018 movel %fp@(24),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4d16c: 40c1 movew %sr,%d1 4d16e: 8081 orl %d1,%d0 4d170: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4d172: 2028 0048 movel %a0@(72),%d0 4d176: 5280 addql #1,%d0 4d178: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4d17c: 4aa8 0040 tstl %a0@(64) 4d180: 6606 bnes 4d188 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4d182: b0a8 0044 cmpl %a0@(68),%d0 4d186: 672e beqs 4d1b6 <_CORE_barrier_Wait+0x72> 4d188: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4d18a: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4d18e: 2348 0044 movel %a0,%a1@(68) 4d192: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4d196: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4d198: 2d43 000c movel %d3,%fp@(12) 4d19c: 203c 0004 8570 movel #296304,%d0 4d1a2: 2d48 0008 movel %a0,%fp@(8) 4d1a6: 2d40 0010 movel %d0,%fp@(16) } 4d1aa: 4cd7 001c moveml %sp@,%d2-%d4 4d1ae: 4e5e unlk %fp _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4d1b0: 4ef9 0004 8210 jmp 48210 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4d1b6: 7001 moveq #1,%d0 4d1b8: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4d1bc: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4d1be: 2d44 0010 movel %d4,%fp@(16) 4d1c2: 2d42 000c movel %d2,%fp@(12) 4d1c6: 2d48 0008 movel %a0,%fp@(8) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4d1ca: 4cd7 001c moveml %sp@,%d2-%d4 4d1ce: 4e5e unlk %fp if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4d1d0: 4ef9 0004 d108 jmp 4d108 <_CORE_barrier_Release> ... =============================================================================== 00059f30 <_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 ) { 59f30: 4e56 ffe0 linkw %fp,#-32 59f34: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f38: 266e 0008 moveal %fp@(8),%a3 59f3c: 282e 000c movel %fp@(12),%d4 59f40: 242e 0010 movel %fp@(16),%d2 59f44: 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 ) { 59f48: b4ab 004c cmpl %a3@(76),%d2 59f4c: 6262 bhis 59fb0 <_CORE_message_queue_Broadcast+0x80><== NEVER TAKEN * 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 ) { 59f4e: 4aab 0048 tstl %a3@(72) 59f52: 664c bnes 59fa0 <_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))) { 59f54: 2f0b movel %a3,%sp@- 59f56: 49f9 0005 c508 lea 5c508 <_Thread_queue_Dequeue>,%a4 59f5c: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59f5e: 4bf9 0006 2170 lea 62170 ,%a5 59f64: 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 = 59f66: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f68: 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 = 59f6a: 4a80 tstl %d0 59f6c: 6722 beqs 59f90 <_CORE_message_queue_Broadcast+0x60> 59f6e: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59f70: 5283 addql #1,%d3 59f72: 2f04 movel %d4,%sp@- 59f74: 2f2a 002c movel %a2@(44),%sp@- 59f78: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59f7a: 206a 0028 moveal %a2@(40),%a0 59f7e: 4fef 000c lea %sp@(12),%sp 59f82: 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))) { 59f84: 2f0b movel %a3,%sp@- 59f86: 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 = 59f88: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f8a: 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 = 59f8c: 4a80 tstl %d0 59f8e: 66de bnes 59f6e <_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; 59f90: 2045 moveal %d5,%a0 59f92: 4280 clrl %d0 59f94: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59f96: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59f9c: 4e5e unlk %fp 59f9e: 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; 59fa0: 2045 moveal %d5,%a0 59fa2: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fa4: 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; 59faa: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fac: 4e5e unlk %fp 59fae: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 59fb0: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fb2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59fb8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059fbc <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 59fbc: 4e56 0000 linkw %fp,#0 59fc0: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 59fc2: 2f2e 0010 movel %fp@(16),%sp@- 59fc6: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 59fca: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 59fce: 2f0a movel %a2,%sp@- 59fd0: 4eb9 0005 c8a8 jsr 5c8a8 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 59fd6: 4fef 000c lea %sp@(12),%sp 59fda: 4aaa 0048 tstl %a2@(72) 59fde: 6612 bnes 59ff2 <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 59fe0: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 59fe6: 246e fffc moveal %fp@(-4),%a2 59fea: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 59fec: 4ef9 0005 d834 jmp 5d834 <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 59ff2: 2f0a movel %a2,%sp@- 59ff4: 4eb9 0005 a030 jsr 5a030 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 59ffa: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5a000: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 5a002: 246e fffc moveal %fp@(-4),%a2 5a006: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 5a008: 4ef9 0005 d834 jmp 5d834 <_Workspace_Free> ... =============================================================================== 0004fe60 <_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)) { 4fe60: 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 ) { 4fe62: 4e56 fff4 linkw %fp,#-12 4fe66: 202e 0014 movel %fp@(20),%d0 4fe6a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe6e: 246e 0008 moveal %fp@(8),%a2 4fe72: 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)) { 4fe76: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4fe78: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4fe7c: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4fe80: 2540 004c movel %d0,%a2@(76) /* * 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)) { 4fe84: 4a81 tstl %d1 4fe86: 6620 bnes 4fea8 <_CORE_message_queue_Initialize+0x48> 4fe88: 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)); 4fe8a: 2601 movel %d1,%d3 4fe8c: 0683 0000 0010 addil #16,%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 * 4fe92: 2003 movel %d3,%d0 4fe94: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4fe98: b280 cmpl %d0,%d1 4fe9a: 631c blss 4feb8 <_CORE_message_queue_Initialize+0x58><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe9c: 4200 clrb %d0 } 4fe9e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fea4: 4e5e unlk %fp 4fea6: 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); 4fea8: 2200 movel %d0,%d1 4feaa: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4feac: 76fc moveq #-4,%d3 4feae: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4feb0: b280 cmpl %d0,%d1 4feb2: 64d6 bccs 4fe8a <_CORE_message_queue_Initialize+0x2a><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4feb4: 4200 clrb %d0 <== NOT EXECUTED 4feb6: 60e6 bras 4fe9e <_CORE_message_queue_Initialize+0x3e><== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4feb8: 2f00 movel %d0,%sp@- 4feba: 4eb9 0005 2b38 jsr 52b38 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fec0: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fec2: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fec6: 67d4 beqs 4fe9c <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4fec8: 2f03 movel %d3,%sp@- 4feca: 2f02 movel %d2,%sp@- 4fecc: 2f00 movel %d0,%sp@- 4fece: 486a 0060 pea %a2@(96) 4fed2: 4eb9 0005 48a4 jsr 548a4 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4fed8: 4878 0006 pea 6 4fedc: 7001 moveq #1,%d0 4fede: 206e 000c moveal %fp@(12),%a0 4fee2: b090 cmpl %a0@,%d0 4fee4: 57c0 seq %d0 4fee6: 4878 0080 pea 80 4feea: 49c0 extbl %d0 4feec: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4feee: 41ea 0054 lea %a2@(84),%a0 4fef2: 2f00 movel %d0,%sp@- 4fef4: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4fef8: 41ea 0050 lea %a2@(80),%a0 4fefc: 2548 0058 movel %a0,%a2@(88) 4ff00: 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; 4ff02: 42aa 0054 clrl %a2@(84) 4ff06: 4eb9 0005 1f10 jsr 51f10 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff0c: 4fef 0020 lea %sp@(32),%sp } 4ff10: 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( 4ff16: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4ff18: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ff1c <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4ff1c: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff22: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4ff26: 2079 0006 8196 moveal 68196 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff2c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ff30: 2a2e 000c movel %fp@(12),%d5 4ff34: 282e 001c movel %fp@(28),%d4 4ff38: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4ff3c: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff40: 242e 0010 movel %fp@(16),%d2 4ff44: 226e 0014 moveal %fp@(20),%a1 4ff48: 262e 0018 movel %fp@(24),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4ff4c: 40c1 movew %sr,%d1 4ff4e: 8081 orl %d1,%d0 4ff50: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ff52: 200a movel %a2,%d0 4ff54: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4ff5a: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ff5e: b08b cmpl %a3,%d0 4ff60: 674e beqs 4ffb0 <_CORE_message_queue_Seize+0x94> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4ff62: 2053 moveal %a3@,%a0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 4ff64: 53aa 0048 subql #1,%a2@(72) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4ff68: 49ea 0050 lea %a2@(80),%a4 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4ff6c: 2548 0050 movel %a0,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4ff70: 214c 0004 movel %a4,%a0@(4) _ISR_Enable( level ); 4ff74: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; 4ff76: 22ab 0008 movel %a3@(8),%a1@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4ff7a: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 4ff7e: 2079 0006 8196 moveal 68196 <_Thread_Executing>,%a0 4ff84: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ff88: 2f11 movel %a1@,%sp@- 4ff8a: 486b 000c pea %a3@(12) 4ff8e: 2f02 movel %d2,%sp@- 4ff90: 4eb9 0005 7544 jsr 57544 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4ff96: 4fef 000c lea %sp@(12),%sp 4ff9a: 2d4a 0008 movel %a2,%fp@(8) 4ff9e: 2d4b 000c movel %a3,%fp@(12) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ffa2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ffa8: 4e5e unlk %fp 4ffaa: 4ef9 0004 fd94 jmp 4fd94 <_Chain_Append> return; } #endif } if ( !wait ) { 4ffb0: 4a03 tstb %d3 4ffb2: 6612 bnes 4ffc6 <_CORE_message_queue_Seize+0xaa> _ISR_Enable( level ); 4ffb4: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ffb6: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ffb8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ffbe: 2140 0034 movel %d0,%a0@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ffc2: 4e5e unlk %fp 4ffc4: 4e75 rts 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; 4ffc6: 7001 moveq #1,%d0 4ffc8: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4ffcc: 2149 0028 movel %a1,%a0@(40) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 4ffd0: 2142 002c movel %d2,%a0@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4ffd4: 2145 0020 movel %d5,%a0@(32) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4ffd8: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4ffdc: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4ffde: 49f9 0005 1ff4 lea 51ff4 <_Thread_queue_Timeout>,%a4 4ffe4: 2d44 000c movel %d4,%fp@(12) 4ffe8: 2d4c 0010 movel %a4,%fp@(16) 4ffec: 2d4a 0008 movel %a2,%fp@(8) } 4fff0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4fff6: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4fff8: 4ef9 0005 1c94 jmp 51c94 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00050000 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 50000: 4e56 fff4 linkw %fp,#-12 50004: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50008: 246e 0008 moveal %fp@(8),%a2 5000c: 242e 0010 movel %fp@(16),%d2 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50010: b4aa 004c cmpl %a2@(76),%d2 50014: 6256 bhis 5006c <_CORE_message_queue_Submit+0x6c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 50016: 202a 0048 movel %a2@(72),%d0 5001a: 675c beqs 50078 <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 5001c: b0aa 0044 cmpl %a2@(68),%d0 50020: 650c bcss 5002e <_CORE_message_queue_Submit+0x2e> 50022: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50024: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5002a: 4e5e unlk %fp 5002c: 4e75 rts RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 5002e: 486a 0060 pea %a2@(96) 50032: 4eb9 0004 fdf4 jsr 4fdf4 <_Chain_Get> 50038: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5003a: 2f02 movel %d2,%sp@- 5003c: 2f2e 000c movel %fp@(12),%sp@- 50040: 486b 000c pea %a3@(12) 50044: 4eb9 0005 7544 jsr 57544 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 5004a: 2742 0008 movel %d2,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 5004e: 2f2e 001c movel %fp@(28),%sp@- 50052: 2f0b movel %a3,%sp@- 50054: 2f0a movel %a2,%sp@- 50056: 4eb9 0005 48ec jsr 548ec <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5005c: 4fef 001c lea %sp@(28),%sp size ); the_message->Contents.size = size; _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 50060: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50062: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50068: 4e5e unlk %fp 5006a: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 5006c: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5006e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50074: 4e5e unlk %fp 50076: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50078: 2f0a movel %a2,%sp@- 5007a: 4eb9 0005 1b34 jsr 51b34 <_Thread_queue_Dequeue> if ( the_thread ) { 50080: 588f addql #4,%sp /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50082: 2640 moveal %d0,%a3 if ( the_thread ) { 50084: 4a80 tstl %d0 50086: 672e beqs 500b6 <_CORE_message_queue_Submit+0xb6> 50088: 2f02 movel %d2,%sp@- 5008a: 2f2e 000c movel %fp@(12),%sp@- 5008e: 2f2b 002c movel %a3@(44),%sp@- 50092: 4eb9 0005 7544 jsr 57544 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 50098: 206b 0028 moveal %a3@(40),%a0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5009c: 4fef 000c lea %sp@(12),%sp buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = (uint32_t) submit_type; 500a0: 4280 clrl %d0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 500a2: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 500a4: 222e 001c movel %fp@(28),%d1 500a8: 2741 0024 movel %d1,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 500ac: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 500b2: 4e5e unlk %fp 500b4: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 500b6: 202a 0048 movel %a2@(72),%d0 /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 500ba: b0aa 0044 cmpl %a2@(68),%d0 500be: 6400 ff62 bccw 50022 <_CORE_message_queue_Submit+0x22> 500c2: 6000 ff6a braw 5002e <_CORE_message_queue_Submit+0x2e> ... =============================================================================== 000468fc <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 468fc: 4e56 0000 linkw %fp,#0 46900: 202e 0010 movel %fp@(16),%d0 46904: 2f0a movel %a2,%sp@- 46906: 246e 0008 moveal %fp@(8),%a2 4690a: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4690c: 2239 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 46912: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46914: 4a81 tstl %d1 46916: 6704 beqs 4691c <_CORE_mutex_Seize+0x20> 46918: 4a00 tstb %d0 4691a: 6634 bnes 46950 <_CORE_mutex_Seize+0x54> <== ALWAYS TAKEN 4691c: 486e 0018 pea %fp@(24) 46920: 2f0a movel %a2,%sp@- 46922: 4eb9 0004 b100 jsr 4b100 <_CORE_mutex_Seize_interrupt_trylock> 46928: 508f addql #8,%sp 4692a: 4a80 tstl %d0 4692c: 6716 beqs 46944 <_CORE_mutex_Seize+0x48> 4692e: 4a02 tstb %d2 46930: 6636 bnes 46968 <_CORE_mutex_Seize+0x6c> 46932: 202e 0018 movel %fp@(24),%d0 46936: 46c0 movew %d0,%sr 46938: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 4693e: 7001 moveq #1,%d0 46940: 2140 0034 movel %d0,%a0@(52) } 46944: 242e fff8 movel %fp@(-8),%d2 46948: 246e fffc moveal %fp@(-4),%a2 4694c: 4e5e unlk %fp 4694e: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46950: 7001 moveq #1,%d0 46952: b0b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d0 46958: 64c2 bccs 4691c <_CORE_mutex_Seize+0x20> 4695a: 4878 0013 pea 13 4695e: 42a7 clrl %sp@- 46960: 42a7 clrl %sp@- 46962: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> 46968: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 4696e: 5280 addql #1,%d0 46970: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 46976: 216e 000c 0020 movel %fp@(12),%a0@(32) 4697c: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 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; 46982: 7001 moveq #1,%d0 46984: 214a 0044 movel %a2,%a0@(68) 46988: 2540 0030 movel %d0,%a2@(48) 4698c: 202e 0018 movel %fp@(24),%d0 46990: 46c0 movew %d0,%sr 46992: 2f2e 0014 movel %fp@(20),%sp@- 46996: 2f0a movel %a2,%sp@- 46998: 4eb9 0004 6870 jsr 46870 <_CORE_mutex_Seize_interrupt_blocking> } 4699e: 242e fff8 movel %fp@(-8),%d2 bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 469a2: 508f addql #8,%sp } 469a4: 246e fffc moveal %fp@(-4),%a2 469a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b100 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4b100: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4b104: 2279 0005 da82 moveal 5da82 <_Thread_Executing>,%a1 4b10a: 2f0a movel %a2,%sp@- 4b10c: 206e 0008 moveal %fp@(8),%a0 4b110: 246e 000c moveal %fp@(12),%a2 4b114: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4b116: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4b11a: 4aa8 004e tstl %a0@(78) 4b11e: 673a beqs 4b15a <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4b120: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b124: 7201 moveq #1,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4b126: 2169 0008 005e movel %a1@(8),%a0@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4b12c: 2028 0046 movel %a0@(70),%d0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b130: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b134: 123c 0002 moveb #2,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4b138: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b13c: b280 cmpl %d0,%d1 4b13e: 672e beqs 4b16e <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4b140: 123c 0003 moveb #3,%d1 4b144: b280 cmpl %d0,%d1 4b146: 674e beqs 4b196 <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b148: 2012 movel %a2@,%d0 4b14a: 46c0 movew %d0,%sr 4b14c: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4b14e: 242e fff8 movel %fp@(-8),%d2 4b152: 246e fffc moveal %fp@(-4),%a2 4b156: 4e5e unlk %fp 4b158: 4e75 rts /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4b15a: b3e8 005a cmpal %a0@(90),%a1 4b15e: 671a beqs 4b17a <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4b160: 242e fff8 movel %fp@(-8),%d2 the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4b164: 7001 moveq #1,%d0 4b166: 246e fffc moveal %fp@(-4),%a2 4b16a: 4e5e unlk %fp 4b16c: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b16e: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b172: 2012 movel %a2@,%d0 4b174: 46c0 movew %d0,%sr 4b176: 4280 clrl %d0 4b178: 60d4 bras 4b14e <_CORE_mutex_Seize_interrupt_trylock+0x4e> * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b17a: 2028 0040 movel %a0@(64),%d0 4b17e: 6658 bnes 4b1d8 <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4b180: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4b184: 2012 movel %a2@,%d0 4b186: 46c0 movew %d0,%sr 4b188: 242e fff8 movel %fp@(-8),%d2 4b18c: 4280 clrl %d0 4b18e: 246e fffc moveal %fp@(-4),%a2 4b192: 4e5e unlk %fp 4b194: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b196: 2429 001c movel %a1@(28),%d2 4b19a: 2002 movel %d2,%d0 4b19c: 5280 addql #1,%d0 4b19e: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4b1a2: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4b1a6: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4b1aa: b081 cmpl %d1,%d0 4b1ac: 6700 0082 beqw 4b230 <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4b1b0: 6244 bhis 4b1f6 <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b1b2: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b1b4: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b1b6: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4b1ba: 42a8 0052 clrl %a0@(82) _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b1be: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4b1c2: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4b1c6: 2012 movel %a2@,%d0 4b1c8: 46c0 movew %d0,%sr 4b1ca: 242e fff8 movel %fp@(-8),%d2 4b1ce: 4280 clrl %d0 4b1d0: 246e fffc moveal %fp@(-4),%a2 4b1d4: 4e5e unlk %fp 4b1d6: 4e75 rts * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b1d8: 7201 moveq #1,%d1 4b1da: b280 cmpl %d0,%d1 4b1dc: 6682 bnes 4b160 <_CORE_mutex_Seize_interrupt_trylock+0x60><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4b1de: 7002 moveq #2,%d0 <== NOT EXECUTED 4b1e0: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4b1e4: 2012 movel %a2@,%d0 <== NOT EXECUTED 4b1e6: 46c0 movew %d0,%sr <== NOT EXECUTED 4b1e8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4b1ec: 4280 clrl %d0 <== NOT EXECUTED 4b1ee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b1f2: 4e5e unlk %fp <== NOT EXECUTED 4b1f4: 4e75 rts <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4b1f6: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 4b1fc: 5280 addql #1,%d0 4b1fe: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4b204: 2012 movel %a2@,%d0 4b206: 46c0 movew %d0,%sr _Thread_Change_priority( 4b208: 42a7 clrl %sp@- 4b20a: 2f28 004a movel %a0@(74),%sp@- 4b20e: 2f28 005a movel %a0@(90),%sp@- 4b212: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4b218: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4b21e: 242e fff8 movel %fp@(-8),%d2 4b222: 4fef 000c lea %sp@(12),%sp 4b226: 4280 clrl %d0 4b228: 246e fffc moveal %fp@(-4),%a2 4b22c: 4e5e unlk %fp 4b22e: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4b230: 2012 movel %a2@,%d0 4b232: 46c0 movew %d0,%sr 4b234: 242e fff8 movel %fp@(-8),%d2 4b238: 4280 clrl %d0 4b23a: 246e fffc moveal %fp@(-4),%a2 4b23e: 4e5e unlk %fp ... =============================================================================== 00046b10 <_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 ) { 46b10: 4e56 0000 linkw %fp,#0 46b14: 2f0a movel %a2,%sp@- 46b16: 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)) ) { 46b1a: 2f0a movel %a2,%sp@- 46b1c: 4eb9 0004 80b0 jsr 480b0 <_Thread_queue_Dequeue> 46b22: 588f addql #4,%sp 46b24: 4a80 tstl %d0 46b26: 670a beqs 46b32 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b28: 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)) ) { 46b2c: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b2e: 4e5e unlk %fp 46b30: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b32: 203c 0000 0700 movel #1792,%d0 46b38: 40c1 movew %sr,%d1 46b3a: 8081 orl %d1,%d0 46b3c: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b3e: 202a 0048 movel %a2@(72),%d0 46b42: b0aa 0040 cmpl %a2@(64),%d0 46b46: 6412 bccs 46b5a <_CORE_semaphore_Surrender+0x4a> <== NEVER TAKEN the_semaphore->count += 1; 46b48: 5280 addql #1,%d0 46b4a: 2540 0048 movel %d0,%a2@(72) 46b4e: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b50: 46c1 movew %d1,%sr } return status; } 46b52: 246e fffc moveal %fp@(-4),%a2 46b56: 4e5e unlk %fp 46b58: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b5a: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b5c: 46c1 movew %d1,%sr <== NOT EXECUTED 46b5e: 60f2 bras 46b52 <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED =============================================================================== 0004b0b8 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4b0b8: 4e56 0000 linkw %fp,#0 4b0bc: 202e 0010 movel %fp@(16),%d0 4b0c0: 2f0a movel %a2,%sp@- 4b0c2: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4b0c6: 224a moveal %a2,%a1 4b0c8: 2f02 movel %d2,%sp@- 4b0ca: 242e 0014 movel %fp@(20),%d2 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 4b0ce: 42aa 0004 clrl %a2@(4) next = starting_address; while ( count-- ) { 4b0d2: 4a80 tstl %d0 4b0d4: 6718 beqs 4b0ee <_Chain_Initialize+0x36> <== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4b0d6: 206e 000c moveal %fp@(12),%a0 while ( count-- ) { current->next = next; next->previous = current; 4b0da: 2149 0004 movel %a1,%a0@(4) 4b0de: 2208 movel %a0,%d1 4b0e0: d282 addl %d2,%d1 current = next; next = (Chain_Node *) 4b0e2: 5380 subql #1,%d0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 4b0e4: 2288 movel %a0,%a1@ next->previous = current; current = next; next = (Chain_Node *) 4b0e6: 2248 moveal %a0,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4b0e8: 2041 moveal %d1,%a0 4b0ea: 4a80 tstl %d0 4b0ec: 66ec bnes 4b0da <_Chain_Initialize+0x22> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4b0ee: 200a movel %a2,%d0 4b0f0: 5880 addql #4,%d0 4b0f2: 2280 movel %d0,%a1@ the_chain->last = current; } 4b0f4: 241f movel %sp@+,%d2 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 4b0f6: 2549 0008 movel %a1,%a2@(8) } 4b0fa: 245f moveal %sp@+,%a2 4b0fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000456d0 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 456d0: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456d6: 4e56 ffec linkw %fp,#-20 456da: 222e 0008 movel %fp@(8),%d1 456de: 48d7 043c moveml %d2-%d5/%a2,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 456e2: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456e8: 242e 000c movel %fp@(12),%d2 456ec: 2a2e 0010 movel %fp@(16),%d5 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 456f0: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456f4: 226e 0014 moveal %fp@(20),%a1 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 456f8: 206a 0108 moveal %a2@(264),%a0 _ISR_Disable( level ); 456fc: 40c4 movew %sr,%d4 456fe: 8084 orl %d4,%d0 45700: 46c0 movew %d0,%sr pending_events = api->pending_events; 45702: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45704: 2001 movel %d1,%d0 45706: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 45708: 670c beqs 45716 <_Event_Seize+0x46> 4570a: b081 cmpl %d1,%d0 4570c: 6700 0084 beqw 45792 <_Event_Seize+0xc2> 45710: 0802 0001 btst #1,%d2 45714: 667c bnes 45792 <_Event_Seize+0xc2> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 45716: 0802 0000 btst #0,%d2 4571a: 6662 bnes 4577e <_Event_Seize+0xae> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 4571c: 2542 0030 movel %d2,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 45720: 7401 moveq #1,%d2 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 45722: 2541 0024 movel %d1,%a2@(36) executing->Wait.return_argument = event_out; 45726: 2549 0028 movel %a1,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4572a: 23c2 0005 dba6 movel %d2,5dba6 <_Event_Sync_state> _ISR_Enable( level ); 45730: 46c4 movew %d4,%sr if ( ticks ) { 45732: 4a85 tstl %d5 45734: 6672 bnes 457a8 <_Event_Seize+0xd8> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 45736: 4878 0100 pea 100 4573a: 2f0a movel %a2,%sp@- 4573c: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state> _ISR_Disable( level ); 45742: 203c 0000 0700 movel #1792,%d0 45748: 40c1 movew %sr,%d1 4574a: 8081 orl %d1,%d0 4574c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4574e: 7401 moveq #1,%d2 45750: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 45752: 2039 0005 dba6 movel 5dba6 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45758: 42b9 0005 dba6 clrl 5dba6 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4575e: b480 cmpl %d0,%d2 45760: 6700 00a4 beqw 45806 <_Event_Seize+0x136> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45764: 2d4a 000c movel %a2,%fp@(12) 45768: 2d41 0010 movel %d1,%fp@(16) } 4576c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45772: 2d40 0008 movel %d0,%fp@(8) } 45776: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45778: 4ef9 0004 77b4 jmp 477b4 <_Thread_blocking_operation_Cancel> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4577e: 46c4 movew %d4,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 45780: 720d moveq #13,%d1 45782: 2541 0034 movel %d1,%a2@(52) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45786: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; 4578c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4578e: 4e5e unlk %fp 45790: 4e75 rts pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 45792: 2200 movel %d0,%d1 45794: 4681 notl %d1 45796: c283 andl %d3,%d1 45798: 2081 movel %d1,%a0@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4579a: 46c4 movew %d4,%sr *event_out = seized_events; 4579c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4579e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 457a4: 4e5e unlk %fp 457a6: 4e75 rts _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 457a8: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457ac: 223c 0004 599c movel #285084,%d1 the_watchdog->id = id; 457b2: 2540 0068 movel %d0,%a2@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457b6: 2541 0064 movel %d1,%a2@(100) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 457ba: 2545 0054 movel %d5,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 457be: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 457c2: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 457c6: 486a 0048 pea %a2@(72) 457ca: 4879 0005 daa0 pea 5daa0 <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8e1c jsr 48e1c <_Watchdog_Insert> 457d6: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 457d8: 4878 0100 pea 100 457dc: 2f0a movel %a2,%sp@- 457de: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state> _ISR_Disable( level ); 457e4: 203c 0000 0700 movel #1792,%d0 457ea: 40c1 movew %sr,%d1 457ec: 8081 orl %d1,%d0 457ee: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 457f0: 7401 moveq #1,%d2 457f2: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 457f4: 2039 0005 dba6 movel 5dba6 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 457fa: 42b9 0005 dba6 clrl 5dba6 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 45800: b480 cmpl %d0,%d2 45802: 6600 ff60 bnew 45764 <_Event_Seize+0x94> _ISR_Enable( level ); 45806: 46c1 movew %d1,%sr * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45808: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4580e: 4e5e unlk %fp ... =============================================================================== 00045870 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 45870: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 45876: 4e56 ffec linkw %fp,#-20 4587a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4587e: 246e 0008 moveal %fp@(8),%a2 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 45882: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 45886: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 4588a: 40c3 movew %sr,%d3 4588c: 8083 orl %d3,%d0 4588e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 45890: 222a 0024 movel %a2@(36),%d1 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45894: 2001 movel %d1,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 45896: 2410 movel %a0@,%d2 45898: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4589a: 6778 beqs 45914 <_Event_Surrender+0xa4> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4589c: 2279 0005 da62 moveal 5da62 <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 da82 cmpal 5da82 <_Thread_Executing>,%a2 458ac: 6700 00a0 beqw 4594e <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 458b0: 2a2a 0010 movel %a2@(16),%d5 458b4: 0285 0000 0100 andil #256,%d5 458ba: 674c beqs 45908 <_Event_Surrender+0x98> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 458bc: b081 cmpl %d1,%d0 458be: 6706 beqs 458c6 <_Event_Surrender+0x56> 458c0: 0804 0001 btst #1,%d4 458c4: 6742 beqs 45908 <_Event_Surrender+0x98> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 458c6: 2200 movel %d0,%d1 458c8: 4681 notl %d1 458ca: c282 andl %d2,%d1 458cc: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458ce: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 458d2: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458d6: 2080 movel %d0,%a0@ _ISR_Flash( level ); 458d8: 203c 0000 0700 movel #1792,%d0 458de: 46c3 movew %d3,%sr 458e0: 8083 orl %d3,%d0 458e2: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 458e4: 7a02 moveq #2,%d5 458e6: baaa 0050 cmpl %a2@(80),%d5 458ea: 6734 beqs 45920 <_Event_Surrender+0xb0> _ISR_Enable( level ); 458ec: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 458ee: 2f3c 1003 fff8 movel #268697592,%sp@- 458f4: 2f0a movel %a2,%sp@- 458f6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 458fc: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 458fe: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45904: 4e5e unlk %fp 45906: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 45908: 46c3 movew %d3,%sr } 4590a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45910: 4e5e unlk %fp 45912: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 45914: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45916: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4591c: 4e5e unlk %fp 4591e: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 45920: 7003 moveq #3,%d0 45922: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 45926: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45928: 486a 0048 pea %a2@(72) 4592c: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 45940: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 45944: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4594a: 4e5e unlk %fp 4594c: 4e75 rts * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 4594e: 2279 0005 dba6 moveal 5dba6 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45954: 7a02 moveq #2,%d5 45956: ba89 cmpl %a1,%d5 45958: 6710 beqs 4596a <_Event_Surrender+0xfa> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4595a: 2279 0005 dba6 moveal 5dba6 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45960: 1a3c 0001 moveb #1,%d5 45964: ba89 cmpl %a1,%d5 45966: 6600 ff48 bnew 458b0 <_Event_Surrender+0x40> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4596a: b081 cmpl %d1,%d0 4596c: 6706 beqs 45974 <_Event_Surrender+0x104> 4596e: 0804 0001 btst #1,%d4 45972: 671a beqs 4598e <_Event_Surrender+0x11e> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 45974: 2200 movel %d0,%d1 45976: 4681 notl %d1 45978: c282 andl %d2,%d1 4597a: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4597c: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 45980: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45984: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 45986: 7003 moveq #3,%d0 45988: 23c0 0005 dba6 movel %d0,5dba6 <_Event_Sync_state> } _ISR_Enable( level ); 4598e: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45990: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45996: 4e5e unlk %fp ... =============================================================================== 0004599c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4599c: 4e56 fffc linkw %fp,#-4 459a0: 2f03 movel %d3,%sp@- 459a2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 459a4: 486e fffc pea %fp@(-4) 459a8: 2f2e 0008 movel %fp@(8),%sp@- 459ac: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_Event_Timeout+0x60> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 459ba: 223c 0000 0700 movel #1792,%d1 459c0: 40c2 movew %sr,%d2 459c2: 8282 orl %d2,%d1 459c4: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 459c6: 2040 moveal %d0,%a0 459c8: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 459cc: b0b9 0005 da82 cmpl 5da82 <_Thread_Executing>,%d0 459d2: 6734 beqs 45a08 <_Event_Timeout+0x6c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 459d4: 7606 moveq #6,%d3 459d6: 2040 moveal %d0,%a0 459d8: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 459dc: 46c2 movew %d2,%sr 459de: 2f3c 1003 fff8 movel #268697592,%sp@- 459e4: 2f00 movel %d0,%sp@- 459e6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 459ec: 508f addql #8,%sp 459ee: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 459fc: 242e fff4 movel %fp@(-12),%d2 45a00: 262e fff8 movel %fp@(-8),%d3 45a04: 4e5e unlk %fp 45a06: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45a08: 2239 0005 dba6 movel 5dba6 <_Event_Sync_state>,%d1 45a0e: 7601 moveq #1,%d3 45a10: b681 cmpl %d1,%d3 45a12: 66c0 bnes 459d4 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a14: 7606 moveq #6,%d3 45a16: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a18: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a1a: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a1e: 23c1 0005 dba6 movel %d1,5dba6 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 45a24: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45a26: 2f3c 1003 fff8 movel #268697592,%sp@- 45a2c: 2f00 movel %d0,%sp@- 45a2e: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45a34: 508f addql #8,%sp 45a36: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> ... =============================================================================== 0004b37c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b37c: 4e56 ffcc linkw %fp,#-52 4b380: 226e 000c moveal %fp@(12),%a1 4b384: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b388: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 4b38c: 2c09 movel %a1,%d6 4b38e: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4b390: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b394: 222e 0010 movel %fp@(16),%d1 4b398: 282e 0014 movel %fp@(20),%d4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4b39c: 206a 0008 moveal %a2@(8),%a0 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 4b3a0: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4b3a4: bc89 cmpl %a1,%d6 4b3a6: 6500 0146 bcsw 4b4ee <_Heap_Allocate_aligned_with_boundary+0x172> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4b3aa: 4a84 tstl %d4 4b3ac: 6600 013c bnew 4b4ea <_Heap_Allocate_aligned_with_boundary+0x16e> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b3b0: b1ca cmpal %a2,%a0 4b3b2: 6700 0152 beqw 4b506 <_Heap_Allocate_aligned_with_boundary+0x18a> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b3b6: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b3ba: 7a04 moveq #4,%d5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b3bc: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b3be: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b3c0: 4283 clrl %d3 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b3c2: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b3c6: 2d45 fff4 movel %d5,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4b3ca: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4b3ce: 5283 addql #1,%d3 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4b3d0: b086 cmpl %d6,%d0 4b3d2: 630e blss 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4b3d4: 4a81 tstl %d1 4b3d6: 6628 bnes 4b400 <_Heap_Allocate_aligned_with_boundary+0x84> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4b3d8: 2408 movel %a0,%d2 4b3da: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4b3dc: 4a82 tstl %d2 4b3de: 6600 00ee bnew 4b4ce <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4b3e2: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b3e6: b1ca cmpal %a2,%a0 4b3e8: 66e0 bnes 4b3ca <_Heap_Allocate_aligned_with_boundary+0x4e> 4b3ea: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4b3ec: b6aa 0044 cmpl %a2@(68),%d3 4b3f0: 6304 blss 4b3f6 <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b3f2: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4b3f6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b3fc: 4e5e unlk %fp 4b3fe: 4e75 rts uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4b400: 7efe moveq #-2,%d7 4b402: 4be8 0008 lea %a0@(8),%a5 4b406: c087 andl %d7,%d0 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4b408: 286a 0014 moveal %a2@(20),%a4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4b40c: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b40e: 2a2e fff8 movel %fp@(-8),%d5 4b412: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b414: 242e fff4 movel %fp@(-12),%d2 4b418: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4b41a: 2e02 movel %d2,%d7 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b41c: d085 addl %d5,%d0 4b41e: 4c41 7005 remul %d1,%d5,%d7 4b422: 9485 subl %d5,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4b424: b480 cmpl %d0,%d2 4b426: 630a blss 4b432 <_Heap_Allocate_aligned_with_boundary+0xb6> 4b428: 2a00 movel %d0,%d5 4b42a: 4c41 5002 remul %d1,%d2,%d5 4b42e: 9082 subl %d2,%d0 4b430: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4b432: 4a84 tstl %d4 4b434: 676c beqs 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4b436: 2002 movel %d2,%d0 4b438: d089 addl %a1,%d0 4b43a: 2e00 movel %d0,%d7 4b43c: 4c44 7005 remul %d4,%d5,%d7 4b440: 2e00 movel %d0,%d7 4b442: 9e85 subl %d5,%d7 4b444: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4b446: be82 cmpl %d2,%d7 4b448: 6358 blss 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126> 4b44a: be80 cmpl %d0,%d7 4b44c: 6454 bccs 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4b44e: 2e0d movel %a5,%d7 4b450: de89 addl %a1,%d7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4b452: ba87 cmpl %d7,%d5 4b454: 658c bcss 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4b456: 9a89 subl %a1,%d5 4b458: 2005 movel %d5,%d0 4b45a: 2647 moveal %d7,%a3 4b45c: 4c41 0002 remul %d1,%d2,%d0 4b460: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b462: 2005 movel %d5,%d0 4b464: d089 addl %a1,%d0 4b466: 2405 movel %d5,%d2 4b468: 2e00 movel %d0,%d7 4b46a: 4c44 7005 remul %d4,%d5,%d7 4b46e: 2e00 movel %d0,%d7 4b470: 9e85 subl %d5,%d7 4b472: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4b474: be82 cmpl %d2,%d7 4b476: 632a blss 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126> 4b478: be80 cmpl %d0,%d7 4b47a: 6426 bccs 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4b47c: ba8b cmpl %a3,%d5 4b47e: 6500 ff62 bcsw 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4b482: 9a89 subl %a1,%d5 4b484: 2005 movel %d5,%d0 4b486: 4c41 0002 remul %d1,%d2,%d0 4b48a: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b48c: 2005 movel %d5,%d0 4b48e: d089 addl %a1,%d0 4b490: 2405 movel %d5,%d2 4b492: 2e00 movel %d0,%d7 4b494: 4c44 7005 remul %d4,%d5,%d7 4b498: 2e00 movel %d0,%d7 4b49a: 9e85 subl %d5,%d7 4b49c: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4b49e: be82 cmpl %d2,%d7 4b4a0: 62d6 bhis 4b478 <_Heap_Allocate_aligned_with_boundary+0xfc><== ALWAYS TAKEN boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4b4a2: b48d cmpl %a5,%d2 4b4a4: 6500 ff3c bcsw 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4b4a8: 70f8 moveq #-8,%d0 4b4aa: 9088 subl %a0,%d0 4b4ac: 2a40 moveal %d0,%a5 4b4ae: 2e02 movel %d2,%d7 4b4b0: dbc2 addal %d2,%a5 4b4b2: 202e fffc movel %fp@(-4),%d0 4b4b6: 4c40 7005 remul %d0,%d5,%d7 4b4ba: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4b4bc: bbcc cmpal %a4,%a5 4b4be: 6400 ff1c bccw 4b3dc <_Heap_Allocate_aligned_with_boundary+0x60> 4b4c2: 4a8d tstl %a5 4b4c4: 6600 ff1c bnew 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66> boundary ); } } if ( alloc_begin != 0 ) { 4b4c8: 4a82 tstl %d2 4b4ca: 6700 ff16 beqw 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66> if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b4ce: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4b4d0: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b4d4: 2f02 movel %d2,%sp@- 4b4d6: 2f08 movel %a0,%sp@- 4b4d8: 2f0a movel %a2,%sp@- 4b4da: 4eb9 0004 6e38 jsr 46e38 <_Heap_Block_allocate> 4b4e0: 4fef 0010 lea %sp@(16),%sp 4b4e4: 2002 movel %d2,%d0 4b4e6: 6000 ff04 braw 4b3ec <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4b4ea: b889 cmpl %a1,%d4 4b4ec: 640c bccs 4b4fa <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b4ee: 4280 clrl %d0 } return (void *) alloc_begin; } 4b4f0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b4f6: 4e5e unlk %fp 4b4f8: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4b4fa: 4a81 tstl %d1 4b4fc: 6600 feb2 bnew 4b3b0 <_Heap_Allocate_aligned_with_boundary+0x34> 4b500: 2200 movel %d0,%d1 4b502: 6000 feac braw 4b3b0 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; } } while ( block != free_list_tail ) { 4b506: 4283 clrl %d3 4b508: 4280 clrl %d0 4b50a: 6000 fee0 braw 4b3ec <_Heap_Allocate_aligned_with_boundary+0x70> ... =============================================================================== 00046e38 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e38: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e3a: 4e56 ffe0 linkw %fp,#-32 46e3e: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 46e42: 2041 moveal %d1,%a0 46e44: 5188 subql #8,%a0 46e46: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46e4a: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e4e: 7601 moveq #1,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 46e50: 2848 moveal %a0,%a4 46e52: 240a movel %a2,%d2 46e54: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e56: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e5a: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e5e: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e62: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e66: 4a03 tstb %d3 46e68: 6600 00aa bnew 46f14 <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 46e6c: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e70: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 46e72: 52ab 0040 addql #1,%a3@(64) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 46e76: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 46e7a: 2a40 moveal %d0,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 46e7c: 226a 000c moveal %a2@(12),%a1 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e80: c6aa 0004 andl %a2@(4),%d3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 46e84: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46e88: 202b 0010 movel %a3@(16),%d0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e8c: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 46e90: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46e94: b08c cmpl %a4,%d0 46e96: 6200 0088 bhiw 46f20 <_Heap_Block_allocate+0xe8> - 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; 46e9a: 262a 0004 movel %a2@(4),%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 46e9e: 4c40 1004 remul %d0,%d4,%d1 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 46ea2: 7201 moveq #1,%d1 46ea4: 91c4 subal %d4,%a0 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 46ea6: 2008 movel %a0,%d0 46ea8: 908a subl %a2,%d0 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 46eaa: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 46eae: c2aa 0004 andl %a2@(4),%d1 46eb2: 6700 0082 beqw 46f36 <_Heap_Block_allocate+0xfe> } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46eb6: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 46eb8: 52ab 0038 addql #1,%a3@(56) 46ebc: 220a movel %a2,%d1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 46ebe: 2869 0008 moveal %a1@(8),%a4 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46ec2: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46ec4: 7801 moveq #1,%d4 46ec6: 8880 orl %d0,%d4 new_block->next = next; 46ec8: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46ecc: d483 addl %d3,%d2 46ece: 9488 subl %a0,%d2 new_block->prev = block_before; 46ed0: 2549 000c movel %a1,%a2@(12) block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46ed4: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 46ed8: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 46edc: 294a 000c movel %a2,%a4@(12) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46ee0: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46ee2: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46ee4: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46ee8: 2f05 movel %d5,%sp@- 46eea: 2f01 movel %d1,%sp@- 46eec: 2f08 movel %a0,%sp@- 46eee: 2f0b movel %a3,%sp@- 46ef0: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46ef6: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 46efa: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 46efe: b0ab 0034 cmpl %a3@(52),%d0 46f02: 6404 bccs 46f08 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 46f04: 2740 0034 movel %d0,%a3@(52) } return block; } 46f08: 200a movel %a2,%d0 46f0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f10: 4e5e unlk %fp 46f12: 4e75 rts stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46f14: 202b 0010 movel %a3@(16),%d0 /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 46f18: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 46f1a: b08c cmpl %a4,%d0 46f1c: 6300 ff7c blsw 46e9a <_Heap_Block_allocate+0x62> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 46f20: 4874 5800 pea %a4@(00000000,%d5:l) 46f24: 2f09 movel %a1,%sp@- 46f26: 2f0a movel %a2,%sp@- 46f28: 2f0b movel %a3,%sp@- 46f2a: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f30: 4fef 0010 lea %sp@(16),%sp 46f34: 60c4 bras 46efa <_Heap_Block_allocate+0xc2> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 46f36: 95d2 subal %a2@,%a2 Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 46f38: 78fe moveq #-2,%d4 46f3a: 2209 movel %a1,%d1 46f3c: c8aa 0004 andl %a2@(4),%d4 46f40: d084 addl %d4,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f42: 78fe moveq #-2,%d4 46f44: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46f46: 7801 moveq #1,%d4 46f48: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f4a: d483 addl %d3,%d2 46f4c: 9488 subl %a0,%d2 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46f4e: 2544 0004 movel %d4,%a2@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f52: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46f54: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46f56: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f5a: 2f05 movel %d5,%sp@- 46f5c: 2f01 movel %d1,%sp@- 46f5e: 2f08 movel %a0,%sp@- 46f60: 2f0b movel %a3,%sp@- 46f62: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f68: 4fef 0010 lea %sp@(16),%sp 46f6c: 608c bras 46efa <_Heap_Block_allocate+0xc2> ... =============================================================================== 00050480 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50480: 4e56 fff4 linkw %fp,#-12 50484: 206e 0008 moveal %fp@(8),%a0 50488: 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; 5048c: 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; 50490: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50494: 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; 50498: b0a8 0018 cmpl %a0@(24),%d0 5049c: 6410 bccs 504ae <_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 ) { 5049e: b280 cmpl %d0,%d1 504a0: 671c beqs 504be <_Heap_Extend+0x3e> 504a2: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 504a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504aa: 4e5e unlk %fp 504ac: 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 ) { 504ae: b280 cmpl %d0,%d1 504b0: 63ec blss 5049e <_Heap_Extend+0x1e> 504b2: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 504b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504ba: 4e5e unlk %fp 504bc: 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; 504be: 2200 movel %d0,%d1 504c0: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 504c4: 70f8 moveq #-8,%d0 504c6: 9089 subl %a1,%d0 504c8: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 504ca: 2600 movel %d0,%d3 504cc: 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; 504d2: 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; 504d6: 246e 0014 moveal %fp@(20),%a2 504da: 9082 subl %d2,%d0 504dc: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 504de: b0a8 0014 cmpl %a0@(20),%d0 504e2: 640c bccs 504f0 <_Heap_Extend+0x70> <== ALWAYS TAKEN /* 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 )); 504e4: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 504e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504ec: 4e5e unlk %fp 504ee: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 504f0: 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); 504f2: 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; 504f6: 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 = 504fa: 2228 0020 movel %a0@(32),%d1 504fe: 928a subl %a2,%d1 50500: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 50502: 214a 0024 movel %a2,%a0@(36) 50506: 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 = 5050a: 7401 moveq #1,%d2 5050c: 8481 orl %d1,%d2 5050e: 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 )); 50512: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 50516: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 5051a: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 5051e: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50522: 2f08 movel %a0,%sp@- 50524: 4eb9 0004 b58c jsr 4b58c <_Heap_Free> 5052a: 508f addql #8,%sp 5052c: 4280 clrl %d0 5052e: 60b6 bras 504e6 <_Heap_Extend+0x66> =============================================================================== 0004b510 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4b510: 4e56 ffe4 linkw %fp,#-28 4b514: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4b518: 2040 moveal %d0,%a0 4b51a: 5188 subql #8,%a0 4b51c: 226e 0008 moveal %fp@(8),%a1 4b520: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4b526: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4b52a: 2029 0020 movel %a1@(32),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4b52e: 91c1 subal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b530: b088 cmpl %a0,%d0 4b532: 6200 00a0 bhiw 4b5d4 <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4b536: 2229 0024 movel %a1@(36),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b53a: b288 cmpl %a0,%d1 4b53c: 6500 0096 bcsw 4b5d4 <_Heap_Free+0xc4> - 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; 4b540: 2628 0004 movel %a0@(4),%d3 4b544: 74fe moveq #-2,%d2 4b546: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4b548: 45f0 2800 lea %a0@(00000000,%d2:l),%a2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b54c: b5c0 cmpal %d0,%a2 4b54e: 6500 0084 bcsw 4b5d4 <_Heap_Free+0xc4> 4b552: b5c1 cmpal %d1,%a2 4b554: 627e bhis 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN 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; 4b556: 282a 0004 movel %a2@(4),%d4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4b55a: 7a01 moveq #1,%d5 4b55c: ca84 andl %d4,%d5 4b55e: 4a05 tstb %d5 4b560: 6772 beqs 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN - 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; 4b562: 7afe moveq #-2,%d5 4b564: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b566: b5c1 cmpal %d1,%a2 4b568: 6700 00fa beqw 4b664 <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4b56c: 7a01 moveq #1,%d5 4b56e: 7c01 moveq #1,%d6 4b570: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4b574: bd85 eorl %d6,%d5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4b576: 7c01 moveq #1,%d6 4b578: c686 andl %d6,%d3 4b57a: 4a03 tstb %d3 4b57c: 6660 bnes 4b5de <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4b57e: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4b580: 91c3 subal %d3,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b582: b1c0 cmpal %d0,%a0 4b584: 654e bcss 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN 4b586: b1c1 cmpal %d1,%a0 4b588: 624a bhis 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 4b58a: 7001 moveq #1,%d0 4b58c: c0a8 0004 andl %a0@(4),%d0 4b590: 4a00 tstb %d0 4b592: 6740 beqs 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4b594: 4a05 tstb %d5 4b596: 6700 00d2 beqw 4b66a <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4b59a: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4b59e: 53a9 0038 subql #1,%a1@(56) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4b5a2: d882 addl %d2,%d4 4b5a4: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b5a6: 7001 moveq #1,%d0 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4b5a8: 246a 0008 moveal %a2@(8),%a2 4b5ac: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4b5ae: 2183 3800 movel %d3,%a0@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b5b2: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4b5b6: 254b 000c movel %a3,%a2@(12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4b5ba: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b5be: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b5c2: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b5c6: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b5ca: 7001 moveq #1,%d0 return( true ); } 4b5cc: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4b5d0: 4e5e unlk %fp 4b5d2: 4e75 rts 4b5d4: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4b5d8: 4200 clrb %d0 } 4b5da: 4e5e unlk %fp 4b5dc: 4e75 rts uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4b5de: 4a05 tstb %d5 4b5e0: 6736 beqs 4b618 <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4b5e2: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4b5e6: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b5e8: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4b5ea: 246a 0008 moveal %a2@(8),%a2 4b5ee: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4b5f0: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4b5f4: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4b5f8: 214a 0008 movel %a2,%a0@(8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b5fc: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b600: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b604: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b608: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b60c: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4b60e: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4b612: 2748 0008 movel %a0,%a3@(8) 4b616: 60b4 bras 4b5cc <_Heap_Free+0xbc> next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4b618: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b61a: 7cfe moveq #-2,%d6 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4b61c: 8a82 orl %d2,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4b61e: 2669 0008 moveal %a1@(8),%a3 4b622: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b626: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4b62a: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4b62c: 2029 0038 movel %a1@(56),%d0 4b630: 5280 addql #1,%d0 new_block->next = next; 4b632: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4b636: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4b63a: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4b63e: 2748 000c movel %a0,%a3@(12) 4b642: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4b646: b0a9 003c cmpl %a1@(60),%d0 4b64a: 6300 ff72 blsw 4b5be <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b64e: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b652: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b656: 52a9 0050 addql #1,%a1@(80) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4b65a: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b65e: 7001 moveq #1,%d0 4b660: 6000 ff6a braw 4b5cc <_Heap_Free+0xbc> _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b664: 4205 clrb %d5 4b666: 6000 ff0e braw 4b576 <_Heap_Free+0x66> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4b66a: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b66c: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b66e: 7cfe moveq #-2,%d6 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b670: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4b672: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b674: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b676: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b67a: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b67e: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b682: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b686: 52a9 0050 addql #1,%a1@(80) 4b68a: 6000 ff40 braw 4b5cc <_Heap_Free+0xbc> ... =============================================================================== 00050530 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 50530: 4e56 fff4 linkw %fp,#-12 50534: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50538: 266e 0008 moveal %fp@(8),%a3 5053c: 246e 000c moveal %fp@(12),%a2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 50540: 206b 0008 moveal %a3@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 50544: 4292 clrl %a2@ info->largest = 0; 50546: 42aa 0004 clrl %a2@(4) info->total = 0; 5054a: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 5054e: b1cb cmpal %a3,%a0 50550: 672e beqs 50580 <_Heap_Get_free_information+0x50><== NEVER TAKEN 50552: 327c 0001 moveaw #1,%a1 50556: 4281 clrl %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; 50558: 70fe moveq #-2,%d0 the_block != tail; the_block = the_block->next) 5055a: 2409 movel %a1,%d2 5055c: 5282 addql #1,%d2 5055e: c0a8 0004 andl %a0@(4),%d0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 50562: d280 addl %d0,%d1 if ( info->largest < the_size ) 50564: b0aa 0004 cmpl %a2@(4),%d0 50568: 6304 blss 5056e <_Heap_Get_free_information+0x3e> info->largest = the_size; 5056a: 2540 0004 movel %d0,%a2@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 5056e: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 50572: b1cb cmpal %a3,%a0 50574: 6704 beqs 5057a <_Heap_Get_free_information+0x4a> 50576: 2242 moveal %d2,%a1 50578: 60de bras 50558 <_Heap_Get_free_information+0x28> 5057a: 2541 0008 movel %d1,%a2@(8) 5057e: 2489 movel %a1,%a2@ info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 50580: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 50584: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050588 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 50588: 4e56 fff4 linkw %fp,#-12 5058c: 206e 0008 moveal %fp@(8),%a0 50590: 48d7 040c moveml %d2-%d3/%a2,%sp@ 50594: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 50598: 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; 5059c: 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; 505a0: 4292 clrl %a2@ the_info->Free.total = 0; 505a2: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 505a6: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 505aa: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 505ae: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 505b2: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 505b6: b489 cmpl %a1,%d2 505b8: 6746 beqs 50600 <_Heap_Get_information+0x78> <== NEVER TAKEN 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; 505ba: 260a movel %a2,%d3 505bc: 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 ) { 505c2: 2229 0004 movel %a1@(4),%d1 505c6: 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) ) 505c8: 204a moveal %a2,%a0 505ca: 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); 505cc: 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; 505ce: 2229 0004 movel %a1@(4),%d1 505d2: 0801 0000 btst #0,%d1 505d6: 6702 beqs 505da <_Heap_Get_information+0x52> 505d8: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 505da: 5290 addql #1,%a0@ info->total += the_size; 505dc: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 505e0: b0a8 0004 cmpl %a0@(4),%d0 505e4: 6304 blss 505ea <_Heap_Get_information+0x62> info->largest = the_size; 505e6: 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 ) { 505ea: b3c2 cmpal %d2,%a1 505ec: 66d8 bnes 505c6 <_Heap_Get_information+0x3e> 505ee: 202a 0014 movel %a2@(20),%d0 505f2: 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; 505f4: 2540 0014 movel %d0,%a2@(20) } 505f8: 4cd7 040c moveml %sp@,%d2-%d3/%a2 505fc: 4e5e unlk %fp 505fe: 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 ) { 50600: 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; 50602: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 50606: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 5060a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00046c04 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 46c04: 4e56 ffe8 linkw %fp,#-24 46c08: 206e 0008 moveal %fp@(8),%a0 46c0c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 46c10: 226e 000c moveal %fp@(12),%a1 46c14: 242e 0010 movel %fp@(16),%d2 46c18: 222e 0014 movel %fp@(20),%d1 uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 46c1c: 6600 00ce bnew 46cec <_Heap_Initialize+0xe8> ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 46c20: 2009 movel %a1,%d0 46c22: 5080 addql #8,%d0 uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 46c24: 123c 0004 moveb #4,%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46c28: 2a00 movel %d0,%d5 46c2a: 7610 moveq #16,%d3 46c2c: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46c30: 4a84 tstl %d4 46c32: 6704 beqs 46c38 <_Heap_Initialize+0x34> <== ALWAYS TAKEN return value - remainder + alignment; 46c34: d081 addl %d1,%d0 46c36: 9084 subl %d4,%d0 uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 46c38: 2809 movel %a1,%d4 46c3a: d882 addl %d2,%d4 overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 46c3c: b889 cmpl %a1,%d4 46c3e: 6500 00bc bcsw 46cfc <_Heap_Initialize+0xf8> } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 46c42: 2a00 movel %d0,%d5 46c44: 2440 moveal %d0,%a2 46c46: 9a89 subl %a1,%d5 46c48: 518a subql #8,%a2 first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 46c4a: ba82 cmpl %d2,%d5 46c4c: 6400 00ae bccw 46cfc <_Heap_Initialize+0xf8> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 46c50: 9485 subl %d5,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 46c52: 2a02 movel %d2,%d5 46c54: 4c41 5000 remul %d1,%d0,%d5 46c58: 9480 subl %d0,%d2 first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 46c5a: b483 cmpl %d3,%d2 46c5c: 6500 009e bcsw 46cfc <_Heap_Initialize+0xf8> } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 46c60: 7a01 moveq #1,%d5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46c62: 47f2 2800 lea %a2@(00000000,%d2:l),%a3 alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 46c66: 2002 movel %d2,%d0 46c68: 5180 subql #8,%d0 } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 46c6a: 8a82 orl %d2,%d5 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 46c6c: 2481 movel %d1,%a2@ first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 46c6e: 2545 0004 movel %d5,%a2@(4) * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 46c72: 2a0a movel %a2,%d5 46c74: 9a8b subl %a3,%d5 46c76: 2745 0004 movel %d5,%a3@(4) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 46c7a: 2a39 0005 d168 movel 5d168 ,%d5 * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 46c80: 2682 movel %d2,%a3@ last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; 46c82: 2141 0010 movel %d1,%a0@(16) /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; 46c86: 7201 moveq #1,%d1 /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; first_block->next = _Heap_Free_list_tail( heap ); 46c88: 2548 0008 movel %a0,%a2@(8) first_block->prev = _Heap_Free_list_head( heap ); 46c8c: 2548 000c movel %a0,%a2@(12) last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; 46c90: 2143 0014 movel %d3,%a0@(20) heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; 46c94: 2144 001c movel %d4,%a0@(28) _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; 46c98: 2142 0034 movel %d2,%a0@(52) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 46c9c: 2145 0028 movel %d5,%a0@(40) 46ca0: 5285 addql #1,%d5 heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; 46ca2: 2142 002c movel %d2,%a0@(44) stats->free_size = first_block_size; 46ca6: 2142 0030 movel %d2,%a0@(48) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; 46caa: 2149 0018 movel %a1,%a0@(24) /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; 46cae: 2141 0038 movel %d1,%a0@(56) stats->max_free_blocks = 1; 46cb2: 2141 003c movel %d1,%a0@(60) stats->used_blocks = 0; 46cb6: 42a8 0040 clrl %a0@(64) stats->max_search = 0; 46cba: 42a8 0044 clrl %a0@(68) stats->allocs = 0; 46cbe: 42a8 0048 clrl %a0@(72) stats->searches = 0; 46cc2: 42a8 004c clrl %a0@(76) stats->frees = 0; 46cc6: 42a8 0050 clrl %a0@(80) stats->resizes = 0; 46cca: 42a8 0054 clrl %a0@(84) heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; 46cce: 214b 0024 movel %a3,%a0@(36) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 46cd2: 23c5 0005 d168 movel %d5,5d168 heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; 46cd8: 214a 000c movel %a2,%a0@(12) /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; 46cdc: 214a 0020 movel %a2,%a0@(32) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 46ce0: 214a 0008 movel %a2,%a0@(8) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 46ce4: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46ce8: 4e5e unlk %fp 46cea: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46cec: 7003 moveq #3,%d0 46cee: c081 andl %d1,%d0 if ( remainder != 0 ) { 46cf0: 6704 beqs 46cf6 <_Heap_Initialize+0xf2> return value - remainder + alignment; 46cf2: 5881 addql #4,%d1 46cf4: 9280 subl %d0,%d1 if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 46cf6: 7003 moveq #3,%d0 46cf8: b081 cmpl %d1,%d0 46cfa: 650a bcss 46d06 <_Heap_Initialize+0x102> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 46cfc: 4280 clrl %d0 } 46cfe: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46d02: 4e5e unlk %fp 46d04: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d06: 7610 moveq #16,%d3 46d08: 4c41 3000 remul %d1,%d0,%d3 if ( remainder != 0 ) { 46d0c: 4a80 tstl %d0 46d0e: 671e beqs 46d2e <_Heap_Initialize+0x12a> return value - remainder + alignment; 46d10: 2601 movel %d1,%d3 46d12: 0683 0000 0010 addil #16,%d3 46d18: 9680 subl %d0,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 46d1a: 2009 movel %a1,%d0 46d1c: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d1e: 2a00 movel %d0,%d5 46d20: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46d24: 4a84 tstl %d4 46d26: 6700 ff10 beqw 46c38 <_Heap_Initialize+0x34> 46d2a: 6000 ff08 braw 46c34 <_Heap_Initialize+0x30> 46d2e: 2009 movel %a1,%d0 46d30: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d32: 2a00 movel %d0,%d5 if ( remainder != 0 ) { 46d34: 7610 moveq #16,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d36: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46d3a: 4a84 tstl %d4 46d3c: 6700 fefa beqw 46c38 <_Heap_Initialize+0x34> 46d40: 6000 fef2 braw 46c34 <_Heap_Initialize+0x30> =============================================================================== 0005a7c8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5a7c8: 4e56 0000 linkw %fp,#0 5a7cc: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 5a7d0: 2040 moveal %d0,%a0 5a7d2: 5188 subql #8,%a0 5a7d4: 226e 0008 moveal %fp@(8),%a1 5a7d8: 2f02 movel %d2,%sp@- 5a7da: 2400 movel %d0,%d2 5a7dc: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5a7e2: 91c1 subal %d1,%a0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 5a7e4: 2229 0020 movel %a1@(32),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5a7e8: b288 cmpl %a0,%d1 5a7ea: 6238 bhis 5a824 <_Heap_Size_of_alloc_area+0x5c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 5a7ec: 2269 0024 moveal %a1@(36),%a1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5a7f0: b3c8 cmpal %a0,%a1 5a7f2: 6530 bcss 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5a7f4: 74fe moveq #-2,%d2 5a7f6: c4a8 0004 andl %a0@(4),%d2 5a7fa: d1c2 addal %d2,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5a7fc: b1c1 cmpal %d1,%a0 5a7fe: 6524 bcss 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5a800: b1c9 cmpal %a1,%a0 5a802: 6220 bhis 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5a804: 7201 moveq #1,%d1 5a806: c2a8 0004 andl %a0@(4),%d1 5a80a: 4a01 tstb %d1 5a80c: 6716 beqs 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5a80e: 7204 moveq #4,%d1 5a810: 9280 subl %d0,%d1 5a812: 2001 movel %d1,%d0 5a814: d088 addl %a0,%d0 5a816: 226e 0010 moveal %fp@(16),%a1 return true; } 5a81a: 241f movel %sp@+,%d2 5a81c: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5a81e: 2280 movel %d0,%a1@ 5a820: 7001 moveq #1,%d0 return true; } 5a822: 4e75 rts 5a824: 241f movel %sp@+,%d2 5a826: 4e5e unlk %fp return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 5a828: 4200 clrb %d0 <== NOT EXECUTED } =============================================================================== 00047960 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 47960: 4e56 ffc8 linkw %fp,#-56 47964: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47968: 246e 0008 moveal %fp@(8),%a2 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 4796c: 4bfa 0496 lea %pc@(47e04 <_Heap_Walk_print>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 47970: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 47974: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 47978: 282a 0014 movel %a2@(20),%d4 Heap_Block *const last_block = heap->last_block; 4797c: 2a2a 0024 movel %a2@(36),%d5 Heap_Block *block = heap->first_block; 47980: 266a 0020 moveal %a2@(32),%a3 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 47984: 4a2e 0013 tstb %fp@(19) 47988: 6604 bnes 4798e <_Heap_Walk+0x2e> 4798a: 4bfa ffcc lea %pc@(47958 <_Heap_Walk_print_nothing>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 4798e: 7003 moveq #3,%d0 47990: b0b9 0006 0042 cmpl 60042 <_System_state_Current>,%d0 47996: 670c beqs 479a4 <_Heap_Walk+0x44> block = next_block; } return true; } 47998: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 4799e: 7001 moveq #1,%d0 block = next_block; } return true; } 479a0: 4e5e unlk %fp 479a2: 4e75 rts Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 479a4: 2f2a 000c movel %a2@(12),%sp@- 479a8: 2f2a 0008 movel %a2@(8),%sp@- 479ac: 2f05 movel %d5,%sp@- 479ae: 2f0b movel %a3,%sp@- 479b0: 2f2a 001c movel %a2@(28),%sp@- 479b4: 2f2a 0018 movel %a2@(24),%sp@- 479b8: 2f04 movel %d4,%sp@- 479ba: 2f03 movel %d3,%sp@- 479bc: 4879 0005 c404 pea 5c404 <_Status_Object_name_errors_to_status+0x14> 479c2: 42a7 clrl %sp@- 479c4: 2f02 movel %d2,%sp@- 479c6: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 479c8: 4fef 002c lea %sp@(44),%sp 479cc: 4a83 tstl %d3 479ce: 6700 0154 beqw 47b24 <_Heap_Walk+0x1c4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 479d2: 7003 moveq #3,%d0 479d4: c083 andl %d3,%d0 479d6: 6600 016a bnew 47b42 <_Heap_Walk+0x1e2> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 479da: 2204 movel %d4,%d1 479dc: 4c43 1000 remul %d3,%d0,%d1 479e0: 4a80 tstl %d0 479e2: 6600 0176 bnew 47b5a <_Heap_Walk+0x1fa> ); return false; } if ( 479e6: 200b movel %a3,%d0 479e8: 5080 addql #8,%d0 479ea: 4c43 0001 remul %d3,%d1,%d0 479ee: 4a81 tstl %d1 479f0: 6600 0180 bnew 47b72 <_Heap_Walk+0x212> 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; 479f4: 2c2b 0004 movel %a3@(4),%d6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 479f8: 7201 moveq #1,%d1 479fa: c286 andl %d6,%d1 479fc: 2d46 fff0 movel %d6,%fp@(-16) 47a00: 4a01 tstb %d1 47a02: 6700 0186 beqw 47b8a <_Heap_Walk+0x22a> ); return false; } if ( first_block->prev_size != page_size ) { 47a06: 2053 moveal %a3@,%a0 47a08: b1c3 cmpal %d3,%a0 47a0a: 6600 00de bnew 47aea <_Heap_Walk+0x18a> ); return false; } if ( _Heap_Is_free( last_block ) ) { 47a0e: 2045 moveal %d5,%a0 47a10: 7cfe moveq #-2,%d6 47a12: 7001 moveq #1,%d0 47a14: cca8 0004 andl %a0@(4),%d6 47a18: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 47a1c: 4a00 tstb %d0 47a1e: 6700 0180 beqw 47ba0 <_Heap_Walk+0x240> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 47a22: 2c2a 0010 movel %a2@(16),%d6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47a26: 206a 0008 moveal %a2@(8),%a0 47a2a: 2d46 fffc movel %d6,%fp@(-4) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 47a2e: b1ca cmpal %a2,%a0 47a30: 6700 0192 beqw 47bc4 <_Heap_Walk+0x264> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 47a34: 2e2a 0020 movel %a2@(32),%d7 47a38: 2d47 fff4 movel %d7,%fp@(-12) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 47a3c: b1c7 cmpal %d7,%a0 47a3e: 6500 00c4 bcsw 47b04 <_Heap_Walk+0x1a4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 47a42: 286a 0024 moveal %a2@(36),%a4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 47a46: b1cc cmpal %a4,%a0 47a48: 6200 00ba bhiw 47b04 <_Heap_Walk+0x1a4> ); return false; } if ( 47a4c: 2248 moveal %a0,%a1 47a4e: 5089 addql #8,%a1 47a50: 2009 movel %a1,%d0 47a52: 4c46 0007 remul %d6,%d7,%d0 47a56: 2d49 fff8 movel %a1,%fp@(-8) 47a5a: 4a87 tstl %d7 47a5c: 6600 0372 bnew 47dd0 <_Heap_Walk+0x470> ); return false; } if ( _Heap_Is_used( free_block ) ) { 47a60: 7efe moveq #-2,%d7 47a62: 7001 moveq #1,%d0 47a64: cea8 0004 andl %a0@(4),%d7 47a68: c0b0 7804 andl %a0@(00000004,%d7:l),%d0 47a6c: 6600 037c bnew 47dea <_Heap_Walk+0x48a> ); return false; } if ( free_block->prev != prev_block ) { 47a70: 2e28 000c movel %a0@(12),%d7 47a74: be8a cmpl %a2,%d7 47a76: 6650 bnes 47ac8 <_Heap_Walk+0x168> <== NEVER TAKEN 47a78: 202e fff0 movel %fp@(-16),%d0 47a7c: 2241 moveal %d1,%a1 47a7e: 2c2e fff4 movel %fp@(-12),%d6 47a82: 2d40 fff8 movel %d0,%fp@(-8) 47a86: 2d43 fff4 movel %d3,%fp@(-12) (*printer)( 47a8a: 2008 movel %a0,%d0 return false; } prev_block = free_block; free_block = free_block->next; 47a8c: 2068 0008 moveal %a0@(8),%a0 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 47a90: b1ca cmpal %a2,%a0 47a92: 6700 0122 beqw 47bb6 <_Heap_Walk+0x256> 47a96: bc88 cmpl %a0,%d6 47a98: 626a bhis 47b04 <_Heap_Walk+0x1a4> ); return false; } if ( 47a9a: 2e08 movel %a0,%d7 47a9c: 5087 addql #8,%d7 47a9e: b1cc cmpal %a4,%a0 47aa0: 6262 bhis 47b04 <_Heap_Walk+0x1a4> <== NEVER TAKEN 47aa2: 262e fffc movel %fp@(-4),%d3 47aa6: 4c43 7001 remul %d3,%d1,%d7 47aaa: 4a81 tstl %d1 47aac: 6600 0322 bnew 47dd0 <_Heap_Walk+0x470> ); return false; } if ( _Heap_Is_used( free_block ) ) { 47ab0: 72fe moveq #-2,%d1 47ab2: 7e01 moveq #1,%d7 47ab4: c2a8 0004 andl %a0@(4),%d1 47ab8: ceb0 1804 andl %a0@(00000004,%d1:l),%d7 47abc: 6600 032c bnew 47dea <_Heap_Walk+0x48a> ); return false; } if ( free_block->prev != prev_block ) { 47ac0: 2e28 000c movel %a0@(12),%d7 47ac4: b087 cmpl %d7,%d0 47ac6: 67c2 beqs 47a8a <_Heap_Walk+0x12a> (*printer)( 47ac8: 2f07 movel %d7,%sp@- 47aca: 2f08 movel %a0,%sp@- 47acc: 4879 0005 c5f5 pea 5c5f5 <_Status_Object_name_errors_to_status+0x205> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47ad2: 4878 0001 pea 1 47ad6: 2f02 movel %d2,%sp@- 47ad8: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47ada: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47ade: 4200 clrb %d0 block = next_block; } return true; } 47ae0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47ae6: 4e5e unlk %fp 47ae8: 4e75 rts return false; } if ( first_block->prev_size != page_size ) { (*printer)( 47aea: 2f03 movel %d3,%sp@- 47aec: 2f08 movel %a0,%sp@- 47aee: 4879 0005 c549 pea 5c549 <_Status_Object_name_errors_to_status+0x159> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47af4: 4878 0001 pea 1 47af8: 2f02 movel %d2,%sp@- 47afa: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47afc: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b00: 4200 clrb %d0 47b02: 60dc bras 47ae0 <_Heap_Walk+0x180> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 47b04: 2f08 movel %a0,%sp@- 47b06: 4879 0005 c589 pea 5c589 <_Status_Object_name_errors_to_status+0x199> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b0c: 4878 0001 pea 1 47b10: 2f02 movel %d2,%sp@- 47b12: 4e95 jsr %a5@ 47b14: 4fef 0010 lea %sp@(16),%sp 47b18: 4200 clrb %d0 block = next_block; } return true; } 47b1a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b20: 4e5e unlk %fp 47b22: 4e75 rts first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 47b24: 4879 0005 c495 pea 5c495 <_Status_Object_name_errors_to_status+0xa5> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47b2a: 4878 0001 pea 1 47b2e: 2f02 movel %d2,%sp@- 47b30: 4e95 jsr %a5@ 47b32: 4fef 000c lea %sp@(12),%sp 47b36: 4200 clrb %d0 block = next_block; } return true; } 47b38: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b3e: 4e5e unlk %fp 47b40: 4e75 rts return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 47b42: 2f03 movel %d3,%sp@- 47b44: 4879 0005 c4a8 pea 5c4a8 <_Status_Object_name_errors_to_status+0xb8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b4a: 4878 0001 pea 1 47b4e: 2f02 movel %d2,%sp@- 47b50: 4e95 jsr %a5@ 47b52: 4fef 0010 lea %sp@(16),%sp 47b56: 4200 clrb %d0 47b58: 60c0 bras 47b1a <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 47b5a: 2f04 movel %d4,%sp@- 47b5c: 4879 0005 c4c6 pea 5c4c6 <_Status_Object_name_errors_to_status+0xd6> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b62: 4878 0001 pea 1 47b66: 2f02 movel %d2,%sp@- 47b68: 4e95 jsr %a5@ 47b6a: 4fef 0010 lea %sp@(16),%sp 47b6e: 4200 clrb %d0 47b70: 60a8 bras 47b1a <_Heap_Walk+0x1ba> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47b72: 2f0b movel %a3,%sp@- 47b74: 4879 0005 c4ea pea 5c4ea <_Status_Object_name_errors_to_status+0xfa> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b7a: 4878 0001 pea 1 47b7e: 2f02 movel %d2,%sp@- 47b80: 4e95 jsr %a5@ 47b82: 4fef 0010 lea %sp@(16),%sp 47b86: 4200 clrb %d0 47b88: 6090 bras 47b1a <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47b8a: 4879 0005 c51b pea 5c51b <_Status_Object_name_errors_to_status+0x12b> 47b90: 4878 0001 pea 1 47b94: 2f02 movel %d2,%sp@- 47b96: 4e95 jsr %a5@ 47b98: 4fef 000c lea %sp@(12),%sp 47b9c: 4200 clrb %d0 47b9e: 6098 bras 47b38 <_Heap_Walk+0x1d8> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 47ba0: 4879 0005 c574 pea 5c574 <_Status_Object_name_errors_to_status+0x184> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47ba6: 4878 0001 pea 1 47baa: 2f02 movel %d2,%sp@- 47bac: 4e95 jsr %a5@ 47bae: 4fef 000c lea %sp@(12),%sp 47bb2: 4200 clrb %d0 47bb4: 6082 bras 47b38 <_Heap_Walk+0x1d8> 47bb6: 262e fff8 movel %fp@(-8),%d3 47bba: 2209 movel %a1,%d1 47bbc: 2d43 fff0 movel %d3,%fp@(-16) 47bc0: 262e fff4 movel %fp@(-12),%d3 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47bc4: b7c5 cmpal %d5,%a3 47bc6: 6700 fdd0 beqw 47998 <_Heap_Walk+0x38> 47bca: 2c2e fff0 movel %fp@(-16),%d6 - 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; 47bce: 7efe moveq #-2,%d7 47bd0: cc87 andl %d7,%d6 47bd2: 2d43 fff8 movel %d3,%fp@(-8) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47bd6: 49f3 6800 lea %a3@(00000000,%d6:l),%a4 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 47bda: 4a01 tstb %d1 47bdc: 6700 0126 beqw 47d04 <_Heap_Walk+0x3a4> (*printer)( 47be0: 2f06 movel %d6,%sp@- 47be2: 2f0b movel %a3,%sp@- 47be4: 4879 0005 c627 pea 5c627 <_Status_Object_name_errors_to_status+0x237> 47bea: 42a7 clrl %sp@- 47bec: 2f02 movel %d2,%sp@- 47bee: 4e95 jsr %a5@ 47bf0: 4fef 0014 lea %sp@(20),%sp RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 47bf4: b9ea 0020 cmpal %a2@(32),%a4 47bf8: 6500 00d0 bcsw 47cca <_Heap_Walk+0x36a> 47bfc: b9ea 0024 cmpal %a2@(36),%a4 47c00: 6200 00c8 bhiw 47cca <_Heap_Walk+0x36a> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 47c04: 262e fff8 movel %fp@(-8),%d3 47c08: 2206 movel %d6,%d1 47c0a: 4c43 1000 remul %d3,%d0,%d1 47c0e: 4a80 tstl %d0 47c10: 6600 0162 bnew 47d74 <_Heap_Walk+0x414> ); return false; } if ( block_size < min_block_size ) { 47c14: bc84 cmpl %d4,%d6 47c16: 6500 0178 bcsw 47d90 <_Heap_Walk+0x430> ); return false; } if ( next_block_begin <= block_begin ) { 47c1a: b9cb cmpal %a3,%a4 47c1c: 6300 0196 blsw 47db4 <_Heap_Walk+0x454> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 47c20: 7001 moveq #1,%d0 47c22: c0ac 0004 andl %a4@(4),%d0 47c26: 4a00 tstb %d0 47c28: 6600 00bc bnew 47ce6 <_Heap_Walk+0x386> 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; 47c2c: 262b 0004 movel %a3@(4),%d3 - 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; 47c30: 7cfe moveq #-2,%d6 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 47c32: 43f9 0005 c71d lea 5c71d <_Status_Object_name_errors_to_status+0x32d>,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47c38: 2e2a 0008 movel %a2@(8),%d7 - 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; 47c3c: cc83 andl %d3,%d6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47c3e: 2d47 fffc movel %d7,%fp@(-4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47c42: 2e0b movel %a3,%d7 47c44: de86 addl %d6,%d7 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 47c46: 222b 0008 movel %a3@(8),%d1 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 47c4a: b2aa 000c cmpl %a2@(12),%d1 47c4e: 6710 beqs 47c60 <_Heap_Walk+0x300> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 47c50: 43f9 0005 c727 lea 5c727 <_Status_Object_name_errors_to_status+0x337>,%a1 47c56: b5c1 cmpal %d1,%a2 47c58: 6706 beqs 47c60 <_Heap_Walk+0x300> 47c5a: 43f9 0005 c362 lea 5c362 ,%a1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 47c60: 202b 000c movel %a3@(12),%d0 47c64: 41f9 0005 c731 lea 5c731 <_Status_Object_name_errors_to_status+0x341>,%a0 47c6a: b0ae fffc cmpl %fp@(-4),%d0 47c6e: 6710 beqs 47c80 <_Heap_Walk+0x320> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 47c70: 41f9 0005 c73c lea 5c73c <_Status_Object_name_errors_to_status+0x34c>,%a0 47c76: b5c0 cmpal %d0,%a2 47c78: 6706 beqs 47c80 <_Heap_Walk+0x320> 47c7a: 41f9 0005 c362 lea 5c362 ,%a0 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 47c80: 2f09 movel %a1,%sp@- 47c82: 2f01 movel %d1,%sp@- 47c84: 2f08 movel %a0,%sp@- 47c86: 2f00 movel %d0,%sp@- 47c88: 2f0b movel %a3,%sp@- 47c8a: 4879 0005 c746 pea 5c746 <_Status_Object_name_errors_to_status+0x356> 47c90: 42a7 clrl %sp@- 47c92: 2f02 movel %d2,%sp@- 47c94: 4e95 jsr %a5@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 47c96: 4fef 0020 lea %sp@(32),%sp 47c9a: 2047 moveal %d7,%a0 47c9c: 2010 movel %a0@,%d0 47c9e: b086 cmpl %d6,%d0 47ca0: 6700 0082 beqw 47d24 <_Heap_Walk+0x3c4> (*printer)( 47ca4: 2f07 movel %d7,%sp@- 47ca6: 2f00 movel %d0,%sp@- 47ca8: 2f06 movel %d6,%sp@- 47caa: 2f0b movel %a3,%sp@- 47cac: 4879 0005 c772 pea 5c772 <_Status_Object_name_errors_to_status+0x382> 47cb2: 4878 0001 pea 1 47cb6: 2f02 movel %d2,%sp@- 47cb8: 4e95 jsr %a5@ 47cba: 4fef 001c lea %sp@(28),%sp block = next_block; } return true; } 47cbe: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 47cc4: 4200 clrb %d0 block = next_block; } return true; } 47cc6: 4e5e unlk %fp 47cc8: 4e75 rts block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 47cca: 2f0c movel %a4,%sp@- 47ccc: 2f0b movel %a3,%sp@- 47cce: 4879 0005 c663 pea 5c663 <_Status_Object_name_errors_to_status+0x273> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47cd4: 4878 0001 pea 1 47cd8: 2f02 movel %d2,%sp@- 47cda: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47cdc: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47ce0: 4200 clrb %d0 47ce2: 6000 fdfc braw 47ae0 <_Heap_Walk+0x180> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47ce6: b9c5 cmpal %d5,%a4 47ce8: 6700 fcae beqw 47998 <_Heap_Walk+0x38> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 47cec: 2c2c 0004 movel %a4@(4),%d6 47cf0: 7201 moveq #1,%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; 47cf2: 7efe moveq #-2,%d7 47cf4: 264c moveal %a4,%a3 47cf6: c286 andl %d6,%d1 47cf8: cc87 andl %d7,%d6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47cfa: 49f3 6800 lea %a3@(00000000,%d6:l),%a4 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 47cfe: 4a01 tstb %d1 47d00: 6600 fede bnew 47be0 <_Heap_Walk+0x280> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 47d04: 2f13 movel %a3@,%sp@- 47d06: 2f06 movel %d6,%sp@- 47d08: 2f0b movel %a3,%sp@- 47d0a: 4879 0005 c63e pea 5c63e <_Status_Object_name_errors_to_status+0x24e> 47d10: 42a7 clrl %sp@- 47d12: 2f02 movel %d2,%sp@- 47d14: 4e95 jsr %a5@ 47d16: 4fef 0018 lea %sp@(24),%sp RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 47d1a: b9ea 0020 cmpal %a2@(32),%a4 47d1e: 65aa bcss 47cca <_Heap_Walk+0x36a> <== NEVER TAKEN 47d20: 6000 feda braw 47bfc <_Heap_Walk+0x29c> ); return false; } if ( !prev_used ) { 47d24: 7001 moveq #1,%d0 47d26: c680 andl %d0,%d3 47d28: 4a03 tstb %d3 47d2a: 672e beqs 47d5a <_Heap_Walk+0x3fa> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47d2c: 206a 0008 moveal %a2@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 47d30: b5c8 cmpal %a0,%a2 47d32: 670c beqs 47d40 <_Heap_Walk+0x3e0> <== NEVER TAKEN if ( free_block == block ) { 47d34: b7c8 cmpal %a0,%a3 47d36: 67ae beqs 47ce6 <_Heap_Walk+0x386> return true; } free_block = free_block->next; 47d38: 2068 0008 moveal %a0@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 47d3c: b5c8 cmpal %a0,%a2 47d3e: 66f4 bnes 47d34 <_Heap_Walk+0x3d4> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47d40: 2f0b movel %a3,%sp@- 47d42: 4879 0005 c7da pea 5c7da <_Status_Object_name_errors_to_status+0x3ea> 47d48: 4878 0001 pea 1 47d4c: 2f02 movel %d2,%sp@- 47d4e: 4e95 jsr %a5@ 47d50: 4fef 0010 lea %sp@(16),%sp 47d54: 4200 clrb %d0 47d56: 6000 fdc2 braw 47b1a <_Heap_Walk+0x1ba> return false; } if ( !prev_used ) { (*printer)( 47d5a: 2f0b movel %a3,%sp@- 47d5c: 4879 0005 c7ab pea 5c7ab <_Status_Object_name_errors_to_status+0x3bb> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47d62: 4878 0001 pea 1 47d66: 2f02 movel %d2,%sp@- 47d68: 4e95 jsr %a5@ 47d6a: 4fef 0010 lea %sp@(16),%sp 47d6e: 4200 clrb %d0 47d70: 6000 fda8 braw 47b1a <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 47d74: 2f06 movel %d6,%sp@- 47d76: 2f0b movel %a3,%sp@- 47d78: 4879 0005 c690 pea 5c690 <_Status_Object_name_errors_to_status+0x2a0> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d7e: 4878 0001 pea 1 47d82: 2f02 movel %d2,%sp@- 47d84: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47d86: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d8a: 4200 clrb %d0 47d8c: 6000 fd52 braw 47ae0 <_Heap_Walk+0x180> return false; } if ( block_size < min_block_size ) { (*printer)( 47d90: 2f04 movel %d4,%sp@- 47d92: 2f06 movel %d6,%sp@- 47d94: 2f0b movel %a3,%sp@- 47d96: 4879 0005 c6be pea 5c6be <_Status_Object_name_errors_to_status+0x2ce> 47d9c: 4878 0001 pea 1 47da0: 2f02 movel %d2,%sp@- 47da2: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 47da4: 4fef 0018 lea %sp@(24),%sp block = next_block; } return true; } 47da8: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 return false; } if ( block_size < min_block_size ) { (*printer)( 47dae: 4200 clrb %d0 block = next_block; } return true; } 47db0: 4e5e unlk %fp 47db2: 4e75 rts return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47db4: 2f0c movel %a4,%sp@- 47db6: 2f0b movel %a3,%sp@- 47db8: 4879 0005 c6e9 pea 5c6e9 <_Status_Object_name_errors_to_status+0x2f9> 47dbe: 4878 0001 pea 1 47dc2: 2f02 movel %d2,%sp@- 47dc4: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47dc6: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47dca: 4200 clrb %d0 47dcc: 6000 fd12 braw 47ae0 <_Heap_Walk+0x180> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47dd0: 2f08 movel %a0,%sp@- 47dd2: 4879 0005 c5a9 pea 5c5a9 <_Status_Object_name_errors_to_status+0x1b9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47dd8: 4878 0001 pea 1 47ddc: 2f02 movel %d2,%sp@- 47dde: 4e95 jsr %a5@ 47de0: 4fef 0010 lea %sp@(16),%sp 47de4: 4200 clrb %d0 47de6: 6000 fd32 braw 47b1a <_Heap_Walk+0x1ba> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 47dea: 2f08 movel %a0,%sp@- 47dec: 4879 0005 c5d9 pea 5c5d9 <_Status_Object_name_errors_to_status+0x1e9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47df2: 4878 0001 pea 1 47df6: 2f02 movel %d2,%sp@- 47df8: 4e95 jsr %a5@ 47dfa: 4fef 0010 lea %sp@(16),%sp 47dfe: 4200 clrb %d0 47e00: 6000 fd18 braw 47b1a <_Heap_Walk+0x1ba> =============================================================================== 00046464 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 46464: 4e56 0000 linkw %fp,#0 46468: 2f0a movel %a2,%sp@- 4646a: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 4646c: 4ab9 0005 dbe2 tstl 5dbe2 <_IO_Number_of_drivers> 46472: 671e beqs 46492 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 46474: 4282 clrl %d2 46476: 45f9 0004 aff8 lea 4aff8 ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 4647c: 42a7 clrl %sp@- 4647e: 42a7 clrl %sp@- 46480: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46482: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 46484: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46486: 4fef 000c lea %sp@(12),%sp 4648a: b4b9 0005 dbe2 cmpl 5dbe2 <_IO_Number_of_drivers>,%d2 46490: 65ea bcss 4647c <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 46492: 242e fff8 movel %fp@(-8),%d2 46496: 246e fffc moveal %fp@(-4),%a2 4649a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004649e <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 4649e: 4e56 fff0 linkw %fp,#-16 464a2: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 464a6: 2639 0005 c2c6 movel 5c2c6 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 464ac: 2439 0005 c2c2 movel 5c2c2 ,%d2 number_of_drivers = Configuration.maximum_drivers; 464b2: 2839 0005 c2be movel 5c2be ,%d4 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 464b8: b882 cmpl %d2,%d4 464ba: 6216 bhis 464d2 <_IO_Manager_initialization+0x34> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 464bc: 23c3 0005 dbe6 movel %d3,5dbe6 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 464c2: 23c2 0005 dbe2 movel %d2,5dbe2 <_IO_Number_of_drivers> ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 464c8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464ce: 4e5e unlk %fp 464d0: 4e75 rts /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 464d2: 2004 movel %d4,%d0 464d4: 2a04 movel %d4,%d5 464d6: e788 lsll #3,%d0 464d8: eb8d lsll #5,%d5 464da: 9a80 subl %d0,%d5 464dc: 2f05 movel %d5,%sp@- 464de: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 464e4: 2f05 movel %d5,%sp@- 464e6: 42a7 clrl %sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 464e8: 23c4 0005 dbe2 movel %d4,5dbe2 <_IO_Number_of_drivers> memset( 464ee: 2f00 movel %d0,%sp@- /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 464f0: 23c0 0005 dbe6 movel %d0,5dbe6 <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 464f6: 4eb9 0004 e0f8 jsr 4e0f8 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 464fc: 4fef 0010 lea %sp@(16),%sp 46500: 4a82 tstl %d2 46502: 67c4 beqs 464c8 <_IO_Manager_initialization+0x2a><== NEVER TAKEN 46504: 2839 0005 dbe6 movel 5dbe6 <_IO_Driver_address_table>,%d4 4650a: 4280 clrl %d0 4650c: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 4650e: 2243 moveal %d3,%a1 46510: 2044 moveal %d4,%a0 46512: d3c0 addal %d0,%a1 46514: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46516: 5281 addql #1,%d1 46518: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4651e: 20d9 movel %a1@+,%a0@+ 46520: 20d9 movel %a1@+,%a0@+ 46522: 20d9 movel %a1@+,%a0@+ 46524: 20d9 movel %a1@+,%a0@+ 46526: 20d9 movel %a1@+,%a0@+ 46528: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4652a: b282 cmpl %d2,%d1 4652c: 649a bccs 464c8 <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 4652e: 2243 moveal %d3,%a1 46530: 2044 moveal %d4,%a0 46532: d3c0 addal %d0,%a1 46534: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46536: 5281 addql #1,%d1 46538: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4653e: 20d9 movel %a1@+,%a0@+ 46540: 20d9 movel %a1@+,%a0@+ 46542: 20d9 movel %a1@+,%a0@+ 46544: 20d9 movel %a1@+,%a0@+ 46546: 20d9 movel %a1@+,%a0@+ 46548: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4654a: b282 cmpl %d2,%d1 4654c: 65c0 bcss 4650e <_IO_Manager_initialization+0x70><== NEVER TAKEN 4654e: 6000 ff78 braw 464c8 <_IO_Manager_initialization+0x2a> ... =============================================================================== 00046f70 <_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 ); 46f70: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f72: 4e56 0000 linkw %fp,#0 46f76: 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 ); 46f7a: 1001 moveb %d1,%d0 46f7c: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f7e: 2f03 movel %d3,%sp@- 46f80: 202e 0008 movel %fp@(8),%d0 46f84: 2f02 movel %d2,%sp@- 46f86: 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 ); 46f8a: 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; 46f8c: 13c1 0005 da72 moveb %d1,5da72 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f92: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46f94: 23c0 0005 da6e movel %d0,5da6e <_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 ); 46f9a: 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; 46f9c: 23c2 0005 da74 movel %d2,5da74 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46fa2: 4eb9 0004 8cb2 jsr 48cb2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46fa8: 307c 0700 moveaw #1792,%a0 46fac: 2608 movel %a0,%d3 46fae: 40c0 movew %sr,%d0 46fb0: 8083 orl %d3,%d0 46fb2: 46c0 movew %d0,%sr 46fb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46fb6: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46fbc: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46fbe: 7005 moveq #5,%d0 46fc0: 4fef 000c lea %sp@(12),%sp 46fc4: 23c0 0005 db4a movel %d0,5db4a <_System_state_Current> 46fca: 60fe bras 46fca <_Internal_error_Occurred+0x5a> =============================================================================== 00047034 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47034: 4e56 fff0 linkw %fp,#-16 47038: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4703c: 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 ) 47040: 4aaa 0014 tstl %a2@(20) 47044: 660c bnes 47052 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN 47046: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 47048: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4704e: 4e5e unlk %fp 47050: 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 ); 47052: 240a movel %a2,%d2 47054: 0682 0000 001c addil #28,%d2 4705a: 47f9 0004 b07c lea 4b07c <_Chain_Get>,%a3 47060: 2f02 movel %d2,%sp@- 47062: 4e93 jsr %a3@ if ( information->auto_extend ) { 47064: 588f addql #4,%sp 47066: 4a2a 0010 tstb %a2@(16) 4706a: 67dc beqs 47048 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 4706c: 4a80 tstl %d0 4706e: 6738 beqs 470a8 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47070: 2040 moveal %d0,%a0 47072: 4281 clrl %d1 47074: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47076: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47078: 362a 0008 movew %a2@(8),%d3 4707c: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 47080: 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 ]--; 47084: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47088: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 4708a: 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 ]--; 4708c: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 47090: 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 ]--; 47094: 206a 002a moveal %a2@(42),%a0 47098: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 4709a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470a0: 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 ]--; 470a2: d1c1 addal %d1,%a0 470a4: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 470a6: 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 ); 470a8: 2f0a movel %a2,%sp@- 470aa: 4eb9 0004 70f0 jsr 470f0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470b0: 2f02 movel %d2,%sp@- 470b2: 4e93 jsr %a3@ } if ( the_object ) { 470b4: 508f addql #8,%sp 470b6: 4a80 tstl %d0 470b8: 66b6 bnes 47070 <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 470ba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470c0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000470c4 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 470c4: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 470c6: 4e56 0000 linkw %fp,#0 470ca: 226e 000c moveal %fp@(12),%a1 470ce: 206e 0008 moveal %fp@(8),%a0 470d2: 2f0a movel %a2,%sp@- 470d4: 2468 0018 moveal %a0@(24),%a2 470d8: 3029 000a movew %a1@(10),%d0 470dc: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 470e0: 2d49 000c movel %a1,%fp@(12) } 470e4: 245f moveal %sp@+,%a2 470e6: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 470e8: 4ef9 0004 7648 jmp 47648 <_Objects_Namespace_remove> ... =============================================================================== 000470f0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 470f0: 4e56 ffcc linkw %fp,#-52 470f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 470f8: 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 ); 470fc: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 470fe: 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 ); 47102: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47106: 4a88 tstl %a0 47108: 6700 022c beqw 47336 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 4710c: 322a 000e movew %a2@(14),%d1 47110: 302a 0012 movew %a2@(18),%d0 47114: 3801 movew %d1,%d4 47116: 0284 0000 ffff andil #65535,%d4 4711c: 88c0 divuw %d0,%d4 4711e: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47124: 6700 0224 beqw 4734a <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47128: 4a90 tstl %a0@ 4712a: 6700 021e beqw 4734a <_Objects_Extend_information+0x25a> 4712e: 5888 addql #4,%a0 47130: 2605 movel %d5,%d3 47132: 4282 clrl %d2 47134: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 4713a: 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++ ) { 4713c: 5282 addql #1,%d2 4713e: b484 cmpl %d4,%d2 47140: 6404 bccs 47146 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 47142: 4a98 tstl %a0@+ 47144: 66f4 bnes 4713a <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47146: 0281 0000 ffff andil #65535,%d1 4714c: 2641 moveal %d1,%a3 4714e: 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 ) { 47150: b7fc 0000 ffff cmpal #65535,%a3 47156: 6200 0186 bhiw 472de <_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; 4715a: 41ea 0014 lea %a2@(20),%a0 4715e: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 47162: 4a2a 0010 tstb %a2@(16) 47166: 6700 0180 beqw 472e8 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 4716a: 2f00 movel %d0,%sp@- 4716c: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate> if ( !new_object_block ) 47172: 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 ); 47174: 2c00 movel %d0,%d6 if ( !new_object_block ) 47176: 6700 0166 beqw 472de <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 4717a: 4280 clrl %d0 4717c: 302a 000e movew %a2@(14),%d0 47180: b083 cmpl %d3,%d0 47182: 6200 00c4 bhiw 47248 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 47186: 2a44 moveal %d4,%a5 47188: 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 ); 4718a: 200b movel %a3,%d0 4718c: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47190: d088 addl %a0,%d0 47192: d085 addl %d5,%d0 47194: e588 lsll #2,%d0 47196: 2f00 movel %d0,%sp@- 47198: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate> if ( !object_blocks ) { 4719e: 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 ); 471a0: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471a2: 4a80 tstl %d0 471a4: 6700 01b2 beqw 47358 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471a8: 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 ) { 471aa: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471ac: 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 ) { 471ae: 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); 471b2: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 471b6: de8d addl %a5,%d7 471b8: b085 cmpl %d5,%d0 471ba: 6200 013c bhiw 472f8 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471be: 4a85 tstl %d5 471c0: 670c beqs 471ce <_Objects_Extend_information+0xde><== NEVER TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 471c2: 2047 moveal %d7,%a0 471c4: 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; 471c6: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471c8: 5280 addql #1,%d0 471ca: b085 cmpl %d5,%d0 471cc: 65f8 bcss 471c6 <_Objects_Extend_information+0xd6><== NEVER TAKEN 471ce: 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 ); 471d0: 4281 clrl %d1 471d2: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 471d6: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 471da: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 471dc: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 471e0: b283 cmpl %d3,%d1 471e2: 6310 blss 471f4 <_Objects_Extend_information+0x104><== NEVER TAKEN 471e4: 2247 moveal %d7,%a1 471e6: 2003 movel %d3,%d0 471e8: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 471ec: 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++ ) { 471ee: 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 ; 471f0: b280 cmpl %d0,%d1 471f2: 62f8 bhis 471ec <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 471f4: 203c 0000 0700 movel #1792,%d0 471fa: 40c4 movew %sr,%d4 471fc: 8084 orl %d4,%d0 471fe: 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( 47200: 2012 movel %a2@,%d0 47202: 7218 moveq #24,%d1 47204: 4285 clrl %d5 47206: e3a8 lsll %d1,%d0 47208: 3a0b movew %a3,%d5 4720a: 4281 clrl %d1 4720c: 2245 moveal %d5,%a1 4720e: 7a1b moveq #27,%d5 47210: 322a 0004 movew %a2@(4),%d1 47214: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47218: 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( 4721c: 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; 4721e: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 47222: 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( 47226: 8081 orl %d1,%d0 47228: 2209 movel %a1,%d1 4722a: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 4722c: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47230: 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; 47234: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47238: 46c4 movew %d4,%sr if ( old_tables ) 4723a: 4a88 tstl %a0 4723c: 670a beqs 47248 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4723e: 2f08 movel %a0,%sp@- 47240: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47246: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47248: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4724c: 4280 clrl %d0 4724e: 280e movel %fp,%d4 47250: 0684 ffff fff4 addil #-12,%d4 47256: 47f9 0004 b07c lea 4b07c <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4725c: 2a0a movel %a2,%d5 4725e: 0685 0000 001c addil #28,%d5 47264: 49f9 0004 673c lea 4673c <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4726a: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4726c: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47270: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47274: 2f2a 0014 movel %a2@(20),%sp@- 47278: 2f00 movel %d0,%sp@- 4727a: 2f06 movel %d6,%sp@- 4727c: 2f04 movel %d4,%sp@- 4727e: 4eb9 0004 b0b8 jsr 4b0b8 <_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 ) { 47284: 4fef 0010 lea %sp@(16),%sp 47288: 2f04 movel %d4,%sp@- 4728a: 4e93 jsr %a3@ 4728c: 588f addql #4,%sp 4728e: 4a80 tstl %d0 47290: 6732 beqs 472c4 <_Objects_Extend_information+0x1d4><== NEVER TAKEN the_object->id = _Objects_Build_id( 47292: 2212 movel %a2@,%d1 47294: 7c18 moveq #24,%d6 47296: 7e1b moveq #27,%d7 47298: 2040 moveal %d0,%a0 4729a: eda9 lsll %d6,%d1 4729c: 4286 clrl %d6 4729e: 3c2a 0004 movew %a2@(4),%d6 472a2: 08c1 0010 bset #16,%d1 472a6: efae lsll %d7,%d6 472a8: 8286 orl %d6,%d1 472aa: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 472ac: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 472ae: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472b2: 2f00 movel %d0,%sp@- 472b4: 2f05 movel %d5,%sp@- 472b6: 4e94 jsr %a4@ index++; 472b8: 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 ) { 472ba: 2f04 movel %d4,%sp@- 472bc: 4e93 jsr %a3@ 472be: 588f addql #4,%sp 472c0: 4a80 tstl %d0 472c2: 66ce bnes 47292 <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472c4: 4280 clrl %d0 information->inactive = 472c6: 322a 0028 movew %a2@(40),%d1 472ca: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472ce: 206a 002a moveal %a2@(42),%a0 information->inactive = 472d2: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472d4: 3009 movew %a1,%d0 information->inactive = 472d6: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472da: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 472de: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 472e4: 4e5e unlk %fp 472e6: 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 ); 472e8: 2f00 movel %d0,%sp@- 472ea: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error> 472f0: 588f addql #4,%sp 472f2: 2c00 movel %d0,%d6 472f4: 6000 fe84 braw 4717a <_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, 472f8: e58c lsll #2,%d4 472fa: 2f04 movel %d4,%sp@- 472fc: 2f2a 002e movel %a2@(46),%sp@- 47300: 2f0c movel %a4,%sp@- 47302: 4eb9 0004 e088 jsr 4e088 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47308: 2f04 movel %d4,%sp@- 4730a: 2f2a 002a movel %a2@(42),%sp@- 4730e: 2f0d movel %a5,%sp@- 47310: 4eb9 0004 e088 jsr 4e088 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47316: 4280 clrl %d0 47318: 302a 000e movew %a2@(14),%d0 4731c: da80 addl %d0,%d5 4731e: e58d lsll #2,%d5 47320: 2f05 movel %d5,%sp@- 47322: 2f2a 0018 movel %a2@(24),%sp@- 47326: 2f07 movel %d7,%sp@- 47328: 4eb9 0004 e088 jsr 4e088 4732e: 4fef 0024 lea %sp@(36),%sp 47332: 6000 fe9c braw 471d0 <_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 ) 47336: 4280 clrl %d0 47338: 2605 movel %d5,%d3 4733a: 4282 clrl %d2 4733c: 4284 clrl %d4 4733e: 322a 000e movew %a2@(14),%d1 47342: 302a 0012 movew %a2@(18),%d0 47346: 6000 fdfe braw 47146 <_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 ) 4734a: 2605 movel %d5,%d3 <== NOT EXECUTED 4734c: 4282 clrl %d2 <== NOT EXECUTED 4734e: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47354: 6000 fdf0 braw 47146 <_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 ); 47358: 2f06 movel %d6,%sp@- 4735a: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> return; 47360: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47362: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47368: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004741c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 4741c: 4e56 0000 linkw %fp,#0 47420: 2f02 movel %d2,%sp@- 47422: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47426: 660a bnes 47432 <_Objects_Get_information+0x16> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 47428: 4280 clrl %d0 return NULL; #endif return info; } 4742a: 242e fffc movel %fp@(-4),%d2 4742e: 4e5e unlk %fp 47430: 4e75 rts /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 47432: 2f2e 0008 movel %fp@(8),%sp@- 47436: 4eb9 0004 b690 jsr 4b690 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4743c: 588f addql #4,%sp 4743e: 4a80 tstl %d0 47440: 67e6 beqs 47428 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 47442: b082 cmpl %d2,%d0 47444: 65e2 bcss 47428 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47446: 202e 0008 movel %fp@(8),%d0 4744a: 41f9 0005 d980 lea 5d980 <_Objects_Information_table>,%a0 47450: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47454: 4a88 tstl %a0 47456: 67d0 beqs 47428 <_Objects_Get_information+0xc> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 47458: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 4745c: 67cc beqs 4742a <_Objects_Get_information+0xe> <== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 4745e: 2040 moveal %d0,%a0 47460: 4a68 000e tstw %a0@(14) 47464: 67c2 beqs 47428 <_Objects_Get_information+0xc> return NULL; #endif return info; } 47466: 242e fffc movel %fp@(-4),%d2 4746a: 4e5e unlk %fp ... =============================================================================== 00048fa4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 48fa4: 4e56 ffe0 linkw %fp,#-32 48fa8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48fac: 262e 000c movel %fp@(12),%d3 48fb0: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 48fb4: 4a83 tstl %d3 48fb6: 660e bnes 48fc6 <_Objects_Get_name_as_string+0x22> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 48fb8: 4282 clrl %d2 } return NULL; /* unreachable path */ } 48fba: 2002 movel %d2,%d0 48fbc: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48fc2: 4e5e unlk %fp 48fc4: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 48fc6: 4a82 tstl %d2 48fc8: 67f0 beqs 48fba <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48fca: 4aae 0008 tstl %fp@(8) 48fce: 6700 00a8 beqw 49078 <_Objects_Get_name_as_string+0xd4> 48fd2: 282e 0008 movel %fp@(8),%d4 information = _Objects_Get_information_id( tmpId ); 48fd6: 2f04 movel %d4,%sp@- 48fd8: 4eb9 0004 8ec4 jsr 48ec4 <_Objects_Get_information_id> if ( !information ) 48fde: 588f addql #4,%sp 48fe0: 4a80 tstl %d0 48fe2: 67d4 beqs 48fb8 <_Objects_Get_name_as_string+0x14><== NEVER TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 48fe4: 486e fffc pea %fp@(-4) 48fe8: 2f04 movel %d4,%sp@- 48fea: 2f00 movel %d0,%sp@- 48fec: 4eb9 0004 9094 jsr 49094 <_Objects_Get> switch ( location ) { 48ff2: 4fef 000c lea %sp@(12),%sp 48ff6: 4aae fffc tstl %fp@(-4) 48ffa: 66bc bnes 48fb8 <_Objects_Get_name_as_string+0x14><== NEVER TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 48ffc: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 48ffe: 7818 moveq #24,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49000: 5383 subql #1,%d3 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49002: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49006: 2200 movel %d0,%d1 49008: e8a9 lsrl %d4,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4900a: 2a00 movel %d0,%d5 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4900c: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 4900e: e08d lsrl #8,%d5 lname[ 3 ] = (u32_name >> 0) & 0xff; 49010: 1d40 fffa moveb %d0,%fp@(-6) lname[ 4 ] = '\0'; 49014: 4200 clrb %d0 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49016: 4244 clrw %d4 49018: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 4901a: 1d45 fff9 moveb %d5,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4901e: 1d40 fffb moveb %d0,%fp@(-5) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49022: 1d44 fff8 moveb %d4,%fp@(-8) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 49026: 1d41 fff7 moveb %d1,%fp@(-9) 4902a: 1001 moveb %d1,%d0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4902c: 4a83 tstl %d3 4902e: 6756 beqs 49086 <_Objects_Get_name_as_string+0xe2><== NEVER TAKEN 49030: 4a01 tstb %d1 49032: 6752 beqs 49086 <_Objects_Get_name_as_string+0xe2> 49034: 2042 moveal %d2,%a0 49036: 4281 clrl %d1 49038: 45ee fff7 lea %fp@(-9),%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 4903c: 4284 clrl %d4 4903e: 1800 moveb %d0,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49040: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49042: 2279 0005 ebc8 moveal 5ebc8 <__ctype_ptr__>,%a1 49048: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 4904c: 49c4 extbl %d4 4904e: 0284 0000 0097 andil #151,%d4 49054: 6602 bnes 49058 <_Objects_Get_name_as_string+0xb4> 49056: 702a moveq #42,%d0 49058: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4905a: b681 cmpl %d1,%d3 4905c: 6306 blss 49064 <_Objects_Get_name_as_string+0xc0> 4905e: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 49062: 66d8 bnes 4903c <_Objects_Get_name_as_string+0x98> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49064: 4210 clrb %a0@ _Thread_Enable_dispatch(); 49066: 4eb9 0004 9880 jsr 49880 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 4906c: 2002 movel %d2,%d0 4906e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49074: 4e5e unlk %fp 49076: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49078: 2079 0006 8072 moveal 68072 <_Thread_Executing>,%a0 4907e: 2828 0008 movel %a0@(8),%d4 49082: 6000 ff52 braw 48fd6 <_Objects_Get_name_as_string+0x32> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49086: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49088: 4210 clrb %a0@ _Thread_Enable_dispatch(); 4908a: 4eb9 0004 9880 jsr 49880 <_Thread_Enable_dispatch> 49090: 60da bras 4906c <_Objects_Get_name_as_string+0xc8> ... =============================================================================== 0005b838 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5b838: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5b83a: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b83c: 4e56 0000 linkw %fp,#0 5b840: 206e 0008 moveal %fp@(8),%a0 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5b844: 90a8 0006 subl %a0@(6),%d0 5b848: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5b84c: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b850: 226e 0010 moveal %fp@(16),%a1 * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; if ( information->maximum >= index ) { 5b854: b280 cmpl %d0,%d1 5b856: 6510 bcss 5b868 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5b858: 2068 0018 moveal %a0@(24),%a0 5b85c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b860: 6706 beqs 5b868 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 5b862: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5b864: 4e5e unlk %fp 5b866: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b868: 7001 moveq #1,%d0 return NULL; } 5b86a: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b86c: 2280 movel %d0,%a1@ 5b86e: 4280 clrl %d0 return NULL; } ... =============================================================================== 00048c70 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 48c70: 4e56 fffc linkw %fp,#-4 48c74: 222e 0008 movel %fp@(8),%d1 48c78: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48c7a: 4a81 tstl %d1 48c7c: 660a bnes 48c88 <_Objects_Id_to_name+0x18> 48c7e: 2079 0005 f79a moveal 5f79a <_Thread_Executing>,%a0 48c84: 2228 0008 movel %a0@(8),%d1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 48c88: 7418 moveq #24,%d2 48c8a: 2001 movel %d1,%d0 48c8c: e4a8 lsrl %d2,%d0 48c8e: 143c 0007 moveb #7,%d2 48c92: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 48c94: 143c 0003 moveb #3,%d2 48c98: 2040 moveal %d0,%a0 48c9a: 5388 subql #1,%a0 48c9c: b488 cmpl %a0,%d2 48c9e: 654a bcss 48cea <_Objects_Id_to_name+0x7a> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 48ca0: 41f9 0005 f698 lea 5f698 <_Objects_Information_table>,%a0 48ca6: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 48caa: 4a88 tstl %a0 48cac: 673c beqs 48cea <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 48cae: 2001 movel %d1,%d0 48cb0: 741b moveq #27,%d2 48cb2: e4a8 lsrl %d2,%d0 48cb4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 48cb8: 6730 beqs 48cea <_Objects_Id_to_name+0x7a> <== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 48cba: 486e fffc pea %fp@(-4) 48cbe: 2f01 movel %d1,%sp@- 48cc0: 2f00 movel %d0,%sp@- 48cc2: 4eb9 0004 8c04 jsr 48c04 <_Objects_Get> if ( !the_object ) 48cc8: 4fef 000c lea %sp@(12),%sp 48ccc: 4a80 tstl %d0 48cce: 671a beqs 48cea <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; *name = the_object->name; 48cd0: 206e 000c moveal %fp@(12),%a0 48cd4: 2240 moveal %d0,%a1 48cd6: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 48cda: 4eb9 0004 94f4 jsr 494f4 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48ce0: 242e fff8 movel %fp@(-8),%d2 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); 48ce4: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48ce6: 4e5e unlk %fp 48ce8: 4e75 rts 48cea: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 48cee: 7003 moveq #3,%d0 } 48cf0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004753c <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4753c: 41f9 0005 d980 lea 5d980 <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47542: 4e56 fff0 linkw %fp,#-16 47546: 202e 000c movel %fp@(12),%d0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4754a: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4754e: 48d7 003c moveml %d2-%d5,%sp@ 47552: 222e 0014 movel %fp@(20),%d1 47556: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47558: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4755a: 206e 0008 moveal %fp@(8),%a0 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4755e: 4244 clrw %d4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47560: 3a2e 001a movew %fp@(26),%d5 47564: 242e 0010 movel %fp@(16),%d2 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47568: d683 addl %d3,%d3 4756a: 9783 subxl %d3,%d3 4756c: 4483 negl %d3 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4756e: 3144 0028 movew %d4,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 47572: 3144 000e movew %d4,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47576: 282e 0020 movel %fp@(32),%d4 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 4757a: 3142 0004 movew %d2,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 4757e: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 47582: 2145 0014 movel %d5,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 47586: 2388 2c00 movel %a0,%a1@(00000000,%d2:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 4758a: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 4758e: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 47590: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 47594: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 47598: 42a8 002e clrl %a0@(46) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 4759c: 4a03 tstb %d3 4759e: 6706 beqs 475a6 <_Objects_Initialize_information+0x6a> 475a0: 4a81 tstl %d1 475a2: 6700 0092 beqw 47636 <_Objects_Initialize_information+0xfa> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475a6: 7a18 moveq #24,%d5 475a8: 4a81 tstl %d1 475aa: 56c3 sne %d3 475ac: eba8 lsll %d5,%d0 475ae: 1a3c 001b moveb #27,%d5 475b2: 49c3 extbl %d3 475b4: 4483 negl %d3 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475b6: 43f9 0005 d16c lea 5d16c ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475bc: ebaa lsll %d5,%d2 475be: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c2: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475c6: 8082 orl %d2,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c8: ca84 andl %d4,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 475ca: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475ce: 8083 orl %d3,%d0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475d0: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475d4: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475d8: 4a85 tstl %d5 475da: 6626 bnes 47602 <_Objects_Initialize_information+0xc6><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 475dc: 43e8 0020 lea %a0@(32),%a1 475e0: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 475e4: 43e8 001c lea %a0@(28),%a1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 475e8: 3144 0032 movew %d4,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 475ec: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 475f0: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 475f4: 4a81 tstl %d1 475f6: 662c bnes 47624 <_Objects_Initialize_information+0xe8> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 475f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 475fe: 4e5e unlk %fp 47600: 4e75 rts * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 47602: 5884 addql #4,%d4 <== NOT EXECUTED 47604: 70fc moveq #-4,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47606: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 4760a: c880 andl %d0,%d4 <== NOT EXECUTED 4760c: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47610: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 47614: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47618: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 4761c: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 47620: 4a81 tstl %d1 <== NOT EXECUTED 47622: 67d4 beqs 475f8 <_Objects_Initialize_information+0xbc><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47624: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 47628: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4762e: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47630: 4ef9 0004 70f0 jmp 470f0 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 47636: 4878 0014 pea 14 4763a: 4878 0001 pea 1 4763e: 42a7 clrl %sp@- 47640: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... =============================================================================== 000476d8 <_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) / 476d8: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 476da: 4e56 ffec linkw %fp,#-20 476de: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 476e2: 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 ); 476e6: 4283 clrl %d3 block_count = (information->maximum - index_base) / 476e8: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476ea: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 476ee: 382a 000e movew %a2@(14),%d4 476f2: 322a 0012 movew %a2@(18),%d1 476f6: 9883 subl %d3,%d4 476f8: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 476fc: 672c beqs 4772a <_Objects_Shrink_information+0x52><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 476fe: 226a 002a moveal %a2@(42),%a1 47702: b291 cmpl %a1@,%d1 47704: 672e beqs 47734 <_Objects_Shrink_information+0x5c><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47706: 7404 moveq #4,%d2 47708: 4280 clrl %d0 } index_base += information->allocation_size; 4770a: 2042 moveal %d2,%a0 4770c: d681 addl %d1,%d3 4770e: 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++ ) { 47710: 5280 addql #1,%d0 47712: b084 cmpl %d4,%d0 47714: 6414 bccs 4772a <_Objects_Shrink_information+0x52><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 47716: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4771a: 671a beqs 47736 <_Objects_Shrink_information+0x5e> 4771c: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4771e: 2042 moveal %d2,%a0 47720: d681 addl %d1,%d3 47722: 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++ ) { 47724: 5280 addql #1,%d0 47726: b084 cmpl %d4,%d0 47728: 65ec bcss 47716 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 4772a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47730: 4e5e unlk %fp 47732: 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 ] == 47734: 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; 47736: 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 ); 4773a: 47f9 0004 b054 lea 4b054 <_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 ); 47740: 4280 clrl %d0 47742: 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; 47746: 2810 movel %a0@,%d4 if ((index >= index_base) && 47748: b680 cmpl %d0,%d3 4774a: 620c bhis 47758 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 4774c: 4281 clrl %d1 4774e: 322a 0012 movew %a2@(18),%d1 47752: d283 addl %d3,%d1 47754: b280 cmpl %d0,%d1 47756: 623e bhis 47796 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 47758: 2044 moveal %d4,%a0 4775a: 4a84 tstl %d4 4775c: 66e2 bnes 47740 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4775e: 206a 002e moveal %a2@(46),%a0 47762: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 47766: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 4776c: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47770: 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; 47772: 302a 0028 movew %a2@(40),%d0 47776: 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; 4777a: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4777e: 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; 47780: 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; 47784: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47788: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4778c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47792: 4e5e unlk %fp 47794: 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 ); 47796: 2f08 movel %a0,%sp@- 47798: 4e93 jsr %a3@ 4779a: 588f addql #4,%sp } } while ( the_object ); 4779c: 2044 moveal %d4,%a0 4779e: 4a84 tstl %d4 477a0: 669e bnes 47740 <_Objects_Shrink_information+0x68> 477a2: 60ba bras 4775e <_Objects_Shrink_information+0x86> =============================================================================== 0004aede <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4aede: 4e56 0000 linkw %fp,#0 4aee2: 2f0a movel %a2,%sp@- 4aee4: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4aee8: 4a39 0005 c264 tstb 5c264 4aeee: 665c bnes 4af4c <_RTEMS_tasks_Create_extension+0x6e> 4aef0: 701e moveq #30,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4aef2: 2f00 movel %d0,%sp@- 4aef4: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate> if ( !api ) 4aefa: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4aefc: 2040 moveal %d0,%a0 if ( !api ) 4aefe: 4a80 tstl %d0 4af00: 675c beqs 4af5e <_RTEMS_tasks_Create_extension+0x80><== NEVER TAKEN created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4af02: 42aa 0118 clrl %a2@(280) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4af06: 4200 clrb %d0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4af08: 2548 0108 movel %a0,%a2@(264) 4af0c: 1140 0008 moveb %d0,%a0@(8) api->pending_events = EVENT_SETS_NONE_PENDING; 4af10: 4290 clrl %a0@ api->event_condition = 0; 4af12: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4af16: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4af1a: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4af1e: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4af22: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4af26: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 4af2a: 4a39 0005 c264 tstb 5c264 4af30: 6710 beqs 4af42 <_RTEMS_tasks_Create_extension+0x64> 4af32: 41e8 001e lea %a0@(30),%a0 4af36: 4280 clrl %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4af38: 4298 clrl %a0@+ api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4af3a: 5280 addql #1,%d0 4af3c: 7210 moveq #16,%d1 4af3e: b280 cmpl %d0,%d1 4af40: 66f6 bnes 4af38 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4af42: 246e fffc moveal %fp@(-4),%a2 4af46: 4e5e unlk %fp api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4af48: 7001 moveq #1,%d0 api->Notepads[i] = 0; } return true; } 4af4a: 4e75 rts /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4af4c: 705e moveq #94,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4af4e: 2f00 movel %d0,%sp@- 4af50: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate> if ( !api ) 4af56: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4af58: 2040 moveal %d0,%a0 if ( !api ) 4af5a: 4a80 tstl %d0 4af5c: 66a4 bnes 4af02 <_RTEMS_tasks_Create_extension+0x24> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4af5e: 246e fffc moveal %fp@(-4),%a2 4af62: 4e5e unlk %fp if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) 4af64: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 00046150 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46150: 4e56 ffe4 linkw %fp,#-28 46154: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46158: 2479 0005 c28a moveal 5c28a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 4615e: 2639 0005 c286 movel 5c286 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46164: 4a8a tstl %a2 46166: 6754 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46168: 4a83 tstl %d3 4616a: 6750 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 4616c: 280e movel %fp,%d4 4616e: 4282 clrl %d2 46170: 5984 subql #4,%d4 46172: 47f9 0004 5f24 lea 45f24 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46178: 49f9 0004 61d8 lea 461d8 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4617e: 2f04 movel %d4,%sp@- 46180: 2f2a 000c movel %a2@(12),%sp@- 46184: 2f2a 0014 movel %a2@(20),%sp@- 46188: 2f2a 0004 movel %a2@(4),%sp@- 4618c: 2f2a 0008 movel %a2@(8),%sp@- 46190: 2f12 movel %a2@,%sp@- 46192: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46194: 4fef 0018 lea %sp@(24),%sp 46198: 4a80 tstl %d0 4619a: 662a bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 4619c: 2f2a 0018 movel %a2@(24),%sp@- 461a0: 2f2a 0010 movel %a2@(16),%sp@- 461a4: 2f2e fffc movel %fp@(-4),%sp@- 461a8: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 461aa: 4fef 000c lea %sp@(12),%sp 461ae: 4a80 tstl %d0 461b0: 6614 bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 461b2: 5282 addql #1,%d2 461b4: 45ea 001c lea %a2@(28),%a2 461b8: b483 cmpl %d3,%d2 461ba: 65c2 bcss 4617e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 461bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 461c2: 4e5e unlk %fp 461c4: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 461c6: 2f00 movel %d0,%sp@- 461c8: 4878 0001 pea 1 461cc: 4878 0001 pea 1 461d0: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... =============================================================================== 0004ae1a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4ae1a: 4e56 ffec linkw %fp,#-20 4ae1e: 206e 0008 moveal %fp@(8),%a0 4ae22: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4ae26: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 4ae2a: 4a8a tstl %a2 4ae2c: 671a beqs 4ae48 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4ae2e: 203c 0000 0700 movel #1792,%d0 4ae34: 40c1 movew %sr,%d1 4ae36: 8081 orl %d1,%d0 4ae38: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4ae3a: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4ae3e: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4ae42: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4ae44: 4a82 tstl %d2 4ae46: 660a bnes 4ae52 <_RTEMS_tasks_Post_switch_extension+0x38><== ALWAYS TAKEN (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4ae48: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ae4e: 4e5e unlk %fp <== NOT EXECUTED 4ae50: 4e75 rts <== NOT EXECUTED if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4ae52: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4ae56: 260e movel %fp,%d3 4ae58: 5983 subql #4,%d3 4ae5a: 47f9 0004 cd88 lea 4cd88 ,%a3 4ae60: 2f03 movel %d3,%sp@- 4ae62: 2f3c 0000 ffff movel #65535,%sp@- 4ae68: 2f2a 000e movel %a2@(14),%sp@- 4ae6c: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4ae6e: 2f02 movel %d2,%sp@- 4ae70: 206a 000a moveal %a2@(10),%a0 4ae74: 4e90 jsr %a0@ asr->nest_level -= 1; 4ae76: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4ae7a: 2f03 movel %d3,%sp@- 4ae7c: 2f3c 0000 ffff movel #65535,%sp@- 4ae82: 2f2e fffc movel %fp@(-4),%sp@- 4ae86: 4e93 jsr %a3@ 4ae88: 4fef 001c lea %sp@(28),%sp } 4ae8c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ae92: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ad76 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4ad76: 4e56 0000 linkw %fp,#0 4ad7a: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4ad7e: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 4ad82: 4a88 tstl %a0 4ad84: 6712 beqs 4ad98 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4ad86: 2268 0004 moveal %a0@(4),%a1 4ad8a: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4ad8e: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4ad92: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4ad94: 4a88 tstl %a0 4ad96: 66ee bnes 4ad86 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4ad98: 206e 000c moveal %fp@(12),%a0 4ad9c: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 4ada0: 4a88 tstl %a0 4ada2: 6712 beqs 4adb6 <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4ada4: 2268 0004 moveal %a0@(4),%a1 4ada8: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4adac: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4adb0: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4adb2: 4a88 tstl %a0 4adb4: 66ee bnes 4ada4 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4adb6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047224 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47224: 4e56 fffc linkw %fp,#-4 47228: 2f0a movel %a2,%sp@- 4722a: 486e fffc pea %fp@(-4) 4722e: 2f2e 0008 movel %fp@(8),%sp@- 47232: 4879 0005 fa14 pea 5fa14 <_Rate_monotonic_Information> 47238: 4eb9 0004 9008 jsr 49008 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4723e: 4fef 000c lea %sp@(12),%sp 47242: 2440 moveal %d0,%a2 47244: 4aae fffc tstl %fp@(-4) 47248: 6636 bnes 47280 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 4724a: 206a 0040 moveal %a2@(64),%a0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 4724e: 2028 0010 movel %a0@(16),%d0 47252: 0280 0000 4000 andil #16384,%d0 47258: 670a beqs 47264 <_Rate_monotonic_Timeout+0x40> the_thread->Wait.id == the_period->Object.id ) { 4725a: 202a 0008 movel %a2@(8),%d0 4725e: b0a8 0020 cmpl %a0@(32),%d0 47262: 675e beqs 472c2 <_Rate_monotonic_Timeout+0x9e> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 47264: 7001 moveq #1,%d0 47266: b0aa 0038 cmpl %a2@(56),%d0 4726a: 671c beqs 47288 <_Rate_monotonic_Timeout+0x64> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 4726c: 7004 moveq #4,%d0 4726e: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47272: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 47278: 5380 subql #1,%d0 4727a: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47280: 246e fff8 moveal %fp@(-8),%a2 47284: 4e5e unlk %fp 47286: 4e75 rts _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 47288: 103c 0003 moveb #3,%d0 4728c: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47290: 2f0a movel %a2,%sp@- 47292: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47298: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4729e: 486a 0010 pea %a2@(16) 472a2: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 472a8: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert> 472ae: 4fef 000c lea %sp@(12),%sp 472b2: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 472b8: 5380 subql #1,%d0 472ba: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level> 472c0: 60be bras 47280 <_Rate_monotonic_Timeout+0x5c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 472c2: 2f3c 1003 fff8 movel #268697592,%sp@- 472c8: 2f08 movel %a0,%sp@- 472ca: 4eb9 0004 94a0 jsr 494a0 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 472d0: 2f0a movel %a2,%sp@- 472d2: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 472d8: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 472de: 486a 0010 pea %a2@(16) 472e2: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 472e8: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert> the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 472ee: 4fef 0014 lea %sp@(20),%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 472f2: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 472f8: 5380 subql #1,%d0 472fa: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level> 47300: 6000 ff7e braw 47280 <_Rate_monotonic_Timeout+0x5c> =============================================================================== 0004856c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 4856c: 4e56 0000 linkw %fp,#0 48570: 2039 0006 7fb8 movel 67fb8 <_Thread_Dispatch_disable_level>,%d0 48576: 5280 addql #1,%d0 48578: 2f0a movel %a2,%sp@- 4857a: 246e 0008 moveal %fp@(8),%a2 4857e: 23c0 0006 7fb8 movel %d0,67fb8 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 48584: 2039 0006 804a movel 6804a <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 4858a: 2212 movel %a2@,%d1 4858c: b280 cmpl %d0,%d1 4858e: 6d38 blts 485c8 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 48590: 9280 subl %d0,%d1 48592: 2f01 movel %d1,%sp@- 48594: 42a7 clrl %sp@- 48596: 4879 0006 8084 pea 68084 <_Watchdog_Seconds_chain> 4859c: 4eb9 0004 ab6c jsr 4ab6c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 485a2: 23d2 0006 804a movel %a2@,6804a <_TOD_Now> 485a8: 588a addql #4,%a2 485aa: 4fef 000c lea %sp@(12),%sp 485ae: 23d2 0006 804e movel %a2@,6804e <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 485b4: 246e fffc moveal %fp@(-4),%a2 485b8: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 485ba: 7001 moveq #1,%d0 485bc: 13c0 0006 7fcc moveb %d0,67fcc <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 485c2: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> 485c8: 9081 subl %d1,%d0 485ca: 2f00 movel %d0,%sp@- 485cc: 4878 0001 pea 1 485d0: 4879 0006 8084 pea 68084 <_Watchdog_Seconds_chain> 485d6: 4eb9 0004 ab6c jsr 4ab6c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 485dc: 23d2 0006 804a movel %a2@,6804a <_TOD_Now> 485e2: 588a addql #4,%a2 485e4: 4fef 000c lea %sp@(12),%sp 485e8: 23d2 0006 804e movel %a2@,6804e <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 485ee: 246e fffc moveal %fp@(-4),%a2 485f2: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 485f4: 7001 moveq #1,%d0 485f6: 13c0 0006 7fcc moveb %d0,67fcc <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 485fc: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> ... =============================================================================== 00046b90 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 46b90: 4e56 ffec linkw %fp,#-20 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46b94: 2239 0005 c2a0 movel 5c2a0 ,%d1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 46b9a: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46b9e: 240e movel %fp,%d2 46ba0: 5182 subql #8,%d2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46ba2: 263c 0000 03e8 movel #1000,%d3 46ba8: 4c03 1800 mulsl %d3,%d1 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46bac: 45f9 0004 8ad4 lea 48ad4 <_Timespec_Add_to>,%a2 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 46bb2: 2039 0005 db08 movel 5db08 <_Watchdog_Ticks_since_boot>,%d0 46bb8: 5280 addql #1,%d0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46bba: 2f02 movel %d2,%sp@- 46bbc: 4879 0005 da46 pea 5da46 <_TOD_Uptime> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46bc2: 2d41 fffc movel %d1,%fp@(-4) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 46bc6: 23c0 0005 db08 movel %d0,5db08 <_Watchdog_Ticks_since_boot> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46bcc: 42ae fff8 clrl %fp@(-8) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46bd0: 4e92 jsr %a2@ /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 46bd2: 2f02 movel %d2,%sp@- 46bd4: 4879 0005 da5a pea 5da5a <_TOD_Now> 46bda: 4e92 jsr %a2@ while ( seconds ) { 46bdc: 4fef 0010 lea %sp@(16),%sp /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 46be0: 2400 movel %d0,%d2 while ( seconds ) { 46be2: 6716 beqs 46bfa <_TOD_Tickle_ticks+0x6a> 46be4: 45f9 0004 9004 lea 49004 <_Watchdog_Tickle>,%a2 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 46bea: 4879 0005 da94 pea 5da94 <_Watchdog_Seconds_chain> _Watchdog_Tickle_seconds(); seconds--; 46bf0: 5382 subql #1,%d2 46bf2: 4e92 jsr %a2@ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 46bf4: 588f addql #4,%sp 46bf6: 4a82 tstl %d2 46bf8: 66f0 bnes 46bea <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 46bfa: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c00: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046c3c <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46c3c: 4e56 0000 linkw %fp,#0 46c40: 206e 0008 moveal %fp@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 46c44: 2039 0005 ead0 movel 5ead0 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46c4a: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 46c4c: 4a88 tstl %a0 46c4e: 6762 beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN 46c50: 243c 000f 4240 movel #1000000,%d2 46c56: 4c40 2002 remul %d0,%d2,%d2 (the_tod->ticks >= ticks_per_second) || 46c5a: b4a8 0018 cmpl %a0@(24),%d2 46c5e: 6352 blss 46cb2 <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 46c60: 703b moveq #59,%d0 46c62: b0a8 0014 cmpl %a0@(20),%d0 46c66: 654a bcss 46cb2 <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 46c68: b0a8 0010 cmpl %a0@(16),%d0 46c6c: 6544 bcss 46cb2 <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || 46c6e: 7217 moveq #23,%d1 46c70: b2a8 000c cmpl %a0@(12),%d1 46c74: 653c bcss 46cb2 <_TOD_Validate+0x76> (the_tod->month == 0) || 46c76: 2028 0004 movel %a0@(4),%d0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 46c7a: 6736 beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN 46c7c: 740c moveq #12,%d2 46c7e: b480 cmpl %d0,%d2 46c80: 6530 bcss 46cb2 <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 46c82: 2210 movel %a0@,%d1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 46c84: 0c81 0000 07c3 cmpil #1987,%d1 46c8a: 6326 blss 46cb2 <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 46c8c: 2068 0008 moveal %a0@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 46c90: 4a88 tstl %a0 46c92: 671e beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 46c94: 143c 0003 moveb #3,%d2 46c98: c282 andl %d2,%d1 46c9a: 661e bnes 46cba <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 46c9c: 43f9 0005 da7e lea 5da7e <_TOD_Days_per_month>,%a1 46ca2: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46ca6: b1c0 cmpal %d0,%a0 46ca8: 53c0 sls %d0 46caa: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46cac: 241f movel %sp@+,%d2 46cae: 4e5e unlk %fp 46cb0: 4e75 rts 46cb2: 241f movel %sp@+,%d2 46cb4: 4e5e unlk %fp * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46cb6: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46cb8: 4e75 rts return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 46cba: 43f9 0005 da7e lea 5da7e <_TOD_Days_per_month>,%a1 46cc0: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46cc4: b1c0 cmpal %d0,%a0 46cc6: 53c0 sls %d0 46cc8: 4480 negl %d0 46cca: 60e0 bras 46cac <_TOD_Validate+0x70> =============================================================================== 0004781c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4781c: 4e56 fff0 linkw %fp,#-16 47820: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47824: 246e 0008 moveal %fp@(8),%a2 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 47828: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4782a: 242e 000c movel %fp@(12),%d2 */ /* * Save original state */ original_state = the_thread->current_state; 4782e: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47832: 182e 0013 moveb %fp@(19),%d4 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 47836: 4eb9 0004 872c jsr 4872c <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 4783c: 588f addql #4,%sp 4783e: b4aa 0014 cmpl %a2@(20),%d2 47842: 670c beqs 47850 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 47844: 2f02 movel %d2,%sp@- 47846: 2f0a movel %a2,%sp@- 47848: 4eb9 0004 85a8 jsr 485a8 <_Thread_Set_priority> 4784e: 508f addql #8,%sp _ISR_Disable( level ); 47850: 203c 0000 0700 movel #1792,%d0 47856: 40c1 movew %sr,%d1 47858: 8081 orl %d1,%d0 4785a: 46c0 movew %d0,%sr /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 4785c: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 47860: 7404 moveq #4,%d2 47862: b480 cmpl %d0,%d2 47864: 6738 beqs 4789e <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 47866: 44c3 movew %d3,%ccr 47868: 6708 beqs 47872 <_Thread_Change_priority+0x56> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 4786a: 74fb moveq #-5,%d2 4786c: c480 andl %d0,%d2 4786e: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 47872: 46c1 movew %d1,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 47874: 0280 0003 bee0 andil #245472,%d0 4787a: 660a bnes 47886 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 4787c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47882: 4e5e unlk %fp 47884: 4e75 rts /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 47886: 2d4a 000c movel %a2,%fp@(12) 4788a: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 47890: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47896: 4e5e unlk %fp /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 47898: 4ef9 0004 84fc jmp 484fc <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 4789e: 44c3 movew %d3,%ccr 478a0: 673c beqs 478de <_Thread_Change_priority+0xc2> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 478a2: 206a 008e moveal %a2@(142),%a0 478a6: 302a 0094 movew %a2@(148),%d0 478aa: 3410 movew %a0@,%d2 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 478ac: 42aa 0010 clrl %a2@(16) 478b0: 8082 orl %d2,%d0 478b2: 3080 movew %d0,%a0@ _Priority_Major_bit_map |= the_priority_map->ready_major; 478b4: 3439 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d2 478ba: 302a 0092 movew %a2@(146),%d0 478be: 8082 orl %d2,%d0 478c0: 33c0 0005 da78 movew %d0,5da78 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 478c6: 4a04 tstb %d4 478c8: 6700 0082 beqw 4794c <_Thread_Change_priority+0x130> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 478cc: 206a 008a moveal %a2@(138),%a0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 478d0: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 478d2: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 478d6: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 478d8: 234a 0004 movel %a2,%a1@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 478dc: 2489 movel %a1,%a2@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 478de: 203c 0000 0700 movel #1792,%d0 478e4: 46c1 movew %d1,%sr 478e6: 8081 orl %d1,%d0 478e8: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 478ea: 3039 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d0 478f0: 4840 swap %d0 478f2: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 478f4: 4282 clrl %d2 478f6: 41f9 0005 dae4 lea 5dae4 <_Priority_Bit_map>,%a0 478fc: 3400 movew %d0,%d2 478fe: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 47902: 4840 swap %d0 47904: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47906: 4283 clrl %d3 47908: e98a lsll #4,%d2 4790a: 3600 movew %d0,%d3 4790c: 2279 0005 d974 moveal 5d974 <_Thread_Ready_chain>,%a1 47912: 2002 movel %d2,%d0 47914: d083 addl %d3,%d0 47916: 2400 movel %d0,%d2 47918: e58a lsll #2,%d2 4791a: e988 lsll #4,%d0 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 4791c: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47922: 93c2 subal %d2,%a1 47924: 2031 0800 movel %a1@(00000000,%d0:l),%d0 47928: 23c0 0005 da56 movel %d0,5da56 <_Thread_Heir> * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 4792e: b1c0 cmpal %d0,%a0 47930: 670e beqs 47940 <_Thread_Change_priority+0x124> _Thread_Executing->is_preemptible ) 47932: 4a28 0075 tstb %a0@(117) 47936: 6708 beqs 47940 <_Thread_Change_priority+0x124> _Context_Switch_necessary = true; 47938: 7401 moveq #1,%d2 4793a: 13c2 0005 da92 moveb %d2,5da92 <_Context_Switch_necessary> _ISR_Enable( level ); 47940: 46c1 movew %d1,%sr } 47942: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47948: 4e5e unlk %fp 4794a: 4e75 rts _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 4794c: 206a 008a moveal %a2@(138),%a0 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47950: 2008 movel %a0,%d0 47952: 5880 addql #4,%d0 47954: 2480 movel %d0,%a2@ old_last_node = the_chain->last; 47956: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 4795a: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4795e: 2549 0004 movel %a1,%a2@(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; 47962: 228a movel %a2,%a1@ 47964: 6000 ff78 braw 478de <_Thread_Change_priority+0xc2> =============================================================================== 00047968 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47968: 327c 0700 moveaw #1792,%a1 4796c: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4796e: 4e56 ffec linkw %fp,#-20 47972: 206e 0008 moveal %fp@(8),%a0 47976: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4797a: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4797e: 40c3 movew %sr,%d3 47980: 8083 orl %d3,%d0 47982: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47984: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47988: 2002 movel %d2,%d0 4798a: c081 andl %d1,%d0 4798c: 6776 beqs 47a04 <_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); 4798e: 2002 movel %d2,%d0 47990: 4680 notl %d0 47992: c081 andl %d1,%d0 current_state = 47994: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47998: 666a bnes 47a04 <_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; 4799a: 2868 008e moveal %a0@(142),%a4 4799e: 3028 0094 movew %a0@(148),%d0 479a2: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 479a4: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 479a8: 240a movel %a2,%d2 479aa: 5882 addql #4,%d2 479ac: 8081 orl %d1,%d0 479ae: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 479b0: 266a 0008 moveal %a2@(8),%a3 479b4: 3880 movew %d0,%a4@ the_chain->last = the_node; 479b6: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 479ba: 3239 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d1 479c0: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 479c4: 214b 0004 movel %a3,%a0@(4) 479c8: 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; 479ca: 2688 movel %a0,%a3@ 479cc: 33c0 0005 da78 movew %d0,5da78 <_Priority_Major_bit_map> _ISR_Flash( level ); 479d2: 2009 movel %a1,%d0 479d4: 46c3 movew %d3,%sr 479d6: 8083 orl %d3,%d0 479d8: 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 ) { 479da: 2028 0014 movel %a0@(20),%d0 479de: 2279 0005 da56 moveal 5da56 <_Thread_Heir>,%a1 479e4: b0a9 0014 cmpl %a1@(20),%d0 479e8: 641a bccs 47a04 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 479ea: 23c8 0005 da56 movel %a0,5da56 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 479f0: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 479f6: 4a28 0075 tstb %a0@(117) 479fa: 6712 beqs 47a0e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 479fc: 7001 moveq #1,%d0 479fe: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a04: 46c3 movew %d3,%sr } 47a06: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a0a: 4e5e unlk %fp 47a0c: 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 || 47a0e: 4a80 tstl %d0 47a10: 66f2 bnes 47a04 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a12: 7001 moveq #1,%d0 <== NOT EXECUTED 47a14: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED 47a1a: 60e8 bras 47a04 <_Thread_Clear_state+0x9c> <== NOT EXECUTED =============================================================================== 00047a1c <_Thread_Close>: 47a1c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a1e: 4e56 0000 linkw %fp,#0 47a22: 2f0b movel %a3,%sp@- 47a24: 266e 0008 moveal %fp@(8),%a3 47a28: 2f0a movel %a2,%sp@- 47a2a: 246e 000c moveal %fp@(12),%a2 47a2e: 206b 0018 moveal %a3@(24),%a0 47a32: 302a 000a movew %a2@(10),%d0 47a36: 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; 47a3a: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47a40: 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 ); 47a42: 2f0a movel %a2,%sp@- 47a44: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 47a4a: 4eb9 0004 8d50 jsr 48d50 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47a50: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47a56: 5280 addql #1,%d0 47a58: 23c0 0005 d9c8 movel %d0,5d9c8 <_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 ); 47a5e: 2f0a movel %a2,%sp@- 47a60: 2f0b movel %a3,%sp@- 47a62: 4eb9 0004 70c4 jsr 470c4 <_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 ); 47a68: 4878 0001 pea 1 47a6c: 2f0a movel %a2,%sp@- 47a6e: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47a74: 2f0a movel %a2,%sp@- 47a76: 4eb9 0004 8424 jsr 48424 <_Thread_queue_Extract_with_proxy> 47a7c: 4fef 0018 lea %sp@(24),%sp 47a80: 4a00 tstb %d0 47a82: 6608 bnes 47a8c <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47a84: 7002 moveq #2,%d0 47a86: b0aa 0050 cmpl %a2@(80),%d0 47a8a: 6756 beqs 47ae2 <_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 ) ) 47a8c: b5f9 0005 da4e cmpal 5da4e <_Thread_Allocated_fp>,%a2 47a92: 6746 beqs 47ada <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47a94: 202a 00c4 movel %a2@(196),%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; 47a98: 42aa 0100 clrl %a2@(256) if ( the_thread->Start.fp_context ) 47a9c: 4a80 tstl %d0 47a9e: 670a beqs 47aaa <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47aa0: 2f00 movel %d0,%sp@- 47aa2: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47aa8: 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 ); 47aaa: 2f0a movel %a2,%sp@- 47aac: 4eb9 0004 8814 jsr 48814 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47ab2: 202a 0114 movel %a2@(276),%d0 47ab6: 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; 47ab8: 42aa 00c8 clrl %a2@(200) if ( the_thread->extensions ) 47abc: 4a80 tstl %d0 47abe: 670a beqs 47aca <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47ac0: 2f00 movel %d0,%sp@- 47ac2: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47ac8: 588f addql #4,%sp the_thread->extensions = NULL; 47aca: 42aa 0114 clrl %a2@(276) } 47ace: 246e fff8 moveal %fp@(-8),%a2 47ad2: 266e fffc moveal %fp@(-4),%a3 47ad6: 4e5e unlk %fp 47ad8: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47ada: 42b9 0005 da4e clrl 5da4e <_Thread_Allocated_fp> 47ae0: 60b2 bras 47a94 <_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 ); 47ae2: 486a 0048 pea %a2@(72) 47ae6: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 47aec: 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 ) ) 47aee: b5f9 0005 da4e cmpal 5da4e <_Thread_Allocated_fp>,%a2 47af4: 669e bnes 47a94 <_Thread_Close+0x78> <== ALWAYS TAKEN 47af6: 60e2 bras 47ada <_Thread_Close+0xbe> <== NOT EXECUTED =============================================================================== 00047ba8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 47ba8: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47bac: 486e fffc pea %fp@(-4) 47bb0: 2f2e 0008 movel %fp@(8),%sp@- 47bb4: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 47bba: 508f addql #8,%sp 47bbc: 4aae fffc tstl %fp@(-4) 47bc0: 661e bnes 47be0 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 47bc2: 2f3c 1000 0018 movel #268435480,%sp@- 47bc8: 2f00 movel %d0,%sp@- 47bca: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 47bd0: 508f addql #8,%sp 47bd2: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47bd8: 5380 subql #1,%d0 47bda: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 47be0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047be4 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 47be4: 4e56 ffc8 linkw %fp,#-56 47be8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 47bec: 2e3c 0000 0700 movel #1792,%d7 47bf2: 2007 movel %d7,%d0 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 47bf4: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2 _ISR_Disable( level ); 47bfa: 40c1 movew %sr,%d1 47bfc: 8081 orl %d1,%d0 47bfe: 46c0 movew %d0,%sr while ( _Context_Switch_necessary == true ) { 47c00: 1039 0005 da92 moveb 5da92 <_Context_Switch_necessary>,%d0 47c06: 6700 00fa beqw 47d02 <_Thread_Dispatch+0x11e> 47c0a: 260e movel %fp,%d3 47c0c: 240e movel %fp,%d2 47c0e: 5183 subql #8,%d3 47c10: 2c3c 0004 b2e0 movel #307936,%d6 47c16: 0682 ffff fff0 addil #-16,%d2 47c1c: 2a3c 0004 8b1c movel #297756,%d5 47c22: 283c 0004 8ad4 movel #297684,%d4 47c28: 4bf9 0004 8ddc lea 48ddc <_User_extensions_Thread_switch>,%a5 47c2e: 49f9 0004 9150 lea 49150 <_CPU_Context_switch>,%a4 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 47c34: 7001 moveq #1,%d0 47c36: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 47c3c: 2679 0005 da56 moveal 5da56 <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 47c42: 4200 clrb %d0 _Thread_Executing = heir; 47c44: 23cb 0005 da82 movel %a3,5da82 <_Thread_Executing> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 47c4a: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 47c50: 7001 moveq #1,%d0 47c52: b0ab 007a cmpl %a3@(122),%d0 47c56: 6700 00d6 beqw 47d2e <_Thread_Dispatch+0x14a> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 47c5a: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47c5c: 2f03 movel %d3,%sp@- 47c5e: 2046 moveal %d6,%a0 47c60: 4e90 jsr %a0@ _Timestamp_Subtract( 47c62: 2045 moveal %d5,%a0 47c64: 2f02 movel %d2,%sp@- 47c66: 2f03 movel %d3,%sp@- 47c68: 4879 0005 da8a pea 5da8a <_Thread_Time_of_last_context_switch> 47c6e: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47c70: 2044 moveal %d4,%a0 47c72: 2f02 movel %d2,%sp@- 47c74: 486a 0082 pea %a2@(130) 47c78: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47c7a: 2079 0005 da52 moveal 5da52 <_Thread_libc_reent>,%a0 47c80: 4fef 0018 lea %sp@(24),%sp &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 47c84: 202e fff8 movel %fp@(-8),%d0 47c88: 222e fffc movel %fp@(-4),%d1 47c8c: 23c0 0005 da8a movel %d0,5da8a <_Thread_Time_of_last_context_switch> 47c92: 23c1 0005 da8e movel %d1,5da8e <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47c98: 4a88 tstl %a0 47c9a: 6708 beqs 47ca4 <_Thread_Dispatch+0xc0> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 47c9c: 2550 0104 movel %a0@,%a2@(260) *_Thread_libc_reent = heir->libc_reent; 47ca0: 20ab 0104 movel %a3@(260),%a0@ } _User_extensions_Thread_switch( executing, heir ); 47ca4: 2f0b movel %a3,%sp@- 47ca6: 2f0a movel %a2,%sp@- 47ca8: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47caa: 486b 00cc pea %a3@(204) 47cae: 486a 00cc pea %a2@(204) 47cb2: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 47cb4: 4fef 0010 lea %sp@(16),%sp 47cb8: 4aaa 0100 tstl %a2@(256) 47cbc: 672c beqs 47cea <_Thread_Dispatch+0x106> #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 ); 47cbe: 2079 0005 da4e moveal 5da4e <_Thread_Allocated_fp>,%a0 47cc4: b1ca cmpal %a2,%a0 47cc6: 6722 beqs 47cea <_Thread_Dispatch+0x106> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 47cc8: 4a88 tstl %a0 47cca: 670c beqs 47cd8 <_Thread_Dispatch+0xf4> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 47ccc: 4868 0100 pea %a0@(256) 47cd0: 4eb9 0004 9286 jsr 49286 <_CPU_Context_save_fp> 47cd6: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 47cd8: 486a 0100 pea %a2@(256) 47cdc: 4eb9 0004 92be jsr 492be <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 47ce2: 588f addql #4,%sp 47ce4: 23ca 0005 da4e movel %a2,5da4e <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 47cea: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2 _ISR_Disable( level ); 47cf0: 2007 movel %d7,%d0 47cf2: 40c1 movew %sr,%d1 47cf4: 8081 orl %d1,%d0 47cf6: 46c0 movew %d0,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 47cf8: 1039 0005 da92 moveb 5da92 <_Context_Switch_necessary>,%d0 47cfe: 6600 ff34 bnew 47c34 <_Thread_Dispatch+0x50> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 47d02: 42b9 0005 d9c8 clrl 5d9c8 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 47d08: 46c1 movew %d1,%sr if ( _Thread_Do_post_task_switch_extension || 47d0a: 4ab9 0005 da6a tstl 5da6a <_Thread_Do_post_task_switch_extension> 47d10: 6606 bnes 47d18 <_Thread_Dispatch+0x134> <== NEVER TAKEN executing->do_post_task_switch_extension ) { 47d12: 4a2a 0074 tstb %a2@(116) 47d16: 670c beqs 47d24 <_Thread_Dispatch+0x140> executing->do_post_task_switch_extension = false; 47d18: 4201 clrb %d1 47d1a: 1541 0074 moveb %d1,%a2@(116) _API_extensions_Run_postswitch(); 47d1e: 4eb9 0004 65f4 jsr 465f4 <_API_extensions_Run_postswitch> } } 47d24: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47d2a: 4e5e unlk %fp 47d2c: 4e75 rts #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 47d2e: 41f9 0005 d978 lea 5d978 <_Thread_Ticks_per_timeslice>,%a0 47d34: 2750 0076 movel %a0@,%a3@(118) 47d38: 6000 ff20 braw 47c5a <_Thread_Dispatch+0x76> =============================================================================== 00047d3c <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 47d3c: 4e56 0000 linkw %fp,#0 if ( --_Thread_Dispatch_disable_level ) 47d40: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47d46: 5380 subql #1,%d0 47d48: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 47d4e: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47d54: 6704 beqs 47d5a <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 47d56: 4e5e unlk %fp 47d58: 4e75 rts 47d5a: 4e5e unlk %fp (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 47d5c: 4ef9 0004 7be4 jmp 47be4 <_Thread_Dispatch> ... =============================================================================== 0004d1d8 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4d1d8: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4d1dc: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4d1e2: 4aa8 0010 tstl %a0@(16) 4d1e6: 660e bnes 4d1f6 <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN 4d1e8: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 4d1ee: 6712 beqs 4d202 <_Thread_Evaluate_mode+0x2a> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4d1f0: 4a28 0075 tstb %a0@(117) 4d1f4: 670c beqs 4d202 <_Thread_Evaluate_mode+0x2a> <== NEVER TAKEN _Context_Switch_necessary = true; return true; } return false; } 4d1f6: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; 4d1f8: 7001 moveq #1,%d0 4d1fa: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> return true; } return false; } 4d200: 4e75 rts 4d202: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 4d204: 4200 clrb %d0 <== NOT EXECUTED } return false; } =============================================================================== 0004d208 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d208: 4e56 0000 linkw %fp,#0 4d20c: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4d20e: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d214: 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; 4d216: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4d21a: 40c0 movew %sr,%d0 4d21c: e189 lsll #8,%d1 4d21e: 0280 0000 f8ff andil #63743,%d0 4d224: 8081 orl %d1,%d0 4d226: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4d228: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4d22a: 1439 0005 d17c moveb 5d17c ,%d2 doneConstructors = 1; 4d230: 13c0 0005 d17c moveb %d0,5d17c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4d236: 4aaa 0100 tstl %a2@(256) 4d23a: 6720 beqs 4d25c <_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 ); 4d23c: 2079 0005 da4e moveal 5da4e <_Thread_Allocated_fp>,%a0 4d242: b1ca cmpal %a2,%a0 4d244: 6716 beqs 4d25c <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4d246: 4a88 tstl %a0 4d248: 670c beqs 4d256 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4d24a: 4868 0100 pea %a0@(256) 4d24e: 4eb9 0004 9286 jsr 49286 <_CPU_Context_save_fp> 4d254: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4d256: 23ca 0005 da4e movel %a2,5da4e <_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 ); 4d25c: 2f0a movel %a2,%sp@- 4d25e: 4eb9 0004 8c34 jsr 48c34 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4d264: 4eb9 0004 7d3c jsr 47d3c <_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) */ { 4d26a: 588f addql #4,%sp 4d26c: 4a02 tstb %d2 4d26e: 6746 beqs 4d2b6 <_Thread_Handler+0xae> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d270: 4aaa 009e tstl %a2@(158) 4d274: 6718 beqs 4d28e <_Thread_Handler+0x86> <== ALWAYS TAKEN * 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 ); 4d276: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d278: 4eb9 0004 8c72 jsr 48c72 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4d27e: 4878 0006 pea 6 <== NOT EXECUTED 4d282: 4878 0001 pea 1 <== NOT EXECUTED 4d286: 42a7 clrl %sp@- <== NOT EXECUTED 4d288: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4d28e: 2f2a 00a6 movel %a2@(166),%sp@- 4d292: 206a 009a moveal %a2@(154),%a0 4d296: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4d298: 588f addql #4,%sp 4d29a: 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 ); 4d29e: 2f0a movel %a2,%sp@- 4d2a0: 4eb9 0004 8c72 jsr 48c72 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4d2a6: 4878 0006 pea 6 4d2aa: 4878 0001 pea 1 4d2ae: 42a7 clrl %sp@- 4d2b0: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> * _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 (); 4d2b6: 4eb9 0005 a8c4 jsr 5a8c4 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d2bc: 4aaa 009e tstl %a2@(158) 4d2c0: 66b4 bnes 4d276 <_Thread_Handler+0x6e> <== NEVER TAKEN 4d2c2: 60ca bras 4d28e <_Thread_Handler+0x86> =============================================================================== 00047fd0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 47fd0: 4e56 0000 linkw %fp,#0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 47fd4: 4ab9 0005 c2b8 tstl 5c2b8 47fda: 57c0 seq %d0 47fdc: 4ab9 0005 c2b4 tstl 5c2b4 47fe2: 57c1 seq %d1 47fe4: 4480 negl %d0 47fe6: 4481 negl %d1 47fe8: b380 eorl %d1,%d0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 47fea: 2239 0005 c2a4 movel 5c2a4 ,%d1 maximum_extensions = Configuration.maximum_extensions; 47ff0: 2079 0005 c29c moveal 5c29c ,%a0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 47ff6: 2f02 movel %d2,%sp@- #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 47ff8: 4a00 tstb %d0 47ffa: 6600 00a2 bnew 4809e <_Thread_Handler_initialization+0xce> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 47ffe: 4280 clrl %d0 48000: 1039 0005 c292 moveb 5c292 ,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48006: 4282 clrl %d2 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48008: 5280 addql #1,%d0 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4800a: 23c1 0005 d978 movel %d1,5d978 <_Thread_Ticks_per_timeslice> _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48010: 2200 movel %d0,%d1 48012: e588 lsll #2,%d0 48014: e989 lsll #4,%d1 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 48016: 23c8 0005 da66 movel %a0,5da66 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 4801c: 9280 subl %d0,%d1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 4801e: 4200 clrb %d0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48020: 2f01 movel %d1,%sp@- INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 48022: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> _Thread_Executing = NULL; 48028: 42b9 0005 da82 clrl 5da82 <_Thread_Executing> _Thread_Heir = NULL; 4802e: 42b9 0005 da56 clrl 5da56 <_Thread_Heir> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 48034: 42b9 0005 da4e clrl 5da4e <_Thread_Allocated_fp> #endif _Thread_Do_post_task_switch_extension = 0; 4803a: 42b9 0005 da6a clrl 5da6a <_Thread_Do_post_task_switch_extension> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48040: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error> (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48046: 588f addql #4,%sp 48048: 1439 0005 c292 moveb 5c292 ,%d2 4804e: 2040 moveal %d0,%a0 48050: 4281 clrl %d1 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48052: 23c0 0005 d974 movel %d0,5d974 <_Thread_Ready_chain> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48058: 2008 movel %a0,%d0 4805a: 5880 addql #4,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4805c: 5281 addql #1,%d1 4805e: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 48060: 42a8 0004 clrl %a0@(4) the_chain->last = _Chain_Head(the_chain); 48064: 2148 0008 movel %a0,%a0@(8) 48068: 41e8 000c lea %a0@(12),%a0 4806c: b481 cmpl %d1,%d2 4806e: 64e8 bccs 48058 <_Thread_Handler_initialization+0x88> /* * Initialize this class of objects. */ _Objects_Initialize_information( 48070: 4878 0008 pea 8 48074: 42a7 clrl %sp@- 48076: 4878 011c pea 11c 4807a: 4878 0001 pea 1 4807e: 4878 0001 pea 1 48082: 4878 0001 pea 1 48086: 4879 0005 db12 pea 5db12 <_Thread_Internal_information> 4808c: 4eb9 0004 753c jsr 4753c <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 48092: 242e fffc movel %fp@(-4),%d2 /* * Initialize this class of objects. */ _Objects_Initialize_information( 48096: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4809a: 4e5e unlk %fp 4809c: 4e75 rts * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 4809e: 4878 000f pea f 480a2: 4878 0001 pea 1 480a6: 42a7 clrl %sp@- 480a8: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... =============================================================================== 00047e00 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e00: 4e56 ffec linkw %fp,#-20 47e04: 48d7 043c moveml %d2-%d5/%a2,%sp@ 47e08: 242e 0014 movel %fp@(20),%d2 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 47e0c: 2f02 movel %d2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e0e: 246e 000c moveal %fp@(12),%a2 47e12: 282e 0018 movel %fp@(24),%d4 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47e16: 42aa 0108 clrl %a2@(264) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e1a: 262e 001c movel %fp@(28),%d3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47e1e: 42aa 010c clrl %a2@(268) 47e22: 42aa 0110 clrl %a2@(272) extensions_area = NULL; the_thread->libc_reent = NULL; 47e26: 42aa 0104 clrl %a2@(260) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 47e2a: 2f0a movel %a2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e2c: 1a2e 0023 moveb %fp@(35),%d5 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 47e30: 4eb9 0004 87b0 jsr 487b0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 47e36: 508f addql #8,%sp 47e38: 4a80 tstl %d0 47e3a: 6700 011e beqw 47f5a <_Thread_Initialize+0x15a> 47e3e: b082 cmpl %d2,%d0 47e40: 6500 0118 bcsw 47f5a <_Thread_Initialize+0x15a> void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size; 47e44: 2540 00bc movel %d0,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 47e48: 256a 00c8 00c0 movel %a2@(200),%a2@(192) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 47e4e: 4a04 tstb %d4 47e50: 6600 0120 bnew 47f72 <_Thread_Initialize+0x172> 47e54: 4280 clrl %d0 47e56: 4284 clrl %d4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47e58: 2239 0005 da66 movel 5da66 <_Thread_Maximum_extensions>,%d1 if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 47e5e: 2540 00c4 movel %d0,%a2@(196) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 47e62: 2540 0100 movel %d0,%a2@(256) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47e66: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 47e6a: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 47e6e: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 47e72: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47e76: 4a81 tstl %d1 47e78: 6600 011a bnew 47f94 <_Thread_Initialize+0x194> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47e7c: 42aa 0114 clrl %a2@(276) 47e80: 4282 clrl %d2 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 47e82: 2f03 movel %d3,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 47e84: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 47e8a: 7001 moveq #1,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 47e8c: 256e 0024 00ac movel %fp@(36),%a2@(172) the_thread->Start.budget_callout = budget_callout; 47e92: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 47e98: 1545 00aa moveb %d5,%a2@(170) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 47e9c: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47e9e: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 47ea2: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 47ea6: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 47eaa: 2543 0018 movel %d3,%a2@(24) the_thread->Start.initial_priority = priority; 47eae: 2543 00b8 movel %d3,%a2@(184) _Thread_Set_priority( the_thread, priority ); 47eb2: 4eb9 0004 85a8 jsr 485a8 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47eb8: 206e 0008 moveal %fp@(8),%a0 47ebc: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 47ebe: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47ec4: 2068 0018 moveal %a0@(24),%a0 47ec8: 302a 000a movew %a2@(10),%d0 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 47ecc: 42aa 0082 clrl %a2@(130) 47ed0: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 47ed4: 42aa 0086 clrl %a2@(134) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 47ed8: 2f0a movel %a2,%sp@- 47eda: 4eb9 0004 8d04 jsr 48d04 <_User_extensions_Thread_create> if ( extension_status ) 47ee0: 4fef 000c lea %sp@(12),%sp 47ee4: 4a00 tstb %d0 47ee6: 667e bnes 47f66 <_Thread_Initialize+0x166> return true; failed: if ( the_thread->libc_reent ) 47ee8: 202a 0104 movel %a2@(260),%d0 47eec: 670a beqs 47ef8 <_Thread_Initialize+0xf8> _Workspace_Free( the_thread->libc_reent ); 47eee: 2f00 movel %d0,%sp@- 47ef0: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47ef6: 588f addql #4,%sp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 47ef8: 202a 0108 movel %a2@(264),%d0 47efc: 670a beqs 47f08 <_Thread_Initialize+0x108> _Workspace_Free( the_thread->API_Extensions[i] ); 47efe: 2f00 movel %d0,%sp@- 47f00: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f06: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 47f08: 202a 010c movel %a2@(268),%d0 47f0c: 670a beqs 47f18 <_Thread_Initialize+0x118> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 47f0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47f10: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> <== NOT EXECUTED 47f16: 588f addql #4,%sp <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 47f18: 202a 0110 movel %a2@(272),%d0 47f1c: 670a beqs 47f28 <_Thread_Initialize+0x128> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 47f1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47f20: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> <== NOT EXECUTED 47f26: 588f addql #4,%sp <== NOT EXECUTED if ( extensions_area ) 47f28: 4a82 tstl %d2 47f2a: 670a beqs 47f36 <_Thread_Initialize+0x136> (void) _Workspace_Free( extensions_area ); 47f2c: 2f02 movel %d2,%sp@- 47f2e: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f34: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 47f36: 4a84 tstl %d4 47f38: 670a beqs 47f44 <_Thread_Initialize+0x144> (void) _Workspace_Free( fp_area ); 47f3a: 2f04 movel %d4,%sp@- 47f3c: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f42: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 47f44: 2f0a movel %a2,%sp@- 47f46: 4eb9 0004 8814 jsr 48814 <_Thread_Stack_Free> return false; 47f4c: 588f addql #4,%sp } 47f4e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 47f54: 4200 clrb %d0 return false; } 47f56: 4e5e unlk %fp 47f58: 4e75 rts 47f5a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 47f60: 4200 clrb %d0 } 47f62: 4e5e unlk %fp 47f64: 4e75 rts 47f66: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 47f6c: 7001 moveq #1,%d0 _Thread_Stack_Free( the_thread ); return false; } 47f6e: 4e5e unlk %fp 47f70: 4e75 rts /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 47f72: 4878 001c pea 1c 47f76: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate> if ( !fp_area ) 47f7c: 588f addql #4,%sp /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 47f7e: 2800 movel %d0,%d4 if ( !fp_area ) 47f80: 6600 fed6 bnew 47e58 <_Thread_Initialize+0x58> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 47f84: 202a 0104 movel %a2@(260),%d0 * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 47f88: 4282 clrl %d2 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 47f8a: 4a80 tstl %d0 47f8c: 6600 ff60 bnew 47eee <_Thread_Initialize+0xee> 47f90: 6000 ff66 braw 47ef8 <_Thread_Initialize+0xf8> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 47f94: e589 lsll #2,%d1 47f96: 2041 moveal %d1,%a0 47f98: 4868 0004 pea %a0@(4) 47f9c: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47fa2: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 47fa4: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47fa6: 6700 ff40 beqw 47ee8 <_Thread_Initialize+0xe8> goto failed; } the_thread->extensions = (void **) extensions_area; 47faa: 2040 moveal %d0,%a0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 47fac: 4281 clrl %d1 47fae: 4280 clrl %d0 47fb0: 2279 0005 da66 moveal 5da66 <_Thread_Maximum_extensions>,%a1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47fb6: 2542 0114 movel %d2,%a2@(276) * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 47fba: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 47fbe: 5280 addql #1,%d0 47fc0: 2200 movel %d0,%d1 47fc2: b089 cmpl %a1,%d0 47fc4: 6200 febc bhiw 47e82 <_Thread_Initialize+0x82> 47fc8: 206a 0114 moveal %a2@(276),%a0 47fcc: 60ec bras 47fba <_Thread_Initialize+0x1ba> ... =============================================================================== 0004c7bc <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4c7bc: 4e56 0000 linkw %fp,#0 4c7c0: 2f0a movel %a2,%sp@- 4c7c2: 246e 0008 moveal %fp@(8),%a2 the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; 4c7c6: 256e 0010 00a6 movel %fp@(16),%a2@(166) the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4c7cc: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4c7d2: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4c7d8: 256e 000c 00a2 movel %fp@(12),%a2@(162) { the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 4c7de: 156a 00aa 0075 moveb %a2@(170),%a2@(117) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4c7e4: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4c7e8: 2f0a movel %a2,%sp@- 4c7ea: 4eb9 0004 9038 jsr 49038 <_Thread_queue_Extract_with_proxy> 4c7f0: 588f addql #4,%sp 4c7f2: 4a00 tstb %d0 4c7f4: 6608 bnes 4c7fe <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4c7f6: 7002 moveq #2,%d0 4c7f8: b0aa 0050 cmpl %a2@(80),%d0 4c7fc: 672a beqs 4c828 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4c7fe: 202a 00b8 movel %a2@(184),%d0 4c802: b0aa 0014 cmpl %a2@(20),%d0 4c806: 6718 beqs 4c820 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4c808: 2d4a 0008 movel %a2,%fp@(8) 4c80c: 2d40 000c movel %d0,%fp@(12) if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; 4c810: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4c814: 246e fffc moveal %fp@(-4),%a2 4c818: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4c81a: 4ef9 0004 9248 jmp 49248 <_Thread_Set_priority> } } 4c820: 246e fffc moveal %fp@(-4),%a2 4c824: 4e5e unlk %fp 4c826: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4c828: 486a 0048 pea %a2@(72) 4c82c: 4eb9 0004 9c48 jsr 49c48 <_Watchdog_Remove> 4c832: 588f addql #4,%sp 4c834: 60c8 bras 4c7fe <_Thread_Reset+0x42> ... =============================================================================== 0004bad8 <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4bad8: 223c 0000 0700 movel #1792,%d1 4bade: 2001 movel %d1,%d0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4bae0: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4bae4: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4baea: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4baee: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4baf2: 40c2 movew %sr,%d2 4baf4: 8082 orl %d2,%d0 4baf6: 46c0 movew %d0,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4baf8: 2029 0008 movel %a1@(8),%d0 4bafc: b091 cmpl %a1@,%d0 4bafe: 6752 beqs 4bb52 <_Thread_Reset_timeslice+0x7a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4bb00: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4bb02: 2009 movel %a1,%d0 4bb04: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4bb06: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4bb0a: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4bb0c: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4bb10: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4bb12: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4bb16: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4bb1a: 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; 4bb1e: 2488 movel %a0,%a2@ return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4bb20: 46c2 movew %d2,%sr 4bb22: 8282 orl %d2,%d1 4bb24: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4bb26: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 4bb2c: 6712 beqs 4bb40 <_Thread_Reset_timeslice+0x68> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4bb2e: 7001 moveq #1,%d0 <== NOT EXECUTED 4bb30: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4bb36: 46c2 movew %d2,%sr <== NOT EXECUTED } 4bb38: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bb3c: 4e5e unlk %fp 4bb3e: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4bb40: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir> _Context_Switch_necessary = true; 4bb46: 7001 moveq #1,%d0 4bb48: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> _ISR_Enable( level ); 4bb4e: 46c2 movew %d2,%sr 4bb50: 60e6 bras 4bb38 <_Thread_Reset_timeslice+0x60> executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4bb52: 46c2 movew %d2,%sr _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 4bb54: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bb58: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000491bc <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 491bc: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 491be: 4e56 0000 linkw %fp,#0 491c2: 2f0a movel %a2,%sp@- 491c4: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 491c8: c0aa 0010 andl %a2@(16),%d0 491cc: 4a00 tstb %d0 491ce: 670a beqs 491da <_Thread_Restart+0x1e> return true; } return false; } 491d0: 246e fffc moveal %fp@(-4),%a2 491d4: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 491d6: 4200 clrb %d0 return true; } return false; } 491d8: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 491da: 2f0a movel %a2,%sp@- 491dc: 4eb9 0004 93cc jsr 493cc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 491e2: 2f2e 0010 movel %fp@(16),%sp@- 491e6: 2f2e 000c movel %fp@(12),%sp@- 491ea: 2f0a movel %a2,%sp@- 491ec: 4eb9 0004 c7bc jsr 4c7bc <_Thread_Reset> _Thread_Load_environment( the_thread ); 491f2: 2f0a movel %a2,%sp@- 491f4: 4eb9 0004 c410 jsr 4c410 <_Thread_Load_environment> _Thread_Ready( the_thread ); 491fa: 2f0a movel %a2,%sp@- 491fc: 4eb9 0004 c6fc jsr 4c6fc <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 49202: 2f0a movel %a2,%sp@- 49204: 4eb9 0004 9a38 jsr 49a38 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 4920a: 4fef 001c lea %sp@(28),%sp 4920e: b5f9 0005 ea1a cmpal 5ea1a <_Thread_Executing>,%a2 49214: 670a beqs 49220 <_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 ); 49216: 7001 moveq #1,%d0 return true; } return false; } 49218: 246e fffc moveal %fp@(-4),%a2 4921c: 4e5e unlk %fp 4921e: 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 ) 49220: 4aaa 0100 tstl %a2@(256) 49224: 6712 beqs 49238 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 49226: 486a 0100 pea %a2@(256) 4922a: 4eb9 0004 9fa2 jsr 49fa2 <_CPU_Context_restore_fp> 49230: 2479 0005 ea1a moveal 5ea1a <_Thread_Executing>,%a2 49236: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49238: 486a 00cc pea %a2@(204) 4923c: 4eb9 0004 9e4a jsr 49e4a <_CPU_Context_Restart_self> 49242: 588f addql #4,%sp <== NOT EXECUTED 49244: 7001 moveq #1,%d0 <== NOT EXECUTED 49246: 60d0 bras 49218 <_Thread_Restart+0x5c> <== NOT EXECUTED =============================================================================== 0004c744 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c744: 327c 0700 moveaw #1792,%a1 4c748: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c74a: 4e56 ffec linkw %fp,#-20 4c74e: 206e 0008 moveal %fp@(8),%a0 4c752: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c756: 40c1 movew %sr,%d1 4c758: 8081 orl %d1,%d0 4c75a: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c75c: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c760: 0800 0001 btst #1,%d0 4c764: 6774 beqs 4c7da <_Thread_Resume+0x96> <== NEVER TAKEN 4c766: 74fd moveq #-3,%d2 4c768: c082 andl %d2,%d0 current_state = 4c76a: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c76e: 666a bnes 4c7da <_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; 4c770: 2868 008e moveal %a0@(142),%a4 4c774: 3028 0094 movew %a0@(148),%d0 4c778: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c77a: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c77e: 260a movel %a2,%d3 4c780: 5883 addql #4,%d3 4c782: 8082 orl %d2,%d0 4c784: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c786: 266a 0008 moveal %a2@(8),%a3 4c78a: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c78c: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c790: 3439 0006 3720 movew 63720 <_Priority_Major_bit_map>,%d2 4c796: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c79a: 214b 0004 movel %a3,%a0@(4) 4c79e: 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; 4c7a0: 2688 movel %a0,%a3@ 4c7a2: 33c0 0006 3720 movew %d0,63720 <_Priority_Major_bit_map> _ISR_Flash( level ); 4c7a8: 2009 movel %a1,%d0 4c7aa: 46c1 movew %d1,%sr 4c7ac: 8081 orl %d1,%d0 4c7ae: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c7b0: 2028 0014 movel %a0@(20),%d0 4c7b4: 2279 0006 36fe moveal 636fe <_Thread_Heir>,%a1 4c7ba: b0a9 0014 cmpl %a1@(20),%d0 4c7be: 641a bccs 4c7da <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c7c0: 23c8 0006 36fe movel %a0,636fe <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c7c6: 2079 0006 372a moveal 6372a <_Thread_Executing>,%a0 4c7cc: 4a28 0075 tstb %a0@(117) 4c7d0: 6712 beqs 4c7e4 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c7d2: 7001 moveq #1,%d0 4c7d4: 13c0 0006 373a moveb %d0,6373a <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c7da: 46c1 movew %d1,%sr } 4c7dc: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c7e0: 4e5e unlk %fp 4c7e2: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c7e4: 4a80 tstl %d0 4c7e6: 66f2 bnes 4c7da <_Thread_Resume+0x96> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c7e8: 7001 moveq #1,%d0 <== NOT EXECUTED 4c7ea: 13c0 0006 373a moveb %d0,6373a <_Context_Switch_necessary> <== NOT EXECUTED 4c7f0: 60e8 bras 4c7da <_Thread_Resume+0x96> <== NOT EXECUTED ... =============================================================================== 00048814 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 48814: 4e56 0000 linkw %fp,#0 48818: 206e 0008 moveal %fp@(8),%a0 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 4881c: 2279 0005 c2b8 moveal 5c2b8 ,%a1 48822: 4a89 tstl %a1 48824: 670a beqs 48830 <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 48826: 2d68 00c0 0008 movel %a0@(192),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 4882c: 4e5e unlk %fp * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 4882e: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 48830: 2d68 00c0 0008 movel %a0@(192),%fp@(8) } 48836: 4e5e unlk %fp */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 48838: 4ef9 0004 90d0 jmp 490d0 <_Workspace_Free> ... =============================================================================== 000488e8 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 488e8: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Suspend( Thread_Control *the_thread ) { 488ee: 4e56 fff4 linkw %fp,#-12 488f2: 206e 0008 moveal %fp@(8),%a0 488f6: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 488fa: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 488fe: 40c1 movew %sr,%d1 48900: 8081 orl %d1,%d0 48902: 46c0 movew %d0,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 48904: 2028 0010 movel %a0@(16),%d0 48908: 6642 bnes 4894c <_Thread_Suspend+0x64> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 4890a: 7002 moveq #2,%d0 if ( _Chain_Has_only_one_node( ready ) ) { 4890c: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 48910: 2140 0010 movel %d0,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 48914: b491 cmpl %a1@,%d2 48916: 6700 0098 beqw 489b0 <_Thread_Suspend+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4891a: 2250 moveal %a0@,%a1 previous = the_node->previous; 4891c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48920: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48922: 234a 0004 movel %a2,%a1@(4) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 48926: 203c 0000 0700 movel #1792,%d0 4892c: 46c1 movew %d1,%sr 4892e: 8081 orl %d1,%d0 48930: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48932: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 48938: 6730 beqs 4896a <_Thread_Suspend+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 4893a: b1f9 0005 da82 cmpal 5da82 <_Thread_Executing>,%a0 48940: 671c beqs 4895e <_Thread_Suspend+0x76> <== NEVER TAKEN _Context_Switch_necessary = true; _ISR_Enable( level ); 48942: 46c1 movew %d1,%sr } 48944: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48948: 4e5e unlk %fp 4894a: 4e75 rts _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 4894c: 7402 moveq #2,%d2 4894e: 8480 orl %d0,%d2 48950: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 48954: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 48956: 4cd7 040c moveml %sp@,%d2-%d3/%a2 4895a: 4e5e unlk %fp 4895c: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 4895e: 7401 moveq #1,%d2 48960: 13c2 0005 da92 moveb %d2,5da92 <_Context_Switch_necessary> _ISR_Enable( level ); 48966: 46c1 movew %d1,%sr 48968: 60da bras 48944 <_Thread_Suspend+0x5c> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 4896a: 3039 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d0 48970: 4840 swap %d0 48972: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 48974: 4282 clrl %d2 48976: 43f9 0005 dae4 lea 5dae4 <_Priority_Bit_map>,%a1 4897c: 3400 movew %d0,%d2 4897e: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 48982: 4840 swap %d0 48984: 04c0 ff1 %d0 48986: 4283 clrl %d3 48988: e98a lsll #4,%d2 4898a: 3600 movew %d0,%d3 4898c: 2279 0005 d974 moveal 5d974 <_Thread_Ready_chain>,%a1 48992: 2002 movel %d2,%d0 48994: d083 addl %d3,%d0 48996: 2400 movel %d0,%d2 48998: e58a lsll #2,%d2 4899a: e988 lsll #4,%d0 4899c: 93c2 subal %d2,%a1 4899e: d3c0 addal %d0,%a1 489a0: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 489a6: b1f9 0005 da82 cmpal 5da82 <_Thread_Executing>,%a0 489ac: 6694 bnes 48942 <_Thread_Suspend+0x5a> <== NEVER TAKEN 489ae: 60ae bras 4895e <_Thread_Suspend+0x76> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 489b0: 2009 movel %a1,%d0 489b2: 5880 addql #4,%d0 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 489b4: 2468 008e moveal %a0@(142),%a2 489b8: 2280 movel %d0,%a1@ 489ba: 3412 movew %a2@,%d2 489bc: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 489c0: 2349 0008 movel %a1,%a1@(8) 489c4: c082 andl %d2,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 489c6: 42a9 0004 clrl %a1@(4) 489ca: 3480 movew %d0,%a2@ the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 489cc: 6600 ff58 bnew 48926 <_Thread_Suspend+0x3e> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 489d0: 3439 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d2 489d6: 3028 0096 movew %a0@(150),%d0 489da: c082 andl %d2,%d0 489dc: 33c0 0005 da78 movew %d0,5da78 <_Priority_Major_bit_map> } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 489e2: 203c 0000 0700 movel #1792,%d0 489e8: 46c1 movew %d1,%sr 489ea: 8081 orl %d1,%d0 489ec: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 489ee: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 489f4: 6600 ff44 bnew 4893a <_Thread_Suspend+0x52> 489f8: 6000 ff70 braw 4896a <_Thread_Suspend+0x82> =============================================================================== 00048a48 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a48: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48a4c: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a52: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48a56: 243c 0000 0700 movel #1792,%d2 48a5c: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48a5e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48a62: 40c1 movew %sr,%d1 48a64: 8081 orl %d1,%d0 48a66: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48a68: 2029 0008 movel %a1@(8),%d0 48a6c: b091 cmpl %a1@,%d0 48a6e: 6750 beqs 48ac0 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48a70: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a72: 2009 movel %a1,%d0 48a74: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48a76: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48a7a: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48a7c: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a80: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48a82: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48a86: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48a8a: 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; 48a8e: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48a90: 46c1 movew %d1,%sr 48a92: 8481 orl %d1,%d2 48a94: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48a96: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 48a9c: 6712 beqs 48ab0 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48a9e: 7001 moveq #1,%d0 <== NOT EXECUTED 48aa0: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48aa6: 46c1 movew %d1,%sr } 48aa8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48aac: 4e5e unlk %fp 48aae: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48ab0: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48ab6: 7001 moveq #1,%d0 48ab8: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> 48abe: 60e6 bras 48aa6 <_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 ) ) 48ac0: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 48ac6: 67de beqs 48aa6 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN _Context_Switch_necessary = true; 48ac8: 7001 moveq #1,%d0 <== NOT EXECUTED 48aca: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED 48ad0: 60d4 bras 48aa6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... =============================================================================== 000477b4 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 477b4: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 477b6: 4e56 0000 linkw %fp,#0 477ba: 202e 0010 movel %fp@(16),%d0 477be: 2f0a movel %a2,%sp@- 477c0: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 477c4: 42aa 0044 clrl %a2@(68) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 477c8: b2aa 0050 cmpl %a2@(80),%d1 477cc: 671c beqs 477ea <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 477ce: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 477d0: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 203c 1003 fff8 movel #268697592,%d0 477de: 2d40 000c movel %d0,%fp@(12) 477e2: 4e5e unlk %fp 477e4: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 477ea: 123c 0003 moveb #3,%d1 477ee: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 477f2: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 477f4: 486a 0048 pea %a2@(72) 477f8: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 477fe: 588f addql #4,%sp 47800: 203c 1003 fff8 movel #268697592,%d0 47806: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4780a: 246e fffc moveal %fp@(-4),%a2 4780e: 2d40 000c movel %d0,%fp@(12) 47812: 4e5e unlk %fp 47814: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... =============================================================================== 000482ac <_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 ) { 482ac: 4e56 ffe4 linkw %fp,#-28 482b0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 482b4: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 482b8: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 482bc: 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; 482c2: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482c6: 2401 movel %d1,%d2 482c8: ec8a lsrl #6,%d2 482ca: 2002 movel %d2,%d0 482cc: e58a lsll #2,%d2 482ce: 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 ) { 482d0: 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 ]; 482d4: 9082 subl %d2,%d0 482d6: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 482da: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 482de: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 482e2: 242c 0038 movel %a4@(56),%d2 482e6: 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; 482ea: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 482ee: 0801 0005 btst #5,%d1 482f2: 6656 bnes 4834a <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 482f4: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 482f6: 2803 movel %d3,%d4 482f8: 5885 addql #4,%d5 482fa: 2004 movel %d4,%d0 482fc: 40c3 movew %sr,%d3 482fe: 8083 orl %d3,%d0 48300: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 48302: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48304: ba88 cmpl %a0,%d5 48306: 6700 010a beqw 48412 <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 4830a: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 4830e: b3c1 cmpal %d1,%a1 48310: 6418 bccs 4832a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48312: 2004 movel %d4,%d0 48314: 46c3 movew %d3,%sr 48316: 8083 orl %d3,%d0 48318: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4831a: 2002 movel %d2,%d0 4831c: c0a8 0010 andl %a0@(16),%d0 48320: 6700 0092 beqw 483b4 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48324: 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 ) ) { 48326: ba88 cmpl %a0,%d5 48328: 66e0 bnes 4830a <_Thread_queue_Enqueue_priority+0x5e> 4832a: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4832c: 7001 moveq #1,%d0 4832e: b0ac 0030 cmpl %a4@(48),%d0 48332: 6700 0094 beqw 483c8 <_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; 48336: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 4833a: 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; 4833e: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48340: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48344: 4e5e unlk %fp 48346: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48348: 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; 4834a: 4284 clrl %d4 4834c: 1839 0005 c292 moveb 5c292 ,%d4 _ISR_Disable( level ); 48352: 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; 48354: 2244 moveal %d4,%a1 48356: 5289 addql #1,%a1 _ISR_Disable( level ); 48358: 40c4 movew %sr,%d4 4835a: 8084 orl %d4,%d0 4835c: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 4835e: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48362: b5c8 cmpal %a0,%a2 48364: 6720 beqs 48386 <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 48366: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 4836a: b3c1 cmpal %d1,%a1 4836c: 6318 blss 48386 <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4836e: 2003 movel %d3,%d0 48370: 46c4 movew %d4,%sr 48372: 8084 orl %d4,%d0 48374: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48376: 2002 movel %d2,%d0 48378: c0a8 0010 andl %a0@(16),%d0 4837c: 67ca beqs 48348 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4837e: 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 ) ) { 48382: b5c8 cmpal %a0,%a2 48384: 66e0 bnes 48366 <_Thread_queue_Enqueue_priority+0xba> 48386: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48388: 7001 moveq #1,%d0 4838a: b0ac 0030 cmpl %a4@(48),%d0 4838e: 66a6 bnes 48336 <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48390: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48394: b3c1 cmpal %d1,%a1 48396: 6756 beqs 483ee <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48398: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4839a: 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; 4839e: 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; 483a0: 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; 483a4: 208b movel %a3,%a0@ next_node->previous = the_node; 483a6: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483aa: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483ac: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483b0: 4e5e unlk %fp 483b2: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 483b4: 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 ); 483b6: 2004 movel %d4,%d0 <== NOT EXECUTED 483b8: 40c3 movew %sr,%d3 <== NOT EXECUTED 483ba: 8083 orl %d3,%d0 <== NOT EXECUTED 483bc: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 483be: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 483c0: ba88 cmpl %a0,%d5 <== NOT EXECUTED 483c2: 6600 ff46 bnew 4830a <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 483c6: 604a bras 48412 <_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; 483c8: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 483cc: b3c1 cmpal %d1,%a1 483ce: 671e beqs 483ee <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 483d0: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483d4: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483d6: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483da: 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; 483de: 228b movel %a3,%a1@ search_node->previous = the_node; 483e0: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483e4: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483e6: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483ea: 4e5e unlk %fp 483ec: 4e75 rts 483ee: 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; 483f2: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483f6: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483f8: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483fc: 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; 48400: 228b movel %a3,%a1@ search_node->previous = the_node; 48402: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 48406: 46c2 movew %d2,%sr 48408: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4840a: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4840e: 4e5e unlk %fp 48410: 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 ) ) { 48412: 2403 movel %d3,%d2 48414: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48418: 7001 moveq #1,%d0 4841a: b0ac 0030 cmpl %a4@(48),%d0 4841e: 6600 ff16 bnew 48336 <_Thread_queue_Enqueue_priority+0x8a> 48422: 60a4 bras 483c8 <_Thread_queue_Enqueue_priority+0x11c> =============================================================================== 00048210 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48210: 4e56 fff0 linkw %fp,#-16 48214: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48218: 266e 0008 moveal %fp@(8),%a3 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4821c: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 48220: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48226: 242e 000c movel %fp@(12),%d2 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4822a: 2f0a movel %a2,%sp@- 4822c: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 48232: 508f addql #8,%sp 48234: 4a82 tstl %d2 48236: 6644 bnes 4827c <_Thread_queue_Enqueue_with_handler+0x6c> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 48238: 41f9 0004 82ac lea 482ac <_Thread_queue_Enqueue_priority>,%a0 4823e: 7001 moveq #1,%d0 48240: b0ab 0034 cmpl %a3@(52),%d0 48244: 6706 beqs 4824c <_Thread_queue_Enqueue_with_handler+0x3c> 48246: 41f9 0004 b84c lea 4b84c <_Thread_queue_Enqueue_fifo>,%a0 enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 4824c: 486e fffc pea %fp@(-4) 48250: 2f0a movel %a2,%sp@- 48252: 2f0b movel %a3,%sp@- 48254: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 48256: 4fef 000c lea %sp@(12),%sp 4825a: 7201 moveq #1,%d1 4825c: b280 cmpl %d0,%d1 4825e: 6712 beqs 48272 <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 48260: 2f2e fffc movel %fp@(-4),%sp@- 48264: 2f0a movel %a2,%sp@- 48266: 2f00 movel %d0,%sp@- 48268: 4eb9 0004 77b4 jsr 477b4 <_Thread_blocking_operation_Cancel> 4826e: 4fef 000c lea %sp@(12),%sp } 48272: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48278: 4e5e unlk %fp 4827a: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 4827c: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 48280: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 48286: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4828a: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4828e: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 48292: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 48296: 486a 0048 pea %a2@(72) 4829a: 4879 0005 daa0 pea 5daa0 <_Watchdog_Ticks_chain> 482a0: 4eb9 0004 8e1c jsr 48e1c <_Watchdog_Insert> 482a6: 508f addql #8,%sp 482a8: 608e bras 48238 <_Thread_queue_Enqueue_with_handler+0x28> ... =============================================================================== 0004d2c4 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4d2c4: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4d2ca: 4e56 0000 linkw %fp,#0 4d2ce: 2f0a movel %a2,%sp@- 4d2d0: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4d2d4: 40c1 movew %sr,%d1 4d2d6: 8081 orl %d1,%d0 4d2d8: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4d2da: 202a 0010 movel %a2@(16),%d0 4d2de: 0280 0003 bee0 andil #245472,%d0 4d2e4: 6734 beqs 4d31a <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4d2e6: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d2e8: 7002 moveq #2,%d0 previous = the_node->previous; 4d2ea: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4d2ee: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4d2f2: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4d2f4: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d2f8: b0aa 0050 cmpl %a2@(80),%d0 4d2fc: 6726 beqs 4d324 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4d2fe: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4d300: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d304: 246e fffc moveal %fp@(-4),%a2 4d308: 203c 1003 fff8 movel #268697592,%d0 4d30e: 2d40 000c movel %d0,%fp@(12) 4d312: 4e5e unlk %fp 4d314: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4d31a: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d31c: 246e fffc moveal %fp@(-4),%a2 4d320: 4e5e unlk %fp 4d322: 4e75 rts 4d324: 7003 moveq #3,%d0 4d326: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4d32a: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4d32c: 486a 0048 pea %a2@(72) 4d330: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 4d336: 588f addql #4,%sp 4d338: 203c 1003 fff8 movel #268697592,%d0 4d33e: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d342: 246e fffc moveal %fp@(-4),%a2 4d346: 2d40 000c movel %d0,%fp@(12) 4d34a: 4e5e unlk %fp 4d34c: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... =============================================================================== 0004b8e0 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4b8e0: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4b8e6: 4e56 ffec linkw %fp,#-20 4b8ea: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b8ee: 246e 000c moveal %fp@(12),%a2 4b8f2: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4b8f6: 40c1 movew %sr,%d1 4b8f8: 8081 orl %d1,%d0 4b8fa: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4b8fc: 202a 0010 movel %a2@(16),%d0 4b900: 0280 0003 bee0 andil #245472,%d0 4b906: 677e beqs 4b986 <_Thread_queue_Extract_priority_helper+0xa6><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b908: 200a movel %a2,%d0 4b90a: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4b910: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4b912: 226a 0004 moveal %a2@(4),%a1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b916: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b91a: b088 cmpl %a0,%d0 4b91c: 6774 beqs 4b992 <_Thread_queue_Extract_priority_helper+0xb2> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4b91e: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4b922: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4b924: 2748 0004 movel %a0,%a3@(4) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4b928: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4b92a: 2149 0004 movel %a1,%a0@(4) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4b92e: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4b930: 202a 0040 movel %a2@(64),%d0 4b934: b0aa 0038 cmpl %a2@(56),%d0 4b938: 6716 beqs 4b950 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4b93a: 43e8 0038 lea %a0@(56),%a1 4b93e: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4b942: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4b946: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4b94a: 41e8 003c lea %a0@(60),%a0 4b94e: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b950: 4a02 tstb %d2 4b952: 6626 bnes 4b97a <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b954: 7002 moveq #2,%d0 4b956: b0aa 0050 cmpl %a2@(80),%d0 4b95a: 6742 beqs 4b99e <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4b95c: 46c1 movew %d1,%sr 4b95e: 2d4a 0008 movel %a2,%fp@(8) 4b962: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b968: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b96e: 2d49 000c movel %a1,%fp@(12) 4b972: 4e5e unlk %fp 4b974: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4b97a: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b97c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b982: 4e5e unlk %fp 4b984: 4e75 rts Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4b986: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b988: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b98e: 4e5e unlk %fp 4b990: 4e75 rts new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4b992: 2749 0004 movel %a1,%a3@(4) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4b996: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b998: 4a02 tstb %d2 4b99a: 67b8 beqs 4b954 <_Thread_queue_Extract_priority_helper+0x74> 4b99c: 60dc bras 4b97a <_Thread_queue_Extract_priority_helper+0x9a> 4b99e: 7003 moveq #3,%d0 4b9a0: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4b9a4: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b9a6: 486a 0048 pea %a2@(72) 4b9aa: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 4b9b0: 588f addql #4,%sp 4b9b2: 227c 1003 fff8 moveal #268697592,%a1 4b9b8: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b9bc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b9c2: 2d49 000c movel %a1,%fp@(12) 4b9c6: 4e5e unlk %fp 4b9c8: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... =============================================================================== 0004848c <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4848c: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4848e: 4e56 0000 linkw %fp,#0 48492: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 48496: 216e 0010 0038 movel %fp@(16),%a0@(56) Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4849c: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 484a0: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 484a6: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 484aa: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 484ae: b280 cmpl %d0,%d1 484b0: 6712 beqs 484c4 <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484b2: 2008 movel %a0,%d0 484b4: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484b6: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484ba: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 484bc: 42a8 0004 clrl %a0@(4) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 484c0: 4e5e unlk %fp 484c2: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 484c4: 2008 movel %a0,%d0 484c6: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484cc: 2208 movel %a0,%d1 484ce: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484d0: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484d4: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484d6: 2148 0008 movel %a0,%a0@(8) 484da: 41e8 000c lea %a0@(12),%a0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 484de: b088 cmpl %a0,%d0 484e0: 67de beqs 484c0 <_Thread_queue_Initialize+0x34> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484e2: 2208 movel %a0,%d1 484e4: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484e6: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484ea: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484ec: 2148 0008 movel %a0,%a0@(8) 484f0: 41e8 000c lea %a0@(12),%a0 484f4: b088 cmpl %a0,%d0 484f6: 66d4 bnes 484cc <_Thread_queue_Initialize+0x40> 484f8: 60c6 bras 484c0 <_Thread_queue_Initialize+0x34> ... =============================================================================== 0004b9d0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4b9d0: 4e56 0000 linkw %fp,#0 4b9d4: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4b9d8: 2268 0044 moveal %a0@(68),%a1 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4b9dc: 2029 0030 movel %a1@(48),%d0 4b9e0: 6708 beqs 4b9ea <_Thread_queue_Process_timeout+0x1a> 4b9e2: b1f9 0005 da82 cmpal 5da82 <_Thread_Executing>,%a0 4b9e8: 6718 beqs 4ba02 <_Thread_queue_Process_timeout+0x32><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4b9ea: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4b9f0: 2f08 movel %a0,%sp@- 4b9f2: 2f28 0044 movel %a0@(68),%sp@- 4b9f6: 4eb9 0004 b8a8 jsr 4b8a8 <_Thread_queue_Extract> 4b9fc: 508f addql #8,%sp } } 4b9fe: 4e5e unlk %fp 4ba00: 4e75 rts * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4ba02: 7203 moveq #3,%d1 4ba04: b280 cmpl %d0,%d1 4ba06: 67f6 beqs 4b9fe <_Thread_queue_Process_timeout+0x2e> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4ba08: 7002 moveq #2,%d0 } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 4ba0a: 4e5e unlk %fp */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4ba0c: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4ba12: 2340 0030 movel %d0,%a1@(48) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } =============================================================================== 000484fc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 484fc: 4e56 fff0 linkw %fp,#-16 48500: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48504: 246e 0008 moveal %fp@(8),%a2 48508: 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 ) 4850c: 4a8a tstl %a2 4850e: 6708 beqs 48518 <_Thread_queue_Requeue+0x1c> <== NEVER TAKEN /* * 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 ) { 48510: 7001 moveq #1,%d0 48512: b0aa 0034 cmpl %a2@(52),%d0 48516: 670a beqs 48522 <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 48518: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4851e: 4e5e unlk %fp <== NOT EXECUTED 48520: 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 ); 48522: 303c 0700 movew #1792,%d0 48526: 40c2 movew %sr,%d2 48528: 8082 orl %d2,%d0 4852a: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4852c: 202b 0010 movel %a3@(16),%d0 48530: 0280 0003 bee0 andil #245472,%d0 48536: 660c bnes 48544 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN _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 ); 48538: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4853a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48540: 4e5e unlk %fp 48542: 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 ); 48544: 4878 0001 pea 1 48548: 7001 moveq #1,%d0 4854a: 2f0b movel %a3,%sp@- 4854c: 2540 0030 movel %d0,%a2@(48) 48550: 2f0a movel %a2,%sp@- 48552: 4eb9 0004 b8e0 jsr 4b8e0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48558: 486e fffc pea %fp@(-4) 4855c: 2f0b movel %a3,%sp@- 4855e: 2f0a movel %a2,%sp@- 48560: 4eb9 0004 82ac jsr 482ac <_Thread_queue_Enqueue_priority> 48566: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4856a: 46c2 movew %d2,%sr 4856c: 60cc bras 4853a <_Thread_queue_Requeue+0x3e> ... =============================================================================== 00048570 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 48570: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48574: 486e fffc pea %fp@(-4) 48578: 2f2e 0008 movel %fp@(8),%sp@- 4857c: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 48582: 508f addql #8,%sp 48584: 4aae fffc tstl %fp@(-4) 48588: 6618 bnes 485a2 <_Thread_queue_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4858a: 2f00 movel %d0,%sp@- 4858c: 4eb9 0004 b9d0 jsr 4b9d0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48592: 588f addql #4,%sp 48594: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 4859a: 5380 subql #1,%d0 4859c: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 485a2: 4e5e unlk %fp ... =============================================================================== 0005944c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 5944c: 4e56 ffb0 linkw %fp,#-80 59450: 41ee ffec lea %fp@(-20),%a0 59454: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59458: 246e 0008 moveal %fp@(8),%a2 5945c: 2c0e movel %fp,%d6 5945e: 260e movel %fp,%d3 59460: 5186 subql #8,%d6 59462: 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 ); 59468: 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 ); 5946a: 2a0a movel %a2,%d5 5946c: 4bf9 0005 d4f0 lea 5d4f0 <_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 ); 59472: 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 ); 59478: 0685 0000 0068 addil #104,%d5 5947e: 47f9 0005 9eac lea 59eac <_Chain_Get>,%a3 59484: 49f9 0005 d580 lea 5d580 <_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 ); 5948a: 283c 0000 0700 movel #1792,%d4 59490: 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 ); 59494: 41ea 0008 lea %a2@(8),%a0 59498: 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 ); 5949c: 41ea 0040 lea %a2@(64),%a0 594a0: 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); 594a4: 41ee fff4 lea %fp@(-12),%a0 594a8: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594ac: 41ee ffec lea %fp@(-20),%a0 594b0: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 594b4: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594b8: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 594bc: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 594c0: 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; 594c4: 41ee fff4 lea %fp@(-12),%a0 594c8: 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; 594cc: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 594d2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 594d6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 594da: 9081 subl %d1,%d0 594dc: 2f03 movel %d3,%sp@- 594de: 2f00 movel %d0,%sp@- 594e0: 2f02 movel %d2,%sp@- 594e2: 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(); 594e4: 2039 0007 d146 movel 7d146 <_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 ) { 594ea: 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; 594ee: 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 ) { 594f2: b280 cmpl %d0,%d1 594f4: 6500 0086 bcsw 5957c <_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 ) { 594f8: b280 cmpl %d0,%d1 594fa: 6200 00a4 bhiw 595a0 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 594fe: 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 ); 59502: 202a 0078 movel %a2@(120),%d0 59506: 2f00 movel %d0,%sp@- 59508: 4e93 jsr %a3@ if ( timer == NULL ) { 5950a: 588f addql #4,%sp 5950c: 4a80 tstl %d0 5950e: 672e beqs 5953e <_Timer_server_Body+0xf2> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59510: 2040 moveal %d0,%a0 <== NOT EXECUTED 59512: 7e01 moveq #1,%d7 <== NOT EXECUTED 59514: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59518: be81 cmpl %d1,%d7 <== NOT EXECUTED 5951a: 6700 00a8 beqw 595c4 <_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 ) { 5951e: 7e03 moveq #3,%d7 <== NOT EXECUTED 59520: be81 cmpl %d1,%d7 <== NOT EXECUTED 59522: 66de bnes 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59524: 2040 moveal %d0,%a0 <== NOT EXECUTED 59526: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5952a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5952c: 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 ); 5952e: 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 ); 59532: 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 ); 59534: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59536: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 59538: 588f addql #4,%sp <== NOT EXECUTED 5953a: 4a80 tstl %d0 <== NOT EXECUTED 5953c: 66d2 bnes 59510 <_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 ); 5953e: 2004 movel %d4,%d0 59540: 40c1 movew %sr,%d1 59542: 8081 orl %d1,%d0 59544: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 59546: bcae fff4 cmpl %fp@(-12),%d6 5954a: 6700 0086 beqw 595d2 <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 5954e: 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; 59550: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 59556: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 5955a: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5955e: 9081 subl %d1,%d0 <== NOT EXECUTED 59560: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59562: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59566: 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(); 59568: 2039 0007 d146 movel 7d146 <_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 ) { 5956e: 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; 59572: 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 ) { 59576: b280 cmpl %d0,%d1 <== NOT EXECUTED 59578: 6400 ff7e bccw 594f8 <_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 ); 5957c: 2f03 movel %d3,%sp@- 5957e: 2e00 movel %d0,%d7 59580: 9e81 subl %d1,%d7 59582: 2f07 movel %d7,%sp@- 59584: 2d40 ffdc movel %d0,%fp@(-36) 59588: 2f05 movel %d5,%sp@- 5958a: 4eb9 0005 d4f0 jsr 5d4f0 <_Watchdog_Adjust_to_chain> 59590: 202e ffdc movel %fp@(-36),%d0 59594: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59598: 2540 0074 movel %d0,%a2@(116) 5959c: 6000 ff64 braw 59502 <_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 ); 595a0: 9280 subl %d0,%d1 595a2: 2f01 movel %d1,%sp@- 595a4: 4878 0001 pea 1 595a8: 2d40 ffdc movel %d0,%fp@(-36) 595ac: 2f05 movel %d5,%sp@- 595ae: 4eb9 0005 d45c jsr 5d45c <_Watchdog_Adjust> 595b4: 202e ffdc movel %fp@(-36),%d0 595b8: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 595bc: 2540 0074 movel %d0,%a2@(116) 595c0: 6000 ff40 braw 59502 <_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 ); 595c4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 595c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 595ca: 4e94 jsr %a4@ <== NOT EXECUTED 595cc: 508f addql #8,%sp <== NOT EXECUTED 595ce: 6000 ff32 braw 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 595d2: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 595d6: 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 ) ) { 595d8: 202e ffd8 movel %fp@(-40),%d0 595dc: b0ae ffe8 cmpl %fp@(-24),%d0 595e0: 6752 beqs 59634 <_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 ); 595e2: 2204 movel %d4,%d1 595e4: 40c0 movew %sr,%d0 595e6: 8280 orl %d0,%d1 595e8: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 595ea: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 595ee: b1ee ffd8 cmpal %fp@(-40),%a0 595f2: 6732 beqs 59626 <_Timer_server_Body+0x1da> <== NEVER TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 595f4: 2250 moveal %a0@,%a1 the_chain->first = new_first; 595f6: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 595fa: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 595fe: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 59602: 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 ); 59604: 2f28 0024 movel %a0@(36),%sp@- 59608: 2f28 0020 movel %a0@(32),%sp@- 5960c: 2068 001c moveal %a0@(28),%a0 59610: 4e90 jsr %a0@ } 59612: 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 ); 59614: 2204 movel %d4,%d1 59616: 40c0 movew %sr,%d0 59618: 8280 orl %d0,%d1 5961a: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5961c: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59620: b1ee ffd8 cmpal %fp@(-40),%a0 59624: 66ce bnes 595f4 <_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 ); 59626: 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; 59628: 41ee fff4 lea %fp@(-12),%a0 5962c: 2548 0078 movel %a0,%a2@(120) 59630: 6000 fe9a braw 594cc <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 59634: 4207 clrb %d7 59636: 1547 007c moveb %d7,%a2@(124) 5963a: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 59648: 4878 0008 pea 8 5964c: 2f12 movel %a2@,%sp@- 5964e: 4eb9 0005 cbac jsr 5cbac <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 59654: 2f0a movel %a2,%sp@- 59656: 4eba fd1c jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5965a: 2f0a movel %a2,%sp@- 5965c: 4eba fd80 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 59660: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> ts->active = true; 59666: 7001 moveq #1,%d0 59668: 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 ); 5966c: 2f2e ffe0 movel %fp@(-32),%sp@- 59670: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 59676: 2f2e ffe4 movel %fp@(-28),%sp@- 5967a: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> 59680: 4fef 0018 lea %sp@(24),%sp 59684: 6000 fe3e braw 594c4 <_Timer_server_Body+0x78> =============================================================================== 00059688 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 59688: 4e56 fff0 linkw %fp,#-16 5968c: 206e 000c moveal %fp@(12),%a0 59690: 48d7 041c moveml %d2-%d4/%a2,%sp@ 59694: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 59698: 202a 0078 movel %a2@(120),%d0 5969c: 671a beqs 596b8 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN * 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 ); 5969e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 596a2: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 596a6: 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 ); 596ac: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 596b0: 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 ); 596b2: 4ef9 0005 9e74 jmp 59e74 <_Chain_Append> <== NOT EXECUTED 596b8: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 596c6: 2028 0038 movel %a0@(56),%d0 596ca: 7201 moveq #1,%d1 596cc: b280 cmpl %d0,%d1 596ce: 6700 0088 beqw 59758 <_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 ) { 596d2: 7203 moveq #3,%d1 596d4: b280 cmpl %d0,%d1 596d6: 670e beqs 596e6 <_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 ); } } 596d8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596de: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 596e0: 4ef9 0005 c164 jmp 5c164 <_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 ); 596e6: 203c 0000 0700 movel #1792,%d0 596ec: 40c2 movew %sr,%d2 596ee: 8082 orl %d2,%d0 596f0: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 596f2: 260a movel %a2,%d3 596f4: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 596fa: 2039 0007 d146 movel 7d146 <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 59700: 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)); 59704: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59708: b689 cmpl %a1,%d3 5970a: 671a beqs 59726 <_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; 5970c: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 59710: b280 cmpl %d0,%d1 59712: 6400 00b8 bccw 597cc <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 59716: 2800 movel %d0,%d4 59718: 9881 subl %d1,%d4 if (delta_interval > delta) { 5971a: b883 cmpl %d3,%d4 5971c: 6500 00ba bcsw 597d8 <_Timer_server_Schedule_operation_method+0x150> 59720: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59722: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 59726: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 5972a: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5972c: 4868 0010 pea %a0@(16) 59730: 486a 0068 pea %a2@(104) 59734: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert> if ( !ts->active ) { 5973a: 508f addql #8,%sp 5973c: 102a 007c moveb %a2@(124),%d0 59740: 6696 bnes 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 59742: 2f0a movel %a2,%sp@- 59744: 4eba fc98 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) 59748: 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 ); } } 5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59750: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 59752: 4ef9 0005 c164 jmp 5c164 <_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 ); 59758: 203c 0000 0700 movel #1792,%d0 5975e: 40c3 movew %sr,%d3 59760: 8083 orl %d3,%d0 59762: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59764: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0 5976a: 240a movel %a2,%d2 5976c: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 59772: 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)); 59776: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5977a: b489 cmpl %a1,%d2 5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5977e: 2800 movel %d0,%d4 59780: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 59782: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59786: b484 cmpl %d4,%d2 59788: 623a bhis 597c4 <_Timer_server_Schedule_operation_method+0x13c> 5978a: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5978c: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 59790: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59794: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59796: 4868 0010 pea %a0@(16) 5979a: 486a 0030 pea %a2@(48) 5979e: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert> if ( !ts->active ) { 597a4: 508f addql #8,%sp 597a6: 102a 007c moveb %a2@(124),%d0 597aa: 6600 ff2c bnew 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 597ae: 2f0a movel %a2,%sp@- 597b0: 4eba fbc2 jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) 597b4: 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 ); } } 597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 597bc: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 597be: 4ef9 0005 c164 jmp 5c164 <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 597c4: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 597c6: 2342 0010 movel %d2,%a1@(16) 597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x108> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 597cc: d283 addl %d3,%d1 delta_interval += delta; 597ce: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 597d0: 2341 0010 movel %d1,%a1@(16) 597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 597d8: 9684 subl %d4,%d3 597da: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 597dc: 2341 0010 movel %d1,%a1@(16) 597e0: 6000 ff44 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> =============================================================================== 00048ad4 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 48ad4: 4e56 0000 linkw %fp,#0 48ad8: 226e 0008 moveal %fp@(8),%a1 48adc: 2f0a movel %a2,%sp@- 48ade: 246e 000c moveal %fp@(12),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 48ae2: 206a 0004 moveal %a2@(4),%a0 48ae6: d1e9 0004 addal %a1@(4),%a0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 48aea: 2208 movel %a0,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 48aec: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 48aee: d191 addl %d0,%a1@ time->tv_nsec += add->tv_nsec; 48af0: 2348 0004 movel %a0,%a1@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 48af4: b1fc 3b9a c9ff cmpal #999999999,%a0 48afa: 631a blss 48b16 <_Timespec_Add_to+0x42> 48afc: 2051 moveal %a1@,%a0 * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 48afe: 5288 addql #1,%a0 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 48b00: 0681 c465 3600 addil #-1000000000,%d1 time->tv_sec++; seconds++; 48b06: 5280 addql #1,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 48b08: 0c81 3b9a c9ff cmpil #999999999,%d1 48b0e: 62ee bhis 48afe <_Timespec_Add_to+0x2a> <== NEVER TAKEN 48b10: 2288 movel %a0,%a1@ 48b12: 2341 0004 movel %d1,%a1@(4) time->tv_sec++; seconds++; } return seconds; } 48b16: 245f moveal %sp@+,%a2 48b18: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a714 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 4a714: 4e56 0000 linkw %fp,#0 4a718: 226e 0008 moveal %fp@(8),%a1 4a71c: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 4a720: 2211 movel %a1@,%d1 4a722: 2010 movel %a0@,%d0 4a724: b081 cmpl %d1,%d0 4a726: 6d18 blts 4a740 <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 4a728: 6e10 bgts 4a73a <_Timespec_Greater_than+0x26> <== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 4a72a: 2068 0004 moveal %a0@(4),%a0 4a72e: b1e9 0004 cmpal %a1@(4),%a0 4a732: 5dc0 slt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4a734: 4e5e unlk %fp #include #include #include bool _Timespec_Greater_than( 4a736: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4a738: 4e75 rts 4a73a: 4e5e unlk %fp <== NOT EXECUTED ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 4a73c: 4200 clrb %d0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4a73e: 4e75 rts <== NOT EXECUTED 4a740: 4e5e unlk %fp bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 4a742: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } ... =============================================================================== 00048cb2 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48cb2: 4e56 fff0 linkw %fp,#-16 48cb6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48cba: 242e 0008 movel %fp@(8),%d2 48cbe: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48cc2: 2479 0005 db5e moveal 5db5e <_User_extensions_List+0x8>,%a2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48cc8: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48ccc: b5fc 0005 db56 cmpal #383830,%a2 48cd2: 6726 beqs 48cfa <_User_extensions_Fatal+0x48> <== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 48cd4: 0284 0000 00ff andil #255,%d4 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 48cda: 206a 0030 moveal %a2@(48),%a0 48cde: 4a88 tstl %a0 48ce0: 670c beqs 48cee <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 48ce2: 2f03 movel %d3,%sp@- 48ce4: 2f04 movel %d4,%sp@- 48ce6: 2f02 movel %d2,%sp@- 48ce8: 4e90 jsr %a0@ 48cea: 4fef 000c lea %sp@(12),%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48cee: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48cf2: b5fc 0005 db56 cmpal #383830,%a2 48cf8: 66e0 bnes 48cda <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 48cfa: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48d00: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048b70 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48b70: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b74: 203c 0005 db5a movel #383834,%d0 48b7a: 23c0 0005 db56 movel %d0,5db56 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b80: 203c 0005 db56 movel #383830,%d0 48b86: 23c0 0005 db5e movel %d0,5db5e <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b8c: 203c 0005 d9d0 movel #383440,%d0 48b92: 23c0 0005 d9cc movel %d0,5d9cc <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b98: 203c 0005 d9cc movel #383436,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48b9e: 42b9 0005 db5a clrl 5db5a <_User_extensions_List+0x4> 48ba4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 48ba8: 2439 0005 c2ca movel 5c2ca ,%d2 initial_extensions = Configuration.User_extension_table; 48bae: 2639 0005 c2ce movel 5c2ce ,%d3 48bb4: 42b9 0005 d9d0 clrl 5d9d0 <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 48bba: 23c0 0005 d9d4 movel %d0,5d9d4 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48bc0: 4a83 tstl %d3 48bc2: 6764 beqs 48c28 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 48bc4: 7834 moveq #52,%d4 48bc6: 4c02 4800 mulsl %d2,%d4 48bca: 2f04 movel %d4,%sp@- 48bcc: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error> 48bd2: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48bd4: 2f04 movel %d4,%sp@- 48bd6: 42a7 clrl %sp@- 48bd8: 2f00 movel %d0,%sp@- 48bda: 4eb9 0004 e0f8 jsr 4e0f8 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48be0: 4fef 0010 lea %sp@(16),%sp 48be4: 4a82 tstl %d2 48be6: 6740 beqs 48c28 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 48be8: 4284 clrl %d4 48bea: 47f9 0004 bb5c lea 4bb5c <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48bf0: 2043 moveal %d3,%a0 48bf2: 5284 addql #1,%d4 48bf4: 0683 0000 0020 addil #32,%d3 48bfa: 2558 0014 movel %a0@+,%a2@(20) 48bfe: 2558 0018 movel %a0@+,%a2@(24) 48c02: 2558 001c movel %a0@+,%a2@(28) 48c06: 2558 0020 movel %a0@+,%a2@(32) 48c0a: 2558 0024 movel %a0@+,%a2@(36) 48c0e: 2558 0028 movel %a0@+,%a2@(40) 48c12: 2558 002c movel %a0@+,%a2@(44) 48c16: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 48c1a: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48c1c: 45ea 0034 lea %a2@(52),%a2 48c20: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48c22: 588f addql #4,%sp 48c24: b882 cmpl %d2,%d4 48c26: 65c8 bcss 48bf0 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48c28: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48c2e: 4e5e unlk %fp ... =============================================================================== 00048c34 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48c34: 4e56 0000 linkw %fp,#0 48c38: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48c3a: 2479 0005 db56 moveal 5db56 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48c40: 2f02 movel %d2,%sp@- 48c42: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48c46: b5fc 0005 db5a cmpal #383834,%a2 48c4c: 6718 beqs 48c66 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 48c4e: 206a 0028 moveal %a2@(40),%a0 48c52: 4a88 tstl %a0 48c54: 6706 beqs 48c5c <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 48c56: 2f02 movel %d2,%sp@- 48c58: 4e90 jsr %a0@ 48c5a: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 48c5c: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48c5e: b5fc 0005 db5a cmpal #383834,%a2 48c64: 66e8 bnes 48c4e <_User_extensions_Thread_begin+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 48c66: 242e fff8 movel %fp@(-8),%d2 48c6a: 246e fffc moveal %fp@(-4),%a2 48c6e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d04 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48d04: 4e56 0000 linkw %fp,#0 48d08: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d0a: 2479 0005 db56 moveal 5db56 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48d10: 2f02 movel %d2,%sp@- 48d12: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d16: b5fc 0005 db5a cmpal #383834,%a2 48d1c: 6722 beqs 48d40 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 48d1e: 206a 0014 moveal %a2@(20),%a0 48d22: 4a88 tstl %a0 48d24: 6710 beqs 48d36 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 48d26: 2f02 movel %d2,%sp@- 48d28: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 48d2e: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 48d30: 508f addql #8,%sp 48d32: 4a00 tstb %d0 48d34: 670c beqs 48d42 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 48d36: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d38: b5fc 0005 db5a cmpal #383834,%a2 48d3e: 66de bnes 48d1e <_User_extensions_Thread_create+0x1a> 48d40: 7001 moveq #1,%d0 return false; } } return true; } 48d42: 242e fff8 movel %fp@(-8),%d2 48d46: 246e fffc moveal %fp@(-4),%a2 48d4a: 4e5e unlk %fp ... =============================================================================== 00048d50 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d50: 4e56 0000 linkw %fp,#0 48d54: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d56: 2479 0005 db5e moveal 5db5e <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d5c: 2f02 movel %d2,%sp@- 48d5e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d62: b5fc 0005 db56 cmpal #383830,%a2 48d68: 6720 beqs 48d8a <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 48d6a: 206a 0020 moveal %a2@(32),%a0 48d6e: 4a88 tstl %a0 48d70: 670c beqs 48d7e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 48d72: 2f02 movel %d2,%sp@- 48d74: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 48d7a: 4e90 jsr %a0@ 48d7c: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48d7e: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d82: b5fc 0005 db56 cmpal #383830,%a2 48d88: 66e0 bnes 48d6a <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 48d8a: 242e fff8 movel %fp@(-8),%d2 48d8e: 246e fffc moveal %fp@(-4),%a2 48d92: 4e5e unlk %fp ... =============================================================================== 00048c72 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c72: 4e56 0000 linkw %fp,#0 48c76: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c78: 2479 0005 db5e moveal 5db5e <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c7e: 2f02 movel %d2,%sp@- 48c80: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c84: b5fc 0005 db56 cmpal #383830,%a2 48c8a: 671a beqs 48ca6 <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 48c8c: 206a 002c moveal %a2@(44),%a0 48c90: 4a88 tstl %a0 48c92: 6706 beqs 48c9a <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 48c94: 2f02 movel %d2,%sp@- 48c96: 4e90 jsr %a0@ 48c98: 588f addql #4,%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48c9a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c9e: b5fc 0005 db56 cmpal #383830,%a2 48ca4: 66e6 bnes 48c8c <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 48ca6: 242e fff8 movel %fp@(-8),%d2 48caa: 246e fffc moveal %fp@(-4),%a2 48cae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a38 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 49a38: 4e56 0000 linkw %fp,#0 49a3c: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49a3e: 2479 0005 eaee moveal 5eaee <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 49a44: 2f02 movel %d2,%sp@- 49a46: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49a4a: b5fc 0005 eaf2 cmpal #387826,%a2 49a50: 671e beqs 49a70 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 49a52: 206a 001c moveal %a2@(28),%a0 49a56: 4a88 tstl %a0 49a58: 670c beqs 49a66 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 49a5a: 2f02 movel %d2,%sp@- 49a5c: 2f39 0005 ea1a movel 5ea1a <_Thread_Executing>,%sp@- 49a62: 4e90 jsr %a0@ 49a64: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49a66: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49a68: b5fc 0005 eaf2 cmpal #387826,%a2 49a6e: 66e2 bnes 49a52 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 49a70: 242e fff8 movel %fp@(-8),%d2 49a74: 246e fffc moveal %fp@(-4),%a2 49a78: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d98 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48d98: 4e56 0000 linkw %fp,#0 48d9c: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d9e: 2479 0005 db56 moveal 5db56 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48da4: 2f02 movel %d2,%sp@- 48da6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48daa: b5fc 0005 db5a cmpal #383834,%a2 48db0: 671e beqs 48dd0 <_User_extensions_Thread_start+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 48db2: 206a 0018 moveal %a2@(24),%a0 48db6: 4a88 tstl %a0 48db8: 670c beqs 48dc6 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 48dba: 2f02 movel %d2,%sp@- 48dbc: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 48dc2: 4e90 jsr %a0@ 48dc4: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 48dc6: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48dc8: b5fc 0005 db5a cmpal #383834,%a2 48dce: 66e2 bnes 48db2 <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 48dd0: 242e fff8 movel %fp@(-8),%d2 48dd4: 246e fffc moveal %fp@(-4),%a2 48dd8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048ddc <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 48ddc: 4e56 fff4 linkw %fp,#-12 48de0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48de4: 262e 0008 movel %fp@(8),%d3 48de8: 242e 000c movel %fp@(12),%d2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48dec: 2479 0005 d9cc moveal 5d9cc <_User_extensions_Switches_list>,%a2 48df2: b5fc 0005 d9d0 cmpal #383440,%a2 48df8: 6716 beqs 48e10 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 48dfa: 2f02 movel %d2,%sp@- 48dfc: 2f03 movel %d3,%sp@- 48dfe: 206a 0008 moveal %a2@(8),%a0 48e02: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 48e04: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48e06: 508f addql #8,%sp 48e08: b5fc 0005 d9d0 cmpal #383440,%a2 48e0e: 66ea bnes 48dfa <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 48e10: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48e16: 4e5e unlk %fp ... =============================================================================== 0004ab6c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4ab6c: 4e56 ffe8 linkw %fp,#-24 4ab70: 226e 000c moveal %fp@(12),%a1 4ab74: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4ab78: 283c 0000 0700 movel #1792,%d4 4ab7e: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4ab80: 266e 0008 moveal %fp@(8),%a3 4ab84: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4ab88: 40c1 movew %sr,%d1 4ab8a: 8081 orl %d1,%d0 4ab8c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4ab8e: 244b moveal %a3,%a2 4ab90: 205a moveal %a2@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4ab92: b5c8 cmpal %a0,%a2 4ab94: 6748 beqs 4abde <_Watchdog_Adjust+0x72> switch ( direction ) { 4ab96: 4a89 tstl %a1 4ab98: 6650 bnes 4abea <_Watchdog_Adjust+0x7e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4ab9a: 4a82 tstl %d2 4ab9c: 6740 beqs 4abde <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4ab9e: 2628 0010 movel %a0@(16),%d3 4aba2: 49f9 0004 ade8 lea 4ade8 <_Watchdog_Tickle>,%a4 4aba8: b682 cmpl %d2,%d3 4abaa: 622c bhis 4abd8 <_Watchdog_Adjust+0x6c> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4abac: 7001 moveq #1,%d0 4abae: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4abb2: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4abb4: 2f0b movel %a3,%sp@- 4abb6: 4e94 jsr %a4@ _ISR_Disable( level ); 4abb8: 2004 movel %d4,%d0 4abba: 40c1 movew %sr,%d1 4abbc: 8081 orl %d1,%d0 4abbe: 46c0 movew %d0,%sr while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4abc0: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4abc2: 588f addql #4,%sp 4abc4: 2013 movel %a3@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 4abc6: 2040 moveal %d0,%a0 4abc8: b08a cmpl %a2,%d0 4abca: 6712 beqs 4abde <_Watchdog_Adjust+0x72> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4abcc: 4a82 tstl %d2 4abce: 670e beqs 4abde <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4abd0: 2628 0010 movel %a0@(16),%d3 4abd4: b483 cmpl %d3,%d2 4abd6: 64d4 bccs 4abac <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4abd8: 9682 subl %d2,%d3 4abda: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4abde: 46c1 movew %d1,%sr } 4abe0: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4abe6: 4e5e unlk %fp 4abe8: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4abea: 7001 moveq #1,%d0 4abec: b089 cmpl %a1,%d0 4abee: 66ee bnes 4abde <_Watchdog_Adjust+0x72> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4abf0: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4abf4: 46c1 movew %d1,%sr } 4abf6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4abfc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d4f0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5d4f0: 4e56 ffe4 linkw %fp,#-28 5d4f4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d4f8: 2a6e 0008 moveal %fp@(8),%a5 5d4fc: 282e 000c movel %fp@(12),%d4 5d500: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5d504: 675e beqs 5d564 <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5d506: 263c 0000 0700 movel #1792,%d3 5d50c: 2003 movel %d3,%d0 5d50e: 40c1 movew %sr,%d1 5d510: 8081 orl %d1,%d0 5d512: 46c0 movew %d0,%sr 5d514: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d516: 240b movel %a3,%d2 5d518: 5882 addql #4,%d2 5d51a: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5d51c: b1cc cmpal %a4,%a0 5d51e: 6742 beqs 5d562 <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 5d520: 2028 0010 movel %a0@(16),%d0 5d524: b880 cmpl %d0,%d4 5d526: 654c bcss 5d574 <_Watchdog_Adjust_to_chain+0x84> <== NEVER TAKEN /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 5d528: 9880 subl %d0,%d4 first->delta_interval = 0; 5d52a: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5d52e: 2250 moveal %a0@,%a1 previous = the_node->previous; 5d530: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5d534: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5d536: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5d53a: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5d53c: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5d540: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5d544: 2149 0004 movel %a1,%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; 5d548: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5d54a: 2003 movel %d3,%d0 5d54c: 46c1 movew %d1,%sr 5d54e: 8081 orl %d1,%d0 5d550: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5d552: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5d554: b1cc cmpal %a4,%a0 5d556: 6714 beqs 5d56c <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5d558: 4aa8 0010 tstl %a0@(16) 5d55c: 67d0 beqs 5d52e <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d55e: 4a84 tstl %d4 5d560: 66ba bnes 5d51c <_Watchdog_Adjust_to_chain+0x2c> <== NEVER TAKEN if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d562: 46c1 movew %d1,%sr } 5d564: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d568: 4e5e unlk %fp 5d56a: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d56c: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d56e: 4a84 tstl %d4 5d570: 66aa bnes 5d51c <_Watchdog_Adjust_to_chain+0x2c> 5d572: 60ee bras 5d562 <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 5d574: 9084 subl %d4,%d0 5d576: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d57a: 46c1 movew %d1,%sr 5d57c: 60e6 bras 5d564 <_Watchdog_Adjust_to_chain+0x74> ... =============================================================================== 00048e1c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 48e1c: 4e56 ffec linkw %fp,#-20 48e20: 226e 000c moveal %fp@(12),%a1 48e24: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48e28: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 48e2c: 2a3c 0000 0700 movel #1792,%d5 48e32: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 48e34: 2839 0005 da62 movel 5da62 <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 48e3a: 40c3 movew %sr,%d3 48e3c: 8083 orl %d3,%d0 48e3e: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 48e40: 4aa9 0008 tstl %a1@(8) 48e44: 6600 00c6 bnew 48f0c <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 48e48: 2039 0005 db04 movel 5db04 <_Watchdog_Sync_count>,%d0 48e4e: 5280 addql #1,%d0 48e50: 23c0 0005 db04 movel %d0,5db04 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 48e56: 7001 moveq #1,%d0 48e58: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 48e5c: 2029 000c movel %a1@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 48e60: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e62: 6764 beqs 48ec8 <_Watchdog_Insert+0xac> 48e64: 4a90 tstl %a0@ 48e66: 6760 beqs 48ec8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e68: 2228 0010 movel %a0@(16),%d1 48e6c: b280 cmpl %d0,%d1 48e6e: 6252 bhis 48ec2 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48e70: 2405 movel %d5,%d2 48e72: 46c3 movew %d3,%sr 48e74: 8483 orl %d3,%d2 48e76: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48e78: 7401 moveq #1,%d2 48e7a: b4a9 0008 cmpl %a1@(8),%d2 48e7e: 666e bnes 48eee <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48e80: 2439 0005 da7e movel 5da7e <_Watchdog_Sync_level>,%d2 48e86: b484 cmpl %d4,%d2 48e88: 6230 bhis 48eba <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48e8a: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48e8c: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e8e: 4a80 tstl %d0 48e90: 6736 beqs 48ec8 <_Watchdog_Insert+0xac> 48e92: 4a90 tstl %a0@ 48e94: 6732 beqs 48ec8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e96: 2228 0010 movel %a0@(16),%d1 48e9a: b081 cmpl %d1,%d0 48e9c: 6524 bcss 48ec2 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48e9e: 2405 movel %d5,%d2 48ea0: 46c3 movew %d3,%sr 48ea2: 8483 orl %d3,%d2 48ea4: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48ea6: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48ea8: 7201 moveq #1,%d1 48eaa: b2a9 0008 cmpl %a1@(8),%d1 48eae: 663e bnes 48eee <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48eb0: 2239 0005 da7e movel 5da7e <_Watchdog_Sync_level>,%d1 48eb6: b284 cmpl %d4,%d1 48eb8: 63d2 blss 48e8c <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 48eba: 23c4 0005 da7e movel %d4,5da7e <_Watchdog_Sync_level> goto restart; 48ec0: 609a bras 48e5c <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 48ec2: 9280 subl %d0,%d1 48ec4: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 48ec8: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 48ecc: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48ece: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 48ed0: 2239 0005 db08 movel 5db08 <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 48ed6: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48ed8: 2348 0004 movel %a0,%a1@(4) 48edc: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 48ee0: 2340 0010 movel %d0,%a1@(16) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 48ee4: 2549 0004 movel %a1,%a2@(4) 48ee8: 2342 0008 movel %d2,%a1@(8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 48eec: 228a movel %a2,%a1@ _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 48eee: 23c4 0005 da7e movel %d4,5da7e <_Watchdog_Sync_level> _Watchdog_Sync_count--; 48ef4: 2039 0005 db04 movel 5db04 <_Watchdog_Sync_count>,%d0 48efa: 5380 subql #1,%d0 48efc: 23c0 0005 db04 movel %d0,5db04 <_Watchdog_Sync_count> _ISR_Enable( level ); 48f02: 46c3 movew %d3,%sr } 48f04: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f08: 4e5e unlk %fp 48f0a: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 48f0c: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 48f0e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f12: 4e5e unlk %fp ... =============================================================================== 00048f64 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f64: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 48f6a: 4e56 0000 linkw %fp,#0 48f6e: 206e 0008 moveal %fp@(8),%a0 48f72: 2f0a movel %a2,%sp@- 48f74: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f76: 40c1 movew %sr,%d1 48f78: 8081 orl %d1,%d0 48f7a: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 48f7c: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 48f80: 7401 moveq #1,%d2 48f82: b480 cmpl %d0,%d2 48f84: 6764 beqs 48fea <_Watchdog_Remove+0x86> 48f86: 6314 blss 48f9c <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48f88: 2279 0005 db08 moveal 5db08 <_Watchdog_Ticks_since_boot>,%a1 48f8e: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48f92: 46c1 movew %d1,%sr return( previous_state ); } 48f94: 241f movel %sp@+,%d2 48f96: 245f moveal %sp@+,%a2 48f98: 4e5e unlk %fp 48f9a: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 48f9c: 143c 0003 moveb #3,%d2 48fa0: b480 cmpl %d0,%d2 48fa2: 65e4 bcss 48f88 <_Watchdog_Remove+0x24> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48fa4: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 48fa6: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 48faa: 4a91 tstl %a1@ 48fac: 6708 beqs 48fb6 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 48fae: 2428 0010 movel %a0@(16),%d2 48fb2: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 48fb6: 2479 0005 db04 moveal 5db04 <_Watchdog_Sync_count>,%a2 48fbc: 4a8a tstl %a2 48fbe: 670c beqs 48fcc <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 48fc0: 2479 0005 da62 moveal 5da62 <_ISR_Nest_level>,%a2 48fc6: 23ca 0005 da7e movel %a2,5da7e <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48fcc: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48fd0: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48fd2: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fd6: 2279 0005 db08 moveal 5db08 <_Watchdog_Ticks_since_boot>,%a1 48fdc: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48fe0: 46c1 movew %d1,%sr return( previous_state ); } 48fe2: 241f movel %sp@+,%d2 48fe4: 245f moveal %sp@+,%a2 48fe6: 4e5e unlk %fp 48fe8: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fea: 2279 0005 db08 moveal 5db08 <_Watchdog_Ticks_since_boot>,%a1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 48ff0: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48ff4: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48ff8: 46c1 movew %d1,%sr return( previous_state ); } 48ffa: 241f movel %sp@+,%d2 48ffc: 245f moveal %sp@+,%a2 48ffe: 4e5e unlk %fp ... =============================================================================== 0004a50c <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a50c: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4a512: 4e56 ffe8 linkw %fp,#-24 4a516: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a51a: 242e 0008 movel %fp@(8),%d2 4a51e: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a522: 40c3 movew %sr,%d3 4a524: 8083 orl %d3,%d0 4a526: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4a528: 2f0b movel %a3,%sp@- 4a52a: 4bf9 0004 4084 lea 44084 ,%a5 4a530: 2f02 movel %d2,%sp@- 4a532: 4879 0005 d432 pea 5d432 <_Status_Object_name_errors_to_status+0x14> 4a538: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a53a: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4a53c: 4fef 000c lea %sp@(12),%sp 4a540: b7ca cmpal %a2,%a3 4a542: 672c beqs 4a570 <_Watchdog_Report_chain+0x64> 4a544: 49f9 0004 a588 lea 4a588 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4a54a: 2f0a movel %a2,%sp@- 4a54c: 42a7 clrl %sp@- 4a54e: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 4a550: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 4a552: 508f addql #8,%sp 4a554: b7ca cmpal %a2,%a3 4a556: 66f2 bnes 4a54a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4a558: 2f02 movel %d2,%sp@- 4a55a: 4879 0005 d449 pea 5d449 <_Status_Object_name_errors_to_status+0x2b> 4a560: 4e95 jsr %a5@ 4a562: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4a564: 46c3 movew %d3,%sr } 4a566: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a56c: 4e5e unlk %fp 4a56e: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4a570: 4879 0005 d458 pea 5d458 <_Status_Object_name_errors_to_status+0x3a> 4a576: 4e95 jsr %a5@ 4a578: 588f addql #4,%sp } _ISR_Enable( level ); 4a57a: 46c3 movew %d3,%sr } 4a57c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a582: 4e5e unlk %fp ... =============================================================================== 00049004 <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 49004: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 4900a: 4e56 ffe8 linkw %fp,#-24 4900e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49012: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 49016: 40c2 movew %sr,%d2 49018: 8082 orl %d2,%d0 4901a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4901c: 264c moveal %a4,%a3 4901e: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 49020: b7ca cmpal %a2,%a3 49022: 673e beqs 49062 <_Watchdog_Tickle+0x5e> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 49024: 202a 0010 movel %a2@(16),%d0 49028: 4bf9 0004 8f64 lea 48f64 <_Watchdog_Remove>,%a5 4902e: 6708 beqs 49038 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 49030: 5380 subql #1,%d0 49032: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 49036: 662a bnes 49062 <_Watchdog_Tickle+0x5e> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49038: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4903e: 2f0a movel %a2,%sp@- 49040: 4e95 jsr %a5@ _ISR_Enable( level ); 49042: 46c2 movew %d2,%sr switch( watchdog_state ) { 49044: 7202 moveq #2,%d1 49046: 588f addql #4,%sp 49048: b280 cmpl %d0,%d1 4904a: 6722 beqs 4906e <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4904c: 2003 movel %d3,%d0 4904e: 40c2 movew %sr,%d2 49050: 8082 orl %d2,%d0 49052: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49054: 2014 movel %a4@,%d0 49056: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 49058: b08b cmpl %a3,%d0 4905a: 6706 beqs 49062 <_Watchdog_Tickle+0x5e> 4905c: 4aaa 0010 tstl %a2@(16) 49060: 67dc beqs 4903e <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 49062: 46c2 movew %d2,%sr } 49064: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4906a: 4e5e unlk %fp 4906c: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 4906e: 2f2a 0024 movel %a2@(36),%sp@- 49072: 2f2a 0020 movel %a2@(32),%sp@- 49076: 206a 001c moveal %a2@(28),%a0 4907a: 4e90 jsr %a0@ 4907c: 508f addql #8,%sp 4907e: 60cc bras 4904c <_Watchdog_Tickle+0x48> =============================================================================== 000490e8 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490e8: 4e56 0000 linkw %fp,#0 490ec: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 490ee: 2639 0005 c298 movel 5c298 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490f4: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 490f6: 2439 0005 c294 movel 5c294 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 490fc: 4a39 0005 c2bc tstb 5c2bc 49102: 6628 bnes 4912c <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 49104: 4878 0004 pea 4 49108: 2f03 movel %d3,%sp@- 4910a: 2f02 movel %d2,%sp@- 4910c: 4879 0005 d9ea pea 5d9ea <_Workspace_Area> 49112: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49118: 4fef 0010 lea %sp@(16),%sp 4911c: 4a80 tstl %d0 4911e: 671e beqs 4913e <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 49120: 242e fff8 movel %fp@(-8),%d2 49124: 262e fffc movel %fp@(-4),%d3 49128: 4e5e unlk %fp 4912a: 4e75 rts uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 4912c: 2f03 movel %d3,%sp@- 4912e: 42a7 clrl %sp@- 49130: 2f02 movel %d2,%sp@- 49132: 4eb9 0004 e0f8 jsr 4e0f8 49138: 4fef 000c lea %sp@(12),%sp 4913c: 60c6 bras 49104 <_Workspace_Handler_initialization+0x1c> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4913e: 4878 0003 pea 3 49142: 4878 0001 pea 1 49146: 42a7 clrl %sp@- 49148: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... =============================================================================== 0004cb38 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4cb38: 4e56 ffe8 linkw %fp,#-24 4cb3c: 202e 0010 movel %fp@(16),%d0 4cb40: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4cb44: 242e 0008 movel %fp@(8),%d2 4cb48: 262e 000c movel %fp@(12),%d3 4cb4c: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4cb50: 4a82 tstl %d2 4cb52: 677a beqs 4cbce return RTEMS_INVALID_NAME; if ( !id ) 4cb54: 4a8a tstl %a2 4cb56: 6700 00ce beqw 4cc26 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4cb5a: 0803 0004 btst #4,%d3 4cb5e: 677a beqs 4cbda the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4cb60: 4a80 tstl %d0 4cb62: 6700 00b4 beqw 4cc18 4cb66: 2239 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d1 4cb6c: 5281 addql #1,%d1 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4cb6e: 42ae fff8 clrl %fp@(-8) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4cb72: 2d40 fffc movel %d0,%fp@(-4) 4cb76: 23c1 0005 d9c8 movel %d1,5d9c8 <_Thread_Dispatch_disable_level> * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 4cb7c: 4879 0005 dbea pea 5dbea <_Barrier_Information> 4cb82: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cb88: 588f addql #4,%sp 4cb8a: 2640 moveal %d0,%a3 4cb8c: 4a80 tstl %d0 4cb8e: 6776 beqs 4cc06 <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4cb90: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4cb94: 486e fff8 pea %fp@(-8) 4cb98: 486b 0014 pea %a3@(20) 4cb9c: 4eb9 0004 d0cc jsr 4d0cc <_CORE_barrier_Initialize> 4cba2: 202b 0008 movel %a3@(8),%d0 4cba6: 4281 clrl %d1 4cba8: 2079 0005 dc02 moveal 5dc02 <_Barrier_Information+0x18>,%a0 4cbae: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cbb0: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cbb4: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4cbb8: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4cbba: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4cbc0: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4cbc2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cbc4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbca: 4e5e unlk %fp 4cbcc: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4cbce: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbd0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbd6: 4e5e unlk %fp 4cbd8: 4e75 rts if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4cbda: 7201 moveq #1,%d1 4cbdc: 2d41 fff8 movel %d1,%fp@(-8) 4cbe0: 2239 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d1 4cbe6: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4cbe8: 2d40 fffc movel %d0,%fp@(-4) 4cbec: 23c1 0005 d9c8 movel %d1,5d9c8 <_Thread_Dispatch_disable_level> 4cbf2: 4879 0005 dbea pea 5dbea <_Barrier_Information> 4cbf8: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cbfe: 588f addql #4,%sp 4cc00: 2640 moveal %d0,%a3 4cc02: 4a80 tstl %d0 4cc04: 668a bnes 4cb90 _Thread_Enable_dispatch(); 4cc06: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4cc0c: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cc0e: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cc14: 4e5e unlk %fp 4cc16: 4e75 rts return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4cc18: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cc1c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cc22: 4e5e unlk %fp 4cc24: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4cc26: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cc28: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cc2e: 4e5e unlk %fp ... =============================================================================== 00046a5c : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 46a5c: 4e56 fff8 linkw %fp,#-8 46a60: 2f0a movel %a2,%sp@- 46a62: 246e 0008 moveal %fp@(8),%a2 46a66: 2f02 movel %d2,%sp@- struct timespec newtime; if ( !time_buffer ) 46a68: 4a8a tstl %a2 46a6a: 6772 beqs 46ade <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 46a6c: 2f0a movel %a2,%sp@- 46a6e: 4eb9 0004 6c3c jsr 46c3c <_TOD_Validate> 46a74: 588f addql #4,%sp 46a76: 4a00 tstb %d0 46a78: 660e bnes 46a88 _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46a7a: 242e fff0 movel %fp@(-16),%d2 struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 46a7e: 7014 moveq #20,%d0 _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46a80: 246e fff4 moveal %fp@(-12),%a2 46a84: 4e5e unlk %fp 46a86: 4e75 rts if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 46a88: 2f0a movel %a2,%sp@- 46a8a: 4eb9 0004 6b2c jsr 46b2c <_TOD_To_seconds> newtime.tv_nsec = time_buffer->ticks * 46a90: 242a 0018 movel %a2@(24),%d2 46a94: 41f9 0005 ead0 lea 5ead0 ,%a0 46a9a: 4c10 2800 mulsl %a0@,%d2 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 46a9e: 2d40 fff8 movel %d0,%fp@(-8) newtime.tv_nsec = time_buffer->ticks * 46aa2: 203c 0000 03e8 movel #1000,%d0 46aa8: 4c02 0800 mulsl %d2,%d0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46aac: 2239 0006 7fb8 movel 67fb8 <_Thread_Dispatch_disable_level>,%d1 46ab2: 5281 addql #1,%d1 46ab4: 2d40 fffc movel %d0,%fp@(-4) 46ab8: 23c1 0006 7fb8 movel %d1,67fb8 <_Thread_Dispatch_disable_level> rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 46abe: 486e fff8 pea %fp@(-8) 46ac2: 4eb9 0004 856c jsr 4856c <_TOD_Set> _Thread_Enable_dispatch(); 46ac8: 4eb9 0004 9880 jsr 49880 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46ace: 242e fff0 movel %fp@(-16),%d2 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 46ad2: 508f addql #8,%sp newtime.tv_nsec = time_buffer->ticks * rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); 46ad4: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46ad6: 246e fff4 moveal %fp@(-12),%a2 46ada: 4e5e unlk %fp 46adc: 4e75 rts 46ade: 242e fff0 movel %fp@(-16),%d2 rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 46ae2: 7009 moveq #9,%d0 _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46ae4: 246e fff4 moveal %fp@(-12),%a2 46ae8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d014 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4d014: 4e56 0000 linkw %fp,#0 4d018: 202e 0008 movel %fp@(8),%d0 4d01c: 2f03 movel %d3,%sp@- 4d01e: 222e 000c movel %fp@(12),%d1 4d022: 206e 0010 moveal %fp@(16),%a0 4d026: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4d028: b0b9 0005 dbe2 cmpl 5dbe2 <_IO_Number_of_drivers>,%d0 4d02e: 642c bccs 4d05c <== NEVER TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 4d030: 2600 movel %d0,%d3 4d032: 2400 movel %d0,%d2 4d034: e78b lsll #3,%d3 4d036: eb8a lsll #5,%d2 4d038: 2279 0005 dbe6 moveal 5dbe6 <_IO_Driver_address_table>,%a1 4d03e: 9483 subl %d3,%d2 4d040: 2271 280c moveal %a1@(0000000c,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4d044: 4a89 tstl %a1 4d046: 671e beqs 4d066 4d048: 2d48 0010 movel %a0,%fp@(16) 4d04c: 2d41 000c movel %d1,%fp@(12) 4d050: 2d40 0008 movel %d0,%fp@(8) } 4d054: 241f movel %sp@+,%d2 4d056: 261f movel %sp@+,%d3 4d058: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4d05a: 4ed1 jmp %a1@ } 4d05c: 241f movel %sp@+,%d2 void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4d05e: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 4d060: 261f movel %sp@+,%d3 4d062: 4e5e unlk %fp 4d064: 4e75 rts 4d066: 241f movel %sp@+,%d2 if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4d068: 4280 clrl %d0 } 4d06a: 261f movel %sp@+,%d3 4d06c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048334 : 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 ) { 48334: 4e56 fff4 linkw %fp,#-12 48338: 226e 000c moveal %fp@(12),%a1 4833c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48340: 242e 0008 movel %fp@(8),%d2 48344: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 48348: 2039 0006 3d86 movel 63d86 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 4834e: 2239 0006 3bda movel 63bda <_ISR_Nest_level>,%d1 48354: 6600 009c bnew 483f2 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 48358: 4a8a tstl %a2 4835a: 6700 00ea beqw 48446 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 4835e: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 48360: 4a89 tstl %a1 48362: 6700 00e2 beqw 48446 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48366: 4a91 tstl %a1@ 48368: 6700 00d4 beqw 4843e return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4836c: b480 cmpl %d0,%d2 4836e: 6476 bccs 483e6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48370: 2039 0006 3b40 movel 63b40 <_Thread_Dispatch_disable_level>,%d0 48376: 5280 addql #1,%d0 48378: 23c0 0006 3b40 movel %d0,63b40 <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 4837e: 4a82 tstl %d2 48380: 667c bnes 483fe static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 48382: 2039 0006 3d86 movel 63d86 <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48388: 6700 00fc beqw 48486 4838c: 2239 0006 3d8a movel 63d8a <_IO_Driver_address_table>,%d1 48392: 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; 48394: 4a90 tstl %a0@ 48396: 6700 008e beqw 48426 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 ) { 4839a: 5282 addql #1,%d2 4839c: 41e8 0018 lea %a0@(24),%a0 483a0: b480 cmpl %d0,%d2 483a2: 65f0 bcss 48394 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 483a4: 2482 movel %d2,%a2@ if ( m != n ) 483a6: b480 cmpl %d0,%d2 483a8: 6700 00de beqw 48488 483ac: 2602 movel %d2,%d3 483ae: 2002 movel %d2,%d0 483b0: 2041 moveal %d1,%a0 483b2: e78b lsll #3,%d3 483b4: eb88 lsll #5,%d0 483b6: 9083 subl %d3,%d0 483b8: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 483ba: 20d9 movel %a1@+,%a0@+ 483bc: 20d9 movel %a1@+,%a0@+ 483be: 20d9 movel %a1@+,%a0@+ 483c0: 20d9 movel %a1@+,%a0@+ 483c2: 20d9 movel %a1@+,%a0@+ 483c4: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 483c6: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 483cc: 2d42 0008 movel %d2,%fp@(8) } 483d0: 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 ); 483d6: 42ae 0010 clrl %fp@(16) 483da: 42ae 000c clrl %fp@(12) } 483de: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483e0: 4ef9 0005 092c jmp 5092c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 483e6: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ee: 4e5e unlk %fp 483f0: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 483f2: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483f4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483fa: 4e5e unlk %fp 483fc: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 483fe: 2202 movel %d2,%d1 48400: 2002 movel %d2,%d0 48402: e789 lsll #3,%d1 48404: eb88 lsll #5,%d0 48406: 2079 0006 3d8a moveal 63d8a <_IO_Driver_address_table>,%a0 4840c: 9081 subl %d1,%d0 4840e: 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; 48410: 4a90 tstl %a0@ 48412: 673e beqs 48452 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(); 48414: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 4841a: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4841c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48422: 4e5e unlk %fp 48424: 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; 48426: 4aa8 0004 tstl %a0@(4) 4842a: 6700 ff78 beqw 483a4 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 ) { 4842e: 5282 addql #1,%d2 48430: 41e8 0018 lea %a0@(24),%a0 48434: b480 cmpl %d0,%d2 48436: 6500 ff5c bcsw 48394 4843a: 6000 ff68 braw 483a4 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4843e: 4aa9 0004 tstl %a1@(4) 48442: 6600 ff28 bnew 4836c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48446: 7009 moveq #9,%d0 } 48448: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4844e: 4e5e unlk %fp 48450: 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; 48452: 4aa8 0004 tstl %a0@(4) 48456: 66bc bnes 48414 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48458: 20d9 movel %a1@+,%a0@+ 4845a: 20d9 movel %a1@+,%a0@+ 4845c: 20d9 movel %a1@+,%a0@+ 4845e: 20d9 movel %a1@+,%a0@+ 48460: 20d9 movel %a1@+,%a0@+ 48462: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 48464: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 48466: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4846c: 2d42 0008 movel %d2,%fp@(8) } 48470: 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 ); 48476: 42ae 0010 clrl %fp@(16) 4847a: 42ae 000c clrl %fp@(12) } 4847e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48480: 4ef9 0005 092c jmp 5092c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48486: 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(); 48488: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 4848e: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48490: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48496: 4e5e unlk %fp ... =============================================================================== 00048aa8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 48aa8: 4e56 fff0 linkw %fp,#-16 48aac: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48ab0: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 48ab4: 4a8b tstl %a3 48ab6: 6744 beqs 48afc <== NEVER TAKEN 48ab8: 49f9 0006 7f74 lea 67f74 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 48abe: 2054 moveal %a4@,%a0 48ac0: 4a88 tstl %a0 48ac2: 672e beqs 48af2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 48ac4: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 48ac8: 4a8a tstl %a2 48aca: 6726 beqs 48af2 <== NEVER TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48acc: 4a6a 000e tstw %a2@(14) 48ad0: 6720 beqs 48af2 <== NEVER TAKEN 48ad2: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 48ad4: 206a 0018 moveal %a2@(24),%a0 48ad8: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48adc: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 48ade: 4a80 tstl %d0 48ae0: 6706 beqs 48ae8 <== NEVER TAKEN continue; (*routine)(the_thread); 48ae2: 2f00 movel %d0,%sp@- 48ae4: 4e93 jsr %a3@ 48ae6: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48ae8: 4280 clrl %d0 48aea: 302a 000e movew %a2@(14),%d0 48aee: b480 cmpl %d0,%d2 48af0: 63e2 blss 48ad4 48af2: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 48af4: b9fc 0006 7f84 cmpal #425860,%a4 48afa: 66c2 bnes 48abe (*routine)(the_thread); } } } 48afc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48b02: 4e5e unlk %fp ... =============================================================================== 00047764 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 47764: 4e56 0000 linkw %fp,#0 47768: 2f0a movel %a2,%sp@- 4776a: 246e 0010 moveal %fp@(16),%a2 4776e: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 47770: 4a8a tstl %a2 47772: 6766 beqs 477da return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47774: 2f2e 000c movel %fp@(12),%sp@- 47778: 2f2e 0008 movel %fp@(8),%sp@- 4777c: 4eb9 0004 9314 jsr 49314 <_Objects_Get_information> if ( !obj_info ) 47782: 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 ); 47784: 2040 moveal %d0,%a0 if ( !obj_info ) 47786: 4a80 tstl %d0 47788: 675e beqs 477e8 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 4778a: 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; 4778e: 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; 47790: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 47796: 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; 4779a: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 477a0: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477a4: 6750 beqs 477f6 <== NEVER TAKEN 477a6: 2068 0018 moveal %a0@(24),%a0 477aa: 7201 moveq #1,%d1 477ac: 7001 moveq #1,%d0 477ae: 93c9 subal %a1,%a1 477b0: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 477b2: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 477b6: 6718 beqs 477d0 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++ ) 477b8: 2200 movel %d0,%d1 477ba: b082 cmpl %d2,%d0 477bc: 63f2 blss 477b0 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477be: 2549 000e movel %a1,%a2@(14) 477c2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 477c4: 242e fff8 movel %fp@(-8),%d2 477c8: 246e fffc moveal %fp@(-4),%a2 477cc: 4e5e unlk %fp 477ce: 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++; 477d0: 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++ ) 477d2: 2200 movel %d0,%d1 477d4: b082 cmpl %d2,%d0 477d6: 63d8 blss 477b0 <== NEVER TAKEN 477d8: 60e4 bras 477be unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477da: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 477de: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477e0: 246e fffc moveal %fp@(-4),%a2 477e4: 4e5e unlk %fp 477e6: 4e75 rts 477e8: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 477ec: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477ee: 246e fffc moveal %fp@(-4),%a2 477f2: 4e5e unlk %fp 477f4: 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++ ) 477f6: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477f8: 4280 clrl %d0 <== NOT EXECUTED 477fa: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 477fe: 60c4 bras 477c4 <== NOT EXECUTED =============================================================================== 0005692c : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 5692c: 4e56 ffe8 linkw %fp,#-24 56930: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 56934: 242e 0008 movel %fp@(8),%d2 56938: 2a2e 000c movel %fp@(12),%d5 5693c: 282e 0010 movel %fp@(16),%d4 56940: 262e 0014 movel %fp@(20),%d3 56944: 246e 001c moveal %fp@(28),%a2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56948: 4a82 tstl %d2 5694a: 673a beqs 56986 return RTEMS_INVALID_NAME; if ( !starting_address ) 5694c: 4a85 tstl %d5 5694e: 671e beqs 5696e return RTEMS_INVALID_ADDRESS; if ( !id ) 56950: 4a8a tstl %a2 56952: 671a beqs 5696e <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 56954: 4a84 tstl %d4 56956: 6722 beqs 5697a 56958: 4a83 tstl %d3 5695a: 671e beqs 5697a 5695c: b684 cmpl %d4,%d3 5695e: 621a bhis 5697a 56960: 7003 moveq #3,%d0 56962: c083 andl %d3,%d0 56964: 6614 bnes 5697a !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 56966: 103c 0003 moveb #3,%d0 5696a: c085 andl %d5,%d0 5696c: 6724 beqs 56992 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 5696e: 7009 moveq #9,%d0 } 56970: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56976: 4e5e unlk %fp 56978: 4e75 rts 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 5697a: 7008 moveq #8,%d0 } 5697c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56982: 4e5e unlk %fp 56984: 4e75 rts rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56986: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56988: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5698e: 4e5e unlk %fp 56990: 4e75 rts 56992: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 56998: 5280 addql #1,%d0 5699a: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level> * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 569a0: 4879 0007 cf48 pea 7cf48 <_Partition_Information> 569a6: 4eb9 0005 b39c jsr 5b39c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 569ac: 588f addql #4,%sp 569ae: 2640 moveal %d0,%a3 569b0: 4a80 tstl %d0 569b2: 675a beqs 56a0e _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 569b4: 2745 0010 movel %d5,%a3@(16) the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 569b8: 2004 movel %d4,%d0 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 569ba: 276e 0018 001c movel %fp@(24),%a3@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 569c0: 4c43 0000 remul %d3,%d0,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 569c4: 2744 0014 movel %d4,%a3@(20) the_partition->buffer_size = buffer_size; 569c8: 2743 0018 movel %d3,%a3@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 569cc: 42ab 0020 clrl %a3@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 569d0: 2f03 movel %d3,%sp@- 569d2: 2f00 movel %d0,%sp@- 569d4: 2f05 movel %d5,%sp@- 569d6: 486b 0024 pea %a3@(36) 569da: 4eb9 0005 9ee8 jsr 59ee8 <_Chain_Initialize> 569e0: 202b 0008 movel %a3@(8),%d0 569e4: 4281 clrl %d1 569e6: 2079 0007 cf60 moveal 7cf60 <_Partition_Information+0x18>,%a0 569ec: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 569ee: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 569f2: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 569f6: 2480 movel %d0,%a2@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 569f8: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 569fe: 4fef 0010 lea %sp@(16),%sp name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 56a02: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 56a04: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a0a: 4e5e unlk %fp 56a0c: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 56a0e: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 56a14: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56a16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00056b40 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 56b40: 4e56 fffc linkw %fp,#-4 56b44: 2f0a movel %a2,%sp@- 56b46: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 56b48: 486e fffc pea %fp@(-4) 56b4c: 2f2e 0008 movel %fp@(8),%sp@- 56b50: 4879 0007 cf48 pea 7cf48 <_Partition_Information> 56b56: 242e 000c movel %fp@(12),%d2 56b5a: 4eb9 0005 b874 jsr 5b874 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b60: 4fef 000c lea %sp@(12),%sp 56b64: 2440 moveal %d0,%a2 56b66: 4aae fffc tstl %fp@(-4) 56b6a: 670e beqs 56b7a case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b6c: 242e fff4 movel %fp@(-12),%d2 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b70: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b72: 246e fff8 moveal %fp@(-8),%a2 56b76: 4e5e unlk %fp 56b78: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56b7a: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 56b7e: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56b82: b082 cmpl %d2,%d0 56b84: 623c bhis 56bc2 56b86: d280 addl %d0,%d1 56b88: b282 cmpl %d2,%d1 56b8a: 6536 bcss 56bc2 <== NEVER TAKEN return ( 56b8c: 2202 movel %d2,%d1 56b8e: 9280 subl %d0,%d1 56b90: 2001 movel %d1,%d0 56b92: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 56b98: 4a81 tstl %d1 56b9a: 6626 bnes 56bc2 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56b9c: 2f02 movel %d2,%sp@- 56b9e: 486a 0024 pea %a2@(36) 56ba2: 4eb9 0005 9e74 jsr 59e74 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 56ba8: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56bac: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bb2: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56bb6: 508f addql #8,%sp case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); 56bb8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bba: 246e fff8 moveal %fp@(-8),%a2 56bbe: 4e5e unlk %fp 56bc0: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56bc2: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bc8: 242e fff4 movel %fp@(-12),%d2 _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56bcc: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bce: 246e fff8 moveal %fp@(-8),%a2 56bd2: 4e5e unlk %fp ... =============================================================================== 00055fe0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 55fe0: 4e56 fffc linkw %fp,#-4 55fe4: 2f0a movel %a2,%sp@- 55fe6: 246e 0010 moveal %fp@(16),%a2 55fea: 2f02 movel %d2,%sp@- 55fec: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 55ff0: 4a8a tstl %a2 55ff2: 6762 beqs 56056 <== NEVER TAKEN 55ff4: 486e fffc pea %fp@(-4) 55ff8: 2f2e 0008 movel %fp@(8),%sp@- 55ffc: 4879 0007 cf10 pea 7cf10 <_Dual_ported_memory_Information> 56002: 4eb9 0005 b874 jsr 5b874 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 56008: 4fef 000c lea %sp@(12),%sp 5600c: 4aae fffc tstl %fp@(-4) 56010: 6624 bnes 56036 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 56012: 2202 movel %d2,%d1 56014: 2040 moveal %d0,%a0 56016: 92a8 0010 subl %a0@(16),%d1 if ( ending > the_port->length ) 5601a: b2a8 0018 cmpl %a0@(24),%d1 5601e: 6324 blss 56044 *external = internal; 56020: 2482 movel %d2,%a2@ else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 56022: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 56028: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5602a: 242e fff4 movel %fp@(-12),%d2 5602e: 246e fff8 moveal %fp@(-8),%a2 56032: 4e5e unlk %fp 56034: 4e75 rts 56036: 242e fff4 movel %fp@(-12),%d2 if ( !external ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 5603a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5603c: 246e fff8 moveal %fp@(-8),%a2 56040: 4e5e unlk %fp 56042: 4e75 rts case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 56044: 2040 moveal %d0,%a0 56046: d2a8 0014 addl %a0@(20),%d1 5604a: 2481 movel %d1,%a2@ ending ); _Thread_Enable_dispatch(); 5604c: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 56052: 4280 clrl %d0 56054: 60d4 bras 5602a case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56056: 242e fff4 movel %fp@(-12),%d2 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 5605a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5605c: 246e fff8 moveal %fp@(-8),%a2 56060: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046dc0 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 46dc0: 4e56 ffec linkw %fp,#-20 46dc4: 48d7 040c moveml %d2-%d3/%a2,%sp@ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 46dc8: 486e fffc pea %fp@(-4) 46dcc: 242e 0008 movel %fp@(8),%d2 46dd0: 2f02 movel %d2,%sp@- 46dd2: 4879 0005 fa14 pea 5fa14 <_Rate_monotonic_Information> 46dd8: 4eb9 0004 9008 jsr 49008 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 46dde: 4fef 000c lea %sp@(12),%sp 46de2: 2440 moveal %d0,%a2 46de4: 4aae fffc tstl %fp@(-4) 46de8: 661e bnes 46e08 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 46dea: 2039 0005 fbca movel 5fbca <_Thread_Executing>,%d0 46df0: b0aa 0040 cmpl %a2@(64),%d0 46df4: 671e beqs 46e14 _Thread_Enable_dispatch(); 46df6: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46dfc: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46dfe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e04: 4e5e unlk %fp 46e06: 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; 46e08: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46e0a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e10: 4e5e unlk %fp 46e12: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 46e14: 4aae 000c tstl %fp@(12) 46e18: 6700 00ce beqw 46ee8 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 46e1c: 203c 0000 0700 movel #1792,%d0 46e22: 40c3 movew %sr,%d3 46e24: 8083 orl %d3,%d0 46e26: 46c0 movew %d0,%sr switch ( the_period->state ) { 46e28: 202a 0038 movel %a2@(56),%d0 46e2c: 7202 moveq #2,%d1 46e2e: b280 cmpl %d0,%d1 46e30: 6700 00dc beqw 46f0e 46e34: 123c 0004 moveb #4,%d1 46e38: b280 cmpl %d0,%d1 46e3a: 6762 beqs 46e9e 46e3c: 4a80 tstl %d0 46e3e: 66c8 bnes 46e08 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 46e40: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 46e42: 2f0a movel %a2,%sp@- 46e44: 2d40 fff8 movel %d0,%fp@(-8) 46e48: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46e4e: 223c 0004 7224 movel #291364,%d1 the_watchdog->id = id; 46e54: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46e58: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46e5c: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 46e60: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46e62: 2542 001c movel %d2,%a2@(28) 46e66: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46e6a: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 46e6e: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 46e72: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46e76: 486a 0010 pea %a2@(16) 46e7a: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 46e80: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46e86: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46e8c: 202e fff8 movel %fp@(-8),%d0 46e90: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46e94: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e9a: 4e5e unlk %fp 46e9c: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 46e9e: 2f0a movel %a2,%sp@- 46ea0: 4eb9 0004 6ca6 jsr 46ca6 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 46ea6: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 46ea8: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46eaa: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46eac: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 46eb0: 2541 0038 movel %d1,%a2@(56) 46eb4: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 46eb8: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46ebc: 486a 0010 pea %a2@(16) 46ec0: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 46ec6: 2d40 fff8 movel %d0,%fp@(-8) 46eca: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46ed0: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 46ed6: 202e fff8 movel %fp@(-8),%d0 46eda: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46ede: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46ee4: 4e5e unlk %fp 46ee6: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 46ee8: 202a 0038 movel %a2@(56),%d0 46eec: 7204 moveq #4,%d1 46eee: b280 cmpl %d0,%d1 46ef0: 6400 009c bccw 46f8e 46ef4: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 46ef6: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 46efa: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 46f00: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46f04: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46f0a: 4e5e unlk %fp 46f0c: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 46f0e: 2f0a movel %a2,%sp@- 46f10: 4eb9 0004 6ca6 jsr 46ca6 <_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; 46f16: 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; 46f1a: 7001 moveq #1,%d0 the_period->next_length = length; 46f1c: 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; 46f20: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 46f24: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 46f26: 2079 0005 fbca moveal 5fbca <_Thread_Executing>,%a0 46f2c: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 46f32: 4878 4000 pea 4000 46f36: 2f08 movel %a0,%sp@- 46f38: 4eb9 0004 a180 jsr 4a180 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 46f3e: 203c 0000 0700 movel #1792,%d0 46f44: 40c1 movew %sr,%d1 46f46: 8081 orl %d1,%d0 46f48: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 46f4a: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 46f4c: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 46f50: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 46f54: 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 ) 46f56: 7203 moveq #3,%d1 46f58: 4fef 000c lea %sp@(12),%sp 46f5c: b280 cmpl %d0,%d1 46f5e: 6712 beqs 46f72 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 46f60: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46f66: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46f68: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46f6e: 4e5e unlk %fp 46f70: 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 ); 46f72: 4878 4000 pea 4000 46f76: 2f39 0005 fbca movel 5fbca <_Thread_Executing>,%sp@- 46f7c: 4eb9 0004 94a0 jsr 494a0 <_Thread_Clear_state> 46f82: 508f addql #8,%sp _Thread_Enable_dispatch(); 46f84: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46f8a: 4280 clrl %d0 46f8c: 60da bras 46f68 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 46f8e: 41f9 0005 d212 lea 5d212 ,%a0 46f94: 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(); 46f98: 2d40 fff8 movel %d0,%fp@(-8) 46f9c: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> return( return_value ); 46fa2: 202e fff8 movel %fp@(-8),%d0 46fa6: 6000 ff5c braw 46f04 ... =============================================================================== 00046fac : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 46fac: 4e56 ff78 linkw %fp,#-136 46fb0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 46fb4: 262e 0008 movel %fp@(8),%d3 46fb8: 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 ) 46fbc: 4a8a tstl %a2 46fbe: 6700 0082 beqw 47042 return; (*print)( context, "Period information by period\n" ); 46fc2: 4879 0005 d226 pea 5d226 46fc8: 2f03 movel %d3,%sp@- 46fca: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 46fcc: 4879 0005 d244 pea 5d244 46fd2: 2f03 movel %d3,%sp@- 46fd4: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 46fd6: 4879 0005 d266 pea 5d266 46fdc: 2f03 movel %d3,%sp@- 46fde: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 46fe0: 4879 0005 d289 pea 5d289 46fe6: 2f03 movel %d3,%sp@- 46fe8: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 46fea: 4fef 001c lea %sp@(28),%sp 46fee: 2ebc 0005 d2d4 movel #381652,%sp@ 46ff4: 2f03 movel %d3,%sp@- 46ff6: 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 ; 46ff8: 2439 0005 fa1a movel 5fa1a <_Rate_monotonic_Information+0x6>,%d2 46ffe: 508f addql #8,%sp 47000: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2 47006: 623a bhis 47042 <== NEVER TAKEN 47008: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 4700a: 2a0e movel %fp,%d5 4700c: 0684 ffff ffa2 addil #-94,%d4 47012: 47f9 0004 c90c lea 4c90c ,%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 ); 47018: 4bf9 0004 c9cc lea 4c9cc ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 4701e: 5b85 subql #5,%d5 47020: 49f9 0004 7304 lea 47304 ,%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 ); 47026: 2e3c 0004 a684 movel #304772,%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 ); 4702c: 2f04 movel %d4,%sp@- 4702e: 2f02 movel %d2,%sp@- 47030: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 47032: 508f addql #8,%sp 47034: 4a80 tstl %d0 47036: 6714 beqs 4704c * 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++ ) { 47038: 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 ; 4703a: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2 47040: 63ea blss 4702c the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 47042: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47048: 4e5e unlk %fp 4704a: 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 ); 4704c: 486e ffda pea %fp@(-38) 47050: 2f02 movel %d2,%sp@- 47052: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47054: 2f05 movel %d5,%sp@- 47056: 4878 0005 pea 5 4705a: 2f2e ffda movel %fp@(-38),%sp@- 4705e: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 47060: 2f2e ffa6 movel %fp@(-90),%sp@- 47064: 2f2e ffa2 movel %fp@(-94),%sp@- 47068: 2f05 movel %d5,%sp@- 4706a: 2f02 movel %d2,%sp@- 4706c: 4879 0005 d320 pea 5d320 47072: 2f03 movel %d3,%sp@- 47074: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 47076: 202e ffa2 movel %fp@(-94),%d0 4707a: 4fef 002c lea %sp@(44),%sp 4707e: 6618 bnes 47098 (*print)( context, "\n" ); 47080: 4879 0005 d6de pea 5d6de * 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++ ) { 47086: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 47088: 2f03 movel %d3,%sp@- 4708a: 4e92 jsr %a2@ continue; 4708c: 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 ; 4708e: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2 47094: 6396 blss 4702c <== ALWAYS TAKEN 47096: 60aa bras 47042 <== 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 ); 47098: 486e fff2 pea %fp@(-14) 4709c: 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++ ) { 4709e: 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 ); 470a0: 2f00 movel %d0,%sp@- 470a2: 486e ffba pea %fp@(-70) 470a6: 4e90 jsr %a0@ (*print)( context, 470a8: 202e fff6 movel %fp@(-10),%d0 470ac: 223c 0000 03e8 movel #1000,%d1 470b2: 4c41 0800 remsl %d1,%d0,%d0 470b6: 2c2e ffb6 movel %fp@(-74),%d6 470ba: 2f00 movel %d0,%sp@- 470bc: 2001 movel %d1,%d0 470be: 2f2e fff2 movel %fp@(-14),%sp@- 470c2: 4c40 6806 remsl %d0,%d6,%d6 470c6: 202e ffae movel %fp@(-82),%d0 470ca: 2246 moveal %d6,%a1 470cc: 223c 0000 03e8 movel #1000,%d1 470d2: 2f09 movel %a1,%sp@- 470d4: 2f2e ffb2 movel %fp@(-78),%sp@- 470d8: 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, 470dc: 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, 470e2: 2f00 movel %d0,%sp@- 470e4: 2f2e ffaa movel %fp@(-86),%sp@- 470e8: 4879 0005 d337 pea 5d337 470ee: 2f03 movel %d3,%sp@- 470f0: 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); 470f2: 4fef 002c lea %sp@(44),%sp 470f6: 2047 moveal %d7,%a0 470f8: 486e fff2 pea %fp@(-14) 470fc: 2f2e ffa2 movel %fp@(-94),%sp@- 47100: 486e ffd2 pea %fp@(-46) 47104: 4e90 jsr %a0@ (*print)( context, 47106: 202e fff6 movel %fp@(-10),%d0 4710a: 4c46 0800 remsl %d6,%d0,%d0 4710e: 222e ffce movel %fp@(-50),%d1 47112: 2f00 movel %d0,%sp@- 47114: 2f2e fff2 movel %fp@(-14),%sp@- 47118: 4c46 1801 remsl %d6,%d1,%d1 4711c: 202e ffc6 movel %fp@(-58),%d0 47120: 2241 moveal %d1,%a1 47122: 2f09 movel %a1,%sp@- 47124: 2f2e ffca movel %fp@(-54),%sp@- 47128: 4c46 0800 remsl %d6,%d0,%d0 4712c: 2f00 movel %d0,%sp@- 4712e: 2f2e ffc2 movel %fp@(-62),%sp@- 47132: 4879 0005 d356 pea 5d356 47138: 2f03 movel %d3,%sp@- 4713a: 4e92 jsr %a2@ 4713c: 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 ; 47140: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2 47146: 6300 fee4 blsw 4702c 4714a: 6000 fef6 braw 47042 <== NOT EXECUTED =============================================================================== 00047168 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 47168: 4e56 0000 linkw %fp,#0 4716c: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 47172: 5280 addql #1,%d0 47174: 2f0a movel %a2,%sp@- 47176: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level> 4717c: 2f02 movel %d2,%sp@- /* * Cycle through all possible ids and try to reset 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 ; 4717e: 2439 0005 fa1a movel 5fa1a <_Rate_monotonic_Information+0x6>,%d2 47184: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2 4718a: 6216 bhis 471a2 <== NEVER TAKEN 4718c: 45f9 0004 71b4 lea 471b4 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 47192: 2f02 movel %d2,%sp@- * Cycle through all possible ids and try to reset 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++ ) { 47194: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 47196: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to reset 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 ; 47198: 588f addql #4,%sp 4719a: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2 471a0: 63f0 blss 47192 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 471a2: 242e fff8 movel %fp@(-8),%d2 471a6: 246e fffc moveal %fp@(-4),%a2 471aa: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 471ac: 4ef9 0004 9874 jmp 49874 <_Thread_Enable_dispatch> ... =============================================================================== 00057468 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 57468: 4e56 ffec linkw %fp,#-20 5746c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57470: 262e 0008 movel %fp@(8),%d3 57474: 242e 000c movel %fp@(12),%d2 57478: 246e 001c moveal %fp@(28),%a2 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 5747c: 4a83 tstl %d3 5747e: 6700 0096 beqw 57516 return RTEMS_INVALID_NAME; if ( !starting_address ) 57482: 4a82 tstl %d2 57484: 670a beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !id ) 57486: 4a8a tstl %a2 57488: 6706 beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 5748a: 7003 moveq #3,%d0 5748c: c082 andl %d2,%d0 5748e: 670c beqs 5749c return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 57490: 7009 moveq #9,%d0 } 57492: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57498: 4e5e unlk %fp 5749a: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5749c: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 574a8: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 574ae: 4eb9 0005 b39c jsr 5b39c <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 574b4: 508f addql #8,%sp 574b6: 2640 moveal %d0,%a3 574b8: 4a80 tstl %d0 574ba: 6766 beqs 57522 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574bc: 2f2e 0014 movel %fp@(20),%sp@- 574c0: 2f2e 0010 movel %fp@(16),%sp@- 574c4: 2f02 movel %d2,%sp@- 574c6: 486b 0068 pea %a3@(104) 574ca: 4eb9 0005 ae20 jsr 5ae20 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d0: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574d4: 2740 005c movel %d0,%a3@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d8: 6662 bnes 5753c */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 574da: 2f0b movel %a3,%sp@- 574dc: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b6d4 jsr 5b6d4 <_Objects_Free> 574f0: 202e fffc movel %fp@(-4),%d0 574f4: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 574f6: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57506: 202e fffc movel %fp@(-4),%d0 5750a: 588f addql #4,%sp } 5750c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57512: 4e5e unlk %fp 57514: 4e75 rts ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 57516: 7003 moveq #3,%d0 } } _RTEMS_Unlock_allocator(); return return_status; } 57518: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5751e: 4e5e unlk %fp 57520: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57522: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 57528: 7005 moveq #5,%d0 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 5752a: 2d40 fffc movel %d0,%fp@(-4) 5752e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57534: 202e fffc movel %fp@(-4),%d0 57538: 588f addql #4,%sp 5753a: 60d0 bras 5750c return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 5753c: 2742 0050 movel %d2,%a3@(80) the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57540: 222e 0018 movel %fp@(24),%d1 } else { the_region->starting_address = starting_address; the_region->length = length; 57544: 202e 0010 movel %fp@(16),%d0 the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57548: e489 lsrl #2,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 5754a: 242e 0014 movel %fp@(20),%d2 the_region->attribute_set = attribute_set; 5754e: 206e 0018 moveal %fp@(24),%a0 } else { the_region->starting_address = starting_address; the_region->length = length; 57552: 2740 0054 movel %d0,%a3@(84) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57556: 4280 clrl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 57558: 2742 0058 movel %d2,%a3@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 5755c: 7401 moveq #1,%d2 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; 5755e: 2748 0060 movel %a0,%a3@(96) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57562: c481 andl %d1,%d2 the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; 57564: 42ab 0064 clrl %a3@(100) _Thread_queue_Initialize( 57568: 4878 0006 pea 6 5756c: 4878 0040 pea 40 57570: 2f02 movel %d2,%sp@- 57572: 486b 0010 pea %a3@(16) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 57576: 4282 clrl %d2 57578: 2d40 fffc movel %d0,%fp@(-4) 5757c: 4eb9 0005 c8e4 jsr 5c8e4 <_Thread_queue_Initialize> 57582: 222b 0008 movel %a3@(8),%d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57586: 4fef 0010 lea %sp@(16),%sp 5758a: 2079 0007 cfd0 moveal 7cfd0 <_Region_Information+0x18>,%a0 57590: 3401 movew %d1,%d2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 57592: 2743 000c movel %d3,%a3@(12) 57596: 202e fffc movel %fp@(-4),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5759a: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 5759e: 2481 movel %d1,%a2@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 575a0: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 575b0: 202e fffc movel %fp@(-4),%d0 575b4: 588f addql #4,%sp 575b6: 6000 ff54 braw 5750c ... =============================================================================== 0005766c : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 5766c: 4e56 fff8 linkw %fp,#-8 57670: 2f0a movel %a2,%sp@- 57672: 2f02 movel %d2,%sp@- 57674: 242e 000c movel %fp@(12),%d2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 57678: 677e beqs 576f8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5767a: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 57686: 486e fff8 pea %fp@(-8) 5768a: 2f2e 0008 movel %fp@(8),%sp@- 5768e: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 57694: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5769a: 4fef 0010 lea %sp@(16),%sp 5769e: 2440 moveal %d0,%a2 576a0: 4aae fff8 tstl %fp@(-8) 576a4: 6640 bnes 576e6 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 576a6: 486e fffc pea %fp@(-4) 576aa: 2f2e 0010 movel %fp@(16),%sp@- 576ae: 2f02 movel %d2,%sp@- 576b0: 486a 0068 pea %a2@(104) 576b4: 4eb9 0005 ab10 jsr 5ab10 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 576ba: 4fef 0010 lea %sp@(16),%sp 576be: 4a80 tstl %d0 576c0: 6748 beqs 5770a the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 576c2: 7201 moveq #1,%d1 576c4: b280 cmpl %d0,%d1 576c6: 6760 beqs 57728 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576c8: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 576ce: 7418 moveq #24,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576d0: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 576d6: 588f addql #4,%sp } 576d8: 2002 movel %d2,%d0 576da: 242e fff0 movel %fp@(-16),%d2 576de: 246e fff4 moveal %fp@(-12),%a2 576e2: 4e5e unlk %fp 576e4: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576e6: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 576ec: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576ee: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 576f4: 588f addql #4,%sp 576f6: 60e0 bras 576d8 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 576f8: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 576fc: 2002 movel %d2,%d0 576fe: 242e fff0 movel %fp@(-16),%d2 57702: 246e fff4 moveal %fp@(-12),%a2 57706: 4e5e unlk %fp 57708: 4e75 rts length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 5770a: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 5770e: d1aa 005c addl %d0,%a2@(92) 57712: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 57714: d1aa 0054 addl %d0,%a2@(84) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57718: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57724: 588f addql #4,%sp 57726: 60b0 bras 576d8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57728: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 5772e: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57730: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57736: 588f addql #4,%sp 57738: 609e bras 576d8 ... =============================================================================== 000577d4 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 577d4: 4e56 fffc linkw %fp,#-4 577d8: 2f02 movel %d2,%sp@- 577da: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 577de: 6766 beqs 57846 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 577e0: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 577e6: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 577ec: 486e fffc pea %fp@(-4) 577f0: 2f2e 0008 movel %fp@(8),%sp@- 577f4: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 577fa: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57800: 4fef 0010 lea %sp@(16),%sp 57804: 4aae fffc tstl %fp@(-4) 57808: 662a bnes 57834 case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 5780a: 2f02 movel %d2,%sp@- 5780c: 2040 moveal %d0,%a0 5780e: 4868 0068 pea %a0@(104) 57812: 4282 clrl %d2 57814: 4eb9 0005 ad98 jsr 5ad98 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 5781a: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5781c: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 57822: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57828: 588f addql #4,%sp } 5782a: 2002 movel %d2,%d0 5782c: 242e fff8 movel %fp@(-8),%d2 57830: 4e5e unlk %fp 57832: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57834: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 5783a: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5783c: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57842: 588f addql #4,%sp 57844: 60e4 bras 5782a { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 57846: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 5784a: 2002 movel %d2,%d0 5784c: 242e fff8 movel %fp@(-8),%d2 57850: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000579c0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 579c0: 4e56 fffc linkw %fp,#-4 579c4: 2f03 movel %d3,%sp@- 579c6: 262e 0010 movel %fp@(16),%d3 579ca: 2f02 movel %d2,%sp@- 579cc: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 579d0: 6700 0092 beqw 57a64 return RTEMS_INVALID_ADDRESS; if ( !size ) 579d4: 4a83 tstl %d3 579d6: 6700 008c beqw 57a64 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 579da: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 579f4: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 579fa: 222e fffc movel %fp@(-4),%d1 579fe: 4fef 0010 lea %sp@(16),%sp 57a02: 6636 bnes 57a3a case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a04: 2f03 movel %d3,%sp@- 57a06: 2040 moveal %d0,%a0 57a08: 2f02 movel %d2,%sp@- 57a0a: 4868 0068 pea %a0@(104) 57a0e: 4eb9 0005 b274 jsr 5b274 <_Heap_Size_of_alloc_area> 57a14: 4fef 000c lea %sp@(12),%sp 57a18: 4a00 tstb %d0 57a1a: 6624 bnes 57a40 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a1c: 2f39 0007 d166 movel 7d166 <_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 ) ) 57a22: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a24: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 57a2a: 588f addql #4,%sp <== NOT EXECUTED } 57a2c: 2002 movel %d2,%d0 57a2e: 242e fff4 movel %fp@(-12),%d2 57a32: 262e fff8 movel %fp@(-8),%d3 57a36: 4e5e unlk %fp 57a38: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a3a: 7001 moveq #1,%d0 57a3c: b081 cmpl %d1,%d0 57a3e: 6712 beqs 57a52 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a40: 2f39 0007 d166 movel 7d166 <_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 ) ) 57a46: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a48: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57a4e: 588f addql #4,%sp 57a50: 60da bras 57a2c case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a52: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a58: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a5a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57a60: 588f addql #4,%sp 57a62: 60c8 bras 57a2c 57a64: 7409 moveq #9,%d2 } 57a66: 2002 movel %d2,%d0 57a68: 242e fff4 movel %fp@(-12),%d2 57a6c: 262e fff8 movel %fp@(-8),%d3 57a70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045a8c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 45a8c: 4e56 ffd4 linkw %fp,#-44 45a90: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 45a94: 262e 0008 movel %fp@(8),%d3 45a98: 242e 0010 movel %fp@(16),%d2 45a9c: 246e 0018 moveal %fp@(24),%a2 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aa0: 4a83 tstl %d3 45aa2: 6748 beqs 45aec return RTEMS_INVALID_NAME; if ( !id ) 45aa4: 4a8a tstl %a2 45aa6: 6700 00ea beqw 45b92 * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 45aaa: 2002 movel %d2,%d0 45aac: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 45ab2: 6744 beqs 45af8 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45ab4: 7230 moveq #48,%d1 45ab6: 7810 moveq #16,%d4 45ab8: c282 andl %d2,%d1 45aba: b881 cmpl %d1,%d4 45abc: 670c beqs 45aca name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 45abe: 700b moveq #11,%d0 } 45ac0: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ac6: 4e5e unlk %fp 45ac8: 4e75 rts #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45aca: 44c2 movew %d2,%ccr 45acc: 66f0 bnes 45abe _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 45ace: 0c80 0000 00c0 cmpil #192,%d0 45ad4: 67e8 beqs 45abe _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45ad6: 7001 moveq #1,%d0 45ad8: b0ae 000c cmpl %fp@(12),%d0 45adc: 6420 bccs 45afe 45ade: 103c 000a moveb #10,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45ae2: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ae8: 4e5e unlk %fp 45aea: 4e75 rts register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aec: 7003 moveq #3,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45aee: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45af4: 4e5e unlk %fp 45af6: 4e75 rts */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 45af8: 7830 moveq #48,%d4 45afa: c882 andl %d2,%d4 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45afc: 66d8 bnes 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45afe: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 45b0c: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45b12: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b18: 588f addql #4,%sp 45b1a: 2640 moveal %d0,%a3 45b1c: 4a80 tstl %d0 45b1e: 6700 00d8 beqw 45bf8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45b22: 2742 0010 movel %d2,%a3@(16) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 45b26: 4a84 tstl %d4 45b28: 6774 beqs 45b9e /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 45b2a: 44c2 movew %d2,%ccr 45b2c: 56c0 sne %d0 45b2e: 49c0 extbl %d0 45b30: 5280 addql #1,%d0 45b32: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45b36: 7010 moveq #16,%d0 45b38: b084 cmpl %d4,%d0 45b3a: 6700 00ce beqw 45c0a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b3e: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 45b40: 4204 clrb %d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b42: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 45b46: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 45b4a: 7001 moveq #1,%d0 45b4c: b0ae 000c cmpl %fp@(12),%d0 45b50: 57c0 seq %d0 45b52: 49c0 extbl %d0 45b54: 4480 negl %d0 45b56: 2f00 movel %d0,%sp@- 45b58: 486e ffea pea %fp@(-22) 45b5c: 486b 0014 pea %a3@(20) 45b60: 4eb9 0004 6780 jsr 46780 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 7206 moveq #6,%d1 45b6c: b280 cmpl %d0,%d1 45b6e: 665e bnes 45bce */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45b70: 2f0b movel %a3,%sp@- 45b72: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45b78: 4eb9 0004 736c jsr 4736c <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b7e: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 45b84: 508f addql #8,%sp (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b86: 7013 moveq #19,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b88: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b8e: 4e5e unlk %fp 45b90: 4e75 rts CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 45b92: 7009 moveq #9,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b94: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b9a: 4e5e unlk %fp 45b9c: 4e75 rts * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45b9e: 2f2e 000c movel %fp@(12),%sp@- */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45ba2: 72ff moveq #-1,%d1 * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45ba4: 486e fff8 pea %fp@(-8) 45ba8: 486b 0014 pea %a3@(20) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bac: 44c2 movew %d2,%ccr 45bae: 56c0 sne %d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45bb0: 2d41 fff8 movel %d1,%fp@(-8) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bb4: 49c0 extbl %d0 45bb6: 5280 addql #1,%d0 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45bb8: 42ae ffea clrl %fp@(-22) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bbc: 2d40 fffc movel %d0,%fp@(-4) /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 45bc0: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 45bc4: 4eb9 0004 6ac8 jsr 46ac8 <_CORE_semaphore_Initialize> 45bca: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45bce: 202b 0008 movel %a3@(8),%d0 45bd2: 4281 clrl %d1 45bd4: 2079 0005 d91c moveal 5d91c <_Semaphore_Information+0x18>,%a0 45bda: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45bdc: 2743 000c movel %d3,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 45be4: 2480 movel %d0,%a2@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45be6: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45bec: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45bf2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45bf4: 4e5e unlk %fp 45bf6: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 45bf8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 45bfe: 7005 moveq #5,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45c00: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45c06: 4e5e unlk %fp 45c08: 4e75 rts else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45c0a: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c0e: 7801 moveq #1,%d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c10: 4201 clrb %d1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 45c12: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c18: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c1c: b8ae fff0 cmpl %fp@(-16),%d4 45c20: 6600 ff28 bnew 45b4a if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 45c24: 0802 0006 btst #6,%d2 45c28: 6712 beqs 45c3c the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c2a: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 45c2e: 7201 moveq #1,%d1 the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c30: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c34: 1d41 ffee moveb %d1,%fp@(-18) 45c38: 6000 ff10 braw 45b4a } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 45c3c: 4a02 tstb %d2 45c3e: 6c00 ff0a bgew 45b4a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c42: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 45c44: 7001 moveq #1,%d0 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c46: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c4a: 1d40 ffee moveb %d0,%fp@(-18) 45c4e: 6000 fefa braw 45b4a ... =============================================================================== 00045c54 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 45c54: 4e56 fffc linkw %fp,#-4 45c58: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 45c5a: 486e fffc pea %fp@(-4) 45c5e: 2f2e 0008 movel %fp@(8),%sp@- 45c62: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45c68: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c6e: 4fef 000c lea %sp@(12),%sp 45c72: 2440 moveal %d0,%a2 45c74: 4aae fffc tstl %fp@(-4) 45c78: 670a beqs 45c84 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c7a: 246e fff8 moveal %fp@(-8),%a2 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c80: 4e5e unlk %fp 45c82: 4e75 rts 45c84: 7030 moveq #48,%d0 45c86: c0aa 0010 andl %a2@(16),%d0 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45c8a: 6760 beqs 45cec if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 45c8c: 4aaa 0062 tstl %a2@(98) 45c90: 6616 bnes 45ca8 45c92: 7220 moveq #32,%d1 45c94: b280 cmpl %d0,%d1 45c96: 6710 beqs 45ca8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45c98: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c9e: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45ca2: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ca4: 4e5e unlk %fp 45ca6: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 45ca8: 4878 0004 pea 4 45cac: 42a7 clrl %sp@- 45cae: 486a 0014 pea %a2@(20) 45cb2: 4eb9 0004 6774 jsr 46774 <_CORE_mutex_Flush> 45cb8: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45cbc: 2f0a movel %a2,%sp@- 45cbe: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45cc4: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45cca: 2f0a movel %a2,%sp@- 45ccc: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45cd2: 4eb9 0004 736c jsr 4736c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45cd8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45cde: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45ce2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ce4: 246e fff8 moveal %fp@(-8),%a2 45ce8: 4e5e unlk %fp 45cea: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 45cec: 4878 0002 pea 2 45cf0: 42a7 clrl %sp@- 45cf2: 486a 0014 pea %a2@(20) 45cf6: 4eb9 0004 6abc jsr 46abc <_CORE_semaphore_Flush> 45cfc: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45d00: 2f0a movel %a2,%sp@- 45d02: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45d08: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45d16: 4eb9 0004 736c jsr 4736c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d1c: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45d22: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d26: 4280 clrl %d0 45d28: 60ba bras 45ce4 ... =============================================================================== 00050460 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 50460: 4e56 fffc linkw %fp,#-4 50464: 486e fffc pea %fp@(-4) 50468: 2f2e 0008 movel %fp@(8),%sp@- 5046c: 4879 0006 3a7c pea 63a7c <_Semaphore_Information> 50472: 4eb9 0004 9574 jsr 49574 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 50478: 4fef 000c lea %sp@(12),%sp 5047c: 4aae fffc tstl %fp@(-4) 50480: 6706 beqs 50488 50482: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50484: 4e5e unlk %fp 50486: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 50488: 7230 moveq #48,%d1 5048a: 2040 moveal %d0,%a0 5048c: c2a8 0010 andl %a0@(16),%d1 50490: 6720 beqs 504b2 _CORE_mutex_Flush( 50492: 4878 0001 pea 1 50496: 42a7 clrl %sp@- 50498: 4868 0014 pea %a0@(20) 5049c: 4eb9 0004 877c jsr 4877c <_CORE_mutex_Flush> 504a2: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 504a6: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 504ac: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 504ae: 4e5e unlk %fp 504b0: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 504b2: 4878 0001 pea 1 504b6: 2040 moveal %d0,%a0 504b8: 42a7 clrl %sp@- 504ba: 4868 0014 pea %a0@(20) 504be: 4eb9 0004 8ac4 jsr 48ac4 <_CORE_semaphore_Flush> 504c4: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 504c8: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 504ce: 4280 clrl %d0 504d0: 60dc bras 504ae ... =============================================================================== 00058180 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 58180: 4e56 fffc linkw %fp,#-4 58184: 2f03 movel %d3,%sp@- 58186: 2f02 movel %d2,%sp@- 58188: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 5818c: 660e bnes 5819c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5818e: 242e fff4 movel %fp@(-12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 58192: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58194: 262e fff8 movel %fp@(-8),%d3 58198: 4e5e unlk %fp 5819a: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 5819c: 486e fffc pea %fp@(-4) 581a0: 2f2e 0008 movel %fp@(8),%sp@- 581a4: 4eb9 0005 c1bc jsr 5c1bc <_Thread_Get> switch ( location ) { 581aa: 508f addql #8,%sp 581ac: 4aae fffc tstl %fp@(-4) 581b0: 670e beqs 581c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 581b2: 242e fff4 movel %fp@(-12),%d2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 581b6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 581b8: 262e fff8 movel %fp@(-8),%d3 581bc: 4e5e unlk %fp 581be: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 581c0: 2240 moveal %d0,%a1 581c2: 2069 0108 moveal %a1@(264),%a0 asr = &api->Signal; 581c6: 4aa8 000a tstl %a0@(10) 581ca: 6770 beqs 5823c if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 581cc: 4a28 0008 tstb %a0@(8) 581d0: 673e beqs 58210 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 581d2: 223c 0000 0700 movel #1792,%d1 581d8: 40c3 movew %sr,%d3 581da: 8283 orl %d3,%d1 581dc: 46c1 movew %d1,%sr *signal_set |= signals; 581de: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 581e2: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 581e4: 2239 0007 d14e movel 7d14e <_ISR_Nest_level>,%d1 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 581ea: 7401 moveq #1,%d2 581ec: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 581f0: 4a81 tstl %d1 581f2: 6708 beqs 581fc 581f4: b0b9 0007 d16e cmpl 7d16e <_Thread_Executing>,%d0 581fa: 6730 beqs 5822c <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 581fc: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58202: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58204: 242e fff4 movel %fp@(-12),%d2 58208: 262e fff8 movel %fp@(-8),%d3 5820c: 4e5e unlk %fp 5820e: 4e75 rts rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 58210: 203c 0000 0700 movel #1792,%d0 58216: 40c1 movew %sr,%d1 58218: 8081 orl %d1,%d0 5821a: 46c0 movew %d0,%sr *signal_set |= signals; 5821c: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 58220: 46c1 movew %d1,%sr if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 58222: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58228: 4280 clrl %d0 5822a: 60d8 bras 58204 _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 5822c: 13c2 0007 d1f8 moveb %d2,7d1f8 <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 58232: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58238: 4280 clrl %d0 5823a: 60c8 bras 58204 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 5823c: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58242: 242e fff4 movel %fp@(-12),%d2 _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 58246: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58248: 262e fff8 movel %fp@(-8),%d3 5824c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004606c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 4606c: 4e56 fffc linkw %fp,#-4 46070: 2f0b movel %a3,%sp@- 46072: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 46074: 2f39 0005 da7a movel 5da7a <_RTEMS_Allocator_Mutex>,%sp@- 4607a: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 46080: 486e fffc pea %fp@(-4) 46084: 2f2e 0008 movel %fp@(8),%sp@- 46088: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 4608e: 4fef 000c lea %sp@(12),%sp Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); 46092: 2440 moveal %d0,%a2 switch ( location ) { 46094: 4aae fffc tstl %fp@(-4) 46098: 664a bnes 460e4 <== NEVER TAKEN case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 4609a: 2f2a 0008 movel %a2@(8),%sp@- 4609e: 47f9 0004 73f0 lea 473f0 <_Objects_Get_information_id>,%a3 460a4: 4e93 jsr %a3@ 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 460a6: 2f0a movel %a2,%sp@- 460a8: 2f00 movel %d0,%sp@- 460aa: 4eb9 0004 7a1c jsr 47a1c <_Thread_Close> 460b0: 2f2a 0008 movel %a2@(8),%sp@- 460b4: 4e93 jsr %a3@ 460b6: 2f0a movel %a2,%sp@- 460b8: 2f00 movel %d0,%sp@- 460ba: 4eb9 0004 736c jsr 4736c <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 460c0: 2f39 0005 da7a movel 5da7a <_RTEMS_Allocator_Mutex>,%sp@- 460c6: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 460cc: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 460d2: 246e fff4 moveal %fp@(-12),%a2 _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 460d6: 4fef 001c lea %sp@(28),%sp _Thread_Close( the_information, the_thread ); _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 460da: 4280 clrl %d0 break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 460dc: 266e fff8 moveal %fp@(-8),%a3 460e0: 4e5e unlk %fp 460e2: 4e75 rts case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 460e4: 2f39 0005 da7a movel 5da7a <_RTEMS_Allocator_Mutex>,%sp@- 460ea: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; } 460f0: 246e fff4 moveal %fp@(-12),%a2 case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; 460f4: 588f addql #4,%sp case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 460f6: 7004 moveq #4,%d0 return RTEMS_INVALID_ID; } 460f8: 266e fff8 moveal %fp@(-8),%a3 460fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cd88 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4cd88: 4e56 ffe4 linkw %fp,#-28 4cd8c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4cd90: 2a2e 0008 movel %fp@(8),%d5 4cd94: 242e 000c movel %fp@(12),%d2 4cd98: 286e 0010 moveal %fp@(16),%a4 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4cd9c: 4a8c tstl %a4 4cd9e: 6700 0154 beqw 4cef4 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4cda2: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4cda8: 4a2a 0075 tstb %a2@(117) 4cdac: 57c0 seq %d0 4cdae: 263c 0000 0100 movel #256,%d3 4cdb4: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4cdb6: 266a 0108 moveal %a2@(264),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4cdba: c680 andl %d0,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4cdbc: 4aaa 007a tstl %a2@(122) 4cdc0: 6600 00d4 bnew 4ce96 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4cdc4: 4a2b 0008 tstb %a3@(8) 4cdc8: 57c0 seq %d0 4cdca: 283c 0000 0400 movel #1024,%d4 4cdd0: 49c0 extbl %d0 4cdd2: c880 andl %d0,%d4 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4cdd4: 4eb9 0004 921c jsr 4921c <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4cdda: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4cddc: 8083 orl %d3,%d0 4cdde: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4cde0: 0802 0008 btst #8,%d2 4cde4: 670e beqs 4cdf4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4cde6: 2005 movel %d5,%d0 4cde8: 7201 moveq #1,%d1 4cdea: e088 lsrl #8,%d0 4cdec: b380 eorl %d1,%d0 4cdee: c081 andl %d1,%d0 4cdf0: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4cdf4: 0802 0009 btst #9,%d2 4cdf8: 6718 beqs 4ce12 if ( _Modes_Is_timeslice(mode_set) ) { 4cdfa: 0805 0009 btst #9,%d5 4cdfe: 6700 00c2 beqw 4cec2 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4ce02: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4ce04: 41f9 0005 d978 lea 5d978 <_Thread_Ticks_per_timeslice>,%a0 if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4ce0a: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4ce0e: 2550 0076 movel %a0@,%a2@(118) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4ce12: 7007 moveq #7,%d0 4ce14: c082 andl %d2,%d0 4ce16: 6712 beqs 4ce2a */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4ce18: 40c0 movew %sr,%d0 4ce1a: 7207 moveq #7,%d1 4ce1c: c285 andl %d5,%d1 4ce1e: 0280 0000 f8ff andil #63743,%d0 4ce24: e189 lsll #8,%d1 4ce26: 8081 orl %d1,%d0 4ce28: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4ce2a: 0802 000a btst #10,%d2 4ce2e: 6758 beqs 4ce88 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4ce30: 700a moveq #10,%d0 4ce32: e0ad lsrl %d0,%d5 4ce34: 7201 moveq #1,%d1 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ce36: 4280 clrl %d0 4ce38: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4ce3c: b385 eorl %d1,%d5 4ce3e: ca81 andl %d1,%d5 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ce40: ba80 cmpl %d0,%d5 4ce42: 6744 beqs 4ce88 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4ce44: 203c 0000 0700 movel #1792,%d0 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 4ce4a: 1745 0008 moveb %d5,%a3@(8) 4ce4e: 40c1 movew %sr,%d1 4ce50: 8081 orl %d1,%d0 4ce52: 46c0 movew %d0,%sr _signals = information->signals_pending; 4ce54: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4ce58: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4ce5e: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4ce62: 46c1 movew %d1,%sr if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ce64: 4aab 0012 tstl %a3@(18) 4ce68: 671e beqs 4ce88 executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce6a: 7203 moveq #3,%d1 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 4ce6c: 7001 moveq #1,%d0 4ce6e: 7401 moveq #1,%d2 4ce70: 1540 0074 moveb %d0,%a2@(116) } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce74: b2b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d1 4ce7a: 6758 beqs 4ced4 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 4ce7c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4ce7e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ce84: 4e5e unlk %fp 4ce86: 4e75 rts executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce88: 7203 moveq #3,%d1 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 4ce8a: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce8c: b2b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d1 4ce92: 66e8 bnes 4ce7c <== NEVER TAKEN 4ce94: 603e bras 4ced4 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ce96: 4a2b 0008 tstb %a3@(8) 4ce9a: 57c0 seq %d0 4ce9c: 283c 0000 0400 movel #1024,%d4 4cea2: 49c0 extbl %d0 4cea4: c880 andl %d0,%d4 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4cea6: 4eb9 0004 921c jsr 4921c <_CPU_ISR_Get_level> old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4ceac: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4ceb0: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4ceb2: 8083 orl %d3,%d0 4ceb4: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4ceb6: 0802 0008 btst #8,%d2 4ceba: 6700 ff38 beqw 4cdf4 4cebe: 6000 ff26 braw 4cde6 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4cec2: 7007 moveq #7,%d0 4cec4: c082 andl %d2,%d0 if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4cec6: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4ceca: 4a80 tstl %d0 4cecc: 6700 ff5c beqw 4ce2a 4ced0: 6000 ff46 braw 4ce18 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4ced4: 4eb9 0004 d1d8 jsr 4d1d8 <_Thread_Evaluate_mode> 4ceda: 4a00 tstb %d0 4cedc: 6604 bnes 4cee2 4cede: 4a02 tstb %d2 4cee0: 679a beqs 4ce7c _Thread_Dispatch(); 4cee2: 4eb9 0004 7be4 jsr 47be4 <_Thread_Dispatch> 4cee8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4ceea: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4cef0: 4e5e unlk %fp 4cef2: 4e75 rts ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4cef4: 7009 moveq #9,%d0 if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 4cef6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4cefc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048734 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 48734: 4e56 fffc linkw %fp,#-4 48738: 202e 0008 movel %fp@(8),%d0 4873c: 2f02 movel %d2,%sp@- 4873e: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 48742: 4a39 0005 f734 tstb 5f734 48748: 676e beqs 487b8 <== NEVER TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 4874a: 720f moveq #15,%d1 4874c: b282 cmpl %d2,%d1 4874e: 6542 bcss 48792 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 48750: 4a80 tstl %d0 48752: 6748 beqs 4879c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 48754: 2079 0006 11c2 moveal 611c2 <_Thread_Executing>,%a0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 4875a: b0a8 0008 cmpl %a0@(8),%d0 4875e: 6742 beqs 487a2 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 48760: 486e fffc pea %fp@(-4) 48764: 2f00 movel %d0,%sp@- 48766: 4eb9 0004 a550 jsr 4a550 <_Thread_Get> switch ( location ) { 4876c: 508f addql #8,%sp 4876e: 4aae fffc tstl %fp@(-4) 48772: 664e bnes 487c2 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 48774: 2240 moveal %d0,%a1 48776: 202e 0010 movel %fp@(16),%d0 4877a: 2069 0108 moveal %a1@(264),%a0 4877e: 2180 2c1e movel %d0,%a0@(0000001e,%d2:l:4) _Thread_Enable_dispatch(); 48782: 4eb9 0004 a528 jsr 4a528 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48788: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; _Thread_Enable_dispatch(); 4878c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4878e: 4e5e unlk %fp 48790: 4e75 rts 48792: 242e fff8 movel %fp@(-8),%d2 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 48796: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48798: 4e5e unlk %fp 4879a: 4e75 rts /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 4879c: 2079 0006 11c2 moveal 611c2 <_Thread_Executing>,%a0 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 487a2: 226e 0010 moveal %fp@(16),%a1 487a6: 4280 clrl %d0 487a8: 2068 0108 moveal %a0@(264),%a0 487ac: 2189 2c1e movel %a1,%a0@(0000001e,%d2:l:4) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 487b0: 242e fff8 movel %fp@(-8),%d2 487b4: 4e5e unlk %fp 487b6: 4e75 rts 487b8: 242e fff8 movel %fp@(-8),%d2 { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 487bc: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 487be: 4e5e unlk %fp 487c0: 4e75 rts 487c2: 242e fff8 movel %fp@(-8),%d2 api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 487c6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 487c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af04 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4af04: 4e56 fffc linkw %fp,#-4 4af08: 2f0a movel %a2,%sp@- 4af0a: 246e 0010 moveal %fp@(16),%a2 4af0e: 2f02 movel %d2,%sp@- 4af10: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4af14: 670c beqs 4af22 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4af16: 4280 clrl %d0 4af18: 1039 0006 2632 moveb 62632 ,%d0 4af1e: b082 cmpl %d2,%d0 4af20: 6566 bcss 4af88 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4af22: 4a8a tstl %a2 4af24: 6770 beqs 4af96 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4af26: 486e fffc pea %fp@(-4) 4af2a: 2f2e 0008 movel %fp@(8),%sp@- 4af2e: 4eb9 0004 ce78 jsr 4ce78 <_Thread_Get> switch ( location ) { 4af34: 508f addql #8,%sp 4af36: 4aae fffc tstl %fp@(-4) 4af3a: 663e bnes 4af7a case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4af3c: 2040 moveal %d0,%a0 4af3e: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4af42: 4a82 tstl %d2 4af44: 6720 beqs 4af66 the_thread->real_priority = new_priority; 4af46: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4af4a: 4aa8 001c tstl %a0@(28) 4af4e: 6706 beqs 4af56 the_thread->current_priority > new_priority ) 4af50: b4a8 0014 cmpl %a0@(20),%d2 4af54: 6410 bccs 4af66 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 4af56: 42a7 clrl %sp@- 4af58: 2f02 movel %d2,%sp@- 4af5a: 2f00 movel %d0,%sp@- 4af5c: 4eb9 0004 c900 jsr 4c900 <_Thread_Change_priority> 4af62: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4af66: 4eb9 0004 ce20 jsr 4ce20 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af6c: 242e fff4 movel %fp@(-12),%d2 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); } _Thread_Enable_dispatch(); 4af70: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af72: 246e fff8 moveal %fp@(-8),%a2 4af76: 4e5e unlk %fp 4af78: 4e75 rts 4af7a: 242e fff4 movel %fp@(-12),%d2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4af7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af80: 246e fff8 moveal %fp@(-8),%a2 4af84: 4e5e unlk %fp 4af86: 4e75 rts 4af88: 242e fff4 movel %fp@(-12),%d2 4af8c: 7013 moveq #19,%d0 4af8e: 246e fff8 moveal %fp@(-8),%a2 4af92: 4e5e unlk %fp 4af94: 4e75 rts 4af96: 242e fff4 movel %fp@(-12),%d2 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4af9a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af9c: 246e fff8 moveal %fp@(-8),%a2 4afa0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000477f8 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 477f8: 4e56 fffc linkw %fp,#-4 477fc: 2f02 movel %d2,%sp@- 477fe: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 47802: 6762 beqs 47866 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 47804: 486e fffc pea %fp@(-4) 47808: 2f2e 0008 movel %fp@(8),%sp@- 4780c: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get> switch (location) { 47812: 508f addql #8,%sp 47814: 4aae fffc tstl %fp@(-4) 47818: 663c bnes 47856 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 4781a: 2240 moveal %d0,%a1 4781c: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 47820: 4a88 tstl %a0 47822: 673c beqs 47860 if (tvp->ptr == ptr) { 47824: b4a8 0004 cmpl %a0@(4),%d2 47828: 6746 beqs 47870 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4782a: 2248 moveal %a0,%a1 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 4782c: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 4782e: 4a88 tstl %a0 47830: 672e beqs 47860 <== NEVER TAKEN if (tvp->ptr == ptr) { 47832: b4a8 0004 cmpl %a0@(4),%d2 47836: 66f2 bnes 4782a if (prev) prev->next = tvp->next; 47838: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 4783a: 2f08 movel %a0,%sp@- 4783c: 2f00 movel %d0,%sp@- 4783e: 4eb9 0004 7918 jsr 47918 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47844: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4784a: 508f addql #8,%sp prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); 4784c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4784e: 242e fff8 movel %fp@(-8),%d2 47852: 4e5e unlk %fp 47854: 4e75 rts 47856: 242e fff8 movel %fp@(-8),%d2 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 4785a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4785c: 4e5e unlk %fp 4785e: 4e75 rts return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47860: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47866: 242e fff8 movel %fp@(-8),%d2 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 4786a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4786c: 4e5e unlk %fp 4786e: 4e75 rts while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 47870: 2240 moveal %d0,%a1 47872: 2350 0118 movel %a0@,%a1@(280) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47876: 2f08 movel %a0,%sp@- 47878: 2f00 movel %d0,%sp@- 4787a: 4eb9 0004 7918 jsr 47918 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47880: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47886: 508f addql #8,%sp prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); 47888: 4280 clrl %d0 4788a: 60c2 bras 4784e =============================================================================== 0004788c : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 4788c: 4e56 fffc linkw %fp,#-4 47890: 2f0a movel %a2,%sp@- 47892: 246e 0010 moveal %fp@(16),%a2 47896: 2f02 movel %d2,%sp@- 47898: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 4789c: 6752 beqs 478f0 return RTEMS_INVALID_ADDRESS; if ( !result ) 4789e: 4a8a tstl %a2 478a0: 674e beqs 478f0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 478a2: 486e fffc pea %fp@(-4) 478a6: 2f2e 0008 movel %fp@(8),%sp@- 478aa: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get> switch (location) { 478b0: 508f addql #8,%sp 478b2: 4aae fffc tstl %fp@(-4) 478b6: 662a bnes 478e2 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 478b8: 2240 moveal %d0,%a1 478ba: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 478be: 4a88 tstl %a0 478c0: 670c beqs 478ce if (tvp->ptr == ptr) { 478c2: b4a8 0004 cmpl %a0@(4),%d2 478c6: 6736 beqs 478fe */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 478c8: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 478ca: 4a88 tstl %a0 478cc: 66f4 bnes 478c2 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 478ce: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478d4: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 478d8: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478da: 246e fff8 moveal %fp@(-8),%a2 478de: 4e5e unlk %fp 478e0: 4e75 rts 478e2: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 478e6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478e8: 246e fff8 moveal %fp@(-8),%a2 478ec: 4e5e unlk %fp 478ee: 4e75 rts 478f0: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 478f4: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478f6: 246e fff8 moveal %fp@(-8),%a2 478fa: 4e5e unlk %fp 478fc: 4e75 rts if (tvp->ptr == ptr) { /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 478fe: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 47902: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47908: 242e fff4 movel %fp@(-12),%d2 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; _Thread_Enable_dispatch(); 4790c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4790e: 246e fff8 moveal %fp@(-8),%a2 47912: 4e5e unlk %fp ... =============================================================================== 00058b70 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 58b70: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58b82: 4eb9 0005 b874 jsr 5b874 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58b88: 4fef 000c lea %sp@(12),%sp 58b8c: 4aae fffc tstl %fp@(-4) 58b90: 6706 beqs 58b98 58b92: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b94: 4e5e unlk %fp 58b96: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58b98: 7204 moveq #4,%d1 58b9a: 2040 moveal %d0,%a0 58b9c: b2a8 0038 cmpl %a0@(56),%d1 58ba0: 670c beqs 58bae <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 58ba2: 4868 0010 pea %a0@(16) 58ba6: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> 58bac: 588f addql #4,%sp _Thread_Enable_dispatch(); 58bae: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58bb4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58bb6: 4e5e unlk %fp ... =============================================================================== 00058bbc : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 58bbc: 4e56 0000 linkw %fp,#0 58bc0: 2f0a movel %a2,%sp@- 58bc2: 246e 000c moveal %fp@(12),%a2 58bc6: 2f02 movel %d2,%sp@- 58bc8: 242e 0008 movel %fp@(8),%d2 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 58bcc: 676a beqs 58c38 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 58bce: 4a8a tstl %a2 58bd0: 6700 0088 beqw 58c5a 58bd4: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 58bda: 5280 addql #1,%d0 58bdc: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level> * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 58be2: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58be8: 4eb9 0005 b39c jsr 5b39c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 58bee: 588f addql #4,%sp 58bf0: 2040 moveal %d0,%a0 58bf2: 4a80 tstl %d0 58bf4: 6750 beqs 58c46 <== NEVER TAKEN 58bf6: 2028 0008 movel %a0@(8),%d0 58bfa: 4281 clrl %d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 58bfc: 2142 000c movel %d2,%a0@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 58c00: 2279 0007 d2ee moveal 7d2ee <_Timer_Information+0x18>,%a1 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 58c06: 42a8 0030 clrl %a0@(48) 58c0a: 3200 movew %d0,%d1 &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 58c0c: 2480 movel %d0,%a2@ if ( !the_timer ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 58c0e: 7004 moveq #4,%d0 58c10: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) 58c14: 2140 0038 movel %d0,%a0@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58c18: 42a8 0018 clrl %a0@(24) the_watchdog->routine = routine; 58c1c: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 58c20: 42a8 0034 clrl %a0@(52) &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); 58c24: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 58c2a: 242e fff8 movel %fp@(-8),%d2 &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); 58c2e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 58c30: 246e fffc moveal %fp@(-4),%a2 58c34: 4e5e unlk %fp 58c36: 4e75 rts 58c38: 242e fff8 movel %fp@(-8),%d2 rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 58c3c: 7003 moveq #3,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 58c3e: 246e fffc moveal %fp@(-4),%a2 58c42: 4e5e unlk %fp 58c44: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 58c46: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 58c4c: 242e fff8 movel %fp@(-8),%d2 _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 58c50: 7005 moveq #5,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 58c52: 246e fffc moveal %fp@(-4),%a2 58c56: 4e5e unlk %fp 58c58: 4e75 rts 58c5a: 242e fff8 movel %fp@(-8),%d2 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 58c5e: 7009 moveq #9,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 58c60: 246e fffc moveal %fp@(-4),%a2 58c64: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058cd4 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 58cd4: 4e56 ffe8 linkw %fp,#-24 58cd8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 58cdc: 282e 0008 movel %fp@(8),%d4 58ce0: 242e 000c movel %fp@(12),%d2 58ce4: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 58ce8: 4a82 tstl %d2 58cea: 6700 0094 beqw 58d80 return RTEMS_INVALID_NUMBER; if ( !routine ) 58cee: 4a83 tstl %d3 58cf0: 6700 00ae beqw 58da0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58cf4: 486e fffc pea %fp@(-4) 58cf8: 2f04 movel %d4,%sp@- 58cfa: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58d00: 4eb9 0005 b874 jsr 5b874 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58d06: 4fef 000c lea %sp@(12),%sp 58d0a: 2440 moveal %d0,%a2 58d0c: 4aae fffc tstl %fp@(-4) 58d10: 6662 bnes 58d74 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 58d12: 2a00 movel %d0,%d5 58d14: 0685 0000 0010 addil #16,%d5 58d1a: 2f05 movel %d5,%sp@- 58d1c: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> _ISR_Disable( level ); 58d22: 203c 0000 0700 movel #1792,%d0 58d28: 40c1 movew %sr,%d1 58d2a: 8081 orl %d1,%d0 58d2c: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 58d2e: 588f addql #4,%sp 58d30: 4aaa 0018 tstl %a2@(24) 58d34: 6656 bnes 58d8c <== NEVER TAKEN Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 58d36: 2543 002c movel %d3,%a2@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 58d3a: 256e 0014 0034 movel %fp@(20),%a2@(52) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 58d40: 2544 0030 movel %d4,%a2@(48) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 58d44: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58d48: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 58d4c: 46c1 movew %d1,%sr Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 58d4e: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 58d52: 2f05 movel %d5,%sp@- 58d54: 4879 0007 d18c pea 7d18c <_Watchdog_Ticks_chain> 58d5a: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 58d60: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58d66: 508f addql #8,%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 58d68: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58d6a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d70: 4e5e unlk %fp 58d72: 4e75 rts if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58d74: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58d76: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d7c: 4e5e unlk %fp 58d7e: 4e75 rts { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 58d80: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58d82: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d88: 4e5e unlk %fp 58d8a: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 58d8c: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 58d8e: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58d94: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58d96: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d9c: 4e5e unlk %fp 58d9e: 4e75 rts ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 58da0: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58da2: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58da8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000591bc : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 591bc: 4e56 fffc linkw %fp,#-4 591c0: 202e 0008 movel %fp@(8),%d0 591c4: 2f03 movel %d3,%sp@- 591c6: 2f02 movel %d2,%sp@- 591c8: 4a80 tstl %d0 591ca: 6748 beqs 59214 591cc: 4281 clrl %d1 591ce: 1239 0007 75d2 moveb 775d2 ,%d1 591d4: b280 cmpl %d0,%d1 591d6: 644a bccs 59222 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 591d8: 72ff moveq #-1,%d1 591da: b280 cmpl %d0,%d1 591dc: 6636 bnes 59214 591de: 2239 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d1 591e4: 5281 addql #1,%d1 591e6: 4283 clrl %d3 591e8: 23c1 0007 d0b4 movel %d1,7d0b4 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 591ee: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 591f0: 1439 0007 8508 moveb 78508 ,%d2 initialized = true; 591f6: 13c0 0007 8508 moveb %d0,78508 _Thread_Enable_dispatch(); 591fc: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> if ( tmpInitialized ) 59202: 4a02 tstb %d2 59204: 6744 beqs 5924a initialized = false; } #endif return status; } 59206: 242e fff4 movel %fp@(-12),%d2 _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) 5920a: 700e moveq #14,%d0 initialized = false; } #endif return status; } 5920c: 262e fff8 movel %fp@(-8),%d3 59210: 4e5e unlk %fp 59212: 4e75 rts 59214: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 59218: 7013 moveq #19,%d0 } 5921a: 262e fff8 movel %fp@(-8),%d3 5921e: 4e5e unlk %fp 59220: 4e75 rts 59222: 2239 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d1 59228: 5281 addql #1,%d1 5922a: 2600 movel %d0,%d3 5922c: 23c1 0007 d0b4 movel %d1,7d0b4 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 59232: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 59234: 1439 0007 8508 moveb 78508 ,%d2 initialized = true; 5923a: 13c0 0007 8508 moveb %d0,78508 _Thread_Enable_dispatch(); 59240: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> if ( tmpInitialized ) 59246: 4a02 tstb %d2 59248: 66bc bnes 59206 <== NEVER TAKEN * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 5924a: 486e fffc pea %fp@(-4) 5924e: 222e 0010 movel %fp@(16),%d1 59252: 08c1 000f bset #15,%d1 59256: 2f01 movel %d1,%sp@- 59258: 4878 0100 pea 100 5925c: 2f2e 000c movel %fp@(12),%sp@- 59260: 2f03 movel %d3,%sp@- 59262: 2f3c 5449 4d45 movel #1414090053,%sp@- 59268: 4eb9 0005 8250 jsr 58250 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 5926e: 4fef 0018 lea %sp@(24),%sp 59272: 4a80 tstl %d0 59274: 6714 beqs 5928a initialized = false; } #endif return status; } 59276: 242e fff4 movel %fp@(-12),%d2 /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 5927a: 4201 clrb %d1 initialized = false; } #endif return status; } 5927c: 262e fff8 movel %fp@(-8),%d3 59280: 4e5e unlk %fp /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 59282: 13c1 0007 8508 moveb %d1,78508 initialized = false; } #endif return status; } 59288: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 5928a: 41f9 0007 853e lea 7853e <_Timer_server_Default+0x34>,%a0 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 59290: 4282 clrl %d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 59292: 223c 0007 853a movel #492858,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59298: 23c8 0007 853a movel %a0,7853a <_Timer_server_Default+0x30> &_RTEMS_tasks_Information, _Objects_Get_index(id) 5929e: 202e fffc movel %fp@(-4),%d0 592a2: 41f9 0007 8576 lea 78576 <_Timer_server_Default+0x6c>,%a0 592a8: 23c8 0007 8572 movel %a0,78572 <_Timer_server_Default+0x68> /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 592ae: 2079 0007 d040 moveal 7d040 <_RTEMS_tasks_Information+0x18>,%a0 592b4: 3400 movew %d0,%d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 592b6: 23c1 0007 8542 movel %d1,78542 <_Timer_server_Default+0x38> * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 592bc: 2239 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d1 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 592c2: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 592c6: 23d0 0007 850a movel %a0@,7850a <_Timer_server_Default> 592cc: 41f9 0007 8572 lea 78572 <_Timer_server_Default+0x68>,%a0 592d2: 23c8 0007 857a movel %a0,7857a <_Timer_server_Default+0x70> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 592d8: 4879 0007 850a pea 7850a <_Timer_server_Default> the_watchdog->routine = routine; 592de: 41f9 0005 bfd0 lea 5bfd0 <_Thread_Delay_ended>,%a0 592e4: 23c8 0007 852e movel %a0,7852e <_Timer_server_Default+0x24> 592ea: 487a 0160 pea %pc@(5944c <_Timer_server_Body>) 592ee: 23c8 0007 8566 movel %a0,78566 <_Timer_server_Default+0x5c> * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 592f4: 41f9 0007 d146 lea 7d146 <_TOD_Now>,%a0 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 592fa: 23c1 0007 8546 movel %d1,78546 <_Timer_server_Default+0x3c> ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59300: 23d0 0007 857e movel %a0@,7857e <_Timer_server_Default+0x74> /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 59306: 223c 0005 9688 movel #366216,%d1 ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 5930c: 41f9 0007 850a lea 7850a <_Timer_server_Default>,%a0 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 59312: 23c1 0007 850e movel %d1,7850e <_Timer_server_Default+0x4> ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; ts->active = false; 59318: 4201 clrb %d1 ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; 5931a: 42b9 0007 8582 clrl 78582 <_Timer_server_Default+0x78> ts->active = false; 59320: 13c1 0007 8586 moveb %d1,78586 <_Timer_server_Default+0x7c> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 59326: 2f00 movel %d0,%sp@- ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 59328: 23c8 0007 d30e movel %a0,7d30e <_Timer_server> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 5932e: 42b9 0007 853e clrl 7853e <_Timer_server_Default+0x34> 59334: 42b9 0007 8576 clrl 78576 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5933a: 42b9 0007 851a clrl 7851a <_Timer_server_Default+0x10> the_watchdog->routine = routine; the_watchdog->id = id; 59340: 23c0 0007 8532 movel %d0,78532 <_Timer_server_Default+0x28> the_watchdog->user_data = user_data; 59346: 42b9 0007 8536 clrl 78536 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5934c: 42b9 0007 8552 clrl 78552 <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 59352: 23c0 0007 856a movel %d0,7856a <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 59358: 42b9 0007 856e clrl 7856e <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 5935e: 4eb9 0005 8958 jsr 58958 initialized = false; } #endif return status; } 59364: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 59368: 4fef 000c lea %sp@(12),%sp } 5936c: 262e fff8 movel %fp@(-8),%d3 59370: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058f30 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 58f30: 4e56 fff0 linkw %fp,#-16 58f34: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 58f38: 486e fffc pea %fp@(-4) 58f3c: 2f2e 0008 movel %fp@(8),%sp@- 58f40: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58f46: 4eb9 0005 b874 jsr 5b874 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58f4c: 4fef 000c lea %sp@(12),%sp 58f50: 2440 moveal %d0,%a2 58f52: 4aae fffc tstl %fp@(-4) 58f56: 670e beqs 58f66 58f58: 7404 moveq #4,%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f5a: 2002 movel %d2,%d0 58f5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f62: 4e5e unlk %fp 58f64: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 58f66: 202a 0038 movel %a2@(56),%d0 58f6a: 671a beqs 58f86 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f6c: 7201 moveq #1,%d1 58f6e: b280 cmpl %d0,%d1 58f70: 673c beqs 58fae 58f72: 740b moveq #11,%d2 * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58f74: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f7a: 2002 movel %d2,%d0 58f7c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f82: 4e5e unlk %fp 58f84: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 58f86: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f8a: 4282 clrl %d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 58f8c: 2f0a movel %a2,%sp@- 58f8e: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 d18c pea 7d18c <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert> 58fa2: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58fa6: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58fac: 60cc bras 58f7a if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fae: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 58fb2: 4282 clrl %d2 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 58fb4: 2679 0007 d30e moveal 7d30e <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fba: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 58fc0: 2f0a movel %a2,%sp@- 58fc2: 2f0b movel %a3,%sp@- 58fc4: 206b 0004 moveal %a3@(4),%a0 58fc8: 4e90 jsr %a0@ 58fca: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58fce: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58fd4: 60a4 bras 58f7a ... =============================================================================== 000590c0 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 590c0: 4e56 ffec linkw %fp,#-20 590c4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590c8: 242e 000c movel %fp@(12),%d2 590cc: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 590d0: 2479 0007 d30e moveal 7d30e <_Timer_server>,%a2 if ( !timer_server ) 590d6: 4a8a tstl %a2 590d8: 6700 00c8 beqw 591a2 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 590dc: 4a39 0007 d0c8 tstb 7d0c8 <_TOD_Is_set> 590e2: 6700 00a6 beqw 5918a return RTEMS_NOT_DEFINED; if ( !routine ) 590e6: 4a83 tstl %d3 590e8: 6700 00ac beqw 59196 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 590ec: 2f02 movel %d2,%sp@- 590ee: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 590f4: 588f addql #4,%sp 590f6: 4a00 tstb %d0 590f8: 660c bnes 59106 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 590fa: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59102: 4e5e unlk %fp 59104: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59106: 2f02 movel %d2,%sp@- 59108: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5910e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59110: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 59112: b0b9 0007 d146 cmpl 7d146 <_TOD_Now>,%d0 59118: 63e0 blss 590fa 5911a: 486e fffc pea %fp@(-4) 5911e: 2f2e 0008 movel %fp@(8),%sp@- 59122: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 59128: 4eb9 0005 b874 jsr 5b874 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5912e: 4fef 000c lea %sp@(12),%sp 59132: 2640 moveal %d0,%a3 59134: 4aae fffc tstl %fp@(-4) 59138: 6674 bnes 591ae case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5913a: 486b 0010 pea %a3@(16) 5913e: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 59144: 202e 0008 movel %fp@(8),%d0 59148: 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(); 5914c: 94b9 0007 d146 subl 7d146 <_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; 59152: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 59154: 276e 0014 0034 movel %fp@(20),%a3@(52) 5915a: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5915e: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59162: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59166: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 5916a: 2f0b movel %a3,%sp@- 5916c: 2f0a movel %a2,%sp@- 5916e: 206a 0004 moveal %a2@(4),%a0 59172: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59174: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5917a: 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(); 5917e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59180: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59186: 4e5e unlk %fp 59188: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 5918a: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5918c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59192: 4e5e unlk %fp <== NOT EXECUTED 59194: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 59196: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59198: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5919e: 4e5e unlk %fp 591a0: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 591a2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591aa: 4e5e unlk %fp 591ac: 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 ) { 591ae: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591b6: 4e5e unlk %fp ...