0004af14 : uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4af14: 41f9 0006 0eb0 lea 60eb0 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4af1a: 4e56 0000 linkw %fp,#0 return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4af1e: 202e 0008 movel %fp@(8),%d0 4af22: 4e5e unlk %fp 4af24: 4c50 0000 remul %a0@,%d0,%d0 4af28: 4e75 rts ... 0004646c : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 4646c: 4e56 0000 linkw %fp,#0 46470: 2039 0005 b450 movel 5b450 ,%d0 46476: 2f02 movel %d2,%sp@- 46478: 243c 0000 03e8 movel #1000,%d2 4647e: 4c42 0000 remul %d2,%d0,%d0 return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); } 46482: 242e 0008 movel %fp@(8),%d2 46486: 4c40 2002 remul %d0,%d2,%d2 4648a: 2002 movel %d2,%d0 4648c: 241f movel %sp@+,%d2 4648e: 4e5e unlk %fp 46490: 4e75 rts ... 000457e0 <_API_Mutex_Lock>: API_Mutex_Control *the_mutex ) { ISR_Level level; _ISR_Disable( level ); 457e0: 203c 0000 0700 movel #1792,%d0 #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 457e6: 4e56 0000 linkw %fp,#0 457ea: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 457ee: 40c1 movew %sr,%d1 457f0: 8081 orl %d1,%d0 457f2: 46c0 movew %d0,%sr _CORE_mutex_Seize( 457f4: 2f01 movel %d1,%sp@- 457f6: 42a7 clrl %sp@- 457f8: 4878 0001 pea 1 457fc: 2f28 0008 movel %a0@(8),%sp@- 45800: 4868 0010 pea %a0@(16) 45804: 4eb9 0004 59c4 jsr 459c4 <_CORE_mutex_Seize> 4580a: 4fef 0014 lea %sp@(20),%sp the_mutex->Object.id, true, 0, level ); } 4580e: 4e5e unlk %fp 45810: 4e75 rts ... 00045840 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 45840: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45844: 2039 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d0 4584a: 5280 addql #1,%d0 4584c: 206e 0008 moveal %fp@(8),%a0 45850: 23c0 0005 b9f4 movel %d0,5b9f4 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 45856: 42a7 clrl %sp@- 45858: 2f28 0008 movel %a0@(8),%sp@- 4585c: 4868 0010 pea %a0@(16) 45860: 4eb9 0004 5a6c jsr 45a6c <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 45866: 4fef 000c lea %sp@(12),%sp } 4586a: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4586c: 4ef9 0004 6c62 jmp 46c62 <_Thread_Enable_dispatch> ... 00045758 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 45758: 4e56 0000 linkw %fp,#0 _Chain_Append( &_API_extensions_List, &the_extension->Node ); 4575c: 2f2e 0008 movel %fp@(8),%sp@- 45760: 4879 0005 bb8e pea 5bb8e <_API_extensions_List> 45766: 4eb9 0004 5874 jsr 45874 <_Chain_Append> 4576c: 508f addql #8,%sp } 4576e: 4e5e unlk %fp 45770: 4e75 rts ... 0004b960 <_Barrier_Translate_core_barrier_return_code>: }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) { 4b960: 41f9 0005 a398 lea 5a398 <_Barrier_Translate_core_barrier_return_code_>,%a0 4b966: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; } 4b96a: 202e 0008 movel %fp@(8),%d0 4b96e: 4e5e unlk %fp 4b970: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4b974: 4e75 rts ... 0004b348 <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4b348: 4e56 0000 linkw %fp,#0 the_barrier->Attributes = *the_barrier_attributes; 4b34c: 226e 000c moveal %fp@(12),%a1 the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4b350: 4878 0003 pea 3 void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4b354: 206e 0008 moveal %fp@(8),%a0 the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4b358: 2f3c 0001 0000 movel #65536,%sp@- 4b35e: 42a7 clrl %sp@- CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; 4b360: 2011 movel %a1@,%d0 4b362: 2229 0004 movel %a1@(4),%d1 4b366: 2140 0040 movel %d0,%a0@(64) 4b36a: 2141 0044 movel %d1,%a0@(68) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4b36e: 2f08 movel %a0,%sp@- CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; 4b370: 42a8 0048 clrl %a0@(72) _Thread_queue_Initialize( 4b374: 4eb9 0004 72f4 jsr 472f4 <_Thread_queue_Initialize> 4b37a: 4fef 0010 lea %sp@(16),%sp &the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); } 4b37e: 4e5e unlk %fp 4b380: 4e75 rts ... 0004b384 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 4b384: 4e56 fff4 linkw %fp,#-12 4b388: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4b38c: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4b390: 4282 clrl %d2 4b392: 47f9 0004 6f84 lea 46f84 <_Thread_queue_Dequeue>,%a3 4b398: 6002 bras 4b39c <_CORE_barrier_Release+0x18> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 4b39a: 5282 addql #1,%d2 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4b39c: 2f0a movel %a2,%sp@- 4b39e: 4e93 jsr %a3@ 4b3a0: 588f addql #4,%sp 4b3a2: 4a80 tstl %d0 4b3a4: 66f4 bnes 4b39a <_CORE_barrier_Release+0x16> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } 4b3a6: 2002 movel %d2,%d0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; 4b3a8: 42aa 0048 clrl %a2@(72) return count; } 4b3ac: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4b3b2: 4e5e unlk %fp 4b3b4: 4e75 rts ... 0004b3b8 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4b3b8: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4b3be: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4b3c2: 2279 0005 baae moveal 5baae <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4b3c8: 48d7 001c moveml %d2-%d4,%sp@ 4b3cc: 242e 000c movel %fp@(12),%d2 4b3d0: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4b3d4: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4b3d8: 206e 0008 moveal %fp@(8),%a0 4b3dc: 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 ); 4b3e0: 40c1 movew %sr,%d1 4b3e2: 8081 orl %d1,%d0 4b3e4: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4b3e6: 2028 0048 movel %a0@(72),%d0 4b3ea: 5280 addql #1,%d0 4b3ec: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4b3f0: 4aa8 0040 tstl %a0@(64) 4b3f4: 6626 bnes 4b41c <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4b3f6: b0a8 0044 cmpl %a0@(68),%d0 4b3fa: 6620 bnes 4b41c <_CORE_barrier_Wait+0x64> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4b3fc: 7001 moveq #1,%d0 4b3fe: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4b402: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4b404: 2d44 0010 movel %d4,%fp@(16) 4b408: 2d42 000c movel %d2,%fp@(12) 4b40c: 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 ); } 4b410: 4cd7 001c moveml %sp@,%d2-%d4 4b414: 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 ); 4b416: 4ef9 0004 b384 jmp 4b384 <_CORE_barrier_Release> 4b41c: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4b41e: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4b422: 2348 0044 movel %a0,%a1@(68) 4b426: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4b42a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4b42c: 2d43 000c movel %d3,%fp@(12) 4b430: 203c 0004 73b0 movel #291760,%d0 4b436: 2d48 0008 movel %a0,%fp@(8) 4b43a: 2d40 0010 movel %d0,%fp@(16) } 4b43e: 4cd7 001c moveml %sp@,%d2-%d4 4b442: 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 ); 4b444: 4ef9 0004 70c4 jmp 470c4 <_Thread_queue_Enqueue_with_handler> ... 0005202c <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 5202c: 4e56 ffe0 linkw %fp,#-32 52030: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 52034: 246e 0008 moveal %fp@(8),%a2 52038: 2a2e 000c movel %fp@(12),%d5 5203c: 262e 0010 movel %fp@(16),%d3 52040: 286e 001c moveal %fp@(28),%a4 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 52044: b6aa 004c cmpl %a2@(76),%d3 52048: 6304 blss 5204e <_CORE_message_queue_Broadcast+0x22> 5204a: 7001 moveq #1,%d0 <== NOT EXECUTED 5204c: 6042 bras 52090 <_CORE_message_queue_Broadcast+0x64><== NOT EXECUTED * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 5204e: 4aaa 0048 tstl %a2@(72) 52052: 6610 bnes 52064 <_CORE_message_queue_Broadcast+0x38> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 52054: 4282 clrl %d2 52056: 283c 0005 4218 movel #344600,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5205c: 4bf9 0005 91d0 lea 591d0 ,%a5 52062: 601a bras 5207e <_CORE_message_queue_Broadcast+0x52> * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 52064: 4294 clrl %a4@ 52066: 6026 bras 5208e <_CORE_message_queue_Broadcast+0x62> 52068: 2f03 movel %d3,%sp@- */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5206a: 5282 addql #1,%d2 5206c: 2f05 movel %d5,%sp@- 5206e: 2f2b 002c movel %a3@(44),%sp@- 52072: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 52074: 206b 0028 moveal %a3@(40),%a0 52078: 4fef 000c lea %sp@(12),%sp 5207c: 2083 movel %d3,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5207e: 2f0a movel %a2,%sp@- 52080: 2044 moveal %d4,%a0 52082: 4e90 jsr %a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 52084: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 52086: 2640 moveal %d0,%a3 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 52088: 4a80 tstl %d0 5208a: 66dc bnes 52068 <_CORE_message_queue_Broadcast+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5208c: 2882 movel %d2,%a4@ 5208e: 4280 clrl %d0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 52090: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 52096: 4e5e unlk %fp 52098: 4e75 rts ... 0004dbd4 <_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)) { 4dbd4: 7003 moveq #3,%d0 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 ) { 4dbd6: 4e56 fff4 linkw %fp,#-12 4dbda: 222e 0014 movel %fp@(20),%d1 4dbde: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4dbe2: 246e 0008 moveal %fp@(8),%a2 4dbe6: 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)) { 4dbea: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4dbec: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4dbf0: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4dbf4: 2541 004c movel %d1,%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)) { 4dbf8: 4a80 tstl %d0 4dbfa: 6604 bnes 4dc00 <_CORE_message_queue_Initialize+0x2c> 4dbfc: 2001 movel %d1,%d0 4dbfe: 600c bras 4dc0c <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 4dc00: 2001 movel %d1,%d0 4dc02: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4dc04: 76fc moveq #-4,%d3 4dc06: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4dc08: b280 cmpl %d0,%d1 4dc0a: 626e bhis 4dc7a <_CORE_message_queue_Initialize+0xa6> /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4dc0c: 2600 movel %d0,%d3 4dc0e: 0683 0000 0010 addil #16,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4dc14: 2203 movel %d3,%d1 4dc16: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4dc1a: b081 cmpl %d1,%d0 4dc1c: 625c bhis 4dc7a <_CORE_message_queue_Initialize+0xa6> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dc1e: 2f01 movel %d1,%sp@- 4dc20: 4eb9 0005 0448 jsr 50448 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dc26: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dc28: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dc2c: 674c beqs 4dc7a <_CORE_message_queue_Initialize+0xa6> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4dc2e: 2f03 movel %d3,%sp@- 4dc30: 2f02 movel %d2,%sp@- 4dc32: 2f00 movel %d0,%sp@- 4dc34: 486a 0060 pea %a2@(96) 4dc38: 4eb9 0005 1cd4 jsr 51cd4 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dc3e: 4878 0006 pea 6 4dc42: 7001 moveq #1,%d0 4dc44: 206e 000c moveal %fp@(12),%a0 4dc48: b090 cmpl %a0@,%d0 4dc4a: 57c0 seq %d0 4dc4c: 4878 0080 pea 80 4dc50: 49c0 extbl %d0 4dc52: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4dc54: 41ea 0054 lea %a2@(84),%a0 4dc58: 2f00 movel %d0,%sp@- 4dc5a: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4dc5e: 41ea 0050 lea %a2@(80),%a0 4dc62: 2548 0058 movel %a0,%a2@(88) 4dc66: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4dc68: 42aa 0054 clrl %a2@(84) 4dc6c: 4eb9 0004 f988 jsr 4f988 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dc72: 4fef 0020 lea %sp@(32),%sp allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dc76: 7001 moveq #1,%d0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dc78: 6002 bras 4dc7c <_CORE_message_queue_Initialize+0xa8> 4dc7a: 4200 clrb %d0 } 4dc7c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4dc82: 4e5e unlk %fp 4dc84: 4e75 rts ... 00051d14 <_CORE_message_queue_Insert_message>: #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 51d14: 203c 0000 0700 movel #1792,%d0 void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 51d1a: 4e56 0000 linkw %fp,#0 51d1e: 226e 0008 moveal %fp@(8),%a1 51d22: 206e 000c moveal %fp@(12),%a0 51d26: 2f0a movel %a2,%sp@- #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 51d28: 40c1 movew %sr,%d1 51d2a: 8081 orl %d1,%d0 51d2c: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 51d2e: 52a9 0048 addql #1,%a1@(72) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 51d32: 203c 7fff ffff movel #2147483647,%d0 51d38: b0ae 0010 cmpl %fp@(16),%d0 51d3c: 6616 bnes 51d54 <_CORE_message_queue_Insert_message+0x40> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 51d3e: 45e9 0054 lea %a1@(84),%a2 51d42: 208a movel %a2,%a0@ old_last_node = the_chain->last; 51d44: 2469 0058 moveal %a1@(88),%a2 the_chain->last = the_node; 51d48: 2348 0058 movel %a0,%a1@(88) old_last_node->next = the_node; the_node->previous = old_last_node; 51d4c: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 51d50: 2488 movel %a0,%a2@ 51d52: 6012 bras 51d66 <_CORE_message_queue_Insert_message+0x52> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 51d54: 43e9 0050 lea %a1@(80),%a1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 51d58: 2451 moveal %a1@,%a2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 51d5a: 2149 0004 movel %a1,%a0@(4) before_node = after_node->next; after_node->next = the_node; 51d5e: 2288 movel %a0,%a1@ the_node->next = before_node; before_node->previous = the_node; 51d60: 2548 0004 movel %a0,%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; 51d64: 208a movel %a2,%a0@ _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 51d66: 46c1 movew %d1,%sr * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 51d68: 245f moveal %sp@+,%a2 51d6a: 4e5e unlk %fp 51d6c: 4e75 rts ... 0004dc88 <_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 ); 4dc88: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dc8e: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4dc92: 2079 0006 4f32 moveal 64f32 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dc98: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4dc9c: 282e 000c movel %fp@(12),%d4 4dca0: 262e 001c movel %fp@(28),%d3 4dca4: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4dca8: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dcac: 242e 0010 movel %fp@(16),%d2 4dcb0: 226e 0014 moveal %fp@(20),%a1 4dcb4: 1a2e 001b moveb %fp@(27),%d5 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 ); 4dcb8: 40c0 movew %sr,%d0 4dcba: 8280 orl %d0,%d1 4dcbc: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dcbe: 220a movel %a2,%d1 4dcc0: 0681 0000 0054 addil #84,%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4dcc6: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dcca: b28b cmpl %a3,%d1 4dccc: 6752 beqs 4dd20 <_CORE_message_queue_Seize+0x98> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4dcce: 2853 moveal %a3@,%a4 the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4dcd0: 4bea 0050 lea %a2@(80),%a5 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4dcd4: 254c 0050 movel %a4,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4dcd8: 294d 0004 movel %a5,%a4@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4dcdc: 4a8b tstl %a3 4dcde: 6740 beqs 4dd20 <_CORE_message_queue_Seize+0x98> the_message_queue->number_of_pending_messages -= 1; 4dce0: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4dce4: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; 4dce6: 22ab 0008 movel %a3@(8),%a1@ _Thread_Executing->Wait.count = 4dcea: 2079 0006 4f32 moveal 64f32 <_Thread_Executing>,%a0 4dcf0: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4dcf4: 2f11 movel %a1@,%sp@- 4dcf6: 486b 000c pea %a3@(12) 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 ); 4dcfa: 45ea 0060 lea %a2@(96),%a2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4dcfe: 2f02 movel %d2,%sp@- 4dd00: 4eb9 0005 4398 jsr 54398 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 ); 4dd06: 4fef 000c lea %sp@(12),%sp 4dd0a: 2d4a 0008 movel %a2,%fp@(8) 4dd0e: 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 ); } 4dd12: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4dd18: 4e5e unlk %fp 4dd1a: 4ef9 0004 db10 jmp 4db10 <_Chain_Append> return; } #endif } if ( !wait ) { 4dd20: 4a05 tstb %d5 4dd22: 6612 bnes 4dd36 <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 4dd24: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4dd26: 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 ); } 4dd28: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4dd2e: 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 ); } 4dd32: 4e5e unlk %fp 4dd34: 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; 4dd36: 7201 moveq #1,%d1 4dd38: 2541 0030 movel %d1,%a2@(48) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4dd3c: 2149 0028 movel %a1,%a0@(40) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 4dd40: 2142 002c movel %d2,%a0@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4dd44: 2144 0020 movel %d4,%a0@(32) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4dd48: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4dd4c: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4dd4e: 4bf9 0004 fa44 lea 4fa44 <_Thread_queue_Timeout>,%a5 4dd54: 2d43 000c movel %d3,%fp@(12) 4dd58: 2d4d 0010 movel %a5,%fp@(16) 4dd5c: 2d4a 0008 movel %a2,%fp@(8) } 4dd60: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4dd66: 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 ); 4dd68: 4ef9 0004 f758 jmp 4f758 <_Thread_queue_Enqueue_with_handler> ... 000459c4 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 459c4: 4e56 0000 linkw %fp,#0 459c8: 202e 0010 movel %fp@(16),%d0 459cc: 2f0a movel %a2,%sp@- 459ce: 246e 0008 moveal %fp@(8),%a2 459d2: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 459d4: 2239 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 459da: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 459dc: 4a81 tstl %d1 459de: 671c beqs 459fc <_CORE_mutex_Seize+0x38> 459e0: 4a00 tstb %d0 459e2: 6718 beqs 459fc <_CORE_mutex_Seize+0x38> 459e4: 7001 moveq #1,%d0 459e6: b0b9 0005 bb76 cmpl 5bb76 <_System_state_Current>,%d0 459ec: 640e bccs 459fc <_CORE_mutex_Seize+0x38> 459ee: 4878 0013 pea 13 459f2: 42a7 clrl %sp@- 459f4: 42a7 clrl %sp@- 459f6: 4eb9 0004 5f7c jsr 45f7c <_Internal_error_Occurred> 459fc: 486e 0018 pea %fp@(24) 45a00: 2f0a movel %a2,%sp@- 45a02: 4eb9 0004 98e0 jsr 498e0 <_CORE_mutex_Seize_interrupt_trylock> 45a08: 508f addql #8,%sp 45a0a: 4a80 tstl %d0 45a0c: 6750 beqs 45a5e <_CORE_mutex_Seize+0x9a> 45a0e: 4a02 tstb %d2 45a10: 6614 bnes 45a26 <_CORE_mutex_Seize+0x62> 45a12: 202e 0018 movel %fp@(24),%d0 45a16: 46c0 movew %d0,%sr 45a18: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 45a1e: 7001 moveq #1,%d0 45a20: 2140 0034 movel %d0,%a0@(52) 45a24: 6038 bras 45a5e <_CORE_mutex_Seize+0x9a> 45a26: 2039 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d0 45a2c: 5280 addql #1,%d0 45a2e: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 45a34: 216e 000c 0020 movel %fp@(12),%a0@(32) 45a3a: 23c0 0005 b9f4 movel %d0,5b9f4 <_Thread_Dispatch_disable_level> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 45a40: 7001 moveq #1,%d0 45a42: 214a 0044 movel %a2,%a0@(68) 45a46: 2540 0030 movel %d0,%a2@(48) 45a4a: 202e 0018 movel %fp@(24),%d0 45a4e: 46c0 movew %d0,%sr 45a50: 2f2e 0014 movel %fp@(20),%sp@- 45a54: 2f0a movel %a2,%sp@- 45a56: 4eb9 0004 5960 jsr 45960 <_CORE_mutex_Seize_interrupt_blocking> 45a5c: 508f addql #8,%sp } 45a5e: 242e fff8 movel %fp@(-8),%d2 45a62: 246e fffc moveal %fp@(-4),%a2 45a66: 4e5e unlk %fp 45a68: 4e75 rts ... 000498e0 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 498e0: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 498e4: 2279 0005 baae moveal 5baae <_Thread_Executing>,%a1 498ea: 2f0b movel %a3,%sp@- 498ec: 206e 0008 moveal %fp@(8),%a0 498f0: 2f0a movel %a2,%sp@- 498f2: 246e 000c moveal %fp@(12),%a2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 498f6: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 498fa: 4aa8 004e tstl %a0@(78) 498fe: 6700 0098 beqw 49998 <_CORE_mutex_Seize_interrupt_trylock+0xb8> the_mutex->lock = CORE_MUTEX_LOCKED; 49902: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 49906: 7201 moveq #1,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 49908: 2169 0008 005e movel %a1@(8),%a0@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4990e: 2028 0046 movel %a0@(70),%d0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 49912: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 49916: 123c 0002 moveb #2,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4991a: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4991e: b280 cmpl %d0,%d1 49920: 6708 beqs 4992a <_CORE_mutex_Seize_interrupt_trylock+0x4a> 49922: 123c 0003 moveb #3,%d1 49926: b280 cmpl %d0,%d1 49928: 660a bnes 49934 <_CORE_mutex_Seize_interrupt_trylock+0x54> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4992a: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4992e: 7203 moveq #3,%d1 49930: b280 cmpl %d0,%d1 49932: 6706 beqs 4993a <_CORE_mutex_Seize_interrupt_trylock+0x5a> _ISR_Enable( *level_p ); 49934: 2012 movel %a2@,%d0 49936: 46c0 movew %d0,%sr 49938: 607c bras 499b6 <_CORE_mutex_Seize_interrupt_trylock+0xd6> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4993a: 2028 004a movel %a0@(74),%d0 current = executing->current_priority; 4993e: 2229 0014 movel %a1@(20),%d1 if ( current == ceiling ) { 49942: b081 cmpl %d1,%d0 49944: 6606 bnes 4994c <_CORE_mutex_Seize_interrupt_trylock+0x6c> _ISR_Enable( *level_p ); 49946: 2012 movel %a2@,%d0 49948: 46c0 movew %d0,%sr 4994a: 606a bras 499b6 <_CORE_mutex_Seize_interrupt_trylock+0xd6> return 0; } if ( current > ceiling ) { 4994c: b081 cmpl %d1,%d0 4994e: 642e bccs 4997e <_CORE_mutex_Seize_interrupt_trylock+0x9e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 49950: 2039 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d0 49956: 5280 addql #1,%d0 49958: 23c0 0005 b9f4 movel %d0,5b9f4 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4995e: 2012 movel %a2@,%d0 49960: 46c0 movew %d0,%sr _Thread_Change_priority( 49962: 42a7 clrl %sp@- 49964: 2f28 004a movel %a0@(74),%sp@- 49968: 2f28 005a movel %a0@(90),%sp@- 4996c: 4eb9 0004 6768 jsr 46768 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 49972: 4eb9 0004 6c62 jsr 46c62 <_Thread_Enable_dispatch> 49978: 4fef 000c lea %sp@(12),%sp 4997c: 6038 bras 499b6 <_CORE_mutex_Seize_interrupt_trylock+0xd6> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4997e: 7006 moveq #6,%d0 the_mutex->lock = CORE_MUTEX_UNLOCKED; 49980: 7201 moveq #1,%d1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 49982: 2340 0034 movel %d0,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 49986: 42a8 0052 clrl %a0@(82) _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4998a: 2141 004e movel %d1,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4998e: 53a9 001c subql #1,%a1@(28) _ISR_Enable( *level_p ); 49992: 2012 movel %a2@,%d0 49994: 46c0 movew %d0,%sr 49996: 601e bras 499b6 <_CORE_mutex_Seize_interrupt_trylock+0xd6> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 49998: 2668 005a moveal %a0@(90),%a3 4999c: b3cb cmpal %a3,%a1 4999e: 6626 bnes 499c6 <_CORE_mutex_Seize_interrupt_trylock+0xe6> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 499a0: 2028 0040 movel %a0@(64),%d0 499a4: 6708 beqs 499ae <_CORE_mutex_Seize_interrupt_trylock+0xce> 499a6: 7201 moveq #1,%d1 499a8: b280 cmpl %d0,%d1 499aa: 661a bnes 499c6 <_CORE_mutex_Seize_interrupt_trylock+0xe6> 499ac: 600c bras 499ba <_CORE_mutex_Seize_interrupt_trylock+0xda><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 499ae: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 499b2: 2012 movel %a2@,%d0 499b4: 46c0 movew %d0,%sr 499b6: 4280 clrl %d0 499b8: 600e bras 499c8 <_CORE_mutex_Seize_interrupt_trylock+0xe8> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 499ba: 7002 moveq #2,%d0 <== NOT EXECUTED 499bc: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 499c0: 2012 movel %a2@,%d0 <== NOT EXECUTED 499c2: 46c0 movew %d0,%sr <== NOT EXECUTED 499c4: 60f0 bras 499b6 <_CORE_mutex_Seize_interrupt_trylock+0xd6><== NOT EXECUTED 499c6: 7001 moveq #1,%d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 499c8: 246e fff8 moveal %fp@(-8),%a2 499cc: 266e fffc moveal %fp@(-4),%a3 499d0: 4e5e unlk %fp 499d2: 4e75 rts 00045a6c <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 45a6c: 4e56 0000 linkw %fp,#0 45a70: 2f0a movel %a2,%sp@- 45a72: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 45a76: 206a 005a moveal %a2@(90),%a0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 45a7a: 4a2a 0044 tstb %a2@(68) 45a7e: 670e beqs 45a8e <_CORE_mutex_Surrender+0x22> if ( !_Thread_Is_executing( holder ) ) 45a80: b1f9 0005 baae cmpal 5baae <_Thread_Executing>,%a0 45a86: 6706 beqs 45a8e <_CORE_mutex_Surrender+0x22> 45a88: 7003 moveq #3,%d0 45a8a: 6000 00ce braw 45b5a <_CORE_mutex_Surrender+0xee> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 45a8e: 202a 0052 movel %a2@(82),%d0 45a92: 6700 00c4 beqw 45b58 <_CORE_mutex_Surrender+0xec> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 45a96: 5380 subql #1,%d0 45a98: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 45a9c: 6600 00ba bnew 45b58 <_CORE_mutex_Surrender+0xec> 45aa0: 202a 0046 movel %a2@(70),%d0 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45aa4: 7202 moveq #2,%d1 45aa6: b280 cmpl %d0,%d1 45aa8: 6708 beqs 45ab2 <_CORE_mutex_Surrender+0x46> 45aaa: 123c 0003 moveb #3,%d1 45aae: b280 cmpl %d0,%d1 45ab0: 6604 bnes 45ab6 <_CORE_mutex_Surrender+0x4a> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 45ab2: 53a8 001c subql #1,%a0@(28) 45ab6: 202a 0046 movel %a2@(70),%d0 /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45aba: 7202 moveq #2,%d1 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 45abc: 42aa 005a clrl %a2@(90) the_mutex->holder_id = 0; 45ac0: 42aa 005e clrl %a2@(94) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45ac4: b280 cmpl %d0,%d1 45ac6: 6708 beqs 45ad0 <_CORE_mutex_Surrender+0x64> 45ac8: 123c 0003 moveb #3,%d1 45acc: b280 cmpl %d0,%d1 45ace: 6622 bnes 45af2 <_CORE_mutex_Surrender+0x86> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 45ad0: 4aa8 001c tstl %a0@(28) 45ad4: 661c bnes 45af2 <_CORE_mutex_Surrender+0x86> holder->real_priority != holder->current_priority ) { 45ad6: 2028 0018 movel %a0@(24),%d0 45ada: b0a8 0014 cmpl %a0@(20),%d0 45ade: 6712 beqs 45af2 <_CORE_mutex_Surrender+0x86> _Thread_Change_priority( holder, holder->real_priority, true ); 45ae0: 4878 0001 pea 1 45ae4: 2f00 movel %d0,%sp@- 45ae6: 2f08 movel %a0,%sp@- 45ae8: 4eb9 0004 6768 jsr 46768 <_Thread_Change_priority> 45aee: 4fef 000c lea %sp@(12),%sp /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 45af2: 2f0a movel %a2,%sp@- 45af4: 4eb9 0004 6f84 jsr 46f84 <_Thread_queue_Dequeue> 45afa: 588f addql #4,%sp 45afc: 2040 moveal %d0,%a0 45afe: 4a80 tstl %d0 45b00: 674c beqs 45b4e <_CORE_mutex_Surrender+0xe2> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 45b02: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 45b04: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b0a: 202a 0046 movel %a2@(70),%d0 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 45b0e: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 45b12: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 45b16: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b1a: b280 cmpl %d0,%d1 45b1c: 670a beqs 45b28 <_CORE_mutex_Surrender+0xbc> 45b1e: 123c 0003 moveb #3,%d1 45b22: b280 cmpl %d0,%d1 45b24: 6632 bnes 45b58 <_CORE_mutex_Surrender+0xec> 45b26: 6006 bras 45b2e <_CORE_mutex_Surrender+0xc2> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 45b28: 52a8 001c addql #1,%a0@(28) 45b2c: 602a bras 45b58 <_CORE_mutex_Surrender+0xec> case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 45b2e: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 45b32: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 45b36: b0a8 0014 cmpl %a0@(20),%d0 45b3a: 641c bccs 45b58 <_CORE_mutex_Surrender+0xec> _Thread_Change_priority( 45b3c: 42a7 clrl %sp@- 45b3e: 2f00 movel %d0,%sp@- 45b40: 2f08 movel %a0,%sp@- 45b42: 4eb9 0004 6768 jsr 46768 <_Thread_Change_priority> 45b48: 4fef 000c lea %sp@(12),%sp 45b4c: 600a bras 45b58 <_CORE_mutex_Surrender+0xec> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 45b4e: 7001 moveq #1,%d0 45b50: 2540 004e movel %d0,%a2@(78) 45b54: 4200 clrb %d0 45b56: 6002 bras 45b5a <_CORE_mutex_Surrender+0xee> 45b58: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 45b5a: 246e fffc moveal %fp@(-4),%a2 45b5e: 4e5e unlk %fp 45b60: 4e75 rts ... 00045b70 <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 45b70: 4e56 0000 linkw %fp,#0 45b74: 226e 000c moveal %fp@(12),%a1 the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize( 45b78: 4878 0003 pea 3 45b7c: 4878 0200 pea 200 void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 45b80: 206e 0008 moveal %fp@(8),%a0 the_semaphore->Attributes = *the_semaphore_attributes; 45b84: 2011 movel %a1@,%d0 45b86: 2229 0004 movel %a1@(4),%d1 the_semaphore->count = initial_value; 45b8a: 216e 0010 0048 movel %fp@(16),%a0@(72) CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes; 45b90: 2140 0040 movel %d0,%a0@(64) 45b94: 2141 0044 movel %d1,%a0@(68) the_semaphore->count = initial_value; _Thread_queue_Initialize( 45b98: 7201 moveq #1,%d1 45b9a: b2a9 0004 cmpl %a1@(4),%d1 45b9e: 57c0 seq %d0 45ba0: 49c0 extbl %d0 45ba2: 4480 negl %d0 45ba4: 2f00 movel %d0,%sp@- 45ba6: 2f08 movel %a0,%sp@- 45ba8: 4eb9 0004 72f4 jsr 472f4 <_Thread_queue_Initialize> 45bae: 4fef 0010 lea %sp@(16),%sp _CORE_semaphore_Is_priority( the_semaphore_attributes ) ? THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_SEMAPHORE, CORE_SEMAPHORE_TIMEOUT ); } 45bb2: 4e5e unlk %fp 45bb4: 4e75 rts ... 00045bb8 <_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 ) { 45bb8: 4e56 0000 linkw %fp,#0 45bbc: 2f0a movel %a2,%sp@- 45bbe: 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)) ) { 45bc2: 2f0a movel %a2,%sp@- 45bc4: 4eb9 0004 6f84 jsr 46f84 <_Thread_queue_Dequeue> 45bca: 588f addql #4,%sp 45bcc: 4a80 tstl %d0 45bce: 6704 beqs 45bd4 <_CORE_semaphore_Surrender+0x1c> 45bd0: 4280 clrl %d0 45bd2: 6024 bras 45bf8 <_CORE_semaphore_Surrender+0x40> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 45bd4: 203c 0000 0700 movel #1792,%d0 45bda: 40c1 movew %sr,%d1 45bdc: 8081 orl %d1,%d0 45bde: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 45be0: 202a 0048 movel %a2@(72),%d0 45be4: b0aa 0040 cmpl %a2@(64),%d0 45be8: 6504 bcss 45bee <_CORE_semaphore_Surrender+0x36> 45bea: 7004 moveq #4,%d0 <== NOT EXECUTED 45bec: 6008 bras 45bf6 <_CORE_semaphore_Surrender+0x3e> <== NOT EXECUTED the_semaphore->count += 1; 45bee: 5280 addql #1,%d0 45bf0: 2540 0048 movel %d0,%a2@(72) 45bf4: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 45bf6: 46c1 movew %d1,%sr } return status; } 45bf8: 246e fffc moveal %fp@(-4),%a2 45bfc: 4e5e unlk %fp 45bfe: 4e75 rts 00045874 <_Chain_Append>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 45874: 203c 0000 0700 movel #1792,%d0 void _Chain_Append( Chain_Control *the_chain, Chain_Node *node ) { 4587a: 4e56 0000 linkw %fp,#0 4587e: 206e 000c moveal %fp@(12),%a0 45882: 2f0a movel %a2,%sp@- 45884: 226e 0008 moveal %fp@(8),%a1 ISR_Level level; _ISR_Disable( level ); 45888: 40c1 movew %sr,%d1 4588a: 8081 orl %d1,%d0 4588c: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4588e: 2009 movel %a1,%d0 45890: 5880 addql #4,%d0 45892: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 45894: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 45898: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4589c: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 458a0: 2488 movel %a0,%a2@ _Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level ); 458a2: 46c1 movew %d1,%sr } 458a4: 245f moveal %sp@+,%a2 458a6: 4e5e unlk %fp 458a8: 4e75 rts ... 00049844 <_Chain_Extract>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 49844: 203c 0000 0700 movel #1792,%d0 */ void _Chain_Extract( Chain_Node *node ) { 4984a: 4e56 0000 linkw %fp,#0 4984e: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 49852: 40c1 movew %sr,%d1 49854: 8081 orl %d1,%d0 49856: 46c0 movew %d0,%sr { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 49858: 2268 0004 moveal %a0@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4985c: 2050 moveal %a0@,%a0 previous = the_node->previous; next->previous = previous; previous->next = next; 4985e: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 49860: 2149 0004 movel %a1,%a0@(4) _Chain_Extract_unprotected( node ); _ISR_Enable( level ); 49864: 46c1 movew %d1,%sr } 49866: 4e5e unlk %fp 49868: 4e75 rts ... 000498a0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 498a0: 4e56 0000 linkw %fp,#0 498a4: 202e 0010 movel %fp@(16),%d0 498a8: 2f0a movel %a2,%sp@- 498aa: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 498ae: 204a moveal %a2,%a0 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 498b0: 42aa 0004 clrl %a2@(4) Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 498b4: 222e 0014 movel %fp@(20),%d1 Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 498b8: 226e 000c moveal %fp@(12),%a1 while ( count-- ) { 498bc: 600c bras 498ca <_Chain_Initialize+0x2a> current->next = next; next->previous = current; 498be: 2348 0004 movel %a0,%a1@(4) current = next; next = (Chain_Node *) 498c2: 5380 subql #1,%d0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 498c4: 2089 movel %a1,%a0@ next->previous = current; current = next; next = (Chain_Node *) 498c6: 2049 moveal %a1,%a0 498c8: d3c1 addal %d1,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 498ca: 4a80 tstl %d0 498cc: 66f0 bnes 498be <_Chain_Initialize+0x1e> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 498ce: 200a movel %a2,%d0 498d0: 5880 addql #4,%d0 498d2: 2080 movel %d0,%a0@ the_chain->last = current; 498d4: 2548 0008 movel %a0,%a2@(8) } 498d8: 245f moveal %sp@+,%a2 498da: 4e5e unlk %fp 498dc: 4e75 rts ... 0004943c <_Event_Manager_initialization>: * * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { 4943c: 4e56 0000 linkw %fp,#0 */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 49440: 4e5e unlk %fp * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 49442: 42b9 0005 bbd2 clrl 5bbd2 <_Event_Sync_state> */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 49448: 4e75 rts ... 000449d8 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 449d8: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449de: 4e56 ffec linkw %fp,#-20 449e2: 226e 0010 moveal %fp@(16),%a1 449e6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 449ea: 2479 0005 baae moveal 5baae <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449f0: 242e 0008 movel %fp@(8),%d2 449f4: 262e 000c movel %fp@(12),%d3 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 449f8: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449fc: 206e 0014 moveal %fp@(20),%a0 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 44a00: 266a 0108 moveal %a2@(264),%a3 _ISR_Disable( level ); 44a04: 40c1 movew %sr,%d1 44a06: 8081 orl %d1,%d0 44a08: 46c0 movew %d0,%sr pending_events = api->pending_events; 44a0a: 2813 movel %a3@,%d4 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 ); 44a0c: 2002 movel %d2,%d0 44a0e: c084 andl %d4,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 44a10: 6716 beqs 44a28 <_Event_Seize+0x50> 44a12: b480 cmpl %d0,%d2 44a14: 6706 beqs 44a1c <_Event_Seize+0x44> 44a16: 0803 0001 btst #1,%d3 44a1a: 670c beqs 44a28 <_Event_Seize+0x50> (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 44a1c: 2400 movel %d0,%d2 44a1e: 4682 notl %d2 44a20: c484 andl %d4,%d2 44a22: 2682 movel %d2,%a3@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 44a24: 46c1 movew %d1,%sr 44a26: 600e bras 44a36 <_Event_Seize+0x5e> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 44a28: 0803 0000 btst #0,%d3 44a2c: 670e beqs 44a3c <_Event_Seize+0x64> _ISR_Enable( level ); 44a2e: 46c1 movew %d1,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 44a30: 720d moveq #13,%d1 44a32: 2541 0034 movel %d1,%a2@(52) *event_out = seized_events; 44a36: 2080 movel %d0,%a0@ return; 44a38: 6000 0096 braw 44ad0 <_Event_Seize+0xf8> * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 44a3c: 2542 0024 movel %d2,%a2@(36) executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a40: 7401 moveq #1,%d2 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 44a42: 2543 0030 movel %d3,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; 44a46: 2548 0028 movel %a0,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a4a: 23c2 0005 bbd2 movel %d2,5bbd2 <_Event_Sync_state> _ISR_Enable( level ); 44a50: 46c1 movew %d1,%sr if ( ticks ) { 44a52: 4a89 tstl %a1 44a54: 6730 beqs 44a86 <_Event_Seize+0xae> _Watchdog_Initialize( 44a56: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a5a: 223c 0004 4c38 movel #281656,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44a60: 2549 0054 movel %a1,%a2@(84) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a64: 2541 0064 movel %d1,%a2@(100) the_watchdog->id = id; 44a68: 2540 0068 movel %d0,%a2@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44a6c: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 44a70: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44a74: 486a 0048 pea %a2@(72) 44a78: 4879 0005 bacc pea 5bacc <_Watchdog_Ticks_chain> 44a7e: 4eb9 0004 7b6c jsr 47b6c <_Watchdog_Insert> 44a84: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 44a86: 4878 0100 pea 100 44a8a: 2f0a movel %a2,%sp@- 44a8c: 4eb9 0004 7458 jsr 47458 <_Thread_Set_state> _ISR_Disable( level ); 44a92: 203c 0000 0700 movel #1792,%d0 44a98: 40c1 movew %sr,%d1 44a9a: 8081 orl %d1,%d0 44a9c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44a9e: 7401 moveq #1,%d2 44aa0: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 44aa2: 2039 0005 bbd2 movel 5bbd2 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 44aa8: 42b9 0005 bbd2 clrl 5bbd2 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44aae: b480 cmpl %d0,%d2 44ab0: 6604 bnes 44ab6 <_Event_Seize+0xde> _ISR_Enable( level ); 44ab2: 46c1 movew %d1,%sr 44ab4: 601a bras 44ad0 <_Event_Seize+0xf8> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 44ab6: 2d4a 000c movel %a2,%fp@(12) 44aba: 2d41 0010 movel %d1,%fp@(16) } 44abe: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 44ac4: 2d40 0008 movel %d0,%fp@(8) } 44ac8: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 44aca: 4ef9 0004 6718 jmp 46718 <_Thread_blocking_operation_Cancel> } 44ad0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 44ad6: 4e5e unlk %fp 44ad8: 4e75 rts ... 00044b30 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 44b30: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 44b36: 4e56 ffe8 linkw %fp,#-24 44b3a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 44b3e: 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 ]; 44b42: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 44b46: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 44b4a: 40c1 movew %sr,%d1 44b4c: 8081 orl %d1,%d0 44b4e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 44b50: 262a 0024 movel %a2@(36),%d3 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 44b54: 2003 movel %d3,%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; 44b56: 2410 movel %a0@,%d2 44b58: 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 ) ) { 44b5a: 6606 bnes 44b62 <_Event_Surrender+0x32> _ISR_Enable( level ); 44b5c: 46c1 movew %d1,%sr return; 44b5e: 6000 00cc braw 44c2c <_Event_Surrender+0xfc> /* * 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() && 44b62: 2279 0005 ba8e moveal 5ba8e <_ISR_Nest_level>,%a1 44b68: 4a89 tstl %a1 44b6a: 674a beqs 44bb6 <_Event_Surrender+0x86> 44b6c: b5f9 0005 baae cmpal 5baae <_Thread_Executing>,%a2 44b72: 6642 bnes 44bb6 <_Event_Surrender+0x86> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 44b74: 2279 0005 bbd2 moveal 5bbd2 <_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() && 44b7a: 7a02 moveq #2,%d5 44b7c: ba89 cmpl %a1,%d5 44b7e: 670e beqs 44b8e <_Event_Surrender+0x5e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 44b80: 2279 0005 bbd2 moveal 5bbd2 <_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() && 44b86: 1a3c 0001 moveb #1,%d5 44b8a: ba89 cmpl %a1,%d5 44b8c: 6628 bnes 44bb6 <_Event_Surrender+0x86> _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) ) { 44b8e: b680 cmpl %d0,%d3 44b90: 6706 beqs 44b98 <_Event_Surrender+0x68> 44b92: 0804 0001 btst #1,%d4 44b96: 671a beqs 44bb2 <_Event_Surrender+0x82> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 44b98: 2600 movel %d0,%d3 44b9a: 4683 notl %d3 44b9c: c682 andl %d2,%d3 44b9e: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba0: 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; 44ba4: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba8: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 44baa: 7003 moveq #3,%d0 44bac: 23c0 0005 bbd2 movel %d0,5bbd2 <_Event_Sync_state> } _ISR_Enable( level ); 44bb2: 46c1 movew %d1,%sr return; 44bb4: 6076 bras 44c2c <_Event_Surrender+0xfc> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 44bb6: 2a2a 0010 movel %a2@(16),%d5 44bba: 0285 0000 0100 andil #256,%d5 44bc0: 6768 beqs 44c2a <_Event_Surrender+0xfa> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 44bc2: b680 cmpl %d0,%d3 44bc4: 6706 beqs 44bcc <_Event_Surrender+0x9c> 44bc6: 0804 0001 btst #1,%d4 44bca: 675e beqs 44c2a <_Event_Surrender+0xfa> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 44bcc: 2600 movel %d0,%d3 44bce: 4683 notl %d3 44bd0: c682 andl %d2,%d3 44bd2: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bd4: 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; 44bd8: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bdc: 2080 movel %d0,%a0@ _ISR_Flash( level ); 44bde: 203c 0000 0700 movel #1792,%d0 44be4: 46c1 movew %d1,%sr 44be6: 8081 orl %d1,%d0 44be8: 46c0 movew %d0,%sr 44bea: 47f9 0004 68a8 lea 468a8 <_Thread_Clear_state>,%a3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 44bf0: 7a02 moveq #2,%d5 44bf2: baaa 0050 cmpl %a2@(80),%d5 44bf6: 6710 beqs 44c08 <_Event_Surrender+0xd8> _ISR_Enable( level ); 44bf8: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 44bfa: 2f3c 1003 fff8 movel #268697592,%sp@- 44c00: 2f0a movel %a2,%sp@- 44c02: 4e93 jsr %a3@ 44c04: 508f addql #8,%sp 44c06: 6024 bras 44c2c <_Event_Surrender+0xfc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 44c08: 7003 moveq #3,%d0 44c0a: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 44c0e: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 44c10: 486a 0048 pea %a2@(72) 44c14: 4eb9 0004 7c88 jsr 47c88 <_Watchdog_Remove> 44c1a: 2f3c 1003 fff8 movel #268697592,%sp@- 44c20: 2f0a movel %a2,%sp@- 44c22: 4e93 jsr %a3@ 44c24: 4fef 000c lea %sp@(12),%sp 44c28: 6002 bras 44c2c <_Event_Surrender+0xfc> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 44c2a: 46c1 movew %d1,%sr } 44c2c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 44c32: 4e5e unlk %fp 44c34: 4e75 rts ... 00045e86 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45e86: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45e88: 4e56 ffe0 linkw %fp,#-32 45e8c: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 45e90: 2241 moveal %d1,%a1 45e92: 5189 subql #8,%a1 45e94: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 45e98: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45e9c: 7601 moveq #1,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 45e9e: 2a49 moveal %a1,%a5 45ea0: 240a movel %a2,%d2 45ea2: 9bca subal %a2,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45ea4: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45ea8: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45eac: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45eb0: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45eb4: 4a03 tstb %d3 45eb6: 6626 bnes 45ede <_Heap_Block_allocate+0x58> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 45eb8: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45ebc: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 45ebe: 52ab 0040 addql #1,%a3@(64) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 45ec2: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 45ec6: 2840 moveal %d0,%a4 stats->free_size -= _Heap_Block_size( block ); 45ec8: c6aa 0004 andl %a2@(4),%d3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 45ecc: 206a 000c moveal %a2@(12),%a0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45ed0: 97ab 0030 subl %d3,%a3@(48) 45ed4: 2948 000c movel %a0,%a4@(12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 45ed8: 2140 0008 movel %d0,%a0@(8) 45edc: 6002 bras 45ee0 <_Heap_Block_allocate+0x5a> } else { free_list_anchor = _Heap_Free_list_head( heap ); 45ede: 204b moveal %a3,%a0 } if ( alloc_area_offset < heap->page_size ) { 45ee0: 202b 0010 movel %a3@(16),%d0 45ee4: b08d cmpl %a5,%d0 45ee6: 630a blss 45ef2 <_Heap_Block_allocate+0x6c> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 45ee8: 4875 5800 pea %a5@(00000000,%d5:l) 45eec: 2f08 movel %a0,%sp@- 45eee: 2f0a movel %a2,%sp@- 45ef0: 6062 bras 45f54 <_Heap_Block_allocate+0xce> - 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; 45ef2: 262a 0004 movel %a2@(4),%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 45ef6: 4c40 1004 remul %d0,%d4,%d1 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 45efa: 7201 moveq #1,%d1 45efc: 93c4 subal %d4,%a1 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 45efe: 2009 movel %a1,%d0 45f00: 908a subl %a2,%d0 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 45f02: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 45f06: c2aa 0004 andl %a2@(4),%d1 45f0a: 671c beqs 45f28 <_Heap_Block_allocate+0xa2> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 45f0c: 2a68 0008 moveal %a0@(8),%a5 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 45f10: 52ab 0038 addql #1,%a3@(56) 45f14: 220a movel %a2,%d1 new_block->next = next; 45f16: 254d 0008 movel %a5,%a2@(8) new_block->prev = block_before; 45f1a: 2548 000c movel %a0,%a2@(12) block_before->next = new_block; 45f1e: 214a 0008 movel %a2,%a0@(8) next->prev = new_block; 45f22: 2b4a 000c movel %a2,%a5@(12) 45f26: 600c bras 45f34 <_Heap_Block_allocate+0xae> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 45f28: 95d2 subal %a2@,%a2 Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 45f2a: 78fe moveq #-2,%d4 45f2c: 2208 movel %a0,%d1 45f2e: c8aa 0004 andl %a2@(4),%d4 45f32: d084 addl %d4,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 45f34: 78fe moveq #-2,%d4 45f36: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 45f38: 7801 moveq #1,%d4 45f3a: 8880 orl %d0,%d4 new_block->prev_size = block_size; 45f3c: 2280 movel %d0,%a1@ new_block->size_and_flag = new_block_size; 45f3e: 2002 movel %d2,%d0 45f40: d083 addl %d3,%d0 45f42: 9089 subl %a1,%d0 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 45f44: 2544 0004 movel %d4,%a2@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45f48: 2449 moveal %a1,%a2 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 45f4a: 2340 0004 movel %d0,%a1@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45f4e: 2f05 movel %d5,%sp@- 45f50: 2f01 movel %d1,%sp@- 45f52: 2f09 movel %a1,%sp@- 45f54: 2f0b movel %a3,%sp@- 45f56: 4eb9 0004 5db8 jsr 45db8 <_Heap_Block_split> alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 45f5c: 202b 0030 movel %a3@(48),%d0 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45f60: 4fef 0010 lea %sp@(16),%sp Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 45f64: b0ab 0034 cmpl %a3@(52),%d0 45f68: 6404 bccs 45f6e <_Heap_Block_allocate+0xe8> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 45f6a: 2740 0034 movel %d0,%a3@(52) } return block; } 45f6e: 200a movel %a2,%d0 45f70: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 45f76: 4e5e unlk %fp 45f78: 4e75 rts ... 00049c00 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 49c00: 4e56 ffe8 linkw %fp,#-24 49c04: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 49c08: 2240 moveal %d0,%a1 49c0a: 5189 subql #8,%a1 49c0c: 206e 0008 moveal %fp@(8),%a0 49c10: 4c68 0001 0010 remul %a0@(16),%d1,%d0 49c16: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 49c1a: 2828 0020 movel %a0@(32),%d4 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 ) 49c1e: 93c1 subal %d1,%a1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 49c20: b889 cmpl %a1,%d4 49c22: 6200 0140 bhiw 49d64 <_Heap_Free+0x164> 49c26: b3e8 0024 cmpal %a0@(36),%a1 49c2a: 53c0 sls %d0 49c2c: 49c0 extbl %d0 49c2e: 4480 negl %d0 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 49c30: 4a00 tstb %d0 49c32: 6700 0130 beqw 49d64 <_Heap_Free+0x164> - 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; 49c36: 2629 0004 movel %a1@(4),%d3 49c3a: 70fe moveq #-2,%d0 49c3c: c083 andl %d3,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 49c3e: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 49c42: b88a cmpl %a2,%d4 49c44: 6200 011e bhiw 49d64 <_Heap_Free+0x164> 49c48: b5e8 0024 cmpal %a0@(36),%a2 49c4c: 53c1 sls %d1 49c4e: 49c1 extbl %d1 49c50: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 49c52: 4a01 tstb %d1 49c54: 6700 010e beqw 49d64 <_Heap_Free+0x164> 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; 49c58: 222a 0004 movel %a2@(4),%d1 _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 49c5c: 7401 moveq #1,%d2 49c5e: c481 andl %d1,%d2 49c60: 4a02 tstb %d2 49c62: 6700 0100 beqw 49d64 <_Heap_Free+0x164> - 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; 49c66: 74fe moveq #-2,%d2 return false; } 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 )); 49c68: 2668 0024 moveal %a0@(36),%a3 49c6c: c282 andl %d2,%d1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 49c6e: b7ca cmpal %a2,%a3 49c70: 6604 bnes 49c76 <_Heap_Free+0x76> 49c72: 4282 clrl %d2 49c74: 6010 bras 49c86 <_Heap_Free+0x86> 49c76: 7401 moveq #1,%d2 49c78: 7a01 moveq #1,%d5 49c7a: c4b2 1804 andl %a2@(00000004,%d1:l),%d2 49c7e: bb82 eorl %d5,%d2 49c80: 0282 0000 00ff andil #255,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 49c86: 7a01 moveq #1,%d5 49c88: c685 andl %d5,%d3 49c8a: 4a03 tstb %d3 49c8c: 6662 bnes 49cf0 <_Heap_Free+0xf0> uintptr_t const prev_size = block->prev_size; 49c8e: 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); 49c90: 93c3 subal %d3,%a1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 49c92: b889 cmpl %a1,%d4 49c94: 6200 00ce bhiw 49d64 <_Heap_Free+0x164> 49c98: b3cb cmpal %a3,%a1 49c9a: 53c4 sls %d4 49c9c: 49c4 extbl %d4 49c9e: 4484 negl %d4 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 49ca0: 4a04 tstb %d4 49ca2: 6700 00c0 beqw 49d64 <_Heap_Free+0x164> 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) ) { 49ca6: 7801 moveq #1,%d4 49ca8: c8a9 0004 andl %a1@(4),%d4 49cac: 4a04 tstb %d4 49cae: 6700 00b4 beqw 49d64 <_Heap_Free+0x164> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 49cb2: 4a02 tstb %d2 49cb4: 6726 beqs 49cdc <_Heap_Free+0xdc> uintptr_t const size = block_size + prev_size + next_block_size; 49cb6: d280 addl %d0,%d1 49cb8: d681 addl %d1,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 49cba: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49cbe: 7201 moveq #1,%d1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 49cc0: 266a 000c moveal %a2@(12),%a3 49cc4: 8283 orl %d3,%d1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 49cc6: 246a 0008 moveal %a2@(8),%a2 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 49cca: 2383 3800 movel %d3,%a1@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49cce: 2341 0004 movel %d1,%a1@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 49cd2: 254b 000c movel %a3,%a2@(12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 49cd6: 274a 0008 movel %a2,%a3@(8) 49cda: 6078 bras 49d54 <_Heap_Free+0x154> 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; 49cdc: d680 addl %d0,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49cde: 7401 moveq #1,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49ce0: 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; 49ce2: 8483 orl %d3,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 49ce4: 2483 movel %d3,%a2@ 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; 49ce6: 2342 0004 movel %d2,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49cea: cbaa 0004 andl %d5,%a2@(4) 49cee: 6064 bras 49d54 <_Heap_Free+0x154> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 49cf0: 4a02 tstb %d2 49cf2: 6728 beqs 49d1c <_Heap_Free+0x11c> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 49cf4: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 49cf8: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49cfa: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 49cfc: 246a 0008 moveal %a2@(8),%a2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 49d00: 234b 000c movel %a3,%a1@(12) 49d04: 8481 orl %d1,%d2 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 49d06: 234a 0008 movel %a2,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 49d0a: 2381 1800 movel %d1,%a1@(00000000,%d1:l) 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; 49d0e: 2342 0004 movel %d2,%a1@(4) new_block->prev = prev; next->prev = new_block; 49d12: 2549 000c movel %a1,%a2@(12) prev->next = new_block; 49d16: 2749 0008 movel %a1,%a3@(8) 49d1a: 6038 bras 49d54 <_Heap_Free+0x154> 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; 49d1c: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49d1e: 72fe moveq #-2,%d1 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; 49d20: 8a80 orl %d0,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 49d22: 2668 0008 moveal %a0@(8),%a3 49d26: 2345 0004 movel %d5,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49d2a: c3aa 0004 andl %d1,%a2@(4) next_block->prev_size = block_size; 49d2e: 2480 movel %d0,%a2@ /* Statistics */ ++stats->free_blocks; 49d30: 2228 0038 movel %a0@(56),%d1 49d34: 5281 addql #1,%d1 new_block->next = next; 49d36: 234b 0008 movel %a3,%a1@(8) new_block->prev = block_before; 49d3a: 2348 000c movel %a0,%a1@(12) block_before->next = new_block; 49d3e: 2149 0008 movel %a1,%a0@(8) next->prev = new_block; 49d42: 2749 000c movel %a1,%a3@(12) 49d46: 2141 0038 movel %d1,%a0@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 49d4a: b2a8 003c cmpl %a0@(60),%d1 49d4e: 6304 blss 49d54 <_Heap_Free+0x154> 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; 49d50: 2141 003c movel %d1,%a0@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 49d54: d1a8 0030 addl %d0,%a0@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 49d58: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 49d5c: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 49d60: 7001 moveq #1,%d0 return( true ); 49d62: 6002 bras 49d66 <_Heap_Free+0x166> 49d64: 4200 clrb %d0 } 49d66: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 49d6a: 4e5e unlk %fp 49d6c: 4e75 rts ... 00063320 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 63320: 4e56 0000 linkw %fp,#0 63324: 206e 000c moveal %fp@(12),%a0 63328: 2f0a movel %a2,%sp@- 6332a: 246e 0008 moveal %fp@(8),%a2 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 6332e: 4290 clrl %a0@ return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 63330: 226a 0008 moveal %a2@(8),%a1 info->largest = 0; 63334: 42a8 0004 clrl %a0@(4) info->total = 0; 63338: 42a8 0008 clrl %a0@(8) for(the_block = _Heap_Free_list_first(the_heap); 6333c: 601a bras 63358 <_Heap_Get_free_information+0x38> - 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; 6333e: 70fe moveq #-2,%d0 63340: c0a9 0004 andl %a1@(4),%d0 uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 63344: 5290 addql #1,%a0@ info->total += the_size; 63346: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 6334a: b0a8 0004 cmpl %a0@(4),%d0 6334e: 6304 blss 63354 <_Heap_Get_free_information+0x34> info->largest = the_size; 63350: 2140 0004 movel %d0,%a0@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 63354: 2269 0008 moveal %a1@(8),%a1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 63358: b5c9 cmpal %a1,%a2 6335a: 66e2 bnes 6333e <_Heap_Get_free_information+0x1e> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 6335c: 245f moveal %sp@+,%a2 6335e: 4e5e unlk %fp 63360: 4e75 rts ... 000586f8 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 586f8: 4e56 ffe0 linkw %fp,#-32 586fc: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 58700: 242e 000c movel %fp@(12),%d2 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 ) 58704: 2202 movel %d2,%d1 58706: 2042 moveal %d2,%a0 58708: 5188 subql #8,%a0 5870a: 246e 0008 moveal %fp@(8),%a2 5870e: 286e 0014 moveal %fp@(20),%a4 58712: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 58718: 4294 clrl %a4@ void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 5871a: 266e 0018 moveal %fp@(24),%a3 5871e: 91c0 subal %d0,%a0 58720: 2a2e 0010 movel %fp@(16),%d5 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; *new_size = 0; 58724: 4293 clrl %a3@ 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 58726: b1ea 0020 cmpal %a2@(32),%a0 5872a: 6500 0096 bcsw 587c2 <_Heap_Resize_block+0xca> 5872e: b1ea 0024 cmpal %a2@(36),%a0 58732: 6200 008e bhiw 587c2 <_Heap_Resize_block+0xca> - 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; 58736: 70fe moveq #-2,%d0 58738: 72fe moveq #-2,%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 5873a: 7801 moveq #1,%d4 5873c: 7c01 moveq #1,%d6 uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5873e: 7604 moveq #4,%d3 58740: 9682 subl %d2,%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; 58742: c0a8 0004 andl %a0@(4),%d0 { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 58746: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5874a: d689 addl %a1,%d3 5874c: c2a9 0004 andl %a1@(4),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 58750: c8b1 1804 andl %a1@(00000004,%d1:l),%d4 bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 58754: 2883 movel %d3,%a4@ 58756: bd84 eorl %d6,%d4 58758: 1c04 moveb %d4,%d6 if ( next_block_is_free ) { 5875a: 6704 beqs 58760 <_Heap_Resize_block+0x68> block_size += next_block_size; 5875c: d081 addl %d1,%d0 alloc_size += next_block_size; 5875e: d681 addl %d1,%d3 } if ( new_alloc_size > alloc_size ) { 58760: b685 cmpl %d5,%d3 58762: 6404 bccs 58768 <_Heap_Resize_block+0x70> 58764: 7001 moveq #1,%d0 58766: 605c bras 587c4 <_Heap_Resize_block+0xcc> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 58768: 4a06 tstb %d6 5876a: 672a beqs 58796 <_Heap_Resize_block+0x9e> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5876c: 7601 moveq #1,%d3 5876e: c6a8 0004 andl %a0@(4),%d3 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 58772: 2869 000c moveal %a1@(12),%a4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 58776: 8680 orl %d0,%d3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 58778: 2269 0008 moveal %a1@(8),%a1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5877c: 2143 0004 movel %d3,%a0@(4) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 58780: 7601 moveq #1,%d3 58782: 87b0 0804 orl %d3,%a0@(00000004,%d0:l) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 58786: 234c 000c movel %a4,%a1@(12) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; 5878a: 93aa 0030 subl %d1,%a2@(48) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; 5878e: 53aa 0038 subql #1,%a2@(56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 58792: 2949 0008 movel %a1,%a4@(8) stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 58796: 2f05 movel %d5,%sp@- 58798: 2f02 movel %d2,%sp@- 5879a: 2f08 movel %a0,%sp@- 5879c: 2f0a movel %a2,%sp@- 5879e: 4eb9 0004 5e86 jsr 45e86 <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 587a4: 4fef 0010 lea %sp@(16),%sp block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 587a8: 72fe moveq #-2,%d1 /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 587aa: 2040 moveal %d0,%a0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 587ac: 2240 moveal %d0,%a1 587ae: 93c2 subal %d2,%a1 /* Statistics */ ++stats->resizes; 587b0: 4280 clrl %d0 block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 587b2: c2a8 0004 andl %a0@(4),%d1 587b6: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 587ba: 2689 movel %a1,%a3@ /* Statistics */ ++stats->resizes; 587bc: 52aa 0054 addql #1,%a2@(84) 587c0: 6002 bras 587c4 <_Heap_Resize_block+0xcc> 587c2: 7002 moveq #2,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 587c4: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 587ca: 4e5e unlk %fp 587cc: 4e75 rts ... 00046c68 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 46c68: 41f9 0004 3474 lea 43474 ,%a0 46c6e: 4e56 0000 linkw %fp,#0 46c72: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 46c76: 4a2e 000f tstb %fp@(15) 46c7a: 670a beqs 46c86 <_Heap_Walk_print+0x1e> printk( "FAIL[%d]: ", source ); 46c7c: 2f00 movel %d0,%sp@- 46c7e: 4879 0005 a6d3 pea 5a6d3 46c84: 6008 bras 46c8e <_Heap_Walk_print+0x26> } else { printk( "PASS[%d]: ", source ); 46c86: 2f00 movel %d0,%sp@- 46c88: 4879 0005 a6de pea 5a6de 46c8e: 4e90 jsr %a0@ 46c90: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 46c92: 486e 0014 pea %fp@(20) 46c96: 2f2e 0010 movel %fp@(16),%sp@- 46c9a: 4eb9 0004 4df8 jsr 44df8 46ca0: 508f addql #8,%sp va_end( ap ); } 46ca2: 4e5e unlk %fp 46ca4: 4e75 rts ... 00045f7c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45f7c: 4e56 0000 linkw %fp,#0 45f80: 222e 000c movel %fp@(12),%d1 45f84: 2f03 movel %d3,%sp@- _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45f86: 4283 clrl %d3 45f88: 1601 moveb %d1,%d3 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45f8a: 2f02 movel %d2,%sp@- 45f8c: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45f90: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45f92: 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 ); 45f96: 2f03 movel %d3,%sp@- _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 45f98: 263c 0000 0700 movel #1792,%d3 _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 ); 45f9e: 2f00 movel %d0,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 45fa0: 13c1 0005 ba9e moveb %d1,5ba9e <_Internal_errors_What_happened+0x4> bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 45fa6: 23c0 0005 ba9a movel %d0,5ba9a <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 45fac: 23c2 0005 baa0 movel %d2,5baa0 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 45fb2: 4eb9 0004 7a26 jsr 47a26 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 45fb8: 40c0 movew %sr,%d0 45fba: 8083 orl %d3,%d0 45fbc: 46c0 movew %d0,%sr 45fbe: 2002 movel %d2,%d0 <== NOT EXECUTED 45fc0: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 45fc6: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 45fc8: 7005 moveq #5,%d0 45fca: 4fef 000c lea %sp@(12),%sp 45fce: 23c0 0005 bb76 movel %d0,5bb76 <_System_state_Current> 45fd4: 60fe bras 45fd4 <_Internal_error_Occurred+0x58> ... 0004cc78 <_Message_queue_Translate_core_message_queue_return_code>: }; rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( uint32_t status ) { 4cc78: 41f9 0006 3694 lea 63694 <_Message_queue_Translate_core_return_code_>,%a0 4cc7e: 4e56 0000 linkw %fp,#0 if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; } 4cc82: 202e 0008 movel %fp@(8),%d0 4cc86: 4e5e unlk %fp 4cc88: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4cc8c: 4e75 rts ... 00049d70 <_Objects_API_maximum_class>: case OBJECTS_NO_API: default: break; } return 0; } 49d70: 7203 moveq #3,%d1 #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 49d72: 4e56 0000 linkw %fp,#0 case OBJECTS_NO_API: default: break; } return 0; } 49d76: 202e 0008 movel %fp@(8),%d0 49d7a: 5380 subql #1,%d0 49d7c: b280 cmpl %d0,%d1 49d7e: 6404 bccs 49d84 <_Objects_API_maximum_class+0x14> 49d80: 4280 clrl %d0 49d82: 600a bras 49d8e <_Objects_API_maximum_class+0x1e> 49d84: 41f9 0005 9768 lea 59768 ,%a0 49d8a: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 49d8e: 4e5e unlk %fp 49d90: 4e75 rts ... 00046040 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 46040: 4e56 fff0 linkw %fp,#-16 46044: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46048: 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 ) 4604c: 4aaa 0014 tstl %a2@(20) 46050: 6604 bnes 46056 <_Objects_Allocate+0x16> 46052: 4280 clrl %d0 <== NOT EXECUTED 46054: 605e bras 460b4 <_Objects_Allocate+0x74> <== NOT EXECUTED /* * 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 ); 46056: 240a movel %a2,%d2 46058: 0682 0000 001c addil #28,%d2 4605e: 47f9 0004 986c lea 4986c <_Chain_Get>,%a3 46064: 2f02 movel %d2,%sp@- 46066: 4e93 jsr %a3@ if ( information->auto_extend ) { 46068: 588f addql #4,%sp 4606a: 4a2a 0010 tstb %a2@(16) 4606e: 6744 beqs 460b4 <_Objects_Allocate+0x74> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 46070: 4a80 tstl %d0 46072: 6612 bnes 46086 <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 46074: 2f0a movel %a2,%sp@- 46076: 4eb9 0004 60ec jsr 460ec <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 4607c: 2f02 movel %d2,%sp@- 4607e: 4e93 jsr %a3@ } if ( the_object ) { 46080: 508f addql #8,%sp 46082: 4a80 tstl %d0 46084: 672e beqs 460b4 <_Objects_Allocate+0x74> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46086: 2040 moveal %d0,%a0 46088: 4281 clrl %d1 4608a: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4608c: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 4608e: 362a 0008 movew %a2@(8),%d3 46092: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46096: 342a 0012 movew %a2@(18),%d2 information->inactive--; 4609a: 306a 0028 moveaw %a2@(40),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 4609e: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460a0: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 460a4: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460a6: e589 lsll #2,%d1 information->inactive--; 460a8: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460ac: 206a 002a moveal %a2@(42),%a0 460b0: d1c1 addal %d1,%a0 460b2: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 460b4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 460ba: 4e5e unlk %fp 460bc: 4e75 rts ... 000460c0 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 460c0: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 460c2: 4e56 0000 linkw %fp,#0 460c6: 226e 000c moveal %fp@(12),%a1 460ca: 206e 0008 moveal %fp@(8),%a0 460ce: 2f0a movel %a2,%sp@- 460d0: 2468 0018 moveal %a0@(24),%a2 460d4: 3029 000a movew %a1@(10),%d0 460d8: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 460dc: 2d49 000c movel %a1,%fp@(12) } 460e0: 245f moveal %sp@+,%a2 460e2: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 460e4: 4ef9 0004 65e0 jmp 465e0 <_Objects_Namespace_remove> ... 000460ec <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 460ec: 4e56 ffc8 linkw %fp,#-56 460f0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 460f4: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 460f8: 4283 clrl %d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 460fa: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 460fe: 362a 0008 movew %a2@(8),%d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 46102: 4a88 tstl %a0 46104: 6608 bnes 4610e <_Objects_Extend_information+0x22> 46106: 2403 movel %d3,%d2 46108: 4284 clrl %d4 4610a: 4285 clrl %d5 4610c: 602a bras 46138 <_Objects_Extend_information+0x4c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 4610e: 4280 clrl %d0 46110: 2403 movel %d3,%d2 46112: 4284 clrl %d4 46114: 302a 0012 movew %a2@(18),%d0 46118: 3a2a 000e movew %a2@(14),%d5 4611c: 0285 0000 ffff andil #65535,%d5 46122: 8ac0 divuw %d0,%d5 46124: 0285 0000 ffff andil #65535,%d5 for ( ; block < block_count; block++ ) { 4612a: 6008 bras 46134 <_Objects_Extend_information+0x48> if ( information->object_blocks[ block ] == NULL ) 4612c: 4a98 tstl %a0@+ 4612e: 6708 beqs 46138 <_Objects_Extend_information+0x4c> 46130: d480 addl %d0,%d2 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 46132: 5284 addql #1,%d4 46134: ba84 cmpl %d4,%d5 46136: 62f4 bhis 4612c <_Objects_Extend_information+0x40> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 46138: 4280 clrl %d0 4613a: 4287 clrl %d7 4613c: 302a 0012 movew %a2@(18),%d0 46140: 3e2a 000e movew %a2@(14),%d7 46144: de80 addl %d0,%d7 /* * 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 ) { 46146: 0c87 0000 ffff cmpil #65535,%d7 4614c: 6200 01da bhiw 46328 <_Objects_Extend_information+0x23c> /* * 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; 46150: 41ea 0014 lea %a2@(20),%a0 46154: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 46158: 4a2a 0010 tstb %a2@(16) 4615c: 6712 beqs 46170 <_Objects_Extend_information+0x84> new_object_block = _Workspace_Allocate( block_size ); 4615e: 2f00 movel %d0,%sp@- 46160: 4eb9 0004 7db4 jsr 47db4 <_Workspace_Allocate> if ( !new_object_block ) 46166: 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 ); 46168: 2c00 movel %d0,%d6 if ( !new_object_block ) 4616a: 6610 bnes 4617c <_Objects_Extend_information+0x90> 4616c: 6000 01ba braw 46328 <_Objects_Extend_information+0x23c> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 46170: 2f00 movel %d0,%sp@- 46172: 4eb9 0004 7d80 jsr 47d80 <_Workspace_Allocate_or_fatal_error> 46178: 588f addql #4,%sp 4617a: 2c00 movel %d0,%d6 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 4617c: 4280 clrl %d0 4617e: 302a 000e movew %a2@(14),%d0 46182: b082 cmpl %d2,%d0 46184: 6200 0112 bhiw 46298 <_Objects_Extend_information+0x1ac> */ /* * Up the block count and maximum */ block_count++; 46188: 2845 moveal %d5,%a4 4618a: 528c addql #1,%a4 * 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 ); 4618c: 2007 movel %d7,%d0 4618e: d083 addl %d3,%d0 46190: 41f4 ca00 lea %a4@(00000000,%a4:l:2),%a0 46194: d088 addl %a0,%d0 46196: e588 lsll #2,%d0 46198: 2f00 movel %d0,%sp@- 4619a: 4eb9 0004 7db4 jsr 47db4 <_Workspace_Allocate> if ( !object_blocks ) { 461a0: 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 ); 461a2: 2640 moveal %d0,%a3 if ( !object_blocks ) { 461a4: 4a80 tstl %d0 461a6: 660e bnes 461b6 <_Objects_Extend_information+0xca> _Workspace_Free( new_object_block ); 461a8: 2f06 movel %d6,%sp@- 461aa: 4eb9 0004 7dd0 jsr 47dd0 <_Workspace_Free> return; 461b0: 588f addql #4,%sp 461b2: 6000 0174 braw 46328 <_Objects_Extend_information+0x23c> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 461b6: 200c movel %a4,%d0 461b8: e588 lsll #2,%d0 461ba: 2840 moveal %d0,%a4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 461bc: 4280 clrl %d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 461be: 4bf3 c800 lea %a3@(00000000,%a4:l),%a5 461c2: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 461c6: 302a 000e movew %a2@(14),%d0 461ca: b680 cmpl %d0,%d3 461cc: 6506 bcss 461d4 <_Objects_Extend_information+0xe8> 461ce: 204c moveal %a4,%a0 461d0: 4280 clrl %d0 461d2: 604a bras 4621e <_Objects_Extend_information+0x132> /* * 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, 461d4: 2205 movel %d5,%d1 461d6: e589 lsll #2,%d1 461d8: 2f01 movel %d1,%sp@- 461da: 2f2a 002e movel %a2@(46),%sp@- 461de: 2d41 fff0 movel %d1,%fp@(-16) 461e2: 2f0b movel %a3,%sp@- 461e4: 4eb9 0004 c1c8 jsr 4c1c8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 461ea: 222e fff0 movel %fp@(-16),%d1 461ee: 2f01 movel %d1,%sp@- 461f0: 2f2a 002a movel %a2@(42),%sp@- 461f4: 2f0d movel %a5,%sp@- 461f6: 4eb9 0004 c1c8 jsr 4c1c8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 461fc: 4280 clrl %d0 461fe: 302a 000e movew %a2@(14),%d0 46202: d680 addl %d0,%d3 46204: e58b lsll #2,%d3 46206: 2f03 movel %d3,%sp@- 46208: 2f2a 0018 movel %a2@(24),%sp@- 4620c: 2f0c movel %a4,%sp@- 4620e: 4eb9 0004 c1c8 jsr 4c1c8 46214: 4fef 0024 lea %sp@(36),%sp 46218: 6008 bras 46222 <_Objects_Extend_information+0x136> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 4621a: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4621c: 5280 addql #1,%d0 4621e: b680 cmpl %d0,%d3 46220: 62f8 bhis 4621a <_Objects_Extend_information+0x12e> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 46222: 4281 clrl %d1 46224: 2002 movel %d2,%d0 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 46226: e58d lsll #2,%d5 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 46228: 322a 0012 movew %a2@(18),%d1 4622c: 41f4 2c00 lea %a4@(00000000,%d2:l:4),%a0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 46230: 42b5 5800 clrl %a5@(00000000,%d5:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 46234: d282 addl %d2,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 46236: 42b3 5800 clrl %a3@(00000000,%d5:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 4623a: 6004 bras 46240 <_Objects_Extend_information+0x154> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 4623c: 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++ ) { 4623e: 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 ; 46240: b280 cmpl %d0,%d1 46242: 62f8 bhis 4623c <_Objects_Extend_information+0x150> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 46244: 203c 0000 0700 movel #1792,%d0 4624a: 40c3 movew %sr,%d3 4624c: 8083 orl %d3,%d0 4624e: 46c0 movew %d0,%sr information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 46250: 2012 movel %a2@,%d0 46252: 7218 moveq #24,%d1 46254: 4285 clrl %d5 46256: e3a8 lsll %d1,%d0 46258: 3a07 movew %d7,%d5 4625a: 4281 clrl %d1 4625c: 2245 moveal %d5,%a1 4625e: 7a1b moveq #27,%d5 46260: 322a 0004 movew %a2@(4),%d1 46264: 08c0 0010 bset #16,%d0 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 46268: 3547 000e movew %d7,%a2@(14) information->maximum_id = _Objects_Build_id( 4626c: eba9 lsll %d5,%d1 4626e: 2e09 movel %a1,%d7 46270: 8081 orl %d1,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 46272: 206a 002e moveal %a2@(46),%a0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 46276: 8e80 orl %d0,%d7 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 46278: 254b 002e movel %a3,%a2@(46) information->inactive_per_block = inactive_per_block; 4627c: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 46280: 2547 000a movel %d7,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 46284: 254c 0018 movel %a4,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 46288: 46c3 movew %d3,%sr if ( old_tables ) 4628a: 4a88 tstl %a0 4628c: 670a beqs 46298 <_Objects_Extend_information+0x1ac> _Workspace_Free( old_tables ); 4628e: 2f08 movel %a0,%sp@- 46290: 4eb9 0004 7dd0 jsr 47dd0 <_Workspace_Free> 46296: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 46298: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4629c: 4281 clrl %d1 4629e: 200e movel %fp,%d0 462a0: 0680 ffff fff4 addil #-12,%d0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 462a6: 2a00 movel %d0,%d5 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 462a8: 260a movel %a2,%d3 462aa: 0683 0000 001c addil #28,%d3 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 462b0: 49f9 0004 986c lea 4986c <_Chain_Get>,%a4 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 462b6: 47f9 0004 5874 lea 45874 <_Chain_Append>,%a3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 462bc: e58c lsll #2,%d4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 462be: 322a 0012 movew %a2@(18),%d1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 462c2: 2186 4800 movel %d6,%a0@(00000000,%d4:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 462c6: 2f2a 0014 movel %a2@(20),%sp@- 462ca: 2f01 movel %d1,%sp@- 462cc: 2f06 movel %d6,%sp@- 462ce: 2f00 movel %d0,%sp@- 462d0: 4eb9 0004 98a0 jsr 498a0 <_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 ) { 462d6: 4fef 0010 lea %sp@(16),%sp 462da: 6028 bras 46304 <_Objects_Extend_information+0x218> the_object->id = _Objects_Build_id( 462dc: 2212 movel %a2@,%d1 462de: 7c18 moveq #24,%d6 462e0: 7e1b moveq #27,%d7 462e2: 2040 moveal %d0,%a0 462e4: eda9 lsll %d6,%d1 462e6: 4286 clrl %d6 462e8: 3c2a 0004 movew %a2@(4),%d6 462ec: 08c1 0010 bset #16,%d1 462f0: efae lsll %d7,%d6 462f2: 8286 orl %d6,%d1 462f4: 8282 orl %d2,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 462f6: 5282 addql #1,%d2 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 462f8: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 462fc: 2f00 movel %d0,%sp@- 462fe: 2f03 movel %d3,%sp@- 46300: 4e93 jsr %a3@ index++; 46302: 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 ) { 46304: 2f05 movel %d5,%sp@- 46306: 4e94 jsr %a4@ 46308: 588f addql #4,%sp 4630a: 4a80 tstl %d0 4630c: 66ce bnes 462dc <_Objects_Extend_information+0x1f0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4630e: 4280 clrl %d0 information->inactive = 46310: 322a 0028 movew %a2@(40),%d1 46314: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46318: 206a 002a moveal %a2@(42),%a0 information->inactive = 4631c: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4631e: 3009 movew %a1,%d0 information->inactive = 46320: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46324: 2180 4800 movel %d0,%a0@(00000000,%d4:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 46328: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4632e: 4e5e unlk %fp 46330: 4e75 rts ... 000463e4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 463e4: 4e56 0000 linkw %fp,#0 463e8: 2f03 movel %d3,%sp@- 463ea: 262e 0008 movel %fp@(8),%d3 463ee: 2f02 movel %d2,%sp@- 463f0: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 463f4: 672e beqs 46424 <_Objects_Get_information+0x40> /* * 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 ); 463f6: 2f03 movel %d3,%sp@- 463f8: 4eb9 0004 9d70 jsr 49d70 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 463fe: 588f addql #4,%sp 46400: 4a80 tstl %d0 46402: 6720 beqs 46424 <_Objects_Get_information+0x40> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 46404: b082 cmpl %d2,%d0 46406: 651c bcss 46424 <_Objects_Get_information+0x40> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46408: 41f9 0005 b9ac lea 5b9ac <_Objects_Information_table>,%a0 4640e: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 46412: 4a88 tstl %a0 46414: 670e beqs 46424 <_Objects_Get_information+0x40> return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 46416: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 4641a: 670a beqs 46426 <_Objects_Get_information+0x42> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 4641c: 2040 moveal %d0,%a0 4641e: 4a68 000e tstw %a0@(14) 46422: 6602 bnes 46426 <_Objects_Get_information+0x42> 46424: 4280 clrl %d0 return NULL; #endif return info; } 46426: 242e fff8 movel %fp@(-8),%d2 4642a: 262e fffc movel %fp@(-4),%d3 4642e: 4e5e unlk %fp 46430: 4e75 rts ... 0004ff44 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 4ff44: 4e56 ffdc linkw %fp,#-36 4ff48: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4ff4c: 262e 0008 movel %fp@(8),%d3 4ff50: 282e 000c movel %fp@(12),%d4 4ff54: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 4ff58: 4a84 tstl %d4 4ff5a: 6700 00a8 beqw 50004 <_Objects_Get_name_as_string+0xc0> return NULL; if ( name == NULL ) 4ff5e: 4a82 tstl %d2 4ff60: 6700 00a4 beqw 50006 <_Objects_Get_name_as_string+0xc2> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4ff64: 4a83 tstl %d3 4ff66: 660a bnes 4ff72 <_Objects_Get_name_as_string+0x2e> 4ff68: 2079 0006 7006 moveal 67006 <_Thread_Executing>,%a0 4ff6e: 2628 0008 movel %a0@(8),%d3 information = _Objects_Get_information_id( tmpId ); 4ff72: 2f03 movel %d3,%sp@- 4ff74: 4eb9 0004 9cf0 jsr 49cf0 <_Objects_Get_information_id> if ( !information ) 4ff7a: 588f addql #4,%sp 4ff7c: 4a80 tstl %d0 4ff7e: 6700 0084 beqw 50004 <_Objects_Get_name_as_string+0xc0> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 4ff82: 486e fffc pea %fp@(-4) 4ff86: 2f03 movel %d3,%sp@- 4ff88: 2f00 movel %d0,%sp@- 4ff8a: 4eb9 0004 9dc4 jsr 49dc4 <_Objects_Get> switch ( location ) { 4ff90: 4fef 000c lea %sp@(12),%sp 4ff94: 4aae fffc tstl %fp@(-4) 4ff98: 666a bnes 50004 <_Objects_Get_name_as_string+0xc0> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 4ff9a: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 4ff9c: 7218 moveq #24,%d1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4ff9e: 5384 subql #1,%d4 4ffa0: 43ee fff7 lea %fp@(-9),%a1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 4ffa4: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 4ffa8: 2c00 movel %d0,%d6 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4ffaa: 2a00 movel %d0,%d5 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4ffac: 2600 movel %d0,%d3 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 4ffae: e2ae lsrl %d1,%d6 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4ffb0: e08d lsrl #8,%d5 lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4ffb2: 2042 moveal %d2,%a0 4ffb4: 4201 clrb %d1 uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 4ffb6: 1d40 fffa moveb %d0,%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; 4ffba: 4243 clrw %d3 4ffbc: 4843 swap %d3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4ffbe: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 4ffc0: 1d46 fff7 moveb %d6,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4ffc4: 1d45 fff9 moveb %d5,%fp@(-7) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4ffc8: 1d43 fff8 moveb %d3,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4ffcc: 1d40 fffb moveb %d0,%fp@(-5) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4ffd0: 6018 bras 4ffea <_Objects_Get_name_as_string+0xa6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 4ffd2: 2479 0006 51f0 moveal 651f0 <__ctype_ptr__>,%a2 4ffd8: 1632 3801 moveb %a2@(00000001,%d3:l),%d3 4ffdc: 49c3 extbl %d3 4ffde: 0283 0000 0097 andil #151,%d3 4ffe4: 6602 bnes 4ffe8 <_Objects_Get_name_as_string+0xa4> 4ffe6: 702a moveq #42,%d0 4ffe8: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4ffea: b881 cmpl %d1,%d4 4ffec: 630c blss 4fffa <_Objects_Get_name_as_string+0xb6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 4ffee: 4283 clrl %d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4fff0: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 4fff4: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 4fff6: 1600 moveb %d0,%d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4fff8: 66d8 bnes 4ffd2 <_Objects_Get_name_as_string+0x8e> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 4fffa: 4210 clrb %a0@ _Thread_Enable_dispatch(); 4fffc: 4eb9 0004 a696 jsr 4a696 <_Thread_Enable_dispatch> return name; 50002: 6002 bras 50006 <_Objects_Get_name_as_string+0xc2> 50004: 4282 clrl %d2 } return NULL; /* unreachable path */ } 50006: 2002 movel %d2,%d0 50008: 4cee 047c ffdc moveml %fp@(-36),%d2-%d6/%a2 5000e: 4e5e unlk %fp 50010: 4e75 rts ... 00052364 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 52364: 4e56 ffec linkw %fp,#-20 52368: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 5236c: 266e 0008 moveal %fp@(8),%a3 52370: 242e 000c movel %fp@(12),%d2 52374: 246e 0010 moveal %fp@(16),%a2 52378: 286e 0014 moveal %fp@(20),%a4 Objects_Control *object; Objects_Id next_id; if ( !information ) 5237c: 4a8b tstl %a3 5237e: 6746 beqs 523c6 <_Objects_Get_next+0x62> return NULL; if ( !location_p ) 52380: 4a8a tstl %a2 52382: 6742 beqs 523c6 <_Objects_Get_next+0x62> return NULL; if ( !next_id_p ) 52384: 4a8c tstl %a4 52386: 673e beqs 523c6 <_Objects_Get_next+0x62> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 52388: 4a42 tstw %d2 5238a: 6604 bnes 52390 <_Objects_Get_next+0x2c> next_id = information->minimum_id; 5238c: 242b 0006 movel %a3@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 52390: 4bf9 0004 9dc4 lea 49dc4 <_Objects_Get>,%a5 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 52396: 4281 clrl %d1 52398: 4280 clrl %d0 5239a: 322b 000e movew %a3@(14),%d1 5239e: 3002 movew %d2,%d0 523a0: b081 cmpl %d1,%d0 523a2: 630c blss 523b0 <_Objects_Get_next+0x4c> { *location_p = OBJECTS_ERROR; 523a4: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 523a6: 72ff moveq #-1,%d1 523a8: 4280 clrl %d0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 523aa: 2482 movel %d2,%a2@ *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 523ac: 2881 movel %d1,%a4@ return 0; 523ae: 6018 bras 523c8 <_Objects_Get_next+0x64> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 523b0: 2f0a movel %a2,%sp@- 523b2: 2f02 movel %d2,%sp@- next_id++; 523b4: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 523b6: 2f0b movel %a3,%sp@- 523b8: 4e95 jsr %a5@ next_id++; } while (*location_p != OBJECTS_LOCAL); 523ba: 4fef 000c lea %sp@(12),%sp 523be: 4a92 tstl %a2@ 523c0: 66d4 bnes 52396 <_Objects_Get_next+0x32> *next_id_p = next_id; 523c2: 2882 movel %d2,%a4@ return object; 523c4: 6002 bras 523c8 <_Objects_Get_next+0x64> final: *next_id_p = OBJECTS_ID_FINAL; return 0; 523c6: 4280 clrl %d0 } 523c8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 523ce: 4e5e unlk %fp 523d0: 4e75 rts ... 00049e24 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 49e24: 4e56 fffc linkw %fp,#-4 49e28: 222e 0008 movel %fp@(8),%d1 49e2c: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49e2e: 4a81 tstl %d1 49e30: 660a bnes 49e3c <_Objects_Id_to_name+0x18> 49e32: 2079 0006 7006 moveal 67006 <_Thread_Executing>,%a0 49e38: 2228 0008 movel %a0@(8),%d1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 49e3c: 7418 moveq #24,%d2 49e3e: 2001 movel %d1,%d0 49e40: e4a8 lsrl %d2,%d0 49e42: 143c 0007 moveb #7,%d2 49e46: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 49e48: 143c 0003 moveb #3,%d2 49e4c: 2040 moveal %d0,%a0 49e4e: 5388 subql #1,%a0 49e50: b488 cmpl %a0,%d2 49e52: 6538 bcss 49e8c <_Objects_Id_to_name+0x68> 49e54: 6040 bras 49e96 <_Objects_Id_to_name+0x72> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 49e56: 2001 movel %d1,%d0 49e58: 741b moveq #27,%d2 49e5a: e4a8 lsrl %d2,%d0 49e5c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 49e60: 672a beqs 49e8c <_Objects_Id_to_name+0x68> #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 ); 49e62: 486e fffc pea %fp@(-4) 49e66: 2f01 movel %d1,%sp@- 49e68: 2f00 movel %d0,%sp@- 49e6a: 4eb9 0004 9dc4 jsr 49dc4 <_Objects_Get> if ( !the_object ) 49e70: 4fef 000c lea %sp@(12),%sp 49e74: 4a80 tstl %d0 49e76: 6714 beqs 49e8c <_Objects_Id_to_name+0x68> return OBJECTS_INVALID_ID; *name = the_object->name; 49e78: 206e 000c moveal %fp@(12),%a0 49e7c: 2240 moveal %d0,%a1 49e7e: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 49e82: 4eb9 0004 a696 jsr 4a696 <_Thread_Enable_dispatch> 49e88: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 49e8a: 6002 bras 49e8e <_Objects_Id_to_name+0x6a> 49e8c: 7003 moveq #3,%d0 } 49e8e: 242e fff8 movel %fp@(-8),%d2 49e92: 4e5e unlk %fp 49e94: 4e75 rts the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 49e96: 41f9 0006 6f04 lea 66f04 <_Objects_Information_table>,%a0 49e9c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 49ea0: 4a88 tstl %a0 49ea2: 66b2 bnes 49e56 <_Objects_Id_to_name+0x32> 49ea4: 60e6 bras 49e8c <_Objects_Id_to_name+0x68> ... 000464ec <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 464ec: 41f9 0005 b9ac lea 5b9ac <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 464f2: 4e56 fff0 linkw %fp,#-16 464f6: 202e 000c movel %fp@(12),%d0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 464fa: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 464fe: 48d7 003c moveml %d2-%d5,%sp@ 46502: 222e 0014 movel %fp@(20),%d1 46506: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46508: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4650a: 206e 0008 moveal %fp@(8),%a0 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4650e: 4242 clrw %d2 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46510: 3a2e 001a movew %fp@(26),%d5 46514: 282e 0010 movel %fp@(16),%d4 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46518: d683 addl %d3,%d3 4651a: 9783 subxl %d3,%d3 4651c: 4483 negl %d3 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4651e: 3142 0028 movew %d2,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 46522: 3142 000e movew %d2,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46526: 242e 0020 movel %fp@(32),%d2 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 4652a: 3144 0004 movew %d4,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 4652e: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 46532: 2145 0014 movel %d5,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46536: 2388 4c00 movel %a0,%a1@(00000000,%d4:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 4653a: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 4653e: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 46540: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 46544: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 46548: 42a8 002e clrl %a0@(46) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 4654c: 4a03 tstb %d3 4654e: 6714 beqs 46564 <_Objects_Initialize_information+0x78> 46550: 4a81 tstl %d1 46552: 6610 bnes 46564 <_Objects_Initialize_information+0x78> _Internal_error_Occurred( 46554: 4878 0014 pea 14 46558: 4878 0001 pea 1 4655c: 42a7 clrl %sp@- 4655e: 4eb9 0004 5f7c jsr 45f7c <_Internal_error_Occurred> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46564: 7a18 moveq #24,%d5 46566: 4a81 tstl %d1 46568: 56c3 sne %d3 4656a: eba8 lsll %d5,%d0 4656c: 1a3c 001b moveb #27,%d5 46570: 49c3 extbl %d3 46572: 4483 negl %d3 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 46574: 43f9 0005 b19c lea 5b19c ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4657a: ebac lsll %d5,%d4 4657c: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46580: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46584: 8084 orl %d4,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46586: ca82 andl %d2,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 46588: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4658c: 8083 orl %d3,%d0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 4658e: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46592: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46596: 4a85 tstl %d5 46598: 6604 bnes 4659e <_Objects_Initialize_information+0xb2> 4659a: 2002 movel %d2,%d0 4659c: 6008 bras 465a6 <_Objects_Initialize_information+0xba> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 4659e: 2002 movel %d2,%d0 <== NOT EXECUTED 465a0: 5880 addql #4,%d0 <== NOT EXECUTED 465a2: 74fc moveq #-4,%d2 <== NOT EXECUTED 465a4: c082 andl %d2,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 465a6: 43e8 0020 lea %a0@(32),%a1 465aa: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 465ae: 43e8 001c lea %a0@(28),%a1 ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 465b2: 3140 0032 movew %d0,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 465b6: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 465ba: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 465be: 4a81 tstl %d1 465c0: 6712 beqs 465d4 <_Objects_Initialize_information+0xe8> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 465c2: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 465c6: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 465cc: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 465ce: 4ef9 0004 60ec jmp 460ec <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 465d4: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 465da: 4e5e unlk %fp 465dc: 4e75 rts ... 00048190 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48190: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48192: 4e56 fff0 linkw %fp,#-16 48196: 206e 0008 moveal %fp@(8),%a0 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4819a: 3028 0032 movew %a0@(50),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4819e: 48d7 041c moveml %d2-%d4/%a2,%sp@ 481a2: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 481a6: 2f00 movel %d0,%sp@- 481a8: 2f0a movel %a2,%sp@- 481aa: 4eb9 0004 e8f4 jsr 4e8f4 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 481b0: 508f addql #8,%sp 481b2: 7201 moveq #1,%d1 481b4: 1812 moveb %a2@,%d4 481b6: b280 cmpl %d0,%d1 481b8: 644a bccs 48204 <_Objects_Set_name+0x74> 481ba: 7602 moveq #2,%d3 481bc: 142a 0001 moveb %a2@(1),%d2 481c0: 49c2 extbl %d2 481c2: 4842 swap %d2 481c4: 4242 clrw %d2 481c6: b680 cmpl %d0,%d3 481c8: 643e bccs 48208 <_Objects_Set_name+0x78> 481ca: 163c 0003 moveb #3,%d3 481ce: 122a 0002 moveb %a2@(2),%d1 481d2: 49c1 extbl %d1 481d4: e189 lsll #8,%d1 481d6: b680 cmpl %d0,%d3 481d8: 6506 bcss 481e0 <_Objects_Set_name+0x50> 481da: 163c 0020 moveb #32,%d3 481de: 6006 bras 481e6 <_Objects_Set_name+0x56> 481e0: 162a 0003 moveb %a2@(3),%d3 481e4: 49c3 extbl %d3 481e6: 7018 moveq #24,%d0 481e8: e1ac lsll %d0,%d4 481ea: 206e 000c moveal %fp@(12),%a0 481ee: 8484 orl %d4,%d2 ); } return true; } 481f0: 7001 moveq #1,%d0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 481f2: 8481 orl %d1,%d2 481f4: 8483 orl %d3,%d2 481f6: 2142 000c movel %d2,%a0@(12) ); } return true; } 481fa: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48200: 4e5e unlk %fp 48202: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48204: 7420 moveq #32,%d2 48206: 4842 swap %d2 48208: 223c 0000 2000 movel #8192,%d1 4820e: 7620 moveq #32,%d3 48210: 60d4 bras 481e6 <_Objects_Set_name+0x56> ... 00046660 <_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) / 46660: 4280 clrl %d0 46662: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 46664: 4e56 ffec linkw %fp,#-20 46668: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4666c: 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 ); 46670: 4283 clrl %d3 block_count = (information->maximum - index_base) / 46672: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 46674: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 46678: 302a 000e movew %a2@(14),%d0 4667c: 322a 0012 movew %a2@(18),%d1 46680: 9083 subl %d3,%d0 46682: 4c41 0000 remul %d1,%d0,%d0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 46686: 6070 bras 466f8 <_Objects_Shrink_information+0x98> 46688: 2404 movel %d4,%d2 4668a: 5284 addql #1,%d4 4668c: e58a lsll #2,%d2 if ( information->inactive_per_block[ block ] == 4668e: 206a 002a moveal %a2@(42),%a0 46692: b2b0 2800 cmpl %a0@(00000000,%d2:l),%d1 46696: 665e bnes 466f6 <_Objects_Shrink_information+0x96> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 46698: 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 ); 4669c: 47f9 0004 9844 lea 49844 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 466a2: 4280 clrl %d0 466a4: 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; 466a8: 2810 movel %a0@,%d4 if ((index >= index_base) && 466aa: b680 cmpl %d0,%d3 466ac: 6212 bhis 466c0 <_Objects_Shrink_information+0x60> (index < (index_base + information->allocation_size))) { 466ae: 4281 clrl %d1 466b0: 322a 0012 movew %a2@(18),%d1 466b4: d283 addl %d3,%d1 466b6: b280 cmpl %d0,%d1 466b8: 6306 blss 466c0 <_Objects_Shrink_information+0x60> _Chain_Extract( &extract_me->Node ); 466ba: 2f08 movel %a0,%sp@- 466bc: 4e93 jsr %a3@ 466be: 588f addql #4,%sp } } while ( the_object ); 466c0: 2044 moveal %d4,%a0 466c2: 4a84 tstl %d4 466c4: 66dc bnes 466a2 <_Objects_Shrink_information+0x42> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 466c6: 206a 002e moveal %a2@(46),%a0 466ca: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 466ce: 4eb9 0004 7dd0 jsr 47dd0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 466d4: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 466d8: 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; information->inactive_per_block[ block ] = 0; 466da: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 466de: 302a 0028 movew %a2@(40),%d0 466e2: 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; 466e6: 42b1 2800 clrl %a1@(00000000,%d2:l) information->inactive -= information->allocation_size; 466ea: 9081 subl %d1,%d0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 466ec: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 466f0: 3540 0028 movew %d0,%a2@(40) return; 466f4: 6006 bras 466fc <_Objects_Shrink_information+0x9c> } index_base += information->allocation_size; 466f6: d681 addl %d1,%d3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 466f8: b084 cmpl %d4,%d0 466fa: 628c bhis 46688 <_Objects_Shrink_information+0x28> return; } index_base += information->allocation_size; } } 466fc: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 46702: 4e5e unlk %fp 46704: 4e75 rts ... 00049d94 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 49d94: 4e56 fffc linkw %fp,#-4 void *p; _RTEMS_Lock_allocator(); 49d98: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 49d9e: 4eb9 0004 57e0 jsr 457e0 <_API_Mutex_Lock> p = _Heap_Allocate_aligned_with_boundary( 49da4: 2f2e 0014 movel %fp@(20),%sp@- 49da8: 2f2e 0010 movel %fp@(16),%sp@- 49dac: 2f2e 000c movel %fp@(12),%sp@- 49db0: 2f2e 0008 movel %fp@(8),%sp@- 49db4: 4eb9 0004 9aac jsr 49aac <_Heap_Allocate_aligned_with_boundary> heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 49dba: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 49dc0: 2d40 fffc movel %d0,%fp@(-4) 49dc4: 4eb9 0004 5840 jsr 45840 <_API_Mutex_Unlock> return p; } 49dca: 202e fffc movel %fp@(-4),%d0 49dce: 4e5e unlk %fp 49dd0: 4e75 rts ... 00049dd4 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 49dd4: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 49dd8: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 49dde: 4eb9 0004 57e0 jsr 457e0 <_API_Mutex_Lock> status = _Heap_Free( the_heap, start_address ); 49de4: 2f2e 000c movel %fp@(12),%sp@- 49de8: 2f2e 0008 movel %fp@(8),%sp@- 49dec: 4eb9 0004 9c00 jsr 49c00 <_Heap_Free> _RTEMS_Unlock_allocator(); 49df2: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 49df8: 2d40 fffc movel %d0,%fp@(-4) 49dfc: 4eb9 0004 5840 jsr 45840 <_API_Mutex_Unlock> return status; } 49e02: 202e fffc movel %fp@(-4),%d0 49e06: 4e5e unlk %fp 49e08: 4e75 rts ... 00058670 <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { 58670: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 58674: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 5867a: 4eb9 0004 57e0 jsr 457e0 <_API_Mutex_Lock> status = _Heap_Size_of_alloc_area( the_heap, starting_address, size ); 58680: 2f2e 0010 movel %fp@(16),%sp@- 58684: 2f2e 000c movel %fp@(12),%sp@- 58688: 2f2e 0008 movel %fp@(8),%sp@- 5868c: 4eb9 0005 87d0 jsr 587d0 <_Heap_Size_of_alloc_area> _RTEMS_Unlock_allocator(); 58692: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 58698: 2d40 fffc movel %d0,%fp@(-4) 5869c: 4eb9 0004 5840 jsr 45840 <_API_Mutex_Unlock> return status; } 586a2: 202e fffc movel %fp@(-4),%d0 586a6: 4e5e unlk %fp 586a8: 4e75 rts ... 00063540 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 63540: 4e56 0000 linkw %fp,#0 63544: 2f03 movel %d3,%sp@- 63546: 262e 000c movel %fp@(12),%d3 6354a: 2f02 movel %d2,%sp@- 6354c: 242e 0008 movel %fp@(8),%d2 if ( !the_heap ) 63550: 672e beqs 63580 <_Protected_heap_Get_information+0x40> return false; if ( !the_info ) 63552: 4a83 tstl %d3 63554: 672a beqs 63580 <_Protected_heap_Get_information+0x40> return false; _RTEMS_Lock_allocator(); 63556: 2f39 0009 a8da movel 9a8da <_RTEMS_Allocator_Mutex>,%sp@- 6355c: 4eb9 0004 9988 jsr 49988 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 63562: 2f03 movel %d3,%sp@- 63564: 2f02 movel %d2,%sp@- 63566: 4eb9 0007 0df4 jsr 70df4 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 6356c: 2f39 0009 a8da movel 9a8da <_RTEMS_Allocator_Mutex>,%sp@- 63572: 4eb9 0004 99e8 jsr 499e8 <_API_Mutex_Unlock> return true; 63578: 4fef 0010 lea %sp@(16),%sp if ( !the_info ) return false; _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); 6357c: 7001 moveq #1,%d0 return true; 6357e: 6002 bras 63582 <_Protected_heap_Get_information+0x42> 63580: 4200 clrb %d0 } 63582: 242e fff8 movel %fp@(-8),%d2 63586: 262e fffc movel %fp@(-4),%d3 6358a: 4e5e unlk %fp 6358c: 4e75 rts ... 00056a90 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 56a90: 4e56 ffe4 linkw %fp,#-28 56a94: 2039 0007 4000 movel 74000 <_Thread_Dispatch_disable_level>,%d0 56a9a: 5280 addql #1,%d0 56a9c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 56aa0: 266e 0008 moveal %fp@(8),%a3 56aa4: 23c0 0007 4000 movel %d0,74000 <_Thread_Dispatch_disable_level> * 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(); 56aaa: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%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 ); 56ab0: 240b movel %a3,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 56ab2: 280b movel %a3,%d4 56ab4: 0682 0000 0010 addil #16,%d2 56aba: 0684 0000 0068 addil #104,%d4 56ac0: 4bf9 0005 28f4 lea 528f4 <_Heap_Allocate_aligned_with_boundary>,%a5 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 ); 56ac6: 49f9 0005 7124 lea 57124 <_Thread_queue_Extract>,%a4 * 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(); 56acc: 4eb9 0005 1f4c jsr 51f4c <_API_Mutex_Unlock> 56ad2: 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 ); 56ad4: 263c 0005 7228 movel #356904,%d3 56ada: 2f02 movel %d2,%sp@- 56adc: 2043 moveal %d3,%a0 56ade: 4e90 jsr %a0@ if ( the_thread == NULL ) 56ae0: 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 ); 56ae2: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 56ae4: 4a80 tstl %d0 56ae6: 672c beqs 56b14 <_Region_Process_queue+0x84> 56ae8: 42a7 clrl %sp@- 56aea: 42a7 clrl %sp@- 56aec: 2f2a 0024 movel %a2@(36),%sp@- 56af0: 2f04 movel %d4,%sp@- 56af2: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 56af4: 4fef 0010 lea %sp@(16),%sp 56af8: 4a80 tstl %d0 56afa: 6718 beqs 56b14 <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 56afc: 206a 0028 moveal %a2@(40),%a0 the_region->number_of_used_blocks += 1; 56b00: 52ab 0064 addql #1,%a3@(100) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 56b04: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 56b06: 2f0a movel %a2,%sp@- 56b08: 2f02 movel %d2,%sp@- 56b0a: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 56b0c: 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; 56b0e: 42aa 0034 clrl %a2@(52) } 56b12: 60c6 bras 56ada <_Region_Process_queue+0x4a> _Thread_Enable_dispatch(); } 56b14: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 56b1a: 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(); 56b1c: 4ef9 0005 3ec6 jmp 53ec6 <_Thread_Enable_dispatch> ... 000499d4 <_TOD_Get>: /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 499d4: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get( struct timespec *time ) { 499da: 4e56 fff0 linkw %fp,#-16 499de: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 499e0: 40c2 movew %sr,%d2 499e2: 8082 orl %d2,%d0 499e4: 46c0 movew %d0,%sr now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 499e6: 2079 0005 bb7a moveal 5bb7a <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 499ec: 2039 0005 ba86 movel 5ba86 <_TOD_Now>,%d0 499f2: 2239 0005 ba8a movel 5ba8a <_TOD_Now+0x4>,%d1 499f8: 2d40 fff0 movel %d0,%fp@(-16) 499fc: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 49a00: 4a88 tstl %a0 49a02: 6604 bnes 49a08 <_TOD_Get+0x34> 49a04: 4280 clrl %d0 49a06: 6002 bras 49a0a <_TOD_Get+0x36> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 49a08: 4e90 jsr %a0@ _ISR_Enable( level ); 49a0a: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); 49a0c: 486e fff8 pea %fp@(-8) 49a10: 486e fff0 pea %fp@(-16) now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 49a14: 2d40 fffc movel %d0,%fp@(-4) 49a18: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &now, &offset ); 49a1c: 4eb9 0004 787c jsr 4787c <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 49a22: 206e 0008 moveal %fp@(8),%a0 49a26: 508f addql #8,%sp 49a28: 202e fff0 movel %fp@(-16),%d0 49a2c: 222e fff4 movel %fp@(-12),%d1 } 49a30: 242e ffec movel %fp@(-20),%d2 49a34: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); 49a36: 2080 movel %d0,%a0@ 49a38: 2141 0004 movel %d1,%a0@(4) } 49a3c: 4e75 rts ... 00049a40 <_TOD_Get_uptime>: /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 49a40: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 49a46: 4e56 fff0 linkw %fp,#-16 49a4a: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 49a4c: 40c2 movew %sr,%d2 49a4e: 8082 orl %d2,%d0 49a50: 46c0 movew %d0,%sr up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 49a52: 2079 0005 bb7a moveal 5bb7a <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 49a58: 2039 0005 ba72 movel 5ba72 <_TOD_Uptime>,%d0 49a5e: 2239 0005 ba76 movel 5ba76 <_TOD_Uptime+0x4>,%d1 49a64: 2d40 fff0 movel %d0,%fp@(-16) 49a68: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 49a6c: 4a88 tstl %a0 49a6e: 6604 bnes 49a74 <_TOD_Get_uptime+0x34> 49a70: 4280 clrl %d0 49a72: 6002 bras 49a76 <_TOD_Get_uptime+0x36> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 49a74: 4e90 jsr %a0@ _ISR_Enable( level ); 49a76: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); 49a78: 486e fff8 pea %fp@(-8) 49a7c: 486e fff0 pea %fp@(-16) up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 49a80: 2d40 fffc movel %d0,%fp@(-4) 49a84: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &up, &offset ); 49a88: 4eb9 0004 787c jsr 4787c <_Timespec_Add_to> *uptime = up; 49a8e: 206e 0008 moveal %fp@(8),%a0 49a92: 508f addql #8,%sp 49a94: 202e fff0 movel %fp@(-16),%d0 49a98: 222e fff4 movel %fp@(-12),%d1 } 49a9c: 242e ffec movel %fp@(-20),%d2 49aa0: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; 49aa2: 2080 movel %d0,%a0@ 49aa4: 2141 0004 movel %d1,%a0@(4) } 49aa8: 4e75 rts ... 00062fcc <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { 62fcc: 4e56 fff8 linkw %fp,#-8 Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); 62fd0: 486e fff8 pea %fp@(-8) 62fd4: 4eb9 0006 2f60 jsr 62f60 <_TOD_Get_uptime> _Timestamp_To_timespec( &uptime_ts, uptime ); 62fda: 206e 0008 moveal %fp@(8),%a0 62fde: 588f addql #4,%sp 62fe0: 202e fff8 movel %fp@(-8),%d0 62fe4: 222e fffc movel %fp@(-4),%d1 } 62fe8: 4e5e unlk %fp { Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); 62fea: 2080 movel %d0,%a0@ 62fec: 2141 0004 movel %d1,%a0@(4) } 62ff0: 4e75 rts ... 00045c00 <_TOD_Handler_initialization>: * * Output parameters: NONE */ void _TOD_Handler_initialization(void) { 45c00: 4e56 0000 linkw %fp,#0 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 45c04: 4200 clrb %d0 _TOD_Activate(); } 45c06: 4e5e unlk %fp /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 45c08: 13c0 0005 ba08 moveb %d0,5ba08 <_TOD_Is_set> */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); 45c0e: 203c 21da e500 movel #567993600,%d0 45c14: 42b9 0005 ba8a clrl 5ba8a <_TOD_Now+0x4> 45c1a: 23c0 0005 ba86 movel %d0,5ba86 <_TOD_Now> /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); 45c20: 42b9 0005 ba72 clrl 5ba72 <_TOD_Uptime> 45c26: 42b9 0005 ba76 clrl 5ba76 <_TOD_Uptime+0x4> /* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); } 45c2c: 4e75 rts ... 00045844 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 45844: 43f9 0005 b352 lea 5b352 <_TOD_Days_to_date>,%a1 4584a: 4e56 fff0 linkw %fp,#-16 4584e: 206e 0008 moveal %fp@(8),%a0 45852: 48d7 041c moveml %d2-%d4/%a2,%sp@ uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; 45856: 2210 movel %a0@,%d1 45858: 7603 moveq #3,%d3 ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 4585a: 2028 0008 movel %a0@(8),%d0 4585e: 5380 subql #1,%d0 year_mod_4 = the_tod->year & 3; 45860: c681 andl %d1,%d3 if ( year_mod_4 == 0 ) 45862: 660c bnes 45870 <_TOD_To_seconds+0x2c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 45864: 2428 0004 movel %a0@(4),%d2 45868: 0682 0000 000d addil #13,%d2 4586e: 6004 bras 45874 <_TOD_To_seconds+0x30> else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45870: 2428 0004 movel %a0@(4),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45874: 45f9 0005 b386 lea 5b386 <_TOD_Days_since_last_leap_year>,%a2 4587a: 283c 0000 05b5 movel #1461,%d4 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45880: 3431 2a00 movew %a1@(00000000,%d2:l:2),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45884: 3632 3a00 movew %a2@(00000000,%d3:l:2),%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45888: 0282 0000 ffff andil #65535,%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 4588e: 0283 0000 ffff andil #65535,%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45894: 2242 moveal %d2,%a1 45896: d3c0 addal %d0,%a1 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45898: 2001 movel %d1,%d0 4589a: 0680 ffff f83c addil #-1988,%d0 458a0: e488 lsrl #2,%d0 458a2: 4c04 0800 mulsl %d4,%d0 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458a6: 2428 000c movel %a0@(12),%d2 458aa: 2202 movel %d2,%d1 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 458ac: d083 addl %d3,%d0 ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; 458ae: 263c 0001 5180 movel #86400,%d3 time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 458b4: d089 addl %a1,%d0 time *= TOD_SECONDS_PER_DAY; 458b6: 4c03 0800 mulsl %d3,%d0 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458ba: e58a lsll #2,%d2 458bc: ed89 lsll #6,%d1 458be: 9282 subl %d2,%d1 458c0: d2a8 0010 addl %a0@(16),%d1 458c4: 2401 movel %d1,%d2 458c6: e589 lsll #2,%d1 458c8: ed8a lsll #6,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 458ca: 2068 0014 moveal %a0@(20),%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458ce: 9481 subl %d1,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 458d0: d1fc 21da e500 addal #567993600,%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458d6: d488 addl %a0,%d2 time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 458d8: d082 addl %d2,%d0 458da: 4cd7 041c moveml %sp@,%d2-%d4/%a2 458de: 4e5e unlk %fp 458e0: 4e75 rts ... 000458e4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 458e4: 4e56 0000 linkw %fp,#0 458e8: 206e 0008 moveal %fp@(8),%a0 458ec: 2f03 movel %d3,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 458ee: 2039 0005 c400 movel 5c400 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 458f4: 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) || 458f6: 4a88 tstl %a0 458f8: 6762 beqs 4595c <_TOD_Validate+0x78> (the_tod->ticks >= ticks_per_second) || 458fa: 243c 000f 4240 movel #1000000,%d2 45900: 4c40 2002 remul %d0,%d2,%d2 45904: b4a8 0018 cmpl %a0@(24),%d2 45908: 6352 blss 4595c <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4590a: 763b moveq #59,%d3 4590c: b6a8 0014 cmpl %a0@(20),%d3 45910: 654a bcss 4595c <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 45912: b6a8 0010 cmpl %a0@(16),%d3 45916: 6544 bcss 4595c <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || 45918: 7017 moveq #23,%d0 4591a: b0a8 000c cmpl %a0@(12),%d0 4591e: 653c bcss 4595c <_TOD_Validate+0x78> (the_tod->month == 0) || 45920: 2028 0004 movel %a0@(4),%d0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 45924: 6736 beqs 4595c <_TOD_Validate+0x78> 45926: 720c moveq #12,%d1 45928: b280 cmpl %d0,%d1 4592a: 6530 bcss 4595c <_TOD_Validate+0x78> (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) || 4592c: 2410 movel %a0@,%d2 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) || 4592e: 0c82 0000 07c3 cmpil #1987,%d2 45934: 6326 blss 4595c <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 45936: 2228 0008 movel %a0@(8),%d1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 4593a: 6720 beqs 4595c <_TOD_Validate+0x78> (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 ) 4593c: 163c 0003 moveb #3,%d3 45940: 41f9 0005 b38e lea 5b38e <_TOD_Days_per_month>,%a0 45946: c483 andl %d3,%d2 45948: 6606 bnes 45950 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 4594a: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 4594e: 6004 bras 45954 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 45950: 2030 0c00 movel %a0@(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( 45954: b081 cmpl %d1,%d0 45956: 54c0 scc %d0 45958: 4480 negl %d0 4595a: 6002 bras 4595e <_TOD_Validate+0x7a> 4595c: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 4595e: 241f movel %sp@+,%d2 45960: 261f movel %sp@+,%d3 45962: 4e5e unlk %fp 45964: 4e75 rts ... 00046768 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 46768: 4e56 fff0 linkw %fp,#-16 4676c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 46770: 246e 0008 moveal %fp@(8),%a2 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 46774: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 46776: 262e 000c movel %fp@(12),%d3 */ /* * Save original state */ original_state = the_thread->current_state; 4677a: 242a 0010 movel %a2@(16),%d2 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4677e: 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 ); 46782: 4eb9 0004 7540 jsr 47540 <_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 ) 46788: 588f addql #4,%sp 4678a: b6aa 0014 cmpl %a2@(20),%d3 4678e: 670c beqs 4679c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 46790: 2f03 movel %d3,%sp@- 46792: 2f0a movel %a2,%sp@- 46794: 4eb9 0004 73e8 jsr 473e8 <_Thread_Set_priority> 4679a: 508f addql #8,%sp _ISR_Disable( level ); 4679c: 223c 0000 0700 movel #1792,%d1 467a2: 40c0 movew %sr,%d0 467a4: 8280 orl %d0,%d1 467a6: 46c1 movew %d1,%sr 467a8: 7604 moveq #4,%d3 /* * 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; 467aa: 222a 0010 movel %a2@(16),%d1 467ae: c483 andl %d3,%d2 if ( state != STATES_TRANSIENT ) { 467b0: b681 cmpl %d1,%d3 467b2: 6730 beqs 467e4 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 467b4: 4a82 tstl %d2 467b6: 6608 bnes 467c0 <_Thread_Change_priority+0x58> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 467b8: 74fb moveq #-5,%d2 467ba: c481 andl %d1,%d2 467bc: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 467c0: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 467c2: 0281 0003 bee0 andil #245472,%d1 467c8: 6700 00d2 beqw 4689c <_Thread_Change_priority+0x134> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 467cc: 2d4a 000c movel %a2,%fp@(12) 467d0: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 467d6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 467dc: 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 ); 467de: 4ef9 0004 734c jmp 4734c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 467e4: 4a82 tstl %d2 467e6: 6650 bnes 46838 <_Thread_Change_priority+0xd0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 467e8: 226a 008e moveal %a2@(142),%a1 467ec: 322a 0094 movew %a2@(148),%d1 467f0: 3411 movew %a1@,%d2 467f2: 206a 008a moveal %a2@(138),%a0 467f6: 8282 orl %d2,%d1 * 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 ); 467f8: 42aa 0010 clrl %a2@(16) 467fc: 3281 movew %d1,%a1@ _Priority_Major_bit_map |= the_priority_map->ready_major; 467fe: 3239 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d1 46804: 342a 0092 movew %a2@(146),%d2 46808: 8282 orl %d2,%d1 4680a: 33c1 0005 baa4 movew %d1,5baa4 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 46810: 4a04 tstb %d4 46812: 6710 beqs 46824 <_Thread_Change_priority+0xbc> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 46814: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 46816: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 4681a: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 4681c: 234a 0004 movel %a2,%a1@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 46820: 2489 movel %a1,%a2@ 46822: 6014 bras 46838 <_Thread_Change_priority+0xd0> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 46824: 2608 movel %a0,%d3 46826: 5883 addql #4,%d3 46828: 2483 movel %d3,%a2@ old_last_node = the_chain->last; 4682a: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 4682e: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 46832: 2549 0004 movel %a1,%a2@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 46836: 228a movel %a2,%a1@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 46838: 223c 0000 0700 movel #1792,%d1 4683e: 46c0 movew %d0,%sr 46840: 8280 orl %d0,%d1 46842: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 46844: 3239 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d1 4684a: 4841 swap %d1 4684c: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4684e: 4282 clrl %d2 46850: 41f9 0005 bb10 lea 5bb10 <_Priority_Bit_map>,%a0 46856: 3401 movew %d1,%d2 46858: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1 4685c: 4841 swap %d1 4685e: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 46860: 4283 clrl %d3 46862: e98a lsll #4,%d2 46864: 3601 movew %d1,%d3 46866: 2279 0005 b9a0 moveal 5b9a0 <_Thread_Ready_chain>,%a1 4686c: 2202 movel %d2,%d1 4686e: d283 addl %d3,%d1 46870: 2401 movel %d1,%d2 46872: e58a lsll #2,%d2 46874: e989 lsll #4,%d1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 46876: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4687c: 93c2 subal %d2,%a1 4687e: 2231 1800 movel %a1@(00000000,%d1:l),%d1 46882: 23c1 0005 ba82 movel %d1,5ba82 <_Thread_Heir> * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 46888: b288 cmpl %a0,%d1 4688a: 670e beqs 4689a <_Thread_Change_priority+0x132> _Thread_Executing->is_preemptible ) 4688c: 4a28 0075 tstb %a0@(117) 46890: 6708 beqs 4689a <_Thread_Change_priority+0x132> _Context_Switch_necessary = true; 46892: 7201 moveq #1,%d1 46894: 13c1 0005 babe moveb %d1,5babe <_Context_Switch_necessary> _ISR_Enable( level ); 4689a: 46c0 movew %d0,%sr } 4689c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 468a2: 4e5e unlk %fp 468a4: 4e75 rts ... 000468a8 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 468a8: 4e56 ffec linkw %fp,#-20 468ac: 206e 0008 moveal %fp@(8),%a0 468b0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 468b4: 263c 0000 0700 movel #1792,%d3 468ba: 2203 movel %d3,%d1 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 468bc: 202e 000c movel %fp@(12),%d0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 468c0: 40c2 movew %sr,%d2 468c2: 8282 orl %d2,%d1 468c4: 46c1 movew %d1,%sr current_state = the_thread->current_state; 468c6: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 468ca: 2800 movel %d0,%d4 468cc: c881 andl %d1,%d4 468ce: 6778 beqs 46948 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 468d0: 4680 notl %d0 468d2: c081 andl %d1,%d0 current_state = 468d4: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 468d8: 666e bnes 46948 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 468da: 2668 008e moveal %a0@(142),%a3 468de: 3028 0094 movew %a0@(148),%d0 468e2: 3213 movew %a3@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 468e4: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 468e8: 2809 movel %a1,%d4 468ea: 5884 addql #4,%d4 468ec: 8081 orl %d1,%d0 468ee: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 468f0: 2469 0008 moveal %a1@(8),%a2 468f4: 3680 movew %d0,%a3@ the_chain->last = the_node; 468f6: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 468fa: 3039 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d0 46900: 3228 0092 movew %a0@(146),%d1 old_last_node->next = the_node; the_node->previous = old_last_node; 46904: 214a 0004 movel %a2,%a0@(4) 46908: 8081 orl %d1,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4690a: 2488 movel %a0,%a2@ 4690c: 33c0 0005 baa4 movew %d0,5baa4 <_Priority_Major_bit_map> _ISR_Flash( level ); 46912: 2003 movel %d3,%d0 46914: 46c2 movew %d2,%sr 46916: 8082 orl %d2,%d0 46918: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4691a: 2028 0014 movel %a0@(20),%d0 4691e: 2279 0005 ba82 moveal 5ba82 <_Thread_Heir>,%a1 46924: b0a9 0014 cmpl %a1@(20),%d0 46928: 641e bccs 46948 <_Thread_Clear_state+0xa0> _Thread_Heir = the_thread; 4692a: 23c8 0005 ba82 movel %a0,5ba82 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 46930: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 46936: 4a28 0075 tstb %a0@(117) 4693a: 6604 bnes 46940 <_Thread_Clear_state+0x98> 4693c: 4a80 tstl %d0 4693e: 6608 bnes 46948 <_Thread_Clear_state+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 46940: 7001 moveq #1,%d0 46942: 13c0 0005 babe moveb %d0,5babe <_Context_Switch_necessary> } } } _ISR_Enable( level ); 46948: 46c2 movew %d2,%sr } 4694a: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4694e: 4e5e unlk %fp 46950: 4e75 rts ... 00046a24 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 46a24: 4e56 0000 linkw %fp,#0 46a28: 2f02 movel %d2,%sp@- * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 46a2a: 4879 0005 bb3e pea 5bb3e <_Thread_Internal_information> 46a30: 4eb9 0004 6040 jsr 46040 <_Objects_Allocate> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46a36: 2239 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d1 46a3c: 5281 addql #1,%d1 /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 46a3e: 23c0 0005 bb7e movel %d0,5bb7e <_Thread_Idle> 46a44: 23c1 0005 b9f4 movel %d1,5b9f4 <_Thread_Dispatch_disable_level> * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 46a4a: 4282 clrl %d2 46a4c: 1439 0005 a2c2 moveb 5a2c2 ,%d2 46a52: 2f3c 4944 4c45 movel #1229212741,%sp@- 46a58: 2239 0005 a2dc movel 5a2dc ,%d1 46a5e: 42a7 clrl %sp@- 46a60: 2039 0005 a2be movel 5a2be ,%d0 46a66: 42a7 clrl %sp@- 46a68: 42a7 clrl %sp@- 46a6a: 4878 0001 pea 1 46a6e: 2f02 movel %d2,%sp@- 46a70: 42a7 clrl %sp@- 46a72: b280 cmpl %d0,%d1 46a74: 6302 blss 46a78 <_Thread_Create_idle+0x54> 46a76: 2001 movel %d1,%d0 46a78: 2f00 movel %d0,%sp@- 46a7a: 42a7 clrl %sp@- 46a7c: 2f39 0005 bb7e movel 5bb7e <_Thread_Idle>,%sp@- 46a82: 4879 0005 bb3e pea 5bb3e <_Thread_Internal_information> 46a88: 4eb9 0004 6d14 jsr 46d14 <_Thread_Initialize> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 46a8e: 4fef 002c lea %sp@(44),%sp 46a92: 4297 clrl %sp@ */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46a94: 2239 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d1 46a9a: 5381 subql #1,%d1 46a9c: 42a7 clrl %sp@- 46a9e: 2f39 0005 a2d8 movel 5a2d8 ,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 46aa4: 2039 0005 bb7e movel 5bb7e <_Thread_Idle>,%d0 _Thread_Start( 46aaa: 42a7 clrl %sp@- 46aac: 23c1 0005 b9f4 movel %d1,5b9f4 <_Thread_Dispatch_disable_level> 46ab2: 2f00 movel %d0,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 46ab4: 23c0 0005 baae movel %d0,5baae <_Thread_Executing> 46aba: 23c0 0005 ba82 movel %d0,5ba82 <_Thread_Heir> _Thread_Executing = _Thread_Idle; _Thread_Start( 46ac0: 4eb9 0004 7684 jsr 47684 <_Thread_Start> Configuration.idle_task, NULL, 0 ); } 46ac6: 242e fffc movel %fp@(-4),%d2 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 46aca: 4fef 0014 lea %sp@(20),%sp Configuration.idle_task, NULL, 0 ); } 46ace: 4e5e unlk %fp 46ad0: 4e75 rts ... 0004b44c <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4b44c: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4b450: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4b456: 4aa8 0010 tstl %a0@(16) 4b45a: 660e bnes 4b46a <_Thread_Evaluate_mode+0x1e> 4b45c: b1f9 0005 ba82 cmpal 5ba82 <_Thread_Heir>,%a0 4b462: 6710 beqs 4b474 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4b464: 4a28 0075 tstb %a0@(117) 4b468: 670a beqs 4b474 <_Thread_Evaluate_mode+0x28> _Context_Switch_necessary = true; 4b46a: 7001 moveq #1,%d0 4b46c: 13c0 0005 babe moveb %d0,5babe <_Context_Switch_necessary> return true; 4b472: 6002 bras 4b476 <_Thread_Evaluate_mode+0x2a> 4b474: 4200 clrb %d0 } return false; } 4b476: 4e5e unlk %fp 4b478: 4e75 rts ... 0004a0b0 <_Thread_Ready>: */ void _Thread_Ready( Thread_Control *the_thread ) { 4a0b0: 4e56 ffec linkw %fp,#-20 4a0b4: 206e 0008 moveal %fp@(8),%a0 4a0b8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); 4a0bc: 243c 0000 0700 movel #1792,%d2 4a0c2: 2002 movel %d2,%d0 4a0c4: 40c1 movew %sr,%d1 4a0c6: 8081 orl %d1,%d0 4a0c8: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4a0ca: 2668 008e moveal %a0@(142),%a3 4a0ce: 3028 0094 movew %a0@(148),%d0 4a0d2: 3613 movew %a3@,%d3 the_thread->current_state = STATES_READY; _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 4a0d4: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4a0d8: 2809 movel %a1,%d4 4a0da: 5884 addql #4,%d4 4a0dc: 8083 orl %d3,%d0 4a0de: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4a0e0: 2469 0008 moveal %a1@(8),%a2 4a0e4: 3680 movew %d0,%a3@ the_chain->last = the_node; 4a0e6: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4a0ea: 3039 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d0 4a0f0: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4a0f4: 214a 0004 movel %a2,%a0@(4) 4a0f8: 8083 orl %d3,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4a0fa: 2488 movel %a0,%a2@ 4a0fc: 33c0 0005 baa4 movew %d0,5baa4 <_Priority_Major_bit_map> ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY; 4a102: 42a8 0010 clrl %a0@(16) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); _ISR_Flash( level ); 4a106: 2002 movel %d2,%d0 4a108: 46c1 movew %d1,%sr 4a10a: 8081 orl %d1,%d0 4a10c: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 4a10e: 3039 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d0 4a114: 4840 swap %d0 4a116: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4a118: 4282 clrl %d2 4a11a: 41f9 0005 bb10 lea 5bb10 <_Priority_Bit_map>,%a0 4a120: 3400 movew %d0,%d2 4a122: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4a126: 4840 swap %d0 4a128: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4a12a: 4283 clrl %d3 4a12c: e98a lsll #4,%d2 4a12e: 3600 movew %d0,%d3 4a130: 2279 0005 b9a0 moveal 5b9a0 <_Thread_Ready_chain>,%a1 4a136: 2002 movel %d2,%d0 4a138: d083 addl %d3,%d0 4a13a: 2400 movel %d0,%d2 4a13c: e58a lsll #2,%d2 4a13e: e988 lsll #4,%d0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 4a140: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4a146: 93c2 subal %d2,%a1 4a148: 2031 0800 movel %a1@(00000000,%d0:l),%d0 4a14c: 23c0 0005 ba82 movel %d0,5ba82 <_Thread_Heir> _Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) 4a152: b1c0 cmpal %d0,%a0 4a154: 670e beqs 4a164 <_Thread_Ready+0xb4> 4a156: 4a28 0075 tstb %a0@(117) 4a15a: 6708 beqs 4a164 <_Thread_Ready+0xb4> _Context_Switch_necessary = true; 4a15c: 7001 moveq #1,%d0 4a15e: 13c0 0005 babe moveb %d0,5babe <_Context_Switch_necessary> _ISR_Enable( level ); 4a164: 46c1 movew %d1,%sr } 4a166: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4a16a: 4e5e unlk %fp 4a16c: 4e75 rts ... 00047b5c <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 47b5c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 47b5e: 4e56 0000 linkw %fp,#0 47b62: 2f0a movel %a2,%sp@- 47b64: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 47b68: c0aa 0010 andl %a2@(16),%d0 47b6c: 4a00 tstb %d0 47b6e: 6704 beqs 47b74 <_Thread_Restart+0x18> 47b70: 4200 clrb %d0 47b72: 6064 bras 47bd8 <_Thread_Restart+0x7c> _Thread_Set_transient( the_thread ); 47b74: 2f0a movel %a2,%sp@- 47b76: 4eb9 0004 7d38 jsr 47d38 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 47b7c: 2f2e 0010 movel %fp@(16),%sp@- 47b80: 2f2e 000c movel %fp@(12),%sp@- 47b84: 2f0a movel %a2,%sp@- 47b86: 4eb9 0004 a9a8 jsr 4a9a8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 47b8c: 2f0a movel %a2,%sp@- 47b8e: 4eb9 0004 a644 jsr 4a644 <_Thread_Load_environment> _Thread_Ready( the_thread ); 47b94: 2f0a movel %a2,%sp@- 47b96: 4eb9 0004 a8e8 jsr 4a8e8 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 47b9c: 2f0a movel %a2,%sp@- 47b9e: 4eb9 0004 82ec jsr 482ec <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 47ba4: 4fef 001c lea %sp@(28),%sp 47ba8: b5f9 0005 c596 cmpal 5c596 <_Thread_Executing>,%a2 47bae: 6626 bnes 47bd6 <_Thread_Restart+0x7a> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 47bb0: 4aaa 0100 tstl %a2@(256) 47bb4: 670c beqs 47bc2 <_Thread_Restart+0x66> _Context_Restore_fp( &_Thread_Executing->fp_context ); 47bb6: 486a 0100 pea %a2@(256) 47bba: 4eb9 0004 87dc jsr 487dc <_CPU_Context_restore_fp> 47bc0: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 47bc2: 2079 0005 c596 moveal 5c596 <_Thread_Executing>,%a0 47bc8: 41e8 00cc lea %a0@(204),%a0 47bcc: 2f08 movel %a0,%sp@- 47bce: 4eb9 0004 869a jsr 4869a <_CPU_Context_Restart_self> 47bd4: 588f addql #4,%sp <== NOT EXECUTED 47bd6: 7001 moveq #1,%d0 return true; } return false; } 47bd8: 246e fffc moveal %fp@(-4),%a2 47bdc: 4e5e unlk %fp 47bde: 4e75 rts 0004ab3c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4ab3c: 4e56 ffec linkw %fp,#-20 4ab40: 206e 0008 moveal %fp@(8),%a0 4ab44: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4ab48: 243c 0000 0700 movel #1792,%d2 4ab4e: 2002 movel %d2,%d0 4ab50: 40c1 movew %sr,%d1 4ab52: 8081 orl %d1,%d0 4ab54: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4ab56: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4ab5a: 0800 0001 btst #1,%d0 4ab5e: 6778 beqs 4abd8 <_Thread_Resume+0x9c> 4ab60: 76fd moveq #-3,%d3 4ab62: c083 andl %d3,%d0 current_state = 4ab64: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4ab68: 666e bnes 4abd8 <_Thread_Resume+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4ab6a: 2668 008e moveal %a0@(142),%a3 4ab6e: 3028 0094 movew %a0@(148),%d0 4ab72: 3613 movew %a3@,%d3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4ab74: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ab78: 2809 movel %a1,%d4 4ab7a: 5884 addql #4,%d4 4ab7c: 8083 orl %d3,%d0 4ab7e: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4ab80: 2469 0008 moveal %a1@(8),%a2 4ab84: 3680 movew %d0,%a3@ the_chain->last = the_node; 4ab86: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4ab8a: 3039 0006 0b9c movew 60b9c <_Priority_Major_bit_map>,%d0 4ab90: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4ab94: 214a 0004 movel %a2,%a0@(4) 4ab98: 8083 orl %d3,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4ab9a: 2488 movel %a0,%a2@ 4ab9c: 33c0 0006 0b9c movew %d0,60b9c <_Priority_Major_bit_map> _ISR_Flash( level ); 4aba2: 2002 movel %d2,%d0 4aba4: 46c1 movew %d1,%sr 4aba6: 8081 orl %d1,%d0 4aba8: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4abaa: 2028 0014 movel %a0@(20),%d0 4abae: 2279 0006 0b7a moveal 60b7a <_Thread_Heir>,%a1 4abb4: b0a9 0014 cmpl %a1@(20),%d0 4abb8: 641e bccs 4abd8 <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 4abba: 23c8 0006 0b7a movel %a0,60b7a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4abc0: 2079 0006 0ba6 moveal 60ba6 <_Thread_Executing>,%a0 4abc6: 4a28 0075 tstb %a0@(117) 4abca: 6604 bnes 4abd0 <_Thread_Resume+0x94> 4abcc: 4a80 tstl %d0 4abce: 6608 bnes 4abd8 <_Thread_Resume+0x9c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4abd0: 7001 moveq #1,%d0 4abd2: 13c0 0006 0bb6 moveb %d0,60bb6 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4abd8: 46c1 movew %d1,%sr } 4abda: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4abde: 4e5e unlk %fp 4abe0: 4e75 rts ... 00047458 <_Thread_Set_state>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 47458: 223c 0000 0700 movel #1792,%d1 void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 4745e: 4e56 fff4 linkw %fp,#-12 47462: 206e 0008 moveal %fp@(8),%a0 47466: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4746a: 242e 000c movel %fp@(12),%d2 ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 4746e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 47472: 40c0 movew %sr,%d0 47474: 8280 orl %d0,%d1 47476: 46c1 movew %d1,%sr if ( !_States_Is_ready( the_thread->current_state ) ) { 47478: 2228 0010 movel %a0@(16),%d1 4747c: 670c beqs 4748a <_Thread_Set_state+0x32> the_thread->current_state = 4747e: 8481 orl %d1,%d2 47480: 2142 0010 movel %d2,%a0@(16) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 47484: 46c0 movew %d0,%sr return; 47486: 6000 00ae braw 47536 <_Thread_Set_state+0xde> } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { 4748a: 2229 0008 movel %a1@(8),%d1 _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 4748e: 2142 0010 movel %d2,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 47492: b291 cmpl %a1@,%d1 47494: 6632 bnes 474c8 <_Thread_Set_state+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47496: 2209 movel %a1,%d1 47498: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 4749a: 2468 008e moveal %a0@(142),%a2 4749e: 2281 movel %d1,%a1@ 474a0: 3412 movew %a2@,%d2 474a2: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 474a6: 2349 0008 movel %a1,%a1@(8) 474aa: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 474ac: 42a9 0004 clrl %a1@(4) 474b0: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 474b2: 6620 bnes 474d4 <_Thread_Set_state+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 474b4: 3239 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d1 474ba: 3428 0096 movew %a0@(150),%d2 474be: c282 andl %d2,%d1 474c0: 33c1 0005 baa4 movew %d1,5baa4 <_Priority_Major_bit_map> 474c6: 600c bras 474d4 <_Thread_Set_state+0x7c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 474c8: 2250 moveal %a0@,%a1 previous = the_node->previous; 474ca: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 474ce: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 474d0: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 474d4: 223c 0000 0700 movel #1792,%d1 474da: 46c0 movew %d0,%sr 474dc: 8280 orl %d0,%d1 474de: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 474e0: b1f9 0005 ba82 cmpal 5ba82 <_Thread_Heir>,%a0 474e6: 663c bnes 47524 <_Thread_Set_state+0xcc> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 474e8: 3239 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d1 474ee: 4841 swap %d1 474f0: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 474f2: 4282 clrl %d2 474f4: 43f9 0005 bb10 lea 5bb10 <_Priority_Bit_map>,%a1 474fa: 3401 movew %d1,%d2 474fc: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 47500: 4841 swap %d1 47502: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47504: 4283 clrl %d3 47506: e98a lsll #4,%d2 47508: 3601 movew %d1,%d3 4750a: 2279 0005 b9a0 moveal 5b9a0 <_Thread_Ready_chain>,%a1 47510: 2202 movel %d2,%d1 47512: d283 addl %d3,%d1 47514: 2401 movel %d1,%d2 47516: e58a lsll #2,%d2 47518: e989 lsll #4,%d1 4751a: 93c2 subal %d2,%a1 4751c: d3c1 addal %d1,%a1 4751e: 23d1 0005 ba82 movel %a1@,5ba82 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 47524: b1f9 0005 baae cmpal 5baae <_Thread_Executing>,%a0 4752a: 6608 bnes 47534 <_Thread_Set_state+0xdc> _Context_Switch_necessary = true; 4752c: 7201 moveq #1,%d1 4752e: 13c1 0005 babe moveb %d1,5babe <_Context_Switch_necessary> _ISR_Enable( level ); 47534: 46c0 movew %d0,%sr } 47536: 4cd7 040c moveml %sp@,%d2-%d3/%a2 4753a: 4e5e unlk %fp 4753c: 4e75 rts ... 000475bc <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 475bc: 4e56 0000 linkw %fp,#0 475c0: 2039 0005 a2be movel 5a2be ,%d0 475c6: 2f02 movel %d2,%sp@- 475c8: 242e 000c movel %fp@(12),%d2 475cc: b082 cmpl %d2,%d0 475ce: 6302 blss 475d2 <_Thread_Stack_Allocate+0x16> 475d0: 2400 movel %d0,%d2 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 475d2: 2079 0005 a2e4 moveal 5a2e4 ,%a0 475d8: 4a88 tstl %a0 475da: 6706 beqs 475e2 <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 475dc: 2f02 movel %d2,%sp@- 475de: 4e90 jsr %a0@ 475e0: 6008 bras 475ea <_Thread_Stack_Allocate+0x2e> * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 475e2: 2f02 movel %d2,%sp@- 475e4: 4eb9 0004 7db4 jsr 47db4 <_Workspace_Allocate> } if ( !stack_addr ) 475ea: 4a80 tstl %d0 475ec: 56c1 sne %d1 the_stack_size = 0; the_thread->Start.stack = stack_addr; 475ee: 206e 0008 moveal %fp@(8),%a0 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 475f2: 588f addql #4,%sp } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 475f4: 2140 00c8 movel %d0,%a0@(200) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 475f8: 1001 moveb %d1,%d0 475fa: 49c0 extbl %d0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 475fc: c082 andl %d2,%d0 475fe: 242e fffc movel %fp@(-4),%d2 47602: 4e5e unlk %fp 47604: 4e75 rts ... 00047608 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 47608: 4e56 0000 linkw %fp,#0 4760c: 206e 0008 moveal %fp@(8),%a0 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 47610: 2279 0005 a2e8 moveal 5a2e8 ,%a1 47616: 4a89 tstl %a1 47618: 670a beqs 47624 <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 4761a: 2d68 00c0 0008 movel %a0@(192),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 47620: 4e5e unlk %fp * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 47622: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 47624: 2d68 00c0 0008 movel %a0@(192),%fp@(8) } 4762a: 4e5e unlk %fp */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 4762c: 4ef9 0004 7dd0 jmp 47dd0 <_Workspace_Free> ... 000476d4 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 476d4: 223c 0000 0700 movel #1792,%d1 */ void _Thread_Suspend( Thread_Control *the_thread ) { 476da: 4e56 fff4 linkw %fp,#-12 476de: 206e 0008 moveal %fp@(8),%a0 476e2: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 476e6: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 476ea: 40c0 movew %sr,%d0 476ec: 8280 orl %d0,%d1 476ee: 46c1 movew %d1,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 476f0: 2228 0010 movel %a0@(16),%d1 476f4: 670e beqs 47704 <_Thread_Suspend+0x30> the_thread->current_state = 476f6: 7402 moveq #2,%d2 476f8: 8481 orl %d1,%d2 476fa: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 476fe: 46c0 movew %d0,%sr return; 47700: 6000 00b0 braw 477b2 <_Thread_Suspend+0xde> } the_thread->current_state = STATES_SUSPENDED; 47704: 7202 moveq #2,%d1 if ( _Chain_Has_only_one_node( ready ) ) { 47706: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 4770a: 2141 0010 movel %d1,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 4770e: b491 cmpl %a1@,%d2 47710: 6632 bnes 47744 <_Thread_Suspend+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47712: 2209 movel %a1,%d1 47714: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 47716: 2468 008e moveal %a0@(142),%a2 4771a: 2281 movel %d1,%a1@ 4771c: 3412 movew %a2@,%d2 4771e: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47722: 2349 0008 movel %a1,%a1@(8) 47726: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47728: 42a9 0004 clrl %a1@(4) 4772c: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 4772e: 6620 bnes 47750 <_Thread_Suspend+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 47730: 3239 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d1 47736: 3428 0096 movew %a0@(150),%d2 4773a: c282 andl %d2,%d1 4773c: 33c1 0005 baa4 movew %d1,5baa4 <_Priority_Major_bit_map> 47742: 600c bras 47750 <_Thread_Suspend+0x7c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47744: 2250 moveal %a0@,%a1 previous = the_node->previous; 47746: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 4774a: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4774c: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 47750: 223c 0000 0700 movel #1792,%d1 47756: 46c0 movew %d0,%sr 47758: 8280 orl %d0,%d1 4775a: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 4775c: b1f9 0005 ba82 cmpal 5ba82 <_Thread_Heir>,%a0 47762: 663c bnes 477a0 <_Thread_Suspend+0xcc> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 47764: 3239 0005 baa4 movew 5baa4 <_Priority_Major_bit_map>,%d1 4776a: 4841 swap %d1 4776c: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4776e: 4282 clrl %d2 47770: 43f9 0005 bb10 lea 5bb10 <_Priority_Bit_map>,%a1 47776: 3401 movew %d1,%d2 47778: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 4777c: 4841 swap %d1 4777e: 04c1 ff1 %d1 47780: 4283 clrl %d3 47782: e98a lsll #4,%d2 47784: 3601 movew %d1,%d3 47786: 2279 0005 b9a0 moveal 5b9a0 <_Thread_Ready_chain>,%a1 4778c: 2202 movel %d2,%d1 4778e: d283 addl %d3,%d1 47790: 2401 movel %d1,%d2 47792: e58a lsll #2,%d2 47794: e989 lsll #4,%d1 47796: 93c2 subal %d2,%a1 47798: d3c1 addal %d1,%a1 4779a: 23d1 0005 ba82 movel %a1@,5ba82 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 477a0: b1f9 0005 baae cmpal 5baae <_Thread_Executing>,%a0 477a6: 6608 bnes 477b0 <_Thread_Suspend+0xdc> _Context_Switch_necessary = true; 477a8: 7401 moveq #1,%d2 477aa: 13c2 0005 babe moveb %d2,5babe <_Context_Switch_necessary> _ISR_Enable( level ); 477b0: 46c0 movew %d0,%sr } 477b2: 4cd7 040c moveml %sp@,%d2-%d3/%a2 477b6: 4e5e unlk %fp 477b8: 4e75 rts ... 00047800 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 47800: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 47804: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 4780a: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4780e: 243c 0000 0700 movel #1792,%d2 47814: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 47816: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4781a: 40c1 movew %sr,%d1 4781c: 8081 orl %d1,%d0 4781e: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 47820: 2029 0008 movel %a1@(8),%d0 47824: b091 cmpl %a1@,%d0 47826: 6738 beqs 47860 <_Thread_Yield_processor+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47828: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4782a: 2009 movel %a1,%d0 4782c: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4782e: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 47832: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47834: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47838: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4783a: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4783e: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 47842: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 47846: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 47848: 2002 movel %d2,%d0 4784a: 46c1 movew %d1,%sr 4784c: 8081 orl %d1,%d0 4784e: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 47850: b1f9 0005 ba82 cmpal 5ba82 <_Thread_Heir>,%a0 47856: 6610 bnes 47868 <_Thread_Yield_processor+0x68> _Thread_Heir = (Thread_Control *) ready->first; 47858: 23d1 0005 ba82 movel %a1@,5ba82 <_Thread_Heir> 4785e: 6008 bras 47868 <_Thread_Yield_processor+0x68> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 47860: b1f9 0005 ba82 cmpal 5ba82 <_Thread_Heir>,%a0 47866: 6708 beqs 47870 <_Thread_Yield_processor+0x70> _Context_Switch_necessary = true; 47868: 7001 moveq #1,%d0 4786a: 13c0 0005 babe moveb %d0,5babe <_Context_Switch_necessary> _ISR_Enable( level ); 47870: 46c1 movew %d1,%sr } 47872: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 47876: 4e5e unlk %fp 47878: 4e75 rts ... 00046718 <_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 ) ) { 46718: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 4671a: 4e56 0000 linkw %fp,#0 4671e: 202e 0010 movel %fp@(16),%d0 46722: 2f0a movel %a2,%sp@- 46724: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 46728: 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 ) ) { 4672c: b2aa 0050 cmpl %a2@(80),%d1 46730: 6618 bnes 4674a <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 46732: 123c 0003 moveb #3,%d1 46736: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4673a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4673c: 486a 0048 pea %a2@(72) 46740: 4eb9 0004 7c88 jsr 47c88 <_Watchdog_Remove> 46746: 588f addql #4,%sp 46748: 6002 bras 4674c <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 4674a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4674c: 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 } 46750: 246e fffc moveal %fp@(-4),%a2 46754: 203c 1003 fff8 movel #268697592,%d0 4675a: 2d40 000c movel %d0,%fp@(12) 4675e: 4e5e unlk %fp 46760: 4ef9 0004 68a8 jmp 468a8 <_Thread_Clear_state> ... 00046f84 <_Thread_queue_Dequeue>: Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 46f84: 41f9 0004 6fe0 lea 46fe0 <_Thread_queue_Dequeue_priority>,%a0 46f8a: 7001 moveq #1,%d0 */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 46f8c: 4e56 fff4 linkw %fp,#-12 46f90: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46f94: 246e 0008 moveal %fp@(8),%a2 Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 46f98: b0aa 0034 cmpl %a2@(52),%d0 46f9c: 6706 beqs 46fa4 <_Thread_queue_Dequeue+0x20> 46f9e: 41f9 0004 9e90 lea 49e90 <_Thread_queue_Dequeue_fifo>,%a0 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 46fa4: 2f0a movel %a2,%sp@- 46fa6: 4e90 jsr %a0@ _ISR_Disable( level ); 46fa8: 223c 0000 0700 movel #1792,%d1 46fae: 40c2 movew %sr,%d2 46fb0: 8282 orl %d2,%d1 46fb2: 46c1 movew %d1,%sr if ( !the_thread ) { 46fb4: 588f addql #4,%sp 46fb6: 4a80 tstl %d0 46fb8: 6618 bnes 46fd2 <_Thread_queue_Dequeue+0x4e> sync_state = the_thread_queue->sync_state; 46fba: 222a 0030 movel %a2@(48),%d1 46fbe: 7601 moveq #1,%d3 46fc0: 5381 subql #1,%d1 46fc2: b681 cmpl %d1,%d3 46fc4: 650c bcss 46fd2 <_Thread_queue_Dequeue+0x4e> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 46fc6: 7203 moveq #3,%d1 the_thread = _Thread_Executing; 46fc8: 2039 0005 baae movel 5baae <_Thread_Executing>,%d0 _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 46fce: 2541 0030 movel %d1,%a2@(48) the_thread = _Thread_Executing; } } _ISR_Enable( level ); 46fd2: 46c2 movew %d2,%sr return the_thread; } 46fd4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 46fda: 4e5e unlk %fp 46fdc: 4e75 rts ... 00049e90 <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 49e90: 223c 0000 0700 movel #1792,%d1 */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 49e96: 4e56 fff4 linkw %fp,#-12 49e9a: 206e 0008 moveal %fp@(8),%a0 49e9e: 48d7 1c00 moveml %a2-%a4,%sp@ ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 49ea2: 40c0 movew %sr,%d0 49ea4: 8280 orl %d0,%d1 49ea6: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49ea8: 2248 moveal %a0,%a1 49eaa: 2459 moveal %a1@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49eac: b3ca cmpal %a2,%a1 49eae: 674e beqs 49efe <_Thread_queue_Dequeue_fifo+0x6e> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 49eb0: 2252 moveal %a2@,%a1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) 49eb2: 264a moveal %a2,%a3 49eb4: 49f9 0004 68a8 lea 468a8 <_Thread_Clear_state>,%a4 _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 49eba: 7202 moveq #2,%d1 the_chain->first = new_first; 49ebc: 2089 movel %a1,%a0@ new_first->previous = _Chain_Head(the_chain); 49ebe: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 49ec2: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 49ec6: b2aa 0050 cmpl %a2@(80),%d1 49eca: 6710 beqs 49edc <_Thread_queue_Dequeue_fifo+0x4c> _ISR_Enable( level ); 49ecc: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 49ece: 2f3c 1003 fff8 movel #268697592,%sp@- 49ed4: 2f0a movel %a2,%sp@- 49ed6: 4e94 jsr %a4@ 49ed8: 508f addql #8,%sp 49eda: 6026 bras 49f02 <_Thread_queue_Dequeue_fifo+0x72> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 49edc: 7203 moveq #3,%d1 49ede: 2541 0050 movel %d1,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 49ee2: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 49ee4: 486a 0048 pea %a2@(72) 49ee8: 4eb9 0004 7c88 jsr 47c88 <_Watchdog_Remove> 49eee: 2f3c 1003 fff8 movel #268697592,%sp@- 49ef4: 2f0a movel %a2,%sp@- 49ef6: 4e94 jsr %a4@ 49ef8: 4fef 000c lea %sp@(12),%sp 49efc: 6004 bras 49f02 <_Thread_queue_Dequeue_fifo+0x72> #endif return the_thread; } _ISR_Enable( level ); 49efe: 46c0 movew %d0,%sr 49f00: 97cb subal %a3,%a3 return NULL; } 49f02: 200b movel %a3,%d0 49f04: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 49f0a: 4e5e unlk %fp 49f0c: 4e75 rts ... 00046fe0 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 46fe0: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 46fe6: 4e56 ffec linkw %fp,#-20 46fea: 226e 0008 moveal %fp@(8),%a1 46fee: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 46ff2: 40c1 movew %sr,%d1 46ff4: 8081 orl %d1,%d0 46ff6: 46c0 movew %d0,%sr 46ff8: 4280 clrl %d0 46ffa: 2049 moveal %a1,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 46ffc: 2408 movel %a0,%d2 46ffe: 5882 addql #4,%d2 47000: b490 cmpl %a0@,%d2 47002: 6728 beqs 4702c <_Thread_queue_Dequeue_priority+0x4c> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 47004: 2400 movel %d0,%d2 47006: e588 lsll #2,%d0 47008: e98a lsll #4,%d2 4700a: 9480 subl %d0,%d2 4700c: 2471 2800 moveal %a1@(00000000,%d2:l),%a2 47010: 200a movel %a2,%d0 47012: 0680 0000 003c addil #60,%d0 _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 47018: 206a 0038 moveal %a2@(56),%a0 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4701c: 2652 moveal %a2@,%a3 previous_node = the_thread->Object.Node.previous; 4701e: 226a 0004 moveal %a2@(4),%a1 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 47022: 42aa 0044 clrl %a2@(68) 47026: b088 cmpl %a0,%d0 47028: 6614 bnes 4703e <_Thread_queue_Dequeue_priority+0x5e> 4702a: 6046 bras 47072 <_Thread_queue_Dequeue_priority+0x92> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 4702c: 5280 addql #1,%d0 4702e: 41e8 000c lea %a0@(12),%a0 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 47032: 7404 moveq #4,%d2 47034: b480 cmpl %d0,%d2 47036: 66c4 bnes 46ffc <_Thread_queue_Dequeue_priority+0x1c> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 47038: 46c1 movew %d1,%sr 4703a: 95ca subal %a2,%a2 return NULL; 4703c: 6078 bras 470b6 <_Thread_queue_Dequeue_priority+0xd6> 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 ) ) { last_node = the_thread->Wait.Block2n.last; 4703e: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 47042: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 47044: 2748 0004 movel %a0,%a3@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 47048: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4704a: 2149 0004 movel %a1,%a0@(4) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4704e: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 47050: 226a 0040 moveal %a2@(64),%a1 47054: b3ea 0038 cmpal %a2@(56),%a1 47058: 671e beqs 47078 <_Thread_queue_Dequeue_priority+0x98> /* > two threads on 2-n */ new_second_node->previous = 4705a: 43e8 0038 lea %a0@(56),%a1 4705e: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 47062: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 47066: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4706a: 41e8 003c lea %a0@(60),%a0 4706e: 2888 movel %a0,%a4@ 47070: 6006 bras 47078 <_Thread_queue_Dequeue_priority+0x98> } } else { previous_node->next = next_node; next_node->previous = previous_node; 47072: 2749 0004 movel %a1,%a3@(4) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 47076: 228b movel %a3,%a1@ 47078: 47f9 0004 68a8 lea 468a8 <_Thread_Clear_state>,%a3 next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4707e: 7002 moveq #2,%d0 47080: b0aa 0050 cmpl %a2@(80),%d0 47084: 6710 beqs 47096 <_Thread_queue_Dequeue_priority+0xb6> _ISR_Enable( level ); 47086: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47088: 2f3c 1003 fff8 movel #268697592,%sp@- 4708e: 2f0a movel %a2,%sp@- 47090: 4e93 jsr %a3@ 47092: 508f addql #8,%sp 47094: 6020 bras 470b6 <_Thread_queue_Dequeue_priority+0xd6> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 47096: 7403 moveq #3,%d2 47098: 2542 0050 movel %d2,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4709c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4709e: 486a 0048 pea %a2@(72) 470a2: 4eb9 0004 7c88 jsr 47c88 <_Watchdog_Remove> 470a8: 2f3c 1003 fff8 movel #268697592,%sp@- 470ae: 2f0a movel %a2,%sp@- 470b0: 4e93 jsr %a3@ 470b2: 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 ); } 470b6: 200a movel %a2,%d0 470b8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 470be: 4e5e unlk %fp 470c0: 4e75 rts ... 0004715c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4715c: 4e56 ffe4 linkw %fp,#-28 47160: 206e 000c moveal %fp@(12),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47164: 43e8 003c lea %a0@(60),%a1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 47168: 2028 0014 movel %a0@(20),%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4716c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47170: 2400 movel %d0,%d2 47172: ec8a lsrl #6,%d2 47174: 2202 movel %d2,%d1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 47176: 283c 0000 0700 movel #1792,%d4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4717c: e989 lsll #4,%d1 4717e: e58a lsll #2,%d2 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47180: 246e 0008 moveal %fp@(8),%a2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47184: 9282 subl %d2,%d1 47186: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 4718a: 2149 0038 movel %a1,%a0@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4718e: 43e8 0038 lea %a0@(56),%a1 block_state = the_thread_queue->state; 47192: 2a2a 0038 movel %a2@(56),%d5 47196: 2149 0040 movel %a1,%a0@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4719a: 42a8 003c clrl %a0@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 4719e: 0800 0005 btst #5,%d0 471a2: 6660 bnes 47204 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 471a4: 2c0b movel %a3,%d6 471a6: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 471a8: 2404 movel %d4,%d2 471aa: 40c1 movew %sr,%d1 471ac: 8481 orl %d1,%d2 471ae: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->first; 471b0: 2253 moveal %a3@,%a1 471b2: 76ff moveq #-1,%d3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 471b4: 601e bras 471d4 <_Thread_queue_Enqueue_priority+0x78> search_priority = search_thread->current_priority; 471b6: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 471ba: b680 cmpl %d0,%d3 471bc: 641a bccs 471d8 <_Thread_queue_Enqueue_priority+0x7c> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 471be: 2404 movel %d4,%d2 471c0: 46c1 movew %d1,%sr 471c2: 8481 orl %d1,%d2 471c4: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 471c6: 2405 movel %d5,%d2 471c8: c4a9 0010 andl %a1@(16),%d2 471cc: 6604 bnes 471d2 <_Thread_queue_Enqueue_priority+0x76> _ISR_Enable( level ); 471ce: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 471d0: 60d6 bras 471a8 <_Thread_queue_Enqueue_priority+0x4c><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 471d2: 2251 moveal %a1@,%a1 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 471d4: bc89 cmpl %a1,%d6 471d6: 66de bnes 471b6 <_Thread_queue_Enqueue_priority+0x5a> 471d8: 2401 movel %d1,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 471da: 7801 moveq #1,%d4 471dc: b8aa 0030 cmpl %a2@(48),%d4 471e0: 6600 00a4 bnew 47286 <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 471e4: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 471e8: b680 cmpl %d0,%d3 471ea: 677e beqs 4726a <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 471ec: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 471f0: 2089 movel %a1,%a0@ the_node->previous = previous_node; 471f2: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 471f6: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 471fa: 2688 movel %a0,%a3@ search_node->previous = the_node; 471fc: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47200: 46c1 movew %d1,%sr 47202: 6062 bras 47266 <_Thread_queue_Enqueue_priority+0x10a> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 47204: 4283 clrl %d3 47206: 1639 0005 a2c2 moveb 5a2c2 ,%d3 _ISR_Disable( level ); 4720c: 2404 movel %d4,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4720e: 5283 addql #1,%d3 _ISR_Disable( level ); 47210: 40c1 movew %sr,%d1 47212: 8481 orl %d1,%d2 47214: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->last; 47216: 226b 0008 moveal %a3@(8),%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4721a: 6020 bras 4723c <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 4721c: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 47220: b680 cmpl %d0,%d3 47222: 631c blss 47240 <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 47224: 2404 movel %d4,%d2 47226: 46c1 movew %d1,%sr 47228: 8481 orl %d1,%d2 4722a: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4722c: 2405 movel %d5,%d2 4722e: c4a9 0010 andl %a1@(16),%d2 47232: 6604 bnes 47238 <_Thread_queue_Enqueue_priority+0xdc> _ISR_Enable( level ); 47234: 46c1 movew %d1,%sr goto restart_reverse_search; 47236: 60cc bras 47204 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 47238: 2269 0004 moveal %a1@(4),%a1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4723c: b7c9 cmpal %a1,%a3 4723e: 66dc bnes 4721c <_Thread_queue_Enqueue_priority+0xc0> 47240: 2401 movel %d1,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 47242: 7801 moveq #1,%d4 47244: b8aa 0030 cmpl %a2@(48),%d4 47248: 663c bnes 47286 <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4724a: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 4724e: b680 cmpl %d0,%d3 47250: 6718 beqs 4726a <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 47252: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 47254: 2149 0004 movel %a1,%a0@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 47258: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4725a: 214a 0044 movel %a2,%a0@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 4725e: 2288 movel %a0,%a1@ next_node->previous = the_node; 47260: 2748 0004 movel %a0,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47264: 46c1 movew %d1,%sr 47266: 7001 moveq #1,%d0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47268: 6026 bras 47290 <_Thread_queue_Enqueue_priority+0x134> 4726a: 43e9 003c lea %a1@(60),%a1 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 4726e: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47272: 2089 movel %a1,%a0@ the_node->previous = previous_node; 47274: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47278: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 4727c: 2688 movel %a0,%a3@ search_node->previous = the_node; 4727e: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47282: 46c2 movew %d2,%sr 47284: 60e0 bras 47266 <_Thread_queue_Enqueue_priority+0x10a> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 47286: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 4728a: 202a 0030 movel %a2@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4728e: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 47290: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 47294: 4e5e unlk %fp 47296: 4e75 rts 0004b518 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4b518: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4b51e: 4e56 0000 linkw %fp,#0 4b522: 2f0a movel %a2,%sp@- 4b524: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4b528: 40c0 movew %sr,%d0 4b52a: 8280 orl %d0,%d1 4b52c: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4b52e: 222a 0010 movel %a2@(16),%d1 4b532: 0281 0003 bee0 andil #245472,%d1 4b538: 660a bnes 4b544 <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4b53a: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b53c: 246e fffc moveal %fp@(-4),%a2 4b540: 4e5e unlk %fp 4b542: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b544: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b546: 7202 moveq #2,%d1 previous = the_node->previous; 4b548: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4b54c: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4b550: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b552: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b556: b2aa 0050 cmpl %a2@(80),%d1 4b55a: 6704 beqs 4b560 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4b55c: 46c0 movew %d0,%sr 4b55e: 6014 bras 4b574 <_Thread_queue_Extract_fifo+0x5c> 4b560: 7203 moveq #3,%d1 4b562: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4b566: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b568: 486a 0048 pea %a2@(72) 4b56c: 4eb9 0004 7c88 jsr 47c88 <_Watchdog_Remove> 4b572: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4b574: 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 } 4b578: 246e fffc moveal %fp@(-4),%a2 4b57c: 203c 1003 fff8 movel #268697592,%d0 4b582: 2d40 000c movel %d0,%fp@(12) 4b586: 4e5e unlk %fp 4b588: 4ef9 0004 68a8 jmp 468a8 <_Thread_Clear_state> ... 000472c0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 472c0: 4e56 fff4 linkw %fp,#-12 472c4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 472c8: 262e 0008 movel %fp@(8),%d3 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 472cc: 45f9 0004 6f84 lea 46f84 <_Thread_queue_Dequeue>,%a2 #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 472d2: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 472d6: 6006 bras 472de <_Thread_queue_Flush+0x1e> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 472d8: 2040 moveal %d0,%a0 472da: 2142 0034 movel %d2,%a0@(52) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 472de: 2f03 movel %d3,%sp@- 472e0: 4e92 jsr %a2@ 472e2: 588f addql #4,%sp 472e4: 4a80 tstl %d0 472e6: 66f0 bnes 472d8 <_Thread_queue_Flush+0x18> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 472e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 472ee: 4e5e unlk %fp 472f0: 4e75 rts ... 0004a068 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4a068: 4e56 0000 linkw %fp,#0 4a06c: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4a070: 2268 0044 moveal %a0@(68),%a1 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4a074: 2029 0030 movel %a1@(48),%d0 4a078: 671c beqs 4a096 <_Thread_queue_Process_timeout+0x2e> 4a07a: b1f9 0005 baae cmpal 5baae <_Thread_Executing>,%a0 4a080: 6614 bnes 4a096 <_Thread_queue_Process_timeout+0x2e> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4a082: 7203 moveq #3,%d1 4a084: b280 cmpl %d0,%d1 4a086: 6722 beqs 4a0aa <_Thread_queue_Process_timeout+0x42> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a088: 7002 moveq #2,%d0 */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a08a: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a090: 2340 0030 movel %d0,%a1@(48) 4a094: 6014 bras 4a0aa <_Thread_queue_Process_timeout+0x42> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a096: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4a09c: 2f08 movel %a0,%sp@- 4a09e: 2f28 0044 movel %a0@(68),%sp@- 4a0a2: 4eb9 0004 9f64 jsr 49f64 <_Thread_queue_Extract> 4a0a8: 508f addql #8,%sp } } 4a0aa: 4e5e unlk %fp 4a0ac: 4e75 rts ... 000473b0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 473b0: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 473b4: 486e fffc pea %fp@(-4) 473b8: 2f2e 0008 movel %fp@(8),%sp@- 473bc: 4eb9 0004 6c88 jsr 46c88 <_Thread_Get> switch ( location ) { 473c2: 508f addql #8,%sp 473c4: 4aae fffc tstl %fp@(-4) 473c8: 6618 bnes 473e2 <_Thread_queue_Timeout+0x32> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 473ca: 2f00 movel %d0,%sp@- 473cc: 4eb9 0004 a068 jsr 4a068 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 473d2: 588f addql #4,%sp 473d4: 2039 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d0 473da: 5380 subql #1,%d0 473dc: 23c0 0005 b9f4 movel %d0,5b9f4 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 473e2: 4e5e unlk %fp 473e4: 4e75 rts ... 0004950c <_Timer_Manager_initialization>: * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { 4950c: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 49510: 4878 0004 pea 4 49514: 42a7 clrl %sp@- 49516: 4878 003c pea 3c 4951a: 2f39 0005 a296 movel 5a296 ,%sp@- 49520: 4878 0002 pea 2 49524: 4878 0002 pea 2 49528: 4879 0005 bd66 pea 5bd66 <_Timer_Information> 4952e: 4eb9 0004 64ec jsr 464ec <_Objects_Initialize_information> /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; 49534: 4fef 001c lea %sp@(28),%sp } 49538: 4e5e unlk %fp /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; 4953a: 42b9 0005 bd9e clrl 5bd9e <_Timer_server> } 49540: 4e75 rts ... 00051644 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 51644: 4e56 ffb4 linkw %fp,#-76 51648: 200e movel %fp,%d0 5164a: 0680 ffff fff4 addil #-12,%d0 51650: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51654: 246e 0008 moveal %fp@(8),%a2 51658: 240e movel %fp,%d2 5165a: 2a0e movel %fp,%d5 5165c: 260e movel %fp,%d3 5165e: 0682 ffff ffe8 addil #-24,%d2 51664: 5185 subql #8,%d5 51666: 0683 ffff ffec addil #-20,%d3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5166c: 41ea 0008 lea %a2@(8),%a0 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 51670: 4bea 0040 lea %a2@(64),%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51674: 2e0a movel %a2,%d7 /* * 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 ); 51676: 280a movel %a2,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51678: 0687 0000 0030 addil #48,%d7 /* * 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 ); 5167e: 0684 0000 0068 addil #104,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51684: 49f9 0005 504c lea 5504c <_Watchdog_Adjust_to_chain>,%a4 ) { 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 ); 5168a: 47f9 0005 50dc lea 550dc <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51690: 2d48 ffe4 movel %a0,%fp@(-28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 51694: 2d45 fff4 movel %d5,%fp@(-12) the_chain->permanent_null = NULL; 51698: 42ae fff8 clrl %fp@(-8) the_chain->last = _Chain_Head(the_chain); 5169c: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 516a0: 2d43 ffe8 movel %d3,%fp@(-24) the_chain->permanent_null = NULL; 516a4: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 516a8: 2d42 fff0 movel %d2,%fp@(-16) 516ac: 2d4d ffe0 movel %a5,%fp@(-32) { /* * 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; 516b0: 41ee fff4 lea %fp@(-12),%a0 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 516b4: 3a7c 0700 moveaw #1792,%a5 { /* * 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; 516b8: 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; 516bc: 2039 0007 4140 movel 74140 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 516c2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 516c6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 516ca: 486e ffe8 pea %fp@(-24) 516ce: 9081 subl %d1,%d0 516d0: 2f00 movel %d0,%sp@- 516d2: 2f07 movel %d7,%sp@- 516d4: 4e94 jsr %a4@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 516d6: 2039 0007 4092 movel 74092 <_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 ) { 516dc: 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; 516e0: 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 ) { 516e4: b280 cmpl %d0,%d1 516e6: 6414 bccs 516fc <_Timer_server_Body+0xb8> /* * 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 ); 516e8: 486e ffe8 pea %fp@(-24) 516ec: 2c00 movel %d0,%d6 516ee: 9c81 subl %d1,%d6 516f0: 2f06 movel %d6,%sp@- 516f2: 2d40 ffdc movel %d0,%fp@(-36) 516f6: 2f04 movel %d4,%sp@- 516f8: 4e94 jsr %a4@ 516fa: 6018 bras 51714 <_Timer_server_Body+0xd0> } else if ( snapshot < last_snapshot ) { 516fc: b280 cmpl %d0,%d1 516fe: 631c blss 5171c <_Timer_server_Body+0xd8> /* * 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 ); 51700: 9280 subl %d0,%d1 51702: 2f01 movel %d1,%sp@- 51704: 4878 0001 pea 1 51708: 2d40 ffdc movel %d0,%fp@(-36) 5170c: 2f04 movel %d4,%sp@- 5170e: 4eb9 0005 4fcc jsr 54fcc <_Watchdog_Adjust> 51714: 202e ffdc movel %fp@(-36),%d0 51718: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 5171c: 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 ); 51720: 202a 0078 movel %a2@(120),%d0 51724: 2f00 movel %d0,%sp@- 51726: 4eb9 0005 1fb8 jsr 51fb8 <_Chain_Get> if ( timer == NULL ) { 5172c: 588f addql #4,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5172e: 2040 moveal %d0,%a0 if ( timer == NULL ) { 51730: 4a80 tstl %d0 51732: 6724 beqs 51758 <_Timer_server_Body+0x114> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51734: 2028 0038 movel %a0@(56),%d0 51738: 7201 moveq #1,%d1 5173a: b280 cmpl %d0,%d1 5173c: 6608 bnes 51746 <_Timer_server_Body+0x102> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5173e: 4868 0010 pea %a0@(16) 51742: 2f07 movel %d7,%sp@- 51744: 600c bras 51752 <_Timer_server_Body+0x10e> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51746: 7c03 moveq #3,%d6 51748: bc80 cmpl %d0,%d6 5174a: 66d4 bnes 51720 <_Timer_server_Body+0xdc> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5174c: 4868 0010 pea %a0@(16) 51750: 2f04 movel %d4,%sp@- 51752: 4e93 jsr %a3@ 51754: 508f addql #8,%sp 51756: 60c8 bras 51720 <_Timer_server_Body+0xdc> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 51758: 200d movel %a5,%d0 5175a: 40c1 movew %sr,%d1 5175c: 8081 orl %d1,%d0 5175e: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 51760: baae fff4 cmpl %fp@(-12),%d5 51764: 6612 bnes 51778 <_Timer_server_Body+0x134> ts->insert_chain = NULL; 51766: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 5176a: 46c1 movew %d1,%sr /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5176c: 3a7c 0700 moveaw #1792,%a5 _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 ) ) { 51770: b6ae ffe8 cmpl %fp@(-24),%d3 51774: 6608 bnes 5177e <_Timer_server_Body+0x13a> 51776: 6042 bras 517ba <_Timer_server_Body+0x176> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 51778: 46c1 movew %d1,%sr <== NOT EXECUTED 5177a: 6000 ff40 braw 516bc <_Timer_server_Body+0x78> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5177e: 220d movel %a5,%d1 51780: 40c0 movew %sr,%d0 51782: 8280 orl %d0,%d1 51784: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 51786: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5178a: b688 cmpl %a0,%d3 5178c: 6726 beqs 517b4 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 5178e: 2250 moveal %a0@,%a1 the_chain->first = new_first; 51790: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 51794: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 51798: 4a88 tstl %a0 5179a: 6718 beqs 517b4 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 5179c: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 517a0: 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 ); 517a2: 2f28 0024 movel %a0@(36),%sp@- 517a6: 2f28 0020 movel %a0@(32),%sp@- 517aa: 2068 001c moveal %a0@(28),%a0 517ae: 4e90 jsr %a0@ } 517b0: 508f addql #8,%sp 517b2: 60ca bras 5177e <_Timer_server_Body+0x13a> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 517b4: 46c0 movew %d0,%sr 517b6: 6000 fef8 braw 516b0 <_Timer_server_Body+0x6c> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 517ba: 4200 clrb %d0 517bc: 1540 007c moveb %d0,%a2@(124) 517c0: 2039 0007 4000 movel 74000 <_Thread_Dispatch_disable_level>,%d0 517c6: 5280 addql #1,%d0 517c8: 23c0 0007 4000 movel %d0,74000 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 517ce: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 517d2: 4bf9 0005 51f8 lea 551f8 <_Watchdog_Remove>,%a5 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 517d8: 2f12 movel %a2@,%sp@- 517da: 4eb9 0005 4818 jsr 54818 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 517e0: 2f0a movel %a2,%sp@- 517e2: 4eba fd9c jsr %pc@(51580 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 517e6: 2f0a movel %a2,%sp@- 517e8: 4eba fdf6 jsr %pc@(515e0 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 517ec: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> ts->active = true; 517f2: 7201 moveq #1,%d1 517f4: 1541 007c moveb %d1,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 517f8: 2f2e ffe4 movel %fp@(-28),%sp@- 517fc: 4e95 jsr %a5@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 517fe: 2f2e ffe0 movel %fp@(-32),%sp@- 51802: 4e95 jsr %a5@ 51804: 4fef 0018 lea %sp@(24),%sp 51808: 6000 fea6 braw 516b0 <_Timer_server_Body+0x6c> 0005180c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 5180c: 4e56 fff0 linkw %fp,#-16 51810: 206e 000c moveal %fp@(12),%a0 51814: 48d7 041c moveml %d2-%d4/%a2,%sp@ 51818: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 5181c: 202a 0078 movel %a2@(120),%d0 51820: 6600 00f8 bnew 5191a <_Timer_server_Schedule_operation_method+0x10e> 51824: 2039 0007 4000 movel 74000 <_Thread_Dispatch_disable_level>,%d0 5182a: 5280 addql #1,%d0 5182c: 23c0 0007 4000 movel %d0,74000 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51832: 2028 0038 movel %a0@(56),%d0 51836: 7201 moveq #1,%d1 51838: b280 cmpl %d0,%d1 5183a: 6660 bnes 5189c <_Timer_server_Schedule_operation_method+0x90> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5183c: 203c 0000 0700 movel #1792,%d0 51842: 40c3 movew %sr,%d3 51844: 8083 orl %d3,%d0 51846: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 51848: 2039 0007 4140 movel 74140 <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5184e: 220a movel %a2,%d1 51850: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 51856: 242a 003c movel %a2@(60),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5185a: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5185e: b289 cmpl %a1,%d1 51860: 6716 beqs 51878 <_Timer_server_Schedule_operation_method+0x6c> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 51862: 2800 movel %d0,%d4 51864: 9882 subl %d2,%d4 delta_interval = first_watchdog->delta_interval; 51866: 2229 0010 movel %a1@(16),%d1 if (delta_interval > delta) { 5186a: b881 cmpl %d1,%d4 5186c: 6504 bcss 51872 <_Timer_server_Schedule_operation_method+0x66> 5186e: 4281 clrl %d1 51870: 6002 bras 51874 <_Timer_server_Schedule_operation_method+0x68> delta_interval -= delta; 51872: 9284 subl %d4,%d1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 51874: 2341 0010 movel %d1,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 51878: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 5187c: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5187e: 4868 0010 pea %a0@(16) 51882: 486a 0030 pea %a2@(48) 51886: 4eb9 0005 50dc jsr 550dc <_Watchdog_Insert> if ( !ts->active ) { 5188c: 508f addql #8,%sp 5188e: 102a 007c moveb %a2@(124),%d0 51892: 6678 bnes 5190c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_interval_system_watchdog( ts ); 51894: 2f0a movel %a2,%sp@- 51896: 4eba fce8 jsr %pc@(51580 <_Timer_server_Reset_interval_system_watchdog>) 5189a: 606e bras 5190a <_Timer_server_Schedule_operation_method+0xfe> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5189c: 7203 moveq #3,%d1 5189e: b280 cmpl %d0,%d1 518a0: 666a bnes 5190c <_Timer_server_Schedule_operation_method+0x100> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 518a2: 203c 0000 0700 movel #1792,%d0 518a8: 40c3 movew %sr,%d3 518aa: 8083 orl %d3,%d0 518ac: 46c0 movew %d0,%sr 518ae: 200a movel %a2,%d0 518b0: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 518b6: 2239 0007 4092 movel 74092 <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 518bc: 242a 0074 movel %a2@(116),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 518c0: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 518c4: b089 cmpl %a1,%d0 518c6: 6720 beqs 518e8 <_Timer_server_Schedule_operation_method+0xdc> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 518c8: 2029 0010 movel %a1@(16),%d0 if ( snapshot > last_snapshot ) { 518cc: b481 cmpl %d1,%d2 518ce: 6410 bccs 518e0 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; 518d0: 2801 movel %d1,%d4 518d2: 9882 subl %d2,%d4 if (delta_interval > delta) { 518d4: b880 cmpl %d0,%d4 518d6: 6504 bcss 518dc <_Timer_server_Schedule_operation_method+0xd0> 518d8: 4280 clrl %d0 <== NOT EXECUTED 518da: 6008 bras 518e4 <_Timer_server_Schedule_operation_method+0xd8><== NOT EXECUTED delta_interval -= delta; 518dc: 9084 subl %d4,%d0 518de: 6004 bras 518e4 <_Timer_server_Schedule_operation_method+0xd8> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 518e0: d082 addl %d2,%d0 delta_interval += delta; 518e2: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 518e4: 2340 0010 movel %d0,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 518e8: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 518ec: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 518ee: 4868 0010 pea %a0@(16) 518f2: 486a 0068 pea %a2@(104) 518f6: 4eb9 0005 50dc jsr 550dc <_Watchdog_Insert> if ( !ts->active ) { 518fc: 508f addql #8,%sp 518fe: 102a 007c moveb %a2@(124),%d0 51902: 6608 bnes 5190c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_tod_system_watchdog( ts ); 51904: 2f0a movel %a2,%sp@- 51906: 4eba fcd8 jsr %pc@(515e0 <_Timer_server_Reset_tod_system_watchdog>) 5190a: 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 ); } } 5190c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 51912: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 51914: 4ef9 0005 3ec6 jmp 53ec6 <_Thread_Enable_dispatch> * 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 ); 5191a: 202a 0078 movel %a2@(120),%d0 5191e: 2d48 000c movel %a0,%fp@(12) } } 51922: 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 ); 51928: 2d40 0008 movel %d0,%fp@(8) } } 5192c: 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 ); 5192e: 4ef9 0005 1f80 jmp 51f80 <_Chain_Append> 0004787c <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 4787c: 4e56 0000 linkw %fp,#0 47880: 206e 0008 moveal %fp@(8),%a0 47884: 2f0a movel %a2,%sp@- 47886: 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; 4788a: 226a 0004 moveal %a2@(4),%a1 4788e: d3e8 0004 addal %a0@(4),%a1 47892: 2209 movel %a1,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 47894: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 47896: d190 addl %d0,%a0@ time->tv_nsec += add->tv_nsec; 47898: 2149 0004 movel %a1,%a0@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4789c: 600a bras 478a8 <_Timespec_Add_to+0x2c> time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 4789e: 5290 addql #1,%a0@ seconds++; 478a0: 5280 addql #1,%d0 478a2: 0681 c465 3600 addil #-1000000000,%d1 /* 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 ) { 478a8: 0c81 3b9a c9ff cmpil #999999999,%d1 478ae: 62ee bhis 4789e <_Timespec_Add_to+0x22> time->tv_sec++; seconds++; } return seconds; } 478b0: 245f moveal %sp@+,%a2 478b2: 4e5e unlk %fp /* 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 ) { 478b4: 2141 0004 movel %d1,%a0@(4) time->tv_sec++; seconds++; } return seconds; } 478b8: 4e75 rts ... 00070f74 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 70f74: 4e56 0000 linkw %fp,#0 70f78: 226e 0008 moveal %fp@(8),%a1 70f7c: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 70f80: 2211 movel %a1@,%d1 70f82: 2010 movel %a0@,%d0 70f84: b081 cmpl %d1,%d0 70f86: 6c04 bges 70f8c <_Timespec_Greater_than+0x18> 70f88: 7001 moveq #1,%d0 70f8a: 6014 bras 70fa0 <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 70f8c: b081 cmpl %d1,%d0 70f8e: 6f04 bles 70f94 <_Timespec_Greater_than+0x20> 70f90: 4200 clrb %d0 <== NOT EXECUTED 70f92: 600c bras 70fa0 <_Timespec_Greater_than+0x2c> <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 70f94: 2068 0004 moveal %a0@(4),%a0 70f98: b1e9 0004 cmpal %a1@(4),%a0 70f9c: 5dc0 slt %d0 70f9e: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 70fa0: 4e5e unlk %fp 70fa2: 4e75 rts 000610c0 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 610c0: 4e56 fff4 linkw %fp,#-12 610c4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 610c8: 246e 0008 moveal %fp@(8),%a2 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 610cc: 2412 movel %a2@,%d2 610ce: 660a bnes 610da <_Timespec_To_ticks+0x1a> 610d0: 4aaa 0004 tstl %a2@(4) 610d4: 6604 bnes 610da <_Timespec_To_ticks+0x1a> 610d6: 4280 clrl %d0 610d8: 602a bras 61104 <_Timespec_To_ticks+0x44> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 610da: 4eb9 0006 11bc jsr 611bc ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 610e0: 2239 0006 4f40 movel 64f40 ,%d1 610e6: 263c 0000 03e8 movel #1000,%d3 610ec: 4c03 1800 mulsl %d3,%d1 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 610f0: 4c02 0800 mulsl %d2,%d0 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 610f4: 262a 0004 movel %a2@(4),%d3 610f8: 4c41 3003 remul %d1,%d3,%d3 610fc: d083 addl %d3,%d0 if (ticks) 610fe: 6604 bnes 61104 <_Timespec_To_ticks+0x44> 61100: 103c 0001 moveb #1,%d0 return ticks; return 1; } 61104: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 6110a: 4e5e unlk %fp 6110c: 4e75 rts ... 0004a1e4 <_User_extensions_Add_set>: #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4a1e4: 4e56 0000 linkw %fp,#0 4a1e8: 2f0b movel %a3,%sp@- _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4a1ea: 47f9 0004 5874 lea 45874 <_Chain_Append>,%a3 #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4a1f0: 2f0a movel %a2,%sp@- 4a1f2: 246e 0008 moveal %fp@(8),%a2 _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4a1f6: 2f0a movel %a2,%sp@- 4a1f8: 4879 0005 bb82 pea 5bb82 <_User_extensions_List> 4a1fe: 4e93 jsr %a3@ /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4a200: 202a 0024 movel %a2@(36),%d0 4a204: 508f addql #8,%sp 4a206: 6712 beqs 4a21a <_User_extensions_Add_set+0x36> the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append( 4a208: 486a 0008 pea %a2@(8) 4a20c: 4879 0005 b9f8 pea 5b9f8 <_User_extensions_Switches_list> /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { the_extension->Switch.thread_switch = 4a212: 2540 0010 movel %d0,%a2@(16) the_extension->Callouts.thread_switch; _Chain_Append( 4a216: 4e93 jsr %a3@ 4a218: 508f addql #8,%sp &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 4a21a: 246e fff8 moveal %fp@(-8),%a2 4a21e: 266e fffc moveal %fp@(-4),%a3 4a222: 4e5e unlk %fp 4a224: 4e75 rts ... 00047a26 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a26: 4e56 fff0 linkw %fp,#-16 47a2a: 48d7 041c moveml %d2-%d4/%a2,%sp@ 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 ); 47a2e: 4282 clrl %d2 47a30: 142e 000f moveb %fp@(15),%d2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a34: 282e 0008 movel %fp@(8),%d4 47a38: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47a3c: 2479 0005 bb8a moveal 5bb8a <_User_extensions_List+0x8>,%a2 47a42: 6018 bras 47a5c <_User_extensions_Fatal+0x36> !_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 ) 47a44: 206a 0030 moveal %a2@(48),%a0 47a48: 4a88 tstl %a0 47a4a: 670c beqs 47a58 <_User_extensions_Fatal+0x32> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 47a4c: 2f03 movel %d3,%sp@- 47a4e: 2f02 movel %d2,%sp@- 47a50: 2f04 movel %d4,%sp@- 47a52: 4e90 jsr %a0@ 47a54: 4fef 000c lea %sp@(12),%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 47a58: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47a5c: b5fc 0005 bb82 cmpal #375682,%a2 47a62: 66e0 bnes 47a44 <_User_extensions_Fatal+0x1e> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 47a64: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47a6a: 4e5e unlk %fp 47a6c: 4e75 rts ... 00047904 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 47904: 4e56 ffe4 linkw %fp,#-28 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47908: 203c 0005 bb86 movel #375686,%d0 4790e: 23c0 0005 bb82 movel %d0,5bb82 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47914: 203c 0005 bb82 movel #375682,%d0 4791a: 23c0 0005 bb8a movel %d0,5bb8a <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47920: 203c 0005 b9fc movel #375292,%d0 47926: 23c0 0005 b9f8 movel %d0,5b9f8 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4792c: 203c 0005 b9f8 movel #375288,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47932: 42b9 0005 bb86 clrl 5bb86 <_User_extensions_List+0x4> 47938: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%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; 4793c: 2a39 0005 a2fa movel 5a2fa ,%d5 initial_extensions = Configuration.User_extension_table; 47942: 2639 0005 a2fe movel 5a2fe ,%d3 47948: 42b9 0005 b9fc clrl 5b9fc <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 4794e: 23c0 0005 ba00 movel %d0,5ba00 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 47954: 4a83 tstl %d3 47956: 6750 beqs 479a8 <_User_extensions_Handler_initialization+0xa4> extension = (User_extensions_Control *) 47958: 7834 moveq #52,%d4 4795a: 4c05 4800 mulsl %d5,%d4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 4795e: 4282 clrl %d2 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 47960: 49f9 0004 c1c8 lea 4c1c8 ,%a4 _User_extensions_Add_set( extension ); 47966: 47f9 0004 a1e4 lea 4a1e4 <_User_extensions_Add_set>,%a3 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 4796c: 2f04 movel %d4,%sp@- 4796e: 4eb9 0004 7d80 jsr 47d80 <_Workspace_Allocate_or_fatal_error> 47974: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 47976: 2f04 movel %d4,%sp@- 47978: 42a7 clrl %sp@- 4797a: 2f00 movel %d0,%sp@- 4797c: 4eb9 0004 c238 jsr 4c238 47982: 601c bras 479a0 <_User_extensions_Handler_initialization+0x9c> RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 47984: 4878 0020 pea 20 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 47988: 5282 addql #1,%d2 4798a: 2f03 movel %d3,%sp@- 4798c: 486a 0014 pea %a2@(20) 47990: 0683 0000 0020 addil #32,%d3 47996: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 47998: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 4799a: 45ea 0034 lea %a2@(52),%a2 4799e: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 479a0: 4fef 0010 lea %sp@(16),%sp 479a4: ba82 cmpl %d2,%d5 479a6: 62dc bhis 47984 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 479a8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 479ae: 4e5e unlk %fp 479b0: 4e75 rts ... 000479ec <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 479ec: 4e56 0000 linkw %fp,#0 479f0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 479f2: 2479 0005 bb8a moveal 5bb8a <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 479f8: 2f02 movel %d2,%sp@- 479fa: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 479fe: 6012 bras 47a12 <_User_extensions_Thread_exitted+0x26> !_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 ) 47a00: 206a 002c moveal %a2@(44),%a0 47a04: 4a88 tstl %a0 47a06: 6706 beqs 47a0e <_User_extensions_Thread_exitted+0x22> (*the_extension->Callouts.thread_exitted)( executing ); 47a08: 2f02 movel %d2,%sp@- 47a0a: 4e90 jsr %a0@ 47a0c: 588f addql #4,%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 47a0e: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47a12: b5fc 0005 bb82 cmpal #375682,%a2 47a18: 66e6 bnes 47a00 <_User_extensions_Thread_exitted+0x14> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 47a1a: 242e fff8 movel %fp@(-8),%d2 47a1e: 246e fffc moveal %fp@(-4),%a2 47a22: 4e5e unlk %fp 47a24: 4e75 rts 000482ec <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 482ec: 4e56 0000 linkw %fp,#0 482f0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 482f2: 2479 0005 c66a moveal 5c66a <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 482f8: 2f02 movel %d2,%sp@- 482fa: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 482fe: 6016 bras 48316 <_User_extensions_Thread_restart+0x2a> !_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 ) 48300: 206a 001c moveal %a2@(28),%a0 48304: 4a88 tstl %a0 48306: 670c beqs 48314 <_User_extensions_Thread_restart+0x28> (*the_extension->Callouts.thread_restart)( 48308: 2f02 movel %d2,%sp@- 4830a: 2f39 0005 c596 movel 5c596 <_Thread_Executing>,%sp@- 48310: 4e90 jsr %a0@ 48312: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 48314: 2452 moveal %a2@,%a2 48316: b5fc 0005 c66e cmpal #378478,%a2 4831c: 66e2 bnes 48300 <_User_extensions_Thread_restart+0x14> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4831e: 242e fff8 movel %fp@(-8),%d2 48322: 246e fffc moveal %fp@(-4),%a2 48326: 4e5e unlk %fp 48328: 4e75 rts ... 00047af4 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47af4: 4e56 0000 linkw %fp,#0 47af8: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47afa: 2479 0005 bb82 moveal 5bb82 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47b00: 2f02 movel %d2,%sp@- 47b02: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47b06: 6016 bras 47b1e <_User_extensions_Thread_start+0x2a> !_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 ) 47b08: 206a 0018 moveal %a2@(24),%a0 47b0c: 4a88 tstl %a0 47b0e: 670c beqs 47b1c <_User_extensions_Thread_start+0x28> (*the_extension->Callouts.thread_start)( 47b10: 2f02 movel %d2,%sp@- 47b12: 2f39 0005 baae movel 5baae <_Thread_Executing>,%sp@- 47b18: 4e90 jsr %a0@ 47b1a: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 47b1c: 2452 moveal %a2@,%a2 47b1e: b5fc 0005 bb86 cmpal #375686,%a2 47b24: 66e2 bnes 47b08 <_User_extensions_Thread_start+0x14> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 47b26: 242e fff8 movel %fp@(-8),%d2 47b2a: 246e fffc moveal %fp@(-4),%a2 47b2e: 4e5e unlk %fp 47b30: 4e75 rts ... 00047c3c <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47c3c: 43f9 0005 bacc lea 5bacc <_Watchdog_Ticks_chain>,%a1 47c42: 41f9 0005 bac0 lea 5bac0 <_Watchdog_Seconds_chain>,%a0 * * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { 47c48: 4e56 0000 linkw %fp,#0 _Watchdog_Sync_level = 0; _Watchdog_Ticks_since_boot = 0; _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 47c4c: 4e5e unlk %fp * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; 47c4e: 42b9 0005 bb30 clrl 5bb30 <_Watchdog_Sync_count> _Watchdog_Sync_level = 0; 47c54: 42b9 0005 baaa clrl 5baaa <_Watchdog_Sync_level> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47c5a: 23c9 0005 bad4 movel %a1,5bad4 <_Watchdog_Ticks_chain+0x8> 47c60: 23c8 0005 bac8 movel %a0,5bac8 <_Watchdog_Seconds_chain+0x8> _Watchdog_Ticks_since_boot = 0; 47c66: 42b9 0005 bb34 clrl 5bb34 <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47c6c: 22bc 0005 bad0 movel #375504,%a1@ the_chain->permanent_null = NULL; 47c72: 42b9 0005 bad0 clrl 5bad0 <_Watchdog_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47c78: 20bc 0005 bac4 movel #375492,%a0@ the_chain->permanent_null = NULL; 47c7e: 42b9 0005 bac4 clrl 5bac4 <_Watchdog_Seconds_chain+0x4> _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 47c84: 4e75 rts ... 00047b6c <_Watchdog_Insert>: Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 47b6c: 327c 0700 moveaw #1792,%a1 47b70: 2009 movel %a1,%d0 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 47b72: 4e56 ffec linkw %fp,#-20 47b76: 206e 000c moveal %fp@(12),%a0 47b7a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47b7e: 266e 0008 moveal %fp@(8),%a3 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 47b82: 2439 0005 ba8e movel 5ba8e <_ISR_Nest_level>,%d2 _ISR_Disable( level ); 47b88: 40c1 movew %sr,%d1 47b8a: 8081 orl %d1,%d0 47b8c: 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 ) { 47b8e: 4aa8 0008 tstl %a0@(8) 47b92: 6706 beqs 47b9a <_Watchdog_Insert+0x2e> _ISR_Enable( level ); 47b94: 46c1 movew %d1,%sr return; 47b96: 6000 009a braw 47c32 <_Watchdog_Insert+0xc6> } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47b9a: 2039 0005 bb30 movel 5bb30 <_Watchdog_Sync_count>,%d0 47ba0: 5280 addql #1,%d0 * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 47ba2: 2449 moveal %a1,%a2 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47ba4: 23c0 0005 bb30 movel %d0,5bb30 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 47baa: 7001 moveq #1,%d0 47bac: 2140 0008 movel %d0,%a0@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 47bb0: 2028 000c movel %a0@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 47bb4: 2253 moveal %a3@,%a1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 47bb6: 4a80 tstl %d0 47bb8: 673c beqs 47bf6 <_Watchdog_Insert+0x8a> 47bba: 4a91 tstl %a1@ 47bbc: 6738 beqs 47bf6 <_Watchdog_Insert+0x8a> break; if ( delta_interval < after->delta_interval ) { 47bbe: 2629 0010 movel %a1@(16),%d3 47bc2: b680 cmpl %d0,%d3 47bc4: 6308 blss 47bce <_Watchdog_Insert+0x62> after->delta_interval -= delta_interval; 47bc6: 9680 subl %d0,%d3 47bc8: 2343 0010 movel %d3,%a1@(16) break; 47bcc: 6028 bras 47bf6 <_Watchdog_Insert+0x8a> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 47bce: 280a movel %a2,%d4 47bd0: 46c1 movew %d1,%sr 47bd2: 8881 orl %d1,%d4 47bd4: 46c4 movew %d4,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 47bd6: 9083 subl %d3,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 47bd8: 7601 moveq #1,%d3 47bda: b6a8 0008 cmpl %a0@(8),%d3 47bde: 663c bnes 47c1c <_Watchdog_Insert+0xb0> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 47be0: 2639 0005 baaa movel 5baaa <_Watchdog_Sync_level>,%d3 47be6: b483 cmpl %d3,%d2 47be8: 6408 bccs 47bf2 <_Watchdog_Insert+0x86> _Watchdog_Sync_level = insert_isr_nest_level; 47bea: 23c2 0005 baaa movel %d2,5baaa <_Watchdog_Sync_level> goto restart; 47bf0: 60be bras 47bb0 <_Watchdog_Insert+0x44> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 47bf2: 2251 moveal %a1@,%a1 } } 47bf4: 60c0 bras 47bb6 <_Watchdog_Insert+0x4a> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 47bf6: 2269 0004 moveal %a1@(4),%a1 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47bfa: 2639 0005 bb34 movel 5bb34 <_Watchdog_Ticks_since_boot>,%d3 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 47c00: 2451 moveal %a1@,%a2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 47c02: 2149 0004 movel %a1,%a0@(4) before_node = after_node->next; after_node->next = the_node; 47c06: 2288 movel %a0,%a1@ } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 47c08: 2140 0010 movel %d0,%a0@(16) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 47c0c: 7002 moveq #2,%d0 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47c0e: 2143 0014 movel %d3,%a0@(20) the_node->next = before_node; before_node->previous = the_node; 47c12: 2548 0004 movel %a0,%a2@(4) 47c16: 2140 0008 movel %d0,%a0@(8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 47c1a: 208a movel %a2,%a0@ exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 47c1c: 23c2 0005 baaa movel %d2,5baaa <_Watchdog_Sync_level> _Watchdog_Sync_count--; 47c22: 2039 0005 bb30 movel 5bb30 <_Watchdog_Sync_count>,%d0 47c28: 5380 subql #1,%d0 47c2a: 23c0 0005 bb30 movel %d0,5bb30 <_Watchdog_Sync_count> _ISR_Enable( level ); 47c30: 46c1 movew %d1,%sr } 47c32: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 47c36: 4e5e unlk %fp 47c38: 4e75 rts ... 00047d04 <_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 ); 47d04: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 47d0a: 4e56 ffe8 linkw %fp,#-24 47d0e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 47d12: 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 ); 47d16: 40c2 movew %sr,%d2 47d18: 8082 orl %d2,%d0 47d1a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 47d1c: 264c moveal %a4,%a3 47d1e: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 47d20: b7ca cmpal %a2,%a3 47d22: 674e beqs 47d72 <_Watchdog_Tickle+0x6e> * 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) { 47d24: 202a 0010 movel %a2@(16),%d0 47d28: 6708 beqs 47d32 <_Watchdog_Tickle+0x2e> the_watchdog->delta_interval--; 47d2a: 5380 subql #1,%d0 47d2c: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 47d30: 6640 bnes 47d72 <_Watchdog_Tickle+0x6e> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 47d32: 4bf9 0004 7c88 lea 47c88 <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 47d38: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 47d3e: 2f0a movel %a2,%sp@- 47d40: 4e95 jsr %a5@ _ISR_Enable( level ); 47d42: 46c2 movew %d2,%sr switch( watchdog_state ) { 47d44: 7202 moveq #2,%d1 47d46: 588f addql #4,%sp 47d48: b280 cmpl %d0,%d1 47d4a: 6610 bnes 47d5c <_Watchdog_Tickle+0x58> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 47d4c: 2f2a 0024 movel %a2@(36),%sp@- 47d50: 2f2a 0020 movel %a2@(32),%sp@- 47d54: 206a 001c moveal %a2@(28),%a0 47d58: 4e90 jsr %a0@ 47d5a: 508f addql #8,%sp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 47d5c: 2003 movel %d3,%d0 47d5e: 40c2 movew %sr,%d2 47d60: 8082 orl %d2,%d0 47d62: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 47d64: 2014 movel %a4@,%d0 47d66: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 47d68: b7c0 cmpal %d0,%a3 47d6a: 6706 beqs 47d72 <_Watchdog_Tickle+0x6e> 47d6c: 4aaa 0010 tstl %a2@(16) 47d70: 67cc beqs 47d3e <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 47d72: 46c2 movew %d2,%sr } 47d74: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47d7a: 4e5e unlk %fp 47d7c: 4e75 rts ... 0004ae84 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4ae84: 4e56 ffe4 linkw %fp,#-28 4ae88: 202e 0010 movel %fp@(16),%d0 4ae8c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4ae90: 242e 0008 movel %fp@(8),%d2 4ae94: 262e 000c movel %fp@(12),%d3 4ae98: 266e 0014 moveal %fp@(20),%a3 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4ae9c: 4a82 tstl %d2 4ae9e: 6606 bnes 4aea6 4aea0: 7003 moveq #3,%d0 4aea2: 6000 0088 braw 4af2c return RTEMS_INVALID_NAME; if ( !id ) 4aea6: 4a8b tstl %a3 4aea8: 6604 bnes 4aeae 4aeaa: 7009 moveq #9,%d0 4aeac: 607e bras 4af2c return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4aeae: 0803 0004 btst #4,%d3 4aeb2: 6710 beqs 4aec4 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4aeb4: 4a80 tstl %d0 4aeb6: 6606 bnes 4aebe 4aeb8: 103c 000a moveb #10,%d0 4aebc: 606e bras 4af2c if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4aebe: 42ae fff8 clrl %fp@(-8) 4aec2: 6006 bras 4aeca if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4aec4: 7201 moveq #1,%d1 4aec6: 2d41 fff8 movel %d1,%fp@(-8) 4aeca: 2239 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d1 4aed0: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4aed2: 2d40 fffc movel %d0,%fp@(-4) 4aed6: 23c1 0005 b9f4 movel %d1,5b9f4 <_Thread_Dispatch_disable_level> * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 4aedc: 4879 0005 bc16 pea 5bc16 <_Barrier_Information> 4aee2: 45f9 0004 6c62 lea 46c62 <_Thread_Enable_dispatch>,%a2 4aee8: 4eb9 0004 6040 jsr 46040 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4aeee: 588f addql #4,%sp 4aef0: 2840 moveal %d0,%a4 4aef2: 4a80 tstl %d0 4aef4: 6606 bnes 4aefc _Thread_Enable_dispatch(); 4aef6: 4e92 jsr %a2@ 4aef8: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4aefa: 6030 bras 4af2c } the_barrier->attribute_set = attribute_set; 4aefc: 2943 0010 movel %d3,%a4@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4af00: 486e fff8 pea %fp@(-8) 4af04: 486c 0014 pea %a4@(20) 4af08: 4eb9 0004 b348 jsr 4b348 <_CORE_barrier_Initialize> 4af0e: 202c 0008 movel %a4@(8),%d0 4af12: 4281 clrl %d1 4af14: 2079 0005 bc2e moveal 5bc2e <_Barrier_Information+0x18>,%a0 4af1a: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4af1c: 2942 000c movel %d2,%a4@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4af20: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4af24: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 4af26: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 4af28: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4af2a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4af2c: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 4af32: 4e5e unlk %fp 4af34: 4e75 rts ... 0004af38 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4af38: 4e56 fffc linkw %fp,#-4 4af3c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4af3e: 486e fffc pea %fp@(-4) 4af42: 2f2e 0008 movel %fp@(8),%sp@- 4af46: 4879 0005 bc16 pea 5bc16 <_Barrier_Information> 4af4c: 4eb9 0004 648c jsr 4648c <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4af52: 4fef 000c lea %sp@(12),%sp 4af56: 2440 moveal %d0,%a2 4af58: 4aae fffc tstl %fp@(-4) 4af5c: 6704 beqs 4af62 4af5e: 7004 moveq #4,%d0 4af60: 6038 bras 4af9a case OBJECTS_LOCAL: _CORE_barrier_Flush( 4af62: 4878 0002 pea 2 4af66: 42a7 clrl %sp@- 4af68: 486a 0014 pea %a2@(20) 4af6c: 4eb9 0004 72c0 jsr 472c0 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4af72: 2f0a movel %a2,%sp@- 4af74: 4879 0005 bc16 pea 5bc16 <_Barrier_Information> 4af7a: 4eb9 0004 60c0 jsr 460c0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4af80: 2f0a movel %a2,%sp@- 4af82: 4879 0005 bc16 pea 5bc16 <_Barrier_Information> 4af88: 4eb9 0004 6334 jsr 46334 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4af8e: 4eb9 0004 6c62 jsr 46c62 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4af94: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4af98: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af9a: 246e fff8 moveal %fp@(-8),%a2 4af9e: 4e5e unlk %fp 4afa0: 4e75 rts ... 0004afa4 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 4afa4: 4e56 fffc linkw %fp,#-4 4afa8: 2f0a movel %a2,%sp@- 4afaa: 246e 000c moveal %fp@(12),%a2 4afae: 2f02 movel %d2,%sp@- 4afb0: 242e 0008 movel %fp@(8),%d2 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4afb4: 4a8a tstl %a2 4afb6: 6604 bnes 4afbc 4afb8: 7009 moveq #9,%d0 4afba: 603e bras 4affa RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4afbc: 486e fffc pea %fp@(-4) 4afc0: 2f02 movel %d2,%sp@- 4afc2: 4879 0005 bc16 pea 5bc16 <_Barrier_Information> 4afc8: 4eb9 0004 648c jsr 4648c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4afce: 4fef 000c lea %sp@(12),%sp 4afd2: 4aae fffc tstl %fp@(-4) 4afd6: 6704 beqs 4afdc 4afd8: 7004 moveq #4,%d0 4afda: 601e bras 4affa case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 4afdc: 42a7 clrl %sp@- 4afde: 2040 moveal %d0,%a0 4afe0: 2f02 movel %d2,%sp@- 4afe2: 4868 0014 pea %a0@(20) 4afe6: 4eb9 0004 b384 jsr 4b384 <_CORE_barrier_Release> 4afec: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4afee: 4eb9 0004 6c62 jsr 46c62 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4aff4: 4fef 000c lea %sp@(12),%sp the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); 4aff8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4affa: 242e fff4 movel %fp@(-12),%d2 4affe: 246e fff8 moveal %fp@(-8),%a2 4b002: 4e5e unlk %fp 4b004: 4e75 rts ... 00046438 : uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 46438: 7218 moveq #24,%d1 4643a: 4e56 0000 linkw %fp,#0 4643e: 202e 000c movel %fp@(12),%d0 46442: 2f02 movel %d2,%sp@- 46444: 242e 0008 movel %fp@(8),%d2 46448: e3aa lsll %d1,%d2 4644a: 123c 001b moveb #27,%d1 4644e: e3a8 lsll %d1,%d0 46450: 222e 0010 movel %fp@(16),%d1 46454: 8082 orl %d2,%d0 46456: 4841 swap %d1 46458: 4241 clrw %d1 return _Objects_Build_id( api, class, node, index ); } 4645a: 241f movel %sp@+,%d2 uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 4645c: 80ae 0014 orl %fp@(20),%d0 return _Objects_Build_id( api, class, node, index ); } 46460: 4e5e unlk %fp 46462: 8081 orl %d1,%d0 46464: 4e75 rts ... 00048920 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 48920: 4e56 0000 linkw %fp,#0 48924: 202e 0008 movel %fp@(8),%d0 48928: 2f0a movel %a2,%sp@- 4892a: 246e 000c moveal %fp@(12),%a2 if ( !time_buffer ) 4892e: 4a8a tstl %a2 48930: 6604 bnes 48936 48932: 7209 moveq #9,%d1 48934: 6066 bras 4899c return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 48936: 4a80 tstl %d0 48938: 6610 bnes 4894a return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 4893a: 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; } 4893e: 246e fffc moveal %fp@(-4),%a2 48942: 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 ); 48944: 4ef9 0004 89f8 jmp 489f8 if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 4894a: 7201 moveq #1,%d1 4894c: b280 cmpl %d0,%d1 4894e: 6610 bnes 48960 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 48950: 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; } 48954: 246e fffc moveal %fp@(-4),%a2 48958: 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); 4895a: 4ef9 0004 89a8 jmp 489a8 if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 48960: 7202 moveq #2,%d1 48962: b280 cmpl %d0,%d1 48964: 6608 bnes 4896e rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 48966: 4eb9 0004 89e8 jsr 489e8 4896c: 600c bras 4897a return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 4896e: 7203 moveq #3,%d1 48970: b280 cmpl %d0,%d1 48972: 660c bnes 48980 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 48974: 4eb9 0004 89d0 jsr 489d0 4897a: 2480 movel %d0,%a2@ 4897c: 4281 clrl %d1 return RTEMS_SUCCESSFUL; 4897e: 601c bras 4899c } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 48980: 7204 moveq #4,%d1 48982: b280 cmpl %d0,%d1 48984: 6706 beqs 4898c 48986: 123c 000a moveb #10,%d1 4898a: 6010 bras 4899c return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 4898c: 2d4a 0008 movel %a2,%fp@(8) return RTEMS_INVALID_NUMBER; } 48990: 246e fffc moveal %fp@(-4),%a2 48994: 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 ); 48996: 4ef9 0004 8aac jmp 48aac return RTEMS_INVALID_NUMBER; } 4899c: 246e fffc moveal %fp@(-4),%a2 489a0: 2001 movel %d1,%d0 489a2: 4e5e unlk %fp 489a4: 4e75 rts ... 00044910 : #include #include #include rtems_interval rtems_clock_get_ticks_since_boot(void) { 44910: 4e56 0000 linkw %fp,#0 return _Watchdog_Ticks_since_boot; 44914: 2039 0005 bb34 movel 5bb34 <_Watchdog_Ticks_since_boot>,%d0 } 4491a: 4e5e unlk %fp 4491c: 4e75 rts ... 000456bc : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 456bc: 4e56 ffcc linkw %fp,#-52 456c0: 2f0a movel %a2,%sp@- 456c2: 246e 0008 moveal %fp@(8),%a2 456c6: 2f02 movel %d2,%sp@- rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 456c8: 4a8a tstl %a2 456ca: 6606 bnes 456d2 456cc: 7009 moveq #9,%d0 456ce: 6000 0092 braw 45762 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 456d2: 4a39 0006 58f8 tstb 658f8 <_TOD_Is_set> 456d8: 6606 bnes 456e0 456da: 700b moveq #11,%d0 456dc: 6000 0084 braw 45762 { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 456e0: 203c 0000 0700 movel #1792,%d0 456e6: 40c2 movew %sr,%d2 456e8: 8082 orl %d2,%d0 456ea: 46c0 movew %d0,%sr _TOD_Get( &now ); 456ec: 486e fff0 pea %fp@(-16) 456f0: 4eb9 0004 6db8 jsr 46db8 <_TOD_Get> _ISR_Enable(level); 456f6: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 456f8: 243c 0000 03e8 movel #1000,%d2 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 456fe: 486e ffcc pea %fp@(-52) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 45702: 202e fff4 movel %fp@(-12),%d0 45706: 486e fff8 pea %fp@(-8) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4570a: 2d6e fff0 fff8 movel %fp@(-16),%fp@(-8) time->tv_usec = useconds; 45710: 4c42 0800 remsl %d2,%d0,%d0 45714: 2d40 fffc movel %d0,%fp@(-4) 45718: 4eb9 0004 d580 jsr 4d580 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 4571e: 206e ffdc moveal %fp@(-36),%a0 45722: 5288 addql #1,%a0 tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 45724: 4fef 000c lea %sp@(12),%sp tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 45728: 4280 clrl %d0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 4572a: 2548 0004 movel %a0,%a2@(4) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 4572e: 206e ffe0 moveal %fp@(-32),%a0 45732: 41e8 076c lea %a0@(1900),%a0 tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 45736: 256e ffd8 0008 movel %fp@(-40),%a2@(8) tmbuf->hour = time.tm_hour; 4573c: 256e ffd4 000c movel %fp@(-44),%a2@(12) tmbuf->minute = time.tm_min; 45742: 256e ffd0 0010 movel %fp@(-48),%a2@(16) tmbuf->second = time.tm_sec; 45748: 256e ffcc 0014 movel %fp@(-52),%a2@(20) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 4574e: 2488 movel %a0,%a2@ tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 45750: 242e fffc movel %fp@(-4),%d2 45754: 41f9 0005 c400 lea 5c400 ,%a0 4575a: 4c50 2002 remul %a0@,%d2,%d2 4575e: 2542 0018 movel %d2,%a2@(24) rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 45762: 242e ffc4 movel %fp@(-60),%d2 45766: 246e ffc8 moveal %fp@(-56),%a2 4576a: 4e5e unlk %fp 4576c: 4e75 rts ... 0004493c : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 4493c: 4e56 0000 linkw %fp,#0 _TOD_Tickle_ticks(); 44940: 4eb9 0004 5c30 jsr 45c30 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 44946: 4879 0005 bacc pea 5bacc <_Watchdog_Ticks_chain> 4494c: 4eb9 0004 7d04 jsr 47d04 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 44952: 4eb9 0004 77bc jsr 477bc <_Thread_Tickle_timeslice> if ( _Thread_Is_context_switch_necessary() && 44958: 588f addql #4,%sp * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 4495a: 1039 0005 babe moveb 5babe <_Context_Switch_necessary>,%d0 44960: 670e beqs 44970 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 44962: 2039 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d0 44968: 6606 bnes 44970 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 4496a: 4eb9 0004 6b10 jsr 46b10 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 44970: 4280 clrl %d0 44972: 4e5e unlk %fp 44974: 4e75 rts ... 000497d4 : * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 497d4: 4e56 0000 linkw %fp,#0 497d8: 202e 0008 movel %fp@(8),%d0 return (_Debug_Level & level) ? true : false; } 497dc: 4e5e unlk %fp * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 497de: c0b9 0005 bab2 andl 5bab2 <_Debug_Level>,%d0 497e4: 56c0 sne %d0 return (_Debug_Level & level) ? true : false; } 497e6: 4480 negl %d0 497e8: 4e75 rts ... 00044978 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 44978: 4e56 0000 linkw %fp,#0 4497c: 202e 0008 movel %fp@(8),%d0 44980: 206e 0014 moveal %fp@(20),%a0 RTEMS_API_Control *api; if ( !event_out ) 44984: 4a88 tstl %a0 44986: 6604 bnes 4498c 44988: 7009 moveq #9,%d0 4498a: 6046 bras 449d2 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 4498c: 2279 0005 baae moveal 5baae <_Thread_Executing>,%a1 44992: 2269 0108 moveal %a1@(264),%a1 if ( _Event_sets_Is_empty( event_in ) ) { 44996: 4a80 tstl %d0 44998: 6604 bnes 4499e *event_out = api->pending_events; 4499a: 2091 movel %a1@,%a0@ return RTEMS_SUCCESSFUL; 4499c: 6034 bras 449d2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4499e: 2239 0005 b9f4 movel 5b9f4 <_Thread_Dispatch_disable_level>,%d1 449a4: 5281 addql #1,%d1 449a6: 23c1 0005 b9f4 movel %d1,5b9f4 <_Thread_Dispatch_disable_level> } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 449ac: 2f08 movel %a0,%sp@- 449ae: 2f2e 0010 movel %fp@(16),%sp@- 449b2: 2f2e 000c movel %fp@(12),%sp@- 449b6: 2f00 movel %d0,%sp@- 449b8: 4eb9 0004 49d8 jsr 449d8 <_Event_Seize> _Thread_Enable_dispatch(); 449be: 4eb9 0004 6c62 jsr 46c62 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 449c4: 2079 0005 baae moveal 5baae <_Thread_Executing>,%a0 449ca: 4fef 0010 lea %sp@(16),%sp 449ce: 2028 0034 movel %a0@(52),%d0 } 449d2: 4e5e unlk %fp 449d4: 4e75 rts ... 00046fe0 : #endif #include const char *rtems_get_version_string(void) { 46fe0: 4e56 0000 linkw %fp,#0 return _RTEMS_version; } 46fe4: 203c 0005 cc42 movel #379970,%d0 46fea: 4e5e unlk %fp 46fec: 4e75 rts ... 00044cb8 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 44cb8: 4e56 0000 linkw %fp,#0 44cbc: 222e 0008 movel %fp@(8),%d1 44cc0: 202e 000c movel %fp@(12),%d0 44cc4: 206e 0010 moveal %fp@(16),%a0 if ( !_ISR_Is_vector_number_valid( vector ) ) 44cc8: 0c80 0000 00ff cmpil #255,%d0 44cce: 6304 blss 44cd4 44cd0: 700a moveq #10,%d0 44cd2: 601e bras 44cf2 return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 44cd4: 4a81 tstl %d1 44cd6: 6718 beqs 44cf0 return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 44cd8: 4a88 tstl %a0 44cda: 6714 beqs 44cf0 return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 44cdc: 2f08 movel %a0,%sp@- 44cde: 2f01 movel %d1,%sp@- 44ce0: 2f00 movel %d0,%sp@- 44ce2: 4eb9 0004 7f4a jsr 47f4a <_CPU_ISR_install_vector> vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44ce8: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 44cec: 4280 clrl %d0 vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44cee: 6002 bras 44cf2 44cf0: 7009 moveq #9,%d0 } 44cf2: 4e5e unlk %fp 44cf4: 4e75 rts ... 0004527c : rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); } 4527c: 7007 moveq #7,%d0 uint32_t rtems_interrupt_mask = RTEMS_INTERRUPT_MASK; rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { 4527e: 4e56 0000 linkw %fp,#0 return RTEMS_INTERRUPT_LEVEL(level); } 45282: c0ae 0008 andl %fp@(8),%d0 45286: 4e5e unlk %fp 45288: 4e75 rts ... 00046d44 : 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 ) { 46d44: 4e56 0000 linkw %fp,#0 46d48: 206e 000c moveal %fp@(12),%a0 46d4c: 2f0a movel %a2,%sp@- 46d4e: 226e 0010 moveal %fp@(16),%a1 46d52: 2f02 movel %d2,%sp@- 46d54: 242e 0008 movel %fp@(8),%d2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 46d58: 2039 0006 0f82 movel 60f82 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 46d5e: 2239 0006 0dd6 movel 60dd6 <_ISR_Nest_level>,%d1 46d64: 6706 beqs 46d6c 46d66: 7012 moveq #18,%d0 46d68: 6000 00d6 braw 46e40 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 46d6c: 4a89 tstl %a1 46d6e: 6700 00ce beqw 46e3e return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 46d72: 2280 movel %d0,%a1@ if ( driver_table == NULL ) 46d74: 4a88 tstl %a0 46d76: 6700 00c6 beqw 46e3e static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46d7a: 4a90 tstl %a0@ 46d7c: 6600 00ce bnew 46e4c 46d80: 4aa8 0004 tstl %a0@(4) 46d84: 6600 00c6 bnew 46e4c 46d88: 6000 00b4 braw 46e3e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46d8c: 2039 0006 0d3c movel 60d3c <_Thread_Dispatch_disable_level>,%d0 46d92: 5280 addql #1,%d0 46d94: 23c0 0006 0d3c movel %d0,60d3c <_Thread_Dispatch_disable_level> if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 46d9a: 4a82 tstl %d2 46d9c: 662c bnes 46dca static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 46d9e: 2039 0006 0f82 movel 60f82 <_IO_Number_of_drivers>,%d0 46da4: 2479 0006 0f86 moveal 60f86 <_IO_Driver_address_table>,%a2 46daa: 6010 bras 46dbc static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46dac: 4a92 tstl %a2@ 46dae: 6600 00a6 bnew 46e56 46db2: 4aaa 0004 tstl %a2@(4) 46db6: 6600 009e bnew 46e56 46dba: 6004 bras 46dc0 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 ) { 46dbc: b082 cmpl %d2,%d0 46dbe: 62ec bhis 46dac if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 46dc0: 2282 movel %d2,%a1@ if ( m != n ) 46dc2: b082 cmpl %d2,%d0 46dc4: 6634 bnes 46dfa 46dc6: 6000 0098 braw 46e60 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 46dca: 2202 movel %d2,%d1 46dcc: 2002 movel %d2,%d0 46dce: e789 lsll #3,%d1 46dd0: eb88 lsll #5,%d0 46dd2: 2479 0006 0f86 moveal 60f86 <_IO_Driver_address_table>,%a2 46dd8: 9081 subl %d1,%d0 46dda: 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; 46ddc: 4a92 tstl %a2@ 46dde: 660e bnes 46dee 46de0: 4aaa 0004 tstl %a2@(4) 46de4: 57c0 seq %d0 46de6: 49c0 extbl %d0 46de8: 4480 negl %d0 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 46dea: 4a00 tstb %d0 46dec: 660a bnes 46df8 _Thread_Enable_dispatch(); 46dee: 4eb9 0004 85f2 jsr 485f2 <_Thread_Enable_dispatch> 46df4: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 46df6: 6048 bras 46e40 } *registered_major = major; 46df8: 2282 movel %d2,%a1@ } _IO_Driver_address_table [major] = *driver_table; 46dfa: 4878 0018 pea 18 46dfe: 2202 movel %d2,%d1 46e00: 2002 movel %d2,%d0 46e02: e789 lsll #3,%d1 46e04: eb88 lsll #5,%d0 46e06: 2f08 movel %a0,%sp@- 46e08: 9081 subl %d1,%d0 46e0a: d0b9 0006 0f86 addl 60f86 <_IO_Driver_address_table>,%d0 46e10: 2f00 movel %d0,%sp@- 46e12: 4eb9 0005 0b9c jsr 50b9c _Thread_Enable_dispatch(); 46e18: 4eb9 0004 85f2 jsr 485f2 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 46e1e: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e22: 4fef 000c lea %sp@(12),%sp 46e26: 2d42 0008 movel %d2,%fp@(8) } 46e2a: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e2e: 42ae 0010 clrl %fp@(16) 46e32: 42ae 000c clrl %fp@(12) } 46e36: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e38: 4ef9 0004 e090 jmp 4e090 46e3e: 7009 moveq #9,%d0 } 46e40: 242e fff8 movel %fp@(-8),%d2 46e44: 246e fffc moveal %fp@(-4),%a2 46e48: 4e5e unlk %fp 46e4a: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 46e4c: b082 cmpl %d2,%d0 46e4e: 6200 ff3c bhiw 46d8c 46e52: 700a moveq #10,%d0 46e54: 60ea bras 46e40 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 ) { 46e56: 5282 addql #1,%d2 46e58: 45ea 0018 lea %a2@(24),%a2 46e5c: 6000 ff5e braw 46dbc if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 46e60: 4eb9 0004 85f2 jsr 485f2 <_Thread_Enable_dispatch> 46e66: 7005 moveq #5,%d0 return sc; 46e68: 60d6 bras 46e40 ... 00046e6c : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 46e6c: 4e56 0000 linkw %fp,#0 46e70: 222e 0008 movel %fp@(8),%d1 if ( rtems_interrupt_is_in_progress() ) 46e74: 2039 0006 0dd6 movel 60dd6 <_ISR_Nest_level>,%d0 46e7a: 6704 beqs 46e80 46e7c: 7012 moveq #18,%d0 46e7e: 6042 bras 46ec2 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 46e80: b2b9 0006 0f82 cmpl 60f82 <_IO_Number_of_drivers>,%d1 46e86: 6504 bcss 46e8c 46e88: 700d moveq #13,%d0 46e8a: 6036 bras 46ec2 46e8c: 2039 0006 0d3c movel 60d3c <_Thread_Dispatch_disable_level>,%d0 46e92: 5280 addql #1,%d0 46e94: 23c0 0006 0d3c movel %d0,60d3c <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); memset( 46e9a: 2001 movel %d1,%d0 46e9c: 4878 0018 pea 18 46ea0: e789 lsll #3,%d1 46ea2: eb88 lsll #5,%d0 46ea4: 42a7 clrl %sp@- 46ea6: 9081 subl %d1,%d0 46ea8: d0b9 0006 0f86 addl 60f86 <_IO_Driver_address_table>,%d0 46eae: 2f00 movel %d0,%sp@- 46eb0: 4eb9 0005 0c0c jsr 50c0c &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46eb6: 4eb9 0004 85f2 jsr 485f2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46ebc: 4fef 000c lea %sp@(12),%sp memset( &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46ec0: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 46ec2: 4e5e unlk %fp 46ec4: 4e75 rts ... 00047338 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 47338: 4e56 fff0 linkw %fp,#-16 4733c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47340: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 47344: 4a8c tstl %a4 47346: 6740 beqs 47388 47348: 45f9 0006 58a0 lea 658a0 <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 4734e: 2052 moveal %a2@,%a0 47350: 4a88 tstl %a0 47352: 672a beqs 4737e continue; information = _Objects_Information_table[ api_index ][ 1 ]; 47354: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 47358: 4a8b tstl %a3 4735a: 6722 beqs 4737e 4735c: 7401 moveq #1,%d2 4735e: 6014 bras 47374 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 47360: 206b 0018 moveal %a3@(24),%a0 47364: 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++ ) { 47368: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 4736a: 4a80 tstl %d0 4736c: 6706 beqs 47374 continue; (*routine)(the_thread); 4736e: 2f00 movel %d0,%sp@- 47370: 4e94 jsr %a4@ 47372: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 47374: 4280 clrl %d0 47376: 302b 000e movew %a3@(14),%d0 4737a: b082 cmpl %d2,%d0 4737c: 64e2 bccs 47360 4737e: 588a addql #4,%a2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 47380: b5fc 0006 58b0 cmpal #415920,%a2 47386: 66c6 bnes 4734e (*routine)(the_thread); } } } 47388: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4738e: 4e5e unlk %fp 47390: 4e75 rts ... 0004ed98 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 4ed98: 4e56 fff0 linkw %fp,#-16 4ed9c: 48d7 001c moveml %d2-%d4,%sp@ 4eda0: 262e 0008 movel %fp@(8),%d3 4eda4: 242e 000c movel %fp@(12),%d2 4eda8: 282e 0014 movel %fp@(20),%d4 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 4edac: 4a82 tstl %d2 4edae: 6752 beqs 4ee02 return RTEMS_INVALID_ADDRESS; if ( !count ) 4edb0: 4a84 tstl %d4 4edb2: 674e beqs 4ee02 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4edb4: 486e fffc pea %fp@(-4) 4edb8: 2f03 movel %d3,%sp@- 4edba: 4879 0007 41ea pea 741ea <_Message_queue_Information> 4edc0: 4eb9 0005 366c jsr 5366c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4edc6: 4fef 000c lea %sp@(12),%sp 4edca: 4aae fffc tstl %fp@(-4) 4edce: 6704 beqs 4edd4 4edd0: 7004 moveq #4,%d0 4edd2: 6030 bras 4ee04 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 4edd4: 2f04 movel %d4,%sp@- 4edd6: 2040 moveal %d0,%a0 4edd8: 42a7 clrl %sp@- 4edda: 2f03 movel %d3,%sp@- 4eddc: 2f2e 0010 movel %fp@(16),%sp@- 4ede0: 2f02 movel %d2,%sp@- 4ede2: 4868 0014 pea %a0@(20) 4ede6: 4eb9 0005 202c jsr 5202c <_CORE_message_queue_Broadcast> 4edec: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 4edee: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 4edf4: 2f02 movel %d2,%sp@- 4edf6: 4eb9 0004 f11c jsr 4f11c <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 4edfc: 4fef 001c lea %sp@(28),%sp 4ee00: 6002 bras 4ee04 4ee02: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ee04: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ee0a: 4e5e unlk %fp 4ee0c: 4e75 rts ... 0004ca78 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 4ca78: 4e56 ffe0 linkw %fp,#-32 4ca7c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ca80: 242e 0008 movel %fp@(8),%d2 4ca84: 262e 000c movel %fp@(12),%d3 4ca88: 282e 0010 movel %fp@(16),%d4 4ca8c: 2a2e 0014 movel %fp@(20),%d5 4ca90: 286e 0018 moveal %fp@(24),%a4 CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 4ca94: 4a82 tstl %d2 4ca96: 6606 bnes 4ca9e 4ca98: 7003 moveq #3,%d0 4ca9a: 6000 00a4 braw 4cb40 return RTEMS_INVALID_NAME; if ( !id ) 4ca9e: 4a8c tstl %a4 4caa0: 6606 bnes 4caa8 4caa2: 7009 moveq #9,%d0 4caa4: 6000 009a braw 4cb40 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 4caa8: 4a83 tstl %d3 4caaa: 6606 bnes 4cab2 4caac: 700a moveq #10,%d0 4caae: 6000 0090 braw 4cb40 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 4cab2: 4a84 tstl %d4 4cab4: 6606 bnes 4cabc 4cab6: 7008 moveq #8,%d0 4cab8: 6000 0086 braw 4cb40 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4cabc: 2039 0006 4e78 movel 64e78 <_Thread_Dispatch_disable_level>,%d0 4cac2: 5280 addql #1,%d0 4cac4: 23c0 0006 4e78 movel %d0,64e78 <_Thread_Dispatch_disable_level> #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 4caca: 4eb9 0005 18f8 jsr 518f8 <_Message_queue_Allocate> 4cad0: 2440 moveal %d0,%a2 if ( !the_message_queue ) { 4cad2: 4a80 tstl %d0 4cad4: 660a bnes 4cae0 _Thread_Enable_dispatch(); 4cad6: 4eb9 0004 f2c6 jsr 4f2c6 <_Thread_Enable_dispatch> 4cadc: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4cade: 6060 bras 4cb40 #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4cae0: 204e moveal %fp,%a0 4cae2: 47f9 0004 f2c6 lea 4f2c6 <_Thread_Enable_dispatch>,%a3 4cae8: 44c5 movew %d5,%ccr 4caea: 56c0 sne %d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 4caec: 2545 0010 movel %d5,%a2@(16) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4caf0: 49c0 extbl %d0 4caf2: 5280 addql #1,%d0 4caf4: 2100 movel %d0,%a0@- else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 4caf6: 2f04 movel %d4,%sp@- 4caf8: 2f03 movel %d3,%sp@- 4cafa: 2f08 movel %a0,%sp@- 4cafc: 486a 0014 pea %a2@(20) 4cb00: 4eb9 0004 dbd4 jsr 4dbd4 <_CORE_message_queue_Initialize> 4cb06: 4fef 0010 lea %sp@(16),%sp 4cb0a: 4a00 tstb %d0 4cb0c: 6616 bnes 4cb24 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4cb0e: 2f0a movel %a2,%sp@- 4cb10: 4879 0006 504e pea 6504e <_Message_queue_Information> 4cb16: 4eb9 0004 e898 jsr 4e898 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cb1c: 4e93 jsr %a3@ return RTEMS_UNSATISFIED; 4cb1e: 508f addql #8,%sp _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cb20: 700d moveq #13,%d0 return RTEMS_UNSATISFIED; 4cb22: 601c bras 4cb40 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cb24: 202a 0008 movel %a2@(8),%d0 4cb28: 4281 clrl %d1 4cb2a: 2079 0006 5066 moveal 65066 <_Message_queue_Information+0x18>,%a0 4cb30: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cb32: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cb36: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 4cb3a: 2880 movel %d0,%a4@ name, 0 ); #endif _Thread_Enable_dispatch(); 4cb3c: 4e93 jsr %a3@ 4cb3e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cb40: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4cb46: 4e5e unlk %fp 4cb48: 4e75 rts ... 0004f280 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 4f280: 4e56 fffc linkw %fp,#-4 4f284: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4f286: 486e fffc pea %fp@(-4) 4f28a: 2f2e 0008 movel %fp@(8),%sp@- 4f28e: 4879 0006 717a pea 6717a <_Message_queue_Information> 4f294: 4eb9 0004 9dc4 jsr 49dc4 <_Objects_Get> register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4f29a: 4fef 000c lea %sp@(12),%sp 4f29e: 2440 moveal %d0,%a2 4f2a0: 4aae fffc tstl %fp@(-4) 4f2a4: 6704 beqs 4f2aa 4f2a6: 7004 moveq #4,%d0 4f2a8: 6038 bras 4f2e2 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 4f2aa: 2f00 movel %d0,%sp@- 4f2ac: 4879 0006 717a pea 6717a <_Message_queue_Information> 4f2b2: 4eb9 0004 99f8 jsr 499f8 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 4f2b8: 4878 0005 pea 5 4f2bc: 42a7 clrl %sp@- 4f2be: 486a 0014 pea %a2@(20) 4f2c2: 4eb9 0004 f86c jsr 4f86c <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4f2c8: 2f0a movel %a2,%sp@- 4f2ca: 4879 0006 717a pea 6717a <_Message_queue_Information> 4f2d0: 4eb9 0004 9c6c jsr 49c6c <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4f2d6: 4eb9 0004 a696 jsr 4a696 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4f2dc: 4fef 001c lea %sp@(28),%sp 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4f2e0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4f2e2: 246e fff8 moveal %fp@(-8),%a2 4f2e6: 4e5e unlk %fp 4f2e8: 4e75 rts ... 0004efa4 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 4efa4: 4e56 fffc linkw %fp,#-4 4efa8: 2f0a movel %a2,%sp@- 4efaa: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4efae: 4a8a tstl %a2 4efb0: 6604 bnes 4efb6 4efb2: 7009 moveq #9,%d0 4efb4: 6030 bras 4efe6 4efb6: 486e fffc pea %fp@(-4) 4efba: 2f2e 0008 movel %fp@(8),%sp@- 4efbe: 4879 0007 41ea pea 741ea <_Message_queue_Information> 4efc4: 4eb9 0005 366c jsr 5366c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4efca: 4fef 000c lea %sp@(12),%sp 4efce: 4aae fffc tstl %fp@(-4) 4efd2: 6704 beqs 4efd8 4efd4: 7004 moveq #4,%d0 4efd6: 600e bras 4efe6 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 4efd8: 2040 moveal %d0,%a0 4efda: 24a8 005c movel %a0@(92),%a2@ _Thread_Enable_dispatch(); 4efde: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> 4efe4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4efe6: 246e fff8 moveal %fp@(-8),%a2 4efea: 4e5e unlk %fp 4efec: 4e75 rts ... 0004cb4c : rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { 4cb4c: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( 4cb50: 2f2e 0010 movel %fp@(16),%sp@- 4cb54: 2f2e 000c movel %fp@(12),%sp@- 4cb58: 2f2e 0008 movel %fp@(8),%sp@- 4cb5c: 4879 0006 504e pea 6504e <_Message_queue_Information> 4cb62: 4eb9 0004 eb54 jsr 4eb54 <_Objects_Name_to_id_u32> 4cb68: 41f9 0006 26e0 lea 626e0 <_Status_Object_name_errors_to_status>,%a0 node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4cb6e: 4e5e unlk %fp 4cb70: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4cb74: 4e75 rts ... 0004cb78 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 4cb78: 4e56 fff0 linkw %fp,#-16 4cb7c: 48d7 001c moveml %d2-%d4,%sp@ 4cb80: 242e 000c movel %fp@(12),%d2 4cb84: 262e 0010 movel %fp@(16),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 4cb88: 4a82 tstl %d2 4cb8a: 6766 beqs 4cbf2 return RTEMS_INVALID_ADDRESS; if ( !size ) 4cb8c: 4a83 tstl %d3 4cb8e: 6762 beqs 4cbf2 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4cb90: 486e fffc pea %fp@(-4) 4cb94: 2f2e 0008 movel %fp@(8),%sp@- 4cb98: 4879 0006 504e pea 6504e <_Message_queue_Information> 4cb9e: 4eb9 0004 e9f0 jsr 4e9f0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4cba4: 4fef 000c lea %sp@(12),%sp 4cba8: 4aae fffc tstl %fp@(-4) 4cbac: 6704 beqs 4cbb2 4cbae: 7004 moveq #4,%d0 4cbb0: 6042 bras 4cbf4 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 4cbb2: 7201 moveq #1,%d1 4cbb4: 7801 moveq #1,%d4 4cbb6: 2040 moveal %d0,%a0 4cbb8: c2ae 0014 andl %fp@(20),%d1 4cbbc: 2f2e 0018 movel %fp@(24),%sp@- 4cbc0: b384 eorl %d1,%d4 4cbc2: 2f04 movel %d4,%sp@- 4cbc4: 2f03 movel %d3,%sp@- 4cbc6: 2f02 movel %d2,%sp@- 4cbc8: 2f28 0008 movel %a0@(8),%sp@- 4cbcc: 4868 0014 pea %a0@(20) 4cbd0: 4eb9 0004 dc88 jsr 4dc88 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 4cbd6: 4eb9 0004 f2c6 jsr 4f2c6 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 4cbdc: 2079 0006 4f32 moveal 64f32 <_Thread_Executing>,%a0 4cbe2: 2f28 0034 movel %a0@(52),%sp@- 4cbe6: 4eb9 0004 cc78 jsr 4cc78 <_Message_queue_Translate_core_message_queue_return_code> 4cbec: 4fef 001c lea %sp@(28),%sp 4cbf0: 6002 bras 4cbf4 4cbf2: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cbf4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cbfa: 4e5e unlk %fp 4cbfc: 4e75 rts ... 000464c8 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 464c8: 4e56 0000 linkw %fp,#0 const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 464cc: 203c 0005 cda8 movel #380328,%d0 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 464d2: 2f02 movel %d2,%sp@- 464d4: 222e 0008 movel %fp@(8),%d1 const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 464d8: 7401 moveq #1,%d2 464da: b481 cmpl %d1,%d2 464dc: 6714 beqs 464f2 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 464de: 143c 0002 moveb #2,%d2 464e2: 203c 0005 bcf8 movel #376056,%d0 464e8: b481 cmpl %d1,%d2 464ea: 6622 bnes 4650e 464ec: 203c 0005 cdc0 movel #380352,%d0 else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 464f2: 2f2e 000c movel %fp@(12),%sp@- 464f6: 2f00 movel %d0,%sp@- 464f8: 4eb9 0004 a900 jsr 4a900 if ( class_assoc ) 464fe: 508f addql #8,%sp else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 46500: 2040 moveal %d0,%a0 if ( class_assoc ) 46502: 203c 0005 bd00 movel #376064,%d0 46508: 4a88 tstl %a0 4650a: 6702 beqs 4650e return class_assoc->name; 4650c: 2010 movel %a0@,%d0 return "BAD CLASS"; } 4650e: 242e fffc movel %fp@(-4),%d2 46512: 4e5e unlk %fp 46514: 4e75 rts ... 00046578 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 46578: 4e56 0000 linkw %fp,#0 4657c: 2f0a movel %a2,%sp@- 4657e: 246e 0010 moveal %fp@(16),%a2 46582: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 46584: 4a8a tstl %a2 46586: 6604 bnes 4658c 46588: 7009 moveq #9,%d0 4658a: 6052 bras 465de return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 4658c: 2f2e 000c movel %fp@(12),%sp@- 46590: 2f2e 0008 movel %fp@(8),%sp@- 46594: 4eb9 0004 7e30 jsr 47e30 <_Objects_Get_information> if ( !obj_info ) 4659a: 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 ); 4659c: 2040 moveal %d0,%a0 if ( !obj_info ) 4659e: 4a80 tstl %d0 465a0: 6604 bnes 465a6 465a2: 700a moveq #10,%d0 465a4: 6038 bras 465de return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 465a6: 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; 465aa: 4282 clrl %d2 465ac: 7001 moveq #1,%d0 465ae: 4281 clrl %d1 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 465b0: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 465b6: 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; 465ba: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 465c0: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 465c4: 600e bras 465d4 if ( !obj_info->local_table[i] ) 465c6: 2268 0018 moveal %a0@(24),%a1 465ca: 4ab1 0c00 tstl %a1@(00000000,%d0:l:4) 465ce: 6602 bnes 465d2 unallocated++; 465d0: 5281 addql #1,%d1 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++ ) 465d2: 5280 addql #1,%d0 465d4: b480 cmpl %d0,%d2 465d6: 64ee bccs 465c6 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 465d8: 2541 000e movel %d1,%a2@(14) 465dc: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 465de: 242e fff8 movel %fp@(-8),%d2 465e2: 246e fffc moveal %fp@(-4),%a2 465e6: 4e5e unlk %fp 465e8: 4e75 rts ... 000465f8 : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; } 465f8: 7004 moveq #4,%d0 #include #include #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { 465fa: 4e56 0000 linkw %fp,#0 return OBJECTS_ITRON_API; } 465fe: 4e5e unlk %fp 46600: 4e75 rts ... 00046604 : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } 46604: 7001 moveq #1,%d0 #include #include #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { 46606: 4e56 0000 linkw %fp,#0 return OBJECTS_INTERNAL_API; } 4660a: 4e5e unlk %fp 4660c: 4e75 rts ... 00046610 : #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 46610: 4280 clrl %d0 return _Objects_Get_API( id ); } 46612: 7207 moveq #7,%d1 #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 46614: 4e56 0000 linkw %fp,#0 46618: 102e 0008 moveb %fp@(8),%d0 return _Objects_Get_API( id ); } 4661c: 4e5e unlk %fp 4661e: c081 andl %d1,%d0 46620: 4e75 rts ... 00046634 : int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); } 46634: 4280 clrl %d0 #undef rtems_object_id_get_index int rtems_object_id_get_index( rtems_id id ) { 46636: 4e56 0000 linkw %fp,#0 return _Objects_Get_index( id ); } 4663a: 302e 000a movew %fp@(10),%d0 4663e: 4e5e unlk %fp 46640: 4e75 rts ... 00046644 : int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } 46644: 4280 clrl %d0 #undef rtems_object_id_get_node int rtems_object_id_get_node( rtems_id id ) { 46646: 4e56 0000 linkw %fp,#0 return _Objects_Get_node( id ); } 4664a: 102e 0009 moveb %fp@(9),%d0 4664e: 4e5e unlk %fp 46650: 4e75 rts ... 0004f28c : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 4f28c: 4e56 fffc linkw %fp,#-4 4f290: 2f0b movel %a3,%sp@- 4f292: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4f294: 486e fffc pea %fp@(-4) 4f298: 2f2e 0008 movel %fp@(8),%sp@- 4f29c: 4879 0007 3e94 pea 73e94 <_Partition_Information> 4f2a2: 4eb9 0005 366c jsr 5366c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4f2a8: 4fef 000c lea %sp@(12),%sp 4f2ac: 2440 moveal %d0,%a2 4f2ae: 4aae fffc tstl %fp@(-4) 4f2b2: 6704 beqs 4f2b8 4f2b4: 7004 moveq #4,%d0 4f2b6: 6036 bras 4f2ee 4f2b8: 47f9 0005 3ec6 lea 53ec6 <_Thread_Enable_dispatch>,%a3 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 4f2be: 4aaa 0020 tstl %a2@(32) 4f2c2: 6626 bnes 4f2ea _Objects_Close( &_Partition_Information, &the_partition->Object ); 4f2c4: 2f00 movel %d0,%sp@- 4f2c6: 4879 0007 3e94 pea 73e94 <_Partition_Information> 4f2cc: 4eb9 0005 3268 jsr 53268 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4f2d2: 2f0a movel %a2,%sp@- 4f2d4: 4879 0007 3e94 pea 73e94 <_Partition_Information> 4f2da: 4eb9 0005 34dc jsr 534dc <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4f2e0: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 4f2e2: 4fef 0010 lea %sp@(16),%sp 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4f2e6: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4f2e8: 6004 bras 4f2ee } _Thread_Enable_dispatch(); 4f2ea: 4e93 jsr %a3@ 4f2ec: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4f2ee: 246e fff4 moveal %fp@(-12),%a2 4f2f2: 266e fff8 moveal %fp@(-8),%a3 4f2f6: 4e5e unlk %fp 4f2f8: 4e75 rts ... 0004f364 : rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { 4f364: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); 4f368: 2f2e 0010 movel %fp@(16),%sp@- 4f36c: 2f2e 000c movel %fp@(12),%sp@- 4f370: 2f2e 0008 movel %fp@(8),%sp@- 4f374: 4879 0007 3e94 pea 73e94 <_Partition_Information> 4f37a: 4eb9 0005 3854 jsr 53854 <_Objects_Name_to_id_u32> 4f380: 41f9 0006 d560 lea 6d560 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 4f386: 4e5e unlk %fp 4f388: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4f38c: 4e75 rts ... 0004f390 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 4f390: 4e56 fffc linkw %fp,#-4 4f394: 2f0a movel %a2,%sp@- 4f396: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4f398: 486e fffc pea %fp@(-4) 4f39c: 2f2e 0008 movel %fp@(8),%sp@- 4f3a0: 4879 0007 3e94 pea 73e94 <_Partition_Information> 4f3a6: 242e 000c movel %fp@(12),%d2 4f3aa: 4eb9 0005 366c jsr 5366c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4f3b0: 4fef 000c lea %sp@(12),%sp 4f3b4: 2440 moveal %d0,%a2 4f3b6: 4aae fffc tstl %fp@(-4) 4f3ba: 6704 beqs 4f3c0 4f3bc: 7004 moveq #4,%d0 4f3be: 603c bras 4f3fc ) { void *starting; void *ending; starting = the_partition->starting_address; 4f3c0: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 4f3c4: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 4f3c8: b082 cmpl %d2,%d0 4f3ca: 623c bhis 4f408 4f3cc: d280 addl %d0,%d1 4f3ce: b282 cmpl %d2,%d1 4f3d0: 6536 bcss 4f408 return ( 4f3d2: 2202 movel %d2,%d1 4f3d4: 9280 subl %d0,%d1 4f3d6: 2001 movel %d1,%d0 4f3d8: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 4f3de: 4a81 tstl %d1 4f3e0: 6626 bnes 4f408 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4f3e2: 2f02 movel %d2,%sp@- 4f3e4: 486a 0024 pea %a2@(36) 4f3e8: 4eb9 0005 1f80 jsr 51f80 <_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; 4f3ee: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 4f3f2: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4f3f8: 508f addql #8,%sp case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); 4f3fa: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4f3fc: 242e fff4 movel %fp@(-12),%d2 4f400: 246e fff8 moveal %fp@(-8),%a2 4f404: 4e5e unlk %fp 4f406: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4f408: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> 4f40e: 7009 moveq #9,%d0 return RTEMS_INVALID_ADDRESS; 4f410: 60ea bras 4f3fc ... 0004e8c4 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 4e8c4: 4e56 fffc linkw %fp,#-4 4e8c8: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e8ca: 486e fffc pea %fp@(-4) 4e8ce: 2f2e 0008 movel %fp@(8),%sp@- 4e8d2: 4879 0007 3e5c pea 73e5c <_Dual_ported_memory_Information> 4e8d8: 4eb9 0005 366c jsr 5366c <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e8de: 4fef 000c lea %sp@(12),%sp 4e8e2: 2400 movel %d0,%d2 4e8e4: 4aae fffc tstl %fp@(-4) 4e8e8: 6704 beqs 4e8ee 4e8ea: 7004 moveq #4,%d0 4e8ec: 6028 bras 4e916 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 4e8ee: 2f00 movel %d0,%sp@- 4e8f0: 4879 0007 3e5c pea 73e5c <_Dual_ported_memory_Information> 4e8f6: 4eb9 0005 3268 jsr 53268 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 4e8fc: 2f02 movel %d2,%sp@- 4e8fe: 4879 0007 3e5c pea 73e5c <_Dual_ported_memory_Information> 4e904: 4eb9 0005 34dc jsr 534dc <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e90a: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e910: 4fef 0010 lea %sp@(16),%sp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e914: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e916: 242e fff8 movel %fp@(-8),%d2 4e91a: 4e5e unlk %fp 4e91c: 4e75 rts ... 0004e920 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 4e920: 4e56 fffc linkw %fp,#-4 4e924: 2f0a movel %a2,%sp@- 4e926: 246e 0010 moveal %fp@(16),%a2 4e92a: 2f02 movel %d2,%sp@- 4e92c: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 4e930: 4a8a tstl %a2 4e932: 6604 bnes 4e938 4e934: 7009 moveq #9,%d0 4e936: 6042 bras 4e97a RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e938: 486e fffc pea %fp@(-4) 4e93c: 2f2e 0008 movel %fp@(8),%sp@- 4e940: 4879 0007 3e5c pea 73e5c <_Dual_ported_memory_Information> 4e946: 4eb9 0005 366c jsr 5366c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e94c: 4fef 000c lea %sp@(12),%sp 4e950: 2040 moveal %d0,%a0 4e952: 4aae fffc tstl %fp@(-4) 4e956: 6704 beqs 4e95c 4e958: 7004 moveq #4,%d0 4e95a: 601e bras 4e97a case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 4e95c: 2002 movel %d2,%d0 4e95e: 90a8 0014 subl %a0@(20),%d0 if ( ending > the_port->length ) 4e962: b0a8 0018 cmpl %a0@(24),%d0 4e966: 6304 blss 4e96c *internal = external; 4e968: 2482 movel %d2,%a2@ 4e96a: 6006 bras 4e972 else *internal = _Addresses_Add_offset( the_port->internal_base, 4e96c: d0a8 0010 addl %a0@(16),%d0 4e970: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4e972: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> 4e978: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e97a: 242e fff4 movel %fp@(-12),%d2 4e97e: 246e fff8 moveal %fp@(-8),%a2 4e982: 4e5e unlk %fp 4e984: 4e75 rts ... 0004e9b0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 4e9b0: 4e56 fffc linkw %fp,#-4 4e9b4: 2f0a movel %a2,%sp@- 4e9b6: 246e 0010 moveal %fp@(16),%a2 4e9ba: 2f02 movel %d2,%sp@- 4e9bc: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 4e9c0: 4a8a tstl %a2 4e9c2: 6604 bnes 4e9c8 4e9c4: 7009 moveq #9,%d0 4e9c6: 6042 bras 4ea0a 4e9c8: 486e fffc pea %fp@(-4) 4e9cc: 2f2e 0008 movel %fp@(8),%sp@- 4e9d0: 4879 0007 3e5c pea 73e5c <_Dual_ported_memory_Information> 4e9d6: 4eb9 0005 366c jsr 5366c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e9dc: 4fef 000c lea %sp@(12),%sp 4e9e0: 2040 moveal %d0,%a0 4e9e2: 4aae fffc tstl %fp@(-4) 4e9e6: 6704 beqs 4e9ec 4e9e8: 7004 moveq #4,%d0 4e9ea: 601e bras 4ea0a case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 4e9ec: 2002 movel %d2,%d0 4e9ee: 90a8 0010 subl %a0@(16),%d0 if ( ending > the_port->length ) 4e9f2: b0a8 0018 cmpl %a0@(24),%d0 4e9f6: 6304 blss 4e9fc *external = internal; 4e9f8: 2482 movel %d2,%a2@ 4e9fa: 6006 bras 4ea02 else *external = _Addresses_Add_offset( the_port->external_base, 4e9fc: d0a8 0014 addl %a0@(20),%d0 4ea00: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4ea02: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> 4ea08: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ea0a: 242e fff4 movel %fp@(-12),%d2 4ea0e: 246e fff8 moveal %fp@(-8),%a2 4ea12: 4e5e unlk %fp 4ea14: 4e75 rts ... 00045930 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 45930: 4e56 fff0 linkw %fp,#-16 45934: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 45938: 242e 0008 movel %fp@(8),%d2 4593c: 286e 000c moveal %fp@(12),%a4 Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 45940: 6606 bnes 45948 45942: 7003 moveq #3,%d0 45944: 6000 009e braw 459e4 return RTEMS_INVALID_NAME; if ( !id ) 45948: 4a8c tstl %a4 4594a: 6606 bnes 45952 4594c: 7009 moveq #9,%d0 4594e: 6000 0094 braw 459e4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45952: 2039 0005 d61c movel 5d61c <_Thread_Dispatch_disable_level>,%d0 45958: 5280 addql #1,%d0 4595a: 23c0 0005 d61c movel %d0,5d61c <_Thread_Dispatch_disable_level> * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 45960: 4879 0005 d520 pea 5d520 <_Rate_monotonic_Information> 45966: 47f9 0004 822a lea 4822a <_Thread_Enable_dispatch>,%a3 4596c: 4eb9 0004 7538 jsr 47538 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 45972: 588f addql #4,%sp 45974: 2440 moveal %d0,%a2 45976: 4a80 tstl %d0 45978: 6606 bnes 45980 _Thread_Enable_dispatch(); 4597a: 4e93 jsr %a3@ 4597c: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4597e: 6064 bras 459e4 } the_period->owner = _Thread_Executing; 45980: 41f9 0005 d6d6 lea 5d6d6 <_Thread_Executing>,%a0 45986: 2550 0040 movel %a0@,%a2@(64) the_period->state = RATE_MONOTONIC_INACTIVE; 4598a: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4598e: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; 45992: 42aa 002c clrl %a2@(44) the_watchdog->id = id; 45996: 42aa 0030 clrl %a2@(48) the_watchdog->user_data = user_data; 4599a: 42aa 0034 clrl %a2@(52) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 4599e: 4878 0038 pea 38 459a2: 42a7 clrl %sp@- 459a4: 486a 0054 pea %a2@(84) 459a8: 4eb9 0004 d8dc jsr 4d8dc #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 459ae: 202a 0008 movel %a2@(8),%d0 459b2: 4281 clrl %d1 459b4: 2079 0005 d538 moveal 5d538 <_Rate_monotonic_Information+0x18>,%a0 459ba: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 459bc: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 459c0: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) 459c4: 223c 7fff ffff movel #2147483647,%d1 459ca: 2541 005c movel %d1,%a2@(92) 459ce: 2541 0060 movel %d1,%a2@(96) 459d2: 2541 0074 movel %d1,%a2@(116) 459d6: 2541 0078 movel %d1,%a2@(120) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 459da: 2880 movel %d0,%a4@ _Thread_Enable_dispatch(); 459dc: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 459de: 4fef 000c lea %sp@(12),%sp &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; _Thread_Enable_dispatch(); 459e2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 459e4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 459ea: 4e5e unlk %fp 459ec: 4e75 rts ... 00070450 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 70450: 4e56 fffc linkw %fp,#-4 70454: 2f0a movel %a2,%sp@- 70456: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 7045a: 4a8a tstl %a2 7045c: 6606 bnes 70464 7045e: 7009 moveq #9,%d0 70460: 6000 0098 braw 704fa 70464: 486e fffc pea %fp@(-4) 70468: 2f2e 0008 movel %fp@(8),%sp@- 7046c: 4879 0009 ac52 pea 9ac52 <_Rate_monotonic_Information> 70472: 4eb9 0004 a828 jsr 4a828 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 70478: 4fef 000c lea %sp@(12),%sp 7047c: 2040 moveal %d0,%a0 7047e: 4aae fffc tstl %fp@(-4) 70482: 6704 beqs 70488 70484: 7004 moveq #4,%d0 70486: 6072 bras 704fa case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 70488: 24a8 0054 movel %a0@(84),%a2@ dst->missed_count = src->missed_count; 7048c: 2568 0058 0004 movel %a0@(88),%a2@(4) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time ); 70492: 2028 005c movel %a0@(92),%d0 70496: 2228 0060 movel %a0@(96),%d1 7049a: 2540 0008 movel %d0,%a2@(8) 7049e: 2541 000c movel %d1,%a2@(12) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 704a2: 2028 0064 movel %a0@(100),%d0 704a6: 2228 0068 movel %a0@(104),%d1 704aa: 2540 0010 movel %d0,%a2@(16) 704ae: 2541 0014 movel %d1,%a2@(20) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 704b2: 2028 006c movel %a0@(108),%d0 704b6: 2228 0070 movel %a0@(112),%d1 704ba: 2540 0018 movel %d0,%a2@(24) 704be: 2541 001c movel %d1,%a2@(28) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 704c2: 2028 0074 movel %a0@(116),%d0 704c6: 2228 0078 movel %a0@(120),%d1 704ca: 2540 0020 movel %d0,%a2@(32) 704ce: 2541 0024 movel %d1,%a2@(36) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 704d2: 2028 007c movel %a0@(124),%d0 704d6: 2228 0080 movel %a0@(128),%d1 704da: 2540 0028 movel %d0,%a2@(40) 704de: 2541 002c movel %d1,%a2@(44) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 704e2: 2028 0084 movel %a0@(132),%d0 704e6: 2228 0088 movel %a0@(136),%d1 704ea: 2540 0030 movel %d0,%a2@(48) 704ee: 2541 0034 movel %d1,%a2@(52) dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); 704f2: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 704f8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 704fa: 246e fff8 moveal %fp@(-8),%a2 704fe: 4e5e unlk %fp 70500: 4e75 rts ... 00070504 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 70504: 4e56 ffec linkw %fp,#-20 70508: 2f0a movel %a2,%sp@- 7050a: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 7050e: 4a8a tstl %a2 70510: 6606 bnes 70518 70512: 7009 moveq #9,%d0 70514: 6000 0094 braw 705aa 70518: 486e fffc pea %fp@(-4) 7051c: 2f2e 0008 movel %fp@(8),%sp@- 70520: 4879 0009 ac52 pea 9ac52 <_Rate_monotonic_Information> 70526: 4eb9 0004 a828 jsr 4a828 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7052c: 4fef 000c lea %sp@(12),%sp 70530: 2040 moveal %d0,%a0 70532: 4aae fffc tstl %fp@(-4) 70536: 6704 beqs 7053c 70538: 7004 moveq #4,%d0 7053a: 606e bras 705aa case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 7053c: 2268 0040 moveal %a0@(64),%a1 status->state = the_period->state; 70540: 2028 0038 movel %a0@(56),%d0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 70544: 24a9 0008 movel %a1@(8),%a2@ status->state = the_period->state; 70548: 2540 0004 movel %d0,%a2@(4) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 7054c: 6612 bnes 70560 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); 7054e: 42aa 0014 clrl %a2@(20) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 70552: 42aa 0008 clrl %a2@(8) 70556: 42aa 000c clrl %a2@(12) _Timespec_Set_to_zero( &status->executed_since_last_period ); 7055a: 42aa 0010 clrl %a2@(16) 7055e: 6042 bras 705a2 /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 70560: 486e fff4 pea %fp@(-12) 70564: 486e ffec pea %fp@(-20) 70568: 2f08 movel %a0,%sp@- 7056a: 4eb9 0007 062c jsr 7062c <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 70570: 4fef 000c lea %sp@(12),%sp 70574: 4a00 tstb %d0 70576: 660a bnes 70582 _Thread_Enable_dispatch(); 70578: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 7057e: 700b moveq #11,%d0 return RTEMS_NOT_DEFINED; 70580: 6028 bras 705aa #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 70582: 202e fff4 movel %fp@(-12),%d0 70586: 222e fff8 movel %fp@(-8),%d1 7058a: 2540 0010 movel %d0,%a2@(16) 7058e: 2541 0014 movel %d1,%a2@(20) _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 70592: 202e ffec movel %fp@(-20),%d0 70596: 222e fff0 movel %fp@(-16),%d1 7059a: 2540 0008 movel %d0,%a2@(8) 7059e: 2541 000c movel %d1,%a2@(12) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 705a2: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 705a8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 705aa: 246e ffe8 moveal %fp@(-24),%a2 705ae: 4e5e unlk %fp 705b0: 4e75 rts ... 000707c8 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 707c8: 4e56 ffec linkw %fp,#-20 707cc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 707d0: 486e fffc pea %fp@(-4) 707d4: 262e 0008 movel %fp@(8),%d3 707d8: 2f03 movel %d3,%sp@- 707da: 4879 0009 ac52 pea 9ac52 <_Rate_monotonic_Information> 707e0: 242e 000c movel %fp@(12),%d2 707e4: 4eb9 0004 a828 jsr 4a828 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 707ea: 4fef 000c lea %sp@(12),%sp 707ee: 2440 moveal %d0,%a2 707f0: 4aae fffc tstl %fp@(-4) 707f4: 6600 0138 bnew 7092e case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 707f8: 2039 0009 a8e2 movel 9a8e2 <_Thread_Executing>,%d0 707fe: b0aa 0040 cmpl %a2@(64),%d0 70802: 670c beqs 70810 _Thread_Enable_dispatch(); 70804: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 7080a: 7817 moveq #23,%d4 return RTEMS_NOT_OWNER_OF_RESOURCE; 7080c: 6000 0122 braw 70930 } if ( length == RTEMS_PERIOD_STATUS ) { 70810: 4a82 tstl %d2 70812: 6622 bnes 70836 switch ( the_period->state ) { 70814: 202a 0038 movel %a2@(56),%d0 70818: 7204 moveq #4,%d1 7081a: b280 cmpl %d0,%d1 7081c: 6404 bccs 70822 7081e: 4284 clrl %d4 <== NOT EXECUTED 70820: 600a bras 7082c <== NOT EXECUTED 70822: 41f9 0009 48d2 lea 948d2 ,%a0 70828: 2830 0c00 movel %a0@(00000000,%d0:l:4),%d4 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7082c: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> return( return_value ); 70832: 6000 00fc braw 70930 } _ISR_Disable( level ); 70836: 203c 0000 0700 movel #1792,%d0 7083c: 40c4 movew %sr,%d4 7083e: 8084 orl %d4,%d0 70840: 46c0 movew %d0,%sr switch ( the_period->state ) { 70842: 202a 0038 movel %a2@(56),%d0 70846: 7202 moveq #2,%d1 70848: b280 cmpl %d0,%d1 7084a: 6740 beqs 7088c 7084c: 123c 0004 moveb #4,%d1 70850: b280 cmpl %d0,%d1 70852: 6700 00a4 beqw 708f8 70856: 4a80 tstl %d0 70858: 6600 00d4 bnew 7092e case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7085c: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7085e: 2f0a movel %a2,%sp@- ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 70860: 4284 clrl %d4 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 70862: 4eb9 0007 05b4 jsr 705b4 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 70868: 203c 0007 093c movel #461116,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7086e: 7202 moveq #2,%d1 70870: 2540 002c movel %d0,%a2@(44) the_watchdog->id = id; 70874: 2543 0030 movel %d3,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 70878: 2542 001c movel %d2,%a2@(28) 7087c: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 70880: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 70884: 42aa 0034 clrl %a2@(52) 70888: 6000 0084 braw 7090e case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7088c: 2f0a movel %a2,%sp@- 7088e: 4eb9 0007 06d4 jsr 706d4 <_Rate_monotonic_Update_statistics> * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; 70894: 2542 003c movel %d2,%a2@(60) /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 70898: 7401 moveq #1,%d2 7089a: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7089e: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 708a0: 2079 0009 a8e2 moveal 9a8e2 <_Thread_Executing>,%a0 708a6: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 708ac: 4878 4000 pea 4000 708b0: 2f08 movel %a0,%sp@- 708b2: 4eb9 0004 b8b4 jsr 4b8b4 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 708b8: 203c 0000 0700 movel #1792,%d0 708be: 40c1 movew %sr,%d1 708c0: 8081 orl %d1,%d0 708c2: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 708c4: 143c 0002 moveb #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 708c8: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 708cc: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 708d0: 46c1 movew %d1,%sr /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 708d2: 7203 moveq #3,%d1 708d4: 4fef 000c lea %sp@(12),%sp 708d8: b280 cmpl %d0,%d1 708da: 6612 bnes 708ee _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 708dc: 4878 4000 pea 4000 708e0: 2f39 0009 a8e2 movel 9a8e2 <_Thread_Executing>,%sp@- 708e6: 4eb9 0004 ad04 jsr 4ad04 <_Thread_Clear_state> 708ec: 508f addql #8,%sp _Thread_Enable_dispatch(); 708ee: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 708f4: 4284 clrl %d4 return RTEMS_SUCCESSFUL; 708f6: 6038 bras 70930 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 708f8: 2f0a movel %a2,%sp@- 708fa: 4eb9 0007 06d4 jsr 706d4 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 70900: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 70902: 7002 moveq #2,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 70904: 7806 moveq #6,%d4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 70906: 2542 001c movel %d2,%a2@(28) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7090a: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; 7090e: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 70912: 486a 0010 pea %a2@(16) 70916: 4879 0009 a900 pea 9a900 <_Watchdog_Ticks_chain> 7091c: 4eb9 0004 bfc8 jsr 4bfc8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 70922: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 70928: 4fef 000c lea %sp@(12),%sp 7092c: 6002 bras 70930 7092e: 7804 moveq #4,%d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 70930: 2004 movel %d4,%d0 70932: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 70938: 4e5e unlk %fp 7093a: 4e75 rts 0006256e : void rtems_rate_monotonic_report_statistics( void ) { 6256e: 4e56 0000 linkw %fp,#0 rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 62572: 4879 0004 681c pea 4681c 62578: 42a7 clrl %sp@- 6257a: 4eb9 0006 23f8 jsr 623f8 62580: 508f addql #8,%sp } 62582: 4e5e unlk %fp 62584: 4e75 rts ... 0004fc78 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 4fc78: 4e56 fffc linkw %fp,#-4 4fc7c: 2f0a movel %a2,%sp@- 4fc7e: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 4fc80: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 4fc86: 4eb9 0005 1eec jsr 51eec <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4fc8c: 486e fffc pea %fp@(-4) 4fc90: 2f2e 0008 movel %fp@(8),%sp@- 4fc94: 4879 0007 3f04 pea 73f04 <_Region_Information> 4fc9a: 4eb9 0005 3634 jsr 53634 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4fca0: 4fef 0010 lea %sp@(16),%sp 4fca4: 2440 moveal %d0,%a2 4fca6: 4aae fffc tstl %fp@(-4) 4fcaa: 6704 beqs 4fcb0 4fcac: 7404 moveq #4,%d2 4fcae: 602c bras 4fcdc case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 4fcb0: 4aaa 0064 tstl %a2@(100) 4fcb4: 6704 beqs 4fcba 4fcb6: 740c moveq #12,%d2 4fcb8: 6022 bras 4fcdc return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 4fcba: 2f00 movel %d0,%sp@- 4fcbc: 4879 0007 3f04 pea 73f04 <_Region_Information> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4fcc2: 4282 clrl %d2 4fcc4: 4eb9 0005 3268 jsr 53268 <_Objects_Close> 4fcca: 2f0a movel %a2,%sp@- 4fccc: 4879 0007 3f04 pea 73f04 <_Region_Information> 4fcd2: 4eb9 0005 34dc jsr 534dc <_Objects_Free> 4fcd8: 4fef 0010 lea %sp@(16),%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4fcdc: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 4fce2: 4eb9 0005 1f4c jsr 51f4c <_API_Mutex_Unlock> return return_status; } 4fce8: 246e fff8 moveal %fp@(-8),%a2 4fcec: 2002 movel %d2,%d0 4fcee: 242e fff4 movel %fp@(-12),%d2 4fcf2: 4e5e unlk %fp 4fcf4: 4e75 rts ... 0004fe0c : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 4fe0c: 4e56 fffc linkw %fp,#-4 4fe10: 2f02 movel %d2,%sp@- 4fe12: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 4fe16: 6606 bnes 4fe1e 4fe18: 143c 0009 moveb #9,%d2 4fe1c: 604e bras 4fe6c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4fe1e: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 4fe24: 4eb9 0005 1eec jsr 51eec <_API_Mutex_Lock> 4fe2a: 486e fffc pea %fp@(-4) 4fe2e: 2f2e 0008 movel %fp@(8),%sp@- 4fe32: 4879 0007 3f04 pea 73f04 <_Region_Information> 4fe38: 4eb9 0005 3634 jsr 53634 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4fe3e: 4fef 0010 lea %sp@(16),%sp 4fe42: 4aae fffc tstl %fp@(-4) 4fe46: 6704 beqs 4fe4c 4fe48: 7404 moveq #4,%d2 4fe4a: 6012 bras 4fe5e case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 4fe4c: 2f02 movel %d2,%sp@- 4fe4e: 2040 moveal %d0,%a0 4fe50: 4868 0068 pea %a0@(104) 4fe54: 4282 clrl %d2 4fe56: 4eb9 0005 2c98 jsr 52c98 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 4fe5c: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4fe5e: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 4fe64: 4eb9 0005 1f4c jsr 51f4c <_API_Mutex_Unlock> return return_status; 4fe6a: 588f addql #4,%sp } 4fe6c: 2002 movel %d2,%d0 4fe6e: 242e fff8 movel %fp@(-8),%d2 4fe72: 4e5e unlk %fp 4fe74: 4e75 rts ... 0004ff88 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 4ff88: 4e56 fffc linkw %fp,#-4 4ff8c: 2f03 movel %d3,%sp@- 4ff8e: 262e 0010 movel %fp@(16),%d3 4ff92: 2f02 movel %d2,%sp@- 4ff94: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 4ff98: 6766 beqs 50000 return RTEMS_INVALID_ADDRESS; if ( !size ) 4ff9a: 4a83 tstl %d3 4ff9c: 6762 beqs 50000 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4ff9e: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 4ffa4: 4eb9 0005 1eec jsr 51eec <_API_Mutex_Lock> 4ffaa: 486e fffc pea %fp@(-4) 4ffae: 2f2e 0008 movel %fp@(8),%sp@- 4ffb2: 4879 0007 3f04 pea 73f04 <_Region_Information> 4ffb8: 4eb9 0005 3634 jsr 53634 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4ffbe: 222e fffc movel %fp@(-4),%d1 4ffc2: 4fef 0010 lea %sp@(16),%sp 4ffc6: 670a beqs 4ffd2 4ffc8: 7001 moveq #1,%d0 4ffca: b081 cmpl %d1,%d0 4ffcc: 6620 bnes 4ffee 4ffce: 7404 moveq #4,%d2 4ffd0: 601e bras 4fff0 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 4ffd2: 2f03 movel %d3,%sp@- 4ffd4: 2040 moveal %d0,%a0 4ffd6: 2f02 movel %d2,%sp@- 4ffd8: 4868 0068 pea %a0@(104) 4ffdc: 4eb9 0005 30b4 jsr 530b4 <_Heap_Size_of_alloc_area> 4ffe2: 4fef 000c lea %sp@(12),%sp 4ffe6: 4a00 tstb %d0 4ffe8: 6604 bnes 4ffee 4ffea: 7409 moveq #9,%d2 <== NOT EXECUTED 4ffec: 6002 bras 4fff0 <== NOT EXECUTED 4ffee: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4fff0: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 4fff6: 4eb9 0005 1f4c jsr 51f4c <_API_Mutex_Unlock> return return_status; 4fffc: 588f addql #4,%sp 4fffe: 6002 bras 50002 50000: 7409 moveq #9,%d2 } 50002: 2002 movel %d2,%d0 50004: 242e fff4 movel %fp@(-12),%d2 50008: 262e fff8 movel %fp@(-8),%d3 5000c: 4e5e unlk %fp 5000e: 4e75 rts 0005003c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 5003c: 4e56 ffe8 linkw %fp,#-24 50040: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50044: 266e 0014 moveal %fp@(20),%a3 uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 50048: 4a8b tstl %a3 5004a: 6700 008e beqw 500da return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 5004e: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 50054: 4eb9 0005 1eec jsr 51eec <_API_Mutex_Lock> 5005a: 486e fff8 pea %fp@(-8) 5005e: 2f2e 0008 movel %fp@(8),%sp@- 50062: 4879 0007 3f04 pea 73f04 <_Region_Information> 50068: 4eb9 0005 3634 jsr 53634 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5006e: 4fef 0010 lea %sp@(16),%sp 50072: 2440 moveal %d0,%a2 50074: 4aae fff8 tstl %fp@(-8) 50078: 664e bnes 500c8 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 5007a: 486e fffc pea %fp@(-4) 5007e: 486e fff4 pea %fp@(-12) 50082: 2f2e 0010 movel %fp@(16),%sp@- 50086: 2f2e 000c movel %fp@(12),%sp@- 5008a: 486a 0068 pea %a2@(104) 5008e: 4eb9 0005 2fdc jsr 52fdc <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 50094: 26ae fff4 movel %fp@(-12),%a3@ case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 50098: 2400 movel %d0,%d2 ); *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 5009a: 4fef 0014 lea %sp@(20),%sp 5009e: 660e bnes 500ae _Region_Process_queue( the_region ); /* unlocks allocator */ 500a0: 2f0a movel %a2,%sp@- 500a2: 4eb9 0005 6a90 jsr 56a90 <_Region_Process_queue> 500a8: 588f addql #4,%sp 500aa: 4280 clrl %d0 500ac: 602e bras 500dc else _RTEMS_Unlock_allocator(); 500ae: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 500b4: 4eb9 0005 1f4c jsr 51f4c <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 500ba: 588f addql #4,%sp 500bc: 7001 moveq #1,%d0 500be: b082 cmpl %d2,%d0 500c0: 6618 bnes 500da 500c2: 103c 000d moveb #13,%d0 500c6: 6014 bras 500dc default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 500c8: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 500ce: 4eb9 0005 1f4c jsr 51f4c <_API_Mutex_Unlock> return return_status; 500d4: 588f addql #4,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 500d6: 7004 moveq #4,%d0 return return_status; 500d8: 6002 bras 500dc 500da: 7009 moveq #9,%d0 } 500dc: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 500e2: 4e5e unlk %fp 500e4: 4e75 rts ... 000500e8 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 500e8: 4e56 fffc linkw %fp,#-4 500ec: 2f0a movel %a2,%sp@- 500ee: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 500f0: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 500f6: 4eb9 0005 1eec jsr 51eec <_API_Mutex_Lock> 500fc: 486e fffc pea %fp@(-4) 50100: 2f2e 0008 movel %fp@(8),%sp@- 50104: 4879 0007 3f04 pea 73f04 <_Region_Information> 5010a: 4eb9 0005 3634 jsr 53634 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 50110: 4fef 0010 lea %sp@(16),%sp 50114: 2440 moveal %d0,%a2 50116: 4aae fffc tstl %fp@(-4) 5011a: 6704 beqs 50120 5011c: 7404 moveq #4,%d2 5011e: 6026 bras 50146 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 50120: 2f2e 000c movel %fp@(12),%sp@- 50124: 486a 0068 pea %a2@(104) 50128: 4eb9 0005 2ae4 jsr 52ae4 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 5012e: 508f addql #8,%sp 50130: 4a00 tstb %d0 50132: 6710 beqs 50144 return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 50134: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 50138: 4282 clrl %d2 5013a: 2f0a movel %a2,%sp@- 5013c: 4eb9 0005 6a90 jsr 56a90 <_Region_Process_queue> 50142: 600e bras 50152 return RTEMS_SUCCESSFUL; 50144: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 50146: 2f39 0007 40b2 movel 740b2 <_RTEMS_Allocator_Mutex>,%sp@- 5014c: 4eb9 0005 1f4c jsr 51f4c <_API_Mutex_Unlock> return return_status; } 50152: 2002 movel %d2,%d0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 50154: 588f addql #4,%sp } 50156: 242e fff4 movel %fp@(-12),%d2 5015a: 246e fff8 moveal %fp@(-8),%a2 5015e: 4e5e unlk %fp 50160: 4e75 rts ... 00050440 : rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { 50440: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); 50444: 2f2e 0010 movel %fp@(16),%sp@- 50448: 2f2e 000c movel %fp@(12),%sp@- 5044c: 2f2e 0008 movel %fp@(8),%sp@- 50450: 4879 0007 3f3c pea 73f3c <_Semaphore_Information> 50456: 4eb9 0005 3854 jsr 53854 <_Objects_Name_to_id_u32> 5045c: 41f9 0006 d560 lea 6d560 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 50462: 4e5e unlk %fp 50464: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 50468: 4e75 rts ... 00045558 : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 45558: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 4555a: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 4555e: b0b9 0005 bb76 cmpl 5bb76 <_System_state_Current>,%d0 45564: 6718 beqs 4557e 45566: 23c0 0005 bb76 movel %d0,5bb76 <_System_state_Current> * 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 ); 4556c: 203c 0005 b9c0 movel #375232,%d0 45572: 2d40 0008 movel %d0,%fp@(8) _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 45576: 4e5e unlk %fp 45578: 4ef9 0004 7e62 jmp 47e62 <_CPU_Context_Restart_self> 4557e: 4e5e unlk %fp 45580: 4e75 rts ... 00045e34 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45e34: 4e56 0000 linkw %fp,#0 45e38: 2239 0005 cdbc movel 5cdbc <_Thread_Dispatch_disable_level>,%d1 45e3e: 5281 addql #1,%d1 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45e40: 2079 0005 ce76 moveal 5ce76 <_Thread_Executing>,%a0 rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45e46: 202e 0008 movel %fp@(8),%d0 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45e4a: 2068 0108 moveal %a0@(264),%a0 45e4e: 23c1 0005 cdbc movel %d1,5cdbc <_Thread_Dispatch_disable_level> asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 45e54: 4a80 tstl %d0 45e56: 670c beqs 45e64 asr->mode_set = mode_set; asr->handler = asr_handler; 45e58: 2140 000a movel %d0,%a0@(10) _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { asr->mode_set = mode_set; 45e5c: 216e 000c 000e movel %fp@(12),%a0@(14) 45e62: 601a bras 45e7e information->is_enabled = false; information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; information->signals_posted = 0; information->signals_pending = 0; information->nest_level = 0; 45e64: 42a8 001a clrl %a0@(26) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45e68: 4200 clrb %d0 information->handler = NULL; 45e6a: 42a8 000a clrl %a0@(10) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45e6e: 1140 0008 moveb %d0,%a0@(8) information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; 45e72: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 45e76: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 45e7a: 42a8 0016 clrl %a0@(22) asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 45e7e: 4eb9 0004 7c52 jsr 47c52 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45e84: 4280 clrl %d0 45e86: 4e5e unlk %fp 45e88: 4e75 rts ... 00050620 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 50620: 4e56 fffc linkw %fp,#-4 50624: 2f03 movel %d3,%sp@- 50626: 2f02 movel %d2,%sp@- 50628: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 5062c: 6606 bnes 50634 5062e: 700a moveq #10,%d0 50630: 6000 0084 braw 506b6 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 50634: 486e fffc pea %fp@(-4) 50638: 2f2e 0008 movel %fp@(8),%sp@- 5063c: 4eb9 0005 3f1c jsr 53f1c <_Thread_Get> switch ( location ) { 50642: 508f addql #8,%sp 50644: 4aae fffc tstl %fp@(-4) 50648: 6704 beqs 5064e 5064a: 7004 moveq #4,%d0 5064c: 6068 bras 506b6 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 5064e: 2240 moveal %d0,%a1 50650: 2069 0108 moveal %a1@(264),%a0 asr = &api->Signal; 50654: 4aa8 000a tstl %a0@(10) 50658: 6754 beqs 506ae if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 5065a: 4a28 0008 tstb %a0@(8) 5065e: 6732 beqs 50692 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50660: 223c 0000 0700 movel #1792,%d1 50666: 40c3 movew %sr,%d3 50668: 8283 orl %d3,%d1 5066a: 46c1 movew %d1,%sr *signal_set |= signals; 5066c: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 50670: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 50672: 2239 0007 409a movel 7409a <_ISR_Nest_level>,%d1 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 50678: 7401 moveq #1,%d2 5067a: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5067e: 4a81 tstl %d1 50680: 6722 beqs 506a4 50682: b0b9 0007 40ba cmpl 740ba <_Thread_Executing>,%d0 50688: 661a bnes 506a4 _ISR_Signals_to_thread_executing = true; 5068a: 13c2 0007 4144 moveb %d2,74144 <_ISR_Signals_to_thread_executing> 50690: 6012 bras 506a4 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50692: 203c 0000 0700 movel #1792,%d0 50698: 40c1 movew %sr,%d1 5069a: 8081 orl %d1,%d0 5069c: 46c0 movew %d0,%sr *signal_set |= signals; 5069e: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 506a2: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 506a4: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> 506aa: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 506ac: 6008 bras 506b6 } _Thread_Enable_dispatch(); 506ae: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> 506b4: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 506b6: 242e fff4 movel %fp@(-12),%d2 506ba: 262e fff8 movel %fp@(-8),%d3 506be: 4e5e unlk %fp 506c0: 4e75 rts ... 00045208 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 45208: 4e56 fff0 linkw %fp,#-16 4520c: 48d7 1c00 moveml %a2-%a4,%sp@ register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 45210: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 45216: 47f9 0004 5840 lea 45840 <_API_Mutex_Unlock>,%a3 4521c: 4eb9 0004 57e0 jsr 457e0 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 45222: 486e fffc pea %fp@(-4) 45226: 2f2e 0008 movel %fp@(8),%sp@- 4522a: 4eb9 0004 6c88 jsr 46c88 <_Thread_Get> switch ( location ) { 45230: 4fef 000c lea %sp@(12),%sp Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); 45234: 2440 moveal %d0,%a2 switch ( location ) { 45236: 4aae fffc tstl %fp@(-4) 4523a: 663c bnes 45278 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 4523c: 2f2a 0008 movel %a2@(8),%sp@- 45240: 49f9 0004 63b8 lea 463b8 <_Objects_Get_information_id>,%a4 45246: 4e94 jsr %a4@ 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 45248: 2f0a movel %a2,%sp@- 4524a: 2f00 movel %d0,%sp@- 4524c: 4eb9 0004 6954 jsr 46954 <_Thread_Close> 45252: 2f2a 0008 movel %a2@(8),%sp@- 45256: 4e94 jsr %a4@ 45258: 2f0a movel %a2,%sp@- 4525a: 2f00 movel %d0,%sp@- 4525c: 4eb9 0004 6334 jsr 46334 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 45262: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 45268: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4526a: 4eb9 0004 6c62 jsr 46c62 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45270: 4fef 001c lea %sp@(28),%sp _Thread_Close( the_information, the_thread ); _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 45274: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 45276: 600c bras 45284 case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45278: 2f39 0005 baa6 movel 5baa6 <_RTEMS_Allocator_Mutex>,%sp@- 4527e: 4e93 jsr %a3@ return RTEMS_INVALID_ID; 45280: 588f addql #4,%sp case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45282: 7004 moveq #4,%d0 return RTEMS_INVALID_ID; } 45284: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 4528a: 4e5e unlk %fp 4528c: 4e75 rts ... 00046988 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 46988: 4e56 fffc linkw %fp,#-4 4698c: 202e 0008 movel %fp@(8),%d0 46990: 2f0a movel %a2,%sp@- 46992: 246e 0010 moveal %fp@(16),%a2 46996: 2f02 movel %d2,%sp@- 46998: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 4699c: 4a39 0005 c924 tstb 5c924 469a2: 6604 bnes 469a8 469a4: 7016 moveq #22,%d0 469a6: 605e bras 46a06 return RTEMS_NOT_CONFIGURED; if ( !note ) 469a8: 4a8a tstl %a2 469aa: 6604 bnes 469b0 469ac: 7009 moveq #9,%d0 469ae: 6056 bras 46a06 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 469b0: 720f moveq #15,%d1 469b2: b282 cmpl %d2,%d1 469b4: 6404 bccs 469ba 469b6: 700a moveq #10,%d0 469b8: 604c bras 46a06 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 469ba: 4a80 tstl %d0 469bc: 670c beqs 469ca _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 469be: 2079 0005 e3ae moveal 5e3ae <_Thread_Executing>,%a0 469c4: b0a8 0008 cmpl %a0@(8),%d0 469c8: 6612 bnes 469dc api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 469ca: 2079 0005 e3ae moveal 5e3ae <_Thread_Executing>,%a0 469d0: 4280 clrl %d0 469d2: 2068 0108 moveal %a0@(264),%a0 469d6: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ return RTEMS_SUCCESSFUL; 469da: 602a bras 46a06 } the_thread = _Thread_Get( id, &location ); 469dc: 486e fffc pea %fp@(-4) 469e0: 2f00 movel %d0,%sp@- 469e2: 4eb9 0004 8648 jsr 48648 <_Thread_Get> switch ( location ) { 469e8: 508f addql #8,%sp 469ea: 4aae fffc tstl %fp@(-4) 469ee: 6704 beqs 469f4 469f0: 7004 moveq #4,%d0 469f2: 6012 bras 46a06 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 469f4: 2240 moveal %d0,%a1 469f6: 2069 0108 moveal %a1@(264),%a0 469fa: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 469fe: 4eb9 0004 8622 jsr 48622 <_Thread_Enable_dispatch> 46a04: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46a06: 242e fff4 movel %fp@(-12),%d2 46a0a: 246e fff8 moveal %fp@(-8),%a2 46a0e: 4e5e unlk %fp 46a10: 4e75 rts ... 00045290 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 45290: 4e56 0000 linkw %fp,#0 45294: 202e 0008 movel %fp@(8),%d0 45298: 206e 0010 moveal %fp@(16),%a0 Objects_Name_or_id_lookup_errors status; if ( !id ) 4529c: 4a88 tstl %a0 4529e: 6604 bnes 452a4 452a0: 7009 moveq #9,%d0 452a2: 6032 bras 452d6 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 452a4: 4a80 tstl %d0 452a6: 660c bnes 452b4 *id = _Thread_Executing->Object.id; 452a8: 2279 0005 baae moveal 5baae <_Thread_Executing>,%a1 452ae: 20a9 0008 movel %a1@(8),%a0@ return RTEMS_SUCCESSFUL; 452b2: 6022 bras 452d6 } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 452b4: 2f08 movel %a0,%sp@- 452b6: 2f2e 000c movel %fp@(12),%sp@- 452ba: 2f00 movel %d0,%sp@- 452bc: 4879 0005 b968 pea 5b968 <_RTEMS_tasks_Information> 452c2: 4eb9 0004 65f0 jsr 465f0 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 452c8: 4fef 0010 lea %sp@(16),%sp 452cc: 41f9 0005 93ac lea 593ac <_Status_Object_name_errors_to_status>,%a0 452d2: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 452d6: 4e5e unlk %fp 452d8: 4e75 rts ... 0004b06c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4b06c: 4e56 ffe4 linkw %fp,#-28 4b070: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4b074: 262e 0008 movel %fp@(8),%d3 4b078: 282e 000c movel %fp@(12),%d4 4b07c: 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 ) 4b080: 4a8c tstl %a4 4b082: 6606 bnes 4b08a 4b084: 7009 moveq #9,%d0 4b086: 6000 00fc braw 4b184 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4b08a: 2479 0005 baae moveal 5baae <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4b090: 4a2a 0075 tstb %a2@(117) 4b094: 57c0 seq %d0 4b096: 243c 0000 0100 movel #256,%d2 4b09c: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4b09e: 266a 0108 moveal %a2@(264),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4b0a2: c480 andl %d0,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4b0a4: 4aaa 007a tstl %a2@(122) 4b0a8: 6704 beqs 4b0ae old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4b0aa: 08c2 0009 bset #9,%d2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4b0ae: 4a2b 0008 tstb %a3@(8) 4b0b2: 57c0 seq %d0 4b0b4: 2a3c 0000 0400 movel #1024,%d5 4b0ba: 49c0 extbl %d0 4b0bc: ca80 andl %d0,%d5 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4b0be: 4eb9 0004 7f18 jsr 47f18 <_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; 4b0c4: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4b0c6: 8082 orl %d2,%d0 4b0c8: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4b0ca: 0804 0008 btst #8,%d4 4b0ce: 670e beqs 4b0de executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4b0d0: 2003 movel %d3,%d0 4b0d2: 7201 moveq #1,%d1 4b0d4: e088 lsrl #8,%d0 4b0d6: b380 eorl %d1,%d0 4b0d8: c081 andl %d1,%d0 4b0da: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4b0de: 0804 0009 btst #9,%d4 4b0e2: 671c beqs 4b100 if ( _Modes_Is_timeslice(mode_set) ) { 4b0e4: 0803 0009 btst #9,%d3 4b0e8: 6712 beqs 4b0fc executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b0ea: 41f9 0005 b9a4 lea 5b9a4 <_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; 4b0f0: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b0f2: 2550 0076 movel %a0@,%a2@(118) 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; 4b0f6: 2540 007a movel %d0,%a2@(122) 4b0fa: 6004 bras 4b100 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4b0fc: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4b100: 7007 moveq #7,%d0 4b102: c084 andl %d4,%d0 4b104: 6712 beqs 4b118 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4b106: 40c0 movew %sr,%d0 4b108: 7207 moveq #7,%d1 4b10a: c283 andl %d3,%d1 4b10c: 0280 0000 f8ff andil #63743,%d0 4b112: e189 lsll #8,%d1 4b114: 8081 orl %d1,%d0 4b116: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4b118: 0804 000a btst #10,%d4 4b11c: 6744 beqs 4b162 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4b11e: 700a moveq #10,%d0 4b120: e0ab lsrl %d0,%d3 4b122: 7201 moveq #1,%d1 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4b124: 4280 clrl %d0 4b126: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4b12a: b383 eorl %d1,%d3 4b12c: c681 andl %d1,%d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4b12e: b083 cmpl %d3,%d0 4b130: 6730 beqs 4b162 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4b132: 203c 0000 0700 movel #1792,%d0 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 4b138: 1743 0008 moveb %d3,%a3@(8) 4b13c: 40c1 movew %sr,%d1 4b13e: 8081 orl %d1,%d0 4b140: 46c0 movew %d0,%sr _signals = information->signals_pending; 4b142: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4b146: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4b14c: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4b150: 46c1 movew %d1,%sr if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4b152: 4aab 0012 tstl %a3@(18) 4b156: 670a beqs 4b162 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 4b158: 7001 moveq #1,%d0 4b15a: 7401 moveq #1,%d2 4b15c: 1540 0074 moveb %d0,%a2@(116) 4b160: 6002 bras 4b164 4b162: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4b164: 7203 moveq #3,%d1 4b166: b2b9 0005 bb76 cmpl 5bb76 <_System_state_Current>,%d1 4b16c: 6614 bnes 4b182 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4b16e: 4eb9 0004 b44c jsr 4b44c <_Thread_Evaluate_mode> 4b174: 4a00 tstb %d0 4b176: 6604 bnes 4b17c 4b178: 4a02 tstb %d2 4b17a: 6706 beqs 4b182 _Thread_Dispatch(); 4b17c: 4eb9 0004 6b10 jsr 46b10 <_Thread_Dispatch> 4b182: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4b184: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4b18a: 4e5e unlk %fp 4b18c: 4e75 rts ... 0004de0c : #include #include rtems_id rtems_task_self(void) { 4de0c: 4e56 0000 linkw %fp,#0 4de10: 2079 0006 0df6 moveal 60df6 <_Thread_Executing>,%a0 return _Thread_Executing->Object.id; } 4de16: 4e5e unlk %fp 4de18: 2028 0008 movel %a0@(8),%d0 4de1c: 4e75 rts ... 00046af4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 46af4: 4e56 fffc linkw %fp,#-4 46af8: 202e 0008 movel %fp@(8),%d0 46afc: 2f03 movel %d3,%sp@- 46afe: 262e 0010 movel %fp@(16),%d3 46b02: 2f02 movel %d2,%sp@- 46b04: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 46b08: 4a39 0005 c924 tstb 5c924 46b0e: 6604 bnes 46b14 46b10: 7016 moveq #22,%d0 46b12: 6056 bras 46b6a /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 46b14: 720f moveq #15,%d1 46b16: b282 cmpl %d2,%d1 46b18: 6404 bccs 46b1e 46b1a: 700a moveq #10,%d0 46b1c: 604c bras 46b6a /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 46b1e: 4a80 tstl %d0 46b20: 670c beqs 46b2e _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 46b22: 2079 0005 e3ae moveal 5e3ae <_Thread_Executing>,%a0 46b28: b0a8 0008 cmpl %a0@(8),%d0 46b2c: 6612 bnes 46b40 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46b2e: 2079 0005 e3ae moveal 5e3ae <_Thread_Executing>,%a0 46b34: 4280 clrl %d0 46b36: 2068 0108 moveal %a0@(264),%a0 46b3a: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) return RTEMS_SUCCESSFUL; 46b3e: 602a bras 46b6a } the_thread = _Thread_Get( id, &location ); 46b40: 486e fffc pea %fp@(-4) 46b44: 2f00 movel %d0,%sp@- 46b46: 4eb9 0004 8648 jsr 48648 <_Thread_Get> switch ( location ) { 46b4c: 508f addql #8,%sp 46b4e: 4aae fffc tstl %fp@(-4) 46b52: 6704 beqs 46b58 46b54: 7004 moveq #4,%d0 46b56: 6012 bras 46b6a case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46b58: 2240 moveal %d0,%a1 46b5a: 2069 0108 moveal %a1@(264),%a0 46b5e: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) _Thread_Enable_dispatch(); 46b62: 4eb9 0004 8622 jsr 48622 <_Thread_Enable_dispatch> 46b68: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46b6a: 242e fff4 movel %fp@(-12),%d2 46b6e: 262e fff8 movel %fp@(-8),%d3 46b72: 4e5e unlk %fp 46b74: 4e75 rts ... 000493f8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 493f8: 4e56 fffc linkw %fp,#-4 493fc: 2f0a movel %a2,%sp@- 493fe: 246e 0010 moveal %fp@(16),%a2 49402: 2f02 movel %d2,%sp@- 49404: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 49408: 6710 beqs 4941a 4940a: 4280 clrl %d0 4940c: 1039 0005 f8f2 moveb 5f8f2 ,%d0 49412: b082 cmpl %d2,%d0 49414: 6404 bccs 4941a 49416: 7013 moveq #19,%d0 49418: 6054 bras 4946e !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4941a: 4a8a tstl %a2 4941c: 6604 bnes 49422 4941e: 7009 moveq #9,%d0 49420: 604c bras 4946e return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 49422: 486e fffc pea %fp@(-4) 49426: 2f2e 0008 movel %fp@(8),%sp@- 4942a: 4eb9 0004 b084 jsr 4b084 <_Thread_Get> switch ( location ) { 49430: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 49432: 2040 moveal %d0,%a0 switch ( location ) { 49434: 4aae fffc tstl %fp@(-4) 49438: 6704 beqs 4943e 4943a: 7004 moveq #4,%d0 4943c: 6030 bras 4946e case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4943e: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 49442: 4a82 tstl %d2 49444: 6720 beqs 49466 the_thread->real_priority = new_priority; 49446: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4944a: 4aa8 001c tstl %a0@(28) 4944e: 6706 beqs 49456 the_thread->current_priority > new_priority ) 49450: b4a8 0014 cmpl %a0@(20),%d2 49454: 6410 bccs 49466 _Thread_Change_priority( the_thread, new_priority, false ); 49456: 42a7 clrl %sp@- 49458: 2f02 movel %d2,%sp@- 4945a: 2f08 movel %a0,%sp@- 4945c: 4eb9 0004 ab34 jsr 4ab34 <_Thread_Change_priority> 49462: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 49466: 4eb9 0004 b02e jsr 4b02e <_Thread_Enable_dispatch> 4946c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4946e: 242e fff4 movel %fp@(-12),%d2 49472: 246e fff8 moveal %fp@(-8),%a2 49476: 4e5e unlk %fp 49478: 4e75 rts ... 00062aa0 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 62aa0: 4e56 fff0 linkw %fp,#-16 62aa4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 62aa8: 246e 000c moveal %fp@(12),%a2 62aac: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 62ab0: 4a8a tstl %a2 62ab2: 6604 bnes 62ab8 62ab4: 7009 moveq #9,%d0 62ab6: 6070 bras 62b28 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 62ab8: 486e fffc pea %fp@(-4) 62abc: 2f2e 0008 movel %fp@(8),%sp@- 62ac0: 4eb9 0004 b0e4 jsr 4b0e4 <_Thread_Get> switch (location) { 62ac6: 508f addql #8,%sp rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 62ac8: 2640 moveal %d0,%a3 switch (location) { 62aca: 4aae fffc tstl %fp@(-4) 62ace: 6704 beqs 62ad4 62ad0: 7004 moveq #4,%d0 62ad2: 6054 bras 62b28 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 62ad4: 206b 0118 moveal %a3@(280),%a0 while (tvp) { 62ad8: 6014 bras 62aee if (tvp->ptr == ptr) { 62ada: b5e8 0004 cmpal %a0@(4),%a2 62ade: 660c bnes 62aec tvp->dtor = dtor; 62ae0: 2142 0010 movel %d2,%a0@(16) _Thread_Enable_dispatch(); 62ae4: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 62aea: 603a bras 62b26 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 62aec: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 62aee: 4a88 tstl %a0 62af0: 66e8 bnes 62ada } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 62af2: 4878 0014 pea 14 62af6: 4eb9 0004 c210 jsr 4c210 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 62afc: 588f addql #4,%sp 62afe: 43f9 0004 b0be lea 4b0be <_Thread_Enable_dispatch>,%a1 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 62b04: 2040 moveal %d0,%a0 _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 62b06: 4a80 tstl %d0 62b08: 6606 bnes 62b10 _Thread_Enable_dispatch(); 62b0a: 4e91 jsr %a1@ 62b0c: 701a moveq #26,%d0 return RTEMS_NO_MEMORY; 62b0e: 6018 bras 62b28 } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 62b10: 20ab 0118 movel %a3@(280),%a0@ _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 62b14: 2152 0008 movel %a2@,%a0@(8) new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 62b18: 2740 0118 movel %d0,%a3@(280) if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; new->ptr = ptr; 62b1c: 214a 0004 movel %a2,%a0@(4) new->dtor = dtor; 62b20: 2142 0010 movel %d2,%a0@(16) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; _Thread_Enable_dispatch(); 62b24: 4e91 jsr %a1@ 62b26: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 62b28: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 62b2e: 4e5e unlk %fp 62b30: 4e75 rts ... 00062b34 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 62b34: 4e56 fffc linkw %fp,#-4 62b38: 2f02 movel %d2,%sp@- 62b3a: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 62b3e: 675c beqs 62b9c return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 62b40: 486e fffc pea %fp@(-4) 62b44: 2f2e 0008 movel %fp@(8),%sp@- 62b48: 4eb9 0004 b0e4 jsr 4b0e4 <_Thread_Get> switch (location) { 62b4e: 508f addql #8,%sp 62b50: 4aae fffc tstl %fp@(-4) 62b54: 6704 beqs 62b5a 62b56: 7004 moveq #4,%d0 62b58: 6044 bras 62b9e case OBJECTS_LOCAL: tvp = the_thread->task_variables; 62b5a: 2240 moveal %d0,%a1 62b5c: 2069 0118 moveal %a1@(280),%a0 62b60: 93c9 subal %a1,%a1 while (tvp) { 62b62: 602e bras 62b92 if (tvp->ptr == ptr) { 62b64: b4a8 0004 cmpl %a0@(4),%d2 62b68: 6624 bnes 62b8e if (prev) 62b6a: 4a89 tstl %a1 62b6c: 6704 beqs 62b72 prev->next = tvp->next; 62b6e: 2290 movel %a0@,%a1@ 62b70: 6006 bras 62b78 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 62b72: 2240 moveal %d0,%a1 62b74: 2350 0118 movel %a0@,%a1@(280) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 62b78: 2f08 movel %a0,%sp@- 62b7a: 2f00 movel %d0,%sp@- 62b7c: 4eb9 0006 2c10 jsr 62c10 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 62b82: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 62b88: 508f addql #8,%sp prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); 62b8a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 62b8c: 6010 bras 62b9e } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 62b8e: 2248 moveal %a0,%a1 62b90: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 62b92: 4a88 tstl %a0 62b94: 66ce bnes 62b64 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 62b96: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 62b9c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 62b9e: 242e fff8 movel %fp@(-8),%d2 62ba2: 4e5e unlk %fp 62ba4: 4e75 rts ... 00062ba8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 62ba8: 4e56 fffc linkw %fp,#-4 62bac: 2f0a movel %a2,%sp@- 62bae: 246e 0010 moveal %fp@(16),%a2 62bb2: 2f02 movel %d2,%sp@- 62bb4: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 62bb8: 6746 beqs 62c00 return RTEMS_INVALID_ADDRESS; if ( !result ) 62bba: 4a8a tstl %a2 62bbc: 6742 beqs 62c00 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 62bbe: 486e fffc pea %fp@(-4) 62bc2: 2f2e 0008 movel %fp@(8),%sp@- 62bc6: 4eb9 0004 b0e4 jsr 4b0e4 <_Thread_Get> switch (location) { 62bcc: 508f addql #8,%sp 62bce: 4aae fffc tstl %fp@(-4) 62bd2: 6704 beqs 62bd8 62bd4: 7004 moveq #4,%d0 62bd6: 602a bras 62c02 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 62bd8: 2240 moveal %d0,%a1 62bda: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 62bde: 6016 bras 62bf6 if (tvp->ptr == ptr) { 62be0: b4a8 0004 cmpl %a0@(4),%d2 62be4: 660e bnes 62bf4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 62be6: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 62bea: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> 62bf0: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 62bf2: 600e bras 62c02 } tvp = (rtems_task_variable_t *)tvp->next; 62bf4: 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) { 62bf6: 4a88 tstl %a0 62bf8: 66e6 bnes 62be0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 62bfa: 4eb9 0004 b0be jsr 4b0be <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 62c00: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 62c02: 242e fff4 movel %fp@(-12),%d2 62c06: 246e fff8 moveal %fp@(-8),%a2 62c0a: 4e5e unlk %fp 62c0c: 4e75 rts ... 00051270 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 51270: 4e56 ffe4 linkw %fp,#-28 51274: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 51278: 262e 0008 movel %fp@(8),%d3 5127c: 242e 000c movel %fp@(12),%d2 51280: 282e 0010 movel %fp@(16),%d4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 51284: 2679 0007 425a moveal 7425a <_Timer_server>,%a3 if ( !timer_server ) 5128a: 4a8b tstl %a3 5128c: 6606 bnes 51294 5128e: 700e moveq #14,%d0 51290: 6000 008e braw 51320 return RTEMS_INCORRECT_STATE; if ( !routine ) 51294: 4a84 tstl %d4 51296: 6606 bnes 5129e 51298: 7009 moveq #9,%d0 5129a: 6000 0084 braw 51320 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 5129e: 4a82 tstl %d2 512a0: 6604 bnes 512a6 512a2: 700a moveq #10,%d0 512a4: 607a bras 51320 512a6: 486e fffc pea %fp@(-4) 512aa: 2f03 movel %d3,%sp@- 512ac: 4879 0007 4222 pea 74222 <_Timer_Information> 512b2: 4eb9 0005 366c jsr 5366c <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 512b8: 4fef 000c lea %sp@(12),%sp 512bc: 2440 moveal %d0,%a2 512be: 4aae fffc tstl %fp@(-4) 512c2: 6704 beqs 512c8 512c4: 7004 moveq #4,%d0 512c6: 6058 bras 51320 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 512c8: 486a 0010 pea %a2@(16) 512cc: 4eb9 0005 51f8 jsr 551f8 <_Watchdog_Remove> _ISR_Disable( level ); 512d2: 203c 0000 0700 movel #1792,%d0 512d8: 40c1 movew %sr,%d1 512da: 8081 orl %d1,%d0 512dc: 46c0 movew %d0,%sr 512de: 49f9 0005 3ec6 lea 53ec6 <_Thread_Enable_dispatch>,%a4 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 512e4: 588f addql #4,%sp 512e6: 4aaa 0018 tstl %a2@(24) 512ea: 6706 beqs 512f2 _ISR_Enable( level ); 512ec: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 512ee: 4e94 jsr %a4@ 512f0: 602c bras 5131e /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 512f2: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 512f4: 256e 0014 0034 movel %fp@(20),%a2@(52) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 512fa: 2544 002c movel %d4,%a2@(44) the_watchdog->id = id; 512fe: 2543 0030 movel %d3,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 51302: 2542 001c movel %d2,%a2@(28) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 51306: 2540 0038 movel %d0,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5130a: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 5130e: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 51310: 2f0a movel %a2,%sp@- 51312: 2f0b movel %a3,%sp@- 51314: 206b 0004 moveal %a3@(4),%a0 51318: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 5131a: 4e94 jsr %a4@ return RTEMS_SUCCESSFUL; 5131c: 508f addql #8,%sp the_timer->Ticker.initial = ticks; _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 5131e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 51320: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 51326: 4e5e unlk %fp 51328: 4e75 rts ... 0005132c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5132c: 4e56 ffe8 linkw %fp,#-24 51330: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 51334: 282e 0008 movel %fp@(8),%d4 51338: 262e 000c movel %fp@(12),%d3 5133c: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 51340: 2679 0007 425a moveal 7425a <_Timer_server>,%a3 if ( !timer_server ) 51346: 4a8b tstl %a3 51348: 6606 bnes 51350 5134a: 700e moveq #14,%d0 5134c: 6000 00a4 braw 513f2 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 51350: 4a39 0007 4014 tstb 74014 <_TOD_Is_set> 51356: 6606 bnes 5135e 51358: 700b moveq #11,%d0 <== NOT EXECUTED 5135a: 6000 0096 braw 513f2 <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !routine ) 5135e: 4a82 tstl %d2 51360: 6606 bnes 51368 51362: 7009 moveq #9,%d0 51364: 6000 008c braw 513f2 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 51368: 2f03 movel %d3,%sp@- 5136a: 4eb9 0004 e7a8 jsr 4e7a8 <_TOD_Validate> 51370: 588f addql #4,%sp 51372: 4a00 tstb %d0 51374: 677a beqs 513f0 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51376: 2f03 movel %d3,%sp@- 51378: 4eb9 0004 e708 jsr 4e708 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5137e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51380: 2600 movel %d0,%d3 if ( seconds <= _TOD_Seconds_since_epoch() ) 51382: b0b9 0007 4092 cmpl 74092 <_TOD_Now>,%d0 51388: 6366 blss 513f0 5138a: 486e fffc pea %fp@(-4) 5138e: 2f04 movel %d4,%sp@- 51390: 4879 0007 4222 pea 74222 <_Timer_Information> 51396: 4eb9 0005 366c jsr 5366c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5139c: 4fef 000c lea %sp@(12),%sp 513a0: 2440 moveal %d0,%a2 513a2: 4aae fffc tstl %fp@(-4) 513a6: 6704 beqs 513ac 513a8: 7004 moveq #4,%d0 513aa: 6046 bras 513f2 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 513ac: 486a 0010 pea %a2@(16) 513b0: 4eb9 0005 51f8 jsr 551f8 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 513b6: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 513bc: 7003 moveq #3,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 513be: 2544 0030 movel %d4,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 513c2: 96b9 0007 4092 subl 74092 <_TOD_Now>,%d3 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; 513c8: 2540 0038 movel %d0,%a2@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 513cc: 2543 001c movel %d3,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 513d0: 2542 002c movel %d2,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 513d4: 42aa 0018 clrl %a2@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 513d8: 2f0a movel %a2,%sp@- 513da: 2f0b movel %a3,%sp@- 513dc: 206b 0004 moveal %a3@(4),%a0 513e0: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 513e2: 4eb9 0005 3ec6 jsr 53ec6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 513e8: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 513ec: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 513ee: 6002 bras 513f2 513f0: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 513f2: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 513f8: 4e5e unlk %fp 513fa: 4e75 rts 000456f8 : #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { 456f8: 4e56 0000 linkw %fp,#0 456fc: 202e 0008 movel %fp@(8),%d0 if ( !the_info ) 45700: 6710 beqs 45712 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 45702: 2f00 movel %d0,%sp@- 45704: 4879 0005 bd76 pea 5bd76 <_Workspace_Area> 4570a: 4eb9 0004 69a4 jsr 469a4 <_Protected_heap_Get_information> 45710: 508f addql #8,%sp } 45712: 4e5e unlk %fp 45714: 4e75 rts ...