=============================================================================== 0004cc2c : * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4cc2c: 41f9 0006 3618 lea 63618 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4cc32: 4e56 0000 linkw %fp,#0 * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4cc36: 202e 0008 movel %fp@(8),%d0 4cc3a: 4c50 0001 remul %a0@,%d1,%d0 4cc3e: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4cc42: 4a81 tstl %d1 4cc44: 6702 beqs 4cc48 <== ALWAYS TAKEN ticks += 1; 4cc46: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4cc48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004827c : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 4827c: 4e56 0000 linkw %fp,#0 /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 48280: 2039 0005 f1a8 movel 5f1a8 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 48286: 2f02 movel %d2,%sp@- /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 48288: 243c 0000 03e8 movel #1000,%d2 4828e: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 48292: 242e 0008 movel %fp@(8),%d2 48296: 4c40 2001 remul %d0,%d1,%d2 4829a: 4c40 2002 remul %d0,%d2,%d2 4829e: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 482a0: 4a81 tstl %d1 482a2: 6702 beqs 482a6 <== ALWAYS TAKEN ticks += 1; 482a4: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 482a6: 241f movel %sp@+,%d2 482a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000473be <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 473be: 4e56 0000 linkw %fp,#0 473c2: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 473c4: 2479 0005 fa88 moveal 5fa88 <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 473ca: b5fc 0005 fa8c cmpal #391820,%a2 473d0: 6710 beqs 473e2 <_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)(); 473d2: 206a 0008 moveal %a2@(8),%a0 473d6: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 473d8: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 473da: b5fc 0005 fa8c cmpal #391820,%a2 473e0: 66f0 bnes 473d2 <_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)(); } } 473e2: 246e fffc moveal %fp@(-4),%a2 473e6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000473ea <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 473ea: 4e56 0000 linkw %fp,#0 473ee: 2f0a movel %a2,%sp@- 473f0: 2479 0005 fa88 moveal 5fa88 <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 473f6: b5fc 0005 fa8c cmpal #391820,%a2 473fc: 6718 beqs 47416 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 473fe: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 47404: 206a 000c moveal %a2@(12),%a0 47408: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 4740a: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 4740c: 588f addql #4,%sp 4740e: b5fc 0005 fa8c cmpal #391820,%a2 47414: 66e8 bnes 473fe <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 47416: 246e fffc moveal %fp@(-4),%a2 4741a: 4e5e unlk %fp ... =============================================================================== 0004f12c <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4f12c: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f132: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4f136: 2279 0006 2070 moveal 62070 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f13c: 48d7 001c moveml %d2-%d4,%sp@ 4f140: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4f144: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f148: 242e 000c movel %fp@(12),%d2 4f14c: 262e 0014 movel %fp@(20),%d3 4f150: 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 ); 4f154: 40c1 movew %sr,%d1 4f156: 8081 orl %d1,%d0 4f158: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4f15a: 2028 0048 movel %a0@(72),%d0 4f15e: 5280 addql #1,%d0 4f160: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4f164: 4aa8 0040 tstl %a0@(64) 4f168: 6606 bnes 4f170 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == 4f16a: b0a8 0044 cmpl %a0@(68),%d0 4f16e: 672e beqs 4f19e <_CORE_barrier_Wait+0x72> 4f170: 7001 moveq #1,%d0 4f172: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4f176: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4f17a: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4f17e: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4f180: 2d43 000c movel %d3,%fp@(12) 4f184: 203c 0004 ba08 movel #309768,%d0 4f18a: 2d48 0008 movel %a0,%fp@(8) } 4f18e: 4cd7 001c moveml %sp@,%d2-%d4 _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 ); 4f192: 2d40 0010 movel %d0,%fp@(16) } 4f196: 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 ); 4f198: 4ef9 0004 b680 jmp 4b680 <_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; 4f19e: 7001 moveq #1,%d0 4f1a0: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4f1a4: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4f1a6: 2d44 0010 movel %d4,%fp@(16) 4f1aa: 2d42 000c movel %d2,%fp@(12) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4f1ae: 4cd7 001c moveml %sp@,%d2-%d4 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 ); 4f1b2: 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 ); } 4f1b6: 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 ); 4f1b8: 4ef9 0004 f0f0 jmp 4f0f0 <_CORE_barrier_Release> ... =============================================================================== 0004d350 <_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 ) { 4d350: 4e56 0000 linkw %fp,#0 4d354: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4d356: 2f2e 0010 movel %fp@(16),%sp@- 4d35a: 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 ) { 4d35e: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4d362: 2f0a movel %a2,%sp@- 4d364: 4eb9 0004 a25c jsr 4a25c <_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 ) 4d36a: 4fef 000c lea %sp@(12),%sp 4d36e: 4aaa 0048 tstl %a2@(72) 4d372: 6612 bnes 4d386 <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4d374: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 4d37a: 246e fffc moveal %fp@(-4),%a2 4d37e: 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 ); 4d380: 4ef9 0004 abea jmp 4abea <_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 ); 4d386: 2f0a movel %a2,%sp@- 4d388: 4eb9 0004 d3a4 jsr 4d3a4 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 4d38e: 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 ); 4d394: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 4d396: 246e fffc moveal %fp@(-4),%a2 4d39a: 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 ); 4d39c: 4ef9 0004 abea jmp 4abea <_Workspace_Free> ... =============================================================================== 000503e0 <_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)) { 503e0: 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 ) { 503e2: 4e56 ffe4 linkw %fp,#-28 503e6: 202e 0014 movel %fp@(20),%d0 503ea: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 503ee: 246e 0008 moveal %fp@(8),%a2 * 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); 503f2: 2600 movel %d0,%d3 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 ) { 503f4: 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)) { 503f8: c280 andl %d0,%d1 ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 503fa: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 503fe: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 50402: 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)) { 50406: 4a81 tstl %d1 50408: 6716 beqs 50420 <_CORE_message_queue_Initialize+0x40> allocated_message_size += sizeof(uint32_t); 5040a: 5883 addql #4,%d3 allocated_message_size &= ~(sizeof(uint32_t) - 1); 5040c: 72fc moveq #-4,%d1 5040e: c681 andl %d1,%d3 } if (allocated_message_size < maximum_message_size) 50410: b680 cmpl %d0,%d3 50412: 640c bccs 50420 <_CORE_message_queue_Initialize+0x40><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 50414: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 5041a: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 5041c: 4e5e unlk %fp 5041e: 4e75 rts /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 50420: 0683 0000 0010 addil #16,%d3 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 50426: 2f03 movel %d3,%sp@- if ( x > SIZE_MAX ) 50428: 4286 clrl %d6 5042a: 7eff moveq #-1,%d7 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 5042c: 42a7 clrl %sp@- 5042e: 2f02 movel %d2,%sp@- 50430: 42a7 clrl %sp@- 50432: 4eb9 0006 3798 jsr 63798 <__muldi3> 50438: 4fef 0010 lea %sp@(16),%sp 5043c: 2800 movel %d0,%d4 5043e: 2a01 movel %d1,%d5 if ( x > SIZE_MAX ) 50440: 9e85 subl %d5,%d7 50442: 9d84 subxl %d4,%d6 50444: 6dce blts 50414 <_CORE_message_queue_Initialize+0x34> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 50446: 2f01 movel %d1,%sp@- 50448: 4eb9 0005 32e6 jsr 532e6 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 5044e: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 50450: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 50454: 67be beqs 50414 <_CORE_message_queue_Initialize+0x34> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 50456: 2f03 movel %d3,%sp@- allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 50458: 7e01 moveq #1,%d7 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 5045a: 2f02 movel %d2,%sp@- 5045c: 2f00 movel %d0,%sp@- 5045e: 486a 0060 pea %a2@(96) 50462: 4eb9 0005 5370 jsr 55370 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 50468: 4878 0006 pea 6 5046c: 206e 000c moveal %fp@(12),%a0 50470: be90 cmpl %a0@,%d7 50472: 57c0 seq %d0 50474: 4878 0080 pea 80 50478: 49c0 extbl %d0 5047a: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 5047c: 41ea 0054 lea %a2@(84),%a0 50480: 2f00 movel %d0,%sp@- 50482: 2548 0050 movel %a0,%a2@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 50486: 41ea 0050 lea %a2@(80),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5048a: 42aa 0054 clrl %a2@(84) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5048e: 2548 0058 movel %a0,%a2@(88) 50492: 2f0a movel %a2,%sp@- 50494: 4eb9 0005 29b0 jsr 529b0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 5049a: 4fef 0020 lea %sp@(32),%sp } 5049e: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 504a4: 7001 moveq #1,%d0 } 504a6: 4e5e unlk %fp ... =============================================================================== 000504ac <_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 ); 504ac: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 504b2: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 504b6: 2079 0006 94d4 moveal 694d4 <_Per_CPU_Information+0xc>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 504bc: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 504c0: 246e 0008 moveal %fp@(8),%a2 504c4: 2c2e 000c movel %fp@(12),%d6 504c8: 242e 0010 movel %fp@(16),%d2 504cc: 226e 0014 moveal %fp@(20),%a1 504d0: 2a2e 001c movel %fp@(28),%d5 504d4: 182e 001b moveb %fp@(27),%d4 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; 504d8: 42a8 0034 clrl %a0@(52) _ISR_Disable( level ); 504dc: 40c1 movew %sr,%d1 504de: 8081 orl %d1,%d0 504e0: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 504e2: 260a movel %a2,%d3 504e4: 200a movel %a2,%d0 504e6: 0683 0000 0050 addil #80,%d3 504ec: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 504f2: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 504f6: b08b cmpl %a3,%d0 504f8: 674a beqs 50544 <_CORE_message_queue_Seize+0x98> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 504fa: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 504fc: 2143 0004 movel %d3,%a0@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 50500: 53aa 0048 subql #1,%a2@(72) Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 50504: 2548 0050 movel %a0,%a2@(80) _ISR_Enable( level ); 50508: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; 5050a: 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 ); 5050e: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 50512: 2079 0006 94d4 moveal 694d4 <_Per_CPU_Information+0xc>,%a0 50518: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5051c: 2f11 movel %a1@,%sp@- 5051e: 486b 000c pea %a3@(12) 50522: 2f02 movel %d2,%sp@- 50524: 4eb9 0005 79dc jsr 579dc 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 ); 5052a: 4fef 000c lea %sp@(12),%sp 5052e: 2d4a 0008 movel %a2,%fp@(8) 50532: 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 ); } 50536: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 5053c: 4e5e unlk %fp 5053e: 4ef9 0005 0314 jmp 50314 <_Chain_Append> return; } #endif } if ( !wait ) { 50544: 4a04 tstb %d4 50546: 6612 bnes 5055a <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 50548: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 5054a: 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 ); } 5054c: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 50552: 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 ); } 50556: 4e5e unlk %fp 50558: 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; 5055a: 7001 moveq #1,%d0 5055c: 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; 50560: 2142 002c movel %d2,%a0@(44) 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; 50564: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 50568: 2146 0020 movel %d6,%a0@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 5056c: 2149 0028 movel %a1,%a0@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 50570: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50572: 2d45 000c movel %d5,%fp@(12) 50576: 203c 0005 2aac movel #338604,%d0 5057c: 2d4a 0008 movel %a2,%fp@(8) } 50580: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 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 ); 50586: 2d40 0010 movel %d0,%fp@(16) } 5058a: 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 ); 5058c: 4ef9 0005 2724 jmp 52724 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00047954 <_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 ) { 47954: 4e56 0000 linkw %fp,#0 47958: 2f0a movel %a2,%sp@- 4795a: 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)) ) { 4795e: 2f0a movel %a2,%sp@- 47960: 4eb9 0004 948c jsr 4948c <_Thread_queue_Dequeue> 47966: 588f addql #4,%sp 47968: 4a80 tstl %d0 4796a: 670a beqs 47976 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4796c: 246e fffc moveal %fp@(-4),%a2 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 47970: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 47972: 4e5e unlk %fp 47974: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 47976: 303c 0700 movew #1792,%d0 4797a: 40c1 movew %sr,%d1 4797c: 8081 orl %d1,%d0 4797e: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 47980: 202a 0048 movel %a2@(72),%d0 47984: b0aa 0040 cmpl %a2@(64),%d0 47988: 6412 bccs 4799c <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN the_semaphore->count += 1; 4798a: 5280 addql #1,%d0 4798c: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 47990: 4280 clrl %d0 _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 47992: 46c1 movew %d1,%sr } return status; } 47994: 246e fffc moveal %fp@(-4),%a2 47998: 4e5e unlk %fp 4799a: 4e75 rts } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 4799c: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 4799e: 46c1 movew %d1,%sr <== NOT EXECUTED 479a0: 60f2 bras 47994 <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED ... =============================================================================== 0004c234 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c234: 4e56 ffec linkw %fp,#-20 4c238: 202e 0010 movel %fp@(16),%d0 4c23c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c240: 246e 0008 moveal %fp@(8),%a2 size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4c244: 280a movel %a2,%d4 4c246: 5884 addql #4,%d4 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c248: 262e 000c movel %fp@(12),%d3 4c24c: 242e 0014 movel %fp@(20),%d2 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 4c250: 42aa 0004 clrl %a2@(4) while ( count-- ) { 4c254: 4a80 tstl %d0 4c256: 6740 beqs 4c298 <_Chain_Initialize+0x64> <== NEVER TAKEN { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 4c258: 2043 moveal %d3,%a0 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4c25a: 224a moveal %a2,%a1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c25c: 5380 subql #1,%d0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c25e: 2208 movel %a0,%d1 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c260: 2a00 movel %d0,%d5 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c262: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4c264: 2288 movel %a0,%a1@ next->previous = current; 4c266: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c26a: 4a80 tstl %d0 4c26c: 6714 beqs 4c282 <_Chain_Initialize+0x4e> 4c26e: 2248 moveal %a0,%a1 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 4c270: 2041 moveal %d1,%a0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c272: 2208 movel %a0,%d1 4c274: 5380 subql #1,%d0 4c276: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4c278: 2288 movel %a0,%a1@ next->previous = current; 4c27a: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c27e: 4a80 tstl %d0 4c280: 66ec bnes 4c26e <_Chain_Initialize+0x3a> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c282: 4c05 2800 mulsl %d5,%d2 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c286: 2043 moveal %d3,%a0 4c288: d1c2 addal %d2,%a0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4c28a: 2084 movel %d4,%a0@ tail->previous = current; 4c28c: 2548 0008 movel %a0,%a2@(8) } 4c290: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4c294: 4e5e unlk %fp 4c296: 4e75 rts ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4c298: 204a moveal %a2,%a0 <== NOT EXECUTED current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4c29a: 2084 movel %d4,%a0@ <== NOT EXECUTED tail->previous = current; 4c29c: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED } 4c2a0: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4c2a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004661c <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 4661c: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 46622: 4e56 ffec linkw %fp,#-20 46626: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4662a: 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 ]; 4662e: 206a 00fc moveal %a2@(252),%a0 option_set = (rtems_option) the_thread->Wait.option; 46632: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 46636: 40c3 movew %sr,%d3 46638: 8083 orl %d3,%d0 4663a: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 4663c: 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 ); 46640: 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; 46642: 2410 movel %a0@,%d2 46644: 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 ) ) { 46646: 6700 00ac beqw 466f4 <_Event_Surrender+0xd8> /* * 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() && 4664a: 4ab9 0005 fac8 tstl 5fac8 <_Per_CPU_Information+0x8> 46650: 6708 beqs 4665a <_Event_Surrender+0x3e> 46652: b5f9 0005 facc cmpal 5facc <_Per_CPU_Information+0xc>,%a2 46658: 675c beqs 466b6 <_Event_Surrender+0x9a> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 4665a: 2a2a 0010 movel %a2@(16),%d5 4665e: 0285 0000 0100 andil #256,%d5 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 46664: 6700 008e beqw 466f4 <_Event_Surrender+0xd8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 46668: b081 cmpl %d1,%d0 4666a: 6708 beqs 46674 <_Event_Surrender+0x58> 4666c: 0804 0001 btst #1,%d4 46670: 6700 0082 beqw 466f4 <_Event_Surrender+0xd8> RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 46674: 2200 movel %d0,%d1 46676: 4681 notl %d1 46678: c282 andl %d2,%d1 4667a: 2081 movel %d1,%a0@ api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4667c: 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; 46680: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 46684: 2080 movel %d0,%a0@ _ISR_Flash( level ); 46686: 203c 0000 0700 movel #1792,%d0 4668c: 46c3 movew %d3,%sr 4668e: 8083 orl %d3,%d0 46690: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 46692: 7a02 moveq #2,%d5 46694: baaa 0050 cmpl %a2@(80),%d5 46698: 6766 beqs 46700 <_Event_Surrender+0xe4> _ISR_Enable( level ); 4669a: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4669c: 2f3c 1003 fff8 movel #268697592,%sp@- 466a2: 2f0a movel %a2,%sp@- 466a4: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 466aa: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 466ac: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466b2: 4e5e unlk %fp 466b4: 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) || 466b6: 2279 0005 fb08 moveal 5fb08 <_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() && _Thread_Is_executing( the_thread ) && 466bc: 7a02 moveq #2,%d5 466be: ba89 cmpl %a1,%d5 466c0: 670e beqs 466d0 <_Event_Surrender+0xb4> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 466c2: 2279 0005 fb08 moveal 5fb08 <_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() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 466c8: 1a3c 0001 moveb #1,%d5 466cc: ba89 cmpl %a1,%d5 466ce: 668a bnes 4665a <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 466d0: b081 cmpl %d1,%d0 466d2: 6706 beqs 466da <_Event_Surrender+0xbe> 466d4: 0804 0001 btst #1,%d4 466d8: 671a beqs 466f4 <_Event_Surrender+0xd8> <== NEVER TAKEN 466da: 2200 movel %d0,%d1 466dc: 4681 notl %d1 466de: c282 andl %d2,%d1 466e0: 2081 movel %d1,%a0@ api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 466e2: 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; 466e6: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 466ea: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 466ec: 7003 moveq #3,%d0 466ee: 23c0 0005 fb08 movel %d0,5fb08 <_Event_Sync_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 466f4: 46c3 movew %d3,%sr } 466f6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466fc: 4e5e unlk %fp 466fe: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 46700: 7003 moveq #3,%d0 46702: 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 ); 46706: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 46708: 486a 0048 pea %a2@(72) 4670c: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 46712: 2f3c 1003 fff8 movel #268697592,%sp@- 46718: 2f0a movel %a2,%sp@- 4671a: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 46720: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 46724: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4672a: 4e5e unlk %fp ... =============================================================================== 00046730 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 46730: 4e56 fffc linkw %fp,#-4 46734: 2f03 movel %d3,%sp@- 46736: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 46738: 486e fffc pea %fp@(-4) 4673c: 2f2e 0008 movel %fp@(8),%sp@- 46740: 4eb9 0004 915c jsr 4915c <_Thread_Get> switch ( location ) { 46746: 508f addql #8,%sp 46748: 4aae fffc tstl %fp@(-4) 4674c: 6648 bnes 46796 <_Event_Timeout+0x66> <== 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 ); 4674e: 223c 0000 0700 movel #1792,%d1 46754: 40c2 movew %sr,%d2 46756: 8282 orl %d2,%d1 46758: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 4675a: 2040 moveal %d0,%a0 4675c: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 46760: b0b9 0005 facc cmpl 5facc <_Per_CPU_Information+0xc>,%d0 46766: 673a beqs 467a2 <_Event_Timeout+0x72> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 46768: 7606 moveq #6,%d3 4676a: 2040 moveal %d0,%a0 4676c: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 46770: 46c2 movew %d2,%sr 46772: 2f3c 1003 fff8 movel #268697592,%sp@- 46778: 2f00 movel %d0,%sp@- 4677a: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 46780: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 46782: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 46788: 5380 subql #1,%d0 4678a: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 46790: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 46796: 242e fff4 movel %fp@(-12),%d2 4679a: 262e fff8 movel %fp@(-8),%d3 4679e: 4e5e unlk %fp 467a0: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 467a2: 2239 0005 fb08 movel 5fb08 <_Event_Sync_state>,%d1 467a8: 7601 moveq #1,%d3 467aa: b681 cmpl %d1,%d3 467ac: 66ba bnes 46768 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 467ae: 7606 moveq #6,%d3 467b0: 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; 467b2: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 467b4: 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; 467b8: 23c1 0005 fb08 movel %d1,5fb08 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 467be: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 467c0: 2f3c 1003 fff8 movel #268697592,%sp@- 467c6: 2f00 movel %d0,%sp@- 467c8: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 467ce: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 467d0: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 467d6: 5380 subql #1,%d0 467d8: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 467de: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 467e4: 60b0 bras 46796 <_Event_Timeout+0x66> ... =============================================================================== 0004c418 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c418: 4e56 ffcc linkw %fp,#-52 4c41c: 226e 000c moveal %fp@(12),%a1 4c420: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c424: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4c428: 2c09 movel %a1,%d6 4c42a: 5886 addql #4,%d6 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c42c: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c430: 222e 0010 movel %fp@(16),%d1 4c434: 282e 0014 movel %fp@(20),%d4 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c438: 2d40 fffc movel %d0,%fp@(-4) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 4c43c: bc89 cmpl %a1,%d6 4c43e: 6500 0148 bcsw 4c588 <_Heap_Allocate_aligned_with_boundary+0x170> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4c442: 4a84 tstl %d4 4c444: 670c beqs 4c452 <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4c446: b889 cmpl %a1,%d4 4c448: 6500 013e bcsw 4c588 <_Heap_Allocate_aligned_with_boundary+0x170> return NULL; } if ( alignment == 0 ) { 4c44c: 4a81 tstl %d1 4c44e: 6602 bnes 4c452 <_Heap_Allocate_aligned_with_boundary+0x3a> alignment = page_size; 4c450: 2200 movel %d0,%d1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4c452: 206a 0008 moveal %a2@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c456: 4283 clrl %d3 4c458: b1ca cmpal %a2,%a0 4c45a: 6732 beqs 4c48e <_Heap_Allocate_aligned_with_boundary+0x76> 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; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c45c: 242e fffc movel %fp@(-4),%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c460: 7a04 moveq #4,%d5 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; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c462: 5e82 addql #7,%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c464: 9a89 subl %a1,%d5 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; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c466: 2d42 fff8 movel %d2,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c46a: 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 ) { 4c46e: 2028 0004 movel %a0@(4),%d0 4c472: b086 cmpl %d6,%d0 4c474: 6330 blss 4c4a6 <_Heap_Allocate_aligned_with_boundary+0x8e> if ( alignment == 0 ) { 4c476: 4a81 tstl %d1 4c478: 6638 bnes 4c4b2 <_Heap_Allocate_aligned_with_boundary+0x9a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4c47a: 2408 movel %a0,%d2 4c47c: 5082 addql #8,%d2 ); } } /* Statistics */ ++search_count; 4c47e: 5283 addql #1,%d3 if ( alloc_begin != 0 ) { 4c480: 4a82 tstl %d2 4c482: 6600 00e6 bnew 4c56a <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4c486: 2068 0008 moveal %a0@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c48a: b1ca cmpal %a2,%a0 4c48c: 66e0 bnes 4c46e <_Heap_Allocate_aligned_with_boundary+0x56> 4c48e: 4282 clrl %d2 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4c490: b6aa 0044 cmpl %a2@(68),%d3 4c494: 6304 blss 4c49a <_Heap_Allocate_aligned_with_boundary+0x82> stats->max_search = search_count; 4c496: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 4c49a: 2002 movel %d2,%d0 } 4c49c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c4a2: 4e5e unlk %fp 4c4a4: 4e75 rts if ( alloc_begin != 0 ) { break; } block = block->next; 4c4a6: 2068 0008 moveal %a0@(8),%a0 ); } } /* Statistics */ ++search_count; 4c4aa: 5283 addql #1,%d3 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c4ac: b1ca cmpal %a2,%a0 4c4ae: 66be bnes 4c46e <_Heap_Allocate_aligned_with_boundary+0x56> 4c4b0: 60dc bras 4c48e <_Heap_Allocate_aligned_with_boundary+0x76> - 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; 4c4b2: 7efe moveq #-2,%d7 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4c4b4: 4be8 0008 lea %a0@(8),%a5 - 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; 4c4b8: c087 andl %d7,%d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c4ba: 286a 0014 moveal %a2@(20),%a4 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; 4c4be: 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; 4c4c0: 2a2e fff8 movel %fp@(-8),%d5 4c4c4: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 4c4c6: 242e fff4 movel %fp@(-12),%d2 4c4ca: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c4cc: 2e02 movel %d2,%d7 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; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c4ce: d085 addl %d5,%d0 4c4d0: 4c41 7005 remul %d1,%d5,%d7 4c4d4: 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 ) { 4c4d6: b480 cmpl %d0,%d2 4c4d8: 630a blss 4c4e4 <_Heap_Allocate_aligned_with_boundary+0xcc> 4c4da: 2a00 movel %d0,%d5 4c4dc: 4c41 5002 remul %d1,%d2,%d5 4c4e0: 9082 subl %d2,%d0 4c4e2: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4c4e4: 4a84 tstl %d4 4c4e6: 6756 beqs 4c53e <_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; 4c4e8: 2002 movel %d2,%d0 4c4ea: d089 addl %a1,%d0 4c4ec: 2e00 movel %d0,%d7 4c4ee: 4c44 7005 remul %d4,%d5,%d7 4c4f2: 2e00 movel %d0,%d7 4c4f4: 9e85 subl %d5,%d7 4c4f6: 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 ) { 4c4f8: be82 cmpl %d2,%d7 4c4fa: 6342 blss 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> 4c4fc: be80 cmpl %d0,%d7 4c4fe: 643e bccs 4c53e <_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; 4c500: 2e0d movel %a5,%d7 4c502: 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 ) { 4c504: ba87 cmpl %d7,%d5 4c506: 652a bcss 4c532 <_Heap_Allocate_aligned_with_boundary+0x11a> 4c508: 2647 moveal %d7,%a3 return 0; } alloc_begin = boundary_line - alloc_size; 4c50a: 2405 movel %d5,%d2 4c50c: 9489 subl %a1,%d2 4c50e: 2a02 movel %d2,%d5 4c510: 4c41 5000 remul %d1,%d0,%d5 4c514: 9480 subl %d0,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4c516: 2002 movel %d2,%d0 4c518: d089 addl %a1,%d0 4c51a: 2e00 movel %d0,%d7 4c51c: 4c44 7005 remul %d4,%d5,%d7 4c520: 2e00 movel %d0,%d7 4c522: 9e85 subl %d5,%d7 4c524: 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 ) { 4c526: be82 cmpl %d2,%d7 4c528: 6314 blss 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> 4c52a: be80 cmpl %d0,%d7 4c52c: 6410 bccs 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4c52e: ba8b cmpl %a3,%d5 4c530: 64d8 bccs 4c50a <_Heap_Allocate_aligned_with_boundary+0xf2><== ALWAYS TAKEN if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 4c532: 4282 clrl %d2 ); } } /* Statistics */ ++search_count; 4c534: 5283 addql #1,%d3 if ( alloc_begin != 0 ) { 4c536: 4a82 tstl %d2 4c538: 6700 ff4c beqw 4c486 <_Heap_Allocate_aligned_with_boundary+0x6e> 4c53c: 602c bras 4c56a <_Heap_Allocate_aligned_with_boundary+0x152><== NOT EXECUTED 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 ) { 4c53e: b48d cmpl %a5,%d2 4c540: 65f0 bcss 4c532 <_Heap_Allocate_aligned_with_boundary+0x11a> 4c542: 70f8 moveq #-8,%d0 4c544: 9088 subl %a0,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c546: 2a40 moveal %d0,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c548: 2e02 movel %d2,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c54a: dbc2 addal %d2,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c54c: 202e fffc movel %fp@(-4),%d0 4c550: 4c40 7005 remul %d0,%d5,%d7 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; 4c554: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4c556: bbcc cmpal %a4,%a5 4c558: 6400 ff24 bccw 4c47e <_Heap_Allocate_aligned_with_boundary+0x66> return alloc_begin; } } return 0; 4c55c: 4a8d tstl %a5 4c55e: 57c0 seq %d0 ); } } /* Statistics */ ++search_count; 4c560: 5283 addql #1,%d3 if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 4c562: 49c0 extbl %d0 4c564: c480 andl %d0,%d2 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 4c566: 6700 ff1e beqw 4c486 <_Heap_Allocate_aligned_with_boundary+0x6e> if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c56a: 2f09 movel %a1,%sp@- search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 4c56c: 52aa 0048 addql #1,%a2@(72) stats->searches += search_count; 4c570: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c574: 2f02 movel %d2,%sp@- 4c576: 2f08 movel %a0,%sp@- 4c578: 2f0a movel %a2,%sp@- 4c57a: 4eb9 0004 7d54 jsr 47d54 <_Heap_Block_allocate> 4c580: 4fef 0010 lea %sp@(16),%sp 4c584: 6000 ff0a braw 4c490 <_Heap_Allocate_aligned_with_boundary+0x78> return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; 4c588: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c58a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c590: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c548 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4c548: 4e56 ffcc linkw %fp,#-52 4c54c: 202e 0010 movel %fp@(16),%d0 4c550: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c554: 246e 0008 moveal %fp@(8),%a2 4c558: 242e 000c movel %fp@(12),%d2 Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 4c55c: 2602 movel %d2,%d3 4c55e: d680 addl %d0,%d3 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 4c560: 2a2a 0020 movel %a2@(32),%d5 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 4c564: 282a 0010 movel %a2@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 4c568: 222a 0014 movel %a2@(20),%d1 uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 4c56c: 2c2a 0030 movel %a2@(48),%d6 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 4c570: 42ae fff8 clrl %fp@(-8) Heap_Block *extend_last_block = NULL; 4c574: 42ae fffc clrl %fp@(-4) uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 4c578: b682 cmpl %d2,%d3 4c57a: 640c bccs 4c588 <_Heap_Extend+0x40> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c57c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 4c582: 4200 clrb %d0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c584: 4e5e unlk %fp 4c586: 4e75 rts if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4c588: 486e fffc pea %fp@(-4) 4c58c: 486e fff8 pea %fp@(-8) 4c590: 2f01 movel %d1,%sp@- 4c592: 2f04 movel %d4,%sp@- 4c594: 2f00 movel %d0,%sp@- 4c596: 2f02 movel %d2,%sp@- 4c598: 4eb9 0004 7b78 jsr 47b78 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4c59e: 4fef 0018 lea %sp@(24),%sp 4c5a2: 4a00 tstb %d0 4c5a4: 67d6 beqs 4c57c <_Heap_Extend+0x34> 4c5a6: 2045 moveal %d5,%a0 4c5a8: 9bcd subal %a5,%a5 4c5aa: 97cb subal %a3,%a3 4c5ac: 99cc subal %a4,%a4 4c5ae: 42ae fff4 clrl %fp@(-12) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4c5b2: ba88 cmpl %a0,%d5 4c5b4: 6700 0148 beqw 4c6fe <_Heap_Extend+0x1b6> 4c5b8: 2208 movel %a0,%d1 uintptr_t const sub_area_end = start_block->prev_size; 4c5ba: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4c5bc: b082 cmpl %d2,%d0 4c5be: 6304 blss 4c5c4 <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4c5c0: b681 cmpl %d1,%d3 4c5c2: 62b8 bhis 4c57c <_Heap_Extend+0x34> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4c5c4: b681 cmpl %d1,%d3 4c5c6: 6700 0130 beqw 4c6f8 <_Heap_Extend+0x1b0> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4c5ca: b083 cmpl %d3,%d0 4c5cc: 6304 blss 4c5d2 <_Heap_Extend+0x8a> 4c5ce: 2d48 fff4 movel %a0,%fp@(-12) 4c5d2: 2e00 movel %d0,%d7 4c5d4: 2240 moveal %d0,%a1 4c5d6: 5189 subql #8,%a1 4c5d8: 4c44 7001 remul %d4,%d1,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c5dc: 93c1 subal %d1,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4c5de: b480 cmpl %d0,%d2 4c5e0: 6700 00fe beqw 4c6e0 <_Heap_Extend+0x198> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4c5e4: b082 cmpl %d2,%d0 4c5e6: 6402 bccs 4c5ea <_Heap_Extend+0xa2> 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 ) 4c5e8: 2a49 moveal %a1,%a5 - 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; 4c5ea: 70fe moveq #-2,%d0 4c5ec: c0a9 0004 andl %a1@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4c5f0: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4c5f4: b1c5 cmpal %d5,%a0 4c5f6: 66ba bnes 4c5b2 <_Heap_Extend+0x6a> if ( extend_area_begin < heap->area_begin ) { 4c5f8: b4aa 0018 cmpl %a2@(24),%d2 4c5fc: 6500 0108 bcsw 4c706 <_Heap_Extend+0x1be> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 4c600: b6aa 001c cmpl %a2@(28),%d3 4c604: 6304 blss 4c60a <_Heap_Extend+0xc2> heap->area_end = extend_area_end; 4c606: 2543 001c movel %d3,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4c60a: 226e fffc moveal %fp@(-4),%a1 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4c60e: 2009 movel %a1,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c610: 7201 moveq #1,%d1 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4c612: 206e fff8 moveal %fp@(-8),%a0 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4c616: 9088 subl %a0,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c618: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4c61a: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c61c: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4c620: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4c622: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4c626: b1ea 0020 cmpal %a2@(32),%a0 4c62a: 6400 0102 bccw 4c72e <_Heap_Extend+0x1e6> heap->first_block = extend_first_block; 4c62e: 2548 0020 movel %a0,%a2@(32) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 4c632: 4a8c tstl %a4 4c634: 6700 0146 beqw 4c77c <_Heap_Extend+0x234> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4c638: 202a 0010 movel %a2@(16),%d0 uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 4c63c: 5082 addql #8,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4c63e: 2802 movel %d2,%d4 4c640: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4c644: 4a81 tstl %d1 4c646: 6704 beqs 4c64c <_Heap_Extend+0x104> return value - remainder + alignment; 4c648: d480 addl %d0,%d2 4c64a: 9481 subl %d1,%d2 uintptr_t const new_first_block_begin = 4c64c: 2042 moveal %d2,%a0 4c64e: 5188 subql #8,%a0 new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 4c650: 200c movel %a4,%d0 4c652: 9088 subl %a0,%d0 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4c654: 7201 moveq #1,%d1 4c656: 8280 orl %d0,%d1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 4c658: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4c65a: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4c65e: 2f08 movel %a0,%sp@- 4c660: 2f0a movel %a2,%sp@- 4c662: 4eba fec8 jsr %pc@(4c52c <_Heap_Free_block>) 4c666: 508f addql #8,%sp link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4c668: 4a8b tstl %a3 4c66a: 6700 00d2 beqw 4c73e <_Heap_Extend+0x1f6> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 4c66e: 5183 subql #8,%d3 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 4c670: 968b subl %a3,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c672: 2203 movel %d3,%d1 4c674: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; 4c67a: 7201 moveq #1,%d1 4c67c: 9680 subl %d0,%d3 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 4c67e: 202b 0004 movel %a3@(4),%d0 4c682: 9083 subl %d3,%d0 | HEAP_PREV_BLOCK_USED; 4c684: 8280 orl %d0,%d1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4c686: 7001 moveq #1,%d0 4c688: 2781 3804 movel %d1,%a3@(00000004,%d3:l) 4c68c: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4c690: 8680 orl %d0,%d3 4c692: 2743 0004 movel %d3,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4c696: 2f0b movel %a3,%sp@- 4c698: 2f0a movel %a2,%sp@- 4c69a: 4eba fe90 jsr %pc@(4c52c <_Heap_Free_block>) 4c69e: 508f addql #8,%sp extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4c6a0: 4a8c tstl %a4 4c6a2: 6700 00c2 beqw 4c766 <_Heap_Extend+0x21e> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c6a6: 206a 0024 moveal %a2@(36),%a0 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4c6aa: 7201 moveq #1,%d1 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 4c6ac: 202a 0020 movel %a2@(32),%d0 4c6b0: 9088 subl %a0,%d0 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4c6b2: c2a8 0004 andl %a0@(4),%d1 block->size_and_flag = size | flag; 4c6b6: 8280 orl %d0,%d1 4c6b8: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4c6bc: 222a 0030 movel %a2@(48),%d1 4c6c0: 9286 subl %d6,%d1 /* Statistics */ stats->size += extended_size; 4c6c2: d3aa 002c addl %d1,%a2@(44) if ( extended_size_ptr != NULL ) 4c6c6: 4aae 0014 tstl %fp@(20) 4c6ca: 6700 00ca beqw 4c796 <_Heap_Extend+0x24e> *extended_size_ptr = extended_size; 4c6ce: 206e 0014 moveal %fp@(20),%a0 return true; } 4c6d2: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4c6d8: 7001 moveq #1,%d0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; 4c6da: 2081 movel %d1,%a0@ return true; } 4c6dc: 4e5e unlk %fp 4c6de: 4e75 rts - 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; 4c6e0: 70fe moveq #-2,%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 ) 4c6e2: 2649 moveal %a1,%a3 } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 4c6e4: 2083 movel %d3,%a0@ - 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; 4c6e6: c0a9 0004 andl %a1@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4c6ea: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4c6ee: b1c5 cmpal %d5,%a0 4c6f0: 6600 fec0 bnew 4c5b2 <_Heap_Extend+0x6a> 4c6f4: 6000 ff02 braw 4c5f8 <_Heap_Extend+0xb0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4c6f8: 2848 moveal %a0,%a4 4c6fa: 6000 fed6 braw 4c5d2 <_Heap_Extend+0x8a> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4c6fe: 222a 0018 movel %a2@(24),%d1 4c702: 6000 feb6 braw 4c5ba <_Heap_Extend+0x72> } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4c706: 226e fffc moveal %fp@(-4),%a1 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4c70a: 2009 movel %a1,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c70c: 7201 moveq #1,%d1 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4c70e: 206e fff8 moveal %fp@(-8),%a0 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4c712: 9088 subl %a0,%d0 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 4c714: 2542 0018 movel %d2,%a2@(24) extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c718: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4c71a: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c71c: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4c720: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4c722: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4c726: b1ea 0020 cmpal %a2@(32),%a0 4c72a: 6500 ff02 bcsw 4c62e <_Heap_Extend+0xe6> heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4c72e: b3ea 0024 cmpal %a2@(36),%a1 4c732: 6300 fefe blsw 4c632 <_Heap_Extend+0xea> heap->last_block = extend_last_block; 4c736: 2549 0024 movel %a1,%a2@(36) 4c73a: 6000 fef6 braw 4c632 <_Heap_Extend+0xea> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4c73e: 4a8d tstl %a5 4c740: 6700 ff5e beqw 4c6a0 <_Heap_Extend+0x158> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4c744: 7201 moveq #1,%d1 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 4c746: 202e fff8 movel %fp@(-8),%d0 4c74a: 908d subl %a5,%d0 4c74c: c2ad 0004 andl %a5@(4),%d1 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( 4c750: 206e fffc moveal %fp@(-4),%a0 block->size_and_flag = size | flag; 4c754: 8280 orl %d0,%d1 uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 4c756: 7001 moveq #1,%d0 4c758: 2b41 0004 movel %d1,%a5@(4) 4c75c: 81a8 0004 orl %d0,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4c760: 4a8c tstl %a4 4c762: 6600 ff42 bnew 4c6a6 <_Heap_Extend+0x15e> 4c766: 4a8b tstl %a3 4c768: 6600 ff3c bnew 4c6a6 <_Heap_Extend+0x15e> _Heap_Free_block( heap, extend_first_block ); 4c76c: 2f2e fff8 movel %fp@(-8),%sp@- 4c770: 2f0a movel %a2,%sp@- 4c772: 4eba fdb8 jsr %pc@(4c52c <_Heap_Free_block>) 4c776: 508f addql #8,%sp 4c778: 6000 ff2c braw 4c6a6 <_Heap_Extend+0x15e> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 4c77c: 4aae fff4 tstl %fp@(-12) 4c780: 6700 fee6 beqw 4c668 <_Heap_Extend+0x120> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 4c784: 202e fff4 movel %fp@(-12),%d0 4c788: 7201 moveq #1,%d1 4c78a: 9089 subl %a1,%d0 4c78c: 8280 orl %d0,%d1 4c78e: 2341 0004 movel %d1,%a1@(4) 4c792: 6000 fed4 braw 4c668 <_Heap_Extend+0x120> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c796: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4c79c: 7001 moveq #1,%d0 <== NOT EXECUTED } 4c79e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004c594 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4c594: 4e56 ffe8 linkw %fp,#-24 4c598: 206e 0008 moveal %fp@(8),%a0 4c59c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4c5a0: 202e 000c movel %fp@(12),%d0 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 4c5a4: 6700 00f2 beqw 4c698 <_Heap_Free+0x104> 4c5a8: 2240 moveal %d0,%a1 4c5aa: 5189 subql #8,%a1 4c5ac: 4c68 0001 0010 remul %a0@(16),%d1,%d0 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 4c5b2: 2028 0020 movel %a0@(32),%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c5b6: 93c1 subal %d1,%a1 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; 4c5b8: b089 cmpl %a1,%d0 4c5ba: 6200 0098 bhiw 4c654 <_Heap_Free+0xc0> 4c5be: 2228 0024 movel %a0@(36),%d1 4c5c2: b289 cmpl %a1,%d1 4c5c4: 6500 008e bcsw 4c654 <_Heap_Free+0xc0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c5c8: 2629 0004 movel %a1@(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; 4c5cc: 74fe moveq #-2,%d2 4c5ce: 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); 4c5d0: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 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; 4c5d4: b5c0 cmpal %d0,%a2 4c5d6: 657c bcss 4c654 <_Heap_Free+0xc0> <== NEVER TAKEN 4c5d8: b5c1 cmpal %d1,%a2 4c5da: 6278 bhis 4c654 <_Heap_Free+0xc0> 4c5dc: 282a 0004 movel %a2@(4),%d4 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4c5e0: 0804 0000 btst #0,%d4 4c5e4: 676e beqs 4c654 <_Heap_Free+0xc0> - 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; 4c5e6: 7afe moveq #-2,%d5 4c5e8: c885 andl %d5,%d4 return true; } 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 )); 4c5ea: b5c1 cmpal %d1,%a2 4c5ec: 6700 00fa beqw 4c6e8 <_Heap_Free+0x154> 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; 4c5f0: 7a01 moveq #1,%d5 4c5f2: cab2 4804 andl %a2@(00000004,%d4:l),%d5 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4c5f6: 57c5 seq %d5 4c5f8: 4485 negl %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 ) ) { 4c5fa: 0803 0000 btst #0,%d3 4c5fe: 665e bnes 4c65e <_Heap_Free+0xca> uintptr_t const prev_size = block->prev_size; 4c600: 2611 movel %a1@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4c602: 93c3 subal %d3,%a1 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; 4c604: b3c0 cmpal %d0,%a1 4c606: 654c bcss 4c654 <_Heap_Free+0xc0> <== NEVER TAKEN 4c608: b3c1 cmpal %d1,%a1 4c60a: 6248 bhis 4c654 <_Heap_Free+0xc0> <== 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; 4c60c: 7001 moveq #1,%d0 4c60e: c0a9 0004 andl %a1@(4),%d0 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) ) { 4c612: 6740 beqs 4c654 <_Heap_Free+0xc0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4c614: 4a05 tstb %d5 4c616: 6700 00d6 beqw 4c6ee <_Heap_Free+0x15a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c61a: 266a 0008 moveal %a2@(8),%a3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4c61e: d682 addl %d2,%d3 4c620: d883 addl %d3,%d4 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c622: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c624: 246a 000c moveal %a2@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4c628: 254b 0008 movel %a3,%a2@(8) 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; 4c62c: 8084 orl %d4,%d0 next->prev = prev; 4c62e: 274a 000c movel %a2,%a3@(12) } 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; 4c632: 53a8 0038 subql #1,%a0@(56) 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; 4c636: 2384 4800 movel %d4,%a1@(00000000,%d4: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; 4c63a: 2340 0004 movel %d0,%a1@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c63e: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c642: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c646: d5a8 0030 addl %d2,%a0@(48) return( true ); 4c64a: 7001 moveq #1,%d0 } 4c64c: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4c650: 4e5e unlk %fp 4c652: 4e75 rts 4c654: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 4c658: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c65a: 4e5e unlk %fp 4c65c: 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 */ 4c65e: 4a05 tstb %d5 4c660: 673a beqs 4c69c <_Heap_Free+0x108> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c662: 266a 0008 moveal %a2@(8),%a3 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 */ uintptr_t const size = block_size + next_block_size; 4c666: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c668: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c66a: 246a 000c moveal %a2@(12),%a2 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; 4c66e: 8084 orl %d4,%d0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4c670: 234b 0008 movel %a3,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4c674: 2384 4800 movel %d4,%a1@(00000000,%d4:l) new_block->prev = prev; 4c678: 234a 000c movel %a2,%a1@(12) 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; 4c67c: 2340 0004 movel %d0,%a1@(4) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c680: 7001 moveq #1,%d0 next->prev = new_block; prev->next = new_block; 4c682: 2549 0008 movel %a1,%a2@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4c686: 2749 000c movel %a1,%a3@(12) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c68a: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c68e: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c692: d5a8 0030 addl %d2,%a0@(48) 4c696: 60b4 bras 4c64c <_Heap_Free+0xb8> * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 4c698: 7001 moveq #1,%d0 4c69a: 60b0 bras 4c64c <_Heap_Free+0xb8> block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4c69c: 2028 0038 movel %a0@(56),%d0 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; 4c6a0: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6a2: 7afe moveq #-2,%d5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4c6a4: 5280 addql #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4c6a6: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4c6aa: 2348 000c movel %a0,%a1@(12) 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; 4c6ae: 8282 orl %d2,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4c6b0: 234b 0008 movel %a3,%a1@(8) 4c6b4: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6b8: cbaa 0004 andl %d5,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4c6bc: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4c6c0: 2482 movel %d2,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4c6c2: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4c6c6: 2140 0038 movel %d0,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4c6ca: b0a8 003c cmpl %a0@(60),%d0 4c6ce: 6300 ff6e blsw 4c63e <_Heap_Free+0xaa> stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c6d2: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c6d6: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c6da: d5a8 0030 addl %d2,%a0@(48) 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; 4c6de: 2140 003c movel %d0,%a0@(60) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c6e2: 7001 moveq #1,%d0 4c6e4: 6000 ff66 braw 4c64c <_Heap_Free+0xb8> return true; } 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 )); 4c6e8: 4205 clrb %d5 4c6ea: 6000 ff0e braw 4c5fa <_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; 4c6ee: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c6f0: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6f2: 7afe moveq #-2,%d5 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; 4c6f4: 8283 orl %d3,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4c6f6: 2483 movel %d3,%a2@ /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c6f8: 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; 4c6fa: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6fe: cbaa 0004 andl %d5,%a2@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c702: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c706: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c70a: d5a8 0030 addl %d2,%a0@(48) 4c70e: 6000 ff3c braw 4c64c <_Heap_Free+0xb8> ... =============================================================================== 00051580 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 51580: 4e56 fff0 linkw %fp,#-16 51584: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 51588: 266e 0008 moveal %fp@(8),%a3 5158c: 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; 51590: 206b 0008 moveal %a3@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 51594: 4292 clrl %a2@ info->largest = 0; 51596: 42aa 0004 clrl %a2@(4) info->total = 0; 5159a: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 5159e: b1cb cmpal %a3,%a0 515a0: 6732 beqs 515d4 <_Heap_Get_free_information+0x54><== NEVER TAKEN 515a2: 327c 0001 moveaw #1,%a1 515a6: 4282 clrl %d2 515a8: 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; 515aa: 70fe moveq #-2,%d0 the_block != tail; the_block = the_block->next) 515ac: 2609 movel %a1,%d3 515ae: 5283 addql #1,%d3 515b0: 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; 515b4: d280 addl %d0,%d1 if ( info->largest < the_size ) 515b6: b480 cmpl %d0,%d2 515b8: 6404 bccs 515be <_Heap_Get_free_information+0x3e> info->largest = the_size; 515ba: 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) 515be: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 515c2: b1cb cmpal %a3,%a0 515c4: 6708 beqs 515ce <_Heap_Get_free_information+0x4e> 515c6: 242a 0004 movel %a2@(4),%d2 515ca: 2243 moveal %d3,%a1 515cc: 60dc bras 515aa <_Heap_Get_free_information+0x2a> 515ce: 2489 movel %a1,%a2@ 515d0: 2541 0008 movel %d1,%a2@(8) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 515d4: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 515d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cfb4 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 4cfb4: 4e56 fff0 linkw %fp,#-16 4cfb8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4cfbc: 246e 0008 moveal %fp@(8),%a2 4cfc0: 282e 000c movel %fp@(12),%d4 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); 4cfc4: 2044 moveal %d4,%a0 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 4cfc6: 226a 0020 moveal %a2@(32),%a1 Heap_Block *const end = the_heap->last_block; 4cfca: 242a 0024 movel %a2@(36),%d2 memset(the_info, 0, sizeof(*the_info)); 4cfce: 4298 clrl %a0@+ 4cfd0: 4298 clrl %a0@+ 4cfd2: 4298 clrl %a0@+ 4cfd4: 4298 clrl %a0@+ 4cfd6: 4298 clrl %a0@+ 4cfd8: 4290 clrl %a0@ while ( the_block != end ) { 4cfda: b489 cmpl %a1,%d2 4cfdc: 6734 beqs 4d012 <_Heap_Get_information+0x5e> <== 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; 4cfde: 2604 movel %d4,%d3 4cfe0: 0683 0000 000c addil #12,%d3 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4cfe6: 2229 0004 movel %a1@(4),%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cfea: 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) ) info = &the_info->Used; 4cfec: 2043 moveal %d3,%a0 4cfee: 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); 4cff0: d3c0 addal %d0,%a1 if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4cff2: 2229 0004 movel %a1@(4),%d1 while ( the_block != end ) { 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) ) 4cff6: 0801 0000 btst #0,%d1 4cffa: 6602 bnes 4cffe <_Heap_Get_information+0x4a> info = &the_info->Used; else info = &the_info->Free; 4cffc: 2044 moveal %d4,%a0 info->number++; 4cffe: 5290 addql #1,%a0@ info->total += the_size; 4d000: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 4d004: b0a8 0004 cmpl %a0@(4),%d0 4d008: 6304 blss 4d00e <_Heap_Get_information+0x5a> info->largest = the_size; 4d00a: 2140 0004 movel %d0,%a0@(4) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4d00e: b3c2 cmpal %d2,%a1 4d010: 66d8 bnes 4cfea <_Heap_Get_information+0x36> if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4d012: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4d016: 4e5e unlk %fp ... =============================================================================== 0005c188 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5c188: 4e56 0000 linkw %fp,#0 5c18c: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5c190: 2040 moveal %d0,%a0 5c192: 5188 subql #8,%a0 5c194: 226e 0008 moveal %fp@(8),%a1 5c198: 2f02 movel %d2,%sp@- 5c19a: 2400 movel %d0,%d2 5c19c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 5c1a2: 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 5c1a4: 2229 0020 movel %a1@(32),%d1 && (uintptr_t) block <= (uintptr_t) heap->last_block; 5c1a8: b288 cmpl %a0,%d1 5c1aa: 6238 bhis 5c1e4 <_Heap_Size_of_alloc_area+0x5c> 5c1ac: 2269 0024 moveal %a1@(36),%a1 5c1b0: b3c8 cmpal %a0,%a1 5c1b2: 6530 bcss 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== 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; 5c1b4: 74fe moveq #-2,%d2 5c1b6: c4a8 0004 andl %a0@(4),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5c1ba: 41f0 2800 lea %a0@(00000000,%d2:l),%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; 5c1be: b1c1 cmpal %d1,%a0 5c1c0: 6522 bcss 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5c1c2: b1c9 cmpal %a1,%a0 5c1c4: 621e bhis 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== 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; 5c1c6: 7201 moveq #1,%d1 5c1c8: c2a8 0004 andl %a0@(4),%d1 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5c1cc: 6716 beqs 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5c1ce: 7204 moveq #4,%d1 5c1d0: 9280 subl %d0,%d1 5c1d2: 2001 movel %d1,%d0 5c1d4: d088 addl %a0,%d0 5c1d6: 226e 0010 moveal %fp@(16),%a1 return true; } 5c1da: 241f movel %sp@+,%d2 5c1dc: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5c1de: 2280 movel %d0,%a1@ return true; 5c1e0: 7001 moveq #1,%d0 } 5c1e2: 4e75 rts 5c1e4: 241f movel %sp@+,%d2 5c1e6: 4e5e unlk %fp if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 5c1e8: 4200 clrb %d0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } =============================================================================== 000485f2 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 485f2: 4e56 ffc4 linkw %fp,#-60 485f6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 485fa: 246e 0008 moveal %fp@(8),%a2 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 485fe: 4bfa ff94 lea %pc@(48594 <_Heap_Walk_print_nothing>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 48602: 2a2e 000c movel %fp@(12),%d5 uintptr_t const page_size = heap->page_size; 48606: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 4860a: 2c2a 0014 movel %a2@(20),%d6 Heap_Block *const first_block = heap->first_block; 4860e: 282a 0020 movel %a2@(32),%d4 Heap_Block *const last_block = heap->last_block; 48612: 2e2a 0024 movel %a2@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 48616: 4a2e 0013 tstb %fp@(19) 4861a: 6704 beqs 48620 <_Heap_Walk+0x2e> 4861c: 4bfa ff7e lea %pc@(4859c <_Heap_Walk_print>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 48620: 7003 moveq #3,%d0 48622: b0b9 0006 1c50 cmpl 61c50 <_System_state_Current>,%d0 48628: 670c beqs 48636 <_Heap_Walk+0x44> block = next_block; } while ( block != first_block ); return true; } 4862a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 } block = next_block; } while ( block != first_block ); return true; 48630: 7001 moveq #1,%d0 } 48632: 4e5e unlk %fp 48634: 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)( 48636: 2f2a 000c movel %a2@(12),%sp@- 4863a: 2f2a 0008 movel %a2@(8),%sp@- 4863e: 2f07 movel %d7,%sp@- 48640: 2f04 movel %d4,%sp@- 48642: 2f2a 001c movel %a2@(28),%sp@- 48646: 2f2a 0018 movel %a2@(24),%sp@- 4864a: 2f06 movel %d6,%sp@- 4864c: 2f03 movel %d3,%sp@- 4864e: 4879 0005 e117 pea 5e117 <_Status_Object_name_errors_to_status+0x5d> 48654: 42a7 clrl %sp@- 48656: 2f05 movel %d5,%sp@- 48658: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 4865a: 4fef 002c lea %sp@(44),%sp 4865e: 4a83 tstl %d3 48660: 6700 0082 beqw 486e4 <_Heap_Walk+0xf2> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 48664: 7003 moveq #3,%d0 48666: c083 andl %d3,%d0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 48668: 6600 0090 bnew 486fa <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4866c: 2206 movel %d6,%d1 4866e: 4c43 1000 remul %d3,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 48672: 4a80 tstl %d0 48674: 6600 00a4 bnew 4871a <_Heap_Walk+0x128> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 48678: 2004 movel %d4,%d0 4867a: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4867c: 4c43 0001 remul %d3,%d1,%d0 ); return false; } if ( 48680: 4a81 tstl %d1 48682: 6600 00ae bnew 48732 <_Heap_Walk+0x140> block = next_block; } while ( block != first_block ); return true; } 48686: 2044 moveal %d4,%a0 48688: 2228 0004 movel %a0@(4),%d1 4868c: 2d41 fff0 movel %d1,%fp@(-16) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 48690: 0801 0000 btst #0,%d1 48694: 6700 00b4 beqw 4874a <_Heap_Walk+0x158> - 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; 48698: 2047 moveal %d7,%a0 4869a: 72fe moveq #-2,%d1 4869c: c2a8 0004 andl %a0@(4),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 486a0: d1c1 addal %d1,%a0 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; 486a2: 7201 moveq #1,%d1 486a4: c2a8 0004 andl %a0@(4),%d1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 486a8: 6724 beqs 486ce <_Heap_Walk+0xdc> ); return false; } if ( 486aa: b1c4 cmpal %d4,%a0 486ac: 6700 00b4 beqw 48762 <_Heap_Walk+0x170> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 486b0: 4879 0005 e271 pea 5e271 <_Status_Object_name_errors_to_status+0x1b7> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 486b6: 4878 0001 pea 1 486ba: 2f05 movel %d5,%sp@- 486bc: 4e95 jsr %a5@ 486be: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 486c2: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 486c4: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 486ca: 4e5e unlk %fp 486cc: 4e75 rts return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 486ce: 4879 0005 e25c pea 5e25c <_Status_Object_name_errors_to_status+0x1a2> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 486d4: 4878 0001 pea 1 486d8: 2f05 movel %d5,%sp@- 486da: 4e95 jsr %a5@ 486dc: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 486e0: 4200 clrb %d0 486e2: 60e0 bras 486c4 <_Heap_Walk+0xd2> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 486e4: 4879 0005 e1a8 pea 5e1a8 <_Status_Object_name_errors_to_status+0xee> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 486ea: 4878 0001 pea 1 486ee: 2f05 movel %d5,%sp@- 486f0: 4e95 jsr %a5@ 486f2: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 486f6: 4200 clrb %d0 486f8: 60ca bras 486c4 <_Heap_Walk+0xd2> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 486fa: 2f03 movel %d3,%sp@- 486fc: 4879 0005 e1bb pea 5e1bb <_Status_Object_name_errors_to_status+0x101> 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)( 48702: 4878 0001 pea 1 48706: 2f05 movel %d5,%sp@- 48708: 4e95 jsr %a5@ 4870a: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4870e: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48710: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48716: 4e5e unlk %fp 48718: 4e75 rts return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 4871a: 2f06 movel %d6,%sp@- 4871c: 4879 0005 e1d9 pea 5e1d9 <_Status_Object_name_errors_to_status+0x11f> 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)( 48722: 4878 0001 pea 1 48726: 2f05 movel %d5,%sp@- 48728: 4e95 jsr %a5@ 4872a: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4872e: 4200 clrb %d0 48730: 60de bras 48710 <_Heap_Walk+0x11e> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 48732: 2f04 movel %d4,%sp@- 48734: 4879 0005 e1fd pea 5e1fd <_Status_Object_name_errors_to_status+0x143> 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)( 4873a: 4878 0001 pea 1 4873e: 2f05 movel %d5,%sp@- 48740: 4e95 jsr %a5@ 48742: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48746: 4200 clrb %d0 48748: 60c6 bras 48710 <_Heap_Walk+0x11e> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 4874a: 4879 0005 e22e pea 5e22e <_Status_Object_name_errors_to_status+0x174> 48750: 4878 0001 pea 1 48754: 2f05 movel %d5,%sp@- 48756: 4e95 jsr %a5@ 48758: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4875c: 4200 clrb %d0 4875e: 6000 ff64 braw 486c4 <_Heap_Walk+0xd2> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 48762: 202a 0010 movel %a2@(16),%d0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 48766: 206a 0008 moveal %a2@(8),%a0 4876a: 2d40 fffc movel %d0,%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 ) { 4876e: b1ca cmpal %a2,%a0 48770: 6700 0316 beqw 48a88 <_Heap_Walk+0x496> block = next_block; } while ( block != first_block ); return true; } 48774: 242a 0020 movel %a2@(32),%d2 48778: 2d42 fff4 movel %d2,%fp@(-12) 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; 4877c: b1c2 cmpal %d2,%a0 4877e: 6500 0090 bcsw 48810 <_Heap_Walk+0x21e> 48782: 266a 0024 moveal %a2@(36),%a3 48786: b7c8 cmpal %a0,%a3 48788: 6500 0086 bcsw 48810 <_Heap_Walk+0x21e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4878c: 49e8 0008 lea %a0@(8),%a4 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48790: 200c movel %a4,%d0 48792: 222e fffc movel %fp@(-4),%d1 48796: 4c41 0002 remul %d1,%d2,%d0 ); return false; } if ( 4879a: 4a82 tstl %d2 4879c: 6600 00ae bnew 4884c <_Heap_Walk+0x25a> - 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; 487a0: 74fe moveq #-2,%d2 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; 487a2: 7001 moveq #1,%d0 - 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; 487a4: c4a8 0004 andl %a0@(4),%d2 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; 487a8: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 487ac: 6648 bnes 487f6 <_Heap_Walk+0x204> <== NEVER TAKEN 487ae: 222e fff4 movel %fp@(-12),%d1 487b2: 224a moveal %a2,%a1 487b4: 2848 moveal %a0,%a4 487b6: 2d43 fff8 movel %d3,%fp@(-8) ); return false; } if ( free_block->prev != prev_block ) { 487ba: 2428 000c movel %a0@(12),%d2 487be: b3c2 cmpal %d2,%a1 487c0: 6668 bnes 4882a <_Heap_Walk+0x238> <== NEVER TAKEN return false; } prev_block = free_block; free_block = free_block->next; 487c2: 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 ) { 487c6: b1ca cmpal %a2,%a0 487c8: 6700 009c beqw 48866 <_Heap_Walk+0x274> 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; 487cc: b288 cmpl %a0,%d1 487ce: 6240 bhis 48810 <_Heap_Walk+0x21e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 487d0: 2408 movel %a0,%d2 487d2: 5082 addql #8,%d2 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; 487d4: b7c8 cmpal %a0,%a3 487d6: 6538 bcss 48810 <_Heap_Walk+0x21e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 487d8: 202e fffc movel %fp@(-4),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 487dc: 224c moveal %a4,%a1 487de: 2848 moveal %a0,%a4 487e0: 4c40 2003 remul %d0,%d3,%d2 ); return false; } if ( 487e4: 4a83 tstl %d3 487e6: 6664 bnes 4884c <_Heap_Walk+0x25a> <== 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; 487e8: 74fe moveq #-2,%d2 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; 487ea: 7001 moveq #1,%d0 - 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; 487ec: c4a8 0004 andl %a0@(4),%d2 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; 487f0: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 487f4: 67c4 beqs 487ba <_Heap_Walk+0x1c8> (*printer)( 487f6: 2f08 movel %a0,%sp@- 487f8: 4879 0005 e2f0 pea 5e2f0 <_Status_Object_name_errors_to_status+0x236> 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)( 487fe: 4878 0001 pea 1 48802: 2f05 movel %d5,%sp@- 48804: 4e95 jsr %a5@ 48806: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4880a: 4200 clrb %d0 4880c: 6000 ff02 braw 48710 <_Heap_Walk+0x11e> 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)( 48810: 2f08 movel %a0,%sp@- 48812: 4879 0005 e2a0 pea 5e2a0 <_Status_Object_name_errors_to_status+0x1e6> 48818: 4878 0001 pea 1 4881c: 2f05 movel %d5,%sp@- 4881e: 4e95 jsr %a5@ 48820: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48824: 4200 clrb %d0 48826: 6000 fee8 braw 48710 <_Heap_Walk+0x11e> return false; } if ( free_block->prev != prev_block ) { (*printer)( 4882a: 2f02 movel %d2,%sp@- 4882c: 2f08 movel %a0,%sp@- 4882e: 4879 0005 e30c pea 5e30c <_Status_Object_name_errors_to_status+0x252> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48834: 4878 0001 pea 1 48838: 2f05 movel %d5,%sp@- 4883a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4883c: 4fef 0014 lea %sp@(20),%sp 48840: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48842: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48848: 4e5e unlk %fp 4884a: 4e75 rts } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 4884c: 2f08 movel %a0,%sp@- 4884e: 4879 0005 e2c0 pea 5e2c0 <_Status_Object_name_errors_to_status+0x206> 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)( 48854: 4878 0001 pea 1 48858: 2f05 movel %d5,%sp@- 4885a: 4e95 jsr %a5@ 4885c: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48860: 4200 clrb %d0 48862: 6000 feac braw 48710 <_Heap_Walk+0x11e> 48866: 262e fff8 movel %fp@(-8),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 4886a: 2844 moveal %d4,%a4 4886c: 2d41 fff4 movel %d1,%fp@(-12) 48870: 222e fff4 movel %fp@(-12),%d1 48874: 2d43 fffc movel %d3,%fp@(-4) 48878: 262e fff0 movel %fp@(-16),%d3 4887c: 2d47 ffec movel %d7,%fp@(-20) - 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; 48880: 74fe moveq #-2,%d2 48882: 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); 48884: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 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; 48888: b7c1 cmpal %d1,%a3 4888a: 657e bcss 4890a <_Heap_Walk+0x318> <== NEVER TAKEN 4888c: b7ea 0024 cmpal %a2@(36),%a3 48890: 6278 bhis 4890a <_Heap_Walk+0x318> uintptr_t const block_begin = (uintptr_t) block; 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; bool const is_not_last_block = block != last_block; 48892: b9ee ffec cmpal %fp@(-20),%a4 48896: 56c1 sne %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48898: 202e fffc movel %fp@(-4),%d0 4889c: 2e02 movel %d2,%d7 4889e: 3241 moveaw %d1,%a1 488a0: 4c40 7001 remul %d0,%d1,%d7 488a4: 2009 movel %a1,%d0 488a6: 4480 negl %d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 488a8: 4a81 tstl %d1 488aa: 6704 beqs 488b0 <_Heap_Walk+0x2be> 488ac: 4a00 tstb %d0 488ae: 6676 bnes 48926 <_Heap_Walk+0x334> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 488b0: b486 cmpl %d6,%d2 488b2: 6406 bccs 488ba <_Heap_Walk+0x2c8> 488b4: 4a00 tstb %d0 488b6: 6600 008a bnew 48942 <_Heap_Walk+0x350> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 488ba: b7cc cmpal %a4,%a3 488bc: 6206 bhis 488c4 <_Heap_Walk+0x2d2> 488be: 4a00 tstb %d0 488c0: 6600 00a4 bnew 48966 <_Heap_Walk+0x374> 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; 488c4: 7001 moveq #1,%d0 488c6: 7e01 moveq #1,%d7 488c8: c0ab 0004 andl %a3@(4),%d0 488cc: c687 andl %d7,%d3 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 488ce: 4a80 tstl %d0 488d0: 6700 00ca beqw 4899c <_Heap_Walk+0x3aa> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 488d4: 4a83 tstl %d3 488d6: 6700 00aa beqw 48982 <_Heap_Walk+0x390> (*printer)( 488da: 2f02 movel %d2,%sp@- 488dc: 2f0c movel %a4,%sp@- 488de: 4879 0005 e495 pea 5e495 <_Status_Object_name_errors_to_status+0x3db> 488e4: 42a7 clrl %sp@- 488e6: 2f05 movel %d5,%sp@- 488e8: 4e95 jsr %a5@ 488ea: 4fef 0014 lea %sp@(20),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 488ee: b7c4 cmpal %d4,%a3 488f0: 6700 fd38 beqw 4862a <_Heap_Walk+0x38> 488f4: 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; 488f8: 74fe moveq #-2,%d2 488fa: 284b moveal %a3,%a4 488fc: c483 andl %d3,%d2 488fe: 222a 0020 movel %a2@(32),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 48902: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 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; 48906: b7c1 cmpal %d1,%a3 48908: 6482 bccs 4888c <_Heap_Walk+0x29a> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 4890a: 2f0b movel %a3,%sp@- 4890c: 2f0c movel %a4,%sp@- 4890e: 4879 0005 e33e pea 5e33e <_Status_Object_name_errors_to_status+0x284> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48914: 4878 0001 pea 1 48918: 2f05 movel %d5,%sp@- 4891a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4891c: 4fef 0014 lea %sp@(20),%sp 48920: 4200 clrb %d0 48922: 6000 ff1e braw 48842 <_Heap_Walk+0x250> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 48926: 2f02 movel %d2,%sp@- 48928: 2f0c movel %a4,%sp@- 4892a: 4879 0005 e36b pea 5e36b <_Status_Object_name_errors_to_status+0x2b1> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48930: 4878 0001 pea 1 48934: 2f05 movel %d5,%sp@- 48936: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48938: 4fef 0014 lea %sp@(20),%sp 4893c: 4200 clrb %d0 4893e: 6000 ff02 braw 48842 <_Heap_Walk+0x250> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 48942: 2f06 movel %d6,%sp@- 48944: 2f02 movel %d2,%sp@- 48946: 2f0c movel %a4,%sp@- 48948: 4879 0005 e399 pea 5e399 <_Status_Object_name_errors_to_status+0x2df> 4894e: 4878 0001 pea 1 48952: 2f05 movel %d5,%sp@- 48954: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 48956: 4fef 0018 lea %sp@(24),%sp block = next_block; } while ( block != first_block ); return true; } 4895a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 block, block_size, min_block_size ); return false; 48960: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48962: 4e5e unlk %fp 48964: 4e75 rts return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48966: 2f0b movel %a3,%sp@- 48968: 2f0c movel %a4,%sp@- 4896a: 4879 0005 e3c4 pea 5e3c4 <_Status_Object_name_errors_to_status+0x30a> 48970: 4878 0001 pea 1 48974: 2f05 movel %d5,%sp@- 48976: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48978: 4fef 0014 lea %sp@(20),%sp 4897c: 4200 clrb %d0 4897e: 6000 fec2 braw 48842 <_Heap_Walk+0x250> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 48982: 2f14 movel %a4@,%sp@- 48984: 2f02 movel %d2,%sp@- 48986: 2f0c movel %a4,%sp@- 48988: 4879 0005 e4ac pea 5e4ac <_Status_Object_name_errors_to_status+0x3f2> 4898e: 42a7 clrl %sp@- 48990: 2f05 movel %d5,%sp@- 48992: 4e95 jsr %a5@ 48994: 4fef 0018 lea %sp@(24),%sp 48998: 6000 ff54 braw 488ee <_Heap_Walk+0x2fc> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4899c: 2e2a 0008 movel %a2@(8),%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)( 489a0: 43f9 0005 e0e4 lea 5e0e4 <_Status_Object_name_errors_to_status+0x2a>,%a1 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 489a6: 222c 0008 movel %a4@(8),%d1 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)( 489aa: b2aa 000c cmpl %a2@(12),%d1 489ae: 670a beqs 489ba <_Heap_Walk+0x3c8> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 489b0: 43f9 0005 e030 lea 5e030 ,%a1 489b6: b28a cmpl %a2,%d1 489b8: 676c beqs 48a26 <_Heap_Walk+0x434> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 489ba: 202c 000c movel %a4@(12),%d0 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)( 489be: 41f9 0005 e0fd lea 5e0fd <_Status_Object_name_errors_to_status+0x43>,%a0 489c4: b087 cmpl %d7,%d0 489c6: 670a beqs 489d2 <_Heap_Walk+0x3e0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 489c8: 41f9 0005 e030 lea 5e030 ,%a0 489ce: b08a cmpl %a2,%d0 489d0: 674c beqs 48a1e <_Heap_Walk+0x42c> 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)( 489d2: 2f09 movel %a1,%sp@- 489d4: 2f01 movel %d1,%sp@- 489d6: 2f08 movel %a0,%sp@- 489d8: 2f00 movel %d0,%sp@- 489da: 2f02 movel %d2,%sp@- 489dc: 2f0c movel %a4,%sp@- 489de: 4879 0005 e3f8 pea 5e3f8 <_Status_Object_name_errors_to_status+0x33e> 489e4: 42a7 clrl %sp@- 489e6: 2f05 movel %d5,%sp@- 489e8: 4e95 jsr %a5@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 489ea: 2213 movel %a3@,%d1 489ec: 4fef 0024 lea %sp@(36),%sp 489f0: b282 cmpl %d2,%d1 489f2: 663a bnes 48a2e <_Heap_Walk+0x43c> ); return false; } if ( !prev_used ) { 489f4: 4a83 tstl %d3 489f6: 6776 beqs 48a6e <_Heap_Walk+0x47c> 489f8: 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 ) { 489fc: b1ca cmpal %a2,%a0 489fe: 6754 beqs 48a54 <_Heap_Walk+0x462> <== NEVER TAKEN if ( free_block == block ) { 48a00: b1cc cmpal %a4,%a0 48a02: 6700 feea beqw 488ee <_Heap_Walk+0x2fc> 48a06: 2e2e ffec movel %fp@(-20),%d7 return true; } free_block = free_block->next; 48a0a: 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 ) { 48a0e: b1ca cmpal %a2,%a0 48a10: 6742 beqs 48a54 <_Heap_Walk+0x462> if ( free_block == block ) { 48a12: b1cc cmpal %a4,%a0 48a14: 66f4 bnes 48a0a <_Heap_Walk+0x418> 48a16: 2d47 ffec movel %d7,%fp@(-20) 48a1a: 6000 fed2 braw 488ee <_Heap_Walk+0x2fc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 48a1e: 41f9 0005 e10d lea 5e10d <_Status_Object_name_errors_to_status+0x53>,%a0 48a24: 60ac bras 489d2 <_Heap_Walk+0x3e0> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 48a26: 43f9 0005 e0f3 lea 5e0f3 <_Status_Object_name_errors_to_status+0x39>,%a1 48a2c: 608c bras 489ba <_Heap_Walk+0x3c8> ); if ( block_size != next_block->prev_size ) { (*printer)( 48a2e: 2f0b movel %a3,%sp@- 48a30: 2f01 movel %d1,%sp@- 48a32: 2f02 movel %d2,%sp@- 48a34: 2f0c movel %a4,%sp@- 48a36: 4879 0005 e42d pea 5e42d <_Status_Object_name_errors_to_status+0x373> 48a3c: 4878 0001 pea 1 48a40: 2f05 movel %d5,%sp@- 48a42: 4e95 jsr %a5@ 48a44: 4fef 001c lea %sp@(28),%sp block = next_block; } while ( block != first_block ); return true; } 48a48: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 48a4e: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48a50: 4e5e unlk %fp 48a52: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48a54: 2f0c movel %a4,%sp@- 48a56: 4879 0005 e4d1 pea 5e4d1 <_Status_Object_name_errors_to_status+0x417> 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)( 48a5c: 4878 0001 pea 1 48a60: 2f05 movel %d5,%sp@- 48a62: 4e95 jsr %a5@ 48a64: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48a68: 4200 clrb %d0 48a6a: 6000 fca4 braw 48710 <_Heap_Walk+0x11e> return false; } if ( !prev_used ) { (*printer)( 48a6e: 2f0c movel %a4,%sp@- 48a70: 4879 0005 e466 pea 5e466 <_Status_Object_name_errors_to_status+0x3ac> 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)( 48a76: 4878 0001 pea 1 48a7a: 2f05 movel %d5,%sp@- 48a7c: 4e95 jsr %a5@ 48a7e: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48a82: 4200 clrb %d0 48a84: 6000 fc8a braw 48710 <_Heap_Walk+0x11e> 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 ) { 48a88: 222a 0020 movel %a2@(32),%d1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48a8c: 2844 moveal %d4,%a4 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 ) { 48a8e: 2d41 fff4 movel %d1,%fp@(-12) 48a92: 222e fff4 movel %fp@(-12),%d1 48a96: 2d43 fffc movel %d3,%fp@(-4) 48a9a: 262e fff0 movel %fp@(-16),%d3 48a9e: 2d47 ffec movel %d7,%fp@(-20) 48aa2: 6000 fddc braw 48880 <_Heap_Walk+0x28e> ... =============================================================================== 000472f6 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 472f6: 4e56 0000 linkw %fp,#0 472fa: 2f0a movel %a2,%sp@- 472fc: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 472fe: 4ab9 0005 fb44 tstl 5fb44 <_IO_Number_of_drivers> 47304: 671e beqs 47324 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 47306: 4282 clrl %d2 47308: 45f9 0004 c1ec lea 4c1ec ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 4730e: 42a7 clrl %sp@- 47310: 42a7 clrl %sp@- 47312: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47314: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 47316: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47318: 4fef 000c lea %sp@(12),%sp 4731c: b4b9 0005 fb44 cmpl 5fb44 <_IO_Number_of_drivers>,%d2 47322: 65ea bcss 4730e <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 47324: 242e fff8 movel %fp@(-8),%d2 47328: 246e fffc moveal %fp@(-4),%a2 4732c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004725c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 4725c: 4e56 fff0 linkw %fp,#-16 47260: 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; 47264: 2639 0005 e00e movel 5e00e ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 4726a: 2439 0005 e00a movel 5e00a ,%d2 number_of_drivers = Configuration.maximum_drivers; 47270: 2839 0005 e006 movel 5e006 ,%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 ) 47276: b882 cmpl %d2,%d4 47278: 6366 blss 472e0 <_IO_Manager_initialization+0x84> * 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 *) _Workspace_Allocate_or_fatal_error( 4727a: 2004 movel %d4,%d0 4727c: 2a04 movel %d4,%d5 4727e: e788 lsll #3,%d0 47280: eb8d lsll #5,%d5 47282: 9a80 subl %d0,%d5 47284: 2f05 movel %d5,%sp@- 47286: 4eb9 0004 a1f4 jsr 4a1f4 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 4728c: 2f05 movel %d5,%sp@- 4728e: 42a7 clrl %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 *) 47290: 23c0 0005 fb48 movel %d0,5fb48 <_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( 47296: 2f00 movel %d0,%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; 47298: 23c4 0005 fb44 movel %d4,5fb44 <_IO_Number_of_drivers> memset( 4729e: 4eb9 0004 e914 jsr 4e914 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 472a4: 4fef 0010 lea %sp@(16),%sp 472a8: 4a82 tstl %d2 472aa: 672a beqs 472d6 <_IO_Manager_initialization+0x7a><== NEVER TAKEN 472ac: 2839 0005 fb48 movel 5fb48 <_IO_Driver_address_table>,%d4 472b2: 4280 clrl %d0 472b4: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 472b6: 2243 moveal %d3,%a1 472b8: 2044 moveal %d4,%a0 472ba: d3c0 addal %d0,%a1 472bc: 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++ ) 472be: 5281 addql #1,%d1 472c0: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 472c6: 20d9 movel %a1@+,%a0@+ 472c8: 20d9 movel %a1@+,%a0@+ 472ca: 20d9 movel %a1@+,%a0@+ 472cc: 20d9 movel %a1@+,%a0@+ 472ce: 20d9 movel %a1@+,%a0@+ 472d0: 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++ ) 472d2: b481 cmpl %d1,%d2 472d4: 66e0 bnes 472b6 <_IO_Manager_initialization+0x5a> _IO_Driver_address_table[index] = driver_table[index]; } 472d6: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 472dc: 4e5e unlk %fp 472de: 4e75 rts * 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; 472e0: 23c3 0005 fb48 movel %d3,5fb48 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 472e6: 23c2 0005 fb44 movel %d2,5fb44 <_IO_Number_of_drivers> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 472ec: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 472f2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047e70 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47e70: 4e56 fffc linkw %fp,#-4 47e74: 206e 0010 moveal %fp@(16),%a0 47e78: 2f02 movel %d2,%sp@- 47e7a: 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 ); 47e7e: 4282 clrl %d2 47e80: 1401 moveb %d1,%d2 47e82: 2242 moveal %d2,%a1 47e84: 2f08 movel %a0,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47e86: 202e 0008 movel %fp@(8),%d0 _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 ); 47e8a: 2f09 movel %a1,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 47e8c: 13c1 0005 f9d2 moveb %d1,5f9d2 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47e92: 2d48 fffc movel %a0,%fp@(-4) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 47e96: 23c0 0005 f9ce movel %d0,5f9ce <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 47e9c: 23c8 0005 f9d4 movel %a0,5f9d4 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 47ea2: 2f00 movel %d0,%sp@- 47ea4: 4eb9 0004 9d7e jsr 49d7e <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47eaa: 206e fffc moveal %fp@(-4),%a0 47eae: 327c 0700 moveaw #1792,%a1 47eb2: 2409 movel %a1,%d2 47eb4: 40c0 movew %sr,%d0 47eb6: 8082 orl %d2,%d0 47eb8: 46c0 movew %d0,%sr 47eba: 2008 movel %a0,%d0 <== NOT EXECUTED 47ebc: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47ec2: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47ec4: 7005 moveq #5,%d0 47ec6: 4fef 000c lea %sp@(12),%sp 47eca: 23c0 0005 fa78 movel %d0,5fa78 <_System_state_Current> 47ed0: 60fe bras 47ed0 <_Internal_error_Occurred+0x60> ... =============================================================================== 00047f34 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47f34: 4e56 fff0 linkw %fp,#-16 47f38: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47f3c: 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 ) 47f40: 4aaa 0014 tstl %a2@(20) 47f44: 6756 beqs 47f9c <_Objects_Allocate+0x68> <== NEVER TAKEN /* * 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 ); 47f46: 240a movel %a2,%d2 47f48: 0682 0000 001c addil #28,%d2 47f4e: 47f9 0004 757c lea 4757c <_Chain_Get>,%a3 47f54: 2f02 movel %d2,%sp@- 47f56: 4e93 jsr %a3@ if ( information->auto_extend ) { 47f58: 588f addql #4,%sp 47f5a: 4a2a 0010 tstb %a2@(16) 47f5e: 6732 beqs 47f92 <_Objects_Allocate+0x5e> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 47f60: 4a80 tstl %d0 47f62: 6744 beqs 47fa8 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47f64: 2040 moveal %d0,%a0 47f66: 4281 clrl %d1 47f68: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47f6a: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47f6c: 3228 000a movew %a0@(10),%d1 47f70: 362a 0008 movew %a2@(8),%d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47f74: 342a 0012 movew %a2@(18),%d2 information->inactive_per_block[ block ]--; 47f78: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47f7c: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47f7e: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; information->inactive--; 47f82: 326a 0028 moveaw %a2@(40),%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47f86: e589 lsll #2,%d1 information->inactive--; 47f88: 5389 subql #1,%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47f8a: d1c1 addal %d1,%a0 47f8c: 5390 subql #1,%a0@ information->inactive--; 47f8e: 3549 0028 movew %a1,%a2@(40) ); } #endif return the_object; } 47f92: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47f98: 4e5e unlk %fp 47f9a: 4e75 rts * 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 ) return NULL; 47f9c: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 47f9e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 47fa4: 4e5e unlk %fp <== NOT EXECUTED 47fa6: 4e75 rts <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 47fa8: 2f0a movel %a2,%sp@- 47faa: 4eb9 0004 7fec jsr 47fec <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47fb0: 2f02 movel %d2,%sp@- 47fb2: 4e93 jsr %a3@ } if ( the_object ) { 47fb4: 508f addql #8,%sp 47fb6: 4a80 tstl %d0 47fb8: 66aa bnes 47f64 <_Objects_Allocate+0x30> ); } #endif return the_object; } 47fba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47fc0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047fc4 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47fc4: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47fc6: 4e56 0000 linkw %fp,#0 47fca: 206e 0008 moveal %fp@(8),%a0 47fce: 226e 000c moveal %fp@(12),%a1 47fd2: 2f0a movel %a2,%sp@- 47fd4: 2468 0018 moveal %a0@(24),%a2 47fd8: 3029 000a movew %a1@(10),%d0 47fdc: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 47fe0: 245f moveal %sp@+,%a2 47fe2: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47fe4: 4ef9 0004 854c jmp 4854c <_Objects_Namespace_remove> ... =============================================================================== 00047fec <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 47fec: 4e56 ffcc linkw %fp,#-52 47ff0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47ff4: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47ff8: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47ffa: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47ffe: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48002: 4a88 tstl %a0 48004: 6700 0232 beqw 48238 <_Objects_Extend_information+0x24c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 48008: 322a 000e movew %a2@(14),%d1 4800c: 302a 0012 movew %a2@(18),%d0 48010: 3801 movew %d1,%d4 48012: 0284 0000 ffff andil #65535,%d4 48018: 88c0 divuw %d0,%d4 4801a: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 48020: 6700 022c beqw 4824e <_Objects_Extend_information+0x262> if ( information->object_blocks[ block ] == NULL ) { 48024: 4a90 tstl %a0@ 48026: 6700 0236 beqw 4825e <_Objects_Extend_information+0x272> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 4802a: 5888 addql #4,%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 4802c: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 4802e: 4282 clrl %d2 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 48030: 0280 0000 ffff andil #65535,%d0 do_extend = false; break; } else index_base += information->allocation_size; 48036: 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++ ) { 48038: 5282 addql #1,%d2 4803a: b484 cmpl %d4,%d2 4803c: 6400 01a6 bccw 481e4 <_Objects_Extend_information+0x1f8> if ( information->object_blocks[ block ] == NULL ) { 48040: 4a98 tstl %a0@+ 48042: 66f2 bnes 48036 <_Objects_Extend_information+0x4a> do_extend = false; 48044: 4207 clrb %d7 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 48046: 0281 0000 ffff andil #65535,%d1 4804c: 2641 moveal %d1,%a3 4804e: 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 ) { 48050: b7fc 0000 ffff cmpal #65535,%a3 48056: 6200 0182 bhiw 481da <_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; 4805a: 41ea 0014 lea %a2@(20),%a0 4805e: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 48062: 4a2a 0010 tstb %a2@(16) 48066: 6700 0182 beqw 481ea <_Objects_Extend_information+0x1fe> new_object_block = _Workspace_Allocate( block_size ); 4806a: 2f00 movel %d0,%sp@- 4806c: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !new_object_block ) 48072: 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 ); 48074: 2c00 movel %d0,%d6 if ( !new_object_block ) 48076: 6700 0162 beqw 481da <_Objects_Extend_information+0x1ee> } /* * Do we need to grow the tables? */ if ( do_extend ) { 4807a: 4a07 tstb %d7 4807c: 6700 00be beqw 4813c <_Objects_Extend_information+0x150> */ /* * Up the block count and maximum */ block_count++; 48080: 2a44 moveal %d4,%a5 48082: 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 *)); 48084: 200b movel %a3,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 48086: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 4808a: d088 addl %a0,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 4808c: d085 addl %d5,%d0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 4808e: e588 lsll #2,%d0 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 48090: 2f00 movel %d0,%sp@- 48092: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !object_blocks ) { 48098: 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 ); 4809a: 2840 moveal %d0,%a4 if ( !object_blocks ) { 4809c: 4a80 tstl %d0 4809e: 6700 01ce beqw 4826e <_Objects_Extend_information+0x282> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 480a2: 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 ) { 480a4: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 480a6: 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 ) { 480a8: 302a 000e movew %a2@(14),%d0 480ac: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 480b0: de8d addl %a5,%d7 480b2: b085 cmpl %d5,%d0 480b4: 6200 0144 bhiw 481fa <_Objects_Extend_information+0x20e> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 480b8: 4a85 tstl %d5 480ba: 670c beqs 480c8 <_Objects_Extend_information+0xdc><== NEVER TAKEN 480bc: 2047 moveal %d7,%a0 480be: 4280 clrl %d0 local_table[ index ] = NULL; 480c0: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 480c2: 5280 addql #1,%d0 480c4: b085 cmpl %d5,%d0 480c6: 65f8 bcss 480c0 <_Objects_Extend_information+0xd4><== NEVER TAKEN 480c8: 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 ); 480ca: 4281 clrl %d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 480cc: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 480d0: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 480d4: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 480d8: d283 addl %d3,%d1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 480da: b283 cmpl %d3,%d1 480dc: 6310 blss 480ee <_Objects_Extend_information+0x102><== NEVER TAKEN 480de: 2247 moveal %d7,%a1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 480e0: 2003 movel %d3,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 480e2: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 480e6: 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++ ) { 480e8: 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 ; 480ea: b081 cmpl %d1,%d0 480ec: 65f8 bcss 480e6 <_Objects_Extend_information+0xfa> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 480ee: 203c 0000 0700 movel #1792,%d0 480f4: 40c4 movew %sr,%d4 480f6: 8084 orl %d4,%d0 480f8: 46c0 movew %d0,%sr uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 480fa: 2012 movel %a2@,%d0 480fc: 7a18 moveq #24,%d5 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( 480fe: 4281 clrl %d1 48100: eba8 lsll %d5,%d0 48102: 322a 0004 movew %a2@(4),%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48106: 1a3c 001b moveb #27,%d5 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 4810a: 08c0 0010 bset #16,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 4810e: eba9 lsll %d5,%d1 48110: 4285 clrl %d5 48112: 8081 orl %d1,%d0 48114: 3a0b movew %a3,%d5 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 48116: 206a 002e moveal %a2@(46),%a0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 4811a: 8085 orl %d5,%d0 information->object_blocks = object_blocks; 4811c: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 48120: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 48124: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; 48128: 2547 0018 movel %d7,%a2@(24) 4812c: 2540 000a movel %d0,%a2@(10) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 48130: 46c4 movew %d4,%sr _Workspace_Free( old_tables ); 48132: 2f08 movel %a0,%sp@- 48134: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> 4813a: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4813c: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48140: 4280 clrl %d0 48142: 280e movel %fp,%d4 48144: 0684 ffff fff4 addil #-12,%d4 4814a: 47f9 0004 757c lea 4757c <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 48150: 2a0a movel %a2,%d5 48152: 0685 0000 001c addil #28,%d5 48158: 49f9 0004 751c lea 4751c <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4815e: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48160: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48164: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48168: 2f2a 0014 movel %a2@(20),%sp@- 4816c: 206a 002e moveal %a2@(46),%a0 48170: 2f00 movel %d0,%sp@- 48172: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 48176: 2f04 movel %d4,%sp@- 48178: 4eb9 0004 c234 jsr 4c234 <_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 ) { 4817e: 4fef 0010 lea %sp@(16),%sp 48182: 2f04 movel %d4,%sp@- 48184: 4e93 jsr %a3@ 48186: 588f addql #4,%sp 48188: 4a80 tstl %d0 4818a: 6734 beqs 481c0 <_Objects_Extend_information+0x1d4><== NEVER TAKEN 4818c: 2212 movel %a2@,%d1 4818e: 7e18 moveq #24,%d7 the_object->id = _Objects_Build_id( 48190: 4286 clrl %d6 48192: 2040 moveal %d0,%a0 48194: 3c2a 0004 movew %a2@(4),%d6 48198: efa9 lsll %d7,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 4819a: 1e3c 001b moveb #27,%d7 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 4819e: 08c1 0010 bset #16,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 481a2: efae lsll %d7,%d6 481a4: 8286 orl %d6,%d1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 481a6: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 481a8: 5283 addql #1,%d3 481aa: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 481ae: 2f00 movel %d0,%sp@- 481b0: 2f05 movel %d5,%sp@- 481b2: 4e94 jsr %a4@ index++; 481b4: 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 ) { 481b6: 2f04 movel %d4,%sp@- 481b8: 4e93 jsr %a3@ 481ba: 588f addql #4,%sp 481bc: 4a80 tstl %d0 481be: 66cc bnes 4818c <_Objects_Extend_information+0x1a0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 481c0: 4281 clrl %d1 481c2: 302a 0012 movew %a2@(18),%d0 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 481c6: 326a 0028 moveaw %a2@(40),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 481ca: 206a 002a moveal %a2@(42),%a0 481ce: 3200 movew %d0,%d1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 481d0: d089 addl %a1,%d0 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 481d2: 2181 2800 movel %d1,%a0@(00000000,%d2:l) information->inactive = 481d6: 3540 0028 movew %d0,%a2@(40) (Objects_Maximum)(information->inactive + information->allocation_size); } 481da: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 481e0: 4e5e unlk %fp 481e2: 4e75 rts /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 481e4: 7e01 moveq #1,%d7 481e6: 6000 fe5e braw 48046 <_Objects_Extend_information+0x5a> 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 ); 481ea: 2f00 movel %d0,%sp@- 481ec: 4eb9 0004 a1f4 jsr 4a1f4 <_Workspace_Allocate_or_fatal_error> 481f2: 588f addql #4,%sp 481f4: 2c00 movel %d0,%d6 481f6: 6000 fe82 braw 4807a <_Objects_Extend_information+0x8e> /* * 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, 481fa: e58c lsll #2,%d4 481fc: 2f04 movel %d4,%sp@- 481fe: 2f2a 002e movel %a2@(46),%sp@- 48202: 2f0c movel %a4,%sp@- 48204: 4eb9 0004 e8a4 jsr 4e8a4 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 4820a: 2f04 movel %d4,%sp@- 4820c: 2f2a 002a movel %a2@(42),%sp@- 48210: 2f0d movel %a5,%sp@- 48212: 4eb9 0004 e8a4 jsr 4e8a4 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 48218: 4280 clrl %d0 4821a: 302a 000e movew %a2@(14),%d0 4821e: da80 addl %d0,%d5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 48220: e58d lsll #2,%d5 48222: 2f05 movel %d5,%sp@- 48224: 2f2a 0018 movel %a2@(24),%sp@- 48228: 2f07 movel %d7,%sp@- 4822a: 4eb9 0004 e8a4 jsr 4e8a4 48230: 4fef 0024 lea %sp@(36),%sp 48234: 6000 fe94 braw 480ca <_Objects_Extend_information+0xde> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48238: 4280 clrl %d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 4823a: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 4823c: 4282 clrl %d2 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 4823e: 4284 clrl %d4 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48240: 322a 000e movew %a2@(14),%d1 48244: 302a 0012 movew %a2@(18),%d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 48248: 7e01 moveq #1,%d7 4824a: 6000 fdfa braw 48046 <_Objects_Extend_information+0x5a> minimum_index = _Objects_Get_index( information->minimum_id ); 4824e: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48250: 4282 clrl %d2 <== NOT EXECUTED if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 48252: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 48258: 7e01 moveq #1,%d7 <== NOT EXECUTED 4825a: 6000 fdea braw 48046 <_Objects_Extend_information+0x5a><== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); 4825e: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48260: 4282 clrl %d2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 48262: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED do_extend = false; 48268: 4207 clrb %d7 <== NOT EXECUTED 4826a: 6000 fdda braw 48046 <_Objects_Extend_information+0x5a><== 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 ); 4826e: 2f06 movel %d6,%sp@- 48270: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> return; 48276: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 48278: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4827e: 4e5e unlk %fp ... =============================================================================== 00048334 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 48334: 4e56 0000 linkw %fp,#0 48338: 2f03 movel %d3,%sp@- 4833a: 262e 0008 movel %fp@(8),%d3 4833e: 2f02 movel %d2,%sp@- 48340: 342e 000e movew %fp@(14),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 48344: 6744 beqs 4838a <_Objects_Get_information+0x56> /* * 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 ); 48346: 2f03 movel %d3,%sp@- 48348: 4eb9 0004 c714 jsr 4c714 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4834e: 588f addql #4,%sp 48350: 4a80 tstl %d0 48352: 6736 beqs 4838a <_Objects_Get_information+0x56> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 48354: 0282 0000 ffff andil #65535,%d2 4835a: b480 cmpl %d0,%d2 4835c: 622c bhis 4838a <_Objects_Get_information+0x56> return NULL; if ( !_Objects_Information_table[ the_api ] ) 4835e: 41f9 0005 f8f4 lea 5f8f4 <_Objects_Information_table>,%a0 48364: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 48368: 4a88 tstl %a0 4836a: 671e beqs 4838a <_Objects_Get_information+0x56> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 4836c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 48370: 670c beqs 4837e <_Objects_Get_information+0x4a> <== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 48372: 2040 moveal %d0,%a0 48374: 4a68 000e tstw %a0@(14) 48378: 56c1 sne %d1 4837a: 49c1 extbl %d1 4837c: c081 andl %d1,%d0 #endif return info; } 4837e: 242e fff8 movel %fp@(-8),%d2 48382: 262e fffc movel %fp@(-4),%d3 48386: 4e5e unlk %fp 48388: 4e75 rts 4838a: 242e fff8 movel %fp@(-8),%d2 if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 4838e: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 48390: 262e fffc movel %fp@(-4),%d3 48394: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b70 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 49b70: 4e56 ffe0 linkw %fp,#-32 49b74: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49b78: 282e 0008 movel %fp@(8),%d4 49b7c: 262e 000c movel %fp@(12),%d3 49b80: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 49b84: 4a83 tstl %d3 49b86: 6700 00be beqw 49c46 <_Objects_Get_name_as_string+0xd6> return NULL; if ( name == NULL ) 49b8a: 4a82 tstl %d2 49b8c: 6700 009e beqw 49c2c <_Objects_Get_name_as_string+0xbc> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49b90: 4a84 tstl %d4 49b92: 6700 00a4 beqw 49c38 <_Objects_Get_name_as_string+0xc8> information = _Objects_Get_information_id( tmpId ); 49b96: 2f04 movel %d4,%sp@- 49b98: 4eb9 0004 9a80 jsr 49a80 <_Objects_Get_information_id> if ( !information ) 49b9e: 588f addql #4,%sp 49ba0: 4a80 tstl %d0 49ba2: 6700 00a2 beqw 49c46 <_Objects_Get_name_as_string+0xd6> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 49ba6: 486e fffc pea %fp@(-4) 49baa: 2f04 movel %d4,%sp@- 49bac: 2f00 movel %d0,%sp@- 49bae: 4eb9 0004 9c60 jsr 49c60 <_Objects_Get> switch ( location ) { 49bb4: 4fef 000c lea %sp@(12),%sp 49bb8: 4aae fffc tstl %fp@(-4) 49bbc: 6600 0088 bnew 49c46 <_Objects_Get_name_as_string+0xd6> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49bc0: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49bc2: 7818 moveq #24,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49bc4: 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; 49bc6: 2228 000c movel %a0@(12),%d1 lname[ 0 ] = (u32_name >> 24) & 0xff; 49bca: 2001 movel %d1,%d0 49bcc: e8a8 lsrl %d4,%d0 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 49bce: 2801 movel %d1,%d4 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49bd0: 2a01 movel %d1,%d5 lname[ 2 ] = (u32_name >> 8) & 0xff; 49bd2: e08c lsrl #8,%d4 lname[ 3 ] = (u32_name >> 0) & 0xff; 49bd4: 1d41 fffa moveb %d1,%fp@(-6) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49bd8: 4245 clrw %d5 49bda: 4845 swap %d5 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49bdc: 4201 clrb %d1 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 49bde: 1d40 fff7 moveb %d0,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 49be2: 1d45 fff8 moveb %d5,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 49be6: 1d44 fff9 moveb %d4,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49bea: 1d41 fffb moveb %d1,%fp@(-5) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49bee: 4a83 tstl %d3 49bf0: 6762 beqs 49c54 <_Objects_Get_name_as_string+0xe4><== NEVER TAKEN 49bf2: 4a00 tstb %d0 49bf4: 675e beqs 49c54 <_Objects_Get_name_as_string+0xe4> * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 49bf6: d682 addl %d2,%d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49bf8: 45ee fff8 lea %fp@(-8),%a2 49bfc: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49bfe: 4281 clrl %d1 49c00: 1200 moveb %d0,%d1 49c02: 2279 0006 06d0 moveal 606d0 <__ctype_ptr__>,%a1 49c08: 1231 1801 moveb %a1@(00000001,%d1:l),%d1 49c0c: 49c1 extbl %d1 49c0e: 0281 0000 0097 andil #151,%d1 49c14: 6602 bnes 49c18 <_Objects_Get_name_as_string+0xa8> 49c16: 702a moveq #42,%d0 49c18: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49c1a: 2248 moveal %a0,%a1 49c1c: b688 cmpl %a0,%d3 49c1e: 6704 beqs 49c24 <_Objects_Get_name_as_string+0xb4> 49c20: 101a moveb %a2@+,%d0 49c22: 66da bnes 49bfe <_Objects_Get_name_as_string+0x8e> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49c24: 4211 clrb %a1@ _Thread_Enable_dispatch(); 49c26: 4eb9 0004 a91c jsr 4a91c <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 49c2c: 2002 movel %d2,%d0 49c2e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49c34: 4e5e unlk %fp 49c36: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49c38: 2079 0006 22d4 moveal 622d4 <_Per_CPU_Information+0xc>,%a0 49c3e: 2828 0008 movel %a0@(8),%d4 49c42: 6000 ff52 braw 49b96 <_Objects_Get_name_as_string+0x26> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 49c46: 4282 clrl %d2 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 49c48: 2002 movel %d2,%d0 49c4a: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49c50: 4e5e unlk %fp 49c52: 4e75 rts s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49c54: 2242 moveal %d2,%a1 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49c56: 4211 clrb %a1@ _Thread_Enable_dispatch(); 49c58: 4eb9 0004 a91c jsr 4a91c <_Thread_Enable_dispatch> 49c5e: 60cc bras 49c2c <_Objects_Get_name_as_string+0xbc> =============================================================================== 00059dd4 <_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; 59dd4: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 59dd6: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 59dd8: 4e56 0000 linkw %fp,#0 59ddc: 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; 59de0: 90a8 0006 subl %a0@(6),%d0 59de4: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 59de8: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 59dec: 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 ) { 59df0: b280 cmpl %d0,%d1 59df2: 6510 bcss 59e04 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 59df4: 2068 0018 moveal %a0@(24),%a0 59df8: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 59dfc: 6706 beqs 59e04 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 59dfe: 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; } 59e00: 4e5e unlk %fp 59e02: 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; 59e04: 7001 moveq #1,%d0 return NULL; } 59e06: 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; 59e08: 2280 movel %d0,%a1@ return NULL; 59e0a: 4280 clrl %d0 } ... =============================================================================== 00048dac <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 48dac: 4e56 fffc linkw %fp,#-4 48db0: 202e 0008 movel %fp@(8),%d0 48db4: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48db6: 4a80 tstl %d0 48db8: 6676 bnes 48e30 <_Objects_Id_to_name+0x84> 48dba: 2079 0006 0cd4 moveal 60cd4 <_Per_CPU_Information+0xc>,%a0 48dc0: 2228 0008 movel %a0@(8),%d1 48dc4: 7418 moveq #24,%d2 48dc6: 2001 movel %d1,%d0 48dc8: e4a8 lsrl %d2,%d0 48dca: 143c 0007 moveb #7,%d2 48dce: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 48dd0: 143c 0002 moveb #2,%d2 48dd4: 2040 moveal %d0,%a0 48dd6: 5388 subql #1,%a0 48dd8: b488 cmpl %a0,%d2 48dda: 654a bcss 48e26 <_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 ] ) 48ddc: 41f9 0006 0afc lea 60afc <_Objects_Information_table>,%a0 48de2: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 48de6: 4a88 tstl %a0 48de8: 673c beqs 48e26 <_Objects_Id_to_name+0x7a> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 48dea: 2001 movel %d1,%d0 48dec: 741b moveq #27,%d2 48dee: e4a8 lsrl %d2,%d0 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 48df0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 48df4: 6730 beqs 48e26 <_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 ); 48df6: 486e fffc pea %fp@(-4) 48dfa: 2f01 movel %d1,%sp@- 48dfc: 2f00 movel %d0,%sp@- 48dfe: 4eb9 0004 8d38 jsr 48d38 <_Objects_Get> if ( !the_object ) 48e04: 4fef 000c lea %sp@(12),%sp 48e08: 4a80 tstl %d0 48e0a: 671a beqs 48e26 <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; *name = the_object->name; 48e0c: 206e 000c moveal %fp@(12),%a0 48e10: 2240 moveal %d0,%a1 48e12: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 48e16: 4eb9 0004 9a7c jsr 49a7c <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48e1c: 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; 48e20: 4280 clrl %d0 } 48e22: 4e5e unlk %fp 48e24: 4e75 rts 48e26: 242e fff8 movel %fp@(-8),%d2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 48e2a: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48e2c: 4e5e unlk %fp 48e2e: 4e75 rts /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48e30: 2200 movel %d0,%d1 48e32: 6090 bras 48dc4 <_Objects_Id_to_name+0x18> =============================================================================== 000485dc <_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) / 485dc: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 485de: 4e56 ffec linkw %fp,#-20 485e2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 485e6: 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 ); 485ea: 4282 clrl %d2 block_count = (information->maximum - index_base) / 485ec: 4283 clrl %d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 485ee: 342a 0008 movew %a2@(8),%d2 block_count = (information->maximum - index_base) / 485f2: 362a 000e movew %a2@(14),%d3 485f6: 322a 0012 movew %a2@(18),%d1 485fa: 9682 subl %d2,%d3 485fc: 4c41 3003 remul %d1,%d3,%d3 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 48600: 6774 beqs 48676 <_Objects_Shrink_information+0x9a><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 48602: 206a 002a moveal %a2@(42),%a0 48606: b290 cmpl %a0@,%d1 48608: 677e beqs 48688 <_Objects_Shrink_information+0xac><== NEVER TAKEN * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 4860a: 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++ ) { 4860c: 4280 clrl %d0 4860e: 5280 addql #1,%d0 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 48610: d481 addl %d1,%d2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 48612: b680 cmpl %d0,%d3 48614: 6760 beqs 48676 <_Objects_Shrink_information+0x9a> if ( information->inactive_per_block[ block ] == 48616: 2800 movel %d0,%d4 48618: e58c lsll #2,%d4 4861a: b298 cmpl %a0@+,%d1 4861c: 66f0 bnes 4860e <_Objects_Shrink_information+0x32> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4861e: 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 ); 48622: 47f9 0004 7554 lea 47554 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 48628: 4280 clrl %d0 4862a: 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; 4862e: 2610 movel %a0@,%d3 if ((index >= index_base) && 48630: b480 cmpl %d0,%d2 48632: 620c bhis 48640 <_Objects_Shrink_information+0x64> (index < (index_base + information->allocation_size))) { 48634: 4281 clrl %d1 48636: 322a 0012 movew %a2@(18),%d1 4863a: d282 addl %d2,%d1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 4863c: b280 cmpl %d0,%d1 4863e: 6240 bhis 48680 <_Objects_Shrink_information+0xa4> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 48640: 4a83 tstl %d3 48642: 6704 beqs 48648 <_Objects_Shrink_information+0x6c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 48644: 2043 moveal %d3,%a0 48646: 60e0 bras 48628 <_Objects_Shrink_information+0x4c> while ( the_object ); /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 48648: 206a 002e moveal %a2@(46),%a0 4864c: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@- 48650: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> information->object_blocks[ block ] = NULL; 48656: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4865a: 588f addql #4,%sp /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 4865c: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive_per_block[ block ] = 0; 48660: 206a 002a moveal %a2@(42),%a0 information->inactive -= information->allocation_size; 48664: 302a 0028 movew %a2@(40),%d0 48668: 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; 4866c: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive -= information->allocation_size; 48670: 9081 subl %d1,%d0 48672: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 48676: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4867c: 4e5e unlk %fp 4867e: 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 ); 48680: 2f08 movel %a0,%sp@- 48682: 4e93 jsr %a3@ 48684: 588f addql #4,%sp 48686: 60b8 bras 48640 <_Objects_Shrink_information+0x64> 48688: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 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 ] == 4868c: 4284 clrl %d4 <== NOT EXECUTED */ 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 ); 4868e: 47f9 0004 7554 lea 47554 <_Chain_Extract>,%a3 <== NOT EXECUTED 48694: 6092 bras 48628 <_Objects_Shrink_information+0x4c><== NOT EXECUTED ... =============================================================================== 0004d4fc <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4d4fc: 4e56 fff0 linkw %fp,#-16 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) 4d500: 2039 0006 5b44 movel 65b44 <_Thread_Dispatch_disable_level>,%d0 4d506: 48d7 001c moveml %d2-%d4,%sp@ 4d50a: 242e 0008 movel %fp@(8),%d2 4d50e: 282e 000c movel %fp@(12),%d4 4d512: 162e 0013 moveb %fp@(19),%d3 4d516: 4a80 tstl %d0 4d518: 6640 bnes 4d55a <_Protected_heap_Walk+0x5e> * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4d51a: 2f39 0006 5be4 movel 65be4 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4d520: 0283 0000 00ff andil #255,%d3 * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4d526: 4eb9 0004 b778 jsr 4b778 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4d52c: 2f03 movel %d3,%sp@- 4d52e: 2f04 movel %d4,%sp@- 4d530: 2f02 movel %d2,%sp@- 4d532: 4eb9 0004 c646 jsr 4c646 <_Heap_Walk> _RTEMS_Unlock_allocator(); 4d538: 2f39 0006 5be4 movel 65be4 <_RTEMS_Allocator_Mutex>,%sp@- 4d53e: 2d40 fffc movel %d0,%fp@(-4) 4d542: 4eb9 0004 b7d8 jsr 4b7d8 <_API_Mutex_Unlock> } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4d548: 202e fffc movel %fp@(-4),%d0 * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); 4d54c: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4d550: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d556: 4e5e unlk %fp 4d558: 4e75 rts if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4d55a: 2d44 000c movel %d4,%fp@(12) 4d55e: 0283 0000 00ff andil #255,%d3 4d564: 2d42 0008 movel %d2,%fp@(8) 4d568: 2d43 0010 movel %d3,%fp@(16) } return status; } 4d56c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d572: 4e5e unlk %fp if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4d574: 4ef9 0004 c646 jmp 4c646 <_Heap_Walk> ... =============================================================================== 0004d350 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4d350: 4e56 ffec linkw %fp,#-20 4d354: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d358: 2a6e 0008 moveal %fp@(8),%a5 4d35c: 266e 000c moveal %fp@(12),%a3 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 4d360: 4a8b tstl %a3 4d362: 6700 00b0 beqw 4d414 <_RBTree_Extract_unprotected+0xc4> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 4d366: b7ed 0008 cmpal %a5@(8),%a3 4d36a: 6700 00f6 beqw 4d462 <_RBTree_Extract_unprotected+0x112> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4d36e: b7ed 000c cmpal %a5@(12),%a3 4d372: 6700 00aa beqw 4d41e <_RBTree_Extract_unprotected+0xce> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4d376: 246b 0004 moveal %a3@(4),%a2 4d37a: 4a8a tstl %a2 4d37c: 6700 00b6 beqw 4d434 <_RBTree_Extract_unprotected+0xe4> 4d380: 4aab 0008 tstl %a3@(8) 4d384: 6700 00f0 beqw 4d476 <_RBTree_Extract_unprotected+0x126> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 4d388: 202a 0008 movel %a2@(8),%d0 4d38c: 6708 beqs 4d396 <_RBTree_Extract_unprotected+0x46> 4d38e: 2440 moveal %d0,%a2 4d390: 202a 0008 movel %a2@(8),%d0 4d394: 66f8 bnes 4d38e <_RBTree_Extract_unprotected+0x3e> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 4d396: 286a 0004 moveal %a2@(4),%a4 if(leaf) { 4d39a: 4a8c tstl %a4 4d39c: 6700 00f4 beqw 4d492 <_RBTree_Extract_unprotected+0x142> leaf->parent = target->parent; 4d3a0: 2892 movel %a2@,%a4@ } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 4d3a2: 2252 moveal %a2@,%a1 4d3a4: b5e9 0004 cmpal %a1@(4),%a2 4d3a8: 56c0 sne %d0 target->parent->child[dir] = leaf; 4d3aa: 7201 moveq #1,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = target; 4d3ac: 7401 moveq #1,%d2 } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 4d3ae: 49c0 extbl %d0 target->parent->child[dir] = leaf; 4d3b0: 9280 subl %d0,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4d3b2: 2053 moveal %a3@,%a0 /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; 4d3b4: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4d3b8: b7e8 0004 cmpal %a0@(4),%a3 4d3bc: 56c1 sne %d1 leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; 4d3be: 202a 000c movel %a2@(12),%d0 dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4d3c2: 49c1 extbl %d1 the_node->parent->child[dir] = target; 4d3c4: 9481 subl %d1,%d2 4d3c6: 218a 2c00 movel %a2,%a0@(00000000,%d2:l:4) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 4d3ca: 256b 0008 0008 movel %a3@(8),%a2@(8) if (the_node->child[RBT_RIGHT]) 4d3d0: 206b 0008 moveal %a3@(8),%a0 4d3d4: 4a88 tstl %a0 4d3d6: 6702 beqs 4d3da <_RBTree_Extract_unprotected+0x8a><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 4d3d8: 208a movel %a2,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 4d3da: 256b 0004 0004 movel %a3@(4),%a2@(4) if (the_node->child[RBT_LEFT]) 4d3e0: 206b 0004 moveal %a3@(4),%a0 4d3e4: 4a88 tstl %a0 4d3e6: 6702 beqs 4d3ea <_RBTree_Extract_unprotected+0x9a> the_node->child[RBT_LEFT]->parent = target; 4d3e8: 208a movel %a2,%a0@ /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 4d3ea: 2493 movel %a3@,%a2@ target->color = the_node->color; 4d3ec: 256b 000c 000c movel %a3@(12),%a2@(12) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4d3f2: 4a80 tstl %d0 4d3f4: 6608 bnes 4d3fe <_RBTree_Extract_unprotected+0xae> if (leaf) { 4d3f6: 4a8c tstl %a4 4d3f8: 6704 beqs 4d3fe <_RBTree_Extract_unprotected+0xae> leaf->color = RBT_BLACK; /* case 2 */ 4d3fa: 42ac 000c clrl %a4@(12) /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 4d3fe: 206d 0004 moveal %a5@(4),%a0 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 4d402: 42ab 0008 clrl %a3@(8) 4d406: 42ab 0004 clrl %a3@(4) 4d40a: 4293 clrl %a3@ 4d40c: 4a88 tstl %a0 4d40e: 6704 beqs 4d414 <_RBTree_Extract_unprotected+0xc4> 4d410: 42a8 000c clrl %a0@(12) } 4d414: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d41a: 4e5e unlk %fp 4d41c: 4e75 rts the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) 4d41e: 202b 0004 movel %a3@(4),%d0 4d422: 6700 0098 beqw 4d4bc <_RBTree_Extract_unprotected+0x16c> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4d426: 246b 0004 moveal %a3@(4),%a2 } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 4d42a: 2b40 000c movel %d0,%a5@(12) * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4d42e: 4a8a tstl %a2 4d430: 6600 ff4e bnew 4d380 <_RBTree_Extract_unprotected+0x30> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; 4d434: 286b 0008 moveal %a3@(8),%a4 if( leaf ) { 4d438: 4a8c tstl %a4 4d43a: 663c bnes 4d478 <_RBTree_Extract_unprotected+0x128> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4d43c: 2f0b movel %a3,%sp@- } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4d43e: 7401 moveq #1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4d440: 4eb9 0004 d154 jsr 4d154 <_RBTree_Extract_validate_unprotected> } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4d446: 2053 moveal %a3@,%a0 4d448: b7e8 0004 cmpal %a0@(4),%a3 4d44c: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4d44e: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4d452: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4d454: 9481 subl %d1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4d456: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4d458: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4d45c: 4a80 tstl %d0 4d45e: 669e bnes 4d3fe <_RBTree_Extract_unprotected+0xae> 4d460: 6094 bras 4d3f6 <_RBTree_Extract_unprotected+0xa6> if (!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) 4d462: 202b 0008 movel %a3@(8),%d0 4d466: 6738 beqs 4d4a0 <_RBTree_Extract_unprotected+0x150> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 4d468: 2b40 0008 movel %d0,%a5@(8) the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4d46c: b7ed 000c cmpal %a5@(12),%a3 4d470: 6600 ff04 bnew 4d376 <_RBTree_Extract_unprotected+0x26> 4d474: 60a8 bras 4d41e <_RBTree_Extract_unprotected+0xce><== NOT EXECUTED * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4d476: 284a moveal %a2,%a4 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; 4d478: 2893 movel %a3@,%a4@ } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4d47a: 7401 moveq #1,%d2 _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4d47c: 2053 moveal %a3@,%a0 4d47e: b7e8 0004 cmpal %a0@(4),%a3 4d482: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4d484: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4d488: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4d48a: 9481 subl %d1,%d2 4d48c: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) 4d490: 60ca bras 4d45c <_RBTree_Extract_unprotected+0x10c> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 4d492: 2f0a movel %a2,%sp@- 4d494: 4eb9 0004 d154 jsr 4d154 <_RBTree_Extract_validate_unprotected> 4d49a: 588f addql #4,%sp 4d49c: 6000 ff04 braw 4d3a2 <_RBTree_Extract_unprotected+0x52> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; 4d4a0: 2013 movel %a3@,%d0 4d4a2: 2b40 0008 movel %d0,%a5@(8) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4d4a6: b08d cmpl %a5,%d0 4d4a8: 6600 fec4 bnew 4d36e <_RBTree_Extract_unprotected+0x1e> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 4d4ac: 42ad 0008 clrl %a5@(8) } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4d4b0: b7ed 000c cmpal %a5@(12),%a3 4d4b4: 6600 fec0 bnew 4d376 <_RBTree_Extract_unprotected+0x26> 4d4b8: 6000 ff64 braw 4d41e <_RBTree_Extract_unprotected+0xce> if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; 4d4bc: 2013 movel %a3@,%d0 4d4be: 2b40 000c movel %d0,%a5@(12) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4d4c2: b08d cmpl %a5,%d0 4d4c4: 6600 feb0 bnew 4d376 <_RBTree_Extract_unprotected+0x26> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 4d4c8: 42ad 000c clrl %a5@(12) 4d4cc: 6000 fea8 braw 4d376 <_RBTree_Extract_unprotected+0x26> =============================================================================== 0004d154 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 4d154: 4e56 ffec linkw %fp,#-20 4d158: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d15c: 266e 0008 moveal %fp@(8),%a3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 4d160: 2053 moveal %a3@,%a0 if(!parent->parent) return; 4d162: 4a90 tstl %a0@ 4d164: 677e beqs 4d1e4 <_RBTree_Extract_validate_unprotected+0x90> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 4d166: 2268 0004 moveal %a0@(4),%a1 4d16a: b3cb cmpal %a3,%a1 4d16c: 6700 01da beqw 4d348 <_RBTree_Extract_validate_unprotected+0x1f4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d170: 7401 moveq #1,%d2 4d172: b4ab 000c cmpl %a3@(12),%d2 4d176: 6764 beqs 4d1dc <_RBTree_Extract_validate_unprotected+0x88> sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 4d178: 4a90 tstl %a0@ 4d17a: 6760 beqs 4d1dc <_RBTree_Extract_validate_unprotected+0x88> 4d17c: 4a89 tstl %a1 4d17e: 6708 beqs 4d188 <_RBTree_Extract_validate_unprotected+0x34><== NEVER TAKEN 4d180: 7001 moveq #1,%d0 4d182: b0a9 000c cmpl %a1@(12),%d0 4d186: 6764 beqs 4d1ec <_RBTree_Extract_validate_unprotected+0x98> _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 4d188: 2469 0008 moveal %a1@(8),%a2 4d18c: 4a8a tstl %a2 4d18e: 670a beqs 4d19a <_RBTree_Extract_validate_unprotected+0x46> 4d190: 7001 moveq #1,%d0 4d192: b0aa 000c cmpl %a2@(12),%d0 4d196: 6700 00dc beqw 4d274 <_RBTree_Extract_validate_unprotected+0x120> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 4d19a: 2469 0004 moveal %a1@(4),%a2 4d19e: 4a8a tstl %a2 4d1a0: 670a beqs 4d1ac <_RBTree_Extract_validate_unprotected+0x58> 4d1a2: 7201 moveq #1,%d1 4d1a4: b2aa 000c cmpl %a2@(12),%d1 4d1a8: 6700 00ca beqw 4d274 <_RBTree_Extract_validate_unprotected+0x120> sibling->color = RBT_RED; 4d1ac: 7601 moveq #1,%d3 4d1ae: 2343 000c movel %d3,%a1@(12) 4d1b2: b6a8 000c cmpl %a0@(12),%d3 4d1b6: 6700 00ac beqw 4d264 <_RBTree_Extract_validate_unprotected+0x110> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 4d1ba: 2450 moveal %a0@,%a2 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d1bc: 4a8a tstl %a2 4d1be: 6700 009a beqw 4d25a <_RBTree_Extract_validate_unprotected+0x106> if(!(the_node->parent->parent)) return NULL; 4d1c2: 4a92 tstl %a2@ 4d1c4: 6700 0094 beqw 4d25a <_RBTree_Extract_validate_unprotected+0x106> if(the_node == the_node->parent->child[RBT_LEFT]) 4d1c8: 226a 0004 moveal %a2@(4),%a1 4d1cc: b3c8 cmpal %a0,%a1 4d1ce: 677e beqs 4d24e <_RBTree_Extract_validate_unprotected+0xfa><== NEVER TAKEN c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 4d1d0: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d1d2: 204a moveal %a2,%a0 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d1d4: 7401 moveq #1,%d2 4d1d6: b4ab 000c cmpl %a3@(12),%d2 4d1da: 669c bnes 4d178 <_RBTree_Extract_validate_unprotected+0x24><== ALWAYS TAKEN sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4d1dc: 2053 moveal %a3@,%a0 4d1de: 4a90 tstl %a0@ 4d1e0: 6700 015a beqw 4d33c <_RBTree_Extract_validate_unprotected+0x1e8> } 4d1e4: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4d1e8: 4e5e unlk %fp 4d1ea: 4e75 rts * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4d1ec: b7e8 0004 cmpal %a0@(4),%a3 4d1f0: 56c0 sne %d0 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 4d1f2: 7201 moveq #1,%d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d1f4: 7402 moveq #2,%d2 sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4d1f6: 49c0 extbl %d0 4d1f8: 4480 negl %d0 4d1fa: 9480 subl %d0,%d2 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 4d1fc: 2141 000c movel %d1,%a0@(12) 4d200: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 sibling->color = RBT_BLACK; 4d204: 42a9 000c clrl %a1@(12) 4d208: 4a8a tstl %a2 4d20a: 6730 beqs 4d23c <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d20c: 2200 movel %d0,%d1 4d20e: 5281 addql #1,%d1 4d210: 43f2 1c00 lea %a2@(00000000,%d1:l:4),%a1 4d214: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4) if (c->child[dir]) 4d218: 2272 1c00 moveal %a2@(00000000,%d1:l:4),%a1 4d21c: 4a89 tstl %a1 4d21e: 6702 beqs 4d222 <_RBTree_Extract_validate_unprotected+0xce><== NEVER TAKEN c->child[dir]->parent = the_node; 4d220: 2288 movel %a0,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d222: 2250 moveal %a0@,%a1 4d224: 7401 moveq #1,%d2 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d226: 2588 1c00 movel %a0,%a2@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d22a: b1e9 0004 cmpal %a1@(4),%a0 4d22e: 56c1 sne %d1 c->parent = the_node->parent; 4d230: 2489 movel %a1,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d232: 49c1 extbl %d1 4d234: 9481 subl %d1,%d2 4d236: 238a 2c00 movel %a2,%a1@(00000000,%d2:l:4) c->parent = the_node->parent; the_node->parent = c; 4d23a: 208a movel %a2,%a0@ dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; 4d23c: 4a80 tstl %d0 4d23e: 57c0 seq %d0 4d240: 7601 moveq #1,%d3 4d242: 49c0 extbl %d0 4d244: 9680 subl %d0,%d3 4d246: 2270 3c00 moveal %a0@(00000000,%d3:l:4),%a1 4d24a: 6000 ff3c braw 4d188 <_RBTree_Extract_validate_unprotected+0x34> 4d24e: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d250: 204a moveal %a2,%a0 if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4d252: 226a 0008 moveal %a2@(8),%a1 4d256: 6000 ff7c braw 4d1d4 <_RBTree_Extract_validate_unprotected+0x80> c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 4d25a: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d25c: 93c9 subal %a1,%a1 4d25e: 204a moveal %a2,%a0 4d260: 6000 ff72 braw 4d1d4 <_RBTree_Extract_validate_unprotected+0x80> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 4d264: 42a8 000c clrl %a0@(12) sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4d268: 2053 moveal %a3@,%a0 4d26a: 4a90 tstl %a0@ 4d26c: 6600 ff76 bnew 4d1e4 <_RBTree_Extract_validate_unprotected+0x90> 4d270: 6000 00ca braw 4d33c <_RBTree_Extract_validate_unprotected+0x1e8><== NOT EXECUTED * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 4d274: b7e8 0004 cmpal %a0@(4),%a3 4d278: 56c0 sne %d0 if (!_RBTree_Is_red(sibling->child[!dir])) { 4d27a: 7401 moveq #1,%d2 * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 4d27c: 49c0 extbl %d0 4d27e: 4480 negl %d0 if (!_RBTree_Is_red(sibling->child[!dir])) { 4d280: 57c1 seq %d1 4d282: 49c1 extbl %d1 4d284: 9481 subl %d1,%d2 4d286: 2202 movel %d2,%d1 4d288: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d28c: 4a8a tstl %a2 4d28e: 6708 beqs 4d298 <_RBTree_Extract_validate_unprotected+0x144> 4d290: 7601 moveq #1,%d3 4d292: b6aa 000c cmpl %a2@(12),%d3 4d296: 6756 beqs 4d2ee <_RBTree_Extract_validate_unprotected+0x19a> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4d298: 7601 moveq #1,%d3 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; 4d29a: 7401 moveq #1,%d2 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4d29c: b183 eorl %d0,%d3 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; 4d29e: 2342 000c movel %d2,%a1@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d2a2: 143c 0002 moveb #2,%d2 4d2a6: 9483 subl %d3,%d2 sibling->child[dir]->color = RBT_BLACK; 4d2a8: 2871 0c04 moveal %a1@(00000004,%d0:l:4),%a4 4d2ac: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2 4d2b0: 42ac 000c clrl %a4@(12) 4d2b4: 4a8a tstl %a2 4d2b6: 672e beqs 4d2e6 <_RBTree_Extract_validate_unprotected+0x192><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d2b8: 5283 addql #1,%d3 4d2ba: 49f2 3c00 lea %a2@(00000000,%d3:l:4),%a4 4d2be: 2394 2c00 movel %a4@,%a1@(00000000,%d2:l:4) if (c->child[dir]) 4d2c2: 2872 3c00 moveal %a2@(00000000,%d3:l:4),%a4 4d2c6: 4a8c tstl %a4 4d2c8: 6702 beqs 4d2cc <_RBTree_Extract_validate_unprotected+0x178> c->child[dir]->parent = the_node; 4d2ca: 2889 movel %a1,%a4@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d2cc: 2851 moveal %a1@,%a4 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d2ce: 2589 3c00 movel %a1,%a2@(00000000,%d3:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d2d2: 7601 moveq #1,%d3 4d2d4: b3ec 0004 cmpal %a4@(4),%a1 4d2d8: 56c2 sne %d2 c->parent = the_node->parent; 4d2da: 248c movel %a4,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d2dc: 49c2 extbl %d2 4d2de: 9682 subl %d2,%d3 4d2e0: 298a 3c00 movel %a2,%a4@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 4d2e4: 228a movel %a2,%a1@ _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; 4d2e6: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4d2ea: 2471 1c00 moveal %a1@(00000000,%d1:l:4),%a2 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d2ee: 7202 moveq #2,%d1 4d2f0: 9280 subl %d0,%d1 } sibling->color = parent->color; 4d2f2: 2368 000c 000c movel %a0@(12),%a1@(12) 4d2f8: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 parent->color = RBT_BLACK; 4d2fc: 42a8 000c clrl %a0@(12) sibling->child[!dir]->color = RBT_BLACK; 4d300: 42aa 000c clrl %a2@(12) 4d304: 4a89 tstl %a1 4d306: 6700 fed4 beqw 4d1dc <_RBTree_Extract_validate_unprotected+0x88> c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d30a: 5280 addql #1,%d0 4d30c: 45f1 0c00 lea %a1@(00000000,%d0:l:4),%a2 4d310: 2192 1c00 movel %a2@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 4d314: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2 4d318: 4a8a tstl %a2 4d31a: 6702 beqs 4d31e <_RBTree_Extract_validate_unprotected+0x1ca> c->child[dir]->parent = the_node; 4d31c: 2488 movel %a0,%a2@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d31e: 2450 moveal %a0@,%a2 4d320: 7201 moveq #1,%d1 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d322: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d326: b1ea 0004 cmpal %a2@(4),%a0 4d32a: 56c0 sne %d0 c->parent = the_node->parent; 4d32c: 228a movel %a2,%a1@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d32e: 49c0 extbl %d0 4d330: 9280 subl %d0,%d1 4d332: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4d336: 2089 movel %a1,%a0@ 4d338: 6000 fea2 braw 4d1dc <_RBTree_Extract_validate_unprotected+0x88> _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4d33c: 42ab 000c clrl %a3@(12) } 4d340: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4d344: 4e5e unlk %fp 4d346: 4e75 rts if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4d348: 2268 0008 moveal %a0@(8),%a1 4d34c: 6000 fe22 braw 4d170 <_RBTree_Extract_validate_unprotected+0x1c> =============================================================================== 00049b14 <_RBTree_Find>: { ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 49b14: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 49b1a: 4e56 ffec linkw %fp,#-20 49b1e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49b22: 266e 0008 moveal %fp@(8),%a3 49b26: 242e 000c movel %fp@(12),%d2 ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 49b2a: 40c4 movew %sr,%d4 49b2c: 8084 orl %d4,%d0 49b2e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 49b30: 246b 0004 moveal %a3@(4),%a2 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 49b34: 4283 clrl %d3 49b36: 4a8a tstl %a2 49b38: 672a beqs 49b64 <_RBTree_Find+0x50> <== NEVER TAKEN compare_result = the_rbtree->compare_function(the_node, iter_node); 49b3a: 2f0a movel %a2,%sp@- 49b3c: 206b 0010 moveal %a3@(16),%a0 49b40: 2f02 movel %d2,%sp@- 49b42: 4e90 jsr %a0@ if (compare_result == 0) { 49b44: 508f addql #8,%sp 49b46: 4a80 tstl %d0 49b48: 6608 bnes 49b52 <_RBTree_Find+0x3e> found = iter_node; if ( the_rbtree->is_unique ) 49b4a: 260a movel %a2,%d3 49b4c: 4a2b 0014 tstb %a3@(20) 49b50: 6612 bnes 49b64 <_RBTree_Find+0x50> break; } RBTree_Direction dir = (compare_result == 1); 49b52: 7201 moveq #1,%d1 49b54: b280 cmpl %d0,%d1 49b56: 57c0 seq %d0 49b58: 49c0 extbl %d0 iter_node = iter_node->child[dir]; 49b5a: 9280 subl %d0,%d1 49b5c: 2472 1c00 moveal %a2@(00000000,%d1:l:4),%a2 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 49b60: 4a8a tstl %a2 49b62: 66d6 bnes 49b3a <_RBTree_Find+0x26> return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 49b64: 46c4 movew %d4,%sr return return_node; } 49b66: 2003 movel %d3,%d0 49b68: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49b6e: 4e5e unlk %fp ... =============================================================================== 00049ad4 <_RBTree_Find_header>: { ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 49ad4: 203c 0000 0700 movel #1792,%d0 */ RBTree_Control *_RBTree_Find_header( RBTree_Node *the_node ) { 49ada: 4e56 0000 linkw %fp,#0 49ade: 206e 0008 moveal %fp@(8),%a0 49ae2: 2f02 movel %d2,%sp@- ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 49ae4: 40c2 movew %sr,%d2 49ae6: 8082 orl %d2,%d0 49ae8: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 49aea: 4a88 tstl %a0 49aec: 671a beqs 49b08 <_RBTree_Find_header+0x34> if(!(the_node->parent)) return NULL; 49aee: 2050 moveal %a0@,%a0 49af0: 4a88 tstl %a0 49af2: 670a beqs 49afe <_RBTree_Find_header+0x2a> 49af4: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 49af6: 6706 beqs 49afe <_RBTree_Find_header+0x2a> <== NEVER TAKEN 49af8: 2041 moveal %d1,%a0 RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49afa: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 49afc: 66fa bnes 49af8 <_RBTree_Find_header+0x24> return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 49afe: 46c2 movew %d2,%sr return return_header; } 49b00: 241f movel %sp@+,%d2 49b02: 2008 movel %a0,%d0 49b04: 4e5e unlk %fp 49b06: 4e75 rts */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 49b08: 91c8 subal %a0,%a0 RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 49b0a: 46c2 movew %d2,%sr return return_header; } 49b0c: 241f movel %sp@+,%d2 49b0e: 2008 movel %a0,%d0 49b10: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049ddc <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 49ddc: 4e56 ffec linkw %fp,#-20 49de0: 202e 001c movel %fp@(28),%d0 49de4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49de8: 246e 0008 moveal %fp@(8),%a2 49dec: 242e 0014 movel %fp@(20),%d2 49df0: 282e 0018 movel %fp@(24),%d4 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 49df4: 4a8a tstl %a2 49df6: 6736 beqs 49e2e <_RBTree_Initialize+0x52> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 49df8: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 49dfa: 256e 000c 0010 movel %fp@(12),%a2@(16) the_rbtree->is_unique = is_unique; 49e00: 1540 0014 moveb %d0,%a2@(20) RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 49e04: 42aa 0004 clrl %a2@(4) the_rbtree->first[0] = NULL; 49e08: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 49e0c: 42aa 000c clrl %a2@(12) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 49e10: 4a82 tstl %d2 49e12: 671a beqs 49e2e <_RBTree_Initialize+0x52> <== NEVER TAKEN /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; 49e14: 262e 0010 movel %fp@(16),%d3 49e18: 47f9 0004 9dae lea 49dae <_RBTree_Insert>,%a3 while ( count-- ) { _RBTree_Insert(the_rbtree, next); 49e1e: 2f03 movel %d3,%sp@- * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 49e20: d684 addl %d4,%d3 49e22: 5382 subql #1,%d2 _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { _RBTree_Insert(the_rbtree, next); 49e24: 2f0a movel %a2,%sp@- 49e26: 4e93 jsr %a3@ /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 49e28: 508f addql #8,%sp 49e2a: 4a82 tstl %d2 49e2c: 66f0 bnes 49e1e <_RBTree_Initialize+0x42> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 49e2e: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49e34: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d6fa <_RBTree_Insert>: RBTree_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4d6fa: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Insert( RBTree_Control *tree, RBTree_Node *node ) { 4d700: 4e56 0000 linkw %fp,#0 4d704: 222e 0008 movel %fp@(8),%d1 4d708: 206e 000c moveal %fp@(12),%a0 4d70c: 2f02 movel %d2,%sp@- ISR_Level level; _ISR_Disable( level ); 4d70e: 40c2 movew %sr,%d2 4d710: 8082 orl %d2,%d0 4d712: 46c0 movew %d0,%sr return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4d714: 241f movel %sp@+,%d2 ) { ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); 4d716: 2d48 000c movel %a0,%fp@(12) 4d71a: 2d41 0008 movel %d1,%fp@(8) _ISR_Enable( level ); } 4d71e: 4e5e unlk %fp ) { ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); 4d720: 4ef9 0004 d626 jmp 4d626 <_RBTree_Insert_unprotected> ... =============================================================================== 0004d4fc <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 4d4fc: 4e56 ffe8 linkw %fp,#-24 4d500: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4d504: 266e 0008 moveal %fp@(8),%a3 ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4d508: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4d50a: 2250 moveal %a0@,%a1 4d50c: 2449 moveal %a1,%a2 4d50e: 4a89 tstl %a1 4d510: 6700 00de beqw 4d5f0 <_RBTree_Validate_insert_unprotected+0xf4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d514: 7601 moveq #1,%d3 4d516: b6a8 000c cmpl %a0@(12),%d3 4d51a: 6708 beqs 4d524 <_RBTree_Validate_insert_unprotected+0x28> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 4d51c: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4d520: 4e5e unlk %fp 4d522: 4e75 rts ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 4d524: 4a91 tstl %a1@ 4d526: 6700 00ee beqw 4d616 <_RBTree_Validate_insert_unprotected+0x11a> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 4d52a: 2429 0004 movel %a1@(4),%d2 4d52e: b488 cmpl %a0,%d2 4d530: 6700 00ec beqw 4d61e <_RBTree_Validate_insert_unprotected+0x122> 4d534: 2842 moveal %d2,%a4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d536: 4a8c tstl %a4 4d538: 670a beqs 4d544 <_RBTree_Validate_insert_unprotected+0x48> 4d53a: 7001 moveq #1,%d0 4d53c: b0ac 000c cmpl %a4@(12),%d0 4d540: 6700 00ba beqw 4d5fc <_RBTree_Validate_insert_unprotected+0x100> the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4d544: b7e8 0004 cmpal %a0@(4),%a3 4d548: 56c1 sne %d1 RBTree_Direction pdir = the_node->parent != g->child[0]; 4d54a: b488 cmpl %a0,%d2 4d54c: 56c0 sne %d0 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4d54e: 49c1 extbl %d1 4d550: 4481 negl %d1 RBTree_Direction pdir = the_node->parent != g->child[0]; 4d552: 49c0 extbl %d0 4d554: 4480 negl %d0 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d556: 7401 moveq #1,%d2 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4d558: b081 cmpl %d1,%d0 4d55a: 6700 00b2 beqw 4d60e <_RBTree_Validate_insert_unprotected+0x112> 4d55e: 9480 subl %d0,%d2 4d560: 2202 movel %d2,%d1 4d562: 5281 addql #1,%d1 4d564: 5280 addql #1,%d0 4d566: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 4d56a: 4a8c tstl %a4 4d56c: 672c beqs 4d59a <_RBTree_Validate_insert_unprotected+0x9e><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d56e: 4bf4 0c00 lea %a4@(00000000,%d0:l:4),%a5 4d572: 2195 1c00 movel %a5@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 4d576: 2a74 0c00 moveal %a4@(00000000,%d0:l:4),%a5 4d57a: 4a8d tstl %a5 4d57c: 6704 beqs 4d582 <_RBTree_Validate_insert_unprotected+0x86> c->child[dir]->parent = the_node; 4d57e: 2a88 movel %a0,%a5@ 4d580: 2250 moveal %a0@,%a1 c->child[dir] = the_node; 4d582: 2988 0c00 movel %a0,%a4@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d586: 7601 moveq #1,%d3 4d588: b1e9 0004 cmpal %a1@(4),%a0 4d58c: 56c1 sne %d1 c->parent = the_node->parent; 4d58e: 2889 movel %a1,%a4@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d590: 49c1 extbl %d1 4d592: 9681 subl %d1,%d3 4d594: 238c 3c00 movel %a4,%a1@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 4d598: 208c movel %a4,%a0@ _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 4d59a: 2673 0c00 moveal %a3@(00000000,%d0:l:4),%a3 4d59e: 2053 moveal %a3@,%a0 } the_node->parent->color = RBT_BLACK; 4d5a0: 42a8 000c clrl %a0@(12) g->color = RBT_RED; 4d5a4: 7201 moveq #1,%d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d5a6: 2072 0c00 moveal %a2@(00000000,%d0:l:4),%a0 4d5aa: 2541 000c movel %d1,%a2@(12) 4d5ae: 4a88 tstl %a0 4d5b0: 6700 ff56 beqw 4d508 <_RBTree_Validate_insert_unprotected+0xc> c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d5b4: 2202 movel %d2,%d1 4d5b6: 5281 addql #1,%d1 4d5b8: 43f0 1c00 lea %a0@(00000000,%d1:l:4),%a1 4d5bc: 2591 0c00 movel %a1@,%a2@(00000000,%d0:l:4) if (c->child[dir]) 4d5c0: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4d5c4: 4a89 tstl %a1 4d5c6: 6702 beqs 4d5ca <_RBTree_Validate_insert_unprotected+0xce> c->child[dir]->parent = the_node; 4d5c8: 228a movel %a2,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d5ca: 2252 moveal %a2@,%a1 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d5cc: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d5d0: 7201 moveq #1,%d1 4d5d2: b5e9 0004 cmpal %a1@(4),%a2 4d5d6: 56c0 sne %d0 c->parent = the_node->parent; 4d5d8: 2089 movel %a1,%a0@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d5da: 49c0 extbl %d0 4d5dc: 9280 subl %d0,%d1 4d5de: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4d5e2: 2488 movel %a0,%a2@ ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4d5e4: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4d5e6: 2250 moveal %a0@,%a1 4d5e8: 2449 moveal %a1,%a2 4d5ea: 4a89 tstl %a1 4d5ec: 6600 ff26 bnew 4d514 <_RBTree_Validate_insert_unprotected+0x18> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4d5f0: 42ab 000c clrl %a3@(12) } 4d5f4: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4d5f8: 4e5e unlk %fp 4d5fa: 4e75 rts u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 4d5fc: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 4d600: 2649 moveal %a1,%a3 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; 4d602: 42ac 000c clrl %a4@(12) g->color = RBT_RED; 4d606: 2340 000c movel %d0,%a1@(12) 4d60a: 6000 fefc braw 4d508 <_RBTree_Validate_insert_unprotected+0xc> 4d60e: 2001 movel %d1,%d0 } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4d610: 9481 subl %d1,%d2 4d612: 5280 addql #1,%d0 4d614: 608a bras 4d5a0 <_RBTree_Validate_insert_unprotected+0xa4> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 4d616: 2429 0004 movel %a1@(4),%d2 <== NOT EXECUTED 4d61a: 6000 ff28 braw 4d544 <_RBTree_Validate_insert_unprotected+0x48><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4d61e: 2869 0008 moveal %a1@(8),%a4 4d622: 6000 ff12 braw 4d536 <_RBTree_Validate_insert_unprotected+0x3a> =============================================================================== 0004c08a <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4c08a: 4e56 0000 linkw %fp,#0 4c08e: 2f0a movel %a2,%sp@- 4c090: 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() ) 4c094: 4a39 0005 e024 tstb 5e024 4c09a: 6758 beqs 4c0f4 <_RTEMS_tasks_Create_extension+0x6a> /* * 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 ); 4c09c: 705e moveq #94,%d0 if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c09e: 2f00 movel %d0,%sp@- 4c0a0: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !api ) 4c0a6: 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 ); 4c0a8: 2040 moveal %d0,%a0 if ( !api ) 4c0aa: 4a80 tstl %d0 4c0ac: 6758 beqs 4c106 <_RTEMS_tasks_Create_extension+0x7c> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4c0ae: 2540 00fc movel %d0,%a2@(252) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4c0b2: 4200 clrb %d0 api->pending_events = EVENT_SETS_NONE_PENDING; 4c0b4: 4290 clrl %a0@ 4c0b6: 1140 0008 moveb %d0,%a0@(8) api->event_condition = 0; 4c0ba: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4c0be: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4c0c2: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4c0c6: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4c0ca: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4c0ce: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4c0d2: 42aa 0108 clrl %a2@(264) if ( rtems_configuration_get_notepads_enabled() ) { 4c0d6: 4a39 0005 e024 tstb 5e024 4c0dc: 670c beqs 4c0ea <_RTEMS_tasks_Create_extension+0x60> * task is created via another API, then this routine is invoked * and this API given the opportunity to initialize its extension * area. */ bool _RTEMS_tasks_Create_extension( 4c0de: 41e8 001e lea %a0@(30),%a0 4c0e2: 7010 moveq #16,%d0 _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4c0e4: 4298 clrl %a0@+ 4c0e6: 5380 subql #1,%d0 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++) 4c0e8: 66fa bnes 4c0e4 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4c0ea: 246e fffc moveal %fp@(-4),%a2 4c0ee: 4e5e unlk %fp if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; 4c0f0: 7001 moveq #1,%d0 } 4c0f2: 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() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); 4c0f4: 701e moveq #30,%d0 api = _Workspace_Allocate( to_allocate ); 4c0f6: 2f00 movel %d0,%sp@- 4c0f8: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !api ) 4c0fe: 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 ); 4c100: 2040 moveal %d0,%a0 if ( !api ) 4c102: 4a80 tstl %d0 4c104: 66a8 bnes 4c0ae <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4c106: 246e fffc moveal %fp@(-4),%a2 4c10a: 4e5e unlk %fp to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 4c10c: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 0004c034 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4c034: 4e56 fff4 linkw %fp,#-12 4c038: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4c03c: 246e 000c moveal %fp@(12),%a2 4c040: 47f9 0004 c15c lea 4c15c <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3 /* * Free per task variable memory */ tvp = deleted->task_variables; 4c046: 206a 0108 moveal %a2@(264),%a0 deleted->task_variables = NULL; 4c04a: 42aa 0108 clrl %a2@(264) while (tvp) { 4c04e: 4a88 tstl %a0 4c050: 671e beqs 4c070 <_RTEMS_tasks_Delete_extension+0x3c> next = (rtems_task_variable_t *)tvp->next; 4c052: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c054: 2f08 movel %a0,%sp@- 4c056: 2f0a movel %a2,%sp@- 4c058: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c05a: 508f addql #8,%sp 4c05c: 4a82 tstl %d2 4c05e: 6710 beqs 4c070 <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 4c060: 2042 moveal %d2,%a0 */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 4c062: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c064: 2f08 movel %a0,%sp@- 4c066: 2f0a movel %a2,%sp@- 4c068: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c06a: 508f addql #8,%sp 4c06c: 4a82 tstl %d2 4c06e: 66f0 bnes 4c060 <_RTEMS_tasks_Delete_extension+0x2c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 4c070: 2f2a 00fc movel %a2@(252),%sp@- 4c074: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4c07a: 588f addql #4,%sp 4c07c: 42aa 00fc clrl %a2@(252) } 4c080: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4c086: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046f00 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46f00: 4e56 ffe4 linkw %fp,#-28 46f04: 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; 46f08: 2479 0005 e04a moveal 5e04a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 46f0e: 2639 0005 e046 movel 5e046 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46f14: 4a8a tstl %a2 46f16: 6754 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46f18: 4a83 tstl %d3 46f1a: 6750 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 46f1c: 280e movel %fp,%d4 46f1e: 4282 clrl %d2 46f20: 5984 subql #4,%d4 46f22: 47f9 0004 6cd8 lea 46cd8 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46f28: 49f9 0004 6f88 lea 46f88 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 46f2e: 2f04 movel %d4,%sp@- 46f30: 2f2a 000c movel %a2@(12),%sp@- 46f34: 2f2a 0014 movel %a2@(20),%sp@- 46f38: 2f2a 0004 movel %a2@(4),%sp@- 46f3c: 2f2a 0008 movel %a2@(8),%sp@- 46f40: 2f12 movel %a2@,%sp@- 46f42: 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 ) ) 46f44: 4fef 0018 lea %sp@(24),%sp 46f48: 4a80 tstl %d0 46f4a: 662a bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46f4c: 2f2a 0018 movel %a2@(24),%sp@- 46f50: 2f2a 0010 movel %a2@(16),%sp@- 46f54: 2f2e fffc movel %fp@(-4),%sp@- 46f58: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 46f5a: 4fef 000c lea %sp@(12),%sp 46f5e: 4a80 tstl %d0 46f60: 6614 bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46f62: 5282 addql #1,%d2 46f64: 45ea 001c lea %a2@(28),%a2 46f68: b682 cmpl %d2,%d3 46f6a: 66c2 bnes 46f2e <_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 ); } } 46f6c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46f72: 4e5e unlk %fp 46f74: 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 ); 46f76: 2f00 movel %d0,%sp@- 46f78: 4878 0001 pea 1 46f7c: 4878 0001 pea 1 46f80: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> ... =============================================================================== 0004bfb8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4bfb8: 4e56 ffec linkw %fp,#-20 4bfbc: 206e 0008 moveal %fp@(8),%a0 4bfc0: 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 ]; 4bfc4: 2468 00fc moveal %a0@(252),%a2 if ( !api ) 4bfc8: 4a8a tstl %a2 4bfca: 671a beqs 4bfe6 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4bfcc: 203c 0000 0700 movel #1792,%d0 4bfd2: 40c1 movew %sr,%d1 4bfd4: 8081 orl %d1,%d0 4bfd6: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4bfd8: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4bfdc: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4bfe0: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4bfe2: 4a82 tstl %d2 4bfe4: 660a bnes 4bff0 <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4bfe6: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bfec: 4e5e unlk %fp 4bfee: 4e75 rts if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4bff0: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4bff4: 260e movel %fp,%d3 4bff6: 5983 subql #4,%d3 4bff8: 47f9 0004 dbd4 lea 4dbd4 ,%a3 4bffe: 2f03 movel %d3,%sp@- 4c000: 2f3c 0000 ffff movel #65535,%sp@- 4c006: 2f2a 000e movel %a2@(14),%sp@- 4c00a: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4c00c: 2f02 movel %d2,%sp@- 4c00e: 206a 000a moveal %a2@(10),%a0 4c012: 4e90 jsr %a0@ asr->nest_level -= 1; 4c014: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4c018: 2f03 movel %d3,%sp@- 4c01a: 2f3c 0000 ffff movel #65535,%sp@- 4c020: 2f2e fffc movel %fp@(-4),%sp@- 4c024: 4e93 jsr %a3@ 4c026: 4fef 001c lea %sp@(28),%sp } 4c02a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4c030: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bf5e <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4bf5e: 4e56 0000 linkw %fp,#0 4bf62: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4bf66: 2068 0108 moveal %a0@(264),%a0 while (tvp) { 4bf6a: 4a88 tstl %a0 4bf6c: 6712 beqs 4bf80 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4bf6e: 2268 0004 moveal %a0@(4),%a1 4bf72: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4bf76: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4bf7a: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4bf7c: 4a88 tstl %a0 4bf7e: 66ee bnes 4bf6e <_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; 4bf80: 206e 000c moveal %fp@(12),%a0 4bf84: 2068 0108 moveal %a0@(264),%a0 while (tvp) { 4bf88: 4a88 tstl %a0 4bf8a: 6712 beqs 4bf9e <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4bf8c: 2268 0004 moveal %a0@(4),%a1 4bf90: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4bf94: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4bf98: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4bf9a: 4a88 tstl %a0 4bf9c: 66ee bnes 4bf8c <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4bf9e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047e14 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47e14: 4e56 fffc linkw %fp,#-4 47e18: 2f0a movel %a2,%sp@- 47e1a: 486e fffc pea %fp@(-4) 47e1e: 2f2e 0008 movel %fp@(8),%sp@- 47e22: 4879 0006 1730 pea 61730 <_Rate_monotonic_Information> 47e28: 4eb9 0004 9d64 jsr 49d64 <_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 ) { 47e2e: 4fef 000c lea %sp@(12),%sp 47e32: 2440 moveal %d0,%a2 47e34: 4aae fffc tstl %fp@(-4) 47e38: 663c bnes 47e76 <_Rate_monotonic_Timeout+0x62> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 47e3a: 206a 0040 moveal %a2@(64),%a0 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 47e3e: 2028 0010 movel %a0@(16),%d0 47e42: 0280 0000 4000 andil #16384,%d0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 47e48: 670a beqs 47e54 <_Rate_monotonic_Timeout+0x40> 47e4a: 202a 0008 movel %a2@(8),%d0 47e4e: b0a8 0020 cmpl %a0@(32),%d0 47e52: 676a beqs 47ebe <_Rate_monotonic_Timeout+0xaa> _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 ) { 47e54: 7001 moveq #1,%d0 47e56: b0aa 0038 cmpl %a2@(56),%d0 47e5a: 6722 beqs 47e7e <_Rate_monotonic_Timeout+0x6a> <== NEVER TAKEN _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 47e5c: 7004 moveq #4,%d0 47e5e: 2540 0038 movel %d0,%a2@(56) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47e62: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47e68: 5380 subql #1,%d0 47e6a: 23c0 0006 1820 movel %d0,61820 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47e70: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47e76: 246e fff8 moveal %fp@(-8),%a2 47e7a: 4e5e unlk %fp 47e7c: 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; 47e7e: 103c 0003 moveb #3,%d0 47e82: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47e86: 2f0a movel %a2,%sp@- 47e88: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47e8e: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47e94: 486a 0010 pea %a2@(16) 47e98: 4879 0006 18d8 pea 618d8 <_Watchdog_Ticks_chain> 47e9e: 4eb9 0004 b958 jsr 4b958 <_Watchdog_Insert> 47ea4: 4fef 000c lea %sp@(12),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47ea8: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47eae: 5380 subql #1,%d0 47eb0: 23c0 0006 1820 movel %d0,61820 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47eb6: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47ebc: 60b8 bras 47e76 <_Rate_monotonic_Timeout+0x62> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47ebe: 2f3c 1003 fff8 movel #268697592,%sp@- 47ec4: 2f08 movel %a0,%sp@- 47ec6: 4eb9 0004 a6a4 jsr 4a6a4 <_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 ); 47ecc: 2f0a movel %a2,%sp@- 47ece: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47ed4: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47eda: 486a 0010 pea %a2@(16) 47ede: 4879 0006 18d8 pea 618d8 <_Watchdog_Ticks_chain> 47ee4: 4eb9 0004 b958 jsr 4b958 <_Watchdog_Insert> 47eea: 4fef 0014 lea %sp@(20),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47eee: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47ef4: 5380 subql #1,%d0 47ef6: 23c0 0006 1820 movel %d0,61820 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47efc: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47f02: 6000 ff72 braw 47e76 <_Rate_monotonic_Timeout+0x62> ... =============================================================================== 0005db60 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 5db60: 4e56 ffe4 linkw %fp,#-28 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 5db64: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 5db6a: 5280 addql #1,%d0 5db6c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5db70: 23c0 0007 c4b4 movel %d0,7c4b4 <_Thread_Dispatch_disable_level> 5db76: 266e 0008 moveal %fp@(8),%a3 return _Thread_Dispatch_disable_level; 5db7a: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 5db80: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 5db86: 240b movel %a3,%d2 5db88: 0682 0000 0010 addil #16,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 5db8e: 260b movel %a3,%d3 5db90: 49f9 0005 e2e4 lea 5e2e4 <_Thread_queue_First>,%a4 5db96: 0683 0000 0068 addil #104,%d3 5db9c: 4bf9 0005 8d00 lea 58d00 <_Heap_Allocate_aligned_with_boundary>,%a5 5dba2: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> 5dba8: 588f addql #4,%sp if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5dbaa: 283c 0005 e1c8 movel #385480,%d4 /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5dbb0: 2f02 movel %d2,%sp@- 5dbb2: 4e94 jsr %a4@ if ( the_thread == NULL ) 5dbb4: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5dbb6: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 5dbb8: 4a80 tstl %d0 5dbba: 6738 beqs 5dbf4 <_Region_Process_queue+0x94> 5dbbc: 42a7 clrl %sp@- 5dbbe: 42a7 clrl %sp@- 5dbc0: 2f2a 0024 movel %a2@(36),%sp@- 5dbc4: 2f03 movel %d3,%sp@- 5dbc6: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 5dbc8: 4fef 0010 lea %sp@(16),%sp 5dbcc: 4a80 tstl %d0 5dbce: 6724 beqs 5dbf4 <_Region_Process_queue+0x94> break; *(void **)the_thread->Wait.return_argument = the_segment; 5dbd0: 206a 0028 moveal %a2@(40),%a0 5dbd4: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; 5dbd6: 52ab 0064 addql #1,%a3@(100) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5dbda: 2044 moveal %d4,%a0 5dbdc: 2f0a movel %a2,%sp@- 5dbde: 2f02 movel %d2,%sp@- 5dbe0: 4e90 jsr %a0@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 5dbe2: 508f addql #8,%sp break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 5dbe4: 42aa 0034 clrl %a2@(52) /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5dbe8: 2f02 movel %d2,%sp@- 5dbea: 4e94 jsr %a4@ if ( the_thread == NULL ) 5dbec: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5dbee: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 5dbf0: 4a80 tstl %d0 5dbf2: 66c8 bnes 5dbbc <_Region_Process_queue+0x5c> the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); } 5dbf4: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 5dbfa: 4e5e unlk %fp *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 5dbfc: 4ef9 0005 ab4c jmp 5ab4c <_Thread_Enable_dispatch> ... =============================================================================== 000490c0 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 490c0: 4e56 0000 linkw %fp,#0 490c4: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 490c6: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 490ca: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 490ce: 4eb9 0004 abda jsr 4abda <_Workspace_Allocate> if ( sched ) { 490d4: 588f addql #4,%sp 490d6: 4a80 tstl %d0 490d8: 670e beqs 490e8 <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 490da: 2540 008a movel %d0,%a2@(138) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 490de: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 490e0: 7202 moveq #2,%d1 sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 490e2: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 490e4: 2141 0014 movel %d1,%a0@(20) } return sched; } 490e8: 246e fffc moveal %fp@(-4),%a2 490ec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000490f0 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 490f0: 4e56 0000 linkw %fp,#0 490f4: 2f02 movel %d2,%sp@- 490f6: 242e 0008 movel %fp@(8),%d2 _Scheduler_EDF_Extract( the_thread ); 490fa: 2f02 movel %d2,%sp@- 490fc: 4eb9 0004 9178 jsr 49178 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 49102: 588f addql #4,%sp 49104: b4b9 0006 1348 cmpl 61348 <_Per_CPU_Information+0x10>,%d2 4910a: 6720 beqs 4912c <_Scheduler_EDF_Block+0x3c> <== ALWAYS TAKEN _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 4910c: b4b9 0006 1344 cmpl 61344 <_Per_CPU_Information+0xc>,%d2 <== NOT EXECUTED 49112: 6708 beqs 4911c <_Scheduler_EDF_Block+0x2c> <== NOT EXECUTED _Thread_Dispatch_necessary = true; } 49114: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49118: 4e5e unlk %fp <== NOT EXECUTED 4911a: 4e75 rts <== NOT EXECUTED 4911c: 242e fffc movel %fp@(-4),%d2 49120: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49122: 7001 moveq #1,%d0 49124: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> } 4912a: 4e75 rts _Scheduler_EDF_Extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); 4912c: 4eb9 0004 92b0 jsr 492b0 <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 49132: b4b9 0006 1344 cmpl 61344 <_Per_CPU_Information+0xc>,%d2 49138: 66da bnes 49114 <_Scheduler_EDF_Block+0x24> <== NEVER TAKEN 4913a: 60e0 bras 4911c <_Scheduler_EDF_Block+0x2c> =============================================================================== 000491a4 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 491a4: 4e56 0000 linkw %fp,#0 491a8: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 491ac: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 491b2: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 491b4: 4ef9 0004 abf6 jmp 4abf6 <_Workspace_Free> ... =============================================================================== 0004925c <_Scheduler_EDF_Release_job>: void _Scheduler_EDF_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 4925c: 4e56 0000 linkw %fp,#0 49260: 206e 0008 moveal %fp@(8),%a0 49264: 202e 000c movel %fp@(12),%d0 Priority_Control new_priority; if (deadline) { 49268: 661e bnes 49288 <_Scheduler_EDF_Release_job+0x2c><== ALWAYS TAKEN new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 4926a: 2028 00ac movel %a0@(172),%d0 <== NOT EXECUTED } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 4926e: 4878 0001 pea 1 <== NOT EXECUTED 49272: 2f00 movel %d0,%sp@- <== NOT EXECUTED else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; 49274: 2140 0018 movel %d0,%a0@(24) <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); 49278: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4927a: 4eb9 0004 95dc jsr 495dc <_Thread_Change_priority> <== NOT EXECUTED 49280: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 49284: 4e5e unlk %fp <== NOT EXECUTED 49286: 4e75 rts <== NOT EXECUTED { Priority_Control new_priority; if (deadline) { /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 49288: 2239 0006 12b0 movel 612b0 <_Watchdog_Ticks_since_boot>,%d1 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 4928e: 4878 0001 pea 1 { Priority_Control new_priority; if (deadline) { /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 49292: d081 addl %d1,%d0 49294: 0880 001f bclr #31,%d0 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49298: 2f00 movel %d0,%sp@- else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; 4929a: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 4929e: 2f08 movel %a0,%sp@- 492a0: 4eb9 0004 95dc jsr 495dc <_Thread_Change_priority> 492a6: 4fef 000c lea %sp@(12),%sp } 492aa: 4e5e unlk %fp ... =============================================================================== 000492d4 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 492d4: 4e56 0000 linkw %fp,#0 492d8: 2f0a movel %a2,%sp@- 492da: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 492de: 2f0a movel %a2,%sp@- 492e0: 4eb9 0004 9148 jsr 49148 <_Scheduler_EDF_Enqueue> 492e6: 2f2a 0014 movel %a2@(20),%sp@- * 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 ( _Scheduler_Is_priority_lower_than( 492ea: 2079 0006 1348 moveal 61348 <_Per_CPU_Information+0x10>,%a0 492f0: 2f28 0014 movel %a0@(20),%sp@- 492f4: 2079 0005 f8fe moveal 5f8fe <_Scheduler+0x30>,%a0 492fa: 4e90 jsr %a0@ 492fc: 4fef 000c lea %sp@(12),%sp 49300: 4a80 tstl %d0 49302: 6d08 blts 4930c <_Scheduler_EDF_Unblock+0x38> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } 49304: 246e fffc moveal %fp@(-4),%a2 49308: 4e5e unlk %fp 4930a: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4930c: 2079 0006 1344 moveal 61344 <_Per_CPU_Information+0xc>,%a0 * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 49312: 23ca 0006 1348 movel %a2,61348 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 49318: 4a28 0074 tstb %a0@(116) 4931c: 6710 beqs 4932e <_Scheduler_EDF_Unblock+0x5a> <== NEVER TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 4931e: 7001 moveq #1,%d0 49320: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> } } 49326: 246e fffc moveal %fp@(-4),%a2 4932a: 4e5e unlk %fp 4932c: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4932e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 49332: 66d0 bnes 49304 <_Scheduler_EDF_Unblock+0x30> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49334: 7001 moveq #1,%d0 <== NOT EXECUTED 49336: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED 4933c: 60e8 bras 49326 <_Scheduler_EDF_Unblock+0x52> <== NOT EXECUTED ... =============================================================================== 00049340 <_Scheduler_EDF_Update>: { Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 49340: 7202 moveq #2,%d1 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 49342: 4e56 0000 linkw %fp,#0 49346: 2f0a movel %a2,%sp@- 49348: 246e 0008 moveal %fp@(8),%a2 Scheduler_EDF_Per_thread *sched_info = 4934c: 206a 008a moveal %a2@(138),%a0 (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 49350: 2028 0014 movel %a0@(20),%d0 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 49354: 2f02 movel %d2,%sp@- Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 49356: b280 cmpl %d0,%d1 49358: 6712 beqs 4936c <_Scheduler_EDF_Update+0x2c> the_thread->real_priority = the_thread->Start.initial_priority; the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { 4935a: 7201 moveq #1,%d1 4935c: b280 cmpl %d0,%d1 4935e: 6730 beqs 49390 <_Scheduler_EDF_Update+0x50> <== NEVER TAKEN if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49360: 242e fff8 movel %fp@(-8),%d2 49364: 246e fffc moveal %fp@(-4),%a2 49368: 4e5e unlk %fp 4936a: 4e75 rts (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 4936c: 202a 00ac movel %a2@(172),%d0 49370: 08c0 001f bset #31,%d0 if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49374: 242e fff8 movel %fp@(-8),%d2 (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 49378: 2540 00ac movel %d0,%a2@(172) the_thread->real_priority = the_thread->Start.initial_priority; 4937c: 2540 0018 movel %d0,%a2@(24) the_thread->current_priority = the_thread->Start.initial_priority; 49380: 2540 0014 movel %d0,%a2@(20) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49384: 246e fffc moveal %fp@(-4),%a2 49388: 4e5e unlk %fp if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); the_thread->real_priority = the_thread->Start.initial_priority; the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; 4938a: 42a8 0014 clrl %a0@(20) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 4938e: 4e75 rts Thread_Control *the_thread ) { Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); 49390: 2408 movel %a0,%d2 <== NOT EXECUTED 49392: 5882 addql #4,%d2 <== NOT EXECUTED the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node); 49394: 2f02 movel %d2,%sp@- <== NOT EXECUTED 49396: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4939c: 4eb9 0004 d4d0 jsr 4d4d0 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); 493a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 493a4: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 493aa: 4eb9 0004 d6fa jsr 4d6fa <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); 493b0: 4eb9 0004 92b0 jsr 492b0 <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { 493b6: 2079 0006 1344 moveal 61344 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 493bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 493c0: b1f9 0006 1348 cmpal 61348 <_Per_CPU_Information+0x10>,%a0 <== NOT EXECUTED 493c6: 6798 beqs 49360 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED if ( _Thread_Executing->is_preemptible || 493c8: 4a28 0074 tstb %a0@(116) <== NOT EXECUTED 493cc: 6606 bnes 493d4 <_Scheduler_EDF_Update+0x94> <== NOT EXECUTED 493ce: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 493d2: 668c bnes 49360 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 493d4: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED _Scheduler_EDF_Schedule(); if ( _Thread_Executing != _Thread_Heir ) { if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 493d8: 7001 moveq #1,%d0 <== NOT EXECUTED } } } 493da: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 493de: 4e5e unlk %fp <== NOT EXECUTED _Scheduler_EDF_Schedule(); if ( _Thread_Executing != _Thread_Heir ) { if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 493e0: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED } } } =============================================================================== 000493e8 <_Scheduler_EDF_Yield>: Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); 493e8: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { 493ee: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 493f2: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; 493f6: 2479 0006 1344 moveal 61344 <_Per_CPU_Information+0xc>,%a2 <== NOT EXECUTED Scheduler_EDF_Per_thread *executing_info = 493fc: 262a 008a movel %a2@(138),%d3 <== NOT EXECUTED (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); 49400: 40c2 movew %sr,%d2 <== NOT EXECUTED 49402: 8082 orl %d2,%d0 <== NOT EXECUTED 49404: 46c0 movew %d0,%sr <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node( const RBTree_Control *the_rbtree ) { if(!the_rbtree) return NULL; /* TODO: expected behavior? */ return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL); 49406: 2079 0006 135e moveal 6135e <_Scheduler_EDF_Ready_queue+0x4>,%a0<== NOT EXECUTED 4940c: 4aa8 0004 tstl %a0@(4) <== NOT EXECUTED 49410: 674a beqs 4945c <_Scheduler_EDF_Yield+0x74> <== NOT EXECUTED ISR_Level level; Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); 49412: 5883 addql #4,%d3 <== NOT EXECUTED if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) { /* * The RBTree has more than one node, enqueue behind the tasks * with the same priority in case there are such ones. */ _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node ); 49414: 2f03 movel %d3,%sp@- <== NOT EXECUTED 49416: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4941c: 4eb9 0004 d4d0 jsr 4d4d0 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); 49422: 2f03 movel %d3,%sp@- <== NOT EXECUTED 49424: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4942a: 4eb9 0004 d6fa jsr 4d6fa <_RBTree_Insert> <== NOT EXECUTED _ISR_Flash( level ); 49430: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 49436: 46c2 movew %d2,%sr <== NOT EXECUTED 49438: 8082 orl %d2,%d0 <== NOT EXECUTED 4943a: 46c0 movew %d0,%sr <== NOT EXECUTED if ( _Thread_Is_heir( executing ) ) { 4943c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49440: b5f9 0006 1348 cmpal 61348 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 49446: 672c beqs 49474 <_Scheduler_EDF_Yield+0x8c> <== NOT EXECUTED _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 49448: 7001 moveq #1,%d0 <== NOT EXECUTED 4944a: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED _ISR_Enable( level ); 49450: 46c2 movew %d2,%sr <== NOT EXECUTED } 49452: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 49458: 4e5e unlk %fp <== NOT EXECUTED 4945a: 4e75 rts <== NOT EXECUTED 4945c: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED 49460: 66b0 bnes 49412 <_Scheduler_EDF_Yield+0x2a> <== NOT EXECUTED _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 49462: b5f9 0006 1348 cmpal 61348 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 49468: 67e6 beqs 49450 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED _Thread_Dispatch_necessary = true; 4946a: 7001 moveq #1,%d0 <== NOT EXECUTED 4946c: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED 49472: 60dc bras 49450 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) { first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT ); 49474: 42a7 clrl %sp@- <== NOT EXECUTED 49476: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4947c: 4eb9 0004 d728 jsr 4d728 <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; 49482: 508f addql #8,%sp <== NOT EXECUTED 49484: 2040 moveal %d0,%a0 <== NOT EXECUTED 49486: 5988 subql #4,%a0 <== NOT EXECUTED 49488: 23d0 0006 1348 movel %a0@,61348 <_Per_CPU_Information+0x10><== NOT EXECUTED } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 4948e: 7001 moveq #1,%d0 <== NOT EXECUTED 49490: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED 49496: 60b8 bras 49450 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED =============================================================================== 00048720 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 48720: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 48724: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 48726: 2279 0005 e0c2 moveal 5e0c2 <_Scheduler+0x4>,%a1 4872c: 4ed1 jmp %a1@ ... =============================================================================== 0004874c <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 4874c: 4e56 0000 linkw %fp,#0 48750: 206e 0008 moveal %fp@(8),%a0 48754: 2f0b movel %a3,%sp@- 48756: 2f0a movel %a2,%sp@- ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 48758: 2468 008a moveal %a0@(138),%a2 ready = sched_info->ready_chain; 4875c: 2252 moveal %a2@,%a1 if ( _Chain_Has_only_one_node( ready ) ) { 4875e: 2029 0008 movel %a1@(8),%d0 48762: b091 cmpl %a1@,%d0 48764: 6700 0088 beqw 487ee <_Scheduler_priority_Block+0xa2> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48768: 2450 moveal %a0@,%a2 previous = the_node->previous; 4876a: 2268 0004 moveal %a0@(4),%a1 next->previous = previous; 4876e: 2549 0004 movel %a1,%a2@(4) previous->next = next; 48772: 228a movel %a2,%a1@ _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 48774: b1f9 0005 fad0 cmpal 5fad0 <_Per_CPU_Information+0x10>,%a0 4877a: 6720 beqs 4879c <_Scheduler_priority_Block+0x50> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 4877c: b1f9 0005 facc cmpal 5facc <_Per_CPU_Information+0xc>,%a0 48782: 6708 beqs 4878c <_Scheduler_priority_Block+0x40> _Thread_Dispatch_necessary = true; } 48784: 245f moveal %sp@+,%a2 48786: 265f moveal %sp@+,%a3 48788: 4e5e unlk %fp 4878a: 4e75 rts 4878c: 245f moveal %sp@+,%a2 if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 4878e: 7001 moveq #1,%d0 } 48790: 265f moveal %sp@+,%a3 48792: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 48794: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> } 4879a: 4e75 rts RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 4879c: 3039 0005 fae4 movew 5fae4 <_Priority_Major_bit_map>,%d0 487a2: 4840 swap %d0 487a4: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 487a6: 43f9 0005 fae8 lea 5fae8 <_Priority_Bit_map>,%a1 487ac: 0280 0000 ffff andil #65535,%d0 487b2: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1 487b6: 4841 swap %d1 487b8: 04c1 ff1 %d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 487ba: 2279 0005 e0be moveal 5e0be <_Scheduler>,%a1 return (_Priority_Bits_index( major ) << 4) + 487c0: 0281 0000 ffff andil #65535,%d1 487c6: e988 lsll #4,%d0 487c8: d081 addl %d1,%d0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 487ca: 2200 movel %d0,%d1 487cc: e988 lsll #4,%d0 487ce: e589 lsll #2,%d1 487d0: 9081 subl %d1,%d0 487d2: d3c0 addal %d0,%a1 487d4: 2019 movel %a1@+,%d0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 487d6: b3c0 cmpal %d0,%a1 487d8: 56c1 sne %d1 487da: 49c1 extbl %d1 * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 487dc: c081 andl %d1,%d0 487de: 23c0 0005 fad0 movel %d0,5fad0 <_Per_CPU_Information+0x10> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 487e4: b1f9 0005 facc cmpal 5facc <_Per_CPU_Information+0xc>,%a0 487ea: 6698 bnes 48784 <_Scheduler_priority_Block+0x38> 487ec: 609e bras 4878c <_Scheduler_priority_Block+0x40> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 487ee: 266a 0004 moveal %a2@(4),%a3 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 487f2: 2009 movel %a1,%d0 487f4: 5880 addql #4,%d0 487f6: 2280 movel %d0,%a1@ 487f8: 3213 movew %a3@,%d1 487fa: 302a 000e movew %a2@(14),%d0 head->next = tail; head->previous = NULL; 487fe: 42a9 0004 clrl %a1@(4) 48802: c081 andl %d1,%d0 tail->previous = head; 48804: 2349 0008 movel %a1,%a1@(8) 48808: 3680 movew %d0,%a3@ if ( *the_priority_map->minor == 0 ) 4880a: 6600 ff68 bnew 48774 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; 4880e: 3239 0005 fae4 movew 5fae4 <_Priority_Major_bit_map>,%d1 48814: 302a 000c movew %a2@(12),%d0 48818: c081 andl %d1,%d0 4881a: 33c0 0005 fae4 movew %d0,5fae4 <_Priority_Major_bit_map> { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 48820: b1f9 0005 fad0 cmpal 5fad0 <_Per_CPU_Information+0x10>,%a0 48826: 6600 ff54 bnew 4877c <_Scheduler_priority_Block+0x30> 4882a: 6000 ff70 braw 4879c <_Scheduler_priority_Block+0x50> ... =============================================================================== 00048924 <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 48924: 4e56 0000 linkw %fp,#0 48928: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 4892c: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 48932: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 48934: 4ef9 0004 a1da jmp 4a1da <_Workspace_Free> ... =============================================================================== 000490ec <_Scheduler_simple_Block>: #include void _Scheduler_simple_Block( Thread_Control *the_thread ) { 490ec: 4e56 0000 linkw %fp,#0 490f0: 2f02 movel %d2,%sp@- 490f2: 242e 0008 movel %fp@(8),%d2 _Scheduler_simple_Extract(the_thread); 490f6: 2f02 movel %d2,%sp@- 490f8: 4eb9 0004 9150 jsr 49150 <_Scheduler_simple_Extract> if ( _Thread_Is_heir( the_thread ) ) 490fe: 588f addql #4,%sp 49100: b4b9 0006 09f8 cmpl 609f8 <_Per_CPU_Information+0x10>,%d2 49106: 6720 beqs 49128 <_Scheduler_simple_Block+0x3c> _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 49108: b4b9 0006 09f4 cmpl 609f4 <_Per_CPU_Information+0xc>,%d2 4910e: 6708 beqs 49118 <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 49110: 242e fffc movel %fp@(-4),%d2 49114: 4e5e unlk %fp 49116: 4e75 rts 49118: 242e fffc movel %fp@(-4),%d2 4911c: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 4911e: 7001 moveq #1,%d0 49120: 13c0 0006 0a00 moveb %d0,60a00 <_Per_CPU_Information+0x18> } 49126: 4e75 rts ) { _Scheduler_simple_Extract(the_thread); if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); 49128: 4eb9 0004 9264 jsr 49264 <_Scheduler_simple_Schedule> if ( _Thread_Is_executing( the_thread ) ) 4912e: b4b9 0006 09f4 cmpl 609f4 <_Per_CPU_Information+0xc>,%d2 49134: 66da bnes 49110 <_Scheduler_simple_Block+0x24> <== NEVER TAKEN 49136: 60e0 bras 49118 <_Scheduler_simple_Block+0x2c> =============================================================================== 00047a38 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 47a38: 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() ); 47a3c: 2239 0005 dfe8 movel 5dfe8 ,%d1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 47a42: 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 ); 47a46: 240e movel %fp,%d2 47a48: 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() ); 47a4a: 263c 0000 03e8 movel #1000,%d3 47a50: 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 ); 47a54: 45f9 0004 9ba0 lea 49ba0 <_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; 47a5a: 2039 0005 fa38 movel 5fa38 <_Watchdog_Ticks_since_boot>,%d0 47a60: 5280 addql #1,%d0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47a62: 2f02 movel %d2,%sp@- 47a64: 4879 0005 f9b2 pea 5f9b2 <_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() ); 47a6a: 2d41 fffc movel %d1,%fp@(-4) 47a6e: 42ae fff8 clrl %fp@(-8) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 47a72: 23c0 0005 fa38 movel %d0,5fa38 <_Watchdog_Ticks_since_boot> /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47a78: 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 ); 47a7a: 2f02 movel %d2,%sp@- 47a7c: 4879 0005 f9c2 pea 5f9c2 <_TOD_Now> 47a82: 4e92 jsr %a2@ while ( seconds ) { 47a84: 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 ); 47a88: 2400 movel %d0,%d2 while ( seconds ) { 47a8a: 6716 beqs 47aa2 <_TOD_Tickle_ticks+0x6a> 47a8c: 45f9 0004 a0dc lea 4a0dc <_Watchdog_Tickle>,%a2 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 47a92: 4879 0005 f9e4 pea 5f9e4 <_Watchdog_Seconds_chain> _Watchdog_Tickle_seconds(); seconds--; 47a98: 5382 subql #1,%d2 47a9a: 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 ) { 47a9c: 588f addql #4,%sp 47a9e: 4a82 tstl %d2 47aa0: 66f0 bnes 47a92 <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 47aa2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47aa8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047754 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47754: 4e56 0000 linkw %fp,#0 47758: 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(); 4775c: 2039 0006 03f8 movel 603f8 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47762: 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) || 47764: 4a88 tstl %a0 47766: 6762 beqs 477ca <_TOD_Validate+0x76> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 47768: 243c 000f 4240 movel #1000000,%d2 4776e: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 47772: b4a8 0018 cmpl %a0@(24),%d2 47776: 6352 blss 477ca <_TOD_Validate+0x76> (the_tod->ticks >= ticks_per_second) || 47778: 703b moveq #59,%d0 4777a: b0a8 0014 cmpl %a0@(20),%d0 4777e: 654a bcss 477ca <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 47780: b0a8 0010 cmpl %a0@(16),%d0 47784: 6544 bcss 477ca <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 47786: 7217 moveq #23,%d1 47788: b2a8 000c cmpl %a0@(12),%d1 4778c: 653c bcss 477ca <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 4778e: 2028 0004 movel %a0@(4),%d0 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 47792: 6736 beqs 477ca <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month == 0) || 47794: 740c moveq #12,%d2 47796: b480 cmpl %d0,%d2 47798: 6530 bcss 477ca <_TOD_Validate+0x76> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 4779a: 2210 movel %a0@,%d1 (the_tod->ticks >= ticks_per_second) || (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) || 4779c: 0c81 0000 07c3 cmpil #1987,%d1 477a2: 6326 blss 477ca <_TOD_Validate+0x76> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 477a4: 2068 0008 moveal %a0@(8),%a0 (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) || 477a8: 4a88 tstl %a0 477aa: 671e beqs 477ca <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 477ac: 143c 0003 moveb #3,%d2 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 477b0: 43f9 0005 f638 lea 5f638 <_TOD_Days_per_month>,%a1 (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 ) 477b6: c282 andl %d2,%d1 477b8: 6618 bnes 477d2 <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 477ba: 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( 477be: b1c0 cmpal %d0,%a0 477c0: 53c0 sls %d0 477c2: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 477c4: 241f movel %sp@+,%d2 477c6: 4e5e unlk %fp 477c8: 4e75 rts 477ca: 241f movel %sp@+,%d2 477cc: 4e5e unlk %fp (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) ) return false; 477ce: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 477d0: 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 ]; 477d2: 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( 477d6: b1c0 cmpal %d0,%a0 477d8: 53c0 sls %d0 477da: 4480 negl %d0 477dc: 60e6 bras 477c4 <_TOD_Validate+0x70> ... =============================================================================== 00048c54 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48c54: 4e56 fff0 linkw %fp,#-16 48c58: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48c5c: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 48c60: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48c64: 242e 000c movel %fp@(12),%d2 /* * 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 ); 48c68: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48c6a: 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 ); 48c6e: 4eb9 0004 9a24 jsr 49a24 <_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 ) 48c74: 588f addql #4,%sp 48c76: b4aa 0014 cmpl %a2@(20),%d2 48c7a: 670c beqs 48c88 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 48c7c: 2f02 movel %d2,%sp@- 48c7e: 2f0a movel %a2,%sp@- 48c80: 4eb9 0004 99c0 jsr 499c0 <_Thread_Set_priority> 48c86: 508f addql #8,%sp _ISR_Disable( level ); 48c88: 203c 0000 0700 movel #1792,%d0 48c8e: 40c2 movew %sr,%d2 48c90: 8082 orl %d2,%d0 48c92: 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; 48c94: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 48c98: 7204 moveq #4,%d1 48c9a: b280 cmpl %d0,%d1 48c9c: 6738 beqs 48cd6 <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 48c9e: 44c3 movew %d3,%ccr 48ca0: 6708 beqs 48caa <_Thread_Change_priority+0x56> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 48ca2: 72fb moveq #-5,%d1 48ca4: c280 andl %d0,%d1 48ca6: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 48caa: 46c2 movew %d2,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 48cac: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 48cb2: 660a bnes 48cbe <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 48cb4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48cba: 4e5e unlk %fp 48cbc: 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 ); 48cbe: 2d4a 000c movel %a2,%fp@(12) 48cc2: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 48cc8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48cce: 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 ); 48cd0: 4ef9 0004 9910 jmp 49910 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 48cd6: 44c3 movew %d3,%ccr 48cd8: 6714 beqs 48cee <_Thread_Change_priority+0x9a> <== NEVER TAKEN * 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 ); 48cda: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 48cde: 4a04 tstb %d4 48ce0: 6748 beqs 48d2a <_Thread_Change_priority+0xd6> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 48ce2: 2f0a movel %a2,%sp@- 48ce4: 2079 0005 e0e6 moveal 5e0e6 <_Scheduler+0x28>,%a0 48cea: 4e90 jsr %a0@ 48cec: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 48cee: 203c 0000 0700 movel #1792,%d0 48cf4: 46c2 movew %d2,%sr 48cf6: 8082 orl %d2,%d0 48cf8: 46c0 movew %d0,%sr * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 48cfa: 2079 0005 e0c6 moveal 5e0c6 <_Scheduler+0x8>,%a0 48d00: 4e90 jsr %a0@ * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 48d02: 2079 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a0 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 48d08: b1f9 0005 fad0 cmpal 5fad0 <_Per_CPU_Information+0x10>,%a0 48d0e: 670e beqs 48d1e <_Thread_Change_priority+0xca> 48d10: 4a28 0074 tstb %a0@(116) 48d14: 6708 beqs 48d1e <_Thread_Change_priority+0xca> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 48d16: 7001 moveq #1,%d0 48d18: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 48d1e: 46c2 movew %d2,%sr } 48d20: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48d26: 4e5e unlk %fp 48d28: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 48d2a: 2f0a movel %a2,%sp@- 48d2c: 2079 0005 e0e2 moveal 5e0e2 <_Scheduler+0x24>,%a0 48d32: 4e90 jsr %a0@ 48d34: 588f addql #4,%sp 48d36: 60b6 bras 48cee <_Thread_Change_priority+0x9a> =============================================================================== 00048d94 <_Thread_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48d94: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 48d96: 4e56 0000 linkw %fp,#0 48d9a: 2f0b movel %a3,%sp@- 48d9c: 266e 0008 moveal %fp@(8),%a3 48da0: 2f0a movel %a2,%sp@- 48da2: 246e 000c moveal %fp@(12),%a2 48da6: 206b 0018 moveal %a3@(24),%a0 48daa: 302a 000a movew %a2@(10),%d0 48dae: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 48db2: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48db8: 5380 subql #1,%d0 48dba: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48dc0: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 48dc6: 2f0a movel %a2,%sp@- 48dc8: 4eb9 0004 9e28 jsr 49e28 <_User_extensions_Thread_delete> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 48dce: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48dd4: 5280 addql #1,%d0 48dd6: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48ddc: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 /* * 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 ); 48de2: 2f0a movel %a2,%sp@- 48de4: 2f0b movel %a3,%sp@- 48de6: 4eb9 0004 7fc4 jsr 47fc4 <_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 ); 48dec: 4878 0001 pea 1 48df0: 2f0a movel %a2,%sp@- 48df2: 4eb9 0004 99d8 jsr 499d8 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 48df8: 2f0a movel %a2,%sp@- 48dfa: 4eb9 0004 981c jsr 4981c <_Thread_queue_Extract_with_proxy> 48e00: 4fef 0018 lea %sp@(24),%sp 48e04: 4a00 tstb %d0 48e06: 660a bnes 48e12 <_Thread_Close+0x7e> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 48e08: 7002 moveq #2,%d0 48e0a: b0aa 0050 cmpl %a2@(80),%d0 48e0e: 6700 0088 beqw 48e98 <_Thread_Close+0x104> */ RTEMS_INLINE_ROUTINE void _Scheduler_Free( Thread_Control *the_thread ) { return _Scheduler.Operations.free( the_thread ); 48e12: 2f0a movel %a2,%sp@- 48e14: 2079 0005 e0da moveal 5e0da <_Scheduler+0x1c>,%a0 48e1a: 4e90 jsr %a0@ /* * 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 ) ) 48e1c: 588f addql #4,%sp 48e1e: b5f9 0005 f9ba cmpal 5f9ba <_Thread_Allocated_fp>,%a2 48e24: 6736 beqs 48e5c <_Thread_Close+0xc8> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48e26: 2f2a 00b8 movel %a2@(184),%sp@- 48e2a: 47f9 0004 a1da lea 4a1da <_Workspace_Free>,%a3 #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; 48e30: 42aa 00f4 clrl %a2@(244) _Workspace_Free( the_thread->Start.fp_context ); 48e34: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48e36: 2f0a movel %a2,%sp@- 48e38: 4eb9 0004 9ad0 jsr 49ad0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48e3e: 2f2a 0104 movel %a2@(260),%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; 48e42: 42aa 00bc clrl %a2@(188) _Workspace_Free( the_thread->extensions ); 48e46: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48e48: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48e4c: 4fef 000c lea %sp@(12),%sp 48e50: 42aa 0104 clrl %a2@(260) } 48e54: 246e fff8 moveal %fp@(-8),%a2 48e58: 4e5e unlk %fp 48e5a: 4e75 rts if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48e5c: 2f2a 00b8 movel %a2@(184),%sp@- 48e60: 47f9 0004 a1da lea 4a1da <_Workspace_Free>,%a3 #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; 48e66: 42aa 00f4 clrl %a2@(244) */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 48e6a: 42b9 0005 f9ba clrl 5f9ba <_Thread_Allocated_fp> _Workspace_Free( the_thread->Start.fp_context ); 48e70: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48e72: 2f0a movel %a2,%sp@- 48e74: 4eb9 0004 9ad0 jsr 49ad0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48e7a: 2f2a 0104 movel %a2@(260),%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; 48e7e: 42aa 00bc clrl %a2@(188) _Workspace_Free( the_thread->extensions ); 48e82: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48e84: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48e88: 4fef 000c lea %sp@(12),%sp 48e8c: 42aa 0104 clrl %a2@(260) } 48e90: 246e fff8 moveal %fp@(-8),%a2 48e94: 4e5e unlk %fp 48e96: 4e75 rts */ _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 ); 48e98: 486a 0048 pea %a2@(72) 48e9c: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 48ea2: 588f addql #4,%sp 48ea4: 2079 0005 e0da moveal 5e0da <_Scheduler+0x1c>,%a0 48eaa: 2f0a movel %a2,%sp@- 48eac: 4e90 jsr %a0@ /* * 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 ) ) 48eae: 588f addql #4,%sp 48eb0: b5f9 0005 f9ba cmpal 5f9ba <_Thread_Allocated_fp>,%a2 48eb6: 6600 ff6e bnew 48e26 <_Thread_Close+0x92> 48eba: 60a0 bras 48e5c <_Thread_Close+0xc8> <== NOT EXECUTED =============================================================================== 00048f74 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 48f74: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48f78: 486e fffc pea %fp@(-4) 48f7c: 2f2e 0008 movel %fp@(8),%sp@- 48f80: 4eb9 0004 915c jsr 4915c <_Thread_Get> switch ( location ) { 48f86: 508f addql #8,%sp 48f88: 4aae fffc tstl %fp@(-4) 48f8c: 6624 bnes 48fb2 <_Thread_Delay_ended+0x3e> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 48f8e: 2f3c 1000 0018 movel #268435480,%sp@- 48f94: 2f00 movel %d0,%sp@- 48f96: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 48f9c: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 48f9e: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48fa4: 5380 subql #1,%d0 48fa6: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48fac: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 48fb2: 4e5e unlk %fp ... =============================================================================== 00048fb8 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 48fb8: 4e56 ffc8 linkw %fp,#-56 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 48fbc: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48fc2: 5280 addql #1,%d0 48fc4: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48fca: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48fd0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); 48fd4: 283c 0000 0700 movel #1792,%d4 48fda: 2004 movel %d4,%d0 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 48fdc: 2479 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 48fe2: 40c1 movew %sr,%d1 48fe4: 8081 orl %d1,%d0 48fe6: 46c0 movew %d0,%sr while ( _Thread_Dispatch_necessary == true ) { 48fe8: 1039 0005 fad8 moveb 5fad8 <_Per_CPU_Information+0x18>,%d0 48fee: 6700 0110 beqw 49100 <_Thread_Dispatch+0x148> heir = _Thread_Heir; 48ff2: 2679 0005 fad0 moveal 5fad0 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 48ff8: 4200 clrb %d0 _Thread_Executing = heir; 48ffa: 23cb 0005 facc movel %a3,5facc <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 49000: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 49006: b7ca cmpal %a2,%a3 49008: 6700 00f6 beqw 49100 <_Thread_Dispatch+0x148> 4900c: 260e movel %fp,%d3 4900e: 240e movel %fp,%d2 49010: 0683 ffff fff0 addil #-16,%d3 49016: 2e3c 0004 c3b4 movel #312244,%d7 4901c: 5182 subql #8,%d2 4901e: 2c3c 0004 9be8 movel #302056,%d6 49024: 2a3c 0004 9ba0 movel #301984,%d5 4902a: 4bf9 0004 9eb4 lea 49eb4 <_User_extensions_Thread_switch>,%a5 49030: 49f9 0004 a228 lea 4a228 <_CPU_Context_switch>,%a4 */ #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 ) 49036: 7001 moveq #1,%d0 49038: b0ab 007a cmpl %a3@(122),%d0 4903c: 6700 00e8 beqw 49126 <_Thread_Dispatch+0x16e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 49040: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 49042: 2f03 movel %d3,%sp@- 49044: 2047 moveal %d7,%a0 49046: 4e90 jsr %a0@ _Timestamp_Subtract( 49048: 2046 moveal %d6,%a0 4904a: 2f02 movel %d2,%sp@- 4904c: 2f03 movel %d3,%sp@- 4904e: 4879 0005 fada pea 5fada <_Per_CPU_Information+0x1a> 49054: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 49056: 2045 moveal %d5,%a0 49058: 2f02 movel %d2,%sp@- 4905a: 486a 0082 pea %a2@(130) 4905e: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49060: 2079 0005 f9be moveal 5f9be <_Thread_libc_reent>,%a0 49066: 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; 4906a: 202e fff0 movel %fp@(-16),%d0 4906e: 222e fff4 movel %fp@(-12),%d1 49072: 23c0 0005 fada movel %d0,5fada <_Per_CPU_Information+0x1a> 49078: 23c1 0005 fade movel %d1,5fade <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 4907e: 4a88 tstl %a0 49080: 6708 beqs 4908a <_Thread_Dispatch+0xd2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 49082: 2550 00f8 movel %a0@,%a2@(248) *_Thread_libc_reent = heir->libc_reent; 49086: 20ab 00f8 movel %a3@(248),%a0@ } _User_extensions_Thread_switch( executing, heir ); 4908a: 2f0b movel %a3,%sp@- 4908c: 2f0a movel %a2,%sp@- 4908e: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 49090: 486b 00c0 pea %a3@(192) 49094: 486a 00c0 pea %a2@(192) 49098: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4909a: 4fef 0010 lea %sp@(16),%sp 4909e: 4aaa 00f4 tstl %a2@(244) 490a2: 672c beqs 490d0 <_Thread_Dispatch+0x118> #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 ); 490a4: 2079 0005 f9ba moveal 5f9ba <_Thread_Allocated_fp>,%a0 490aa: b1ca cmpal %a2,%a0 490ac: 6722 beqs 490d0 <_Thread_Dispatch+0x118> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 490ae: 4a88 tstl %a0 490b0: 670c beqs 490be <_Thread_Dispatch+0x106> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 490b2: 4868 00f4 pea %a0@(244) 490b6: 4eb9 0004 a358 jsr 4a358 <_CPU_Context_save_fp> 490bc: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 490be: 486a 00f4 pea %a2@(244) 490c2: 4eb9 0004 a390 jsr 4a390 <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 490c8: 588f addql #4,%sp 490ca: 23ca 0005 f9ba movel %a2,5f9ba <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 490d0: 2479 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 490d6: 2004 movel %d4,%d0 490d8: 40c1 movew %sr,%d1 490da: 8081 orl %d1,%d0 490dc: 46c0 movew %d0,%sr /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 490de: 1039 0005 fad8 moveb 5fad8 <_Per_CPU_Information+0x18>,%d0 490e4: 671a beqs 49100 <_Thread_Dispatch+0x148> heir = _Thread_Heir; 490e6: 2679 0005 fad0 moveal 5fad0 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 490ec: 4200 clrb %d0 _Thread_Executing = heir; 490ee: 23cb 0005 facc movel %a3,5facc <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 490f4: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 490fa: b5cb cmpal %a3,%a2 490fc: 6600 ff38 bnew 49036 <_Thread_Dispatch+0x7e> _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 49100: 46c1 movew %d1,%sr * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 49102: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 49108: 5380 subql #1,%d0 4910a: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 49110: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 49116: 4eb9 0004 73ea jsr 473ea <_API_extensions_Run_postswitch> } 4911c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 49122: 4e5e unlk %fp 49124: 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; 49126: 41f9 0005 f8f0 lea 5f8f0 <_Thread_Ticks_per_timeslice>,%a0 4912c: 2750 0076 movel %a0@,%a3@(118) 49130: 6000 ff0e braw 49040 <_Thread_Dispatch+0x88> =============================================================================== 00049134 <_Thread_Enable_dispatch>: * dispatch thread * no dispatch thread */ #if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ ) void _Thread_Enable_dispatch( void ) { 49134: 4e56 0000 linkw %fp,#0 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 49138: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 4913e: 5380 subql #1,%d0 49140: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 49146: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 if ( _Thread_Dispatch_decrement_disable_level() ) 4914c: 6704 beqs 49152 <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 4914e: 4e5e unlk %fp 49150: 4e75 rts 49152: 4e5e unlk %fp #if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ ) void _Thread_Enable_dispatch( void ) { if ( _Thread_Dispatch_decrement_disable_level() ) return; _Thread_Dispatch(); 49154: 4ef9 0004 8fb8 jmp 48fb8 <_Thread_Dispatch> ... =============================================================================== 0004debc <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4debc: 4e56 0000 linkw %fp,#0 4dec0: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4dec2: 2479 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a2 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4dec8: 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; 4deca: 222a 00a8 movel %a2@(168),%d1 _ISR_Set_level(level); 4dece: 40c0 movew %sr,%d0 4ded0: e189 lsll #8,%d1 4ded2: 0280 0000 f8ff andil #63743,%d0 4ded8: 8081 orl %d1,%d0 4deda: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4dedc: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4dede: 1439 0005 f0fc moveb 5f0fc ,%d2 doneConstructors = true; 4dee4: 13c0 0005 f0fc moveb %d0,5f0fc #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4deea: 4aaa 00f4 tstl %a2@(244) 4deee: 6720 beqs 4df10 <_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 ); 4def0: 2079 0005 f9ba moveal 5f9ba <_Thread_Allocated_fp>,%a0 4def6: b1ca cmpal %a2,%a0 4def8: 6716 beqs 4df10 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4defa: 4a88 tstl %a0 4defc: 670c beqs 4df0a <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4defe: 4868 00f4 pea %a0@(244) 4df02: 4eb9 0004 a358 jsr 4a358 <_CPU_Context_save_fp> 4df08: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4df0a: 23ca 0005 f9ba movel %a2,5f9ba <_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 ); 4df10: 2f0a movel %a2,%sp@- 4df12: 4eb9 0004 9d00 jsr 49d00 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4df18: 4eb9 0004 9134 jsr 49134 <_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 (doCons) /* && (volatile void *)_init) */ { 4df1e: 588f addql #4,%sp 4df20: 4a02 tstb %d2 4df22: 6746 beqs 4df6a <_Thread_Handler+0xae> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4df24: 4aaa 0092 tstl %a2@(146) 4df28: 6718 beqs 4df42 <_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 ); 4df2a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4df2c: 4eb9 0004 9d3e jsr 49d3e <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4df32: 4878 0005 pea 5 <== NOT EXECUTED 4df36: 4878 0001 pea 1 <== NOT EXECUTED 4df3a: 42a7 clrl %sp@- <== NOT EXECUTED 4df3c: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4df42: 2f2a 009a movel %a2@(154),%sp@- 4df46: 206a 008e moveal %a2@(142),%a0 4df4a: 4e90 jsr %a0@ #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4df4c: 588f addql #4,%sp 4df4e: 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 ); 4df52: 2f0a movel %a2,%sp@- 4df54: 4eb9 0004 9d3e jsr 49d3e <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4df5a: 4878 0005 pea 5 4df5e: 4878 0001 pea 1 4df62: 42a7 clrl %sp@- 4df64: 4eb9 0004 7e70 jsr 47e70 <_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 (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4df6a: 4eb9 0005 c280 jsr 5c280 <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4df70: 4aaa 0092 tstl %a2@(146) 4df74: 66b4 bnes 4df2a <_Thread_Handler+0x6e> <== NEVER TAKEN 4df76: 60ca bras 4df42 <_Thread_Handler+0x86> =============================================================================== 00049400 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 49400: 4e56 0000 linkw %fp,#0 /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) 49404: 4ab9 0005 e000 tstl 5e000 4940a: 57c1 seq %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 4940c: 4ab9 0005 dffc tstl 5dffc 49412: 57c0 seq %d0 == (!Configuration.stack_free_hook) ) ) 49414: 4481 negl %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 49416: 4480 negl %d0 49418: b380 eorl %d1,%d0 uint32_t maximum_internal_threads; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 4941a: 2239 0005 dfec movel 5dfec ,%d1 maximum_extensions = Configuration.maximum_extensions; 49420: 2079 0005 dfe4 moveal 5dfe4 ,%a0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 49426: 4a00 tstb %d0 49428: 6650 bnes 4947a <_Thread_Handler_initialization+0x7a> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4942a: 4878 0008 pea 8 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 4942e: 4200 clrb %d0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49430: 42a7 clrl %sp@- 49432: 4878 010c pea 10c 49436: 4878 0001 pea 1 4943a: 4878 0001 pea 1 4943e: 4878 0001 pea 1 49442: 4879 0005 fa40 pea 5fa40 <_Thread_Internal_information> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 49448: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> _Thread_Executing = NULL; 4944e: 42b9 0005 facc clrl 5facc <_Per_CPU_Information+0xc> _Thread_Heir = NULL; 49454: 42b9 0005 fad0 clrl 5fad0 <_Per_CPU_Information+0x10> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 4945a: 42b9 0005 f9ba clrl 5f9ba <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 49460: 23c8 0005 f9ca movel %a0,5f9ca <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 49466: 23c1 0005 f8f0 movel %d1,5f8f0 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4946c: 4eb9 0004 846c jsr 4846c <_Objects_Initialize_information> 49472: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49476: 4e5e unlk %fp 49478: 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( 4947a: 4878 000e pea e 4947e: 4878 0001 pea 1 49482: 42a7 clrl %sp@- 49484: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> ... =============================================================================== 0004d3bc <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4d3bc: 4e56 0000 linkw %fp,#0 4d3c0: 2f0a movel %a2,%sp@- 4d3c2: 246e 0008 moveal %fp@(8),%a2 the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4d3c6: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4d3cc: 256a 00a4 007e movel %a2@(164),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4d3d2: 256e 000c 0096 movel %fp@(12),%a2@(150) the_thread->Start.numeric_argument = numeric_argument; 4d3d8: 256e 0010 009a movel %fp@(16),%a2@(154) void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4d3de: 156a 009e 0074 moveb %a2@(158),%a2@(116) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4d3e4: 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 ) ) { 4d3e8: 2f0a movel %a2,%sp@- 4d3ea: 4eb9 0004 a0d4 jsr 4a0d4 <_Thread_queue_Extract_with_proxy> 4d3f0: 588f addql #4,%sp 4d3f2: 4a00 tstb %d0 4d3f4: 6608 bnes 4d3fe <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4d3f6: 7002 moveq #2,%d0 4d3f8: b0aa 0050 cmpl %a2@(80),%d0 4d3fc: 672a beqs 4d428 <_Thread_Reset+0x6c> <== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4d3fe: 202a 00ac movel %a2@(172),%d0 4d402: b0aa 0014 cmpl %a2@(20),%d0 4d406: 6718 beqs 4d420 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; 4d408: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d40c: 2d4a 0008 movel %a2,%fp@(8) } } 4d410: 246e fffc moveal %fp@(-4),%a2 (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 ); 4d414: 2d40 000c movel %d0,%fp@(12) } } 4d418: 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 ); 4d41a: 4ef9 0004 a308 jmp 4a308 <_Thread_Set_priority> } } 4d420: 246e fffc moveal %fp@(-4),%a2 4d424: 4e5e unlk %fp 4d426: 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 ); 4d428: 486a 0048 pea %a2@(72) 4d42c: 4eb9 0004 a9c8 jsr 4a9c8 <_Watchdog_Remove> 4d432: 588f addql #4,%sp 4d434: 60c8 bras 4d3fe <_Thread_Reset+0x42> ... =============================================================================== 0004a278 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4a278: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4a27a: 4e56 0000 linkw %fp,#0 4a27e: 2f0a movel %a2,%sp@- 4a280: 246e 0008 moveal %fp@(8),%a2 4a284: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4a288: 670a beqs 4a294 <_Thread_Restart+0x1c> return true; } return false; } 4a28a: 246e fffc moveal %fp@(-4),%a2 4a28e: 4e5e unlk %fp _Thread_Restart_self(); return true; } return false; 4a290: 4200 clrb %d0 } 4a292: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4a294: 2f0a movel %a2,%sp@- 4a296: 4eb9 0004 a36c jsr 4a36c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4a29c: 2f2e 0010 movel %fp@(16),%sp@- 4a2a0: 2f2e 000c movel %fp@(12),%sp@- 4a2a4: 2f0a movel %a2,%sp@- 4a2a6: 4eb9 0004 d3bc jsr 4d3bc <_Thread_Reset> _Thread_Load_environment( the_thread ); 4a2ac: 2f0a movel %a2,%sp@- 4a2ae: 4eb9 0004 d0c4 jsr 4d0c4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 4a2b4: 2f0a movel %a2,%sp@- 4a2b6: 4eb9 0004 d38c jsr 4d38c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 4a2bc: 2f0a movel %a2,%sp@- 4a2be: 4eb9 0004 a7b8 jsr 4a7b8 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 4a2c4: 4fef 001c lea %sp@(28),%sp 4a2c8: b5f9 0006 06a4 cmpal 606a4 <_Per_CPU_Information+0xc>,%a2 4a2ce: 670a beqs 4a2da <_Thread_Restart+0x62> return true; } return false; } 4a2d0: 246e fffc moveal %fp@(-4),%a2 4a2d4: 4e5e unlk %fp _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a2d6: 7001 moveq #1,%d0 } return false; } 4a2d8: 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 ) 4a2da: 4aaa 00f4 tstl %a2@(244) 4a2de: 6712 beqs 4a2f2 <_Thread_Restart+0x7a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4a2e0: 486a 00f4 pea %a2@(244) 4a2e4: 4eb9 0004 ad1c jsr 4ad1c <_CPU_Context_restore_fp> 4a2ea: 2479 0006 06a4 moveal 606a4 <_Per_CPU_Information+0xc>,%a2 4a2f0: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 4a2f2: 486a 00c0 pea %a2@(192) 4a2f6: 4eb9 0004 abca jsr 4abca <_CPU_Context_Restart_self> 4a2fc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a300: 588f addql #4,%sp <== NOT EXECUTED 4a302: 4e5e unlk %fp <== NOT EXECUTED _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a304: 7001 moveq #1,%d0 <== NOT EXECUTED } return false; } =============================================================================== 00048bec <_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 ) ) { 48bec: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 48bee: 4e56 0000 linkw %fp,#0 48bf2: 202e 0010 movel %fp@(16),%d0 48bf6: 2f0a movel %a2,%sp@- 48bf8: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 48bfc: 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 ) ) { 48c00: b2aa 0050 cmpl %a2@(80),%d1 48c04: 671c beqs 48c22 <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 48c06: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 48c08: 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 } 48c0c: 246e fffc moveal %fp@(-4),%a2 48c10: 203c 1003 fff8 movel #268697592,%d0 48c16: 2d40 000c movel %d0,%fp@(12) 48c1a: 4e5e unlk %fp 48c1c: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 48c22: 123c 0003 moveb #3,%d1 48c26: 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 ); 48c2a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 48c2c: 486a 0048 pea %a2@(72) 48c30: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 48c36: 588f addql #4,%sp 48c38: 203c 1003 fff8 movel #268697592,%d0 48c3e: 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 } 48c42: 246e fffc moveal %fp@(-4),%a2 48c46: 2d40 000c movel %d0,%fp@(12) 48c4a: 4e5e unlk %fp 48c4c: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ... =============================================================================== 00049508 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 49508: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4950e: 4e56 ffe8 linkw %fp,#-24 49512: 226e 0008 moveal %fp@(8),%a1 49516: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4951a: 40c3 movew %sr,%d3 4951c: 8083 orl %d3,%d0 4951e: 46c0 movew %d0,%sr for( index=0 ; 49520: 4280 clrl %d0 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 49522: 2400 movel %d0,%d2 49524: 2200 movel %d0,%d1 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 49526: 5280 addql #1,%d0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 49528: e58a lsll #2,%d2 4952a: e989 lsll #4,%d1 4952c: 9282 subl %d2,%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4952e: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 49532: 2458 moveal %a0@+,%a2 49534: b1ca cmpal %a2,%a0 49536: 6616 bnes 4954e <_Thread_queue_Dequeue_priority+0x46> Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 49538: 7204 moveq #4,%d1 4953a: b280 cmpl %d0,%d1 4953c: 66e4 bnes 49522 <_Thread_queue_Dequeue_priority+0x1a> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 4953e: 46c3 movew %d3,%sr return NULL; 49540: 95ca subal %a2,%a2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 49542: 200a movel %a2,%d0 49544: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4954a: 4e5e unlk %fp 4954c: 4e75 rts RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4954e: 200a movel %a2,%d0 49550: 0680 0000 003c addil #60,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49556: 206a 0038 moveal %a2@(56),%a0 dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4955a: 2252 moveal %a2@,%a1 previous_node = the_thread->Object.Node.previous; 4955c: 266a 0004 moveal %a2@(4),%a3 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 49560: 42aa 0044 clrl %a2@(68) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 49564: b088 cmpl %a0,%d0 49566: 6700 008a beqw 495f2 <_Thread_queue_Dequeue_priority+0xea> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4956a: 286a 0040 moveal %a2@(64),%a4 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4956e: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 49570: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 49574: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 49576: 214b 0004 movel %a3,%a0@(4) last_node = _Chain_Last( &the_thread->Wait.Block2n ); 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; 4957a: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4957c: 226a 0040 moveal %a2@(64),%a1 49580: b3ea 0038 cmpal %a2@(56),%a1 49584: 6716 beqs 4959c <_Thread_queue_Dequeue_priority+0x94> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 49586: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4958a: 43e8 003c lea %a0@(60),%a1 4958e: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 49590: 43e8 0038 lea %a0@(56),%a1 49594: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 49598: 214c 0040 movel %a4,%a0@(64) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4959c: 7002 moveq #2,%d0 4959e: b0aa 0050 cmpl %a2@(80),%d0 495a2: 671e beqs 495c2 <_Thread_queue_Dequeue_priority+0xba> _ISR_Enable( level ); 495a4: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 495a6: 2f3c 1003 fff8 movel #268697592,%sp@- 495ac: 2f0a movel %a2,%sp@- 495ae: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 495b4: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 495b6: 200a movel %a2,%d0 495b8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 495be: 4e5e unlk %fp 495c0: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 495c2: 7203 moveq #3,%d1 495c4: 2541 0050 movel %d1,%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 ); 495c8: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 495ca: 486a 0048 pea %a2@(72) 495ce: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 495d4: 2f3c 1003 fff8 movel #268697592,%sp@- 495da: 2f0a movel %a2,%sp@- 495dc: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 495e2: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 495e6: 200a movel %a2,%d0 495e8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 495ee: 4e5e unlk %fp 495f0: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 495f2: 2689 movel %a1,%a3@ next_node->previous = previous_node; 495f4: 234b 0004 movel %a3,%a1@(4) 495f8: 60a2 bras 4959c <_Thread_queue_Dequeue_priority+0x94> ... =============================================================================== 0004df78 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4df78: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4df7e: 4e56 0000 linkw %fp,#0 4df82: 2f0a movel %a2,%sp@- 4df84: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4df88: 40c1 movew %sr,%d1 4df8a: 8081 orl %d1,%d0 4df8c: 46c0 movew %d0,%sr 4df8e: 202a 0010 movel %a2@(16),%d0 4df92: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4df98: 6734 beqs 4dfce <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4df9a: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4df9c: 7002 moveq #2,%d0 previous = the_node->previous; 4df9e: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4dfa2: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4dfa6: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4dfa8: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4dfac: b0aa 0050 cmpl %a2@(80),%d0 4dfb0: 6726 beqs 4dfd8 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4dfb2: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4dfb4: 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 } 4dfb8: 246e fffc moveal %fp@(-4),%a2 4dfbc: 203c 1003 fff8 movel #268697592,%d0 4dfc2: 2d40 000c movel %d0,%fp@(12) 4dfc6: 4e5e unlk %fp 4dfc8: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4dfce: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4dfd0: 246e fffc moveal %fp@(-4),%a2 4dfd4: 4e5e unlk %fp 4dfd6: 4e75 rts 4dfd8: 7003 moveq #3,%d0 4dfda: 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 ); 4dfde: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4dfe0: 486a 0048 pea %a2@(72) 4dfe4: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 4dfea: 588f addql #4,%sp 4dfec: 203c 1003 fff8 movel #268697592,%d0 4dff2: 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 } 4dff6: 246e fffc moveal %fp@(-4),%a2 4dffa: 2d40 000c movel %d0,%fp@(12) 4dffe: 4e5e unlk %fp 4e000: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ... =============================================================================== 0004c8d4 <_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 ); 4c8d4: 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 ) { 4c8da: 4e56 ffec linkw %fp,#-20 4c8de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4c8e2: 246e 000c moveal %fp@(12),%a2 4c8e6: 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 ); 4c8ea: 40c1 movew %sr,%d1 4c8ec: 8081 orl %d1,%d0 4c8ee: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 4c8f0: 202a 0010 movel %a2@(16),%d0 4c8f4: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c8fa: 6772 beqs 4c96e <_Thread_queue_Extract_priority_helper+0x9a> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4c8fc: 200a movel %a2,%d0 4c8fe: 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; 4c904: 2252 moveal %a2@,%a1 previous_node = the_node->previous; 4c906: 266a 0004 moveal %a2@(4),%a3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4c90a: 206a 0038 moveal %a2@(56),%a0 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4c90e: b088 cmpl %a0,%d0 4c910: 6768 beqs 4c97a <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4c912: 286a 0040 moveal %a2@(64),%a4 new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4c916: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4c918: 2348 0004 movel %a0,%a1@(4) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4c91c: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4c91e: 214b 0004 movel %a3,%a0@(4) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4c922: 202a 0040 movel %a2@(64),%d0 last_node = _Chain_Last( &the_thread->Wait.Block2n ); 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; 4c926: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4c928: b0aa 0038 cmpl %a2@(56),%d0 4c92c: 6716 beqs 4c944 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4c92e: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4c932: 43e8 003c lea %a0@(60),%a1 4c936: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4c938: 43e8 0038 lea %a0@(56),%a1 4c93c: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4c940: 214c 0040 movel %a4,%a0@(64) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c944: 4a02 tstb %d2 4c946: 6626 bnes 4c96e <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c948: 7002 moveq #2,%d0 4c94a: b0aa 0050 cmpl %a2@(80),%d0 4c94e: 6736 beqs 4c986 <_Thread_queue_Extract_priority_helper+0xb2> _ISR_Enable( level ); 4c950: 46c1 movew %d1,%sr 4c952: 2d4a 0008 movel %a2,%fp@(8) 4c956: 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 } 4c95c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c962: 2d49 000c movel %a1,%fp@(12) 4c966: 4e5e unlk %fp 4c968: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4c96e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c970: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c976: 4e5e unlk %fp 4c978: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4c97a: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4c97c: 234b 0004 movel %a3,%a1@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c980: 4a02 tstb %d2 4c982: 67c4 beqs 4c948 <_Thread_queue_Extract_priority_helper+0x74> 4c984: 60e8 bras 4c96e <_Thread_queue_Extract_priority_helper+0x9a> 4c986: 7003 moveq #3,%d0 4c988: 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 ); 4c98c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c98e: 486a 0048 pea %a2@(72) 4c992: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 4c998: 588f addql #4,%sp 4c99a: 227c 1003 fff8 moveal #268697592,%a1 4c9a0: 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 } 4c9a4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c9aa: 2d49 000c movel %a1,%fp@(12) 4c9ae: 4e5e unlk %fp 4c9b0: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ... =============================================================================== 00049888 <_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 ) { 49888: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4988a: 4e56 0000 linkw %fp,#0 4988e: 206e 0008 moveal %fp@(8),%a0 49892: 2f02 movel %d2,%sp@- 49894: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; 49898: 216e 0010 0038 movel %fp@(16),%a0@(56) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 4989e: 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; 498a4: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 498a8: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 498ac: b280 cmpl %d0,%d1 498ae: 6714 beqs 498c4 <_Thread_queue_Initialize+0x3c> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498b0: 2008 movel %a0,%d0 498b2: 5880 addql #4,%d0 head->next = tail; head->previous = NULL; 498b4: 42a8 0004 clrl %a0@(4) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498b8: 2080 movel %d0,%a0@ head->next = tail; head->previous = NULL; tail->previous = head; 498ba: 2148 0008 movel %a0,%a0@(8) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 498be: 241f movel %sp@+,%d2 498c0: 4e5e unlk %fp 498c2: 4e75 rts 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 ) { 498c4: 4280 clrl %d0 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498c6: 2400 movel %d0,%d2 498c8: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 498ca: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498cc: e58a lsll #2,%d2 498ce: e989 lsll #4,%d1 498d0: 9282 subl %d2,%d1 498d2: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498d6: 2209 movel %a1,%d1 498d8: 5881 addql #4,%d1 498da: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 498dc: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 498de: 42a9 0004 clrl %a1@(4) tail->previous = head; 498e2: 2349 0008 movel %a1,%a1@(8) 498e6: b280 cmpl %d0,%d1 498e8: 67d4 beqs 498be <_Thread_queue_Initialize+0x36> <== NEVER TAKEN index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498ea: 2400 movel %d0,%d2 498ec: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 498ee: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498f0: e58a lsll #2,%d2 498f2: e989 lsll #4,%d1 498f4: 9282 subl %d2,%d1 498f6: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498fa: 2209 movel %a1,%d1 498fc: 5881 addql #4,%d1 498fe: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 49900: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 49902: 42a9 0004 clrl %a1@(4) tail->previous = head; 49906: 2349 0008 movel %a1,%a1@(8) 4990a: b280 cmpl %d0,%d1 4990c: 66b8 bnes 498c6 <_Thread_queue_Initialize+0x3e> 4990e: 60ae bras 498be <_Thread_queue_Initialize+0x36> =============================================================================== 00049910 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 49910: 4e56 fff0 linkw %fp,#-16 49914: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49918: 246e 0008 moveal %fp@(8),%a2 4991c: 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 ) 49920: 4a8a tstl %a2 49922: 6708 beqs 4992c <_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 ) { 49924: 7001 moveq #1,%d0 49926: b0aa 0034 cmpl %a2@(52),%d0 4992a: 670a beqs 49936 <_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 ); } } 4992c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 49932: 4e5e unlk %fp <== NOT EXECUTED 49934: 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 ); 49936: 303c 0700 movew #1792,%d0 4993a: 40c2 movew %sr,%d2 4993c: 8082 orl %d2,%d0 4993e: 46c0 movew %d0,%sr 49940: 202b 0010 movel %a3@(16),%d0 49944: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4994a: 660c bnes 49958 <_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 ); 4994c: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4994e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49954: 4e5e unlk %fp 49956: 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 ); 49958: 4878 0001 pea 1 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; 4995c: 7001 moveq #1,%d0 4995e: 2f0b movel %a3,%sp@- 49960: 2540 0030 movel %d0,%a2@(48) 49964: 2f0a movel %a2,%sp@- 49966: 4eb9 0004 c8d4 jsr 4c8d4 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4996c: 486e fffc pea %fp@(-4) 49970: 2f0b movel %a3,%sp@- 49972: 2f0a movel %a2,%sp@- 49974: 4eb9 0004 96a4 jsr 496a4 <_Thread_queue_Enqueue_priority> 4997a: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4997e: 46c2 movew %d2,%sr 49980: 60cc bras 4994e <_Thread_queue_Requeue+0x3e> ... =============================================================================== 00049984 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 49984: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49988: 486e fffc pea %fp@(-4) 4998c: 2f2e 0008 movel %fp@(8),%sp@- 49990: 4eb9 0004 915c jsr 4915c <_Thread_Get> switch ( location ) { 49996: 508f addql #8,%sp 49998: 4aae fffc tstl %fp@(-4) 4999c: 661e bnes 499bc <_Thread_queue_Timeout+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4999e: 2f00 movel %d0,%sp@- 499a0: 4eb9 0004 c9b8 jsr 4c9b8 <_Thread_queue_Process_timeout> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 499a6: 588f addql #4,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 499a8: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 499ae: 5380 subql #1,%d0 499b0: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 499b6: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); break; } } 499bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057684 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 57684: 4e56 ffb0 linkw %fp,#-80 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 57688: 41ee ffe8 lea %fp@(-24),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5768c: 200e movel %fp,%d0 5768e: 5180 subql #8,%d0 57690: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57694: 246e 0008 moveal %fp@(8),%a2 57698: 260e movel %fp,%d3 5769a: 2c0e movel %fp,%d6 5769c: 0683 ffff fff4 addil #-12,%d3 576a2: 0686 ffff ffec addil #-20,%d6 576a8: 240a movel %a2,%d2 576aa: 2a0a movel %a2,%d5 576ac: 4bf9 0005 badc lea 5badc <_Watchdog_Adjust_to_chain>,%a5 576b2: 0682 0000 0030 addil #48,%d2 576b8: 0685 0000 0068 addil #104,%d5 576be: 47f9 0005 8264 lea 58264 <_Chain_Get>,%a3 576c4: 49f9 0005 bb64 lea 5bb64 <_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 ); 576ca: 283c 0000 0700 movel #1792,%d4 head->previous = NULL; tail->previous = head; 576d0: 2d48 fff0 movel %a0,%fp@(-16) 576d4: 41ea 0008 lea %a2@(8),%a0 576d8: 2d48 ffe4 movel %a0,%fp@(-28) 576dc: 41ea 0040 lea %a2@(64),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 576e0: 2d40 fff4 movel %d0,%fp@(-12) head->previous = NULL; 576e4: 42ae ffec clrl %fp@(-20) 576e8: 42ae fff8 clrl %fp@(-8) tail->previous = head; 576ec: 2d43 fffc movel %d3,%fp@(-4) 576f0: 2d40 ffd8 movel %d0,%fp@(-40) 576f4: 2d48 ffe0 movel %a0,%fp@(-32) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 576f8: 2d46 ffe8 movel %d6,%fp@(-24) { /* * 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; 576fc: 41ee ffe8 lea %fp@(-24),%a0 57700: 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; 57704: 2039 0007 c5b4 movel 7c5b4 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 5770a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 5770e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57712: 9081 subl %d1,%d0 57714: 2f03 movel %d3,%sp@- 57716: 2f00 movel %d0,%sp@- 57718: 2f02 movel %d2,%sp@- 5771a: 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(); 5771c: 2039 0007 c53e movel 7c53e <_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 ) { 57722: 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; 57726: 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 ) { 5772a: b280 cmpl %d0,%d1 5772c: 6500 0086 bcsw 577b4 <_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 ) { 57730: b280 cmpl %d0,%d1 57732: 6200 00a4 bhiw 577d8 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 57736: 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 ); 5773a: 202a 0078 movel %a2@(120),%d0 5773e: 2f00 movel %d0,%sp@- 57740: 4e93 jsr %a3@ if ( timer == NULL ) { 57742: 588f addql #4,%sp 57744: 4a80 tstl %d0 57746: 672e beqs 57776 <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57748: 2040 moveal %d0,%a0 5774a: 7e01 moveq #1,%d7 5774c: 2228 0038 movel %a0@(56),%d1 57750: be81 cmpl %d1,%d7 57752: 6700 00a8 beqw 577fc <_Timer_server_Body+0x178> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57756: 7e03 moveq #3,%d7 57758: be81 cmpl %d1,%d7 5775a: 66de bnes 5773a <_Timer_server_Body+0xb6> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5775c: 2040 moveal %d0,%a0 5775e: 4868 0010 pea %a0@(16) 57762: 2f05 movel %d5,%sp@- 57764: 4e94 jsr %a4@ } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57766: 202a 0078 movel %a2@(120),%d0 ) { 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 ); 5776a: 508f addql #8,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5776c: 2f00 movel %d0,%sp@- 5776e: 4e93 jsr %a3@ if ( timer == NULL ) { 57770: 588f addql #4,%sp 57772: 4a80 tstl %d0 57774: 66d2 bnes 57748 <_Timer_server_Body+0xc4> <== NEVER TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 57776: 2004 movel %d4,%d0 57778: 40c1 movew %sr,%d1 5777a: 8081 orl %d1,%d0 5777c: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 5777e: bcae ffe8 cmpl %fp@(-24),%d6 57782: 6700 0086 beqw 5780a <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 57786: 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; 57788: 2039 0007 c5b4 movel 7c5b4 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 5778e: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 57792: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57796: 9081 subl %d1,%d0 <== NOT EXECUTED 57798: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5779a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5779c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5779e: 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(); 577a0: 2039 0007 c53e movel 7c53e <_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 ) { 577a6: 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; 577aa: 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 ) { 577ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 577b0: 6400 ff7e bccw 57730 <_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 ); 577b4: 2f03 movel %d3,%sp@- 577b6: 2e00 movel %d0,%d7 577b8: 9e81 subl %d1,%d7 577ba: 2f07 movel %d7,%sp@- 577bc: 2d40 ffdc movel %d0,%fp@(-36) 577c0: 2f05 movel %d5,%sp@- 577c2: 4eb9 0005 badc jsr 5badc <_Watchdog_Adjust_to_chain> 577c8: 202e ffdc movel %fp@(-36),%d0 577cc: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 577d0: 2540 0074 movel %d0,%a2@(116) 577d4: 6000 ff64 braw 5773a <_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 ); 577d8: 9280 subl %d0,%d1 577da: 2f01 movel %d1,%sp@- 577dc: 4878 0001 pea 1 577e0: 2d40 ffdc movel %d0,%fp@(-36) 577e4: 2f05 movel %d5,%sp@- 577e6: 4eb9 0005 ba48 jsr 5ba48 <_Watchdog_Adjust> 577ec: 202e ffdc movel %fp@(-36),%d0 577f0: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 577f4: 2540 0074 movel %d0,%a2@(116) 577f8: 6000 ff40 braw 5773a <_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 ); 577fc: 4868 0010 pea %a0@(16) 57800: 2f02 movel %d2,%sp@- 57802: 4e94 jsr %a4@ 57804: 508f addql #8,%sp 57806: 6000 ff32 braw 5773a <_Timer_server_Body+0xb6> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 5780a: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 5780e: 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 ) ) { 57810: 2e2e ffd8 movel %fp@(-40),%d7 57814: beae fff4 cmpl %fp@(-12),%d7 57818: 6752 beqs 5786c <_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 ); 5781a: 2204 movel %d4,%d1 5781c: 40c0 movew %sr,%d0 5781e: 8280 orl %d0,%d1 57820: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57822: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57826: b1ee ffd8 cmpal %fp@(-40),%a0 5782a: 6732 beqs 5785e <_Timer_server_Body+0x1da> <== NEVER TAKEN Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 5782c: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 5782e: 2343 0004 movel %d3,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 57832: 42a8 0008 clrl %a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 57836: 2d49 fff4 movel %a1,%fp@(-12) _ISR_Enable( level ); 5783a: 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 ); 5783c: 2f28 0024 movel %a0@(36),%sp@- 57840: 2f28 0020 movel %a0@(32),%sp@- 57844: 2068 001c moveal %a0@(28),%a0 57848: 4e90 jsr %a0@ } 5784a: 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 ); 5784c: 2204 movel %d4,%d1 5784e: 40c0 movew %sr,%d0 57850: 8280 orl %d0,%d1 57852: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57854: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57858: b1ee ffd8 cmpal %fp@(-40),%a0 5785c: 66ce bnes 5782c <_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 ); 5785e: 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; 57860: 41ee ffe8 lea %fp@(-24),%a0 57864: 2548 0078 movel %a0,%a2@(120) 57868: 6000 fe9a braw 57704 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 5786c: 4200 clrb %d0 5786e: 1540 007c moveb %d0,%a2@(124) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 57872: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 57878: 5280 addql #1,%d0 5787a: 23c0 0007 c4b4 movel %d0,7c4b4 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 57880: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 57886: 4878 0008 pea 8 5788a: 2f12 movel %a2@,%sp@- _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 5788c: 7e01 moveq #1,%d7 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 5788e: 4eb9 0005 b480 jsr 5b480 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 57894: 2f0a movel %a2,%sp@- 57896: 4eba fd14 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5789a: 2f0a movel %a2,%sp@- 5789c: 4eba fd78 jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 578a0: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> ts->active = true; 578a6: 1547 007c moveb %d7,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 578aa: 2f2e ffe4 movel %fp@(-28),%sp@- 578ae: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 578b4: 2f2e ffe0 movel %fp@(-32),%sp@- 578b8: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> 578be: 4fef 0018 lea %sp@(24),%sp 578c2: 6000 fe38 braw 576fc <_Timer_server_Body+0x78> =============================================================================== 000578c6 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 578c6: 4e56 fff0 linkw %fp,#-16 578ca: 206e 000c moveal %fp@(12),%a0 578ce: 48d7 041c moveml %d2-%d4/%a2,%sp@ 578d2: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 578d6: 202a 0078 movel %a2@(120),%d0 578da: 671a beqs 578f6 <_Timer_server_Schedule_operation_method+0x30> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 578dc: 202a 0078 movel %a2@(120),%d0 578e0: 2d48 000c movel %a0,%fp@(12) } } 578e4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 * 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 ); 578ea: 2d40 0008 movel %d0,%fp@(8) } } 578ee: 4e5e unlk %fp * 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 ); 578f0: 4ef9 0005 8204 jmp 58204 <_Chain_Append> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 578f6: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 578fc: 5280 addql #1,%d0 578fe: 23c0 0007 c4b4 movel %d0,7c4b4 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 57904: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 5790a: 2028 0038 movel %a0@(56),%d0 5790e: 7201 moveq #1,%d1 57910: b280 cmpl %d0,%d1 57912: 6700 008a beqw 5799e <_Timer_server_Schedule_operation_method+0xd8> _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 ) { 57916: 7803 moveq #3,%d4 57918: b880 cmpl %d0,%d4 5791a: 670e beqs 5792a <_Timer_server_Schedule_operation_method+0x64> * 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 ); } } 5791c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57922: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57924: 4ef9 0005 ab4c jmp 5ab4c <_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 ); 5792a: 203c 0000 0700 movel #1792,%d0 57930: 40c2 movew %sr,%d2 57932: 8082 orl %d2,%d0 57934: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 57936: 260a movel %a2,%d3 57938: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5793e: 2039 0007 c53e movel 7c53e <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 57944: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57948: 226a 0068 moveal %a2@(104),%a1 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 5794c: b689 cmpl %a1,%d3 5794e: 671c beqs 5796c <_Timer_server_Schedule_operation_method+0xa6> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 57950: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 57954: b280 cmpl %d0,%d1 57956: 6400 00ba bccw 57a12 <_Timer_server_Schedule_operation_method+0x14c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 5795a: 2800 movel %d0,%d4 5795c: 9881 subl %d1,%d4 if (delta_interval > delta) { 5795e: b883 cmpl %d3,%d4 57960: 6400 00bc bccw 57a1e <_Timer_server_Schedule_operation_method+0x158> delta_interval -= delta; 57964: 9684 subl %d4,%d3 57966: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57968: 2341 0010 movel %d1,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 5796c: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 57970: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57972: 4868 0010 pea %a0@(16) 57976: 486a 0068 pea %a2@(104) 5797a: 4eb9 0005 bb64 jsr 5bb64 <_Watchdog_Insert> if ( !ts->active ) { 57980: 508f addql #8,%sp 57982: 102a 007c moveb %a2@(124),%d0 57986: 6694 bnes 5791c <_Timer_server_Schedule_operation_method+0x56> _Timer_server_Reset_tod_system_watchdog( ts ); 57988: 2f0a movel %a2,%sp@- 5798a: 4eba fc8a jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>) 5798e: 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 ); } } 57990: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57996: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57998: 4ef9 0005 ab4c jmp 5ab4c <_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 ); 5799e: 203c 0000 0700 movel #1792,%d0 579a4: 40c3 movew %sr,%d3 579a6: 8083 orl %d3,%d0 579a8: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 579aa: 2039 0007 c5b4 movel 7c5b4 <_Watchdog_Ticks_since_boot>,%d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 579b0: 220a movel %a2,%d1 579b2: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 579b8: 282a 003c movel %a2@(60),%d4 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 579bc: 226a 0030 moveal %a2@(48),%a1 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 579c0: b289 cmpl %a1,%d1 579c2: 6712 beqs 579d6 <_Timer_server_Schedule_operation_method+0x110> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 579c4: 2200 movel %d0,%d1 579c6: 9284 subl %d4,%d1 delta_interval = first_watchdog->delta_interval; 579c8: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 579cc: b481 cmpl %d1,%d2 579ce: 633a blss 57a0a <_Timer_server_Schedule_operation_method+0x144> delta_interval -= delta; 579d0: 9481 subl %d1,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 579d2: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 579d6: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 579da: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 579dc: 4868 0010 pea %a0@(16) 579e0: 486a 0030 pea %a2@(48) 579e4: 4eb9 0005 bb64 jsr 5bb64 <_Watchdog_Insert> if ( !ts->active ) { 579ea: 508f addql #8,%sp 579ec: 102a 007c moveb %a2@(124),%d0 579f0: 6600 ff2a bnew 5791c <_Timer_server_Schedule_operation_method+0x56> _Timer_server_Reset_interval_system_watchdog( ts ); 579f4: 2f0a movel %a2,%sp@- 579f6: 4eba fbb4 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>) 579fa: 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 ); } } 579fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57a02: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57a04: 4ef9 0005 ab4c jmp 5ab4c <_Thread_Enable_dispatch> delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57a0a: 4282 clrl %d2 } first_watchdog->delta_interval = delta_interval; 57a0c: 2342 0010 movel %d2,%a1@(16) 57a10: 60c4 bras 579d6 <_Timer_server_Schedule_operation_method+0x110> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 57a12: d283 addl %d3,%d1 delta_interval += delta; 57a14: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 57a16: 2341 0010 movel %d1,%a1@(16) 57a1a: 6000 ff50 braw 5796c <_Timer_server_Schedule_operation_method+0xa6> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57a1e: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57a20: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED 57a24: 6000 ff46 braw 5796c <_Timer_server_Schedule_operation_method+0xa6><== NOT EXECUTED =============================================================================== 00049ba0 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 49ba0: 4e56 0000 linkw %fp,#0 49ba4: 226e 0008 moveal %fp@(8),%a1 49ba8: 2f0a movel %a2,%sp@- 49baa: 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; 49bae: 2069 0004 moveal %a1@(4),%a0 49bb2: d1ea 0004 addal %a2@(4),%a0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 49bb6: 2208 movel %a0,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 49bb8: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 49bba: d191 addl %d0,%a1@ time->tv_nsec += add->tv_nsec; 49bbc: 2348 0004 movel %a0,%a1@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 49bc0: b1fc 3b9a c9ff cmpal #999999999,%a0 49bc6: 631a blss 49be2 <_Timespec_Add_to+0x42> 49bc8: 2051 moveal %a1@,%a0 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 49bca: 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; 49bcc: 0681 c465 3600 addil #-1000000000,%d1 time->tv_sec++; seconds++; 49bd2: 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 ) { 49bd4: 0c81 3b9a c9ff cmpil #999999999,%d1 49bda: 62ee bhis 49bca <_Timespec_Add_to+0x2a> <== NEVER TAKEN 49bdc: 2341 0004 movel %d1,%a1@(4) 49be0: 2288 movel %a0,%a1@ time->tv_sec++; seconds++; } return seconds; } 49be2: 245f moveal %sp@+,%a2 49be4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049d7e <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49d7e: 4e56 fff0 linkw %fp,#-16 49d82: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49d86: 242e 0008 movel %fp@(8),%d2 49d8a: 262e 0010 movel %fp@(16),%d3 49d8e: 2479 0005 fa84 moveal 5fa84 <_User_extensions_List+0x8>,%a2 49d94: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49d98: b5fc 0005 fa7c cmpal #391804,%a2 49d9e: 6726 beqs 49dc6 <_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 ); 49da0: 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 ) 49da6: 206a 0030 moveal %a2@(48),%a0 49daa: 4a88 tstl %a0 49dac: 670c beqs 49dba <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49dae: 2f03 movel %d3,%sp@- 49db0: 2f04 movel %d4,%sp@- 49db2: 2f02 movel %d2,%sp@- 49db4: 4e90 jsr %a0@ 49db6: 4fef 000c lea %sp@(12),%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49dba: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49dbe: b5fc 0005 fa7c cmpal #391804,%a2 49dc4: 66e0 bnes 49da6 <_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 ); } } 49dc6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 49dcc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049c3c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 49c3c: 4e56 ffec linkw %fp,#-20 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 49c40: 203c 0005 fa80 movel #391808,%d0 49c46: 23c0 0005 fa7c movel %d0,5fa7c <_User_extensions_List> head->previous = NULL; tail->previous = head; 49c4c: 203c 0005 fa7c movel #391804,%d0 49c52: 23c0 0005 fa84 movel %d0,5fa84 <_User_extensions_List+0x8> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 49c58: 203c 0005 f940 movel #391488,%d0 49c5e: 23c0 0005 f93c movel %d0,5f93c <_User_extensions_Switches_list> head->previous = NULL; tail->previous = head; 49c64: 203c 0005 f93c movel #391484,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 49c6a: 42b9 0005 fa80 clrl 5fa80 <_User_extensions_List+0x4> 49c70: 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; 49c74: 2439 0005 e012 movel 5e012 ,%d2 initial_extensions = Configuration.User_extension_table; 49c7a: 2639 0005 e016 movel 5e016 ,%d3 49c80: 42b9 0005 f940 clrl 5f940 <_User_extensions_Switches_list+0x4> tail->previous = head; 49c86: 23c0 0005 f944 movel %d0,5f944 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 49c8c: 4a83 tstl %d3 49c8e: 6764 beqs 49cf4 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 49c90: 7834 moveq #52,%d4 49c92: 4c02 4800 mulsl %d2,%d4 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 49c96: 2f04 movel %d4,%sp@- 49c98: 4eb9 0004 a1f4 jsr 4a1f4 <_Workspace_Allocate_or_fatal_error> 49c9e: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 49ca0: 2f04 movel %d4,%sp@- 49ca2: 42a7 clrl %sp@- 49ca4: 2f00 movel %d0,%sp@- 49ca6: 4eb9 0004 e914 jsr 4e914 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49cac: 4fef 0010 lea %sp@(16),%sp 49cb0: 4a82 tstl %d2 49cb2: 6740 beqs 49cf4 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 49cb4: 4284 clrl %d4 49cb6: 47f9 0004 ca30 lea 4ca30 <_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; 49cbc: 2043 moveal %d3,%a0 49cbe: 5284 addql #1,%d4 49cc0: 0683 0000 0020 addil #32,%d3 49cc6: 2558 0014 movel %a0@+,%a2@(20) 49cca: 2558 0018 movel %a0@+,%a2@(24) 49cce: 2558 001c movel %a0@+,%a2@(28) 49cd2: 2558 0020 movel %a0@+,%a2@(32) 49cd6: 2558 0024 movel %a0@+,%a2@(36) 49cda: 2558 0028 movel %a0@+,%a2@(40) 49cde: 2558 002c movel %a0@+,%a2@(44) 49ce2: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 49ce6: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 49ce8: 45ea 0034 lea %a2@(52),%a2 49cec: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49cee: 588f addql #4,%sp 49cf0: b484 cmpl %d4,%d2 49cf2: 66c8 bnes 49cbc <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 49cf4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49cfa: 4e5e unlk %fp ... =============================================================================== 00049d00 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 49d00: 4e56 0000 linkw %fp,#0 49d04: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49d06: 2479 0005 fa7c moveal 5fa7c <_User_extensions_List>,%a2 49d0c: 2f02 movel %d2,%sp@- 49d0e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49d12: b5fc 0005 fa80 cmpal #391808,%a2 49d18: 6718 beqs 49d32 <_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 ) 49d1a: 206a 0028 moveal %a2@(40),%a0 49d1e: 4a88 tstl %a0 49d20: 6706 beqs 49d28 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 49d22: 2f02 movel %d2,%sp@- 49d24: 4e90 jsr %a0@ 49d26: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49d28: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49d2a: b5fc 0005 fa80 cmpal #391808,%a2 49d30: 66e8 bnes 49d1a <_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 ); } } 49d32: 242e fff8 movel %fp@(-8),%d2 49d36: 246e fffc moveal %fp@(-4),%a2 49d3a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049dd0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49dd0: 4e56 0000 linkw %fp,#0 49dd4: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49dd6: 2479 0005 fa7c moveal 5fa7c <_User_extensions_List>,%a2 49ddc: 2f02 movel %d2,%sp@- 49dde: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49de2: b5fc 0005 fa80 cmpal #391808,%a2 49de8: 6722 beqs 49e0c <_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 ) { 49dea: 206a 0014 moveal %a2@(20),%a0 49dee: 4a88 tstl %a0 49df0: 6710 beqs 49e02 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 49df2: 2f02 movel %d2,%sp@- 49df4: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 49dfa: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 49dfc: 508f addql #8,%sp 49dfe: 4a00 tstb %d0 49e00: 6718 beqs 49e1a <_User_extensions_Thread_create+0x4a> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49e02: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49e04: b5fc 0005 fa80 cmpal #391808,%a2 49e0a: 66de bnes 49dea <_User_extensions_Thread_create+0x1a> return false; } } return true; } 49e0c: 242e fff8 movel %fp@(-8),%d2 49e10: 246e fffc moveal %fp@(-4),%a2 49e14: 4e5e unlk %fp if ( !status ) return false; } } return true; 49e16: 7001 moveq #1,%d0 } 49e18: 4e75 rts 49e1a: 242e fff8 movel %fp@(-8),%d2 49e1e: 246e fffc moveal %fp@(-4),%a2 49e22: 4e5e unlk %fp status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 49e24: 4200 clrb %d0 <== NOT EXECUTED } } return true; } =============================================================================== 00049e28 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 49e28: 4e56 0000 linkw %fp,#0 49e2c: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 49e2e: 2479 0005 fa84 moveal 5fa84 <_User_extensions_List+0x8>,%a2 49e34: 2f02 movel %d2,%sp@- 49e36: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49e3a: b5fc 0005 fa7c cmpal #391804,%a2 49e40: 6720 beqs 49e62 <_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 ) 49e42: 206a 0020 moveal %a2@(32),%a0 49e46: 4a88 tstl %a0 49e48: 670c beqs 49e56 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 49e4a: 2f02 movel %d2,%sp@- 49e4c: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 49e52: 4e90 jsr %a0@ 49e54: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49e56: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49e5a: b5fc 0005 fa7c cmpal #391804,%a2 49e60: 66e0 bnes 49e42 <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 49e62: 242e fff8 movel %fp@(-8),%d2 49e66: 246e fffc moveal %fp@(-4),%a2 49e6a: 4e5e unlk %fp ... =============================================================================== 00049d3e <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 49d3e: 4e56 0000 linkw %fp,#0 49d42: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 49d44: 2479 0005 fa84 moveal 5fa84 <_User_extensions_List+0x8>,%a2 49d4a: 2f02 movel %d2,%sp@- 49d4c: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49d50: b5fc 0005 fa7c cmpal #391804,%a2 49d56: 671a beqs 49d72 <_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 ) 49d58: 206a 002c moveal %a2@(44),%a0 49d5c: 4a88 tstl %a0 49d5e: 6706 beqs 49d66 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 49d60: 2f02 movel %d2,%sp@- 49d62: 4e90 jsr %a0@ 49d64: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49d66: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49d6a: b5fc 0005 fa7c cmpal #391804,%a2 49d70: 66e6 bnes 49d58 <_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 ); } } 49d72: 242e fff8 movel %fp@(-8),%d2 49d76: 246e fffc moveal %fp@(-4),%a2 49d7a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a7b8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a7b8: 4e56 0000 linkw %fp,#0 4a7bc: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a7be: 2479 0006 0654 moveal 60654 <_User_extensions_List>,%a2 4a7c4: 2f02 movel %d2,%sp@- 4a7c6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a7ca: b5fc 0006 0658 cmpal #394840,%a2 4a7d0: 671e beqs 4a7f0 <_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 ) 4a7d2: 206a 001c moveal %a2@(28),%a0 4a7d6: 4a88 tstl %a0 4a7d8: 670c beqs 4a7e6 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 4a7da: 2f02 movel %d2,%sp@- 4a7dc: 2f39 0006 06a4 movel 606a4 <_Per_CPU_Information+0xc>,%sp@- 4a7e2: 4e90 jsr %a0@ 4a7e4: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4a7e6: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a7e8: b5fc 0006 0658 cmpal #394840,%a2 4a7ee: 66e2 bnes 4a7d2 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4a7f0: 242e fff8 movel %fp@(-8),%d2 4a7f4: 246e fffc moveal %fp@(-4),%a2 4a7f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049e70 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 49e70: 4e56 0000 linkw %fp,#0 49e74: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49e76: 2479 0005 fa7c moveal 5fa7c <_User_extensions_List>,%a2 49e7c: 2f02 movel %d2,%sp@- 49e7e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49e82: b5fc 0005 fa80 cmpal #391808,%a2 49e88: 671e beqs 49ea8 <_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 ) 49e8a: 206a 0018 moveal %a2@(24),%a0 49e8e: 4a88 tstl %a0 49e90: 670c beqs 49e9e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 49e92: 2f02 movel %d2,%sp@- 49e94: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 49e9a: 4e90 jsr %a0@ 49e9c: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49e9e: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49ea0: b5fc 0005 fa80 cmpal #391808,%a2 49ea6: 66e2 bnes 49e8a <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 49ea8: 242e fff8 movel %fp@(-8),%d2 49eac: 246e fffc moveal %fp@(-4),%a2 49eb0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049eb4 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 49eb4: 4e56 fff4 linkw %fp,#-12 49eb8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49ebc: 262e 0008 movel %fp@(8),%d3 49ec0: 242e 000c movel %fp@(12),%d2 49ec4: 2479 0005 f93c moveal 5f93c <_User_extensions_Switches_list>,%a2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 49eca: b5fc 0005 f940 cmpal #391488,%a2 49ed0: 6716 beqs 49ee8 <_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 ); 49ed2: 2f02 movel %d2,%sp@- 49ed4: 2f03 movel %d3,%sp@- 49ed6: 206a 0008 moveal %a2@(8),%a0 49eda: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 49edc: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 49ede: 508f addql #8,%sp 49ee0: b5fc 0005 f940 cmpal #391488,%a2 49ee6: 66ea bnes 49ed2 <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 49ee8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49eee: 4e5e unlk %fp ... =============================================================================== 0004b804 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b804: 4e56 ffe8 linkw %fp,#-24 4b808: 226e 000c moveal %fp@(12),%a1 4b80c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4b810: 283c 0000 0700 movel #1792,%d4 4b816: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b818: 266e 0008 moveal %fp@(8),%a3 4b81c: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4b820: 40c1 movew %sr,%d1 4b822: 8081 orl %d1,%d0 4b824: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b826: 244b moveal %a3,%a2 4b828: 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 ) ) { 4b82a: b5c8 cmpal %a0,%a2 4b82c: 6746 beqs 4b874 <_Watchdog_Adjust+0x70> switch ( direction ) { 4b82e: 4a89 tstl %a1 4b830: 664e bnes 4b880 <_Watchdog_Adjust+0x7c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b832: 4a82 tstl %d2 4b834: 673e beqs 4b874 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b836: 2628 0010 movel %a0@(16),%d3 4b83a: 49f9 0004 ba80 lea 4ba80 <_Watchdog_Tickle>,%a4 4b840: b682 cmpl %d2,%d3 4b842: 622a bhis 4b86e <_Watchdog_Adjust+0x6a> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4b844: 7001 moveq #1,%d0 4b846: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4b84a: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4b84c: 2f0b movel %a3,%sp@- 4b84e: 4e94 jsr %a4@ _ISR_Disable( level ); 4b850: 2004 movel %d4,%d0 4b852: 40c1 movew %sr,%d1 4b854: 8081 orl %d1,%d0 4b856: 46c0 movew %d0,%sr if ( _Chain_Is_empty( header ) ) 4b858: 588f addql #4,%sp while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4b85a: 9483 subl %d3,%d2 4b85c: 2053 moveal %a3@,%a0 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4b85e: b1ca cmpal %a2,%a0 4b860: 6712 beqs 4b874 <_Watchdog_Adjust+0x70> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b862: 4a82 tstl %d2 4b864: 670e beqs 4b874 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b866: 2628 0010 movel %a0@(16),%d3 4b86a: b483 cmpl %d3,%d2 4b86c: 64d6 bccs 4b844 <_Watchdog_Adjust+0x40> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; 4b86e: 9682 subl %d2,%d3 4b870: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4b874: 46c1 movew %d1,%sr } 4b876: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b87c: 4e5e unlk %fp 4b87e: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4b880: 7001 moveq #1,%d0 4b882: b089 cmpl %a1,%d0 4b884: 66ee bnes 4b874 <_Watchdog_Adjust+0x70> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4b886: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4b88a: 46c1 movew %d1,%sr } 4b88c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b892: 4e5e unlk %fp ... =============================================================================== 00049ef4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 49ef4: 4e56 ffec linkw %fp,#-20 49ef8: 226e 000c moveal %fp@(12),%a1 49efc: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49f00: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 49f04: 283c 0000 0700 movel #1792,%d4 49f0a: 2004 movel %d4,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 49f0c: 2639 0005 fac8 movel 5fac8 <_Per_CPU_Information+0x8>,%d3 _ISR_Disable( level ); 49f12: 40c2 movew %sr,%d2 49f14: 8082 orl %d2,%d0 49f16: 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 ) { 49f18: 4aa9 0008 tstl %a1@(8) 49f1c: 6600 00bc bnew 49fda <_Watchdog_Insert+0xe6> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 49f20: 2039 0005 fa34 movel 5fa34 <_Watchdog_Sync_count>,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49f26: 7201 moveq #1,%d1 _Watchdog_Sync_count++; 49f28: 5280 addql #1,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49f2a: 2341 0008 movel %d1,%a1@(8) _Watchdog_Sync_count++; 49f2e: 23c0 0005 fa34 movel %d0,5fa34 <_Watchdog_Sync_count> restart: delta_interval = the_watchdog->initial; 49f34: 2029 000c movel %a1@(12),%d0 49f38: 2052 moveal %a2@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49f3a: 6764 beqs 49fa0 <_Watchdog_Insert+0xac> 49f3c: 4a90 tstl %a0@ 49f3e: 6760 beqs 49fa0 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49f40: 2228 0010 movel %a0@(16),%d1 49f44: b280 cmpl %d0,%d1 49f46: 6252 bhis 49f9a <_Watchdog_Insert+0xa6> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 49f48: 2a04 movel %d4,%d5 49f4a: 46c2 movew %d2,%sr 49f4c: 8a82 orl %d2,%d5 49f4e: 46c5 movew %d5,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49f50: 7a01 moveq #1,%d5 49f52: baa9 0008 cmpl %a1@(8),%d5 49f56: 666e bnes 49fc6 <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49f58: 2a39 0005 f9dc movel 5f9dc <_Watchdog_Sync_level>,%d5 49f5e: ba83 cmpl %d3,%d5 49f60: 6230 bhis 49f92 <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49f62: 9081 subl %d1,%d0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 49f64: 2050 moveal %a0@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49f66: 4a80 tstl %d0 49f68: 6736 beqs 49fa0 <_Watchdog_Insert+0xac> 49f6a: 4a90 tstl %a0@ 49f6c: 6732 beqs 49fa0 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49f6e: 2228 0010 movel %a0@(16),%d1 49f72: b081 cmpl %d1,%d0 49f74: 6524 bcss 49f9a <_Watchdog_Insert+0xa6> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49f76: 9081 subl %d1,%d0 _ISR_Flash( level ); 49f78: 2204 movel %d4,%d1 49f7a: 46c2 movew %d2,%sr 49f7c: 8282 orl %d2,%d1 49f7e: 46c1 movew %d1,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49f80: 7201 moveq #1,%d1 49f82: b2a9 0008 cmpl %a1@(8),%d1 49f86: 663e bnes 49fc6 <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49f88: 2239 0005 f9dc movel 5f9dc <_Watchdog_Sync_level>,%d1 49f8e: b283 cmpl %d3,%d1 49f90: 63d2 blss 49f64 <_Watchdog_Insert+0x70> <== ALWAYS TAKEN _Watchdog_Sync_level = insert_isr_nest_level; 49f92: 23c3 0005 f9dc movel %d3,5f9dc <_Watchdog_Sync_level> goto restart; 49f98: 609a bras 49f34 <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 49f9a: 9280 subl %d0,%d1 49f9c: 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 ); 49fa0: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 49fa4: 7a02 moveq #2,%d5 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 49fa6: 2450 moveal %a0@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 49fa8: 2340 0010 movel %d0,%a1@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 49fac: 2039 0005 fa38 movel 5fa38 <_Watchdog_Ticks_since_boot>,%d0 49fb2: 2345 0008 movel %d5,%a1@(8) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49fb6: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 49fba: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 49fbc: 2549 0004 movel %a1,%a2@(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; 49fc0: 228a movel %a2,%a1@ 49fc2: 2340 0014 movel %d0,%a1@(20) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 49fc6: 23c3 0005 f9dc movel %d3,5f9dc <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49fcc: 2039 0005 fa34 movel 5fa34 <_Watchdog_Sync_count>,%d0 49fd2: 5380 subql #1,%d0 49fd4: 23c0 0005 fa34 movel %d0,5fa34 <_Watchdog_Sync_count> _ISR_Enable( level ); 49fda: 46c2 movew %d2,%sr } 49fdc: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49fe0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a03c <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a03c: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4a042: 4e56 0000 linkw %fp,#0 4a046: 206e 0008 moveal %fp@(8),%a0 4a04a: 2f0a movel %a2,%sp@- 4a04c: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a04e: 40c1 movew %sr,%d1 4a050: 8081 orl %d1,%d0 4a052: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 4a054: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 4a058: 7401 moveq #1,%d2 4a05a: b480 cmpl %d0,%d2 4a05c: 6764 beqs 4a0c2 <_Watchdog_Remove+0x86> 4a05e: 6314 blss 4a074 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a060: 2279 0005 fa38 moveal 5fa38 <_Watchdog_Ticks_since_boot>,%a1 4a066: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a06a: 46c1 movew %d1,%sr return( previous_state ); } 4a06c: 241f movel %sp@+,%d2 4a06e: 245f moveal %sp@+,%a2 4a070: 4e5e unlk %fp 4a072: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4a074: 143c 0003 moveb #3,%d2 4a078: b480 cmpl %d0,%d2 4a07a: 65e4 bcss 4a060 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 4a07c: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4a07e: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4a082: 4a91 tstl %a1@ 4a084: 6708 beqs 4a08e <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 4a086: 2428 0010 movel %a0@(16),%d2 4a08a: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 4a08e: 2479 0005 fa34 moveal 5fa34 <_Watchdog_Sync_count>,%a2 4a094: 4a8a tstl %a2 4a096: 670c beqs 4a0a4 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 4a098: 45f9 0005 fac8 lea 5fac8 <_Per_CPU_Information+0x8>,%a2 4a09e: 23d2 0005 f9dc movel %a2@,5f9dc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4a0a4: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 4a0a8: 234a 0004 movel %a2,%a1@(4) previous->next = next; 4a0ac: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a0ae: 2279 0005 fa38 moveal 5fa38 <_Watchdog_Ticks_since_boot>,%a1 4a0b4: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a0b8: 46c1 movew %d1,%sr return( previous_state ); } 4a0ba: 241f movel %sp@+,%d2 4a0bc: 245f moveal %sp@+,%a2 4a0be: 4e5e unlk %fp 4a0c0: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a0c2: 2279 0005 fa38 moveal 5fa38 <_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; 4a0c8: 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; 4a0cc: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a0d0: 46c1 movew %d1,%sr return( previous_state ); } 4a0d2: 241f movel %sp@+,%d2 4a0d4: 245f moveal %sp@+,%a2 4a0d6: 4e5e unlk %fp ... =============================================================================== 0004b204 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b204: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4b20a: 4e56 ffe8 linkw %fp,#-24 4b20e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b212: 242e 0008 movel %fp@(8),%d2 4b216: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b21a: 40c3 movew %sr,%d3 4b21c: 8083 orl %d3,%d0 4b21e: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4b220: 2f0b movel %a3,%sp@- 4b222: 4bf9 0004 4be0 lea 44be0 ,%a5 4b228: 2f02 movel %d2,%sp@- 4b22a: 4879 0005 f048 pea 5f048 <_Status_Object_name_errors_to_status+0x14> 4b230: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b232: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4b234: 4fef 000c lea %sp@(12),%sp 4b238: b7ca cmpal %a2,%a3 4b23a: 672c beqs 4b268 <_Watchdog_Report_chain+0x64> 4b23c: 49f9 0004 b280 lea 4b280 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4b242: 2f0a movel %a2,%sp@- 4b244: 42a7 clrl %sp@- 4b246: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 4b248: 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 = _Chain_First( header ) ; 4b24a: 508f addql #8,%sp 4b24c: b7ca cmpal %a2,%a3 4b24e: 66f2 bnes 4b242 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4b250: 2f02 movel %d2,%sp@- 4b252: 4879 0005 f05f pea 5f05f <_Status_Object_name_errors_to_status+0x2b> 4b258: 4e95 jsr %a5@ 4b25a: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4b25c: 46c3 movew %d3,%sr } 4b25e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b264: 4e5e unlk %fp 4b266: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4b268: 4879 0005 f06e pea 5f06e <_Status_Object_name_errors_to_status+0x3a> 4b26e: 4e95 jsr %a5@ 4b270: 588f addql #4,%sp } _ISR_Enable( level ); 4b272: 46c3 movew %d3,%sr } 4b274: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b27a: 4e5e unlk %fp ... =============================================================================== 0004a0dc <_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 ); 4a0dc: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 4a0e2: 4e56 ffe8 linkw %fp,#-24 4a0e6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a0ea: 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 ); 4a0ee: 40c2 movew %sr,%d2 4a0f0: 8082 orl %d2,%d0 4a0f2: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4a0f4: 264c moveal %a4,%a3 4a0f6: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 4a0f8: b7ca cmpal %a2,%a3 4a0fa: 673c beqs 4a138 <_Watchdog_Tickle+0x5c> * 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) { 4a0fc: 202a 0010 movel %a2@(16),%d0 4a100: 4bf9 0004 a03c lea 4a03c <_Watchdog_Remove>,%a5 4a106: 6708 beqs 4a110 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 4a108: 5380 subql #1,%d0 4a10a: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 4a10e: 6628 bnes 4a138 <_Watchdog_Tickle+0x5c> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4a110: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4a116: 2f0a movel %a2,%sp@- 4a118: 4e95 jsr %a5@ _ISR_Enable( level ); 4a11a: 46c2 movew %d2,%sr switch( watchdog_state ) { 4a11c: 7202 moveq #2,%d1 4a11e: 588f addql #4,%sp 4a120: b280 cmpl %d0,%d1 4a122: 6720 beqs 4a144 <_Watchdog_Tickle+0x68> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4a124: 2003 movel %d3,%d0 4a126: 40c2 movew %sr,%d2 4a128: 8082 orl %d2,%d0 4a12a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a12c: 2454 moveal %a4@,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 4a12e: b5cb cmpal %a3,%a2 4a130: 6706 beqs 4a138 <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 4a132: 4aaa 0010 tstl %a2@(16) 4a136: 67de beqs 4a116 <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 4a138: 46c2 movew %d2,%sr } 4a13a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a140: 4e5e unlk %fp 4a142: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 4a144: 2f2a 0024 movel %a2@(36),%sp@- 4a148: 2f2a 0020 movel %a2@(32),%sp@- 4a14c: 206a 001c moveal %a2@(28),%a0 4a150: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 4a152: 508f addql #8,%sp 4a154: 60ce bras 4a124 <_Watchdog_Tickle+0x48> ... =============================================================================== 0004e8f8 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4e8f8: 4e56 fff8 linkw %fp,#-8 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4e8fc: 486e fffc pea %fp@(-4) 4e900: 2f2e 0008 movel %fp@(8),%sp@- 4e904: 4879 0006 20ac pea 620ac <_Barrier_Information> 4e90a: 4eb9 0004 a4cc jsr 4a4cc <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4e910: 4fef 000c lea %sp@(12),%sp 4e914: 4aae fffc tstl %fp@(-4) 4e918: 664a bnes 4e964 <== NEVER TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 4e91a: 4878 0002 pea 2 4e91e: 2040 moveal %d0,%a0 4e920: 42a7 clrl %sp@- 4e922: 4868 0014 pea %a0@(20) 4e926: 2d40 fff8 movel %d0,%fp@(-8) 4e92a: 4eb9 0004 b8d0 jsr 4b8d0 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4e930: 202e fff8 movel %fp@(-8),%d0 4e934: 2f00 movel %d0,%sp@- 4e936: 4879 0006 20ac pea 620ac <_Barrier_Information> 4e93c: 4eb9 0004 a098 jsr 4a098 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4e942: 202e fff8 movel %fp@(-8),%d0 4e946: 2f00 movel %d0,%sp@- 4e948: 4879 0006 20ac pea 620ac <_Barrier_Information> 4e94e: 4eb9 0004 a358 jsr 4a358 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4e954: 4eb9 0004 b1b8 jsr 4b1b8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e95a: 4fef 001c lea %sp@(28),%sp 4e95e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e960: 4e5e unlk %fp 4e962: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4e964: 7004 moveq #4,%d0 } 4e966: 4e5e unlk %fp ... =============================================================================== 00047448 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 47448: 4e56 0000 linkw %fp,#0 4744c: 2f03 movel %d3,%sp@- 4744e: 262e 0014 movel %fp@(20),%d3 47452: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 47454: 2f2e 000c movel %fp@(12),%sp@- 47458: 2f2e 0008 movel %fp@(8),%sp@- 4745c: 242e 0010 movel %fp@(16),%d2 47460: 4eb9 0004 79d0 jsr 479d0 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 47466: 508f addql #8,%sp 47468: 4a00 tstb %d0 4746a: 660e bnes 4747a sc = rtems_event_send( task, events ); } return sc; } 4746c: 242e fff8 movel %fp@(-8),%d2 47470: 4280 clrl %d0 47472: 262e fffc movel %fp@(-4),%d3 47476: 4e5e unlk %fp 47478: 4e75 rts { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 4747a: 2d43 000c movel %d3,%fp@(12) } return sc; } 4747e: 262e fffc movel %fp@(-4),%d3 { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 47482: 2d42 0008 movel %d2,%fp@(8) } return sc; } 47486: 242e fff8 movel %fp@(-8),%d2 4748a: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 4748c: 4ef9 0004 6968 jmp 46968 ... =============================================================================== 00047494 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 47494: 4e56 0000 linkw %fp,#0 47498: 2f03 movel %d3,%sp@- 4749a: 262e 0010 movel %fp@(16),%d3 4749e: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); 474a0: 2f2e 0014 movel %fp@(20),%sp@- 474a4: 2f2e 0008 movel %fp@(8),%sp@- 474a8: 242e 000c movel %fp@(12),%d2 474ac: 4eb9 0004 7a70 jsr 47a70 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { 474b2: 508f addql #8,%sp 474b4: 4a00 tstb %d0 474b6: 660e bnes 474c6 sc = rtems_event_send( task, events ); } return sc; } 474b8: 242e fff8 movel %fp@(-8),%d2 474bc: 4280 clrl %d0 474be: 262e fffc movel %fp@(-4),%d3 474c2: 4e5e unlk %fp 474c4: 4e75 rts { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 474c6: 2d43 000c movel %d3,%fp@(12) } return sc; } 474ca: 262e fffc movel %fp@(-4),%d3 { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 474ce: 2d42 0008 movel %d2,%fp@(8) } return sc; } 474d2: 242e fff8 movel %fp@(-8),%d2 474d6: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 474d8: 4ef9 0004 6968 jmp 46968 ... =============================================================================== 000474e0 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 474e0: 4e56 ffe0 linkw %fp,#-32 474e4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 474e8: 2c0e movel %fp,%d6 474ea: 45f9 0004 7ac0 lea 47ac0 <_Chain_Get>,%a2 474f0: 5986 subql #4,%d6 474f2: 47f9 0004 67bc lea 467bc ,%a3 rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 474f8: 262e 0008 movel %fp@(8),%d3 474fc: 2a2e 000c movel %fp@(12),%d5 47500: 282e 0010 movel %fp@(16),%d4 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 47504: 2f03 movel %d3,%sp@- 47506: 4e92 jsr %a2@ rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 47508: 588f addql #4,%sp 4750a: 2400 movel %d0,%d2 4750c: 6622 bnes 47530 ) { rtems_event_set out; sc = rtems_event_receive( 4750e: 2f06 movel %d6,%sp@- 47510: 2f04 movel %d4,%sp@- 47512: 42a7 clrl %sp@- 47514: 2f05 movel %d5,%sp@- 47516: 4e93 jsr %a3@ ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 47518: 4fef 0010 lea %sp@(16),%sp 4751c: 4a80 tstl %d0 4751e: 67e4 beqs 47504 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 47520: 206e 0014 moveal %fp@(20),%a0 47524: 2082 movel %d2,%a0@ return sc; } 47526: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 4752c: 4e5e unlk %fp 4752e: 4e75 rts timeout, &out ); } *node_ptr = node; 47530: 206e 0014 moveal %fp@(20),%a0 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 47534: 4280 clrl %d0 timeout, &out ); } *node_ptr = node; 47536: 2082 movel %d2,%a0@ return sc; } 47538: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 4753e: 4e5e unlk %fp ... =============================================================================== 00047544 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 47544: 4e56 0000 linkw %fp,#0 47548: 2f03 movel %d3,%sp@- 4754a: 262e 0014 movel %fp@(20),%d3 4754e: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 47550: 2f2e 000c movel %fp@(12),%sp@- 47554: 2f2e 0008 movel %fp@(8),%sp@- 47558: 242e 0010 movel %fp@(16),%d2 4755c: 4eb9 0004 7b2c jsr 47b2c <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 47562: 508f addql #8,%sp 47564: 4a00 tstb %d0 47566: 660e bnes 47576 sc = rtems_event_send( task, events ); } return sc; } 47568: 242e fff8 movel %fp@(-8),%d2 4756c: 4280 clrl %d0 4756e: 262e fffc movel %fp@(-4),%d3 47572: 4e5e unlk %fp 47574: 4e75 rts { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 47576: 2d43 000c movel %d3,%fp@(12) } return sc; } 4757a: 262e fffc movel %fp@(-4),%d3 { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 4757e: 2d42 0008 movel %d2,%fp@(8) } return sc; } 47582: 242e fff8 movel %fp@(-8),%d2 47586: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 47588: 4ef9 0004 6968 jmp 46968 ... =============================================================================== 000466d0 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 466d0: 4e56 0000 linkw %fp,#0 466d4: 202e 0008 movel %fp@(8),%d0 466d8: 2f0a movel %a2,%sp@- 466da: 246e 000c moveal %fp@(12),%a2 if ( !time_buffer ) 466de: 4a8a tstl %a2 466e0: 6728 beqs 4670a return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 466e2: 4a80 tstl %d0 466e4: 6730 beqs 46716 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 466e6: 7201 moveq #1,%d1 466e8: b280 cmpl %d0,%d1 466ea: 673a beqs 46726 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 466ec: 7202 moveq #2,%d1 466ee: b280 cmpl %d0,%d1 466f0: 6744 beqs 46736 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 466f2: 7203 moveq #3,%d1 466f4: b280 cmpl %d0,%d1 466f6: 6752 beqs 4674a *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 466f8: 7204 moveq #4,%d1 466fa: b280 cmpl %d0,%d1 466fc: 6760 beqs 4675e return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 466fe: 246e fffc moveal %fp@(-4),%a2 } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 46702: 720a moveq #10,%d1 } 46704: 2001 movel %d1,%d0 46706: 4e5e unlk %fp 46708: 4e75 rts 4670a: 246e fffc moveal %fp@(-4),%a2 rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 4670e: 7209 moveq #9,%d1 if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 46710: 2001 movel %d1,%d0 46712: 4e5e unlk %fp 46714: 4e75 rts { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 46716: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 4671a: 246e fffc moveal %fp@(-4),%a2 4671e: 4e5e unlk %fp { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 46720: 4ef9 0004 67c4 jmp 467c4 if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 46726: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 4672a: 246e fffc moveal %fp@(-4),%a2 4672e: 4e5e unlk %fp if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 46730: 4ef9 0004 6770 jmp 46770 if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 46736: 4eb9 0004 67b4 jsr 467b4 return RTEMS_SUCCESSFUL; 4673c: 4281 clrl %d1 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 4673e: 2480 movel %d0,%a2@ if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 46740: 246e fffc moveal %fp@(-4),%a2 46744: 2001 movel %d1,%d0 46746: 4e5e unlk %fp 46748: 4e75 rts } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 4674a: 4eb9 0004 679c jsr 4679c return RTEMS_SUCCESSFUL; 46750: 4281 clrl %d1 } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 46752: 2480 movel %d0,%a2@ if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 46754: 246e fffc moveal %fp@(-4),%a2 46758: 2001 movel %d1,%d0 4675a: 4e5e unlk %fp 4675c: 4e75 rts *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 4675e: 2d4a 0008 movel %a2,%fp@(8) return RTEMS_INVALID_NUMBER; } 46762: 246e fffc moveal %fp@(-4),%a2 46766: 4e5e unlk %fp *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 46768: 4ef9 0004 6888 jmp 46888 ... =============================================================================== 000484c0 : 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 ) { 484c0: 4e56 0000 linkw %fp,#0 484c4: 226e 000c moveal %fp@(12),%a1 484c8: 2f0a movel %a2,%sp@- 484ca: 206e 0010 moveal %fp@(16),%a0 484ce: 2f02 movel %d2,%sp@- 484d0: 242e 0008 movel %fp@(8),%d2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 484d4: 2039 0006 39ec movel 639ec <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 484da: 4ab9 0006 3970 tstl 63970 <_Per_CPU_Information+0x8> 484e0: 670e beqs 484f0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 484e2: 242e fff8 movel %fp@(-8),%d2 ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 484e6: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 484e8: 246e fffc moveal %fp@(-4),%a2 484ec: 4e5e unlk %fp 484ee: 4e75 rts rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 484f0: 4a88 tstl %a0 484f2: 6722 beqs 48516 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 484f4: 2080 movel %d0,%a0@ if ( driver_table == NULL ) 484f6: 4a89 tstl %a1 484f8: 671c beqs 48516 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 484fa: 4a91 tstl %a1@ 484fc: 6712 beqs 48510 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 484fe: b480 cmpl %d0,%d2 48500: 6522 bcss 48524 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48502: 242e fff8 movel %fp@(-8),%d2 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 48506: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48508: 246e fffc moveal %fp@(-4),%a2 4850c: 4e5e unlk %fp 4850e: 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; 48510: 4aa9 0004 tstl %a1@(4) 48514: 66e8 bnes 484fe _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48516: 242e fff8 movel %fp@(-8),%d2 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 4851a: 7009 moveq #9,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4851c: 246e fffc moveal %fp@(-4),%a2 48520: 4e5e unlk %fp 48522: 4e75 rts * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 48524: 2039 0006 37e0 movel 637e0 <_Thread_Dispatch_disable_level>,%d0 4852a: 5280 addql #1,%d0 4852c: 23c0 0006 37e0 movel %d0,637e0 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48532: 2039 0006 37e0 movel 637e0 <_Thread_Dispatch_disable_level>,%d0 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 48538: 4a82 tstl %d2 4853a: 667a bnes 485b6 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 4853c: 2039 0006 39ec movel 639ec <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48542: 6700 00dc beqw 48620 48546: 2239 0006 39f0 movel 639f0 <_IO_Driver_address_table>,%d1 4854c: 2441 moveal %d1,%a2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4854e: 4a92 tstl %a2@ 48550: 6720 beqs 48572 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 ) { 48552: 5282 addql #1,%d2 48554: 45ea 0018 lea %a2@(24),%a2 48558: b082 cmpl %d2,%d0 4855a: 66f2 bnes 4854e if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4855c: 2082 movel %d2,%a0@ if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 4855e: 4eb9 0004 a49c jsr 4a49c <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 48564: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48566: 242e fff8 movel %fp@(-8),%d2 4856a: 246e fffc moveal %fp@(-4),%a2 4856e: 4e5e unlk %fp 48570: 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; 48572: 4aaa 0004 tstl %a2@(4) 48576: 66da bnes 48552 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48578: 2082 movel %d2,%a0@ if ( m != n ) 4857a: b480 cmpl %d0,%d2 4857c: 67e0 beqs 4855e <== NEVER TAKEN 4857e: 7018 moveq #24,%d0 48580: 4c02 0800 mulsl %d2,%d0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48584: 2041 moveal %d1,%a0 48586: d1c0 addal %d0,%a0 48588: 20d9 movel %a1@+,%a0@+ 4858a: 20d9 movel %a1@+,%a0@+ 4858c: 20d9 movel %a1@+,%a0@+ 4858e: 20d9 movel %a1@+,%a0@+ 48590: 20d9 movel %a1@+,%a0@+ 48592: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 48594: 4eb9 0004 a49c jsr 4a49c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 4859a: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4859e: 2d42 0008 movel %d2,%fp@(8) } 485a2: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 485a6: 42ae 0010 clrl %fp@(16) 485aa: 42ae 000c clrl %fp@(12) } 485ae: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 485b0: 4ef9 0005 02d8 jmp 502d8 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 485b6: 2202 movel %d2,%d1 485b8: 2002 movel %d2,%d0 485ba: e789 lsll #3,%d1 485bc: eb88 lsll #5,%d0 485be: 2479 0006 39f0 moveal 639f0 <_IO_Driver_address_table>,%a2 485c4: 9081 subl %d1,%d0 485c6: d5c0 addal %d0,%a2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 485c8: 4a92 tstl %a2@ 485ca: 6714 beqs 485e0 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(); 485cc: 4eb9 0004 a49c jsr 4a49c <_Thread_Enable_dispatch> _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 485d2: 242e fff8 movel %fp@(-8),%d2 } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; 485d6: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 485d8: 246e fffc moveal %fp@(-4),%a2 485dc: 4e5e unlk %fp 485de: 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; 485e0: 4aaa 0004 tstl %a2@(4) 485e4: 66e6 bnes 485cc 485e6: 2239 0006 39f0 movel 639f0 <_IO_Driver_address_table>,%d1 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 485ec: 2082 movel %d2,%a0@ } _IO_Driver_address_table [major] = *driver_table; 485ee: 2041 moveal %d1,%a0 485f0: d1c0 addal %d0,%a0 485f2: 20d9 movel %a1@+,%a0@+ 485f4: 20d9 movel %a1@+,%a0@+ 485f6: 20d9 movel %a1@+,%a0@+ 485f8: 20d9 movel %a1@+,%a0@+ 485fa: 20d9 movel %a1@+,%a0@+ 485fc: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 485fe: 4eb9 0004 a49c jsr 4a49c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 48604: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48608: 2d42 0008 movel %d2,%fp@(8) } 4860c: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48610: 42ae 0010 clrl %fp@(16) 48614: 42ae 000c clrl %fp@(12) } 48618: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4861a: 4ef9 0005 02d8 jmp 502d8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48620: 4290 clrl %a0@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 48622: 4eb9 0004 a49c jsr 4a49c <_Thread_Enable_dispatch> <== NOT EXECUTED *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 48628: 7005 moveq #5,%d0 <== NOT EXECUTED 4862a: 6000 ff3a braw 48566 <== NOT EXECUTED ... =============================================================================== 00049650 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 49650: 4e56 fff0 linkw %fp,#-16 49654: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49658: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 4965c: 4a8b tstl %a3 4965e: 6742 beqs 496a2 <== NEVER TAKEN 49660: 49f9 0006 20c8 lea 620c8 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) 49666: 205c moveal %a4@+,%a0 49668: 4a88 tstl %a0 4966a: 672e beqs 4969a continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 4966c: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 49670: 4a8a tstl %a2 49672: 6726 beqs 4969a continue; for ( i=1 ; i <= information->maximum ; i++ ) { 49674: 4a6a 000e tstw %a2@(14) 49678: 6720 beqs 4969a <== NEVER TAKEN 4967a: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 4967c: 206a 0018 moveal %a2@(24),%a0 49680: 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++ ) { 49684: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 49686: 4a80 tstl %d0 49688: 6706 beqs 49690 <== NEVER TAKEN continue; (*routine)(the_thread); 4968a: 2f00 movel %d0,%sp@- 4968c: 4e93 jsr %a3@ 4968e: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 49690: 4280 clrl %d0 49692: 302a 000e movew %a2@(14),%d0 49696: b480 cmpl %d0,%d2 49698: 63e2 blss 4967c Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 4969a: b9fc 0006 20d4 cmpal #401620,%a4 496a0: 66c4 bnes 49666 (*routine)(the_thread); } } } 496a2: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 496a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000547a8 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 547a8: 4e56 fff0 linkw %fp,#-16 547ac: 48d7 001c moveml %d2-%d4,%sp@ 547b0: 282e 0008 movel %fp@(8),%d4 547b4: 242e 000c movel %fp@(12),%d2 547b8: 262e 0014 movel %fp@(20),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 547bc: 4a82 tstl %d2 547be: 6756 beqs 54816 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !count ) 547c0: 4a83 tstl %d3 547c2: 6752 beqs 54816 <== NEVER TAKEN RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 547c4: 486e fffc pea %fp@(-4) 547c8: 2f04 movel %d4,%sp@- 547ca: 4879 0007 c690 pea 7c690 <_Message_queue_Information> 547d0: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 547d6: 4fef 000c lea %sp@(12),%sp 547da: 4aae fffc tstl %fp@(-4) 547de: 6642 bnes 54822 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 547e0: 2f03 movel %d3,%sp@- 547e2: 2040 moveal %d0,%a0 547e4: 42a7 clrl %sp@- 547e6: 2f04 movel %d4,%sp@- 547e8: 2f2e 0010 movel %fp@(16),%sp@- 547ec: 2f02 movel %d2,%sp@- 547ee: 4868 0014 pea %a0@(20) 547f2: 4eb9 0005 8314 jsr 58314 <_CORE_message_queue_Broadcast> 547f8: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 547fa: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return 54800: 2f02 movel %d2,%sp@- 54802: 4eb9 0005 4bc4 jsr 54bc4 <_Message_queue_Translate_core_message_queue_return_code> 54808: 4fef 001c lea %sp@(28),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5480c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 54812: 4e5e unlk %fp 54814: 4e75 rts if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 54816: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54818: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5481e: 4e5e unlk %fp 54820: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 54822: 7004 moveq #4,%d0 } 54824: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5482a: 4e5e unlk %fp ... =============================================================================== 00054bdc : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 54bdc: 4e56 fffc linkw %fp,#-4 54be0: 2f03 movel %d3,%sp@- 54be2: 262e 0008 movel %fp@(8),%d3 54be6: 2f02 movel %d2,%sp@- 54be8: 242e 000c movel %fp@(12),%d2 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 54bec: 676c beqs 54c5a <== NEVER TAKEN 54bee: 486e fffc pea %fp@(-4) 54bf2: 2f03 movel %d3,%sp@- 54bf4: 4879 0007 c690 pea 7c690 <_Message_queue_Information> 54bfa: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 54c00: 4fef 000c lea %sp@(12),%sp 54c04: 4aae fffc tstl %fp@(-4) 54c08: 6642 bnes 54c4c CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 54c0a: 42a7 clrl %sp@- 54c0c: 2040 moveal %d0,%a0 54c0e: 42a7 clrl %sp@- 54c10: 2f3c 8000 0000 movel #-2147483648,%sp@- 54c16: 42a7 clrl %sp@- 54c18: 2f03 movel %d3,%sp@- 54c1a: 2f2e 0010 movel %fp@(16),%sp@- 54c1e: 2f02 movel %d2,%sp@- 54c20: 4868 0014 pea %a0@(20) 54c24: 4eb9 0005 8620 jsr 58620 <_CORE_message_queue_Submit> id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 54c2a: 4fef 0020 lea %sp@(32),%sp 54c2e: 2400 movel %d0,%d2 54c30: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 54c36: 2f02 movel %d2,%sp@- 54c38: 4eb9 0005 4bc4 jsr 54bc4 <_Message_queue_Translate_core_message_queue_return_code> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54c3e: 242e fff4 movel %fp@(-12),%d2 /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 54c42: 588f addql #4,%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54c44: 262e fff8 movel %fp@(-8),%d3 54c48: 4e5e unlk %fp 54c4a: 4e75 rts 54c4c: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 54c50: 7004 moveq #4,%d0 } 54c52: 262e fff8 movel %fp@(-8),%d3 54c56: 4e5e unlk %fp 54c58: 4e75 rts 54c5a: 242e fff4 movel %fp@(-12),%d2 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 54c5e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54c60: 262e fff8 movel %fp@(-8),%d3 54c64: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048308 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 48308: 7001 moveq #1,%d0 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 4830a: 4e56 0000 linkw %fp,#0 4830e: 222e 0008 movel %fp@(8),%d1 48312: 2f02 movel %d2,%sp@- const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 48314: b081 cmpl %d1,%d0 48316: 673e beqs 48356 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 48318: 7402 moveq #2,%d2 #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 4831a: 203c 0006 002e movel #393262,%d0 const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 48320: b481 cmpl %d1,%d2 48322: 6708 beqs 4832c return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 48324: 242e fffc movel %fp@(-4),%d2 48328: 4e5e unlk %fp 4832a: 4e75 rts const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 4832c: 203c 0006 1014 movel #397332,%d0 else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 48332: 2f2e 000c movel %fp@(12),%sp@- 48336: 2f00 movel %d0,%sp@- 48338: 4eb9 0004 d4ac jsr 4d4ac if ( class_assoc ) 4833e: 508f addql #8,%sp else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 48340: 2040 moveal %d0,%a0 if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 48342: 203c 0006 0036 movel #393270,%d0 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 48348: 4a88 tstl %a0 4834a: 67d8 beqs 48324 return class_assoc->name; return "BAD CLASS"; } 4834c: 242e fffc movel %fp@(-4),%d2 48350: 4e5e unlk %fp #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; 48352: 2010 movel %a0@,%d0 return "BAD CLASS"; } 48354: 4e75 rts { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 48356: 203c 0006 108c movel #397452,%d0 4835c: 60d4 bras 48332 ... =============================================================================== 000483c8 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 483c8: 4e56 0000 linkw %fp,#0 483cc: 2f0a movel %a2,%sp@- 483ce: 246e 0010 moveal %fp@(16),%a2 483d2: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 483d4: 4a8a tstl %a2 483d6: 6768 beqs 48440 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 483d8: 3f2e 000e movew %fp@(14),%sp@- 483dc: 4267 clrw %sp@- 483de: 2f2e 0008 movel %fp@(8),%sp@- 483e2: 4eb9 0004 a0f0 jsr 4a0f0 <_Objects_Get_information> if ( !obj_info ) 483e8: 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 ); 483ea: 2040 moveal %d0,%a0 if ( !obj_info ) 483ec: 4a80 tstl %d0 483ee: 675e beqs 4844e <== NEVER TAKEN return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 483f0: 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; 483f4: 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; 483f6: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 483fc: 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; 48400: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 48406: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 4840a: 6750 beqs 4845c <== NEVER TAKEN 4840c: 2068 0018 moveal %a0@(24),%a0 48410: 7201 moveq #1,%d1 48412: 7001 moveq #1,%d0 48414: 93c9 subal %a1,%a1 48416: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 48418: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 4841c: 6718 beqs 48436 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++ ) 4841e: 2200 movel %d0,%d1 48420: b082 cmpl %d2,%d0 48422: 63f2 blss 48416 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 48424: 2549 000e movel %a1,%a2@(14) return RTEMS_SUCCESSFUL; 48428: 4280 clrl %d0 } 4842a: 242e fff8 movel %fp@(-8),%d2 4842e: 246e fffc moveal %fp@(-4),%a2 48432: 4e5e unlk %fp 48434: 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++; 48436: 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++ ) 48438: 2200 movel %d0,%d1 4843a: b082 cmpl %d2,%d0 4843c: 63d8 blss 48416 <== NEVER TAKEN 4843e: 60e4 bras 48424 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 48440: 242e fff8 movel %fp@(-8),%d2 /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 48444: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 48446: 246e fffc moveal %fp@(-4),%a2 4844a: 4e5e unlk %fp 4844c: 4e75 rts 4844e: 242e fff8 movel %fp@(-8),%d2 if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 48452: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 48454: 246e fffc moveal %fp@(-4),%a2 48458: 4e5e unlk %fp 4845a: 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++ ) 4845c: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; 4845e: 4280 clrl %d0 <== NOT EXECUTED for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 48460: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 48464: 60c4 bras 4842a <== NOT EXECUTED ... =============================================================================== 00054c68 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 54c68: 4e56 fff4 linkw %fp,#-12 54c6c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 54c70: 242e 0008 movel %fp@(8),%d2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 54c74: 660c bnes 54c82 return RTEMS_INVALID_NAME; 54c76: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 54c78: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54c7e: 4e5e unlk %fp 54c80: 4e75 rts register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) 54c82: 4aae 000c tstl %fp@(12) 54c86: 6718 beqs 54ca0 return RTEMS_INVALID_ADDRESS; if ( !id ) 54c88: 4aae 001c tstl %fp@(28) 54c8c: 6712 beqs 54ca0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 54c8e: 4aae 0010 tstl %fp@(16) 54c92: 6618 bnes 54cac !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 54c94: 7008 moveq #8,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 54c96: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54c9c: 4e5e unlk %fp 54c9e: 4e75 rts if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; 54ca0: 7009 moveq #9,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 54ca2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54ca8: 4e5e unlk %fp 54caa: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 54cac: 4aae 0014 tstl %fp@(20) 54cb0: 67e2 beqs 54c94 54cb2: 202e 0014 movel %fp@(20),%d0 54cb6: b0ae 0010 cmpl %fp@(16),%d0 54cba: 62d8 bhis 54c94 */ RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned ( uint32_t buffer_size ) { return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0); 54cbc: 7003 moveq #3,%d0 54cbe: c0ae 0014 andl %fp@(20),%d0 54cc2: 66d0 bnes 54c94 ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 54cc4: 103c 0003 moveb #3,%d0 54cc8: c0ae 000c andl %fp@(12),%d0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 54ccc: 66d2 bnes 54ca0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 54cce: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 54cd4: 5280 addql #1,%d0 54cd6: 23c0 0007 c4b4 movel %d0,7c4b4 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 54cdc: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 * 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 ); 54ce2: 4879 0007 c354 pea 7c354 <_Partition_Information> 54ce8: 4eb9 0005 9910 jsr 59910 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 54cee: 588f addql #4,%sp 54cf0: 2440 moveal %d0,%a2 54cf2: 4a80 tstl %d0 54cf4: 676c beqs 54d62 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 54cf6: 262e 0010 movel %fp@(16),%d3 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, 54cfa: 2003 movel %d3,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 54cfc: 2543 0014 movel %d3,%a2@(20) 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, 54d00: 262e 0014 movel %fp@(20),%d3 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 54d04: 222e 000c movel %fp@(12),%d1 the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 54d08: 256e 0018 001c movel %fp@(24),%a2@(28) _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 54d0e: 2541 0010 movel %d1,%a2@(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, 54d12: 4c43 0000 remul %d3,%d0,%d0 } #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; 54d16: 2543 0018 movel %d3,%a2@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 54d1a: 42aa 0020 clrl %a2@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 54d1e: 2f03 movel %d3,%sp@- 54d20: 2f00 movel %d0,%sp@- 54d22: 2f2e 000c movel %fp@(12),%sp@- 54d26: 486a 0024 pea %a2@(36) 54d2a: 4eb9 0005 82a0 jsr 582a0 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 54d30: 202a 0008 movel %a2@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 54d34: 4281 clrl %d1 54d36: 2079 0007 c36c moveal 7c36c <_Partition_Information+0x18>,%a0 54d3c: 3200 movew %d0,%d1 54d3e: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 54d42: 206e 001c moveal %fp@(28),%a0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 54d46: 2542 000c movel %d2,%a2@(12) 54d4a: 2080 movel %d0,%a0@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 54d4c: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 54d52: 4fef 0010 lea %sp@(16),%sp 54d56: 4280 clrl %d0 } 54d58: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54d5e: 4e5e unlk %fp 54d60: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 54d62: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 54d68: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 54d6a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54d70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054e94 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 54e94: 4e56 fff8 linkw %fp,#-8 54e98: 2f03 movel %d3,%sp@- 54e9a: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 54e9c: 486e fffc pea %fp@(-4) 54ea0: 2f2e 0008 movel %fp@(8),%sp@- 54ea4: 4879 0007 c354 pea 7c354 <_Partition_Information> 54eaa: 242e 000c movel %fp@(12),%d2 54eae: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 54eb4: 4fef 000c lea %sp@(12),%sp 54eb8: 4aae fffc tstl %fp@(-4) 54ebc: 665a bnes 54f18 ) { void *starting; void *ending; starting = the_partition->starting_address; 54ebe: 2040 moveal %d0,%a0 ending = _Addresses_Add_offset( starting, the_partition->length ); 54ec0: 2240 moveal %d0,%a1 ) { void *starting; void *ending; starting = the_partition->starting_address; 54ec2: 2228 0010 movel %a0@(16),%d1 ending = _Addresses_Add_offset( starting, the_partition->length ); 54ec6: 2068 0014 moveal %a0@(20),%a0 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 54eca: b282 cmpl %d2,%d1 54ecc: 6258 bhis 54f26 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 54ece: 41f0 1800 lea %a0@(00000000,%d1:l),%a0 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 54ed2: b1c2 cmpal %d2,%a0 54ed4: 6550 bcss 54f26 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 54ed6: 2602 movel %d2,%d3 54ed8: 9681 subl %d1,%d3 54eda: 2203 movel %d3,%d1 offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 54edc: 41e9 0018 lea %a1@(24),%a0 54ee0: 4c50 1003 remul %a0@,%d3,%d1 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 54ee4: 4a83 tstl %d3 54ee6: 663e bnes 54f26 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 54ee8: 2f02 movel %d2,%sp@- 54eea: 4869 0024 pea %a1@(36) 54eee: 2d40 fff8 movel %d0,%fp@(-8) 54ef2: 4eb9 0005 8204 jsr 58204 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 54ef8: 202e fff8 movel %fp@(-8),%d0 54efc: 2240 moveal %d0,%a1 54efe: 53a9 0020 subql #1,%a1@(32) _Thread_Enable_dispatch(); 54f02: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54f08: 242e fff0 movel %fp@(-16),%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; 54f0c: 508f addql #8,%sp 54f0e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54f10: 262e fff4 movel %fp@(-12),%d3 54f14: 4e5e unlk %fp 54f16: 4e75 rts 54f18: 242e fff0 movel %fp@(-16),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 54f1c: 7004 moveq #4,%d0 } 54f1e: 262e fff4 movel %fp@(-12),%d3 54f22: 4e5e unlk %fp 54f24: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 54f26: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54f2c: 242e fff0 movel %fp@(-16),%d2 the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 54f30: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54f32: 262e fff4 movel %fp@(-12),%d3 54f36: 4e5e unlk %fp ... =============================================================================== 00054278 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 54278: 4e56 fffc linkw %fp,#-4 5427c: 2f0a movel %a2,%sp@- 5427e: 246e 0010 moveal %fp@(16),%a2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 54282: 4a8a tstl %a2 54284: 674c beqs 542d2 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 54286: 486e fffc pea %fp@(-4) 5428a: 2f2e 0008 movel %fp@(8),%sp@- 5428e: 4879 0007 c31c pea 7c31c <_Dual_ported_memory_Information> 54294: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 5429a: 4fef 000c lea %sp@(12),%sp 5429e: 4aae fffc tstl %fp@(-4) 542a2: 6624 bnes 542c8 RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 542a4: 222e 000c movel %fp@(12),%d1 542a8: 2040 moveal %d0,%a0 542aa: 92a8 0014 subl %a0@(20),%d1 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 542ae: b2a8 0018 cmpl %a0@(24),%d1 542b2: 6328 blss 542dc *internal = external; 542b4: 24ae 000c movel %fp@(12),%a2@ else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 542b8: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 542be: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 542c0: 246e fff8 moveal %fp@(-8),%a2 542c4: 4e5e unlk %fp 542c6: 4e75 rts 542c8: 246e fff8 moveal %fp@(-8),%a2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 542cc: 7004 moveq #4,%d0 } 542ce: 4e5e unlk %fp 542d0: 4e75 rts 542d2: 246e fff8 moveal %fp@(-8),%a2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 542d6: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 542d8: 4e5e unlk %fp 542da: 4e75 rts RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 542dc: 2040 moveal %d0,%a0 542de: d2a8 0010 addl %a0@(16),%d1 542e2: 2481 movel %d1,%a2@ if ( ending > the_port->length ) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 542e4: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 542ea: 4280 clrl %d0 542ec: 60d2 bras 542c0 ... =============================================================================== 00054318 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 54318: 4e56 fffc linkw %fp,#-4 5431c: 2f0a movel %a2,%sp@- 5431e: 246e 0010 moveal %fp@(16),%a2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 54322: 4a8a tstl %a2 54324: 674c beqs 54372 54326: 486e fffc pea %fp@(-4) 5432a: 2f2e 0008 movel %fp@(8),%sp@- 5432e: 4879 0007 c31c pea 7c31c <_Dual_ported_memory_Information> 54334: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 5433a: 4fef 000c lea %sp@(12),%sp 5433e: 4aae fffc tstl %fp@(-4) 54342: 6624 bnes 54368 RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 54344: 222e 000c movel %fp@(12),%d1 54348: 2040 moveal %d0,%a0 5434a: 92a8 0010 subl %a0@(16),%d1 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 5434e: b2a8 0018 cmpl %a0@(24),%d1 54352: 6328 blss 5437c *external = internal; 54354: 24ae 000c movel %fp@(12),%a2@ else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 54358: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5435e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54360: 246e fff8 moveal %fp@(-8),%a2 54364: 4e5e unlk %fp 54366: 4e75 rts 54368: 246e fff8 moveal %fp@(-8),%a2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5436c: 7004 moveq #4,%d0 } 5436e: 4e5e unlk %fp 54370: 4e75 rts 54372: 246e fff8 moveal %fp@(-8),%a2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 54376: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54378: 4e5e unlk %fp 5437a: 4e75 rts RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 5437c: 2040 moveal %d0,%a0 5437e: d2a8 0014 addl %a0@(20),%d1 54382: 2481 movel %d1,%a2@ if ( ending > the_port->length ) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 54384: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5438a: 4280 clrl %d0 5438c: 60d2 bras 54360 ... =============================================================================== 00047970 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 47970: 4e56 fff8 linkw %fp,#-8 47974: 2f03 movel %d3,%sp@- 47976: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 47978: 486e fffc pea %fp@(-4) 4797c: 242e 0008 movel %fp@(8),%d2 47980: 2f02 movel %d2,%sp@- 47982: 4879 0006 1730 pea 61730 <_Rate_monotonic_Information> 47988: 4eb9 0004 9d64 jsr 49d64 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4798e: 4fef 000c lea %sp@(12),%sp 47992: 4aae fffc tstl %fp@(-4) 47996: 6624 bnes 479bc case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 47998: 2279 0006 19b4 moveal 619b4 <_Per_CPU_Information+0xc>,%a1 4799e: 2040 moveal %d0,%a0 479a0: b3e8 0040 cmpal %a0@(64),%a1 479a4: 6726 beqs 479cc _Thread_Enable_dispatch(); 479a6: 4eb9 0004 aaa0 jsr 4aaa0 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 479ac: 7617 moveq #23,%d3 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 479ae: 2003 movel %d3,%d0 479b0: 242e fff0 movel %fp@(-16),%d2 479b4: 262e fff4 movel %fp@(-12),%d3 479b8: 4e5e unlk %fp 479ba: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 479bc: 7604 moveq #4,%d3 } 479be: 2003 movel %d3,%d0 479c0: 242e fff0 movel %fp@(-16),%d2 479c4: 262e fff4 movel %fp@(-12),%d3 479c8: 4e5e unlk %fp 479ca: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 479cc: 4aae 000c tstl %fp@(12) 479d0: 6700 008c beqw 47a5e } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 479d4: 223c 0000 0700 movel #1792,%d1 479da: 40c3 movew %sr,%d3 479dc: 8283 orl %d3,%d1 479de: 46c1 movew %d1,%sr if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 479e0: 2040 moveal %d0,%a0 479e2: 2228 0038 movel %a0@(56),%d1 479e6: 6700 00aa beqw 47a92 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 479ea: 7402 moveq #2,%d2 479ec: b481 cmpl %d1,%d2 479ee: 6700 010c beqw 47afc _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 479f2: 7404 moveq #4,%d2 479f4: b481 cmpl %d1,%d2 479f6: 66c4 bnes 479bc <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 479f8: 2f00 movel %d0,%sp@- 479fa: 2d40 fff8 movel %d0,%fp@(-8) 479fe: 4eb9 0004 7856 jsr 47856 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 47a04: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 47a06: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 47a08: 7606 moveq #6,%d3 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 47a0a: 202e fff8 movel %fp@(-8),%d0 47a0e: 2040 moveal %d0,%a0 the_period->next_length = length; 47a10: 226e 000c moveal %fp@(12),%a1 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 47a14: 2141 0038 movel %d1,%a0@(56) the_period->next_length = length; 47a18: 2149 003c movel %a1,%a0@(60) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47a1c: 2149 001c movel %a1,%a0@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47a20: 4868 0010 pea %a0@(16) 47a24: 4879 0006 18d8 pea 618d8 <_Watchdog_Ticks_chain> 47a2a: 4eb9 0004 b958 jsr 4b958 <_Watchdog_Insert> 47a30: 202e fff8 movel %fp@(-8),%d0 47a34: 2040 moveal %d0,%a0 47a36: 2f28 003c movel %a0@(60),%sp@- 47a3a: 2f28 0040 movel %a0@(64),%sp@- 47a3e: 2079 0005 fef2 moveal 5fef2 <_Scheduler+0x34>,%a0 47a44: 4e90 jsr %a0@ _Watchdog_Insert_ticks( &the_period->Timer, length ); _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); 47a46: 4eb9 0004 aaa0 jsr 4aaa0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47a4c: 242e fff0 movel %fp@(-16),%d2 47a50: 2003 movel %d3,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 47a52: 4fef 0014 lea %sp@(20),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47a56: 262e fff4 movel %fp@(-12),%d3 47a5a: 4e5e unlk %fp 47a5c: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 47a5e: 2040 moveal %d0,%a0 47a60: 7204 moveq #4,%d1 47a62: 2028 0038 movel %a0@(56),%d0 47a66: b280 cmpl %d0,%d1 47a68: 651e bcss 47a88 <== NEVER TAKEN 47a6a: 41f9 0005 efba lea 5efba ,%a0 47a70: 2630 0c00 movel %a0@(00000000,%d0:l:4),%d3 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 47a74: 4eb9 0004 aaa0 jsr 4aaa0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47a7a: 2003 movel %d3,%d0 47a7c: 242e fff0 movel %fp@(-16),%d2 47a80: 262e fff4 movel %fp@(-12),%d3 47a84: 4e5e unlk %fp 47a86: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 47a88: 4283 clrl %d3 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 47a8a: 4eb9 0004 aaa0 jsr 4aaa0 <_Thread_Enable_dispatch> <== NOT EXECUTED 47a90: 60e8 bras 47a7a <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 47a92: 46c3 movew %d3,%sr the_period->next_length = length; 47a94: 226e 000c moveal %fp@(12),%a1 NULL ); _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47a98: 4283 clrl %d3 _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); the_period->next_length = length; 47a9a: 2149 003c movel %a1,%a0@(60) /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 47a9e: 2f00 movel %d0,%sp@- 47aa0: 2d40 fff8 movel %d0,%fp@(-8) 47aa4: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47aaa: 202e fff8 movel %fp@(-8),%d0 47aae: 2040 moveal %d0,%a0 47ab0: 43f9 0004 7e14 lea 47e14 <_Rate_monotonic_Timeout>,%a1 the_period->state = RATE_MONOTONIC_ACTIVE; 47ab6: 7202 moveq #2,%d1 the_watchdog->id = id; 47ab8: 2142 0030 movel %d2,%a0@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47abc: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47ac0: 2149 002c movel %a1,%a0@(44) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47ac4: 2142 001c movel %d2,%a0@(28) 47ac8: 2141 0038 movel %d1,%a0@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47acc: 42a8 0018 clrl %a0@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 47ad0: 42a8 0034 clrl %a0@(52) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47ad4: 4868 0010 pea %a0@(16) 47ad8: 4879 0006 18d8 pea 618d8 <_Watchdog_Ticks_chain> 47ade: 4eb9 0004 b958 jsr 4b958 <_Watchdog_Insert> id, NULL ); _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 47ae4: 4eb9 0004 aaa0 jsr 4aaa0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47aea: 242e fff0 movel %fp@(-16),%d2 47aee: 2003 movel %d3,%d0 NULL ); _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47af0: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47af4: 262e fff4 movel %fp@(-12),%d3 47af8: 4e5e unlk %fp 47afa: 4e75 rts if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 47afc: 2f00 movel %d0,%sp@- 47afe: 2d40 fff8 movel %d0,%fp@(-8) 47b02: 4eb9 0004 7856 jsr 47856 <_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; 47b08: 202e fff8 movel %fp@(-8),%d0 47b0c: 7201 moveq #1,%d1 47b0e: 2040 moveal %d0,%a0 the_period->next_length = length; 47b10: 226e 000c moveal %fp@(12),%a1 /* * 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; 47b14: 2141 0038 movel %d1,%a0@(56) the_period->next_length = length; 47b18: 2149 003c movel %a1,%a0@(60) _ISR_Enable( level ); 47b1c: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 47b1e: 2079 0006 19b4 moveal 619b4 <_Per_CPU_Information+0xc>,%a0 47b24: 2240 moveal %d0,%a1 47b26: 5089 addql #8,%a1 47b28: 2151 0020 movel %a1@,%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 47b2c: 4878 4000 pea 4000 47b30: 2d40 fff8 movel %d0,%fp@(-8) 47b34: 2f08 movel %a0,%sp@- 47b36: 4eb9 0004 b344 jsr 4b344 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 47b3c: 223c 0000 0700 movel #1792,%d1 47b42: 40c2 movew %sr,%d2 47b44: 8282 orl %d2,%d1 47b46: 46c1 movew %d1,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 47b48: 7602 moveq #2,%d3 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 47b4a: 202e fff8 movel %fp@(-8),%d0 47b4e: 2040 moveal %d0,%a0 47b50: 2228 0038 movel %a0@(56),%d1 the_period->state = RATE_MONOTONIC_ACTIVE; 47b54: 2143 0038 movel %d3,%a0@(56) _ISR_Enable( level ); 47b58: 46c2 movew %d2,%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 ) 47b5a: 7003 moveq #3,%d0 47b5c: 4fef 000c lea %sp@(12),%sp 47b60: b081 cmpl %d1,%d0 47b62: 6716 beqs 47b7a _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 47b64: 4eb9 0004 aaa0 jsr 4aaa0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47b6a: 4283 clrl %d3 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47b6c: 2003 movel %d3,%d0 47b6e: 242e fff0 movel %fp@(-16),%d2 47b72: 262e fff4 movel %fp@(-12),%d3 47b76: 4e5e unlk %fp 47b78: 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 ); 47b7a: 4878 4000 pea 4000 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47b7e: 4283 clrl %d3 /* * 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 ); 47b80: 2f39 0006 19b4 movel 619b4 <_Per_CPU_Information+0xc>,%sp@- 47b86: 4eb9 0004 a6a4 jsr 4a6a4 <_Thread_Clear_state> 47b8c: 508f addql #8,%sp _Thread_Enable_dispatch(); 47b8e: 4eb9 0004 aaa0 jsr 4aaa0 <_Thread_Enable_dispatch> 47b94: 60d6 bras 47b6c ... =============================================================================== 00047b98 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 47b98: 4e56 ff78 linkw %fp,#-136 47b9c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47ba0: 262e 0008 movel %fp@(8),%d3 47ba4: 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 ) 47ba8: 4a8a tstl %a2 47baa: 677c beqs 47c28 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 47bac: 4879 0005 efce pea 5efce 47bb2: 2f03 movel %d3,%sp@- 47bb4: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 47bb6: 4879 0005 efec pea 5efec 47bbc: 2f03 movel %d3,%sp@- 47bbe: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 47bc0: 4879 0005 f00e pea 5f00e 47bc6: 2f03 movel %d3,%sp@- 47bc8: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 47bca: 4879 0005 f031 pea 5f031 47bd0: 2f03 movel %d3,%sp@- 47bd2: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 47bd4: 4fef 001c lea %sp@(28),%sp 47bd8: 2ebc 0005 f07c movel #389244,%sp@ 47bde: 2f03 movel %d3,%sp@- 47be0: 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 ; 47be2: 2439 0006 1736 movel 61736 <_Rate_monotonic_Information+0x6>,%d2 47be8: 508f addql #8,%sp 47bea: b4b9 0006 173a cmpl 6173a <_Rate_monotonic_Information+0xa>,%d2 47bf0: 6236 bhis 47c28 <== NEVER TAKEN 47bf2: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 47bf4: 2c0e movel %fp,%d6 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47bf6: 2a0e movel %fp,%d5 47bf8: 0684 ffff ffa2 addil #-94,%d4 47bfe: 47f9 0004 d8f8 lea 4d8f8 ,%a3 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 47c04: 0686 ffff ffda addil #-38,%d6 47c0a: 4bf9 0004 d9cc lea 4d9cc ,%a5 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47c10: 5b85 subql #5,%d5 * 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 ); 47c12: 2f04 movel %d4,%sp@- 47c14: 2f02 movel %d2,%sp@- 47c16: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 47c18: 508f addql #8,%sp 47c1a: 4a80 tstl %d0 47c1c: 6714 beqs 47c32 * 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++ ) { 47c1e: 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 ; 47c20: b4b9 0006 173a cmpl 6173a <_Rate_monotonic_Information+0xa>,%d2 47c26: 63ea blss 47c12 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 47c28: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47c2e: 4e5e unlk %fp 47c30: 4e75 rts #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 47c32: 2f06 movel %d6,%sp@- 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 ); 47c34: 49f9 0004 b554 lea 4b554 <_Timespec_Divide_by_integer>,%a4 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 47c3a: 2f02 movel %d2,%sp@- 47c3c: 4e95 jsr %a5@ #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47c3e: 2f05 movel %d5,%sp@- 47c40: 4878 0005 pea 5 47c44: 2f2e ffda movel %fp@(-38),%sp@- 47c48: 4eb9 0004 7f08 jsr 47f08 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 47c4e: 2f2e ffa6 movel %fp@(-90),%sp@- 47c52: 2f2e ffa2 movel %fp@(-94),%sp@- 47c56: 2f05 movel %d5,%sp@- 47c58: 2f02 movel %d2,%sp@- 47c5a: 4879 0005 f0c8 pea 5f0c8 47c60: 2f03 movel %d3,%sp@- 47c62: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 47c64: 202e ffa2 movel %fp@(-94),%d0 47c68: 4fef 002c lea %sp@(44),%sp 47c6c: 6618 bnes 47c86 (*print)( context, "\n" ); 47c6e: 4879 0005 e667 pea 5e667 * 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++ ) { 47c74: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 47c76: 2f03 movel %d3,%sp@- 47c78: 4e92 jsr %a2@ continue; 47c7a: 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 ; 47c7c: b4b9 0006 173a cmpl 6173a <_Rate_monotonic_Information+0xa>,%d2 47c82: 638e blss 47c12 <== ALWAYS TAKEN 47c84: 60a2 bras 47c28 <== 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 ); 47c86: 486e fff2 pea %fp@(-14) * 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++ ) { 47c8a: 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 ); 47c8c: 2f00 movel %d0,%sp@- 47c8e: 486e ffba pea %fp@(-70) 47c92: 4e94 jsr %a4@ (*print)( context, 47c94: 202e fff6 movel %fp@(-10),%d0 47c98: 223c 0000 03e8 movel #1000,%d1 47c9e: 4c41 0800 remsl %d1,%d0,%d0 47ca2: 2e2e ffb6 movel %fp@(-74),%d7 47ca6: 2f00 movel %d0,%sp@- 47ca8: 2001 movel %d1,%d0 47caa: 2f2e fff2 movel %fp@(-14),%sp@- 47cae: 4c40 7807 remsl %d0,%d7,%d7 47cb2: 202e ffae movel %fp@(-82),%d0 47cb6: 2247 moveal %d7,%a1 47cb8: 223c 0000 03e8 movel #1000,%d1 47cbe: 2f09 movel %a1,%sp@- 47cc0: 2f2e ffb2 movel %fp@(-78),%sp@- 47cc4: 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, 47cc8: 2e3c 0000 03e8 movel #1000,%d7 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, 47cce: 2f00 movel %d0,%sp@- 47cd0: 2f2e ffaa movel %fp@(-86),%sp@- 47cd4: 4879 0005 f0df pea 5f0df 47cda: 2f03 movel %d3,%sp@- 47cdc: 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); 47cde: 4fef 002c lea %sp@(44),%sp 47ce2: 486e fff2 pea %fp@(-14) 47ce6: 2f2e ffa2 movel %fp@(-94),%sp@- 47cea: 486e ffd2 pea %fp@(-46) 47cee: 4e94 jsr %a4@ (*print)( context, 47cf0: 202e fff6 movel %fp@(-10),%d0 47cf4: 4c47 0800 remsl %d7,%d0,%d0 47cf8: 222e ffce movel %fp@(-50),%d1 47cfc: 2f00 movel %d0,%sp@- 47cfe: 2f2e fff2 movel %fp@(-14),%sp@- 47d02: 4c47 1801 remsl %d7,%d1,%d1 47d06: 202e ffc6 movel %fp@(-58),%d0 47d0a: 2241 moveal %d1,%a1 47d0c: 2f09 movel %a1,%sp@- 47d0e: 2f2e ffca movel %fp@(-54),%sp@- 47d12: 4c47 0800 remsl %d7,%d0,%d0 47d16: 2f00 movel %d0,%sp@- 47d18: 2f2e ffc2 movel %fp@(-62),%sp@- 47d1c: 4879 0005 f0fe pea 5f0fe 47d22: 2f03 movel %d3,%sp@- 47d24: 4e92 jsr %a2@ 47d26: 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 ; 47d2a: b4b9 0006 173a cmpl 6173a <_Rate_monotonic_Information+0xa>,%d2 47d30: 6300 fee0 blsw 47c12 47d34: 6000 fef2 braw 47c28 <== NOT EXECUTED =============================================================================== 00047d50 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 47d50: 4e56 0000 linkw %fp,#0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 47d54: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47d5a: 5280 addql #1,%d0 47d5c: 2f0a movel %a2,%sp@- 47d5e: 23c0 0006 1820 movel %d0,61820 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47d64: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47d6a: 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 ; 47d6c: 2439 0006 1736 movel 61736 <_Rate_monotonic_Information+0x6>,%d2 47d72: b4b9 0006 173a cmpl 6173a <_Rate_monotonic_Information+0xa>,%d2 47d78: 6216 bhis 47d90 <== NEVER TAKEN 47d7a: 45f9 0004 7da0 lea 47da0 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); 47d80: 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++ ) { 47d82: 5282 addql #1,%d2 (void) rtems_rate_monotonic_reset_statistics( id ); 47d84: 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 ; 47d86: 588f addql #4,%sp 47d88: b4b9 0006 173a cmpl 6173a <_Rate_monotonic_Information+0xa>,%d2 47d8e: 63f0 blss 47d80 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 47d90: 242e fff8 movel %fp@(-8),%d2 47d94: 246e fffc moveal %fp@(-4),%a2 47d98: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 47d9a: 4ef9 0004 aaa0 jmp 4aaa0 <_Thread_Enable_dispatch> =============================================================================== 00055a80 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 55a80: 4e56 fff8 linkw %fp,#-8 55a84: 2f0a movel %a2,%sp@- 55a86: 2f02 movel %d2,%sp@- 55a88: 242e 000c movel %fp@(12),%d2 bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 55a8c: 6700 0086 beqw 55b14 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 55a90: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55a96: 4eb9 0005 816c jsr 5816c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 55a9c: 486e fffc pea %fp@(-4) 55aa0: 2f2e 0008 movel %fp@(8),%sp@- 55aa4: 4879 0007 c3c4 pea 7c3c4 <_Region_Information> 55aaa: 4eb9 0005 9dd4 jsr 59dd4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 55ab0: 4fef 0010 lea %sp@(16),%sp 55ab4: 2440 moveal %d0,%a2 55ab6: 4aae fffc tstl %fp@(-4) 55aba: 6646 bnes 55b02 case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 55abc: 486e fff8 pea %fp@(-8) 55ac0: 2f2e 0010 movel %fp@(16),%sp@- 55ac4: 2f02 movel %d2,%sp@- 55ac6: 486a 0068 pea %a2@(104) 55aca: 4eb9 0005 8e98 jsr 58e98 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 55ad0: 4fef 0010 lea %sp@(16),%sp 55ad4: 4a00 tstb %d0 55ad6: 674c beqs 55b24 the_region->length += amount_extended; 55ad8: 202e fff8 movel %fp@(-8),%d0 55adc: d1aa 0054 addl %d0,%a2@(84) the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; 55ae0: 4282 clrl %d2 &amount_extended ); if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; 55ae2: d1aa 005c addl %d0,%a2@(92) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55ae6: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55aec: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55af2: 588f addql #4,%sp } 55af4: 2002 movel %d2,%d0 55af6: 242e fff0 movel %fp@(-16),%d2 55afa: 246e fff4 moveal %fp@(-12),%a2 55afe: 4e5e unlk %fp 55b00: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55b02: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 55b08: 7404 moveq #4,%d2 break; } _RTEMS_Unlock_allocator(); 55b0a: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55b10: 588f addql #4,%sp 55b12: 60e0 bras 55af4 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 55b14: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 55b16: 2002 movel %d2,%d0 55b18: 242e fff0 movel %fp@(-16),%d2 55b1c: 246e fff4 moveal %fp@(-12),%a2 55b20: 4e5e unlk %fp 55b22: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55b24: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; 55b2a: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55b2c: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55b32: 588f addql #4,%sp 55b34: 60be bras 55af4 ... =============================================================================== 00055bd0 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 55bd0: 4e56 fffc linkw %fp,#-4 55bd4: 2f02 movel %d2,%sp@- 55bd6: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 55bda: 6766 beqs 55c42 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 55bdc: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55be2: 4eb9 0005 816c jsr 5816c <_API_Mutex_Lock> 55be8: 486e fffc pea %fp@(-4) 55bec: 2f2e 0008 movel %fp@(8),%sp@- 55bf0: 4879 0007 c3c4 pea 7c3c4 <_Region_Information> 55bf6: 4eb9 0005 9dd4 jsr 59dd4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 55bfc: 4fef 0010 lea %sp@(16),%sp 55c00: 4aae fffc tstl %fp@(-4) 55c04: 662a bnes 55c30 case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 55c06: 2f02 movel %d2,%sp@- 55c08: 2040 moveal %d0,%a0 55c0a: 4868 0068 pea %a0@(104) return_status = RTEMS_SUCCESSFUL; 55c0e: 4282 clrl %d2 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 55c10: 4eb9 0005 92d0 jsr 592d0 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 55c16: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55c18: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55c1e: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55c24: 588f addql #4,%sp } 55c26: 2002 movel %d2,%d0 55c28: 242e fff8 movel %fp@(-8),%d2 55c2c: 4e5e unlk %fp 55c2e: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55c30: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 55c36: 7404 moveq #4,%d2 break; } _RTEMS_Unlock_allocator(); 55c38: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55c3e: 588f addql #4,%sp 55c40: 60e4 bras 55c26 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 55c42: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 55c44: 2002 movel %d2,%d0 55c46: 242e fff8 movel %fp@(-8),%d2 55c4a: 4e5e unlk %fp ... =============================================================================== 00055dc0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 55dc0: 4e56 fff8 linkw %fp,#-8 55dc4: 2f03 movel %d3,%sp@- 55dc6: 262e 0010 movel %fp@(16),%d3 55dca: 2f02 movel %d2,%sp@- 55dcc: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 55dd0: 676a beqs 55e3c return RTEMS_INVALID_ADDRESS; if ( !size ) 55dd2: 4a83 tstl %d3 55dd4: 6766 beqs 55e3c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 55dd6: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55ddc: 4eb9 0005 816c jsr 5816c <_API_Mutex_Lock> 55de2: 486e fffc pea %fp@(-4) 55de6: 2f2e 0008 movel %fp@(8),%sp@- 55dea: 4879 0007 c3c4 pea 7c3c4 <_Region_Information> 55df0: 4eb9 0005 9dd4 jsr 59dd4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 55df6: 222e fffc movel %fp@(-4),%d1 55dfa: 4fef 0010 lea %sp@(16),%sp 55dfe: 664a bnes 55e4a case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 55e00: 2f03 movel %d3,%sp@- 55e02: 2040 moveal %d0,%a0 55e04: 2f02 movel %d2,%sp@- 55e06: 4868 0068 pea %a0@(104) 55e0a: 4eb9 0005 97e8 jsr 597e8 <_Heap_Size_of_alloc_area> 55e10: 4fef 000c lea %sp@(12),%sp 55e14: 4a00 tstb %d0 55e16: 676c beqs 55e84 <== NEVER TAKEN void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 55e18: 4280 clrl %d0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55e1a: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55e20: 2d40 fff8 movel %d0,%fp@(-8) 55e24: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55e2a: 202e fff8 movel %fp@(-8),%d0 55e2e: 588f addql #4,%sp } 55e30: 242e fff0 movel %fp@(-16),%d2 55e34: 262e fff4 movel %fp@(-12),%d3 55e38: 4e5e unlk %fp 55e3a: 4e75 rts 55e3c: 242e fff0 movel %fp@(-16),%d2 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 55e40: 7009 moveq #9,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 55e42: 262e fff4 movel %fp@(-12),%d3 55e46: 4e5e unlk %fp 55e48: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 55e4a: 7001 moveq #1,%d0 55e4c: b081 cmpl %d1,%d0 55e4e: 671a beqs 55e6a <== ALWAYS TAKEN void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 55e50: 4200 clrb %d0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55e52: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED 55e58: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 55e5c: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 55e62: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 55e66: 588f addql #4,%sp <== NOT EXECUTED 55e68: 60c6 bras 55e30 <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ break; #endif case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; 55e6a: 7004 moveq #4,%d0 break; } _RTEMS_Unlock_allocator(); 55e6c: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55e72: 2d40 fff8 movel %d0,%fp@(-8) 55e76: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55e7c: 202e fff8 movel %fp@(-8),%d0 55e80: 588f addql #4,%sp 55e82: 60ac bras 55e30 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) return_status = RTEMS_INVALID_ADDRESS; 55e84: 7009 moveq #9,%d0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55e86: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED 55e8c: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 55e90: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 55e96: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 55e9a: 588f addql #4,%sp <== NOT EXECUTED 55e9c: 6092 bras 55e30 <== NOT EXECUTED ... =============================================================================== 00055f9c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 55f9c: 4e56 fffc linkw %fp,#-4 55fa0: 2f0a movel %a2,%sp@- 55fa2: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 55fa4: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 55faa: 4eb9 0005 816c jsr 5816c <_API_Mutex_Lock> 55fb0: 486e fffc pea %fp@(-4) 55fb4: 2f2e 0008 movel %fp@(8),%sp@- 55fb8: 4879 0007 c3c4 pea 7c3c4 <_Region_Information> 55fbe: 4eb9 0005 9dd4 jsr 59dd4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 55fc4: 4fef 0010 lea %sp@(16),%sp 55fc8: 2440 moveal %d0,%a2 55fca: 4aae fffc tstl %fp@(-4) 55fce: 6632 bnes 56002 <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 55fd0: 2f2e 000c movel %fp@(12),%sp@- 55fd4: 486a 0068 pea %a2@(104) 55fd8: 4eb9 0005 90f4 jsr 590f4 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 55fde: 508f addql #8,%sp 55fe0: 4a00 tstb %d0 55fe2: 6630 bnes 56014 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55fe4: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; 55fea: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 55fec: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 55ff2: 588f addql #4,%sp } 55ff4: 2002 movel %d2,%d0 55ff6: 242e fff4 movel %fp@(-12),%d2 55ffa: 246e fff8 moveal %fp@(-8),%a2 55ffe: 4e5e unlk %fp 56000: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56002: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 56008: 7404 moveq #4,%d2 break; } _RTEMS_Unlock_allocator(); 5600a: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> return return_status; 56010: 588f addql #4,%sp 56012: 60e0 bras 55ff4 _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 56014: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 56018: 4282 clrl %d2 if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ 5601a: 2f0a movel %a2,%sp@- 5601c: 4eb9 0005 db60 jsr 5db60 <_Region_Process_queue> break; } _RTEMS_Unlock_allocator(); return return_status; } 56022: 246e fff8 moveal %fp@(-8),%a2 56026: 2002 movel %d2,%d0 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 56028: 588f addql #4,%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 5602a: 242e fff4 movel %fp@(-12),%d2 5602e: 4e5e unlk %fp ... =============================================================================== 000469f4 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 469f4: 4e56 fffc linkw %fp,#-4 469f8: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 469fa: 486e fffc pea %fp@(-4) 469fe: 2f2e 0008 movel %fp@(8),%sp@- 46a02: 4879 0005 f880 pea 5f880 <_Semaphore_Information> 46a08: 4eb9 0004 83f8 jsr 483f8 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 46a0e: 4fef 000c lea %sp@(12),%sp 46a12: 2440 moveal %d0,%a2 46a14: 4aae fffc tstl %fp@(-4) 46a18: 6624 bnes 46a3e 46a1a: 7030 moveq #48,%d0 46a1c: c0aa 0010 andl %a2@(16),%d0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 46a20: 6726 beqs 46a48 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 46a22: 4aaa 0062 tstl %a2@(98) 46a26: 6664 bnes 46a8c 46a28: 7220 moveq #32,%d1 46a2a: b280 cmpl %d0,%d1 46a2c: 675e beqs 46a8c !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 46a2e: 4eb9 0004 9134 jsr 49134 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46a34: 246e fff8 moveal %fp@(-8),%a2 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(); return RTEMS_RESOURCE_IN_USE; 46a38: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46a3a: 4e5e unlk %fp 46a3c: 4e75 rts 46a3e: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 46a42: 7004 moveq #4,%d0 } 46a44: 4e5e unlk %fp 46a46: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 46a48: 4878 0002 pea 2 46a4c: 42a7 clrl %sp@- 46a4e: 486a 0014 pea %a2@(20) 46a52: 4eb9 0004 7900 jsr 47900 <_CORE_semaphore_Flush> 46a58: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 46a5c: 2f0a movel %a2,%sp@- 46a5e: 4879 0005 f880 pea 5f880 <_Semaphore_Information> 46a64: 4eb9 0004 7fc4 jsr 47fc4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 46a6a: 2f0a movel %a2,%sp@- 46a6c: 4879 0005 f880 pea 5f880 <_Semaphore_Information> 46a72: 4eb9 0004 8284 jsr 48284 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 46a78: 4eb9 0004 9134 jsr 49134 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46a7e: 4fef 0010 lea %sp@(16),%sp 46a82: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46a84: 246e fff8 moveal %fp@(-8),%a2 46a88: 4e5e unlk %fp 46a8a: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 46a8c: 4878 0003 pea 3 46a90: 42a7 clrl %sp@- 46a92: 486a 0014 pea %a2@(20) 46a96: 4eb9 0004 75b8 jsr 475b8 <_CORE_mutex_Flush> 46a9c: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 46aa0: 2f0a movel %a2,%sp@- 46aa2: 4879 0005 f880 pea 5f880 <_Semaphore_Information> 46aa8: 4eb9 0004 7fc4 jsr 47fc4 <_Objects_Close> 46aae: 2f0a movel %a2,%sp@- 46ab0: 4879 0005 f880 pea 5f880 <_Semaphore_Information> 46ab6: 4eb9 0004 8284 jsr 48284 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 46abc: 4eb9 0004 9134 jsr 49134 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46ac2: 4fef 0010 lea %sp@(16),%sp 46ac6: 4280 clrl %d0 46ac8: 60ba bras 46a84 ... =============================================================================== 0004fdf8 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 4fdf8: 4e56 fffc linkw %fp,#-4 4fdfc: 486e fffc pea %fp@(-4) 4fe00: 2f2e 0008 movel %fp@(8),%sp@- 4fe04: 4879 0006 3728 pea 63728 <_Semaphore_Information> 4fe0a: 4eb9 0004 9758 jsr 49758 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4fe10: 4fef 000c lea %sp@(12),%sp 4fe14: 4aae fffc tstl %fp@(-4) 4fe18: 662a bnes 4fe44 4fe1a: 7230 moveq #48,%d1 4fe1c: 2040 moveal %d0,%a0 4fe1e: c2a8 0010 andl %a0@(16),%d1 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4fe22: 6726 beqs 4fe4a _CORE_mutex_Flush( 4fe24: 4878 0001 pea 1 4fe28: 42a7 clrl %sp@- 4fe2a: 4868 0014 pea %a0@(20) 4fe2e: 4eb9 0004 8918 jsr 48918 <_CORE_mutex_Flush> 4fe34: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 4fe38: 4eb9 0004 a49c jsr 4a49c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4fe3e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4fe40: 4e5e unlk %fp 4fe42: 4e75 rts case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4fe44: 7004 moveq #4,%d0 } 4fe46: 4e5e unlk %fp 4fe48: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 4fe4a: 4878 0001 pea 1 4fe4e: 2040 moveal %d0,%a0 4fe50: 42a7 clrl %sp@- 4fe52: 4868 0014 pea %a0@(20) 4fe56: 4eb9 0004 8c60 jsr 48c60 <_CORE_semaphore_Flush> 4fe5c: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 4fe60: 4eb9 0004 a49c jsr 4a49c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4fe66: 4280 clrl %d0 4fe68: 60d6 bras 4fe40 ... =============================================================================== 000471c4 : void rtems_shutdown_executive( uint32_t result ) { if ( _System_state_Is_up( _System_state_Get() ) ) { 471c4: 7003 moveq #3,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 471c6: 4e56 0000 linkw %fp,#0 if ( _System_state_Is_up( _System_state_Get() ) ) { 471ca: b0b9 0005 fa78 cmpl 5fa78 <_System_state_Current>,%d0 471d0: 6710 beqs 471e2 ****** AND THEN TO BOOT_CARD() ****** ******************************************************************* ******************************************************************* *******************************************************************/ } _Internal_error_Occurred( 471d2: 4878 0014 pea 14 471d6: 4878 0001 pea 1 471da: 42a7 clrl %sp@- 471dc: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> if ( _System_state_Is_up( _System_state_Get() ) ) { #if defined(RTEMS_SMP) _SMP_Request_other_cores_to_shutdown(); #endif _Per_CPU_Information[0].idle->Wait.return_code = result; 471e2: 2079 0005 fad4 moveal 5fad4 <_Per_CPU_Information+0x14>,%a0 471e8: 103c 0004 moveb #4,%d0 471ec: 216e 0008 0034 movel %fp@(8),%a0@(52) * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 471f2: 4879 0005 f904 pea 5f904 <_Thread_BSP_context> 471f8: 23c0 0005 fa78 movel %d0,5fa78 <_System_state_Current> 471fe: 4eb9 0004 a23e jsr 4a23e <_CPU_Context_Restart_self> 47204: 588f addql #4,%sp <== NOT EXECUTED ****** AND THEN TO BOOT_CARD() ****** ******************************************************************* ******************************************************************* *******************************************************************/ } _Internal_error_Occurred( 47206: 4878 0014 pea 14 <== NOT EXECUTED 4720a: 4878 0001 pea 1 <== NOT EXECUTED 4720e: 42a7 clrl %sp@- <== NOT EXECUTED 47210: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> <== NOT EXECUTED ... =============================================================================== 00056580 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 56580: 4e56 fffc linkw %fp,#-4 56584: 2f03 movel %d3,%sp@- 56586: 2f02 movel %d2,%sp@- 56588: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 5658c: 660e bnes 5659c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5658e: 242e fff4 movel %fp@(-12),%d2 Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 56592: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56594: 262e fff8 movel %fp@(-8),%d3 56598: 4e5e unlk %fp 5659a: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 5659c: 486e fffc pea %fp@(-4) 565a0: 2f2e 0008 movel %fp@(8),%sp@- 565a4: 4eb9 0005 ab74 jsr 5ab74 <_Thread_Get> switch ( location ) { 565aa: 508f addql #8,%sp 565ac: 4aae fffc tstl %fp@(-4) 565b0: 6648 bnes 565fa case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 565b2: 2240 moveal %d0,%a1 565b4: 2069 00fc moveal %a1@(252),%a0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 565b8: 4aa8 000a tstl %a0@(10) 565bc: 674a beqs 56608 if ( asr->is_enabled ) { 565be: 4a28 0008 tstb %a0@(8) 565c2: 676a beqs 5662e rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 565c4: 223c 0000 0700 movel #1792,%d1 565ca: 40c3 movew %sr,%d3 565cc: 8283 orl %d3,%d1 565ce: 46c1 movew %d1,%sr *signal_set |= signals; 565d0: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 565d4: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 565d6: 4ab9 0007 c64c tstl 7c64c <_Per_CPU_Information+0x8> 565dc: 6708 beqs 565e6 565de: b0b9 0007 c650 cmpl 7c650 <_Per_CPU_Information+0xc>,%d0 565e4: 6736 beqs 5661c <== ALWAYS TAKEN _Thread_Dispatch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 565e6: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 565ec: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 565ee: 242e fff4 movel %fp@(-12),%d2 565f2: 262e fff8 movel %fp@(-8),%d3 565f6: 4e5e unlk %fp 565f8: 4e75 rts 565fa: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 565fe: 7004 moveq #4,%d0 } 56600: 262e fff8 movel %fp@(-8),%d3 56604: 4e5e unlk %fp 56606: 4e75 rts _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56608: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5660e: 242e fff4 movel %fp@(-12),%d2 } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; 56612: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56614: 262e fff8 movel %fp@(-8),%d3 56618: 4e5e unlk %fp 5661a: 4e75 rts if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 5661c: 7001 moveq #1,%d0 5661e: 13c0 0007 c65c moveb %d0,7c65c <_Per_CPU_Information+0x18> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 56624: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5662a: 4280 clrl %d0 5662c: 60c0 bras 565ee rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 5662e: 203c 0000 0700 movel #1792,%d0 56634: 40c1 movew %sr,%d1 56636: 8081 orl %d1,%d0 56638: 46c0 movew %d0,%sr *signal_set |= signals; 5663a: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 5663e: 46c1 movew %d1,%sr if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 56640: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 56646: 4280 clrl %d0 56648: 60a4 bras 565ee ... =============================================================================== 00046e1c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 46e1c: 4e56 fffc linkw %fp,#-4 46e20: 2f0b movel %a3,%sp@- 46e22: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 46e24: 2f39 0005 f9d8 movel 5f9d8 <_RTEMS_Allocator_Mutex>,%sp@- 46e2a: 4eb9 0004 7484 jsr 47484 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 46e30: 486e fffc pea %fp@(-4) 46e34: 2f2e 0008 movel %fp@(8),%sp@- 46e38: 4eb9 0004 915c jsr 4915c <_Thread_Get> switch ( location ) { 46e3e: 4fef 000c lea %sp@(12),%sp Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); 46e42: 2440 moveal %d0,%a2 switch ( location ) { 46e44: 4aae fffc tstl %fp@(-4) 46e48: 664a bnes 46e94 <== NEVER TAKEN case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 46e4a: 2f2a 0008 movel %a2@(8),%sp@- 46e4e: 47f9 0004 8308 lea 48308 <_Objects_Get_information_id>,%a3 46e54: 4e93 jsr %a3@ 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 46e56: 2f0a movel %a2,%sp@- 46e58: 2f00 movel %d0,%sp@- 46e5a: 4eb9 0004 8d94 jsr 48d94 <_Thread_Close> 46e60: 2f2a 0008 movel %a2@(8),%sp@- 46e64: 4e93 jsr %a3@ 46e66: 2f0a movel %a2,%sp@- 46e68: 2f00 movel %d0,%sp@- 46e6a: 4eb9 0004 8284 jsr 48284 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 46e70: 2f39 0005 f9d8 movel 5f9d8 <_RTEMS_Allocator_Mutex>,%sp@- 46e76: 4eb9 0004 74e4 jsr 474e4 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 46e7c: 4eb9 0004 9134 jsr 49134 <_Thread_Enable_dispatch> break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 46e82: 246e fff4 moveal %fp@(-12),%a2 _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 46e86: 4fef 001c lea %sp@(28),%sp 46e8a: 4280 clrl %d0 break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 46e8c: 266e fff8 moveal %fp@(-8),%a3 46e90: 4e5e unlk %fp 46e92: 4e75 rts case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 46e94: 2f39 0005 f9d8 movel 5f9d8 <_RTEMS_Allocator_Mutex>,%sp@- 46e9a: 4eb9 0004 74e4 jsr 474e4 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; } 46ea0: 246e fff4 moveal %fp@(-12),%a2 case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; 46ea4: 588f addql #4,%sp 46ea6: 7004 moveq #4,%d0 } 46ea8: 266e fff8 moveal %fp@(-8),%a3 46eac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dbd4 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4dbd4: 4e56 ffe4 linkw %fp,#-28 4dbd8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4dbdc: 2a2e 0008 movel %fp@(8),%d5 4dbe0: 242e 000c movel %fp@(12),%d2 4dbe4: 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 ) 4dbe8: 4a8c tstl %a4 4dbea: 6700 0148 beqw 4dd34 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4dbee: 2479 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4dbf4: 4a2a 0074 tstb %a2@(116) 4dbf8: 57c3 seq %d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4dbfa: 266a 00fc moveal %a2@(252),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4dbfe: 49c3 extbl %d3 4dc00: 0283 0000 0100 andil #256,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4dc06: 4aaa 007a tstl %a2@(122) 4dc0a: 6600 00cc bnew 4dcd8 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4dc0e: 4a2b 0008 tstb %a3@(8) 4dc12: 57c4 seq %d4 old_mode |= _ISR_Get_level(); 4dc14: 4eb9 0004 a2e4 jsr 4a2e4 <_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; 4dc1a: 49c4 extbl %d4 4dc1c: 0284 0000 0400 andil #1024,%d4 4dc22: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); 4dc24: 8083 orl %d3,%d0 4dc26: 2880 movel %d0,%a4@ *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4dc28: 0802 0008 btst #8,%d2 4dc2c: 670c beqs 4dc3a executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4dc2e: 0805 0008 btst #8,%d5 4dc32: 57c0 seq %d0 4dc34: 4480 negl %d0 4dc36: 1540 0074 moveb %d0,%a2@(116) if ( mask & RTEMS_TIMESLICE_MASK ) { 4dc3a: 0802 0009 btst #9,%d2 4dc3e: 6718 beqs 4dc58 if ( _Modes_Is_timeslice(mode_set) ) { 4dc40: 0805 0009 btst #9,%d5 4dc44: 6700 00fa beqw 4dd40 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4dc48: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4dc4a: 41f9 0005 f8f0 lea 5f8f0 <_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; 4dc50: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4dc54: 2550 0076 movel %a0@,%a2@(118) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4dc58: 7007 moveq #7,%d0 4dc5a: c082 andl %d2,%d0 4dc5c: 6712 beqs 4dc70 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4dc5e: 40c0 movew %sr,%d0 */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 4dc60: 7207 moveq #7,%d1 4dc62: c285 andl %d5,%d1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4dc64: 0280 0000 f8ff andil #63743,%d0 4dc6a: e189 lsll #8,%d1 4dc6c: 8081 orl %d1,%d0 4dc6e: 46c0 movew %d0,%sr * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4dc70: 0802 000a btst #10,%d2 4dc74: 6754 beqs 4dcca is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 4dc76: 4282 clrl %d2 4dc78: 142b 0008 moveb %a3@(8),%d2 4dc7c: 4280 clrl %d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4dc7e: 0805 000a btst #10,%d5 4dc82: 57c1 seq %d1 4dc84: 4481 negl %d1 is_asr_enabled = false; 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 ) { 4dc86: 1001 moveb %d1,%d0 4dc88: b082 cmpl %d2,%d0 4dc8a: 673e beqs 4dcca ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4dc8c: 203c 0000 0700 movel #1792,%d0 asr->is_enabled = is_asr_enabled; 4dc92: 1741 0008 moveb %d1,%a3@(8) 4dc96: 40c1 movew %sr,%d1 4dc98: 8081 orl %d1,%d0 4dc9a: 46c0 movew %d0,%sr _signals = information->signals_pending; 4dc9c: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4dca0: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4dca6: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4dcaa: 46c1 movew %d1,%sr /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4dcac: 4aab 0012 tstl %a3@(18) 4dcb0: 56c0 sne %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4dcb2: 7203 moveq #3,%d1 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4dcb4: 4480 negl %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4dcb6: b2b9 0005 fa78 cmpl 5fa78 <_System_state_Current>,%d1 4dcbc: 6744 beqs 4dd02 <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 4dcbe: 4280 clrl %d0 } 4dcc0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4dcc6: 4e5e unlk %fp 4dcc8: 4e75 rts needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4dcca: 7203 moveq #3,%d1 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4dccc: 4200 clrb %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4dcce: b2b9 0005 fa78 cmpl 5fa78 <_System_state_Current>,%d1 4dcd4: 66e8 bnes 4dcbe 4dcd6: 602a bras 4dd02 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; 4dcd8: 4a2b 0008 tstb %a3@(8) 4dcdc: 57c4 seq %d4 old_mode |= _ISR_Get_level(); 4dcde: 4eb9 0004 a2e4 jsr 4a2e4 <_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; 4dce4: 49c4 extbl %d4 4dce6: 0284 0000 0400 andil #1024,%d4 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; 4dcec: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4dcf0: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); 4dcf2: 8083 orl %d3,%d0 4dcf4: 2880 movel %d0,%a4@ *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4dcf6: 0802 0008 btst #8,%d2 4dcfa: 6700 ff3e beqw 4dc3a 4dcfe: 6000 ff2e braw 4dc2e bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 4dd02: 2079 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a0 if ( are_signals_pending || 4dd08: 4a00 tstb %d0 4dd0a: 660e bnes 4dd1a 4dd0c: b1f9 0005 fad0 cmpal 5fad0 <_Per_CPU_Information+0x10>,%a0 4dd12: 67aa beqs 4dcbe (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 4dd14: 4a28 0074 tstb %a0@(116) 4dd18: 67a4 beqs 4dcbe <== NEVER TAKEN _Thread_Dispatch_necessary = true; 4dd1a: 7001 moveq #1,%d0 4dd1c: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 4dd22: 4eb9 0004 8fb8 jsr 48fb8 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; } 4dd28: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 4dd2e: 4280 clrl %d0 } 4dd30: 4e5e unlk %fp 4dd32: 4e75 rts bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 4dd34: 7009 moveq #9,%d0 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 4dd36: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4dd3c: 4e5e unlk %fp 4dd3e: 4e75 rts } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4dd40: 7007 moveq #7,%d0 4dd42: 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; 4dd44: 42aa 007a clrl %a2@(122) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4dd48: 4a80 tstl %d0 4dd4a: 6700 ff24 beqw 4dc70 4dd4e: 6000 ff0e braw 4dc5e ... =============================================================================== 0004b07c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4b07c: 4e56 fffc linkw %fp,#-4 4b080: 2f0a movel %a2,%sp@- 4b082: 246e 0010 moveal %fp@(16),%a2 4b086: 2f02 movel %d2,%sp@- 4b088: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4b08c: 670c beqs 4b09a RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 4b08e: 4280 clrl %d0 4b090: 1039 0006 203a moveb 6203a ,%d0 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4b096: b082 cmpl %d2,%d0 4b098: 6574 bcss 4b10e !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4b09a: 4a8a tstl %a2 4b09c: 6754 beqs 4b0f2 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4b09e: 486e fffc pea %fp@(-4) 4b0a2: 2f2e 0008 movel %fp@(8),%sp@- 4b0a6: 4eb9 0004 d498 jsr 4d498 <_Thread_Get> switch ( location ) { 4b0ac: 508f addql #8,%sp 4b0ae: 4aae fffc tstl %fp@(-4) 4b0b2: 664c bnes 4b100 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4b0b4: 2040 moveal %d0,%a0 4b0b6: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4b0ba: 4a82 tstl %d2 4b0bc: 6720 beqs 4b0de the_thread->real_priority = new_priority; 4b0be: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4b0c2: 4aa8 001c tstl %a0@(28) 4b0c6: 6706 beqs 4b0ce 4b0c8: b4a8 0014 cmpl %a0@(20),%d2 4b0cc: 6410 bccs 4b0de <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 4b0ce: 42a7 clrl %sp@- 4b0d0: 2f02 movel %d2,%sp@- 4b0d2: 2f00 movel %d0,%sp@- 4b0d4: 4eb9 0004 cf90 jsr 4cf90 <_Thread_Change_priority> 4b0da: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4b0de: 4eb9 0004 d470 jsr 4d470 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b0e4: 242e fff4 movel %fp@(-12),%d2 if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4b0e8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b0ea: 246e fff8 moveal %fp@(-8),%a2 4b0ee: 4e5e unlk %fp 4b0f0: 4e75 rts 4b0f2: 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 ) return RTEMS_INVALID_ADDRESS; 4b0f6: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b0f8: 246e fff8 moveal %fp@(-8),%a2 4b0fc: 4e5e unlk %fp 4b0fe: 4e75 rts 4b100: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4b104: 7004 moveq #4,%d0 } 4b106: 246e fff8 moveal %fp@(-8),%a2 4b10a: 4e5e unlk %fp 4b10c: 4e75 rts 4b10e: 242e fff4 movel %fp@(-12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 4b112: 7013 moveq #19,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b114: 246e fff8 moveal %fp@(-8),%a2 4b118: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047c48 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 47c48: 4e56 fffc linkw %fp,#-4 47c4c: 2f02 movel %d2,%sp@- 47c4e: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 47c52: 6740 beqs 47c94 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 47c54: 486e fffc pea %fp@(-4) 47c58: 2f2e 0008 movel %fp@(8),%sp@- 47c5c: 4eb9 0004 9e50 jsr 49e50 <_Thread_Get> switch (location) { 47c62: 508f addql #8,%sp 47c64: 4aae fffc tstl %fp@(-4) 47c68: 6620 bnes 47c8a case OBJECTS_LOCAL: tvp = the_thread->task_variables; 47c6a: 2040 moveal %d0,%a0 47c6c: 2268 0108 moveal %a0@(264),%a1 while (tvp) { 47c70: 4a89 tstl %a1 47c72: 672a beqs 47c9e if (tvp->ptr == ptr) { 47c74: b4a9 0004 cmpl %a1@(4),%d2 47c78: 6752 beqs 47ccc _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 47c7a: 2051 moveal %a1@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 47c7c: 4a88 tstl %a0 47c7e: 671e beqs 47c9e <== NEVER TAKEN if (tvp->ptr == ptr) { 47c80: b4a8 0004 cmpl %a0@(4),%d2 47c84: 6728 beqs 47cae 47c86: 2248 moveal %a0,%a1 47c88: 60f0 bras 47c7a case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47c8a: 242e fff8 movel %fp@(-8),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 47c8e: 7004 moveq #4,%d0 } 47c90: 4e5e unlk %fp 47c92: 4e75 rts 47c94: 242e fff8 movel %fp@(-8),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 47c98: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47c9a: 4e5e unlk %fp 47c9c: 4e75 rts return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47c9e: 4eb9 0004 9e28 jsr 49e28 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47ca4: 242e fff8 movel %fp@(-8),%d2 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 47ca8: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47caa: 4e5e unlk %fp 47cac: 4e75 rts case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 47cae: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47cb0: 2f08 movel %a0,%sp@- 47cb2: 2f00 movel %d0,%sp@- 47cb4: 4eb9 0004 7d78 jsr 47d78 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47cba: 4eb9 0004 9e28 jsr 49e28 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47cc0: 508f addql #8,%sp 47cc2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47cc4: 242e fff8 movel %fp@(-8),%d2 47cc8: 4e5e unlk %fp 47cca: 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; 47ccc: 2040 moveal %d0,%a0 47cce: 2151 0108 movel %a1@,%a0@(264) 47cd2: 2049 moveal %a1,%a0 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47cd4: 2f08 movel %a0,%sp@- 47cd6: 2f00 movel %d0,%sp@- 47cd8: 4eb9 0004 7d78 jsr 47d78 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47cde: 4eb9 0004 9e28 jsr 49e28 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47ce4: 508f addql #8,%sp 47ce6: 4280 clrl %d0 47ce8: 60da bras 47cc4 ... =============================================================================== 00047cec : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 47cec: 4e56 fffc linkw %fp,#-4 47cf0: 2f0a movel %a2,%sp@- 47cf2: 246e 0010 moveal %fp@(16),%a2 47cf6: 2f02 movel %d2,%sp@- 47cf8: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 47cfc: 6744 beqs 47d42 return RTEMS_INVALID_ADDRESS; if ( !result ) 47cfe: 4a8a tstl %a2 47d00: 6740 beqs 47d42 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 47d02: 486e fffc pea %fp@(-4) 47d06: 2f2e 0008 movel %fp@(8),%sp@- 47d0a: 4eb9 0004 9e50 jsr 49e50 <_Thread_Get> switch (location) { 47d10: 508f addql #8,%sp 47d12: 4aae fffc tstl %fp@(-4) 47d16: 6638 bnes 47d50 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 47d18: 2240 moveal %d0,%a1 47d1a: 2069 0108 moveal %a1@(264),%a0 while (tvp) { 47d1e: 4a88 tstl %a0 47d20: 670c beqs 47d2e if (tvp->ptr == ptr) { 47d22: b4a8 0004 cmpl %a0@(4),%d2 47d26: 6736 beqs 47d5e */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 47d28: 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) { 47d2a: 4a88 tstl %a0 47d2c: 66f4 bnes 47d22 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47d2e: 4eb9 0004 9e28 jsr 49e28 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47d34: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 47d38: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47d3a: 246e fff8 moveal %fp@(-8),%a2 47d3e: 4e5e unlk %fp 47d40: 4e75 rts 47d42: 242e fff4 movel %fp@(-12),%d2 if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 47d46: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47d48: 246e fff8 moveal %fp@(-8),%a2 47d4c: 4e5e unlk %fp 47d4e: 4e75 rts 47d50: 242e fff4 movel %fp@(-12),%d2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 47d54: 7004 moveq #4,%d0 } 47d56: 246e fff8 moveal %fp@(-8),%a2 47d5a: 4e5e unlk %fp 47d5c: 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; 47d5e: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 47d62: 4eb9 0004 9e28 jsr 49e28 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47d68: 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(); return RTEMS_SUCCESSFUL; 47d6c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47d6e: 246e fff8 moveal %fp@(-8),%a2 47d72: 4e5e unlk %fp ... =============================================================================== 00056f68 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 56f68: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 56f6c: 486e fffc pea %fp@(-4) 56f70: 2f2e 0008 movel %fp@(8),%sp@- 56f74: 4879 0007 c6c8 pea 7c6c8 <_Timer_Information> 56f7a: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 56f80: 4fef 000c lea %sp@(12),%sp 56f84: 4aae fffc tstl %fp@(-4) 56f88: 6622 bnes 56fac case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 56f8a: 7204 moveq #4,%d1 56f8c: 2040 moveal %d0,%a0 56f8e: b2a8 0038 cmpl %a0@(56),%d1 56f92: 670c beqs 56fa0 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 56f94: 4868 0010 pea %a0@(16) 56f98: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> 56f9e: 588f addql #4,%sp _Thread_Enable_dispatch(); 56fa0: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 56fa6: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56fa8: 4e5e unlk %fp 56faa: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 56fac: 7004 moveq #4,%d0 } 56fae: 4e5e unlk %fp ... =============================================================================== 00047090 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 47090: 4e56 fff4 linkw %fp,#-12 47094: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47098: 242e 0008 movel %fp@(8),%d2 4709c: 246e 000c moveal %fp@(12),%a2 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 470a0: 660c bnes 470ae return RTEMS_INVALID_NAME; 470a2: 7003 moveq #3,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 470a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 470aa: 4e5e unlk %fp 470ac: 4e75 rts Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 470ae: 4a8a tstl %a2 470b0: 6768 beqs 4711a <== NEVER TAKEN * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 470b2: 2039 0005 f9ea movel 5f9ea <_Thread_Dispatch_disable_level>,%d0 470b8: 5280 addql #1,%d0 470ba: 23c0 0005 f9ea movel %d0,5f9ea <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 470c0: 2039 0005 f9ea movel 5f9ea <_Thread_Dispatch_disable_level>,%d0 * 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 ); 470c6: 4879 0005 fbbc pea 5fbbc <_Timer_Information> 470cc: 4eb9 0004 8068 jsr 48068 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 470d2: 588f addql #4,%sp 470d4: 2040 moveal %d0,%a0 470d6: 4a80 tstl %d0 470d8: 674c beqs 47126 <== NEVER TAKEN Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 470da: 2028 0008 movel %a0@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 470de: 4281 clrl %d1 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 470e0: 7604 moveq #4,%d3 470e2: 2279 0005 fbd4 moveal 5fbd4 <_Timer_Information+0x18>,%a1 470e8: 3200 movew %d0,%d1 470ea: 2143 0038 movel %d3,%a0@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 470ee: 42a8 0018 clrl %a0@(24) the_watchdog->routine = routine; 470f2: 42a8 002c clrl %a0@(44) the_watchdog->id = id; 470f6: 42a8 0030 clrl %a0@(48) the_watchdog->user_data = user_data; 470fa: 42a8 0034 clrl %a0@(52) 470fe: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 47102: 2142 000c movel %d2,%a0@(12) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 47106: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 47108: 4eb9 0004 91e8 jsr 491e8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 4710e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 (Objects_Name) name ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47114: 4280 clrl %d0 } 47116: 4e5e unlk %fp 47118: 4e75 rts if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 4711a: 7009 moveq #9,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4711c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47122: 4e5e unlk %fp 47124: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 47126: 4eb9 0004 91e8 jsr 491e8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 4712c: 7005 moveq #5,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4712e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47134: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057324 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 57324: 4e56 fff0 linkw %fp,#-16 57328: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5732c: 486e fffc pea %fp@(-4) 57330: 2f2e 0008 movel %fp@(8),%sp@- 57334: 4879 0007 c6c8 pea 7c6c8 <_Timer_Information> 5733a: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 57340: 4fef 000c lea %sp@(12),%sp 57344: 2440 moveal %d0,%a2 57346: 4aae fffc tstl %fp@(-4) 5734a: 6620 bnes 5736c case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 5734c: 202a 0038 movel %a2@(56),%d0 57350: 6728 beqs 5737a _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57352: 7201 moveq #1,%d1 57354: b280 cmpl %d0,%d1 57356: 674a beqs 573a2 /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 57358: 740b moveq #11,%d2 } _Thread_Enable_dispatch(); 5735a: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57360: 2002 movel %d2,%d0 57362: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57368: 4e5e unlk %fp 5736a: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5736c: 7404 moveq #4,%d2 } 5736e: 2002 movel %d2,%d0 57370: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57376: 4e5e unlk %fp 57378: 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 ); 5737a: 45ea 0010 lea %a2@(16),%a2 rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 5737e: 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 ); 57380: 2f0a movel %a2,%sp@- 57382: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 57388: 2f0a movel %a2,%sp@- 5738a: 4879 0007 c56c pea 7c56c <_Watchdog_Ticks_chain> 57390: 4eb9 0005 bb64 jsr 5bb64 <_Watchdog_Insert> 57396: 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(); 5739a: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> 573a0: 60be bras 57360 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 573a2: 486a 0010 pea %a2@(16) rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 573a6: 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; 573a8: 2679 0007 c700 moveal 7c700 <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 573ae: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 573b4: 2f0a movel %a2,%sp@- 573b6: 2f0b movel %a3,%sp@- 573b8: 206b 0004 moveal %a3@(4),%a0 573bc: 4e90 jsr %a0@ 573be: 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(); 573c2: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> 573c8: 6096 bras 57360 ... =============================================================================== 000574b4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 574b4: 4e56 fff0 linkw %fp,#-16 574b8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 574bc: 2479 0007 c700 moveal 7c700 <_Timer_server>,%a2 if ( !timer_server ) 574c2: 4a8a tstl %a2 574c4: 6736 beqs 574fc return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 574c6: 4a39 0007 c4c4 tstb 7c4c4 <_TOD_Is_set> 574cc: 660c bnes 574da <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; 574ce: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 574d0: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 574d6: 4e5e unlk %fp <== NOT EXECUTED 574d8: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 574da: 4aae 0010 tstl %fp@(16) 574de: 6728 beqs 57508 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 574e0: 2f2e 000c movel %fp@(12),%sp@- 574e4: 4eb9 0005 40cc jsr 540cc <_TOD_Validate> 574ea: 588f addql #4,%sp 574ec: 4a00 tstb %d0 574ee: 6624 bnes 57514 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 574f0: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 574f2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 574f8: 4e5e unlk %fp 574fa: 4e75 rts Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 574fc: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 574fe: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57504: 4e5e unlk %fp 57506: 4e75 rts if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 57508: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5750a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57510: 4e5e unlk %fp 57512: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 57514: 2f2e 000c movel %fp@(12),%sp@- 57518: 4eb9 0005 3fc4 jsr 53fc4 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5751e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 57520: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 57522: b0b9 0007 c53e cmpl 7c53e <_TOD_Now>,%d0 57528: 63c6 blss 574f0 5752a: 486e fffc pea %fp@(-4) 5752e: 2f2e 0008 movel %fp@(8),%sp@- 57532: 4879 0007 c6c8 pea 7c6c8 <_Timer_Information> 57538: 4eb9 0005 9e10 jsr 59e10 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5753e: 4fef 000c lea %sp@(12),%sp 57542: 2640 moveal %d0,%a3 57544: 4aae fffc tstl %fp@(-4) 57548: 6654 bnes 5759e case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5754a: 486b 0010 pea %a3@(16) 5754e: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> the_watchdog->user_data = user_data; 57554: 276e 0014 0034 movel %fp@(20),%a3@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 5755a: 7003 moveq #3,%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5755c: 94b9 0007 c53e subl 7c53e <_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; 57562: 2740 0038 movel %d0,%a3@(56) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 57566: 202e 0010 movel %fp@(16),%d0 5756a: 2740 002c movel %d0,%a3@(44) the_watchdog->id = id; 5756e: 202e 0008 movel %fp@(8),%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 57572: 2742 001c movel %d2,%a3@(28) 57576: 2740 0030 movel %d0,%a3@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5757a: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 5757e: 2f0b movel %a3,%sp@- 57580: 2f0a movel %a2,%sp@- 57582: 206a 0004 moveal %a2@(4),%a0 57586: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 57588: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5758e: 4fef 000c lea %sp@(12),%sp 57592: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57594: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5759a: 4e5e unlk %fp 5759c: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5759e: 7004 moveq #4,%d0 } 575a0: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 575a6: 4e5e unlk %fp ...