0004ca70 : uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4ca70: 41f9 0006 3a60 lea 63a60 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4ca76: 4e56 0000 linkw %fp,#0 return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4ca7a: 202e 0008 movel %fp@(8),%d0 4ca7e: 4e5e unlk %fp 4ca80: 4c50 0000 remul %a0@,%d0,%d0 4ca84: 4e75 rts ... 00047808 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 47808: 4e56 0000 linkw %fp,#0 4780c: 2039 0005 d800 movel 5d800 ,%d0 47812: 2f02 movel %d2,%sp@- 47814: 243c 0000 03e8 movel #1000,%d2 4781a: 4c42 0000 remul %d2,%d0,%d0 return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); } 4781e: 242e 0008 movel %fp@(8),%d2 47822: 4c40 2002 remul %d0,%d2,%d2 47826: 2002 movel %d2,%d0 47828: 241f movel %sp@+,%d2 4782a: 4e5e unlk %fp 4782c: 4e75 rts ... 000466a8 <_API_Mutex_Lock>: API_Mutex_Control *the_mutex ) { ISR_Level level; _ISR_Disable( level ); 466a8: 203c 0000 0700 movel #1792,%d0 #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 466ae: 4e56 0000 linkw %fp,#0 466b2: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 466b6: 40c1 movew %sr,%d1 466b8: 8081 orl %d1,%d0 466ba: 46c0 movew %d0,%sr _CORE_mutex_Seize( 466bc: 2f01 movel %d1,%sp@- 466be: 42a7 clrl %sp@- 466c0: 4878 0001 pea 1 466c4: 2f28 0008 movel %a0@(8),%sp@- 466c8: 4868 0010 pea %a0@(16) 466cc: 4eb9 0004 68fc jsr 468fc <_CORE_mutex_Seize> 466d2: 4fef 0014 lea %sp@(20),%sp the_mutex->Object.id, true, 0, level ); } 466d6: 4e5e unlk %fp 466d8: 4e75 rts ... 00046708 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 46708: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4670c: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 46712: 5280 addql #1,%d0 46714: 206e 0008 moveal %fp@(8),%a0 46718: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 4671e: 42a7 clrl %sp@- 46720: 2f28 0008 movel %a0@(8),%sp@- 46724: 4868 0010 pea %a0@(16) 46728: 4eb9 0004 69ac jsr 469ac <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4672e: 4fef 000c lea %sp@(12),%sp } 46732: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46734: 4ef9 0004 7d3c jmp 47d3c <_Thread_Enable_dispatch> ... 00046628 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 46628: 4e56 0000 linkw %fp,#0 _Chain_Append( &_API_extensions_List, &the_extension->Node ); 4662c: 2f2e 0008 movel %fp@(8),%sp@- 46630: 4879 0005 daee pea 5daee <_API_extensions_List> 46636: 4eb9 0004 673c jsr 4673c <_Chain_Append> 4663c: 508f addql #8,%sp } 4663e: 4e5e unlk %fp 46640: 4e75 rts ... 0004d7bc <_Barrier_Translate_core_barrier_return_code>: }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) { 4d7bc: 41f9 0005 c2f8 lea 5c2f8 <_Barrier_Translate_core_barrier_return_code_>,%a0 4d7c2: 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]; } 4d7c6: 202e 0008 movel %fp@(8),%d0 4d7ca: 4e5e unlk %fp 4d7cc: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4d7d0: 4e75 rts ... 0004d068 <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4d068: 4e56 0000 linkw %fp,#0 the_barrier->Attributes = *the_barrier_attributes; 4d06c: 226e 000c moveal %fp@(12),%a1 the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4d070: 4878 0003 pea 3 void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4d074: 206e 0008 moveal %fp@(8),%a0 the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4d078: 2f3c 0001 0000 movel #65536,%sp@- 4d07e: 42a7 clrl %sp@- CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; 4d080: 2011 movel %a1@,%d0 4d082: 2229 0004 movel %a1@(4),%d1 4d086: 2140 0040 movel %d0,%a0@(64) 4d08a: 2141 0044 movel %d1,%a0@(68) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4d08e: 2f08 movel %a0,%sp@- CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; 4d090: 42a8 0048 clrl %a0@(72) _Thread_queue_Initialize( 4d094: 4eb9 0004 847c jsr 4847c <_Thread_queue_Initialize> 4d09a: 4fef 0010 lea %sp@(16),%sp &the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); } 4d09e: 4e5e unlk %fp 4d0a0: 4e75 rts ... 0004d0a4 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 4d0a4: 4e56 fff4 linkw %fp,#-12 4d0a8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4d0ac: 246e 0008 moveal %fp@(8),%a2 4d0b0: 47f9 0004 80a0 lea 480a0 <_Thread_queue_Dequeue>,%a3 Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4d0b6: 4282 clrl %d2 4d0b8: 2f0a movel %a2,%sp@- 4d0ba: 4e93 jsr %a3@ 4d0bc: 588f addql #4,%sp 4d0be: 4a80 tstl %d0 4d0c0: 670c beqs 4d0ce <_CORE_barrier_Release+0x2a> 4d0c2: 2f0a movel %a2,%sp@- #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 4d0c4: 5282 addql #1,%d2 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4d0c6: 4e93 jsr %a3@ 4d0c8: 588f addql #4,%sp 4d0ca: 4a80 tstl %d0 4d0cc: 66f4 bnes 4d0c2 <_CORE_barrier_Release+0x1e> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } 4d0ce: 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; 4d0d0: 42aa 0048 clrl %a2@(72) return count; } 4d0d4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4d0da: 4e5e unlk %fp 4d0dc: 4e75 rts ... 0004d0e0 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4d0e0: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d0e6: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4d0ea: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d0f0: 48d7 001c moveml %d2-%d4,%sp@ 4d0f4: 242e 000c movel %fp@(12),%d2 4d0f8: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4d0fc: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d100: 206e 0008 moveal %fp@(8),%a0 4d104: 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 ); 4d108: 40c1 movew %sr,%d1 4d10a: 8081 orl %d1,%d0 4d10c: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4d10e: 2028 0048 movel %a0@(72),%d0 4d112: 5280 addql #1,%d0 4d114: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4d118: 4aa8 0040 tstl %a0@(64) 4d11c: 6606 bnes 4d124 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4d11e: b0a8 0044 cmpl %a0@(68),%d0 4d122: 672e beqs 4d152 <_CORE_barrier_Wait+0x72> 4d124: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4d126: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4d12a: 2348 0044 movel %a0,%a1@(68) 4d12e: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4d132: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4d134: 2d43 000c movel %d3,%fp@(12) 4d138: 203c 0004 8560 movel #296288,%d0 4d13e: 2d48 0008 movel %a0,%fp@(8) 4d142: 2d40 0010 movel %d0,%fp@(16) } 4d146: 4cd7 001c moveml %sp@,%d2-%d4 4d14a: 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 ); 4d14c: 4ef9 0004 8200 jmp 48200 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4d152: 7001 moveq #1,%d0 4d154: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4d158: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4d15a: 2d44 0010 movel %d4,%fp@(16) 4d15e: 2d42 000c movel %d2,%fp@(12) 4d162: 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 ); } 4d166: 4cd7 001c moveml %sp@,%d2-%d4 4d16a: 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 ); 4d16c: 4ef9 0004 d0a4 jmp 4d0a4 <_CORE_barrier_Release> ... 00059f30 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 59f30: 4e56 ffe0 linkw %fp,#-32 59f34: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f38: 266e 0008 moveal %fp@(8),%a3 59f3c: 282e 000c movel %fp@(12),%d4 59f40: 242e 0010 movel %fp@(16),%d2 59f44: 2a2e 001c movel %fp@(28),%d5 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 59f48: b4ab 004c cmpl %a3@(76),%d2 59f4c: 6262 bhis 59fb0 <_CORE_message_queue_Broadcast+0x80> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 59f4e: 4aab 0048 tstl %a3@(72) 59f52: 664c bnes 59fa0 <_CORE_message_queue_Broadcast+0x70> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f54: 2f0b movel %a3,%sp@- 59f56: 49f9 0005 c4f4 lea 5c4f4 <_Thread_queue_Dequeue>,%a4 59f5c: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59f5e: 4bf9 0006 2108 lea 62108 ,%a5 59f64: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f66: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f68: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f6a: 4a80 tstl %d0 59f6c: 6722 beqs 59f90 <_CORE_message_queue_Broadcast+0x60> 59f6e: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59f70: 5283 addql #1,%d3 59f72: 2f04 movel %d4,%sp@- 59f74: 2f2a 002c movel %a2@(44),%sp@- 59f78: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59f7a: 206a 0028 moveal %a2@(40),%a0 59f7e: 4fef 000c lea %sp@(12),%sp 59f82: 2082 movel %d2,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f84: 2f0b movel %a3,%sp@- 59f86: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f88: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f8a: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f8c: 4a80 tstl %d0 59f8e: 66de bnes 59f6e <_CORE_message_queue_Broadcast+0x3e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 59f90: 2045 moveal %d5,%a0 59f92: 4280 clrl %d0 59f94: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59f96: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59f9c: 4e5e unlk %fp 59f9e: 4e75 rts * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 59fa0: 2045 moveal %d5,%a0 59fa2: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fa4: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 59faa: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fac: 4e5e unlk %fp 59fae: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 59fb0: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fb2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59fb8: 4e5e unlk %fp <== NOT EXECUTED 59fba: 4e75 rts 00053358 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 53358: 4e56 0000 linkw %fp,#0 5335c: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 5335e: 2f2e 0010 movel %fp@(16),%sp@- 53362: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 53366: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 5336a: 2f0a movel %a2,%sp@- 5336c: 4eb9 0004 da2c jsr 4da2c <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 53372: 4fef 000c lea %sp@(12),%sp 53376: 4aaa 0048 tstl %a2@(72) 5337a: 6612 bnes 5338e <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 5337c: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 53382: 246e fffc moveal %fp@(-4),%a2 53386: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 53388: 4ef9 0004 e724 jmp 4e724 <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5338e: 2f0a movel %a2,%sp@- 53390: 4eb9 0005 33ac jsr 533ac <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 53396: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5339c: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 5339e: 246e fffc moveal %fp@(-4),%a2 533a2: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 533a4: 4ef9 0004 e724 jmp 4e724 <_Workspace_Free> ... 0004fdf8 <_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)) { 4fdf8: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4fdfa: 4e56 fff4 linkw %fp,#-12 4fdfe: 202e 0014 movel %fp@(20),%d0 4fe02: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe06: 246e 0008 moveal %fp@(8),%a2 4fe0a: 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)) { 4fe0e: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4fe10: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4fe14: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4fe18: 2540 004c movel %d0,%a2@(76) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe1c: 4a81 tstl %d1 4fe1e: 6620 bnes 4fe40 <_CORE_message_queue_Initialize+0x48> 4fe20: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4fe22: 2601 movel %d1,%d3 4fe24: 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 * 4fe2a: 2003 movel %d3,%d0 4fe2c: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4fe30: b280 cmpl %d0,%d1 4fe32: 631c blss 4fe50 <_CORE_message_queue_Initialize+0x58> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe34: 4200 clrb %d0 } 4fe36: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fe3c: 4e5e unlk %fp 4fe3e: 4e75 rts * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 4fe40: 2200 movel %d0,%d1 4fe42: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4fe44: 76fc moveq #-4,%d3 4fe46: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4fe48: b280 cmpl %d0,%d1 4fe4a: 64d6 bccs 4fe22 <_CORE_message_queue_Initialize+0x2a> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe4c: 4200 clrb %d0 <== NOT EXECUTED 4fe4e: 60e6 bras 4fe36 <_CORE_message_queue_Initialize+0x3e><== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fe50: 2f00 movel %d0,%sp@- 4fe52: 4eb9 0005 2ac0 jsr 52ac0 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fe58: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fe5a: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fe5e: 67d4 beqs 4fe34 <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4fe60: 2f03 movel %d3,%sp@- 4fe62: 2f02 movel %d2,%sp@- 4fe64: 2f00 movel %d0,%sp@- 4fe66: 486a 0060 pea %a2@(96) 4fe6a: 4eb9 0005 47d0 jsr 547d0 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4fe70: 4878 0006 pea 6 4fe74: 7001 moveq #1,%d0 4fe76: 206e 000c moveal %fp@(12),%a0 4fe7a: b090 cmpl %a0@,%d0 4fe7c: 57c0 seq %d0 4fe7e: 4878 0080 pea 80 4fe82: 49c0 extbl %d0 4fe84: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4fe86: 41ea 0054 lea %a2@(84),%a0 4fe8a: 2f00 movel %d0,%sp@- 4fe8c: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4fe90: 41ea 0050 lea %a2@(80),%a0 4fe94: 2548 0058 movel %a0,%a2@(88) 4fe98: 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; 4fe9a: 42aa 0054 clrl %a2@(84) 4fe9e: 4eb9 0005 1e98 jsr 51e98 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fea4: 4fef 0020 lea %sp@(32),%sp } 4fea8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4feae: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4feb0: 4e5e unlk %fp 4feb2: 4e75 rts 0004feb4 <_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 ); 4feb4: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4feba: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4febe: 2079 0006 80b2 moveal 680b2 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4fec4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4fec8: 2a2e 000c movel %fp@(12),%d5 4fecc: 282e 001c movel %fp@(28),%d4 4fed0: 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; 4fed4: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4fed8: 242e 0010 movel %fp@(16),%d2 4fedc: 226e 0014 moveal %fp@(20),%a1 4fee0: 262e 0018 movel %fp@(24),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4fee4: 40c1 movew %sr,%d1 4fee6: 8081 orl %d1,%d0 4fee8: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4feea: 200a movel %a2,%d0 4feec: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4fef2: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4fef6: b08b cmpl %a3,%d0 4fef8: 674e beqs 4ff48 <_CORE_message_queue_Seize+0x94> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4fefa: 2053 moveal %a3@,%a0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 4fefc: 53aa 0048 subql #1,%a2@(72) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4ff00: 49ea 0050 lea %a2@(80),%a4 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4ff04: 2548 0050 movel %a0,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4ff08: 214c 0004 movel %a4,%a0@(4) _ISR_Enable( level ); 4ff0c: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; 4ff0e: 22ab 0008 movel %a3@(8),%a1@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4ff12: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 4ff16: 2079 0006 80b2 moveal 680b2 <_Thread_Executing>,%a0 4ff1c: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ff20: 2f11 movel %a1@,%sp@- 4ff22: 486b 000c pea %a3@(12) 4ff26: 2f02 movel %d2,%sp@- 4ff28: 4eb9 0005 7478 jsr 57478 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 ); 4ff2e: 4fef 000c lea %sp@(12),%sp 4ff32: 2d4a 0008 movel %a2,%fp@(8) 4ff36: 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 ); } 4ff3a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ff40: 4e5e unlk %fp 4ff42: 4ef9 0004 fd2c jmp 4fd2c <_Chain_Append> return; } #endif } if ( !wait ) { 4ff48: 4a03 tstb %d3 4ff4a: 6612 bnes 4ff5e <_CORE_message_queue_Seize+0xaa> _ISR_Enable( level ); 4ff4c: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ff4e: 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 ); } 4ff50: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ff56: 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 ); } 4ff5a: 4e5e unlk %fp 4ff5c: 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; 4ff5e: 7001 moveq #1,%d0 4ff60: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4ff64: 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; 4ff68: 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; 4ff6c: 2145 0020 movel %d5,%a0@(32) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4ff70: 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 ); 4ff74: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4ff76: 49f9 0005 1f7c lea 51f7c <_Thread_queue_Timeout>,%a4 4ff7c: 2d44 000c movel %d4,%fp@(12) 4ff80: 2d4c 0010 movel %a4,%fp@(16) 4ff84: 2d4a 0008 movel %a2,%fp@(8) } 4ff88: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ff8e: 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 ); 4ff90: 4ef9 0005 1c1c jmp 51c1c <_Thread_queue_Enqueue_with_handler> ... 0004ff98 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 4ff98: 4e56 fff4 linkw %fp,#-12 4ff9c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4ffa0: 246e 0008 moveal %fp@(8),%a2 4ffa4: 242e 0010 movel %fp@(16),%d2 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 4ffa8: b4aa 004c cmpl %a2@(76),%d2 4ffac: 6256 bhis 50004 <_CORE_message_queue_Submit+0x6c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 4ffae: 202a 0048 movel %a2@(72),%d0 4ffb2: 675c beqs 50010 <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 4ffb4: b0aa 0044 cmpl %a2@(68),%d0 4ffb8: 650c bcss 4ffc6 <_CORE_message_queue_Submit+0x2e> 4ffba: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 4ffbc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ffc2: 4e5e unlk %fp 4ffc4: 4e75 rts RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 4ffc6: 486a 0060 pea %a2@(96) 4ffca: 4eb9 0004 fd8c jsr 4fd8c <_Chain_Get> 4ffd0: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ffd2: 2f02 movel %d2,%sp@- 4ffd4: 2f2e 000c movel %fp@(12),%sp@- 4ffd8: 486b 000c pea %a3@(12) 4ffdc: 4eb9 0005 7478 jsr 57478 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4ffe2: 2742 0008 movel %d2,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4ffe6: 2f2e 001c movel %fp@(28),%sp@- 4ffea: 2f0b movel %a3,%sp@- 4ffec: 2f0a movel %a2,%sp@- 4ffee: 4eb9 0005 4818 jsr 54818 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4fff4: 4fef 001c lea %sp@(28),%sp size ); the_message->Contents.size = size; _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4fff8: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 4fffa: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50000: 4e5e unlk %fp 50002: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50004: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50006: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5000c: 4e5e unlk %fp 5000e: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50010: 2f0a movel %a2,%sp@- 50012: 4eb9 0005 1abc jsr 51abc <_Thread_queue_Dequeue> if ( the_thread ) { 50018: 588f addql #4,%sp /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 5001a: 2640 moveal %d0,%a3 if ( the_thread ) { 5001c: 4a80 tstl %d0 5001e: 672e beqs 5004e <_CORE_message_queue_Submit+0xb6> 50020: 2f02 movel %d2,%sp@- 50022: 2f2e 000c movel %fp@(12),%sp@- 50026: 2f2b 002c movel %a3@(44),%sp@- 5002a: 4eb9 0005 7478 jsr 57478 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 50030: 206b 0028 moveal %a3@(40),%a0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 50034: 4fef 000c lea %sp@(12),%sp buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = (uint32_t) submit_type; 50038: 4280 clrl %d0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5003a: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 5003c: 222e 001c movel %fp@(28),%d1 50040: 2741 0024 movel %d1,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50044: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5004a: 4e5e unlk %fp 5004c: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 5004e: 202a 0048 movel %a2@(72),%d0 /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 50052: b0aa 0044 cmpl %a2@(68),%d0 50056: 6400 ff62 bccw 4ffba <_CORE_message_queue_Submit+0x22> 5005a: 6000 ff6a braw 4ffc6 <_CORE_message_queue_Submit+0x2e> ... 0004b094 <_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 ) { 4b094: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4b098: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 4b09e: 2f0a movel %a2,%sp@- 4b0a0: 206e 0008 moveal %fp@(8),%a0 4b0a4: 246e 000c moveal %fp@(12),%a2 4b0a8: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4b0aa: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4b0ae: 4aa8 004e tstl %a0@(78) 4b0b2: 673a beqs 4b0ee <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4b0b4: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b0b8: 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; 4b0ba: 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; 4b0c0: 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; 4b0c4: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b0c8: 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; 4b0cc: 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 ) || 4b0d0: b280 cmpl %d0,%d1 4b0d2: 672e beqs 4b102 <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4b0d4: 123c 0003 moveb #3,%d1 4b0d8: b280 cmpl %d0,%d1 4b0da: 674e beqs 4b12a <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b0dc: 2012 movel %a2@,%d0 4b0de: 46c0 movew %d0,%sr 4b0e0: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4b0e2: 242e fff8 movel %fp@(-8),%d2 4b0e6: 246e fffc moveal %fp@(-4),%a2 4b0ea: 4e5e unlk %fp 4b0ec: 4e75 rts /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4b0ee: b3e8 005a cmpal %a0@(90),%a1 4b0f2: 671a beqs 4b10e <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4b0f4: 242e fff8 movel %fp@(-8),%d2 the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4b0f8: 7001 moveq #1,%d0 4b0fa: 246e fffc moveal %fp@(-4),%a2 4b0fe: 4e5e unlk %fp 4b100: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b102: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b106: 2012 movel %a2@,%d0 4b108: 46c0 movew %d0,%sr 4b10a: 4280 clrl %d0 4b10c: 60d4 bras 4b0e2 <_CORE_mutex_Seize_interrupt_trylock+0x4e> * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b10e: 2028 0040 movel %a0@(64),%d0 4b112: 6658 bnes 4b16c <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4b114: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4b118: 2012 movel %a2@,%d0 4b11a: 46c0 movew %d0,%sr 4b11c: 242e fff8 movel %fp@(-8),%d2 4b120: 4280 clrl %d0 4b122: 246e fffc moveal %fp@(-4),%a2 4b126: 4e5e unlk %fp 4b128: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b12a: 2429 001c movel %a1@(28),%d2 4b12e: 2002 movel %d2,%d0 4b130: 5280 addql #1,%d0 4b132: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4b136: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4b13a: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4b13e: b081 cmpl %d1,%d0 4b140: 6700 0082 beqw 4b1c4 <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4b144: 6244 bhis 4b18a <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b146: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b148: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b14a: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4b14e: 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; 4b152: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4b156: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4b15a: 2012 movel %a2@,%d0 4b15c: 46c0 movew %d0,%sr 4b15e: 242e fff8 movel %fp@(-8),%d2 4b162: 4280 clrl %d0 4b164: 246e fffc moveal %fp@(-4),%a2 4b168: 4e5e unlk %fp 4b16a: 4e75 rts * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b16c: 7201 moveq #1,%d1 4b16e: b280 cmpl %d0,%d1 4b170: 6682 bnes 4b0f4 <_CORE_mutex_Seize_interrupt_trylock+0x60> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4b172: 7002 moveq #2,%d0 <== NOT EXECUTED 4b174: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4b178: 2012 movel %a2@,%d0 <== NOT EXECUTED 4b17a: 46c0 movew %d0,%sr <== NOT EXECUTED 4b17c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4b180: 4280 clrl %d0 <== NOT EXECUTED 4b182: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b186: 4e5e unlk %fp <== NOT EXECUTED 4b188: 4e75 rts <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4b18a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4b190: 5280 addql #1,%d0 4b192: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4b198: 2012 movel %a2@,%d0 4b19a: 46c0 movew %d0,%sr _Thread_Change_priority( 4b19c: 42a7 clrl %sp@- 4b19e: 2f28 004a movel %a0@(74),%sp@- 4b1a2: 2f28 005a movel %a0@(90),%sp@- 4b1a6: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4b1ac: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4b1b2: 242e fff8 movel %fp@(-8),%d2 4b1b6: 4fef 000c lea %sp@(12),%sp 4b1ba: 4280 clrl %d0 4b1bc: 246e fffc moveal %fp@(-4),%a2 4b1c0: 4e5e unlk %fp 4b1c2: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4b1c4: 2012 movel %a2@,%d0 4b1c6: 46c0 movew %d0,%sr 4b1c8: 242e fff8 movel %fp@(-8),%d2 4b1cc: 4280 clrl %d0 4b1ce: 246e fffc moveal %fp@(-4),%a2 4b1d2: 4e5e unlk %fp 4b1d4: 4e75 rts ... 000469ac <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 469ac: 4e56 0000 linkw %fp,#0 469b0: 2f0a movel %a2,%sp@- 469b2: 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; 469b6: 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 ) { 469ba: 4a2a 0044 tstb %a2@(68) 469be: 6712 beqs 469d2 <_CORE_mutex_Surrender+0x26> if ( !_Thread_Is_executing( holder ) ) 469c0: b1f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a0 469c6: 670a beqs 469d2 <_CORE_mutex_Surrender+0x26> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 469c8: 246e fffc moveal %fp@(-4),%a2 * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { if ( !_Thread_Is_executing( holder ) ) 469cc: 7003 moveq #3,%d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 469ce: 4e5e unlk %fp 469d0: 4e75 rts return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 469d2: 202a 0052 movel %a2@(82),%d0 469d6: 6768 beqs 46a40 <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 469d8: 5380 subql #1,%d0 469da: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 469de: 6660 bnes 46a40 <_CORE_mutex_Surrender+0x94> 469e0: 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 ) || 469e4: 7202 moveq #2,%d1 469e6: b280 cmpl %d0,%d1 469e8: 6700 0084 beqw 46a6e <_CORE_mutex_Surrender+0xc2> 469ec: 123c 0003 moveb #3,%d1 469f0: b280 cmpl %d0,%d1 469f2: 677a beqs 46a6e <_CORE_mutex_Surrender+0xc2> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 469f4: 42aa 005a clrl %a2@(90) /* * 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 ) || 469f8: 7202 moveq #2,%d1 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 469fa: 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 ) || 469fe: b280 cmpl %d0,%d1 46a00: 6748 beqs 46a4a <_CORE_mutex_Surrender+0x9e> 46a02: 123c 0003 moveb #3,%d1 46a06: b280 cmpl %d0,%d1 46a08: 6740 beqs 46a4a <_CORE_mutex_Surrender+0x9e> /* * 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 ) ) ) { 46a0a: 2f0a movel %a2,%sp@- 46a0c: 4eb9 0004 80a0 jsr 480a0 <_Thread_queue_Dequeue> 46a12: 588f addql #4,%sp 46a14: 2040 moveal %d0,%a0 46a16: 4a80 tstl %d0 46a18: 6700 0090 beqw 46aaa <_CORE_mutex_Surrender+0xfe> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a1c: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 46a1e: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a24: 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; 46a28: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 46a2c: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 46a30: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a34: b280 cmpl %d0,%d1 46a36: 6764 beqs 46a9c <_CORE_mutex_Surrender+0xf0> 46a38: 123c 0003 moveb #3,%d1 46a3c: b280 cmpl %d0,%d1 46a3e: 6734 beqs 46a74 <_CORE_mutex_Surrender+0xc8> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a40: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46a44: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a46: 4e5e unlk %fp 46a48: 4e75 rts _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 && 46a4a: 4aa8 001c tstl %a0@(28) 46a4e: 66ba bnes 46a0a <_CORE_mutex_Surrender+0x5e> holder->real_priority != holder->current_priority ) { 46a50: 2028 0018 movel %a0@(24),%d0 46a54: b0a8 0014 cmpl %a0@(20),%d0 46a58: 67b0 beqs 46a0a <_CORE_mutex_Surrender+0x5e> _Thread_Change_priority( holder, holder->real_priority, true ); 46a5a: 4878 0001 pea 1 46a5e: 2f00 movel %d0,%sp@- 46a60: 2f08 movel %a0,%sp@- 46a62: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> 46a68: 4fef 000c lea %sp@(12),%sp 46a6c: 609c bras 46a0a <_CORE_mutex_Surrender+0x5e> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 46a6e: 53a8 001c subql #1,%a0@(28) 46a72: 6080 bras 469f4 <_CORE_mutex_Surrender+0x48> 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++; 46a74: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 46a78: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 46a7c: b0a8 0014 cmpl %a0@(20),%d0 46a80: 64be bccs 46a40 <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 46a82: 42a7 clrl %sp@- 46a84: 2f00 movel %d0,%sp@- 46a86: 2f08 movel %a0,%sp@- 46a88: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a8e: 246e fffc moveal %fp@(-4),%a2 the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ _Thread_Change_priority( 46a92: 4fef 000c lea %sp@(12),%sp 46a96: 4280 clrl %d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a98: 4e5e unlk %fp 46a9a: 4e75 rts 46a9c: 246e fffc moveal %fp@(-4),%a2 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++; 46aa0: 4280 clrl %d0 46aa2: 52a8 001c addql #1,%a0@(28) } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aa6: 4e5e unlk %fp 46aa8: 4e75 rts } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46aaa: 7001 moveq #1,%d0 46aac: 2540 004e movel %d0,%a2@(78) return CORE_MUTEX_STATUS_SUCCESSFUL; } 46ab0: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46ab4: 4200 clrb %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46ab6: 4e5e unlk %fp 46ab8: 4e75 rts ... 00046ac8 <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 46ac8: 4e56 0000 linkw %fp,#0 46acc: 226e 000c moveal %fp@(12),%a1 the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize( 46ad0: 4878 0003 pea 3 46ad4: 4878 0200 pea 200 void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 46ad8: 206e 0008 moveal %fp@(8),%a0 the_semaphore->Attributes = *the_semaphore_attributes; 46adc: 2011 movel %a1@,%d0 46ade: 2229 0004 movel %a1@(4),%d1 the_semaphore->count = initial_value; 46ae2: 216e 0010 0048 movel %fp@(16),%a0@(72) CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes; 46ae8: 2140 0040 movel %d0,%a0@(64) 46aec: 2141 0044 movel %d1,%a0@(68) the_semaphore->count = initial_value; _Thread_queue_Initialize( 46af0: 7201 moveq #1,%d1 46af2: b2a9 0004 cmpl %a1@(4),%d1 46af6: 57c0 seq %d0 46af8: 49c0 extbl %d0 46afa: 4480 negl %d0 46afc: 2f00 movel %d0,%sp@- 46afe: 2f08 movel %a0,%sp@- 46b00: 4eb9 0004 847c jsr 4847c <_Thread_queue_Initialize> 46b06: 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 ); } 46b0a: 4e5e unlk %fp 46b0c: 4e75 rts ... 00046b10 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 46b10: 4e56 0000 linkw %fp,#0 46b14: 2f0a movel %a2,%sp@- 46b16: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b1a: 2f0a movel %a2,%sp@- 46b1c: 4eb9 0004 80a0 jsr 480a0 <_Thread_queue_Dequeue> 46b22: 588f addql #4,%sp 46b24: 4a80 tstl %d0 46b26: 670a beqs 46b32 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b28: 246e fffc moveal %fp@(-4),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b2c: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b2e: 4e5e unlk %fp 46b30: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b32: 203c 0000 0700 movel #1792,%d0 46b38: 40c1 movew %sr,%d1 46b3a: 8081 orl %d1,%d0 46b3c: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b3e: 202a 0048 movel %a2@(72),%d0 46b42: b0aa 0040 cmpl %a2@(64),%d0 46b46: 6412 bccs 46b5a <_CORE_semaphore_Surrender+0x4a> the_semaphore->count += 1; 46b48: 5280 addql #1,%d0 46b4a: 2540 0048 movel %d0,%a2@(72) 46b4e: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b50: 46c1 movew %d1,%sr } return status; } 46b52: 246e fffc moveal %fp@(-4),%a2 46b56: 4e5e unlk %fp 46b58: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b5a: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b5c: 46c1 movew %d1,%sr <== NOT EXECUTED 46b5e: 60f2 bras 46b52 <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED 0004673c <_Chain_Append>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4673c: 203c 0000 0700 movel #1792,%d0 void _Chain_Append( Chain_Control *the_chain, Chain_Node *node ) { 46742: 4e56 0000 linkw %fp,#0 46746: 206e 000c moveal %fp@(12),%a0 4674a: 2f0a movel %a2,%sp@- 4674c: 226e 0008 moveal %fp@(8),%a1 ISR_Level level; _ISR_Disable( level ); 46750: 40c1 movew %sr,%d1 46752: 8081 orl %d1,%d0 46754: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 46756: 2009 movel %a1,%d0 46758: 5880 addql #4,%d0 4675a: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4675c: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 46760: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 46764: 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; 46768: 2488 movel %a0,%a2@ _Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level ); 4676a: 46c1 movew %d1,%sr } 4676c: 245f moveal %sp@+,%a2 4676e: 4e5e unlk %fp 46770: 4e75 rts ... 0004afe8 <_Chain_Extract>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4afe8: 203c 0000 0700 movel #1792,%d0 */ void _Chain_Extract( Chain_Node *node ) { 4afee: 4e56 0000 linkw %fp,#0 4aff2: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 4aff6: 40c1 movew %sr,%d1 4aff8: 8081 orl %d1,%d0 4affa: 46c0 movew %d0,%sr { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4affc: 2268 0004 moveal %a0@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b000: 2050 moveal %a0@,%a0 previous = the_node->previous; next->previous = previous; previous->next = next; 4b002: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b004: 2149 0004 movel %a1,%a0@(4) _Chain_Extract_unprotected( node ); _ISR_Enable( level ); 4b008: 46c1 movew %d1,%sr } 4b00a: 4e5e unlk %fp 4b00c: 4e75 rts ... 0004b010 <_Chain_Get>: { ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4b010: 203c 0000 0700 movel #1792,%d0 */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 4b016: 4e56 0000 linkw %fp,#0 4b01a: 226e 0008 moveal %fp@(8),%a1 4b01e: 2f0a movel %a2,%sp@- ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4b020: 40c1 movew %sr,%d1 4b022: 8081 orl %d1,%d0 4b024: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b026: 2049 moveal %a1,%a0 4b028: 2018 movel %a0@+,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b02a: b1c0 cmpal %d0,%a0 4b02c: 6712 beqs 4b040 <_Chain_Get+0x30> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4b02e: 2440 moveal %d0,%a2 4b030: 2052 moveal %a2@,%a0 the_chain->first = new_first; 4b032: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4b034: 2149 0004 movel %a1,%a0@(4) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 4b038: 46c1 movew %d1,%sr return return_node; } 4b03a: 245f moveal %sp@+,%a2 4b03c: 4e5e unlk %fp 4b03e: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b040: 4280 clrl %d0 return_node = NULL; _ISR_Disable( level ); if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 4b042: 46c1 movew %d1,%sr return return_node; } 4b044: 245f moveal %sp@+,%a2 4b046: 4e5e unlk %fp 4b048: 4e75 rts ... 0004abb8 <_Event_Manager_initialization>: * * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { 4abb8: 4e56 0000 linkw %fp,#0 */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 4abbc: 4e5e unlk %fp * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4abbe: 42b9 0005 db32 clrl 5db32 <_Event_Sync_state> */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 4abc4: 4e75 rts ... 000456d0 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 456d0: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456d6: 4e56 ffec linkw %fp,#-20 456da: 222e 0008 movel %fp@(8),%d1 456de: 48d7 043c moveml %d2-%d5/%a2,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 456e2: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456e8: 242e 000c movel %fp@(12),%d2 456ec: 2a2e 0010 movel %fp@(16),%d5 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 456f0: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456f4: 226e 0014 moveal %fp@(20),%a1 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 456f8: 206a 0108 moveal %a2@(264),%a0 _ISR_Disable( level ); 456fc: 40c4 movew %sr,%d4 456fe: 8084 orl %d4,%d0 45700: 46c0 movew %d0,%sr pending_events = api->pending_events; 45702: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45704: 2001 movel %d1,%d0 45706: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 45708: 670c beqs 45716 <_Event_Seize+0x46> 4570a: b081 cmpl %d1,%d0 4570c: 6700 0084 beqw 45792 <_Event_Seize+0xc2> 45710: 0802 0001 btst #1,%d2 45714: 667c bnes 45792 <_Event_Seize+0xc2> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 45716: 0802 0000 btst #0,%d2 4571a: 6662 bnes 4577e <_Event_Seize+0xae> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 4571c: 2542 0030 movel %d2,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 45720: 7401 moveq #1,%d2 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 45722: 2541 0024 movel %d1,%a2@(36) executing->Wait.return_argument = event_out; 45726: 2549 0028 movel %a1,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4572a: 23c2 0005 db32 movel %d2,5db32 <_Event_Sync_state> _ISR_Enable( level ); 45730: 46c4 movew %d4,%sr if ( ticks ) { 45732: 4a85 tstl %d5 45734: 6672 bnes 457a8 <_Event_Seize+0xd8> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 45736: 4878 0100 pea 100 4573a: 2f0a movel %a2,%sp@- 4573c: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> _ISR_Disable( level ); 45742: 203c 0000 0700 movel #1792,%d0 45748: 40c1 movew %sr,%d1 4574a: 8081 orl %d1,%d0 4574c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4574e: 7401 moveq #1,%d2 45750: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 45752: 2039 0005 db32 movel 5db32 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45758: 42b9 0005 db32 clrl 5db32 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4575e: b480 cmpl %d0,%d2 45760: 6700 00a4 beqw 45806 <_Event_Seize+0x136> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45764: 2d4a 000c movel %a2,%fp@(12) 45768: 2d41 0010 movel %d1,%fp@(16) } 4576c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45772: 2d40 0008 movel %d0,%fp@(8) } 45776: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45778: 4ef9 0004 77b4 jmp 477b4 <_Thread_blocking_operation_Cancel> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4577e: 46c4 movew %d4,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 45780: 720d moveq #13,%d1 45782: 2541 0034 movel %d1,%a2@(52) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45786: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; 4578c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4578e: 4e5e unlk %fp 45790: 4e75 rts pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 45792: 2200 movel %d0,%d1 45794: 4681 notl %d1 45796: c283 andl %d3,%d1 45798: 2081 movel %d1,%a0@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4579a: 46c4 movew %d4,%sr *event_out = seized_events; 4579c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4579e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 457a4: 4e5e unlk %fp 457a6: 4e75 rts _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 457a8: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457ac: 223c 0004 599c movel #285084,%d1 the_watchdog->id = id; 457b2: 2540 0068 movel %d0,%a2@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457b6: 2541 0064 movel %d1,%a2@(100) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 457ba: 2545 0054 movel %d5,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 457be: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 457c2: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 457c6: 486a 0048 pea %a2@(72) 457ca: 4879 0005 da2c pea 5da2c <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8e0c jsr 48e0c <_Watchdog_Insert> 457d6: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 457d8: 4878 0100 pea 100 457dc: 2f0a movel %a2,%sp@- 457de: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> _ISR_Disable( level ); 457e4: 203c 0000 0700 movel #1792,%d0 457ea: 40c1 movew %sr,%d1 457ec: 8081 orl %d1,%d0 457ee: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 457f0: 7401 moveq #1,%d2 457f2: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 457f4: 2039 0005 db32 movel 5db32 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 457fa: 42b9 0005 db32 clrl 5db32 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 45800: b480 cmpl %d0,%d2 45802: 6600 ff60 bnew 45764 <_Event_Seize+0x94> _ISR_Enable( level ); 45806: 46c1 movew %d1,%sr * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45808: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4580e: 4e5e unlk %fp 45810: 4e75 rts ... 00045870 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 45870: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 45876: 4e56 ffec linkw %fp,#-20 4587a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4587e: 246e 0008 moveal %fp@(8),%a2 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 45882: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 45886: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 4588a: 40c3 movew %sr,%d3 4588c: 8083 orl %d3,%d0 4588e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 45890: 222a 0024 movel %a2@(36),%d1 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45894: 2001 movel %d1,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 45896: 2410 movel %a0@,%d2 45898: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4589a: 6778 beqs 45914 <_Event_Surrender+0xa4> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4589c: 2279 0005 d9ee moveal 5d9ee <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a2 458ac: 6700 00a0 beqw 4594e <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 458b0: 2a2a 0010 movel %a2@(16),%d5 458b4: 0285 0000 0100 andil #256,%d5 458ba: 674c beqs 45908 <_Event_Surrender+0x98> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 458bc: b081 cmpl %d1,%d0 458be: 6706 beqs 458c6 <_Event_Surrender+0x56> 458c0: 0804 0001 btst #1,%d4 458c4: 6742 beqs 45908 <_Event_Surrender+0x98> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 458c6: 2200 movel %d0,%d1 458c8: 4681 notl %d1 458ca: c282 andl %d2,%d1 458cc: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458ce: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 458d2: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458d6: 2080 movel %d0,%a0@ _ISR_Flash( level ); 458d8: 203c 0000 0700 movel #1792,%d0 458de: 46c3 movew %d3,%sr 458e0: 8083 orl %d3,%d0 458e2: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 458e4: 7a02 moveq #2,%d5 458e6: baaa 0050 cmpl %a2@(80),%d5 458ea: 6734 beqs 45920 <_Event_Surrender+0xb0> _ISR_Enable( level ); 458ec: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 458ee: 2f3c 1003 fff8 movel #268697592,%sp@- 458f4: 2f0a movel %a2,%sp@- 458f6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 458fc: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 458fe: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45904: 4e5e unlk %fp 45906: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 45908: 46c3 movew %d3,%sr } 4590a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45910: 4e5e unlk %fp 45912: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 45914: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45916: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4591c: 4e5e unlk %fp 4591e: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 45920: 7003 moveq #3,%d0 45922: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 45926: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45928: 486a 0048 pea %a2@(72) 4592c: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 45940: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 45944: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4594a: 4e5e unlk %fp 4594c: 4e75 rts * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 4594e: 2279 0005 db32 moveal 5db32 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45954: 7a02 moveq #2,%d5 45956: ba89 cmpl %a1,%d5 45958: 6710 beqs 4596a <_Event_Surrender+0xfa> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4595a: 2279 0005 db32 moveal 5db32 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45960: 1a3c 0001 moveb #1,%d5 45964: ba89 cmpl %a1,%d5 45966: 6600 ff48 bnew 458b0 <_Event_Surrender+0x40> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4596a: b081 cmpl %d1,%d0 4596c: 6706 beqs 45974 <_Event_Surrender+0x104> 4596e: 0804 0001 btst #1,%d4 45972: 671a beqs 4598e <_Event_Surrender+0x11e> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 45974: 2200 movel %d0,%d1 45976: 4681 notl %d1 45978: c282 andl %d2,%d1 4597a: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4597c: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 45980: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45984: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 45986: 7003 moveq #3,%d0 45988: 23c0 0005 db32 movel %d0,5db32 <_Event_Sync_state> } _ISR_Enable( level ); 4598e: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45990: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45996: 4e5e unlk %fp 45998: 4e75 rts ... 0004599c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4599c: 4e56 fffc linkw %fp,#-4 459a0: 2f03 movel %d3,%sp@- 459a2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 459a4: 486e fffc pea %fp@(-4) 459a8: 2f2e 0008 movel %fp@(8),%sp@- 459ac: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_Event_Timeout+0x60> * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 459ba: 223c 0000 0700 movel #1792,%d1 459c0: 40c2 movew %sr,%d2 459c2: 8282 orl %d2,%d1 459c4: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 459c6: 2040 moveal %d0,%a0 459c8: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 459cc: b0b9 0005 da0e cmpl 5da0e <_Thread_Executing>,%d0 459d2: 6734 beqs 45a08 <_Event_Timeout+0x6c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 459d4: 7606 moveq #6,%d3 459d6: 2040 moveal %d0,%a0 459d8: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 459dc: 46c2 movew %d2,%sr 459de: 2f3c 1003 fff8 movel #268697592,%sp@- 459e4: 2f00 movel %d0,%sp@- 459e6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 459ec: 508f addql #8,%sp 459ee: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 459fc: 242e fff4 movel %fp@(-12),%d2 45a00: 262e fff8 movel %fp@(-8),%d3 45a04: 4e5e unlk %fp 45a06: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45a08: 2239 0005 db32 movel 5db32 <_Event_Sync_state>,%d1 45a0e: 7601 moveq #1,%d3 45a10: b681 cmpl %d1,%d3 45a12: 66c0 bnes 459d4 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a14: 7606 moveq #6,%d3 45a16: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a18: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a1a: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a1e: 23c1 0005 db32 movel %d1,5db32 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 45a24: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45a26: 2f3c 1003 fff8 movel #268697592,%sp@- 45a2c: 2f00 movel %d0,%sp@- 45a2e: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45a34: 508f addql #8,%sp 45a36: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> ... 0004b310 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b310: 4e56 ffcc linkw %fp,#-52 4b314: 226e 000c moveal %fp@(12),%a1 4b318: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b31c: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 4b320: 2c09 movel %a1,%d6 4b322: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4b324: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b328: 222e 0010 movel %fp@(16),%d1 4b32c: 282e 0014 movel %fp@(20),%d4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4b330: 206a 0008 moveal %a2@(8),%a0 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 4b334: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4b338: bc89 cmpl %a1,%d6 4b33a: 6500 0146 bcsw 4b482 <_Heap_Allocate_aligned_with_boundary+0x172> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4b33e: 4a84 tstl %d4 4b340: 6600 013c bnew 4b47e <_Heap_Allocate_aligned_with_boundary+0x16e> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b344: b1ca cmpal %a2,%a0 4b346: 6700 0152 beqw 4b49a <_Heap_Allocate_aligned_with_boundary+0x18a> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b34a: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b34e: 7a04 moveq #4,%d5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b350: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b352: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b354: 4283 clrl %d3 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b356: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b35a: 2d45 fff4 movel %d5,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4b35e: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4b362: 5283 addql #1,%d3 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4b364: b086 cmpl %d6,%d0 4b366: 630e blss 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4b368: 4a81 tstl %d1 4b36a: 6628 bnes 4b394 <_Heap_Allocate_aligned_with_boundary+0x84> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4b36c: 2408 movel %a0,%d2 4b36e: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4b370: 4a82 tstl %d2 4b372: 6600 00ee bnew 4b462 <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4b376: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b37a: b1ca cmpal %a2,%a0 4b37c: 66e0 bnes 4b35e <_Heap_Allocate_aligned_with_boundary+0x4e> 4b37e: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4b380: b6aa 0044 cmpl %a2@(68),%d3 4b384: 6304 blss 4b38a <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b386: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4b38a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b390: 4e5e unlk %fp 4b392: 4e75 rts uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4b394: 7efe moveq #-2,%d7 4b396: 4be8 0008 lea %a0@(8),%a5 4b39a: c087 andl %d7,%d0 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4b39c: 286a 0014 moveal %a2@(20),%a4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4b3a0: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b3a2: 2a2e fff8 movel %fp@(-8),%d5 4b3a6: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b3a8: 242e fff4 movel %fp@(-12),%d2 4b3ac: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4b3ae: 2e02 movel %d2,%d7 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4b3b0: d085 addl %d5,%d0 4b3b2: 4c41 7005 remul %d1,%d5,%d7 4b3b6: 9485 subl %d5,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4b3b8: b480 cmpl %d0,%d2 4b3ba: 630a blss 4b3c6 <_Heap_Allocate_aligned_with_boundary+0xb6> 4b3bc: 2a00 movel %d0,%d5 4b3be: 4c41 5002 remul %d1,%d2,%d5 4b3c2: 9082 subl %d2,%d0 4b3c4: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4b3c6: 4a84 tstl %d4 4b3c8: 676c beqs 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4b3ca: 2002 movel %d2,%d0 4b3cc: d089 addl %a1,%d0 4b3ce: 2e00 movel %d0,%d7 4b3d0: 4c44 7005 remul %d4,%d5,%d7 4b3d4: 2e00 movel %d0,%d7 4b3d6: 9e85 subl %d5,%d7 4b3d8: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4b3da: be82 cmpl %d2,%d7 4b3dc: 6358 blss 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> 4b3de: be80 cmpl %d0,%d7 4b3e0: 6454 bccs 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4b3e2: 2e0d movel %a5,%d7 4b3e4: de89 addl %a1,%d7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4b3e6: ba87 cmpl %d7,%d5 4b3e8: 658c bcss 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4b3ea: 9a89 subl %a1,%d5 4b3ec: 2005 movel %d5,%d0 4b3ee: 2647 moveal %d7,%a3 4b3f0: 4c41 0002 remul %d1,%d2,%d0 4b3f4: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b3f6: 2005 movel %d5,%d0 4b3f8: d089 addl %a1,%d0 4b3fa: 2405 movel %d5,%d2 4b3fc: 2e00 movel %d0,%d7 4b3fe: 4c44 7005 remul %d4,%d5,%d7 4b402: 2e00 movel %d0,%d7 4b404: 9e85 subl %d5,%d7 4b406: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4b408: be82 cmpl %d2,%d7 4b40a: 632a blss 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> 4b40c: be80 cmpl %d0,%d7 4b40e: 6426 bccs 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4b410: ba8b cmpl %a3,%d5 4b412: 6500 ff62 bcsw 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4b416: 9a89 subl %a1,%d5 4b418: 2005 movel %d5,%d0 4b41a: 4c41 0002 remul %d1,%d2,%d0 4b41e: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b420: 2005 movel %d5,%d0 4b422: d089 addl %a1,%d0 4b424: 2405 movel %d5,%d2 4b426: 2e00 movel %d0,%d7 4b428: 4c44 7005 remul %d4,%d5,%d7 4b42c: 2e00 movel %d0,%d7 4b42e: 9e85 subl %d5,%d7 4b430: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4b432: be82 cmpl %d2,%d7 4b434: 62d6 bhis 4b40c <_Heap_Allocate_aligned_with_boundary+0xfc> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4b436: b48d cmpl %a5,%d2 4b438: 6500 ff3c bcsw 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4b43c: 70f8 moveq #-8,%d0 4b43e: 9088 subl %a0,%d0 4b440: 2a40 moveal %d0,%a5 4b442: 2e02 movel %d2,%d7 4b444: dbc2 addal %d2,%a5 4b446: 202e fffc movel %fp@(-4),%d0 4b44a: 4c40 7005 remul %d0,%d5,%d7 4b44e: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4b450: bbcc cmpal %a4,%a5 4b452: 6400 ff1c bccw 4b370 <_Heap_Allocate_aligned_with_boundary+0x60> 4b456: 4a8d tstl %a5 4b458: 6600 ff1c bnew 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> boundary ); } } if ( alloc_begin != 0 ) { 4b45c: 4a82 tstl %d2 4b45e: 6700 ff16 beqw 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b462: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4b464: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b468: 2f02 movel %d2,%sp@- 4b46a: 2f08 movel %a0,%sp@- 4b46c: 2f0a movel %a2,%sp@- 4b46e: 4eb9 0004 6e38 jsr 46e38 <_Heap_Block_allocate> 4b474: 4fef 0010 lea %sp@(16),%sp 4b478: 2002 movel %d2,%d0 4b47a: 6000 ff04 braw 4b380 <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4b47e: b889 cmpl %a1,%d4 4b480: 640c bccs 4b48e <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b482: 4280 clrl %d0 } return (void *) alloc_begin; } 4b484: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b48a: 4e5e unlk %fp 4b48c: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4b48e: 4a81 tstl %d1 4b490: 6600 feb2 bnew 4b344 <_Heap_Allocate_aligned_with_boundary+0x34> 4b494: 2200 movel %d0,%d1 4b496: 6000 feac braw 4b344 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; } } while ( block != free_list_tail ) { 4b49a: 4283 clrl %d3 4b49c: 4280 clrl %d0 4b49e: 6000 fee0 braw 4b380 <_Heap_Allocate_aligned_with_boundary+0x70> ... 00046e38 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e38: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e3a: 4e56 ffe0 linkw %fp,#-32 46e3e: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 46e42: 2041 moveal %d1,%a0 46e44: 5188 subql #8,%a0 46e46: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46e4a: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e4e: 7601 moveq #1,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 46e50: 2848 moveal %a0,%a4 46e52: 240a movel %a2,%d2 46e54: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e56: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e5a: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e5e: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e62: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e66: 4a03 tstb %d3 46e68: 6600 00aa bnew 46f14 <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 46e6c: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e70: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 46e72: 52ab 0040 addql #1,%a3@(64) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 46e76: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 46e7a: 2a40 moveal %d0,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 46e7c: 226a 000c moveal %a2@(12),%a1 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e80: c6aa 0004 andl %a2@(4),%d3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 46e84: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46e88: 202b 0010 movel %a3@(16),%d0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e8c: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 46e90: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46e94: b08c cmpl %a4,%d0 46e96: 6200 0088 bhiw 46f20 <_Heap_Block_allocate+0xe8> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 46e9a: 262a 0004 movel %a2@(4),%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 46e9e: 4c40 1004 remul %d0,%d4,%d1 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 46ea2: 7201 moveq #1,%d1 46ea4: 91c4 subal %d4,%a0 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 46ea6: 2008 movel %a0,%d0 46ea8: 908a subl %a2,%d0 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 46eaa: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 46eae: c2aa 0004 andl %a2@(4),%d1 46eb2: 6700 0082 beqw 46f36 <_Heap_Block_allocate+0xfe> } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46eb6: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 46eb8: 52ab 0038 addql #1,%a3@(56) 46ebc: 220a movel %a2,%d1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 46ebe: 2869 0008 moveal %a1@(8),%a4 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46ec2: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46ec4: 7801 moveq #1,%d4 46ec6: 8880 orl %d0,%d4 new_block->next = next; 46ec8: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46ecc: d483 addl %d3,%d2 46ece: 9488 subl %a0,%d2 new_block->prev = block_before; 46ed0: 2549 000c movel %a1,%a2@(12) block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46ed4: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 46ed8: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 46edc: 294a 000c movel %a2,%a4@(12) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46ee0: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46ee2: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46ee4: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46ee8: 2f05 movel %d5,%sp@- 46eea: 2f01 movel %d1,%sp@- 46eec: 2f08 movel %a0,%sp@- 46eee: 2f0b movel %a3,%sp@- 46ef0: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46ef6: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 46efa: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 46efe: b0ab 0034 cmpl %a3@(52),%d0 46f02: 6404 bccs 46f08 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 46f04: 2740 0034 movel %d0,%a3@(52) } return block; } 46f08: 200a movel %a2,%d0 46f0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f10: 4e5e unlk %fp 46f12: 4e75 rts stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46f14: 202b 0010 movel %a3@(16),%d0 /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 46f18: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 46f1a: b08c cmpl %a4,%d0 46f1c: 6300 ff7c blsw 46e9a <_Heap_Block_allocate+0x62> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 46f20: 4874 5800 pea %a4@(00000000,%d5:l) 46f24: 2f09 movel %a1,%sp@- 46f26: 2f0a movel %a2,%sp@- 46f28: 2f0b movel %a3,%sp@- 46f2a: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f30: 4fef 0010 lea %sp@(16),%sp 46f34: 60c4 bras 46efa <_Heap_Block_allocate+0xc2> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 46f36: 95d2 subal %a2@,%a2 Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 46f38: 78fe moveq #-2,%d4 46f3a: 2209 movel %a1,%d1 46f3c: c8aa 0004 andl %a2@(4),%d4 46f40: d084 addl %d4,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f42: 78fe moveq #-2,%d4 46f44: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46f46: 7801 moveq #1,%d4 46f48: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f4a: d483 addl %d3,%d2 46f4c: 9488 subl %a0,%d2 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46f4e: 2544 0004 movel %d4,%a2@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f52: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46f54: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46f56: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f5a: 2f05 movel %d5,%sp@- 46f5c: 2f01 movel %d1,%sp@- 46f5e: 2f08 movel %a0,%sp@- 46f60: 2f0b movel %a3,%sp@- 46f62: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f68: 4fef 0010 lea %sp@(16),%sp 46f6c: 608c bras 46efa <_Heap_Block_allocate+0xc2> ... 00050418 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50418: 4e56 fff4 linkw %fp,#-12 5041c: 206e 0008 moveal %fp@(8),%a0 50420: 202e 000c movel %fp@(12),%d0 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 50424: 2228 001c movel %a0@(28),%d1 uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 50428: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 5042c: 48d7 040c moveml %d2-%d3/%a2,%sp@ Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 50430: b0a8 0018 cmpl %a0@(24),%d0 50434: 6410 bccs 50446 <_Heap_Extend+0x2e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 50436: b280 cmpl %d0,%d1 50438: 671c beqs 50456 <_Heap_Extend+0x3e> 5043a: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 5043c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50442: 4e5e unlk %fp 50444: 4e75 rts * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 50446: b280 cmpl %d0,%d1 50448: 63ec blss 50436 <_Heap_Extend+0x1e> 5044a: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 5044c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50452: 4e5e unlk %fp 50454: 4e75 rts { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 50456: 2200 movel %d0,%d1 50458: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 5045c: 70f8 moveq #-8,%d0 5045e: 9089 subl %a1,%d0 50460: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 50462: 2600 movel %d0,%d3 50464: 4c68 3002 0010 remul %a0@(16),%d2,%d3 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 5046a: 2141 001c movel %d1,%a0@(28) extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 5046e: 246e 0014 moveal %fp@(20),%a2 50472: 9082 subl %d2,%d0 50474: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50476: b0a8 0014 cmpl %a0@(20),%d0 5047a: 640c bccs 50488 <_Heap_Extend+0x70> /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 5047c: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 5047e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50484: 4e5e unlk %fp 50486: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50488: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5048a: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5048e: c4a9 0004 andl %a1@(4),%d2 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 50492: 2228 0020 movel %a0@(32),%d1 50496: 928a subl %a2,%d1 50498: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 5049a: 214a 0024 movel %a2,%a0@(36) 5049e: 2342 0004 movel %d2,%a1@(4) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 504a2: 7401 moveq #1,%d2 504a4: 8481 orl %d1,%d2 504a6: 2542 0004 movel %d2,%a2@(4) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 504aa: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 504ae: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 504b2: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 504b6: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 504ba: 2f08 movel %a0,%sp@- 504bc: 4eb9 0004 b590 jsr 4b590 <_Heap_Free> 504c2: 508f addql #8,%sp 504c4: 4280 clrl %d0 504c6: 60b6 bras 5047e <_Heap_Extend+0x66> 0004b4a4 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4b4a4: 4e56 ffe4 linkw %fp,#-28 4b4a8: 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 ) 4b4ac: 2040 moveal %d0,%a0 4b4ae: 5188 subql #8,%a0 4b4b0: 226e 0008 moveal %fp@(8),%a1 4b4b4: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4b4ba: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4b4be: 2029 0020 movel %a1@(32),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4b4c2: 91c1 subal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b4c4: b088 cmpl %a0,%d0 4b4c6: 6200 00a0 bhiw 4b568 <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4b4ca: 2229 0024 movel %a1@(36),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b4ce: b288 cmpl %a0,%d1 4b4d0: 6500 0096 bcsw 4b568 <_Heap_Free+0xc4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4b4d4: 2628 0004 movel %a0@(4),%d3 4b4d8: 74fe moveq #-2,%d2 4b4da: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4b4dc: 45f0 2800 lea %a0@(00000000,%d2:l),%a2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b4e0: b5c0 cmpal %d0,%a2 4b4e2: 6500 0084 bcsw 4b568 <_Heap_Free+0xc4> 4b4e6: b5c1 cmpal %d1,%a2 4b4e8: 627e bhis 4b568 <_Heap_Free+0xc4> 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; 4b4ea: 282a 0004 movel %a2@(4),%d4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4b4ee: 7a01 moveq #1,%d5 4b4f0: ca84 andl %d4,%d5 4b4f2: 4a05 tstb %d5 4b4f4: 6772 beqs 4b568 <_Heap_Free+0xc4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4b4f6: 7afe moveq #-2,%d5 4b4f8: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b4fa: b5c1 cmpal %d1,%a2 4b4fc: 6700 00fa beqw 4b5f8 <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4b500: 7a01 moveq #1,%d5 4b502: 7c01 moveq #1,%d6 4b504: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4b508: bd85 eorl %d6,%d5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4b50a: 7c01 moveq #1,%d6 4b50c: c686 andl %d6,%d3 4b50e: 4a03 tstb %d3 4b510: 6660 bnes 4b572 <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4b512: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4b514: 91c3 subal %d3,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4b516: b1c0 cmpal %d0,%a0 4b518: 654e bcss 4b568 <_Heap_Free+0xc4> 4b51a: b1c1 cmpal %d1,%a0 4b51c: 624a bhis 4b568 <_Heap_Free+0xc4> 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) ) { 4b51e: 7001 moveq #1,%d0 4b520: c0a8 0004 andl %a0@(4),%d0 4b524: 4a00 tstb %d0 4b526: 6740 beqs 4b568 <_Heap_Free+0xc4> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4b528: 4a05 tstb %d5 4b52a: 6700 00d2 beqw 4b5fe <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4b52e: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4b532: 53a9 0038 subql #1,%a1@(56) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4b536: d882 addl %d2,%d4 4b538: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b53a: 7001 moveq #1,%d0 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4b53c: 246a 0008 moveal %a2@(8),%a2 4b540: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4b542: 2183 3800 movel %d3,%a0@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b546: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4b54a: 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; 4b54e: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b552: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b556: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b55a: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b55e: 7001 moveq #1,%d0 return( true ); } 4b560: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4b564: 4e5e unlk %fp 4b566: 4e75 rts 4b568: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4b56c: 4200 clrb %d0 } 4b56e: 4e5e unlk %fp 4b570: 4e75 rts uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4b572: 4a05 tstb %d5 4b574: 6736 beqs 4b5ac <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4b576: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4b57a: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b57c: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4b57e: 246a 0008 moveal %a2@(8),%a2 4b582: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4b584: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4b588: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4b58c: 214a 0008 movel %a2,%a0@(8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b590: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b594: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b598: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b59c: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b5a0: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4b5a2: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4b5a6: 2748 0008 movel %a0,%a3@(8) 4b5aa: 60b4 bras 4b560 <_Heap_Free+0xbc> next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4b5ac: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b5ae: 7cfe moveq #-2,%d6 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4b5b0: 8a82 orl %d2,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4b5b2: 2669 0008 moveal %a1@(8),%a3 4b5b6: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b5ba: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4b5be: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4b5c0: 2029 0038 movel %a1@(56),%d0 4b5c4: 5280 addql #1,%d0 new_block->next = next; 4b5c6: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4b5ca: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4b5ce: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4b5d2: 2748 000c movel %a0,%a3@(12) 4b5d6: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4b5da: b0a9 003c cmpl %a1@(60),%d0 4b5de: 6300 ff72 blsw 4b552 <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b5e2: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b5e6: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b5ea: 52a9 0050 addql #1,%a1@(80) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4b5ee: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b5f2: 7001 moveq #1,%d0 4b5f4: 6000 ff6a braw 4b560 <_Heap_Free+0xbc> _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b5f8: 4205 clrb %d5 4b5fa: 6000 ff0e braw 4b50a <_Heap_Free+0x66> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4b5fe: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b600: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b602: 7cfe moveq #-2,%d6 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b604: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4b606: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b608: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b60a: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b60e: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b612: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b616: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b61a: 52a9 0050 addql #1,%a1@(80) 4b61e: 6000 ff40 braw 4b560 <_Heap_Free+0xbc> ... 0007abec <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 7abec: 4e56 fff4 linkw %fp,#-12 7abf0: 206e 0008 moveal %fp@(8),%a0 7abf4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7abf8: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 7abfc: 2428 0024 movel %a0@(36),%d2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 7ac00: 2268 0020 moveal %a0@(32),%a1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 7ac04: 4292 clrl %a2@ the_info->Free.total = 0; 7ac06: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 7ac0a: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 7ac0e: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 7ac12: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 7ac16: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 7ac1a: b489 cmpl %a1,%d2 7ac1c: 6746 beqs 7ac64 <_Heap_Get_information+0x78> uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 7ac1e: 260a movel %a2,%d3 7ac20: 0683 0000 000c addil #12,%d3 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7ac26: 2229 0004 movel %a1@(4),%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 7ac2a: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 7ac2c: 204a moveal %a2,%a0 7ac2e: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7ac30: d3c0 addal %d0,%a1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7ac32: 2229 0004 movel %a1@(4),%d1 7ac36: 0801 0000 btst #0,%d1 7ac3a: 6702 beqs 7ac3e <_Heap_Get_information+0x52> 7ac3c: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 7ac3e: 5290 addql #1,%a0@ info->total += the_size; 7ac40: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 7ac44: b0a8 0004 cmpl %a0@(4),%d0 7ac48: 6304 blss 7ac4e <_Heap_Get_information+0x62> info->largest = the_size; 7ac4a: 2140 0004 movel %d0,%a0@(4) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7ac4e: b3c2 cmpal %d2,%a1 7ac50: 66d8 bnes 7ac2a <_Heap_Get_information+0x3e> 7ac52: 202a 0014 movel %a2@(20),%d0 7ac56: 5080 addql #8,%d0 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7ac58: 2540 0014 movel %d0,%a2@(20) } 7ac5c: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7ac60: 4e5e unlk %fp 7ac62: 4e75 rts the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7ac64: 7008 moveq #8,%d0 <== NOT EXECUTED /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7ac66: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 7ac6a: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7ac6e: 4e5e unlk %fp <== NOT EXECUTED 7ac70: 4e75 rts <== NOT EXECUTED ... 0005a670 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 5a670: 4e56 ffe0 linkw %fp,#-32 5a674: 226e 0014 moveal %fp@(20),%a1 5a678: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5a67c: 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 ) 5a680: 2202 movel %d2,%d1 5a682: 2042 moveal %d2,%a0 5a684: 5188 subql #8,%a0 5a686: 246e 0008 moveal %fp@(8),%a2 5a68a: 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; 5a690: 4291 clrl %a1@ void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 5a692: 266e 0018 moveal %fp@(24),%a3 5a696: 91c0 subal %d0,%a0 5a698: 202e 0010 movel %fp@(16),%d0 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; 5a69c: 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 5a69e: b1ea 0020 cmpal %a2@(32),%a0 5a6a2: 653c bcss 5a6e0 <_Heap_Resize_block+0x70> 5a6a4: b1ea 0024 cmpal %a2@(36),%a0 5a6a8: 6236 bhis 5a6e0 <_Heap_Resize_block+0x70> - 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; 5a6aa: 76fe moveq #-2,%d3 5a6ac: 78fe moveq #-2,%d4 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 5a6ae: 7a01 moveq #1,%d5 5a6b0: 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; 5a6b2: 7204 moveq #4,%d1 5a6b4: 9282 subl %d2,%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 5a6b6: c6a8 0004 andl %a0@(4),%d3 { 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; 5a6ba: 49f0 3800 lea %a0@(00000000,%d3:l),%a4 uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5a6be: d28c addl %a4,%d1 5a6c0: c8ac 0004 andl %a4@(4),%d4 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 5a6c4: cab4 4804 andl %a4@(00000004,%d4:l),%d5 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; 5a6c8: 2281 movel %d1,%a1@ 5a6ca: bd85 eorl %d6,%d5 5a6cc: 1c05 moveb %d5,%d6 if ( next_block_is_free ) { 5a6ce: 661c bnes 5a6ec <_Heap_Resize_block+0x7c> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 5a6d0: b280 cmpl %d0,%d1 5a6d2: 6420 bccs 5a6f4 <_Heap_Resize_block+0x84> 5a6d4: 7001 moveq #1,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5a6d6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5a6dc: 4e5e unlk %fp 5a6de: 4e75 rts 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; 5a6e0: 7002 moveq #2,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5a6e2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5a6e8: 4e5e unlk %fp 5a6ea: 4e75 rts _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 5a6ec: d684 addl %d4,%d3 alloc_size += next_block_size; 5a6ee: d284 addl %d4,%d1 } if ( new_alloc_size > alloc_size ) { 5a6f0: b280 cmpl %d0,%d1 5a6f2: 65e0 bcss 5a6d4 <_Heap_Resize_block+0x64> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 5a6f4: 4a06 tstb %d6 5a6f6: 672a beqs 5a722 <_Heap_Resize_block+0xb2> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5a6f8: 7201 moveq #1,%d1 5a6fa: c2a8 0004 andl %a0@(4),%d1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 5a6fe: 226c 000c moveal %a4@(12),%a1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5a702: 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; 5a704: 286c 0008 moveal %a4@(8),%a4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5a708: 2141 0004 movel %d1,%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; 5a70c: 7201 moveq #1,%d1 5a70e: 83b0 3804 orl %d1,%a0@(00000004,%d3:l) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 5a712: 2949 000c movel %a1,%a4@(12) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; 5a716: 99aa 0030 subl %d4,%a2@(48) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; 5a71a: 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; 5a71e: 234c 0008 movel %a4,%a1@(8) stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 5a722: 2f00 movel %d0,%sp@- 5a724: 2f02 movel %d2,%sp@- 5a726: 2f08 movel %a0,%sp@- 5a728: 2f0a movel %a2,%sp@- 5a72a: 4eb9 0004 6e38 jsr 46e38 <_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; 5a730: 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; 5a734: 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 ); 5a736: 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; 5a738: 2240 moveal %d0,%a1 5a73a: 93c2 subal %d2,%a1 /* Statistics */ ++stats->resizes; 5a73c: 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; 5a73e: c2a8 0004 andl %a0@(4),%d1 5a742: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 5a746: 2689 movel %a1,%a3@ /* Statistics */ ++stats->resizes; 5a748: 52aa 0054 addql #1,%a2@(84) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5a74c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5a752: 4e5e unlk %fp 5a754: 4e75 rts ... 00047e04 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 47e04: 4e56 0000 linkw %fp,#0 47e08: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 47e0c: 4a2e 000f tstb %fp@(15) 47e10: 6624 bnes 47e36 <_Heap_Walk_print+0x32> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); 47e12: 2f00 movel %d0,%sp@- 47e14: 4879 0005 c7a0 pea 5c7a0 <_Status_Object_name_errors_to_status+0x420> 47e1a: 4eb9 0004 3ad0 jsr 43ad0 47e20: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 47e22: 486e 0014 pea %fp@(20) 47e26: 2f2e 0010 movel %fp@(16),%sp@- 47e2a: 4eb9 0004 595c jsr 4595c 47e30: 508f addql #8,%sp va_end( ap ); } 47e32: 4e5e unlk %fp 47e34: 4e75 rts static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); 47e36: 2f00 movel %d0,%sp@- 47e38: 4879 0005 c795 pea 5c795 <_Status_Object_name_errors_to_status+0x415> 47e3e: 4eb9 0004 3ad0 jsr 43ad0 47e44: 508f addql #8,%sp } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 47e46: 486e 0014 pea %fp@(20) 47e4a: 2f2e 0010 movel %fp@(16),%sp@- 47e4e: 4eb9 0004 595c jsr 4595c 47e54: 508f addql #8,%sp va_end( ap ); } 47e56: 4e5e unlk %fp 47e58: 4e75 rts ... 0004649e <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 4649e: 4e56 fff0 linkw %fp,#-16 464a2: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 464a6: 2639 0005 c256 movel 5c256 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 464ac: 2439 0005 c252 movel 5c252 ,%d2 number_of_drivers = Configuration.maximum_drivers; 464b2: 2839 0005 c24e movel 5c24e ,%d4 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 464b8: b882 cmpl %d2,%d4 464ba: 6216 bhis 464d2 <_IO_Manager_initialization+0x34> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 464bc: 23c3 0005 db72 movel %d3,5db72 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 464c2: 23c2 0005 db6e movel %d2,5db6e <_IO_Number_of_drivers> ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 464c8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464ce: 4e5e unlk %fp 464d0: 4e75 rts /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 464d2: 2004 movel %d4,%d0 464d4: 2a04 movel %d4,%d5 464d6: e788 lsll #3,%d0 464d8: eb8d lsll #5,%d5 464da: 9a80 subl %d0,%d5 464dc: 2f05 movel %d5,%sp@- 464de: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 464e4: 2f05 movel %d5,%sp@- 464e6: 42a7 clrl %sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 464e8: 23c4 0005 db6e movel %d4,5db6e <_IO_Number_of_drivers> memset( 464ee: 2f00 movel %d0,%sp@- /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 464f0: 23c0 0005 db72 movel %d0,5db72 <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 464f6: 4eb9 0004 e094 jsr 4e094 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 464fc: 4fef 0010 lea %sp@(16),%sp 46500: 4a82 tstl %d2 46502: 67c4 beqs 464c8 <_IO_Manager_initialization+0x2a> 46504: 2839 0005 db72 movel 5db72 <_IO_Driver_address_table>,%d4 4650a: 4280 clrl %d0 4650c: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 4650e: 2243 moveal %d3,%a1 46510: 2044 moveal %d4,%a0 46512: d3c0 addal %d0,%a1 46514: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46516: 5281 addql #1,%d1 46518: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4651e: 20d9 movel %a1@+,%a0@+ 46520: 20d9 movel %a1@+,%a0@+ 46522: 20d9 movel %a1@+,%a0@+ 46524: 20d9 movel %a1@+,%a0@+ 46526: 20d9 movel %a1@+,%a0@+ 46528: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4652a: b282 cmpl %d2,%d1 4652c: 649a bccs 464c8 <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 4652e: 2243 moveal %d3,%a1 46530: 2044 moveal %d4,%a0 46532: d3c0 addal %d0,%a1 46534: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46536: 5281 addql #1,%d1 46538: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4653e: 20d9 movel %a1@+,%a0@+ 46540: 20d9 movel %a1@+,%a0@+ 46542: 20d9 movel %a1@+,%a0@+ 46544: 20d9 movel %a1@+,%a0@+ 46546: 20d9 movel %a1@+,%a0@+ 46548: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4654a: b282 cmpl %d2,%d1 4654c: 65c0 bcss 4650e <_IO_Manager_initialization+0x70> 4654e: 6000 ff78 braw 464c8 <_IO_Manager_initialization+0x2a> ... 00046f70 <_Internal_error_Occurred>: _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f70: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f72: 4e56 0000 linkw %fp,#0 46f76: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f7a: 1001 moveb %d1,%d0 46f7c: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f7e: 2f03 movel %d3,%sp@- 46f80: 202e 0008 movel %fp@(8),%d0 46f84: 2f02 movel %d2,%sp@- 46f86: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f8a: 2f02 movel %d2,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46f8c: 13c1 0005 d9fe moveb %d1,5d9fe <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f92: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46f94: 23c0 0005 d9fa movel %d0,5d9fa <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f9a: 2f00 movel %d0,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46f9c: 23c2 0005 da00 movel %d2,5da00 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46fa2: 4eb9 0004 8ca2 jsr 48ca2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46fa8: 307c 0700 moveaw #1792,%a0 46fac: 2608 movel %a0,%d3 46fae: 40c0 movew %sr,%d0 46fb0: 8083 orl %d3,%d0 46fb2: 46c0 movew %d0,%sr 46fb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46fb6: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46fbc: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46fbe: 7005 moveq #5,%d0 46fc0: 4fef 000c lea %sp@(12),%sp 46fc4: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> 46fca: 60fe bras 46fca <_Internal_error_Occurred+0x5a> 0004ecac <_Message_queue_Translate_core_message_queue_return_code>: }; rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( uint32_t status ) { 4ecac: 41f9 0006 6814 lea 66814 <_Message_queue_Translate_core_return_code_>,%a0 4ecb2: 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]; } 4ecb6: 202e 0008 movel %fp@(8),%d0 4ecba: 4e5e unlk %fp 4ecbc: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4ecc0: 4e75 rts ... 00047034 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47034: 4e56 fff0 linkw %fp,#-16 47038: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4703c: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 47040: 4aaa 0014 tstl %a2@(20) 47044: 660c bnes 47052 <_Objects_Allocate+0x1e> 47046: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 47048: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4704e: 4e5e unlk %fp 47050: 4e75 rts /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47052: 240a movel %a2,%d2 47054: 0682 0000 001c addil #28,%d2 4705a: 47f9 0004 b010 lea 4b010 <_Chain_Get>,%a3 47060: 2f02 movel %d2,%sp@- 47062: 4e93 jsr %a3@ if ( information->auto_extend ) { 47064: 588f addql #4,%sp 47066: 4a2a 0010 tstb %a2@(16) 4706a: 67dc beqs 47048 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 4706c: 4a80 tstl %d0 4706e: 6738 beqs 470a8 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47070: 2040 moveal %d0,%a0 47072: 4281 clrl %d1 47074: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47076: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47078: 362a 0008 movew %a2@(8),%d3 4707c: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 47080: 306a 0028 moveaw %a2@(40),%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47084: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47088: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 4708a: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4708c: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 47090: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47094: 206a 002a moveal %a2@(42),%a0 47098: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 4709a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470a0: 4e5e unlk %fp block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470a2: d1c1 addal %d1,%a0 470a4: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 470a6: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 470a8: 2f0a movel %a2,%sp@- 470aa: 4eb9 0004 70f0 jsr 470f0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470b0: 2f02 movel %d2,%sp@- 470b2: 4e93 jsr %a3@ } if ( the_object ) { 470b4: 508f addql #8,%sp 470b6: 4a80 tstl %d0 470b8: 66b6 bnes 47070 <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 470ba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470c0: 4e5e unlk %fp 470c2: 4e75 rts 000470c4 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 470c4: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 470c6: 4e56 0000 linkw %fp,#0 470ca: 226e 000c moveal %fp@(12),%a1 470ce: 206e 0008 moveal %fp@(8),%a0 470d2: 2f0a movel %a2,%sp@- 470d4: 2468 0018 moveal %a0@(24),%a2 470d8: 3029 000a movew %a1@(10),%d0 470dc: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 470e0: 2d49 000c movel %a1,%fp@(12) } 470e4: 245f moveal %sp@+,%a2 470e6: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 470e8: 4ef9 0004 7648 jmp 47648 <_Objects_Namespace_remove> ... 000470f0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 470f0: 4e56 ffcc linkw %fp,#-52 470f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 470f8: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 470fc: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 470fe: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 47102: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47106: 4a88 tstl %a0 47108: 6700 022c beqw 47336 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 4710c: 322a 000e movew %a2@(14),%d1 47110: 302a 0012 movew %a2@(18),%d0 47114: 3801 movew %d1,%d4 47116: 0284 0000 ffff andil #65535,%d4 4711c: 88c0 divuw %d0,%d4 4711e: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47124: 6700 0224 beqw 4734a <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47128: 4a90 tstl %a0@ 4712a: 6700 021e beqw 4734a <_Objects_Extend_information+0x25a> 4712e: 5888 addql #4,%a0 47130: 2605 movel %d5,%d3 47132: 4282 clrl %d2 47134: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 4713a: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4713c: 5282 addql #1,%d2 4713e: b484 cmpl %d4,%d2 47140: 6404 bccs 47146 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 47142: 4a98 tstl %a0@+ 47144: 66f4 bnes 4713a <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47146: 0281 0000 ffff andil #65535,%d1 4714c: 2641 moveal %d1,%a3 4714e: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 47150: b7fc 0000 ffff cmpal #65535,%a3 47156: 6200 0186 bhiw 472de <_Objects_Extend_information+0x1ee> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 4715a: 41ea 0014 lea %a2@(20),%a0 4715e: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 47162: 4a2a 0010 tstb %a2@(16) 47166: 6700 0180 beqw 472e8 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 4716a: 2f00 movel %d0,%sp@- 4716c: 4eb9 0004 90a4 jsr 490a4 <_Workspace_Allocate> if ( !new_object_block ) 47172: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 47174: 2c00 movel %d0,%d6 if ( !new_object_block ) 47176: 6700 0166 beqw 472de <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 4717a: 4280 clrl %d0 4717c: 302a 000e movew %a2@(14),%d0 47180: b083 cmpl %d3,%d0 47182: 6200 00c4 bhiw 47248 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 47186: 2a44 moveal %d4,%a5 47188: 528d addql #1,%a5 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 4718a: 200b movel %a3,%d0 4718c: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47190: d088 addl %a0,%d0 47192: d085 addl %d5,%d0 47194: e588 lsll #2,%d0 47196: 2f00 movel %d0,%sp@- 47198: 4eb9 0004 90a4 jsr 490a4 <_Workspace_Allocate> if ( !object_blocks ) { 4719e: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 471a0: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471a2: 4a80 tstl %d0 471a4: 6700 01b2 beqw 47358 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471a8: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 471aa: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471ac: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 471ae: 302a 000e movew %a2@(14),%d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 471b2: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 471b6: de8d addl %a5,%d7 471b8: b085 cmpl %d5,%d0 471ba: 6200 013c bhiw 472f8 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471be: 4a85 tstl %d5 471c0: 670c beqs 471ce <_Objects_Extend_information+0xde> information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 471c2: 2047 moveal %d7,%a0 471c4: 4280 clrl %d0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 471c6: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471c8: 5280 addql #1,%d0 471ca: b085 cmpl %d5,%d0 471cc: 65f8 bcss 471c6 <_Objects_Extend_information+0xd6> 471ce: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 471d0: 4281 clrl %d1 471d2: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 471d6: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 471da: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 471dc: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 471e0: b283 cmpl %d3,%d1 471e2: 6310 blss 471f4 <_Objects_Extend_information+0x104> 471e4: 2247 moveal %d7,%a1 471e6: 2003 movel %d3,%d0 471e8: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 471ec: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 471ee: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 471f0: b280 cmpl %d0,%d1 471f2: 62f8 bhis 471ec <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 471f4: 203c 0000 0700 movel #1792,%d0 471fa: 40c4 movew %sr,%d4 471fc: 8084 orl %d4,%d0 471fe: 46c0 movew %d0,%sr information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47200: 2012 movel %a2@,%d0 47202: 7218 moveq #24,%d1 47204: 4285 clrl %d5 47206: e3a8 lsll %d1,%d0 47208: 3a0b movew %a3,%d5 4720a: 4281 clrl %d1 4720c: 2245 moveal %d5,%a1 4720e: 7a1b moveq #27,%d5 47210: 322a 0004 movew %a2@(4),%d1 47214: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47218: 206a 002e moveal %a2@(46),%a0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4721c: eba9 lsll %d5,%d1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 4721e: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 47222: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47226: 8081 orl %d1,%d0 47228: 2209 movel %a1,%d1 4722a: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 4722c: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47230: 2541 000a movel %d1,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 47234: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47238: 46c4 movew %d4,%sr if ( old_tables ) 4723a: 4a88 tstl %a0 4723c: 670a beqs 47248 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4723e: 2f08 movel %a0,%sp@- 47240: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47246: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47248: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4724c: 4280 clrl %d0 4724e: 280e movel %fp,%d4 47250: 0684 ffff fff4 addil #-12,%d4 47256: 47f9 0004 b010 lea 4b010 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4725c: 2a0a movel %a2,%d5 4725e: 0685 0000 001c addil #28,%d5 47264: 49f9 0004 673c lea 4673c <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4726a: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4726c: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47270: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47274: 2f2a 0014 movel %a2@(20),%sp@- 47278: 2f00 movel %d0,%sp@- 4727a: 2f06 movel %d6,%sp@- 4727c: 2f04 movel %d4,%sp@- 4727e: 4eb9 0004 b04c jsr 4b04c <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47284: 4fef 0010 lea %sp@(16),%sp 47288: 2f04 movel %d4,%sp@- 4728a: 4e93 jsr %a3@ 4728c: 588f addql #4,%sp 4728e: 4a80 tstl %d0 47290: 6732 beqs 472c4 <_Objects_Extend_information+0x1d4> the_object->id = _Objects_Build_id( 47292: 2212 movel %a2@,%d1 47294: 7c18 moveq #24,%d6 47296: 7e1b moveq #27,%d7 47298: 2040 moveal %d0,%a0 4729a: eda9 lsll %d6,%d1 4729c: 4286 clrl %d6 4729e: 3c2a 0004 movew %a2@(4),%d6 472a2: 08c1 0010 bset #16,%d1 472a6: efae lsll %d7,%d6 472a8: 8286 orl %d6,%d1 472aa: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 472ac: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 472ae: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472b2: 2f00 movel %d0,%sp@- 472b4: 2f05 movel %d5,%sp@- 472b6: 4e94 jsr %a4@ index++; 472b8: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 472ba: 2f04 movel %d4,%sp@- 472bc: 4e93 jsr %a3@ 472be: 588f addql #4,%sp 472c0: 4a80 tstl %d0 472c2: 66ce bnes 47292 <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472c4: 4280 clrl %d0 information->inactive = 472c6: 322a 0028 movew %a2@(40),%d1 472ca: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472ce: 206a 002a moveal %a2@(42),%a0 information->inactive = 472d2: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472d4: 3009 movew %a1,%d0 information->inactive = 472d6: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472da: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 472de: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 472e4: 4e5e unlk %fp 472e6: 4e75 rts if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 472e8: 2f00 movel %d0,%sp@- 472ea: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> 472f0: 588f addql #4,%sp 472f2: 2c00 movel %d0,%d6 472f4: 6000 fe84 braw 4717a <_Objects_Extend_information+0x8a> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 472f8: e58c lsll #2,%d4 472fa: 2f04 movel %d4,%sp@- 472fc: 2f2a 002e movel %a2@(46),%sp@- 47300: 2f0c movel %a4,%sp@- 47302: 4eb9 0004 e024 jsr 4e024 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47308: 2f04 movel %d4,%sp@- 4730a: 2f2a 002a movel %a2@(42),%sp@- 4730e: 2f0d movel %a5,%sp@- 47310: 4eb9 0004 e024 jsr 4e024 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47316: 4280 clrl %d0 47318: 302a 000e movew %a2@(14),%d0 4731c: da80 addl %d0,%d5 4731e: e58d lsll #2,%d5 47320: 2f05 movel %d5,%sp@- 47322: 2f2a 0018 movel %a2@(24),%sp@- 47326: 2f07 movel %d7,%sp@- 47328: 4eb9 0004 e024 jsr 4e024 4732e: 4fef 0024 lea %sp@(36),%sp 47332: 6000 fe9c braw 471d0 <_Objects_Extend_information+0xe0> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47336: 4280 clrl %d0 47338: 2605 movel %d5,%d3 4733a: 4282 clrl %d2 4733c: 4284 clrl %d4 4733e: 322a 000e movew %a2@(14),%d1 47342: 302a 0012 movew %a2@(18),%d0 47346: 6000 fdfe braw 47146 <_Objects_Extend_information+0x56> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 4734a: 2605 movel %d5,%d3 <== NOT EXECUTED 4734c: 4282 clrl %d2 <== NOT EXECUTED 4734e: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47354: 6000 fdf0 braw 47146 <_Objects_Extend_information+0x56><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 47358: 2f06 movel %d6,%sp@- 4735a: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> return; 47360: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47362: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47368: 4e5e unlk %fp 4736a: 4e75 rts 0004741c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 4741c: 4e56 0000 linkw %fp,#0 47420: 2f02 movel %d2,%sp@- 47422: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47426: 660a bnes 47432 <_Objects_Get_information+0x16> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 47428: 4280 clrl %d0 return NULL; #endif return info; } 4742a: 242e fffc movel %fp@(-4),%d2 4742e: 4e5e unlk %fp 47430: 4e75 rts /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 47432: 2f2e 0008 movel %fp@(8),%sp@- 47436: 4eb9 0004 b624 jsr 4b624 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4743c: 588f addql #4,%sp 4743e: 4a80 tstl %d0 47440: 67e6 beqs 47428 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 47442: b082 cmpl %d2,%d0 47444: 65e2 bcss 47428 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47446: 202e 0008 movel %fp@(8),%d0 4744a: 41f9 0005 d90c lea 5d90c <_Objects_Information_table>,%a0 47450: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47454: 4a88 tstl %a0 47456: 67d0 beqs 47428 <_Objects_Get_information+0xc> return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 47458: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 4745c: 67cc beqs 4742a <_Objects_Get_information+0xe> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 4745e: 2040 moveal %d0,%a0 47460: 4a68 000e tstw %a0@(14) 47464: 67c2 beqs 47428 <_Objects_Get_information+0xc> return NULL; #endif return info; } 47466: 242e fffc movel %fp@(-4),%d2 4746a: 4e5e unlk %fp 4746c: 4e75 rts ... 00053b68 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 53b68: 4e56 ffe0 linkw %fp,#-32 53b6c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 53b70: 262e 000c movel %fp@(12),%d3 53b74: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 53b78: 4a83 tstl %d3 53b7a: 660e bnes 53b8a <_Objects_Get_name_as_string+0x22> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 53b7c: 4282 clrl %d2 } return NULL; /* unreachable path */ } 53b7e: 2002 movel %d2,%d0 53b80: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53b86: 4e5e unlk %fp 53b88: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 53b8a: 4a82 tstl %d2 53b8c: 67f0 beqs 53b7e <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 53b8e: 4aae 0008 tstl %fp@(8) 53b92: 6700 00a8 beqw 53c3c <_Objects_Get_name_as_string+0xd4> 53b96: 282e 0008 movel %fp@(8),%d4 information = _Objects_Get_information_id( tmpId ); 53b9a: 2f04 movel %d4,%sp@- 53b9c: 4eb9 0004 c8b0 jsr 4c8b0 <_Objects_Get_information_id> if ( !information ) 53ba2: 588f addql #4,%sp 53ba4: 4a80 tstl %d0 53ba6: 67d4 beqs 53b7c <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 53ba8: 486e fffc pea %fp@(-4) 53bac: 2f04 movel %d4,%sp@- 53bae: 2f00 movel %d0,%sp@- 53bb0: 4eb9 0004 c990 jsr 4c990 <_Objects_Get> switch ( location ) { 53bb6: 4fef 000c lea %sp@(12),%sp 53bba: 4aae fffc tstl %fp@(-4) 53bbe: 66bc bnes 53b7c <_Objects_Get_name_as_string+0x14> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 53bc0: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 53bc2: 7818 moveq #24,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53bc4: 5383 subql #1,%d3 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 53bc6: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 53bca: 2200 movel %d0,%d1 53bcc: e8a9 lsrl %d4,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 53bce: 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; 53bd0: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 53bd2: e08d lsrl #8,%d5 lname[ 3 ] = (u32_name >> 0) & 0xff; 53bd4: 1d40 fffa moveb %d0,%fp@(-6) lname[ 4 ] = '\0'; 53bd8: 4200 clrb %d0 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53bda: 4244 clrw %d4 53bdc: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 53bde: 1d45 fff9 moveb %d5,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 53be2: 1d40 fffb moveb %d0,%fp@(-5) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53be6: 1d44 fff8 moveb %d4,%fp@(-8) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 53bea: 1d41 fff7 moveb %d1,%fp@(-9) 53bee: 1001 moveb %d1,%d0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53bf0: 4a83 tstl %d3 53bf2: 6756 beqs 53c4a <_Objects_Get_name_as_string+0xe2> 53bf4: 4a01 tstb %d1 53bf6: 6752 beqs 53c4a <_Objects_Get_name_as_string+0xe2> 53bf8: 2042 moveal %d2,%a0 53bfa: 4281 clrl %d1 53bfc: 45ee fff7 lea %fp@(-9),%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 53c00: 4284 clrl %d4 53c02: 1800 moveb %d0,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c04: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 53c06: 2279 0006 9700 moveal 69700 <__ctype_ptr__>,%a1 53c0c: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 53c10: 49c4 extbl %d4 53c12: 0284 0000 0097 andil #151,%d4 53c18: 6602 bnes 53c1c <_Objects_Get_name_as_string+0xb4> 53c1a: 702a moveq #42,%d0 53c1c: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c1e: b681 cmpl %d1,%d3 53c20: 6306 blss 53c28 <_Objects_Get_name_as_string+0xc0> 53c22: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 53c26: 66d8 bnes 53c00 <_Objects_Get_name_as_string+0x98> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 53c28: 4210 clrb %a0@ _Thread_Enable_dispatch(); 53c2a: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 53c30: 2002 movel %d2,%d0 53c32: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53c38: 4e5e unlk %fp 53c3a: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 53c3c: 2079 0006 b516 moveal 6b516 <_Thread_Executing>,%a0 53c42: 2828 0008 movel %a0@(8),%d4 53c46: 6000 ff52 braw 53b9a <_Objects_Get_name_as_string+0x32> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c4a: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 53c4c: 4210 clrb %a0@ _Thread_Enable_dispatch(); 53c4e: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch> 53c54: 60da bras 53c30 <_Objects_Get_name_as_string+0xc8> ... 0005655c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 5655c: 4e56 fff0 linkw %fp,#-16 56560: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 56564: 246e 0008 moveal %fp@(8),%a2 56568: 266e 0010 moveal %fp@(16),%a3 Objects_Control *object; Objects_Id next_id; if ( !information ) 5656c: 4a8a tstl %a2 5656e: 660c bnes 5657c <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 56570: 4280 clrl %d0 } 56572: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 56578: 4e5e unlk %fp 5657a: 4e75 rts Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 5657c: 4a8b tstl %a3 5657e: 67f0 beqs 56570 <_Objects_Get_next+0x14> return NULL; if ( !next_id_p ) 56580: 4aae 0014 tstl %fp@(20) 56584: 67ea beqs 56570 <_Objects_Get_next+0x14> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 56586: 302e 000e movew %fp@(14),%d0 5658a: 673a beqs 565c6 <_Objects_Get_next+0x6a> 5658c: 242e 000c movel %fp@(12),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 56590: 49f9 0004 c990 lea 4c990 <_Objects_Get>,%a4 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 56596: 4281 clrl %d1 56598: 4280 clrl %d0 5659a: 322a 000e movew %a2@(14),%d1 5659e: 3002 movew %d2,%d0 565a0: b081 cmpl %d1,%d0 565a2: 622e bhis 565d2 <_Objects_Get_next+0x76> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 565a4: 2f0b movel %a3,%sp@- 565a6: 2f02 movel %d2,%sp@- next_id++; 565a8: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 565aa: 2f0a movel %a2,%sp@- 565ac: 4e94 jsr %a4@ next_id++; } while (*location_p != OBJECTS_LOCAL); 565ae: 4fef 000c lea %sp@(12),%sp 565b2: 4a93 tstl %a3@ 565b4: 66e0 bnes 56596 <_Objects_Get_next+0x3a> *next_id_p = next_id; 565b6: 206e 0014 moveal %fp@(20),%a0 565ba: 2082 movel %d2,%a0@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 565bc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 565c2: 4e5e unlk %fp 565c4: 4e75 rts if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 565c6: 242a 0006 movel %a2@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 565ca: 49f9 0004 c990 lea 4c990 <_Objects_Get>,%a4 565d0: 60c4 bras 56596 <_Objects_Get_next+0x3a> do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 565d2: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 565d4: 72ff moveq #-1,%d1 565d6: 4280 clrl %d0 565d8: 206e 0014 moveal %fp@(20),%a0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 565dc: 2682 movel %d2,%a3@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 565de: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 565e4: 2081 movel %d1,%a0@ return 0; } 565e6: 4e5e unlk %fp 565e8: 4e75 rts ... 0005b834 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5b834: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5b836: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b838: 4e56 0000 linkw %fp,#0 5b83c: 206e 0008 moveal %fp@(8),%a0 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5b840: 90a8 0006 subl %a0@(6),%d0 5b844: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5b848: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b84c: 226e 0010 moveal %fp@(16),%a1 * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; if ( information->maximum >= index ) { 5b850: b280 cmpl %d0,%d1 5b852: 6510 bcss 5b864 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5b854: 2068 0018 moveal %a0@(24),%a0 5b858: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b85c: 6706 beqs 5b864 <_Objects_Get_no_protection+0x30> *location = OBJECTS_LOCAL; 5b85e: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5b860: 4e5e unlk %fp 5b862: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b864: 7001 moveq #1,%d0 return NULL; } 5b866: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b868: 2280 movel %d0,%a1@ 5b86a: 4280 clrl %d0 return NULL; } 5b86c: 4e75 rts ... 0004753c <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4753c: 41f9 0005 d90c lea 5d90c <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47542: 4e56 fff0 linkw %fp,#-16 47546: 202e 000c movel %fp@(12),%d0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4754a: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4754e: 48d7 003c moveml %d2-%d5,%sp@ 47552: 222e 0014 movel %fp@(20),%d1 47556: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47558: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4755a: 206e 0008 moveal %fp@(8),%a0 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4755e: 4244 clrw %d4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47560: 3a2e 001a movew %fp@(26),%d5 47564: 242e 0010 movel %fp@(16),%d2 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47568: d683 addl %d3,%d3 4756a: 9783 subxl %d3,%d3 4756c: 4483 negl %d3 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4756e: 3144 0028 movew %d4,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 47572: 3144 000e movew %d4,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47576: 282e 0020 movel %fp@(32),%d4 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 4757a: 3142 0004 movew %d2,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 4757e: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 47582: 2145 0014 movel %d5,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 47586: 2388 2c00 movel %a0,%a1@(00000000,%d2:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 4758a: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 4758e: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 47590: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 47594: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 47598: 42a8 002e clrl %a0@(46) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 4759c: 4a03 tstb %d3 4759e: 6706 beqs 475a6 <_Objects_Initialize_information+0x6a> 475a0: 4a81 tstl %d1 475a2: 6700 0092 beqw 47636 <_Objects_Initialize_information+0xfa> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475a6: 7a18 moveq #24,%d5 475a8: 4a81 tstl %d1 475aa: 56c3 sne %d3 475ac: eba8 lsll %d5,%d0 475ae: 1a3c 001b moveb #27,%d5 475b2: 49c3 extbl %d3 475b4: 4483 negl %d3 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475b6: 43f9 0005 d0fc lea 5d0fc ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475bc: ebaa lsll %d5,%d2 475be: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c2: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475c6: 8082 orl %d2,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c8: ca84 andl %d4,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 475ca: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475ce: 8083 orl %d3,%d0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475d0: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475d4: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475d8: 4a85 tstl %d5 475da: 6626 bnes 47602 <_Objects_Initialize_information+0xc6> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 475dc: 43e8 0020 lea %a0@(32),%a1 475e0: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 475e4: 43e8 001c lea %a0@(28),%a1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 475e8: 3144 0032 movew %d4,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 475ec: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 475f0: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 475f4: 4a81 tstl %d1 475f6: 662c bnes 47624 <_Objects_Initialize_information+0xe8> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 475f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 475fe: 4e5e unlk %fp 47600: 4e75 rts * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 47602: 5884 addql #4,%d4 <== NOT EXECUTED 47604: 70fc moveq #-4,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47606: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 4760a: c880 andl %d0,%d4 <== NOT EXECUTED 4760c: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47610: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 47614: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47618: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 4761c: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 47620: 4a81 tstl %d1 <== NOT EXECUTED 47622: 67d4 beqs 475f8 <_Objects_Initialize_information+0xbc><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47624: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 47628: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4762e: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47630: 4ef9 0004 70f0 jmp 470f0 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 47636: 4878 0014 pea 14 4763a: 4878 0001 pea 1 4763e: 42a7 clrl %sp@- 47640: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 000476d8 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 476d8: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 476da: 4e56 ffec linkw %fp,#-20 476de: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 476e2: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476e6: 4283 clrl %d3 block_count = (information->maximum - index_base) / 476e8: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476ea: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 476ee: 382a 000e movew %a2@(14),%d4 476f2: 322a 0012 movew %a2@(18),%d1 476f6: 9883 subl %d3,%d4 476f8: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 476fc: 672c beqs 4772a <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 476fe: 226a 002a moveal %a2@(42),%a1 47702: b291 cmpl %a1@,%d1 47704: 672e beqs 47734 <_Objects_Shrink_information+0x5c> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47706: 7404 moveq #4,%d2 47708: 4280 clrl %d0 } index_base += information->allocation_size; 4770a: 2042 moveal %d2,%a0 4770c: d681 addl %d1,%d3 4770e: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47710: 5280 addql #1,%d0 47712: b084 cmpl %d4,%d0 47714: 6414 bccs 4772a <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 47716: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4771a: 671a beqs 47736 <_Objects_Shrink_information+0x5e> 4771c: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4771e: 2042 moveal %d2,%a0 47720: d681 addl %d1,%d3 47722: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47724: 5280 addql #1,%d0 47726: b084 cmpl %d4,%d0 47728: 65ec bcss 47716 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 4772a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47730: 4e5e unlk %fp 47732: 4e75 rts index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 47734: 4282 clrl %d2 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 47736: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 4773a: 47f9 0004 afe8 lea 4afe8 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 47740: 4280 clrl %d0 47742: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 47746: 2810 movel %a0@,%d4 if ((index >= index_base) && 47748: b680 cmpl %d0,%d3 4774a: 620c bhis 47758 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 4774c: 4281 clrl %d1 4774e: 322a 0012 movew %a2@(18),%d1 47752: d283 addl %d3,%d1 47754: b280 cmpl %d0,%d1 47756: 623e bhis 47796 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 47758: 2044 moveal %d4,%a0 4775a: 4a84 tstl %d4 4775c: 66e2 bnes 47740 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4775e: 206a 002e moveal %a2@(46),%a0 47762: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 47766: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 4776c: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47770: 588f addql #4,%sp _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47772: 302a 0028 movew %a2@(40),%d0 47776: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4777a: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4777e: 9081 subl %d1,%d0 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 47780: 42b1 2800 clrl %a1@(00000000,%d2:l) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 47784: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47788: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4778c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47792: 4e5e unlk %fp 47794: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 47796: 2f08 movel %a0,%sp@- 47798: 4e93 jsr %a3@ 4779a: 588f addql #4,%sp } } while ( the_object ); 4779c: 2044 moveal %d4,%a0 4779e: 4a84 tstl %d4 477a0: 669e bnes 47740 <_Objects_Shrink_information+0x68> 477a2: 60ba bras 4775e <_Objects_Shrink_information+0x86> 0004b648 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 4b648: 4e56 fffc linkw %fp,#-4 void *p; _RTEMS_Lock_allocator(); 4b64c: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b652: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock> p = _Heap_Allocate_aligned_with_boundary( 4b658: 2f2e 0014 movel %fp@(20),%sp@- 4b65c: 2f2e 0010 movel %fp@(16),%sp@- 4b660: 2f2e 000c movel %fp@(12),%sp@- 4b664: 2f2e 0008 movel %fp@(8),%sp@- 4b668: 4eb9 0004 b310 jsr 4b310 <_Heap_Allocate_aligned_with_boundary> heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 4b66e: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b674: 2d40 fffc movel %d0,%fp@(-4) 4b678: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> return p; } 4b67e: 202e fffc movel %fp@(-4),%d0 4b682: 4e5e unlk %fp 4b684: 4e75 rts ... 0004b688 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 4b688: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 4b68c: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b692: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock> status = _Heap_Free( the_heap, start_address ); 4b698: 2f2e 000c movel %fp@(12),%sp@- 4b69c: 2f2e 0008 movel %fp@(8),%sp@- 4b6a0: 4eb9 0004 b4a4 jsr 4b4a4 <_Heap_Free> _RTEMS_Unlock_allocator(); 4b6a6: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b6ac: 2d40 fffc movel %d0,%fp@(-4) 4b6b0: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> return status; } 4b6b6: 202e fffc movel %fp@(-4),%d0 4b6ba: 4e5e unlk %fp 4b6bc: 4e75 rts ... 0005a5e8 <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { 5a5e8: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 5a5ec: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 5a5f2: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock> status = _Heap_Size_of_alloc_area( the_heap, starting_address, size ); 5a5f8: 2f2e 0010 movel %fp@(16),%sp@- 5a5fc: 2f2e 000c movel %fp@(12),%sp@- 5a600: 2f2e 0008 movel %fp@(8),%sp@- 5a604: 4eb9 0005 a758 jsr 5a758 <_Heap_Size_of_alloc_area> _RTEMS_Unlock_allocator(); 5a60a: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 5a610: 2d40 fffc movel %d0,%fp@(-4) 5a614: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> return status; } 5a61a: 202e fffc movel %fp@(-4),%d0 5a61e: 4e5e unlk %fp 5a620: 4e75 rts ... 0004ca7c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4ca7c: 4e56 fff0 linkw %fp,#-16 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 4ca80: 2039 0006 3af0 movel 63af0 <_Thread_Dispatch_disable_level>,%d0 bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4ca86: 48d7 001c moveml %d2-%d4,%sp@ 4ca8a: 242e 0008 movel %fp@(8),%d2 4ca8e: 282e 000c movel %fp@(12),%d4 4ca92: 162e 0013 moveb %fp@(19),%d3 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 4ca96: 4a80 tstl %d0 4ca98: 6720 beqs 4caba <_Protected_heap_Walk+0x3e> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4ca9a: 2d44 000c movel %d4,%fp@(12) 4ca9e: 0283 0000 00ff andil #255,%d3 4caa4: 2d42 0008 movel %d2,%fp@(8) 4caa8: 2d43 0010 movel %d3,%fp@(16) } return status; } 4caac: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cab2: 4e5e unlk %fp if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4cab4: 4ef9 0004 bb6c jmp 4bb6c <_Heap_Walk> * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 4caba: 2f39 0006 3ba2 movel 63ba2 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4cac0: 0283 0000 00ff andil #255,%d3 * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 4cac6: 4eb9 0004 ad30 jsr 4ad30 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4cacc: 2f03 movel %d3,%sp@- 4cace: 2f04 movel %d4,%sp@- 4cad0: 2f02 movel %d2,%sp@- 4cad2: 4eb9 0004 bb6c jsr 4bb6c <_Heap_Walk> _RTEMS_Unlock_allocator(); 4cad8: 2f39 0006 3ba2 movel 63ba2 <_RTEMS_Allocator_Mutex>,%sp@- 4cade: 2d40 fffc movel %d0,%fp@(-4) 4cae2: 4eb9 0004 ad90 jsr 4ad90 <_API_Mutex_Unlock> } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4cae8: 202e fffc movel %fp@(-4),%d0 * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); 4caec: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4caf0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4caf6: 4e5e unlk %fp 4caf8: 4e75 rts ... 00046150 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46150: 4e56 ffe4 linkw %fp,#-28 46154: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46158: 2479 0005 c21a moveal 5c21a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 4615e: 2639 0005 c216 movel 5c216 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46164: 4a8a tstl %a2 46166: 6754 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46168: 4a83 tstl %d3 4616a: 6750 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> 4616c: 280e movel %fp,%d4 4616e: 4282 clrl %d2 46170: 5984 subql #4,%d4 46172: 47f9 0004 5f24 lea 45f24 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46178: 49f9 0004 61d8 lea 461d8 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4617e: 2f04 movel %d4,%sp@- 46180: 2f2a 000c movel %a2@(12),%sp@- 46184: 2f2a 0014 movel %a2@(20),%sp@- 46188: 2f2a 0004 movel %a2@(4),%sp@- 4618c: 2f2a 0008 movel %a2@(8),%sp@- 46190: 2f12 movel %a2@,%sp@- 46192: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46194: 4fef 0018 lea %sp@(24),%sp 46198: 4a80 tstl %d0 4619a: 662a bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 4619c: 2f2a 0018 movel %a2@(24),%sp@- 461a0: 2f2a 0010 movel %a2@(16),%sp@- 461a4: 2f2e fffc movel %fp@(-4),%sp@- 461a8: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 461aa: 4fef 000c lea %sp@(12),%sp 461ae: 4a80 tstl %d0 461b0: 6614 bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 461b2: 5282 addql #1,%d2 461b4: 45ea 001c lea %a2@(28),%a2 461b8: b483 cmpl %d3,%d2 461ba: 65c2 bcss 4617e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 461bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 461c2: 4e5e unlk %fp 461c4: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 461c6: 2f00 movel %d0,%sp@- 461c8: 4878 0001 pea 1 461cc: 4878 0001 pea 1 461d0: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 0004adae <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4adae: 4e56 ffec linkw %fp,#-20 4adb2: 206e 0008 moveal %fp@(8),%a0 4adb6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4adba: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 4adbe: 4a8a tstl %a2 4adc0: 671a beqs 4addc <_RTEMS_tasks_Post_switch_extension+0x2e> * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4adc2: 203c 0000 0700 movel #1792,%d0 4adc8: 40c1 movew %sr,%d1 4adca: 8081 orl %d1,%d0 4adcc: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4adce: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4add2: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4add6: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4add8: 4a82 tstl %d2 4adda: 660a bnes 4ade6 <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4addc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ade2: 4e5e unlk %fp <== NOT EXECUTED 4ade4: 4e75 rts <== NOT EXECUTED if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4ade6: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4adea: 260e movel %fp,%d3 4adec: 5983 subql #4,%d3 4adee: 47f9 0004 cd24 lea 4cd24 ,%a3 4adf4: 2f03 movel %d3,%sp@- 4adf6: 2f3c 0000 ffff movel #65535,%sp@- 4adfc: 2f2a 000e movel %a2@(14),%sp@- 4ae00: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4ae02: 2f02 movel %d2,%sp@- 4ae04: 206a 000a moveal %a2@(10),%a0 4ae08: 4e90 jsr %a0@ asr->nest_level -= 1; 4ae0a: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4ae0e: 2f03 movel %d3,%sp@- 4ae10: 2f3c 0000 ffff movel #65535,%sp@- 4ae16: 2f2e fffc movel %fp@(-4),%sp@- 4ae1a: 4e93 jsr %a3@ 4ae1c: 4fef 001c lea %sp@(28),%sp } 4ae20: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ae26: 4e5e unlk %fp 4ae28: 4e75 rts 0006a1a0 <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { 6a1a0: 4e56 fff8 linkw %fp,#-8 Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); 6a1a4: 486e fff8 pea %fp@(-8) 6a1a8: 4eb9 0006 a104 jsr 6a104 <_TOD_Get_uptime> _Timestamp_To_timespec( &uptime_ts, uptime ); 6a1ae: 206e 0008 moveal %fp@(8),%a0 6a1b2: 588f addql #4,%sp 6a1b4: 202e fff8 movel %fp@(-8),%d0 6a1b8: 222e fffc movel %fp@(-4),%d1 } 6a1bc: 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 ); 6a1be: 2080 movel %d0,%a0@ 6a1c0: 2141 0004 movel %d1,%a0@(4) } 6a1c4: 4e75 rts ... 00046b60 <_TOD_Handler_initialization>: * * Output parameters: NONE */ void _TOD_Handler_initialization(void) { 46b60: 4e56 0000 linkw %fp,#0 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 46b64: 4200 clrb %d0 _TOD_Activate(); } 46b66: 4e5e unlk %fp /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 46b68: 13c0 0005 d968 moveb %d0,5d968 <_TOD_Is_set> */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); 46b6e: 203c 21da e500 movel #567993600,%d0 46b74: 42b9 0005 d9ea clrl 5d9ea <_TOD_Now+0x4> 46b7a: 23c0 0005 d9e6 movel %d0,5d9e6 <_TOD_Now> /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); 46b80: 42b9 0005 d9d2 clrl 5d9d2 <_TOD_Uptime> 46b86: 42b9 0005 d9d6 clrl 5d9d6 <_TOD_Uptime+0x4> /* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); } 46b8c: 4e75 rts ... 0004856c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 4856c: 4e56 0000 linkw %fp,#0 48570: 2039 0006 7f44 movel 67f44 <_Thread_Dispatch_disable_level>,%d0 48576: 5280 addql #1,%d0 48578: 2f0a movel %a2,%sp@- 4857a: 246e 0008 moveal %fp@(8),%a2 4857e: 23c0 0006 7f44 movel %d0,67f44 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 48584: 2039 0006 7fd6 movel 67fd6 <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 4858a: 2212 movel %a2@,%d1 4858c: b280 cmpl %d0,%d1 4858e: 6d38 blts 485c8 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 48590: 9280 subl %d0,%d1 48592: 2f01 movel %d1,%sp@- 48594: 42a7 clrl %sp@- 48596: 4879 0006 8010 pea 68010 <_Watchdog_Seconds_chain> 4859c: 4eb9 0004 ab5c jsr 4ab5c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 485a2: 23d2 0006 7fd6 movel %a2@,67fd6 <_TOD_Now> 485a8: 588a addql #4,%a2 485aa: 4fef 000c lea %sp@(12),%sp 485ae: 23d2 0006 7fda movel %a2@,67fda <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 485b4: 246e fffc moveal %fp@(-4),%a2 485b8: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 485ba: 7001 moveq #1,%d0 485bc: 13c0 0006 7f58 moveb %d0,67f58 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 485c2: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> 485c8: 9081 subl %d1,%d0 485ca: 2f00 movel %d0,%sp@- 485cc: 4878 0001 pea 1 485d0: 4879 0006 8010 pea 68010 <_Watchdog_Seconds_chain> 485d6: 4eb9 0004 ab5c jsr 4ab5c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 485dc: 23d2 0006 7fd6 movel %a2@,67fd6 <_TOD_Now> 485e2: 588a addql #4,%a2 485e4: 4fef 000c lea %sp@(12),%sp 485e8: 23d2 0006 7fda movel %a2@,67fda <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 485ee: 246e fffc moveal %fp@(-4),%a2 485f2: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 485f4: 7001 moveq #1,%d0 485f6: 13c0 0006 7f58 moveb %d0,67f58 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 485fc: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> ... 00047968 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47968: 327c 0700 moveaw #1792,%a1 4796c: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4796e: 4e56 ffec linkw %fp,#-20 47972: 206e 0008 moveal %fp@(8),%a0 47976: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4797a: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4797e: 40c3 movew %sr,%d3 47980: 8083 orl %d3,%d0 47982: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47984: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47988: 2002 movel %d2,%d0 4798a: c081 andl %d1,%d0 4798c: 6776 beqs 47a04 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4798e: 2002 movel %d2,%d0 47990: 4680 notl %d0 47992: c081 andl %d1,%d0 current_state = 47994: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47998: 666a bnes 47a04 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4799a: 2868 008e moveal %a0@(142),%a4 4799e: 3028 0094 movew %a0@(148),%d0 479a2: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 479a4: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 479a8: 240a movel %a2,%d2 479aa: 5882 addql #4,%d2 479ac: 8081 orl %d1,%d0 479ae: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 479b0: 266a 0008 moveal %a2@(8),%a3 479b4: 3880 movew %d0,%a4@ the_chain->last = the_node; 479b6: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 479ba: 3239 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d1 479c0: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 479c4: 214b 0004 movel %a3,%a0@(4) 479c8: 8081 orl %d1,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 479ca: 2688 movel %a0,%a3@ 479cc: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> _ISR_Flash( level ); 479d2: 2009 movel %a1,%d0 479d4: 46c3 movew %d3,%sr 479d6: 8083 orl %d3,%d0 479d8: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 479da: 2028 0014 movel %a0@(20),%d0 479de: 2279 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a1 479e4: b0a9 0014 cmpl %a1@(20),%d0 479e8: 641a bccs 47a04 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 479ea: 23c8 0005 d9e2 movel %a0,5d9e2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 479f0: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 479f6: 4a28 0075 tstb %a0@(117) 479fa: 6712 beqs 47a0e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 479fc: 7001 moveq #1,%d0 479fe: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a04: 46c3 movew %d3,%sr } 47a06: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a0a: 4e5e unlk %fp 47a0c: 4e75 rts * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47a0e: 4a80 tstl %d0 47a10: 66f2 bnes 47a04 <_Thread_Clear_state+0x9c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a12: 7001 moveq #1,%d0 <== NOT EXECUTED 47a14: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 47a1a: 60e8 bras 47a04 <_Thread_Clear_state+0x9c> <== NOT EXECUTED 00047a1c <_Thread_Close>: 47a1c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a1e: 4e56 0000 linkw %fp,#0 47a22: 2f0b movel %a3,%sp@- 47a24: 266e 0008 moveal %fp@(8),%a3 47a28: 2f0a movel %a2,%sp@- 47a2a: 246e 000c moveal %fp@(12),%a2 47a2e: 206b 0018 moveal %a3@(24),%a0 47a32: 302a 000a movew %a2@(10),%d0 47a36: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47a3a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a40: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 47a42: 2f0a movel %a2,%sp@- 47a44: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 47a4a: 4eb9 0004 8d40 jsr 48d40 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47a50: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a56: 5280 addql #1,%d0 47a58: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 47a5e: 2f0a movel %a2,%sp@- 47a60: 2f0b movel %a3,%sp@- 47a62: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 47a68: 4878 0001 pea 1 47a6c: 2f0a movel %a2,%sp@- 47a6e: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47a74: 2f0a movel %a2,%sp@- 47a76: 4eb9 0004 8414 jsr 48414 <_Thread_queue_Extract_with_proxy> 47a7c: 4fef 0018 lea %sp@(24),%sp 47a80: 4a00 tstb %d0 47a82: 6608 bnes 47a8c <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47a84: 7002 moveq #2,%d0 47a86: b0aa 0050 cmpl %a2@(80),%d0 47a8a: 6756 beqs 47ae2 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47a8c: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47a92: 6746 beqs 47ada <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47a94: 202a 00c4 movel %a2@(196),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 47a98: 42aa 0100 clrl %a2@(256) if ( the_thread->Start.fp_context ) 47a9c: 4a80 tstl %d0 47a9e: 670a beqs 47aaa <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47aa0: 2f00 movel %d0,%sp@- 47aa2: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47aa8: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 47aaa: 2f0a movel %a2,%sp@- 47aac: 4eb9 0004 8804 jsr 48804 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47ab2: 202a 0114 movel %a2@(276),%d0 47ab6: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 47ab8: 42aa 00c8 clrl %a2@(200) if ( the_thread->extensions ) 47abc: 4a80 tstl %d0 47abe: 670a beqs 47aca <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47ac0: 2f00 movel %d0,%sp@- 47ac2: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47ac8: 588f addql #4,%sp the_thread->extensions = NULL; 47aca: 42aa 0114 clrl %a2@(276) } 47ace: 246e fff8 moveal %fp@(-8),%a2 47ad2: 266e fffc moveal %fp@(-4),%a3 47ad6: 4e5e unlk %fp 47ad8: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47ada: 42b9 0005 d9da clrl 5d9da <_Thread_Allocated_fp> 47ae0: 60b2 bras 47a94 <_Thread_Close+0x78> */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 47ae2: 486a 0048 pea %a2@(72) 47ae6: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 47aec: 588f addql #4,%sp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47aee: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47af4: 669e bnes 47a94 <_Thread_Close+0x78> 47af6: 60e2 bras 47ada <_Thread_Close+0xbe> <== NOT EXECUTED 00047af8 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 47af8: 4e56 0000 linkw %fp,#0 47afc: 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 ); 47afe: 4879 0005 da9e pea 5da9e <_Thread_Internal_information> 47b04: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47b0a: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 47b10: 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(); 47b12: 23c0 0005 dade movel %d0,5dade <_Thread_Idle> 47b18: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 47b1e: 4282 clrl %d2 47b20: 1439 0005 c222 moveb 5c222 ,%d2 47b26: 2f3c 4944 4c45 movel #1229212741,%sp@- 47b2c: 2239 0005 c23c movel 5c23c ,%d1 47b32: 42a7 clrl %sp@- 47b34: 2039 0005 c21e movel 5c21e ,%d0 47b3a: 42a7 clrl %sp@- 47b3c: 42a7 clrl %sp@- 47b3e: 4878 0001 pea 1 47b42: 2f02 movel %d2,%sp@- 47b44: 42a7 clrl %sp@- 47b46: b280 cmpl %d0,%d1 47b48: 6302 blss 47b4c <_Thread_Create_idle+0x54> 47b4a: 2001 movel %d1,%d0 47b4c: 2f00 movel %d0,%sp@- 47b4e: 42a7 clrl %sp@- 47b50: 2f39 0005 dade movel 5dade <_Thread_Idle>,%sp@- 47b56: 4879 0005 da9e pea 5da9e <_Thread_Internal_information> 47b5c: 4eb9 0004 7e00 jsr 47e00 <_Thread_Initialize> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 47b62: 4fef 002c lea %sp@(44),%sp 47b66: 4297 clrl %sp@ */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47b68: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 47b6e: 5381 subql #1,%d1 47b70: 42a7 clrl %sp@- 47b72: 2f39 0005 c238 movel 5c238 ,%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; 47b78: 2039 0005 dade movel 5dade <_Thread_Idle>,%d0 _Thread_Start( 47b7e: 42a7 clrl %sp@- 47b80: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> 47b86: 2f00 movel %d0,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 47b88: 23c0 0005 da0e movel %d0,5da0e <_Thread_Executing> 47b8e: 23c0 0005 d9e2 movel %d0,5d9e2 <_Thread_Heir> _Thread_Executing = _Thread_Idle; _Thread_Start( 47b94: 4eb9 0004 8880 jsr 48880 <_Thread_Start> Configuration.idle_task, NULL, 0 ); } 47b9a: 242e fffc movel %fp@(-4),%d2 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 47b9e: 4fef 0014 lea %sp@(20),%sp Configuration.idle_task, NULL, 0 ); } 47ba2: 4e5e unlk %fp 47ba4: 4e75 rts ... 00047d3c <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 47d3c: 4e56 0000 linkw %fp,#0 if ( --_Thread_Dispatch_disable_level ) 47d40: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47d46: 5380 subql #1,%d0 47d48: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 47d4e: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47d54: 6704 beqs 47d5a <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 47d56: 4e5e unlk %fp 47d58: 4e75 rts 47d5a: 4e5e unlk %fp (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 47d5c: 4ef9 0004 7be4 jmp 47be4 <_Thread_Dispatch> ... 0004d1a4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1a4: 4e56 0000 linkw %fp,#0 4d1a8: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4d1aa: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1b0: 2f02 movel %d2,%sp@- /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4d1b2: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4d1b6: 40c0 movew %sr,%d0 4d1b8: e189 lsll #8,%d1 4d1ba: 0280 0000 f8ff andil #63743,%d0 4d1c0: 8081 orl %d1,%d0 4d1c2: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4d1c4: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4d1c6: 1439 0005 d108 moveb 5d108 ,%d2 doneConstructors = 1; 4d1cc: 13c0 0005 d108 moveb %d0,5d108 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4d1d2: 4aaa 0100 tstl %a2@(256) 4d1d6: 6720 beqs 4d1f8 <_Thread_Handler+0x54> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 4d1d8: 2079 0005 d9da moveal 5d9da <_Thread_Allocated_fp>,%a0 4d1de: b1ca cmpal %a2,%a0 4d1e0: 6716 beqs 4d1f8 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4d1e2: 4a88 tstl %a0 4d1e4: 670c beqs 4d1f2 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4d1e6: 4868 0100 pea %a0@(256) 4d1ea: 4eb9 0004 9276 jsr 49276 <_CPU_Context_save_fp> 4d1f0: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4d1f2: 23ca 0005 d9da movel %a2,5d9da <_Thread_Allocated_fp> /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4d1f8: 2f0a movel %a2,%sp@- 4d1fa: 4eb9 0004 8c24 jsr 48c24 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4d200: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 4d206: 588f addql #4,%sp 4d208: 4a02 tstb %d2 4d20a: 6746 beqs 4d252 <_Thread_Handler+0xae> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d20c: 4aaa 009e tstl %a2@(158) 4d210: 6718 beqs 4d22a <_Thread_Handler+0x86> * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4d212: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d214: 4eb9 0004 8c62 jsr 48c62 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4d21a: 4878 0006 pea 6 <== NOT EXECUTED 4d21e: 4878 0001 pea 1 <== NOT EXECUTED 4d222: 42a7 clrl %sp@- <== NOT EXECUTED 4d224: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4d22a: 2f2a 00a6 movel %a2@(166),%sp@- 4d22e: 206a 009a moveal %a2@(154),%a0 4d232: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4d234: 588f addql #4,%sp 4d236: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4d23a: 2f0a movel %a2,%sp@- 4d23c: 4eb9 0004 8c62 jsr 48c62 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4d242: 4878 0006 pea 6 4d246: 4878 0001 pea 1 4d24a: 42a7 clrl %sp@- 4d24c: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4d252: 4eb9 0005 a854 jsr 5a854 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d258: 4aaa 009e tstl %a2@(158) 4d25c: 66b4 bnes 4d212 <_Thread_Handler+0x6e> 4d25e: 60ca bras 4d22a <_Thread_Handler+0x86> 00047fc0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 47fc0: 4e56 0000 linkw %fp,#0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 47fc4: 4ab9 0005 c248 tstl 5c248 47fca: 57c0 seq %d0 47fcc: 4ab9 0005 c244 tstl 5c244 47fd2: 57c1 seq %d1 47fd4: 4480 negl %d0 47fd6: 4481 negl %d1 47fd8: b380 eorl %d1,%d0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 47fda: 2239 0005 c234 movel 5c234 ,%d1 maximum_extensions = Configuration.maximum_extensions; 47fe0: 2079 0005 c22c moveal 5c22c ,%a0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 47fe6: 2f02 movel %d2,%sp@- #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 47fe8: 4a00 tstb %d0 47fea: 6600 00a2 bnew 4808e <_Thread_Handler_initialization+0xce> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 47fee: 4280 clrl %d0 47ff0: 1039 0005 c222 moveb 5c222 ,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 47ff6: 4282 clrl %d2 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 47ff8: 5280 addql #1,%d0 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 47ffa: 23c1 0005 d904 movel %d1,5d904 <_Thread_Ticks_per_timeslice> _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48000: 2200 movel %d0,%d1 48002: e588 lsll #2,%d0 48004: e989 lsll #4,%d1 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 48006: 23c8 0005 d9f2 movel %a0,5d9f2 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 4800c: 9280 subl %d0,%d1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 4800e: 4200 clrb %d0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48010: 2f01 movel %d1,%sp@- INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 48012: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _Thread_Executing = NULL; 48018: 42b9 0005 da0e clrl 5da0e <_Thread_Executing> _Thread_Heir = NULL; 4801e: 42b9 0005 d9e2 clrl 5d9e2 <_Thread_Heir> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 48024: 42b9 0005 d9da clrl 5d9da <_Thread_Allocated_fp> #endif _Thread_Do_post_task_switch_extension = 0; 4802a: 42b9 0005 d9f6 clrl 5d9f6 <_Thread_Do_post_task_switch_extension> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48030: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48036: 588f addql #4,%sp 48038: 1439 0005 c222 moveb 5c222 ,%d2 4803e: 2040 moveal %d0,%a0 48040: 4281 clrl %d1 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48042: 23c0 0005 d900 movel %d0,5d900 <_Thread_Ready_chain> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48048: 2008 movel %a0,%d0 4804a: 5880 addql #4,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4804c: 5281 addql #1,%d1 4804e: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 48050: 42a8 0004 clrl %a0@(4) the_chain->last = _Chain_Head(the_chain); 48054: 2148 0008 movel %a0,%a0@(8) 48058: 41e8 000c lea %a0@(12),%a0 4805c: b481 cmpl %d1,%d2 4805e: 64e8 bccs 48048 <_Thread_Handler_initialization+0x88> /* * Initialize this class of objects. */ _Objects_Initialize_information( 48060: 4878 0008 pea 8 48064: 42a7 clrl %sp@- 48066: 4878 011c pea 11c 4806a: 4878 0001 pea 1 4806e: 4878 0001 pea 1 48072: 4878 0001 pea 1 48076: 4879 0005 da9e pea 5da9e <_Thread_Internal_information> 4807c: 4eb9 0004 753c jsr 4753c <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 48082: 242e fffc movel %fp@(-4),%d2 /* * Initialize this class of objects. */ _Objects_Initialize_information( 48086: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4808a: 4e5e unlk %fp 4808c: 4e75 rts * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 4808e: 4878 000f pea f 48092: 4878 0001 pea 1 48096: 42a7 clrl %sp@- 48098: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 0004b9ac <_Thread_Ready>: */ void _Thread_Ready( Thread_Control *the_thread ) { 4b9ac: 4e56 ffec linkw %fp,#-20 4b9b0: 206e 0008 moveal %fp@(8),%a0 4b9b4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); 4b9b8: 243c 0000 0700 movel #1792,%d2 4b9be: 2002 movel %d2,%d0 4b9c0: 40c1 movew %sr,%d1 4b9c2: 8081 orl %d1,%d0 4b9c4: 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; 4b9c6: 2668 008e moveal %a0@(142),%a3 4b9ca: 3028 0094 movew %a0@(148),%d0 4b9ce: 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 ); 4b9d0: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4b9d4: 2809 movel %a1,%d4 4b9d6: 5884 addql #4,%d4 4b9d8: 8083 orl %d3,%d0 4b9da: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4b9dc: 2469 0008 moveal %a1@(8),%a2 4b9e0: 3680 movew %d0,%a3@ the_chain->last = the_node; 4b9e2: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4b9e6: 3639 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d3 4b9ec: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4b9f0: 214a 0004 movel %a2,%a0@(4) 4b9f4: 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; 4b9f6: 2488 movel %a0,%a2@ 4b9f8: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY; 4b9fe: 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 ); 4ba02: 2002 movel %d2,%d0 4ba04: 46c1 movew %d1,%sr 4ba06: 8081 orl %d1,%d0 4ba08: 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 ); 4ba0a: 3039 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d0 4ba10: 4840 swap %d0 4ba12: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4ba14: 4282 clrl %d2 4ba16: 41f9 0005 da70 lea 5da70 <_Priority_Bit_map>,%a0 4ba1c: 3400 movew %d0,%d2 4ba1e: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4ba22: 4840 swap %d0 4ba24: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4ba26: 4283 clrl %d3 4ba28: e98a lsll #4,%d2 4ba2a: 3600 movew %d0,%d3 4ba2c: 2279 0005 d900 moveal 5d900 <_Thread_Ready_chain>,%a1 4ba32: 2002 movel %d2,%d0 4ba34: d083 addl %d3,%d0 4ba36: 2400 movel %d0,%d2 4ba38: e58a lsll #2,%d2 4ba3a: e988 lsll #4,%d0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 4ba3c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4ba42: 93c2 subal %d2,%a1 4ba44: 2031 0800 movel %a1@(00000000,%d0:l),%d0 4ba48: 23c0 0005 d9e2 movel %d0,5d9e2 <_Thread_Heir> _Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) 4ba4e: b1c0 cmpal %d0,%a0 4ba50: 670e beqs 4ba60 <_Thread_Ready+0xb4> 4ba52: 4a28 0075 tstb %a0@(117) 4ba56: 6708 beqs 4ba60 <_Thread_Ready+0xb4> _Context_Switch_necessary = true; 4ba58: 7001 moveq #1,%d0 4ba5a: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 4ba60: 46c1 movew %d1,%sr } 4ba62: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4ba66: 4e5e unlk %fp 4ba68: 4e75 rts ... 0004c750 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4c750: 4e56 0000 linkw %fp,#0 4c754: 2f0a movel %a2,%sp@- 4c756: 246e 0008 moveal %fp@(8),%a2 the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; 4c75a: 256e 0010 00a6 movel %fp@(16),%a2@(166) the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4c760: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4c766: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4c76c: 256e 000c 00a2 movel %fp@(12),%a2@(162) { the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 4c772: 156a 00aa 0075 moveb %a2@(170),%a2@(117) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4c778: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4c77c: 2f0a movel %a2,%sp@- 4c77e: 4eb9 0004 9028 jsr 49028 <_Thread_queue_Extract_with_proxy> 4c784: 588f addql #4,%sp 4c786: 4a00 tstb %d0 4c788: 6608 bnes 4c792 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4c78a: 7002 moveq #2,%d0 4c78c: b0aa 0050 cmpl %a2@(80),%d0 4c790: 672a beqs 4c7bc <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4c792: 202a 00b8 movel %a2@(184),%d0 4c796: b0aa 0014 cmpl %a2@(20),%d0 4c79a: 6718 beqs 4c7b4 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4c79c: 2d4a 0008 movel %a2,%fp@(8) 4c7a0: 2d40 000c movel %d0,%fp@(12) if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; 4c7a4: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4c7a8: 246e fffc moveal %fp@(-4),%a2 4c7ac: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4c7ae: 4ef9 0004 9238 jmp 49238 <_Thread_Set_priority> } } 4c7b4: 246e fffc moveal %fp@(-4),%a2 4c7b8: 4e5e unlk %fp 4c7ba: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4c7bc: 486a 0048 pea %a2@(72) 4c7c0: 4eb9 0004 9c38 jsr 49c38 <_Watchdog_Remove> 4c7c6: 588f addql #4,%sp 4c7c8: 60c8 bras 4c792 <_Thread_Reset+0x42> ... 0004ba6c <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4ba6c: 223c 0000 0700 movel #1792,%d1 4ba72: 2001 movel %d1,%d0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba74: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4ba78: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba7e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4ba82: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4ba86: 40c2 movew %sr,%d2 4ba88: 8082 orl %d2,%d0 4ba8a: 46c0 movew %d0,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4ba8c: 2029 0008 movel %a1@(8),%d0 4ba90: b091 cmpl %a1@,%d0 4ba92: 6752 beqs 4bae6 <_Thread_Reset_timeslice+0x7a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4ba94: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ba96: 2009 movel %a1,%d0 4ba98: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4ba9a: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4ba9e: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4baa0: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4baa4: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4baa6: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4baaa: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4baae: 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; 4bab2: 2488 movel %a0,%a2@ return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4bab4: 46c2 movew %d2,%sr 4bab6: 8282 orl %d2,%d1 4bab8: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4baba: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 4bac0: 6712 beqs 4bad4 <_Thread_Reset_timeslice+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4bac2: 7001 moveq #1,%d0 <== NOT EXECUTED 4bac4: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4baca: 46c2 movew %d2,%sr <== NOT EXECUTED } 4bacc: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bad0: 4e5e unlk %fp 4bad2: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4bad4: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; 4bada: 7001 moveq #1,%d0 4badc: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 4bae2: 46c2 movew %d2,%sr 4bae4: 60e6 bras 4bacc <_Thread_Reset_timeslice+0x60> executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4bae6: 46c2 movew %d2,%sr _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 4bae8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4baec: 4e5e unlk %fp 4baee: 4e75 rts 000491ac <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 491ac: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 491ae: 4e56 0000 linkw %fp,#0 491b2: 2f0a movel %a2,%sp@- 491b4: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 491b8: c0aa 0010 andl %a2@(16),%d0 491bc: 4a00 tstb %d0 491be: 670a beqs 491ca <_Thread_Restart+0x1e> return true; } return false; } 491c0: 246e fffc moveal %fp@(-4),%a2 491c4: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 491c6: 4200 clrb %d0 return true; } return false; } 491c8: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 491ca: 2f0a movel %a2,%sp@- 491cc: 4eb9 0004 93bc jsr 493bc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 491d2: 2f2e 0010 movel %fp@(16),%sp@- 491d6: 2f2e 000c movel %fp@(12),%sp@- 491da: 2f0a movel %a2,%sp@- 491dc: 4eb9 0004 c750 jsr 4c750 <_Thread_Reset> _Thread_Load_environment( the_thread ); 491e2: 2f0a movel %a2,%sp@- 491e4: 4eb9 0004 c3a4 jsr 4c3a4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 491ea: 2f0a movel %a2,%sp@- 491ec: 4eb9 0004 c690 jsr 4c690 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 491f2: 2f0a movel %a2,%sp@- 491f4: 4eb9 0004 9a28 jsr 49a28 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 491fa: 4fef 001c lea %sp@(28),%sp 491fe: b5f9 0005 e9a6 cmpal 5e9a6 <_Thread_Executing>,%a2 49204: 670a beqs 49210 <_Thread_Restart+0x64> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49206: 7001 moveq #1,%d0 return true; } return false; } 49208: 246e fffc moveal %fp@(-4),%a2 4920c: 4e5e unlk %fp 4920e: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 49210: 4aaa 0100 tstl %a2@(256) 49214: 6712 beqs 49228 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 49216: 486a 0100 pea %a2@(256) 4921a: 4eb9 0004 9f92 jsr 49f92 <_CPU_Context_restore_fp> 49220: 2479 0005 e9a6 moveal 5e9a6 <_Thread_Executing>,%a2 49226: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49228: 486a 00cc pea %a2@(204) 4922c: 4eb9 0004 9e3a jsr 49e3a <_CPU_Context_Restart_self> 49232: 588f addql #4,%sp <== NOT EXECUTED 49234: 7001 moveq #1,%d0 <== NOT EXECUTED 49236: 60d0 bras 49208 <_Thread_Restart+0x5c> <== NOT EXECUTED 0004c6b8 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6b8: 327c 0700 moveaw #1792,%a1 4c6bc: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c6be: 4e56 ffec linkw %fp,#-20 4c6c2: 206e 0008 moveal %fp@(8),%a0 4c6c6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6ca: 40c1 movew %sr,%d1 4c6cc: 8081 orl %d1,%d0 4c6ce: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c6d0: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c6d4: 0800 0001 btst #1,%d0 4c6d8: 6774 beqs 4c74e <_Thread_Resume+0x96> 4c6da: 74fd moveq #-3,%d2 4c6dc: c082 andl %d2,%d0 current_state = 4c6de: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c6e2: 666a bnes 4c74e <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c6e4: 2868 008e moveal %a0@(142),%a4 4c6e8: 3028 0094 movew %a0@(148),%d0 4c6ec: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c6ee: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c6f2: 260a movel %a2,%d3 4c6f4: 5883 addql #4,%d3 4c6f6: 8082 orl %d2,%d0 4c6f8: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c6fa: 266a 0008 moveal %a2@(8),%a3 4c6fe: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c700: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c704: 3439 0006 363c movew 6363c <_Priority_Major_bit_map>,%d2 4c70a: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c70e: 214b 0004 movel %a3,%a0@(4) 4c712: 8082 orl %d2,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4c714: 2688 movel %a0,%a3@ 4c716: 33c0 0006 363c movew %d0,6363c <_Priority_Major_bit_map> _ISR_Flash( level ); 4c71c: 2009 movel %a1,%d0 4c71e: 46c1 movew %d1,%sr 4c720: 8081 orl %d1,%d0 4c722: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c724: 2028 0014 movel %a0@(20),%d0 4c728: 2279 0006 361a moveal 6361a <_Thread_Heir>,%a1 4c72e: b0a9 0014 cmpl %a1@(20),%d0 4c732: 641a bccs 4c74e <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c734: 23c8 0006 361a movel %a0,6361a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c73a: 2079 0006 3646 moveal 63646 <_Thread_Executing>,%a0 4c740: 4a28 0075 tstb %a0@(117) 4c744: 6712 beqs 4c758 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c746: 7001 moveq #1,%d0 4c748: 13c0 0006 3656 moveb %d0,63656 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c74e: 46c1 movew %d1,%sr } 4c750: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c754: 4e5e unlk %fp 4c756: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c758: 4a80 tstl %d0 4c75a: 66f2 bnes 4c74e <_Thread_Resume+0x96> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c75c: 7001 moveq #1,%d0 <== NOT EXECUTED 4c75e: 13c0 0006 3656 moveb %d0,63656 <_Context_Switch_necessary> <== NOT EXECUTED 4c764: 60e8 bras 4c74e <_Thread_Resume+0x96> <== NOT EXECUTED ... 00048804 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 48804: 4e56 0000 linkw %fp,#0 48808: 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 ) 4880c: 2279 0005 c248 moveal 5c248 ,%a1 48812: 4a89 tstl %a1 48814: 670a beqs 48820 <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 48816: 2d68 00c0 0008 movel %a0@(192),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 4881c: 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 ); 4881e: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 48820: 2d68 00c0 0008 movel %a0@(192),%fp@(8) } 48826: 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 ); 48828: 4ef9 0004 90c0 jmp 490c0 <_Workspace_Free> ... 00048830 <_Thread_Start_multitasking>: 48830: 7003 moveq #3,%d0 * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 48832: 4e56 0000 linkw %fp,#0 _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; _Thread_Executing = _Thread_Heir; 48836: 2079 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a0 4883c: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 48842: 4200 clrb %d0 _Thread_Executing = _Thread_Heir; 48844: 23c8 0005 da0e movel %a0,5da0e <_Thread_Executing> * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 4884a: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) 48850: 4aa8 0100 tstl %a0@(256) 48854: 6712 beqs 48868 <_Thread_Start_multitasking+0x38> _Context_Restore_fp( &_Thread_Heir->fp_context ); 48856: 4868 0100 pea %a0@(256) 4885a: 4eb9 0004 92ae jsr 492ae <_CPU_Context_restore_fp> 48860: 2079 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a0 48866: 588f addql #4,%sp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 48868: 4868 00cc pea %a0@(204) 4886c: 4879 0005 d920 pea 5d920 <_Thread_BSP_context> 48872: 4eb9 0004 9140 jsr 49140 <_CPU_Context_switch> 48878: 508f addql #8,%sp } 4887a: 4e5e unlk %fp 4887c: 4e75 rts ... 00048a38 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a38: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48a3c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a42: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48a46: 243c 0000 0700 movel #1792,%d2 48a4c: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48a4e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48a52: 40c1 movew %sr,%d1 48a54: 8081 orl %d1,%d0 48a56: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48a58: 2029 0008 movel %a1@(8),%d0 48a5c: b091 cmpl %a1@,%d0 48a5e: 6750 beqs 48ab0 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48a60: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a62: 2009 movel %a1,%d0 48a64: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48a66: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48a6a: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48a6c: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a70: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48a72: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48a76: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48a7a: 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; 48a7e: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48a80: 46c1 movew %d1,%sr 48a82: 8481 orl %d1,%d2 48a84: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48a86: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48a8c: 6712 beqs 48aa0 <_Thread_Yield_processor+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48a8e: 7001 moveq #1,%d0 <== NOT EXECUTED 48a90: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48a96: 46c1 movew %d1,%sr } 48a98: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48a9c: 4e5e unlk %fp 48a9e: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48aa0: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48aa6: 7001 moveq #1,%d0 48aa8: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> 48aae: 60e6 bras 48a96 <_Thread_Yield_processor+0x5e> if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48ab0: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48ab6: 67de beqs 48a96 <_Thread_Yield_processor+0x5e> _Context_Switch_necessary = true; 48ab8: 7001 moveq #1,%d0 <== NOT EXECUTED 48aba: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 48ac0: 60d4 bras 48a96 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... 000477b4 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 477b4: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 477b6: 4e56 0000 linkw %fp,#0 477ba: 202e 0010 movel %fp@(16),%d0 477be: 2f0a movel %a2,%sp@- 477c0: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 477c4: 42aa 0044 clrl %a2@(68) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 477c8: b2aa 0050 cmpl %a2@(80),%d1 477cc: 671c beqs 477ea <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 477ce: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 477d0: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 203c 1003 fff8 movel #268697592,%d0 477de: 2d40 000c movel %d0,%fp@(12) 477e2: 4e5e unlk %fp 477e4: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 477ea: 123c 0003 moveb #3,%d1 477ee: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 477f2: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 477f4: 486a 0048 pea %a2@(72) 477f8: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 477fe: 588f addql #4,%sp 47800: 203c 1003 fff8 movel #268697592,%d0 47806: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4780a: 246e fffc moveal %fp@(-4),%a2 4780e: 2d40 000c movel %d0,%fp@(12) 47812: 4e5e unlk %fp 47814: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... 000480a0 <_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 ) 480a0: 41f9 0004 8108 lea 48108 <_Thread_queue_Dequeue_priority>,%a0 480a6: 7001 moveq #1,%d0 */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 480a8: 4e56 fff4 linkw %fp,#-12 480ac: 48d7 040c moveml %d2-%d3/%a2,%sp@ 480b0: 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 ) 480b4: b0aa 0034 cmpl %a2@(52),%d0 480b8: 6706 beqs 480c0 <_Thread_queue_Dequeue+0x20> 480ba: 41f9 0004 b744 lea 4b744 <_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 ); 480c0: 2f0a movel %a2,%sp@- 480c2: 4e90 jsr %a0@ _ISR_Disable( level ); 480c4: 223c 0000 0700 movel #1792,%d1 480ca: 40c2 movew %sr,%d2 480cc: 8282 orl %d2,%d1 480ce: 46c1 movew %d1,%sr if ( !the_thread ) { 480d0: 588f addql #4,%sp 480d2: 4a80 tstl %d0 480d4: 670c beqs 480e2 <_Thread_queue_Dequeue+0x42> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 480d6: 46c2 movew %d2,%sr return the_thread; } 480d8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 480de: 4e5e unlk %fp 480e0: 4e75 rts dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; 480e2: 222a 0030 movel %a2@(48),%d1 480e6: 7601 moveq #1,%d3 480e8: 5381 subql #1,%d1 480ea: b681 cmpl %d1,%d3 480ec: 65e8 bcss 480d6 <_Thread_queue_Dequeue+0x36> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 480ee: 7203 moveq #3,%d1 the_thread = _Thread_Executing; 480f0: 2039 0005 da0e movel 5da0e <_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; 480f6: 2541 0030 movel %d1,%a2@(48) the_thread = _Thread_Executing; } } _ISR_Enable( level ); 480fa: 46c2 movew %d2,%sr return the_thread; } 480fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48102: 4e5e unlk %fp 48104: 4e75 rts ... 0004b744 <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4b744: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4b74a: 4e56 0000 linkw %fp,#0 4b74e: 226e 0008 moveal %fp@(8),%a1 4b752: 2f0b movel %a3,%sp@- 4b754: 2f0a movel %a2,%sp@- ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4b756: 40c1 movew %sr,%d1 4b758: 8081 orl %d1,%d0 4b75a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b75c: 2049 moveal %a1,%a0 4b75e: 2458 moveal %a0@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b760: b1ca cmpal %a2,%a0 4b762: 6768 beqs 4b7cc <_Thread_queue_Dequeue_fifo+0x88> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4b764: 2052 moveal %a2@,%a0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) 4b766: 264a moveal %a2,%a3 _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b768: 7002 moveq #2,%d0 the_chain->first = new_first; 4b76a: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4b76c: 2149 0004 movel %a1,%a0@(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; 4b770: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b774: b0aa 0050 cmpl %a2@(80),%d0 4b778: 6720 beqs 4b79a <_Thread_queue_Dequeue_fifo+0x56> _ISR_Enable( level ); 4b77a: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4b77c: 2f3c 1003 fff8 movel #268697592,%sp@- 4b782: 2f0a movel %a2,%sp@- 4b784: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> return the_thread; } _ISR_Enable( level ); return NULL; } 4b78a: 246e fff8 moveal %fp@(-8),%a2 4b78e: 200b movel %a3,%d0 4b790: 508f addql #8,%sp 4b792: 266e fffc moveal %fp@(-4),%a3 4b796: 4e5e unlk %fp 4b798: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4b79a: 7003 moveq #3,%d0 4b79c: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4b7a0: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b7a2: 486a 0048 pea %a2@(72) 4b7a6: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 4b7ac: 2f3c 1003 fff8 movel #268697592,%sp@- 4b7b2: 2f0a movel %a2,%sp@- 4b7b4: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> return the_thread; } _ISR_Enable( level ); return NULL; } 4b7ba: 246e fff8 moveal %fp@(-8),%a2 4b7be: 200b movel %a3,%d0 4b7c0: 4fef 000c lea %sp@(12),%sp 4b7c4: 266e fffc moveal %fp@(-4),%a3 4b7c8: 4e5e unlk %fp 4b7ca: 4e75 rts #endif return the_thread; } _ISR_Enable( level ); 4b7cc: 46c1 movew %d1,%sr 4b7ce: 97cb subal %a3,%a3 return NULL; } 4b7d0: 200b movel %a3,%d0 4b7d2: 246e fff8 moveal %fp@(-8),%a2 4b7d6: 266e fffc moveal %fp@(-4),%a3 4b7da: 4e5e unlk %fp 4b7dc: 4e75 rts ... 0004b7e0 <_Thread_queue_Enqueue_fifo>: ) { Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4b7e0: 203c 0000 0700 movel #1792,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4b7e6: 4e56 0000 linkw %fp,#0 4b7ea: 206e 0008 moveal %fp@(8),%a0 4b7ee: 2f0a movel %a2,%sp@- 4b7f0: 226e 000c moveal %fp@(12),%a1 4b7f4: 2f02 movel %d2,%sp@- Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4b7f6: 40c1 movew %sr,%d1 4b7f8: 8081 orl %d1,%d0 4b7fa: 46c0 movew %d0,%sr sync_state = the_thread_queue->sync_state; 4b7fc: 2028 0030 movel %a0@(48),%d0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4b800: 7401 moveq #1,%d2 ISR_Level level; _ISR_Disable( level ); sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4b802: 42a8 0030 clrl %a0@(48) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4b806: b480 cmpl %d0,%d2 4b808: 670e beqs 4b818 <_Thread_queue_Enqueue_fifo+0x38> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 4b80a: 241f movel %sp@+,%d2 * 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; 4b80c: 206e 0010 moveal %fp@(16),%a0 return sync_state; } 4b810: 245f moveal %sp@+,%a2 4b812: 4e5e unlk %fp * 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; 4b814: 2081 movel %d1,%a0@ return sync_state; } 4b816: 4e75 rts Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4b818: 2408 movel %a0,%d2 4b81a: 5882 addql #4,%d2 4b81c: 2282 movel %d2,%a1@ old_last_node = the_chain->last; 4b81e: 2468 0008 moveal %a0@(8),%a2 the_chain->last = the_node; 4b822: 2149 0008 movel %a1,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4b826: 234a 0004 movel %a2,%a1@(4) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 4b82a: 2348 0044 movel %a0,%a1@(68) 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; 4b82e: 2489 movel %a1,%a2@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 4b830: 46c1 movew %d1,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 4b832: 241f movel %sp@+,%d2 4b834: 245f moveal %sp@+,%a2 4b836: 4e5e unlk %fp 4b838: 4e75 rts ... 0004829c <_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 ) { 4829c: 4e56 ffe4 linkw %fp,#-28 482a0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 482a4: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 482a8: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 482ac: 263c 0000 0700 movel #1792,%d3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 482b2: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482b6: 2401 movel %d1,%d2 482b8: ec8a lsrl #6,%d2 482ba: 2002 movel %d2,%d0 482bc: e58a lsll #2,%d2 482be: e988 lsll #4,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 482c0: 286e 0008 moveal %fp@(8),%a4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482c4: 9082 subl %d2,%d0 482c6: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 482ca: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 482ce: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 482d2: 242c 0038 movel %a4@(56),%d2 482d6: 2748 0040 movel %a0,%a3@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 482da: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 482de: 0801 0005 btst #5,%d1 482e2: 6656 bnes 4833a <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 482e4: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 482e6: 2803 movel %d3,%d4 482e8: 5885 addql #4,%d5 482ea: 2004 movel %d4,%d0 482ec: 40c3 movew %sr,%d3 482ee: 8083 orl %d3,%d0 482f0: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 482f2: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 482f4: ba88 cmpl %a0,%d5 482f6: 6700 010a beqw 48402 <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 482fa: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 482fe: b3c1 cmpal %d1,%a1 48300: 6418 bccs 4831a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48302: 2004 movel %d4,%d0 48304: 46c3 movew %d3,%sr 48306: 8083 orl %d3,%d0 48308: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4830a: 2002 movel %d2,%d0 4830c: c0a8 0010 andl %a0@(16),%d0 48310: 6700 0092 beqw 483a4 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48314: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48316: ba88 cmpl %a0,%d5 48318: 66e0 bnes 482fa <_Thread_queue_Enqueue_priority+0x5e> 4831a: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4831c: 7001 moveq #1,%d0 4831e: b0ac 0030 cmpl %a4@(48),%d0 48322: 6700 0094 beqw 483b8 <_Thread_queue_Enqueue_priority+0x11c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 48326: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 4832a: 202c 0030 movel %a4@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4832e: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48330: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48334: 4e5e unlk %fp 48336: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48338: 46c4 movew %d4,%sr <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4833a: 4284 clrl %d4 4833c: 1839 0005 c222 moveb 5c222 ,%d4 _ISR_Disable( level ); 48342: 2003 movel %d3,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48344: 2244 moveal %d4,%a1 48346: 5289 addql #1,%a1 _ISR_Disable( level ); 48348: 40c4 movew %sr,%d4 4834a: 8084 orl %d4,%d0 4834c: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 4834e: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48352: b5c8 cmpal %a0,%a2 48354: 6720 beqs 48376 <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 48356: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 4835a: b3c1 cmpal %d1,%a1 4835c: 6318 blss 48376 <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4835e: 2003 movel %d3,%d0 48360: 46c4 movew %d4,%sr 48362: 8084 orl %d4,%d0 48364: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48366: 2002 movel %d2,%d0 48368: c0a8 0010 andl %a0@(16),%d0 4836c: 67ca beqs 48338 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4836e: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48372: b5c8 cmpal %a0,%a2 48374: 66e0 bnes 48356 <_Thread_queue_Enqueue_priority+0xba> 48376: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48378: 7001 moveq #1,%d0 4837a: b0ac 0030 cmpl %a4@(48),%d0 4837e: 66a6 bnes 48326 <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48380: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48384: b3c1 cmpal %d1,%a1 48386: 6756 beqs 483de <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48388: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4838a: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4838e: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48390: 274c 0044 movel %a4,%a3@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 48394: 208b movel %a3,%a0@ next_node->previous = the_node; 48396: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4839a: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4839c: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483a0: 4e5e unlk %fp 483a2: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 483a4: 46c3 movew %d3,%sr <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 483a6: 2004 movel %d4,%d0 <== NOT EXECUTED 483a8: 40c3 movew %sr,%d3 <== NOT EXECUTED 483aa: 8083 orl %d3,%d0 <== NOT EXECUTED 483ac: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 483ae: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 483b0: ba88 cmpl %a0,%d5 <== NOT EXECUTED 483b2: 6600 ff46 bnew 482fa <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 483b6: 604a bras 48402 <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 483b8: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 483bc: b3c1 cmpal %d1,%a1 483be: 671e beqs 483de <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 483c0: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483c4: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483c6: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483ca: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 483ce: 228b movel %a3,%a1@ search_node->previous = the_node; 483d0: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483d4: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483d6: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483da: 4e5e unlk %fp 483dc: 4e75 rts 483de: 41e8 003c lea %a0@(60),%a0 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 483e2: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483e6: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483e8: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483ec: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 483f0: 228b movel %a3,%a1@ search_node->previous = the_node; 483f2: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483f6: 46c2 movew %d2,%sr 483f8: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483fa: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483fe: 4e5e unlk %fp 48400: 4e75 rts restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48402: 2403 movel %d3,%d2 48404: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48408: 7001 moveq #1,%d0 4840a: b0ac 0030 cmpl %a4@(48),%d0 4840e: 6600 ff16 bnew 48326 <_Thread_queue_Enqueue_priority+0x8a> 48412: 60a4 bras 483b8 <_Thread_queue_Enqueue_priority+0x11c> 00048200 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48200: 4e56 fff0 linkw %fp,#-16 48204: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48208: 266e 0008 moveal %fp@(8),%a3 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4820c: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 48210: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48216: 242e 000c movel %fp@(12),%d2 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4821a: 2f0a movel %a2,%sp@- 4821c: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 48222: 508f addql #8,%sp 48224: 4a82 tstl %d2 48226: 6644 bnes 4826c <_Thread_queue_Enqueue_with_handler+0x6c> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 48228: 41f9 0004 829c lea 4829c <_Thread_queue_Enqueue_priority>,%a0 4822e: 7001 moveq #1,%d0 48230: b0ab 0034 cmpl %a3@(52),%d0 48234: 6706 beqs 4823c <_Thread_queue_Enqueue_with_handler+0x3c> 48236: 41f9 0004 b7e0 lea 4b7e0 <_Thread_queue_Enqueue_fifo>,%a0 enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 4823c: 486e fffc pea %fp@(-4) 48240: 2f0a movel %a2,%sp@- 48242: 2f0b movel %a3,%sp@- 48244: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 48246: 4fef 000c lea %sp@(12),%sp 4824a: 7201 moveq #1,%d1 4824c: b280 cmpl %d0,%d1 4824e: 6712 beqs 48262 <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 48250: 2f2e fffc movel %fp@(-4),%sp@- 48254: 2f0a movel %a2,%sp@- 48256: 2f00 movel %d0,%sp@- 48258: 4eb9 0004 77b4 jsr 477b4 <_Thread_blocking_operation_Cancel> 4825e: 4fef 000c lea %sp@(12),%sp } 48262: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48268: 4e5e unlk %fp 4826a: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 4826c: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 48270: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 48276: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4827a: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4827e: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 48282: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 48286: 486a 0048 pea %a2@(72) 4828a: 4879 0005 da2c pea 5da2c <_Watchdog_Ticks_chain> 48290: 4eb9 0004 8e0c jsr 48e0c <_Watchdog_Insert> 48296: 508f addql #8,%sp 48298: 608e bras 48228 <_Thread_queue_Enqueue_with_handler+0x28> ... 0004d260 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4d260: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4d266: 4e56 0000 linkw %fp,#0 4d26a: 2f0a movel %a2,%sp@- 4d26c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4d270: 40c1 movew %sr,%d1 4d272: 8081 orl %d1,%d0 4d274: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4d276: 202a 0010 movel %a2@(16),%d0 4d27a: 0280 0003 bee0 andil #245472,%d0 4d280: 6734 beqs 4d2b6 <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4d282: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d284: 7002 moveq #2,%d0 previous = the_node->previous; 4d286: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4d28a: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4d28e: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4d290: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d294: b0aa 0050 cmpl %a2@(80),%d0 4d298: 6726 beqs 4d2c0 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4d29a: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4d29c: 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 } 4d2a0: 246e fffc moveal %fp@(-4),%a2 4d2a4: 203c 1003 fff8 movel #268697592,%d0 4d2aa: 2d40 000c movel %d0,%fp@(12) 4d2ae: 4e5e unlk %fp 4d2b0: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4d2b6: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d2b8: 246e fffc moveal %fp@(-4),%a2 4d2bc: 4e5e unlk %fp 4d2be: 4e75 rts 4d2c0: 7003 moveq #3,%d0 4d2c2: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4d2c6: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4d2c8: 486a 0048 pea %a2@(72) 4d2cc: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 4d2d2: 588f addql #4,%sp 4d2d4: 203c 1003 fff8 movel #268697592,%d0 4d2da: 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 } 4d2de: 246e fffc moveal %fp@(-4),%a2 4d2e2: 2d40 000c movel %d0,%fp@(12) 4d2e6: 4e5e unlk %fp 4d2e8: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... 0004b874 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4b874: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4b87a: 4e56 ffec linkw %fp,#-20 4b87e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b882: 246e 000c moveal %fp@(12),%a2 4b886: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4b88a: 40c1 movew %sr,%d1 4b88c: 8081 orl %d1,%d0 4b88e: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4b890: 202a 0010 movel %a2@(16),%d0 4b894: 0280 0003 bee0 andil #245472,%d0 4b89a: 677e beqs 4b91a <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b89c: 200a movel %a2,%d0 4b89e: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4b8a4: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4b8a6: 226a 0004 moveal %a2@(4),%a1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b8aa: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b8ae: b088 cmpl %a0,%d0 4b8b0: 6774 beqs 4b926 <_Thread_queue_Extract_priority_helper+0xb2> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4b8b2: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4b8b6: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4b8b8: 2748 0004 movel %a0,%a3@(4) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4b8bc: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4b8be: 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; 4b8c2: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4b8c4: 202a 0040 movel %a2@(64),%d0 4b8c8: b0aa 0038 cmpl %a2@(56),%d0 4b8cc: 6716 beqs 4b8e4 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4b8ce: 43e8 0038 lea %a0@(56),%a1 4b8d2: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4b8d6: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4b8da: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4b8de: 41e8 003c lea %a0@(60),%a0 4b8e2: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b8e4: 4a02 tstb %d2 4b8e6: 6626 bnes 4b90e <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b8e8: 7002 moveq #2,%d0 4b8ea: b0aa 0050 cmpl %a2@(80),%d0 4b8ee: 6742 beqs 4b932 <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4b8f0: 46c1 movew %d1,%sr 4b8f2: 2d4a 0008 movel %a2,%fp@(8) 4b8f6: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b8fc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b902: 2d49 000c movel %a1,%fp@(12) 4b906: 4e5e unlk %fp 4b908: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4b90e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b910: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b916: 4e5e unlk %fp 4b918: 4e75 rts Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4b91a: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b91c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b922: 4e5e unlk %fp 4b924: 4e75 rts new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4b926: 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; 4b92a: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b92c: 4a02 tstb %d2 4b92e: 67b8 beqs 4b8e8 <_Thread_queue_Extract_priority_helper+0x74> 4b930: 60dc bras 4b90e <_Thread_queue_Extract_priority_helper+0x9a> 4b932: 7003 moveq #3,%d0 4b934: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4b938: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b93a: 486a 0048 pea %a2@(72) 4b93e: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 4b944: 588f addql #4,%sp 4b946: 227c 1003 fff8 moveal #268697592,%a1 4b94c: 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 } 4b950: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b956: 2d49 000c movel %a1,%fp@(12) 4b95a: 4e5e unlk %fp 4b95c: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... 0005fc80 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 5fc80: 4280 clrl %d0 5fc82: 4e56 0000 linkw %fp,#0 5fc86: 226e 0008 moveal %fp@(8),%a1 5fc8a: 2049 moveal %a1,%a0 5fc8c: 2208 movel %a0,%d1 5fc8e: 5881 addql #4,%d1 5fc90: b290 cmpl %a0@,%d1 5fc92: 6612 bnes 5fca6 <_Thread_queue_First_priority+0x26> uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 5fc94: 5280 addql #1,%d0 5fc96: 41e8 000c lea %a0@(12),%a0 Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 5fc9a: 7204 moveq #4,%d1 5fc9c: b280 cmpl %d0,%d1 5fc9e: 66ec bnes 5fc8c <_Thread_queue_First_priority+0xc> 5fca0: 4280 clrl %d0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 5fca2: 4e5e unlk %fp 5fca4: 4e75 rts for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 5fca6: 2200 movel %d0,%d1 the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 5fca8: 4e5e unlk %fp for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 5fcaa: e588 lsll #2,%d0 5fcac: e989 lsll #4,%d1 5fcae: 9280 subl %d0,%d1 5fcb0: 2031 1800 movel %a1@(00000000,%d1:l),%d0 the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 5fcb4: 4e75 rts ... 00048440 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 48440: 4e56 fff4 linkw %fp,#-12 48444: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48448: 242e 0008 movel %fp@(8),%d2 4844c: 45f9 0004 80a0 lea 480a0 <_Thread_queue_Dequeue>,%a2 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 48452: 2f02 movel %d2,%sp@- #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 48454: 262e 0010 movel %fp@(16),%d3 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 48458: 4e92 jsr %a2@ 4845a: 588f addql #4,%sp 4845c: 4a80 tstl %d0 4845e: 6710 beqs 48470 <_Thread_queue_Flush+0x30> #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; 48460: 2040 moveal %d0,%a0 48462: 2143 0034 movel %d3,%a0@(52) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 48466: 2f02 movel %d2,%sp@- 48468: 4e92 jsr %a2@ 4846a: 588f addql #4,%sp 4846c: 4a80 tstl %d0 4846e: 66f0 bnes 48460 <_Thread_queue_Flush+0x20> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 48470: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48476: 4e5e unlk %fp 48478: 4e75 rts ... 0004847c <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4847c: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4847e: 4e56 0000 linkw %fp,#0 48482: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 48486: 216e 0010 0038 movel %fp@(16),%a0@(56) Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4848c: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 48490: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 48496: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4849a: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4849e: b280 cmpl %d0,%d1 484a0: 6712 beqs 484b4 <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484a2: 2008 movel %a0,%d0 484a4: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484a6: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484aa: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 484ac: 42a8 0004 clrl %a0@(4) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 484b0: 4e5e unlk %fp 484b2: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 484b4: 2008 movel %a0,%d0 484b6: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484bc: 2208 movel %a0,%d1 484be: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484c0: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484c4: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484c6: 2148 0008 movel %a0,%a0@(8) 484ca: 41e8 000c lea %a0@(12),%a0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 484ce: b088 cmpl %a0,%d0 484d0: 67de beqs 484b0 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484d2: 2208 movel %a0,%d1 484d4: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484d6: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484da: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484dc: 2148 0008 movel %a0,%a0@(8) 484e0: 41e8 000c lea %a0@(12),%a0 484e4: b088 cmpl %a0,%d0 484e6: 66d4 bnes 484bc <_Thread_queue_Initialize+0x40> 484e8: 60c6 bras 484b0 <_Thread_queue_Initialize+0x34> ... 000484ec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 484ec: 4e56 fff0 linkw %fp,#-16 484f0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 484f4: 246e 0008 moveal %fp@(8),%a2 484f8: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 484fc: 4a8a tstl %a2 484fe: 6708 beqs 48508 <_Thread_queue_Requeue+0x1c> /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 48500: 7001 moveq #1,%d0 48502: b0aa 0034 cmpl %a2@(52),%d0 48506: 670a beqs 48512 <_Thread_queue_Requeue+0x26> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 48508: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4850e: 4e5e unlk %fp <== NOT EXECUTED 48510: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48512: 303c 0700 movew #1792,%d0 48516: 40c2 movew %sr,%d2 48518: 8082 orl %d2,%d0 4851a: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4851c: 202b 0010 movel %a3@(16),%d0 48520: 0280 0003 bee0 andil #245472,%d0 48526: 660c bnes 48534 <_Thread_queue_Requeue+0x48> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 48528: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4852a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48530: 4e5e unlk %fp 48532: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 48534: 4878 0001 pea 1 48538: 7001 moveq #1,%d0 4853a: 2f0b movel %a3,%sp@- 4853c: 2540 0030 movel %d0,%a2@(48) 48540: 2f0a movel %a2,%sp@- 48542: 4eb9 0004 b874 jsr 4b874 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48548: 486e fffc pea %fp@(-4) 4854c: 2f0b movel %a3,%sp@- 4854e: 2f0a movel %a2,%sp@- 48550: 4eb9 0004 829c jsr 4829c <_Thread_queue_Enqueue_priority> 48556: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4855a: 46c2 movew %d2,%sr 4855c: 60cc bras 4852a <_Thread_queue_Requeue+0x3e> ... 00048560 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 48560: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48564: 486e fffc pea %fp@(-4) 48568: 2f2e 0008 movel %fp@(8),%sp@- 4856c: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 48572: 508f addql #8,%sp 48574: 4aae fffc tstl %fp@(-4) 48578: 6618 bnes 48592 <_Thread_queue_Timeout+0x32> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4857a: 2f00 movel %d0,%sp@- 4857c: 4eb9 0004 b964 jsr 4b964 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48582: 588f addql #4,%sp 48584: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4858a: 5380 subql #1,%d0 4858c: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 48592: 4e5e unlk %fp 48594: 4e75 rts ... 0004ac88 <_Timer_Manager_initialization>: * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { 4ac88: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4ac8c: 4878 0004 pea 4 4ac90: 42a7 clrl %sp@- 4ac92: 4878 003c pea 3c 4ac96: 2f39 0005 c1f6 movel 5c1f6 ,%sp@- 4ac9c: 4878 0002 pea 2 4aca0: 4878 0002 pea 2 4aca4: 4879 0005 dcc6 pea 5dcc6 <_Timer_Information> 4acaa: 4eb9 0004 753c jsr 4753c <_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; 4acb0: 4fef 001c lea %sp@(28),%sp } 4acb4: 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; 4acb6: 42b9 0005 dcfe clrl 5dcfe <_Timer_server> } 4acbc: 4e75 rts ... 0005944c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 5944c: 4e56 ffb0 linkw %fp,#-80 59450: 41ee ffec lea %fp@(-20),%a0 59454: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59458: 246e 0008 moveal %fp@(8),%a2 5945c: 2c0e movel %fp,%d6 5945e: 260e movel %fp,%d3 59460: 5186 subql #8,%d6 59462: 0683 ffff ffe8 addil #-24,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59468: 240a movel %a2,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5946a: 2a0a movel %a2,%d5 5946c: 4bf9 0005 d4dc lea 5d4dc <_Watchdog_Adjust_to_chain>,%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59472: 0682 0000 0030 addil #48,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59478: 0685 0000 0068 addil #104,%d5 5947e: 47f9 0005 9eac lea 59eac <_Chain_Get>,%a3 59484: 49f9 0005 d56c lea 5d56c <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 5948a: 283c 0000 0700 movel #1792,%d4 59490: 2d48 ffd8 movel %a0,%fp@(-40) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 59494: 41ea 0008 lea %a2@(8),%a0 59498: 2d48 ffe0 movel %a0,%fp@(-32) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 5949c: 41ea 0040 lea %a2@(64),%a0 594a0: 2d48 ffe4 movel %a0,%fp@(-28) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 594a4: 41ee fff4 lea %fp@(-12),%a0 594a8: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594ac: 41ee ffec lea %fp@(-20),%a0 594b0: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 594b4: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594b8: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 594bc: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 594c0: 2d43 fff0 movel %d3,%fp@(-16) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 594c4: 41ee fff4 lea %fp@(-12),%a0 594c8: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 594cc: 2039 0007 d180 movel 7d180 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 594d2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 594d6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 594da: 9081 subl %d1,%d0 594dc: 2f03 movel %d3,%sp@- 594de: 2f00 movel %d0,%sp@- 594e0: 2f02 movel %d2,%sp@- 594e2: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 594e4: 2039 0007 d0d2 movel 7d0d2 <_TOD_Now>,%d0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 594ea: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 594ee: 222a 0074 movel %a2@(116),%d1 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 594f2: b280 cmpl %d0,%d1 594f4: 6500 0086 bcsw 5957c <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 594f8: b280 cmpl %d0,%d1 594fa: 6200 00a4 bhiw 595a0 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 594fe: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59502: 202a 0078 movel %a2@(120),%d0 59506: 2f00 movel %d0,%sp@- 59508: 4e93 jsr %a3@ if ( timer == NULL ) { 5950a: 588f addql #4,%sp 5950c: 4a80 tstl %d0 5950e: 672e beqs 5953e <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59510: 2040 moveal %d0,%a0 <== NOT EXECUTED 59512: 7e01 moveq #1,%d7 <== NOT EXECUTED 59514: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59518: be81 cmpl %d1,%d7 <== NOT EXECUTED 5951a: 6700 00a8 beqw 595c4 <_Timer_server_Body+0x178> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5951e: 7e03 moveq #3,%d7 <== NOT EXECUTED 59520: be81 cmpl %d1,%d7 <== NOT EXECUTED 59522: 66de bnes 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59524: 2040 moveal %d0,%a0 <== NOT EXECUTED 59526: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5952a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5952c: 4e94 jsr %a4@ <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5952e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59532: 508f addql #8,%sp <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59534: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59536: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 59538: 588f addql #4,%sp <== NOT EXECUTED 5953a: 4a80 tstl %d0 <== NOT EXECUTED 5953c: 66d2 bnes 59510 <_Timer_server_Body+0xc4> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 5953e: 2004 movel %d4,%d0 59540: 40c1 movew %sr,%d1 59542: 8081 orl %d1,%d0 59544: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 59546: bcae fff4 cmpl %fp@(-12),%d6 5954a: 6700 0086 beqw 595d2 <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 5954e: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 59550: 2039 0007 d180 movel 7d180 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 59556: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 5955a: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5955e: 9081 subl %d1,%d0 <== NOT EXECUTED 59560: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59562: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59566: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59568: 2039 0007 d0d2 movel 7d0d2 <_TOD_Now>,%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 5956e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 59572: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 59576: b280 cmpl %d0,%d1 <== NOT EXECUTED 59578: 6400 ff7e bccw 594f8 <_Timer_server_Body+0xac> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5957c: 2f03 movel %d3,%sp@- 5957e: 2e00 movel %d0,%d7 59580: 9e81 subl %d1,%d7 59582: 2f07 movel %d7,%sp@- 59584: 2d40 ffdc movel %d0,%fp@(-36) 59588: 2f05 movel %d5,%sp@- 5958a: 4eb9 0005 d4dc jsr 5d4dc <_Watchdog_Adjust_to_chain> 59590: 202e ffdc movel %fp@(-36),%d0 59594: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59598: 2540 0074 movel %d0,%a2@(116) 5959c: 6000 ff64 braw 59502 <_Timer_server_Body+0xb6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 595a0: 9280 subl %d0,%d1 595a2: 2f01 movel %d1,%sp@- 595a4: 4878 0001 pea 1 595a8: 2d40 ffdc movel %d0,%fp@(-36) 595ac: 2f05 movel %d5,%sp@- 595ae: 4eb9 0005 d448 jsr 5d448 <_Watchdog_Adjust> 595b4: 202e ffdc movel %fp@(-36),%d0 595b8: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 595bc: 2540 0074 movel %d0,%a2@(116) 595c0: 6000 ff40 braw 59502 <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 595c4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 595c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 595ca: 4e94 jsr %a4@ <== NOT EXECUTED 595cc: 508f addql #8,%sp <== NOT EXECUTED 595ce: 6000 ff32 braw 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 595d2: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 595d6: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 595d8: 202e ffd8 movel %fp@(-40),%d0 595dc: b0ae ffe8 cmpl %fp@(-24),%d0 595e0: 6752 beqs 59634 <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 595e2: 2204 movel %d4,%d1 595e4: 40c0 movew %sr,%d0 595e6: 8280 orl %d0,%d1 595e8: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 595ea: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 595ee: b1ee ffd8 cmpal %fp@(-40),%a0 595f2: 6732 beqs 59626 <_Timer_server_Body+0x1da> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 595f4: 2250 moveal %a0@,%a1 the_chain->first = new_first; 595f6: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 595fa: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 595fe: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 59602: 46c0 movew %d0,%sr /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 59604: 2f28 0024 movel %a0@(36),%sp@- 59608: 2f28 0020 movel %a0@(32),%sp@- 5960c: 2068 001c moveal %a0@(28),%a0 59610: 4e90 jsr %a0@ } 59612: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 59614: 2204 movel %d4,%d1 59616: 40c0 movew %sr,%d0 59618: 8280 orl %d0,%d1 5961a: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5961c: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59620: b1ee ffd8 cmpal %fp@(-40),%a0 59624: 66ce bnes 595f4 <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 59626: 46c0 movew %d0,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 59628: 41ee fff4 lea %fp@(-12),%a0 5962c: 2548 0078 movel %a0,%a2@(120) 59630: 6000 fe9a braw 594cc <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 59634: 4207 clrb %d7 59636: 1547 007c moveb %d7,%a2@(124) 5963a: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 59648: 4878 0008 pea 8 5964c: 2f12 movel %a2@,%sp@- 5964e: 4eb9 0005 cb98 jsr 5cb98 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 59654: 2f0a movel %a2,%sp@- 59656: 4eba fd1c jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5965a: 2f0a movel %a2,%sp@- 5965c: 4eba fd80 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 59660: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> ts->active = true; 59666: 7001 moveq #1,%d0 59668: 1540 007c moveb %d0,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5966c: 2f2e ffe0 movel %fp@(-32),%sp@- 59670: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 59676: 2f2e ffe4 movel %fp@(-28),%sp@- 5967a: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> 59680: 4fef 0018 lea %sp@(24),%sp 59684: 6000 fe3e braw 594c4 <_Timer_server_Body+0x78> 00059688 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 59688: 4e56 fff0 linkw %fp,#-16 5968c: 206e 000c moveal %fp@(12),%a0 59690: 48d7 041c moveml %d2-%d4/%a2,%sp@ 59694: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 59698: 202a 0078 movel %a2@(120),%d0 5969c: 671a beqs 596b8 <_Timer_server_Schedule_operation_method+0x30> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 5969e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 596a2: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 596a6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 596ac: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 596b0: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 596b2: 4ef9 0005 9e74 jmp 59e74 <_Chain_Append> <== NOT EXECUTED 596b8: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 596c6: 2028 0038 movel %a0@(56),%d0 596ca: 7201 moveq #1,%d1 596cc: b280 cmpl %d0,%d1 596ce: 6700 0088 beqw 59758 <_Timer_server_Schedule_operation_method+0xd0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 596d2: 7203 moveq #3,%d1 596d4: b280 cmpl %d0,%d1 596d6: 670e beqs 596e6 <_Timer_server_Schedule_operation_method+0x5e> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 596d8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596de: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 596e0: 4ef9 0005 c160 jmp 5c160 <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 596e6: 203c 0000 0700 movel #1792,%d0 596ec: 40c2 movew %sr,%d2 596ee: 8082 orl %d2,%d0 596f0: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 596f2: 260a movel %a2,%d3 596f4: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 596fa: 2039 0007 d0d2 movel 7d0d2 <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 59700: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59704: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59708: b689 cmpl %a1,%d3 5970a: 671a beqs 59726 <_Timer_server_Schedule_operation_method+0x9e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 5970c: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 59710: b280 cmpl %d0,%d1 59712: 6400 00b8 bccw 597cc <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 59716: 2800 movel %d0,%d4 59718: 9881 subl %d1,%d4 if (delta_interval > delta) { 5971a: b883 cmpl %d3,%d4 5971c: 6500 00ba bcsw 597d8 <_Timer_server_Schedule_operation_method+0x150> 59720: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59722: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 59726: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 5972a: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5972c: 4868 0010 pea %a0@(16) 59730: 486a 0068 pea %a2@(104) 59734: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> if ( !ts->active ) { 5973a: 508f addql #8,%sp 5973c: 102a 007c moveb %a2@(124),%d0 59740: 6696 bnes 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 59742: 2f0a movel %a2,%sp@- 59744: 4eba fc98 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) 59748: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59750: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 59752: 4ef9 0005 c160 jmp 5c160 <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 59758: 203c 0000 0700 movel #1792,%d0 5975e: 40c3 movew %sr,%d3 59760: 8083 orl %d3,%d0 59762: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59764: 2039 0007 d180 movel 7d180 <_Watchdog_Ticks_since_boot>,%d0 5976a: 240a movel %a2,%d2 5976c: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 59772: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59776: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5977a: b489 cmpl %a1,%d2 5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5977e: 2800 movel %d0,%d4 59780: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 59782: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59786: b484 cmpl %d4,%d2 59788: 623a bhis 597c4 <_Timer_server_Schedule_operation_method+0x13c> 5978a: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5978c: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 59790: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59794: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59796: 4868 0010 pea %a0@(16) 5979a: 486a 0030 pea %a2@(48) 5979e: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> if ( !ts->active ) { 597a4: 508f addql #8,%sp 597a6: 102a 007c moveb %a2@(124),%d0 597aa: 6600 ff2c bnew 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 597ae: 2f0a movel %a2,%sp@- 597b0: 4eba fbc2 jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) 597b4: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 597bc: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 597be: 4ef9 0005 c160 jmp 5c160 <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 597c4: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 597c6: 2342 0010 movel %d2,%a1@(16) 597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x108> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 597cc: d283 addl %d3,%d1 delta_interval += delta; 597ce: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 597d0: 2341 0010 movel %d1,%a1@(16) 597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 597d8: 9684 subl %d4,%d3 597da: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 597dc: 2341 0010 movel %d1,%a1@(16) 597e0: 6000 ff44 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> 0004a730 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a730: 4e56 ffdc linkw %fp,#-36 4a734: 206e 0008 moveal %fp@(8),%a0 4a738: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a73c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 4a742: 45f9 0005 b448 lea 5b448 <__muldi3>,%a2 4a748: 42a7 clrl %sp@- /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 4a74a: 2828 0004 movel %a0@(4),%d4 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a74e: 266e 000c moveal %fp@(12),%a3 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a752: 2f13 movel %a3@,%sp@- 4a754: 5bc0 smi %d0 4a756: 49c0 extbl %d0 4a758: 2f00 movel %d0,%sp@- /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a75a: 2a10 movel %a0@,%d5 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a75c: 4e92 jsr %a2@ const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a75e: 2a6e 0010 moveal %fp@(16),%a5 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a762: 2040 moveal %d0,%a0 4a764: 2241 moveal %d1,%a1 4a766: 4fef 0010 lea %sp@(16),%sp right += rhs->tv_nsec; 4a76a: 262b 0004 movel %a3@(4),%d3 4a76e: 5bc2 smi %d2 4a770: 49c2 extbl %d2 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a772: 286e 0014 moveal %fp@(20),%a4 * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4a776: 2208 movel %a0,%d1 4a778: d689 addl %a1,%d3 4a77a: d581 addxl %d1,%d2 if ( right == 0 ) { 4a77c: 6700 008a beqw 4a808 <_Timespec_Divide+0xd8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a780: 2f3c 3b9a ca00 movel #1000000000,%sp@- * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a786: 2c3c 0005 b4b0 movel #373936,%d6 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a78c: 42a7 clrl %sp@- 4a78e: 2f05 movel %d5,%sp@- 4a790: 5bc1 smi %d1 4a792: 49c1 extbl %d1 4a794: 2f01 movel %d1,%sp@- * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a796: 2a04 movel %d4,%d5 4a798: 5bc4 smi %d4 4a79a: 49c4 extbl %d4 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a79c: 4e92 jsr %a2@ 4a79e: 4fef 0010 lea %sp@(16),%sp 4a7a2: 2241 moveal %d1,%a1 4a7a4: 2040 moveal %d0,%a0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a7a6: 2f3c 0001 86a0 movel #100000,%sp@- 4a7ac: 2008 movel %a0,%d0 4a7ae: 2209 movel %a1,%d1 4a7b0: 42a7 clrl %sp@- 4a7b2: d285 addl %d5,%d1 4a7b4: d184 addxl %d4,%d0 4a7b6: 2f01 movel %d1,%sp@- 4a7b8: 2f00 movel %d0,%sp@- 4a7ba: 4e92 jsr %a2@ 4a7bc: 4fef 000c lea %sp@(12),%sp 4a7c0: 2046 moveal %d6,%a0 4a7c2: 2e83 movel %d3,%sp@ 4a7c4: 2f02 movel %d2,%sp@- 4a7c6: 2f01 movel %d1,%sp@- 4a7c8: 2f00 movel %d0,%sp@- 4a7ca: 4e90 jsr %a0@ 4a7cc: 4fef 0010 lea %sp@(16),%sp *ival_percentage = answer / 1000; 4a7d0: 2046 moveal %d6,%a0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a7d2: 2440 moveal %d0,%a2 *ival_percentage = answer / 1000; 4a7d4: 4878 03e8 pea 3e8 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a7d8: 2641 moveal %d1,%a3 *ival_percentage = answer / 1000; 4a7da: 42a7 clrl %sp@- 4a7dc: 2f01 movel %d1,%sp@- 4a7de: 2f0a movel %a2,%sp@- 4a7e0: 4e90 jsr %a0@ 4a7e2: 4fef 0010 lea %sp@(16),%sp *fval_percentage = answer % 1000; 4a7e6: 4878 03e8 pea 3e8 4a7ea: 42a7 clrl %sp@- * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4a7ec: 2a81 movel %d1,%a5@ *fval_percentage = answer % 1000; 4a7ee: 2f0b movel %a3,%sp@- 4a7f0: 2f0a movel %a2,%sp@- 4a7f2: 4eb9 0005 b84c jsr 5b84c <__umoddi3> 4a7f8: 4fef 0010 lea %sp@(16),%sp 4a7fc: 2881 movel %d1,%a4@ } 4a7fe: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a804: 4e5e unlk %fp 4a806: 4e75 rts left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 4a808: 4295 clrl %a5@ *fval_percentage = 0; 4a80a: 4294 clrl %a4@ answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 4a80c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a812: 4e5e unlk %fp 4a814: 4e75 rts ... 0007adc0 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 7adc0: 4e56 0000 linkw %fp,#0 7adc4: 226e 0008 moveal %fp@(8),%a1 7adc8: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 7adcc: 2211 movel %a1@,%d1 7adce: 2010 movel %a0@,%d0 7add0: b081 cmpl %d1,%d0 7add2: 6d18 blts 7adec <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 7add4: 6e10 bgts 7ade6 <_Timespec_Greater_than+0x26> #include #include #include bool _Timespec_Greater_than( 7add6: 2068 0004 moveal %a0@(4),%a0 7adda: b1e9 0004 cmpal %a1@(4),%a0 7adde: 5dc0 slt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ade0: 4e5e unlk %fp #include #include #include bool _Timespec_Greater_than( 7ade2: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ade4: 4e75 rts 7ade6: 4e5e unlk %fp <== NOT EXECUTED ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 7ade8: 4200 clrb %d0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7adea: 4e75 rts <== NOT EXECUTED 7adec: 4e5e unlk %fp bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 7adee: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7adf0: 4e75 rts ... 00065578 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 65578: 4e56 0000 linkw %fp,#0 6557c: 206e 0008 moveal %fp@(8),%a0 if ( !time ) 65580: 4a88 tstl %a0 65582: 6718 beqs 6559c <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 65584: 4a90 tstl %a0@ 65586: 6d14 blts 6559c <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 65588: 2028 0004 movel %a0@(4),%d0 6558c: 6d0e blts 6559c <_Timespec_Is_valid+0x24> if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 6558e: 4e5e unlk %fp #include #include #include bool _Timespec_Is_valid( 65590: 0c80 3b9a c9ff cmpil #999999999,%d0 65596: 53c0 sls %d0 65598: 4480 negl %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 6559a: 4e75 rts 6559c: 4e5e unlk %fp #include #include #include bool _Timespec_Is_valid( 6559e: 4200 clrb %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 655a0: 4e75 rts ... 0007adf4 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 7adf4: 4e56 0000 linkw %fp,#0 7adf8: 226e 0008 moveal %fp@(8),%a1 7adfc: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec < rhs->tv_sec ) 7ae00: 2211 movel %a1@,%d1 7ae02: 2010 movel %a0@,%d0 7ae04: b081 cmpl %d1,%d0 7ae06: 6e18 bgts 7ae20 <_Timespec_Less_than+0x2c> return true; if ( lhs->tv_sec > rhs->tv_sec ) 7ae08: 6d10 blts 7ae1a <_Timespec_Less_than+0x26> #include #include #include bool _Timespec_Less_than( 7ae0a: 2068 0004 moveal %a0@(4),%a0 7ae0e: b1e9 0004 cmpal %a1@(4),%a0 7ae12: 5ec0 sgt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae14: 4e5e unlk %fp #include #include #include bool _Timespec_Less_than( 7ae16: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae18: 4e75 rts 7ae1a: 4e5e unlk %fp ) { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) 7ae1c: 4200 clrb %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae1e: 4e75 rts 7ae20: 4e5e unlk %fp bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 7ae22: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae24: 4e75 rts ... 0004baf0 <_User_extensions_Add_set>: #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4baf0: 4e56 0000 linkw %fp,#0 4baf4: 2f0b movel %a3,%sp@- _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4baf6: 47f9 0004 673c lea 4673c <_Chain_Append>,%a3 #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4bafc: 2f0a movel %a2,%sp@- 4bafe: 246e 0008 moveal %fp@(8),%a2 _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4bb02: 2f0a movel %a2,%sp@- 4bb04: 4879 0005 dae2 pea 5dae2 <_User_extensions_List> 4bb0a: 4e93 jsr %a3@ /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4bb0c: 202a 0024 movel %a2@(36),%d0 4bb10: 508f addql #8,%sp 4bb12: 6712 beqs 4bb26 <_User_extensions_Add_set+0x36> the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append( 4bb14: 486a 0008 pea %a2@(8) 4bb18: 4879 0005 d958 pea 5d958 <_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 = 4bb1e: 2540 0010 movel %d0,%a2@(16) the_extension->Callouts.thread_switch; _Chain_Append( 4bb22: 4e93 jsr %a3@ 4bb24: 508f addql #8,%sp &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 4bb26: 246e fff8 moveal %fp@(-8),%a2 4bb2a: 266e fffc moveal %fp@(-4),%a3 4bb2e: 4e5e unlk %fp 4bb30: 4e75 rts ... 00048b60 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48b60: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b64: 203c 0005 dae6 movel #383718,%d0 48b6a: 23c0 0005 dae2 movel %d0,5dae2 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b70: 203c 0005 dae2 movel #383714,%d0 48b76: 23c0 0005 daea movel %d0,5daea <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b7c: 203c 0005 d95c movel #383324,%d0 48b82: 23c0 0005 d958 movel %d0,5d958 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b88: 203c 0005 d958 movel #383320,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48b8e: 42b9 0005 dae6 clrl 5dae6 <_User_extensions_List+0x4> 48b94: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 48b98: 2439 0005 c25a movel 5c25a ,%d2 initial_extensions = Configuration.User_extension_table; 48b9e: 2639 0005 c25e movel 5c25e ,%d3 48ba4: 42b9 0005 d95c clrl 5d95c <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 48baa: 23c0 0005 d960 movel %d0,5d960 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48bb0: 4a83 tstl %d3 48bb2: 6764 beqs 48c18 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 48bb4: 7834 moveq #52,%d4 48bb6: 4c02 4800 mulsl %d2,%d4 48bba: 2f04 movel %d4,%sp@- 48bbc: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> 48bc2: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48bc4: 2f04 movel %d4,%sp@- 48bc6: 42a7 clrl %sp@- 48bc8: 2f00 movel %d0,%sp@- 48bca: 4eb9 0004 e094 jsr 4e094 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48bd0: 4fef 0010 lea %sp@(16),%sp 48bd4: 4a82 tstl %d2 48bd6: 6740 beqs 48c18 <_User_extensions_Handler_initialization+0xb8> 48bd8: 4284 clrl %d4 48bda: 47f9 0004 baf0 lea 4baf0 <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48be0: 2043 moveal %d3,%a0 48be2: 5284 addql #1,%d4 48be4: 0683 0000 0020 addil #32,%d3 48bea: 2558 0014 movel %a0@+,%a2@(20) 48bee: 2558 0018 movel %a0@+,%a2@(24) 48bf2: 2558 001c movel %a0@+,%a2@(28) 48bf6: 2558 0020 movel %a0@+,%a2@(32) 48bfa: 2558 0024 movel %a0@+,%a2@(36) 48bfe: 2558 0028 movel %a0@+,%a2@(40) 48c02: 2558 002c movel %a0@+,%a2@(44) 48c06: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 48c0a: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48c0c: 45ea 0034 lea %a2@(52),%a2 48c10: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48c12: 588f addql #4,%sp 48c14: b882 cmpl %d2,%d4 48c16: 65c8 bcss 48be0 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48c18: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48c1e: 4e5e unlk %fp 48c20: 4e75 rts ... 00048cf4 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48cf4: 4e56 0000 linkw %fp,#0 48cf8: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48cfa: 2479 0005 dae2 moveal 5dae2 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48d00: 2f02 movel %d2,%sp@- 48d02: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d06: b5fc 0005 dae6 cmpal #383718,%a2 48d0c: 6722 beqs 48d30 <_User_extensions_Thread_create+0x3c> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 48d0e: 206a 0014 moveal %a2@(20),%a0 48d12: 4a88 tstl %a0 48d14: 6710 beqs 48d26 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 48d16: 2f02 movel %d2,%sp@- 48d18: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 48d1e: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 48d20: 508f addql #8,%sp 48d22: 4a00 tstb %d0 48d24: 670c beqs 48d32 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 48d26: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d28: b5fc 0005 dae6 cmpal #383718,%a2 48d2e: 66de bnes 48d0e <_User_extensions_Thread_create+0x1a> 48d30: 7001 moveq #1,%d0 return false; } } return true; } 48d32: 242e fff8 movel %fp@(-8),%d2 48d36: 246e fffc moveal %fp@(-4),%a2 48d3a: 4e5e unlk %fp 48d3c: 4e75 rts ... 00048d40 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d40: 4e56 0000 linkw %fp,#0 48d44: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d46: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d4c: 2f02 movel %d2,%sp@- 48d4e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d52: b5fc 0005 dae2 cmpal #383714,%a2 48d58: 6720 beqs 48d7a <_User_extensions_Thread_delete+0x3a> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 48d5a: 206a 0020 moveal %a2@(32),%a0 48d5e: 4a88 tstl %a0 48d60: 670c beqs 48d6e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 48d62: 2f02 movel %d2,%sp@- 48d64: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 48d6a: 4e90 jsr %a0@ 48d6c: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48d6e: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d72: b5fc 0005 dae2 cmpal #383714,%a2 48d78: 66e0 bnes 48d5a <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 48d7a: 242e fff8 movel %fp@(-8),%d2 48d7e: 246e fffc moveal %fp@(-4),%a2 48d82: 4e5e unlk %fp 48d84: 4e75 rts ... 00048c62 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c62: 4e56 0000 linkw %fp,#0 48c66: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c68: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c6e: 2f02 movel %d2,%sp@- 48c70: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c74: b5fc 0005 dae2 cmpal #383714,%a2 48c7a: 671a beqs 48c96 <_User_extensions_Thread_exitted+0x34> !_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 ) 48c7c: 206a 002c moveal %a2@(44),%a0 48c80: 4a88 tstl %a0 48c82: 6706 beqs 48c8a <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 48c84: 2f02 movel %d2,%sp@- 48c86: 4e90 jsr %a0@ 48c88: 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 ) { 48c8a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c8e: b5fc 0005 dae2 cmpal #383714,%a2 48c94: 66e6 bnes 48c7c <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 48c96: 242e fff8 movel %fp@(-8),%d2 48c9a: 246e fffc moveal %fp@(-4),%a2 48c9e: 4e5e unlk %fp 48ca0: 4e75 rts 00048dcc <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 48dcc: 4e56 fff4 linkw %fp,#-12 48dd0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48dd4: 262e 0008 movel %fp@(8),%d3 48dd8: 242e 000c movel %fp@(12),%d2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48ddc: 2479 0005 d958 moveal 5d958 <_User_extensions_Switches_list>,%a2 48de2: b5fc 0005 d95c cmpal #383324,%a2 48de8: 6716 beqs 48e00 <_User_extensions_Thread_switch+0x34> !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 48dea: 2f02 movel %d2,%sp@- 48dec: 2f03 movel %d3,%sp@- 48dee: 206a 0008 moveal %a2@(8),%a0 48df2: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 48df4: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48df6: 508f addql #8,%sp 48df8: b5fc 0005 d95c cmpal #383324,%a2 48dfe: 66ea bnes 48dea <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 48e00: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48e06: 4e5e unlk %fp 48e08: 4e75 rts ... 0005d4dc <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5d4dc: 4e56 ffe4 linkw %fp,#-28 5d4e0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d4e4: 2a6e 0008 moveal %fp@(8),%a5 5d4e8: 282e 000c movel %fp@(12),%d4 5d4ec: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5d4f0: 675e beqs 5d550 <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5d4f2: 263c 0000 0700 movel #1792,%d3 5d4f8: 2003 movel %d3,%d0 5d4fa: 40c1 movew %sr,%d1 5d4fc: 8081 orl %d1,%d0 5d4fe: 46c0 movew %d0,%sr 5d500: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d502: 240b movel %a3,%d2 5d504: 5882 addql #4,%d2 5d506: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5d508: b1cc cmpal %a4,%a0 5d50a: 6742 beqs 5d54e <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 5d50c: 2028 0010 movel %a0@(16),%d0 5d510: b880 cmpl %d0,%d4 5d512: 654c bcss 5d560 <_Watchdog_Adjust_to_chain+0x84> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 5d514: 9880 subl %d0,%d4 first->delta_interval = 0; 5d516: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5d51a: 2250 moveal %a0@,%a1 previous = the_node->previous; 5d51c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5d520: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5d522: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5d526: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5d528: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5d52c: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5d530: 2149 0004 movel %a1,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 5d534: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5d536: 2003 movel %d3,%d0 5d538: 46c1 movew %d1,%sr 5d53a: 8081 orl %d1,%d0 5d53c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5d53e: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5d540: b1cc cmpal %a4,%a0 5d542: 6714 beqs 5d558 <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5d544: 4aa8 0010 tstl %a0@(16) 5d548: 67d0 beqs 5d51a <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d54a: 4a84 tstl %d4 5d54c: 66ba bnes 5d508 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d54e: 46c1 movew %d1,%sr } 5d550: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d554: 4e5e unlk %fp 5d556: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d558: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d55a: 4a84 tstl %d4 5d55c: 66aa bnes 5d508 <_Watchdog_Adjust_to_chain+0x2c> 5d55e: 60ee bras 5d54e <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 5d560: 9084 subl %d4,%d0 5d562: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d566: 46c1 movew %d1,%sr 5d568: 60e6 bras 5d550 <_Watchdog_Adjust_to_chain+0x74> ... 00048f08 <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48f08: 43f9 0005 da2c lea 5da2c <_Watchdog_Ticks_chain>,%a1 48f0e: 41f9 0005 da20 lea 5da20 <_Watchdog_Seconds_chain>,%a0 * * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { 48f14: 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 ); } 48f18: 4e5e unlk %fp * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; 48f1a: 42b9 0005 da90 clrl 5da90 <_Watchdog_Sync_count> _Watchdog_Sync_level = 0; 48f20: 42b9 0005 da0a clrl 5da0a <_Watchdog_Sync_level> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48f26: 23c9 0005 da34 movel %a1,5da34 <_Watchdog_Ticks_chain+0x8> 48f2c: 23c8 0005 da28 movel %a0,5da28 <_Watchdog_Seconds_chain+0x8> _Watchdog_Ticks_since_boot = 0; 48f32: 42b9 0005 da94 clrl 5da94 <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48f38: 22bc 0005 da30 movel #383536,%a1@ the_chain->permanent_null = NULL; 48f3e: 42b9 0005 da30 clrl 5da30 <_Watchdog_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48f44: 20bc 0005 da24 movel #383524,%a0@ the_chain->permanent_null = NULL; 48f4a: 42b9 0005 da24 clrl 5da24 <_Watchdog_Seconds_chain+0x4> _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 48f50: 4e75 rts ... 00048e0c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 48e0c: 4e56 ffec linkw %fp,#-20 48e10: 226e 000c moveal %fp@(12),%a1 48e14: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48e18: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 48e1c: 2a3c 0000 0700 movel #1792,%d5 48e22: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 48e24: 2839 0005 d9ee movel 5d9ee <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 48e2a: 40c3 movew %sr,%d3 48e2c: 8083 orl %d3,%d0 48e2e: 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 ) { 48e30: 4aa9 0008 tstl %a1@(8) 48e34: 6600 00c6 bnew 48efc <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 48e38: 2039 0005 da90 movel 5da90 <_Watchdog_Sync_count>,%d0 48e3e: 5280 addql #1,%d0 48e40: 23c0 0005 da90 movel %d0,5da90 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 48e46: 7001 moveq #1,%d0 48e48: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 48e4c: 2029 000c movel %a1@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 48e50: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e52: 6764 beqs 48eb8 <_Watchdog_Insert+0xac> 48e54: 4a90 tstl %a0@ 48e56: 6760 beqs 48eb8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e58: 2228 0010 movel %a0@(16),%d1 48e5c: b280 cmpl %d0,%d1 48e5e: 6252 bhis 48eb2 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48e60: 2405 movel %d5,%d2 48e62: 46c3 movew %d3,%sr 48e64: 8483 orl %d3,%d2 48e66: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48e68: 7401 moveq #1,%d2 48e6a: b4a9 0008 cmpl %a1@(8),%d2 48e6e: 666e bnes 48ede <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48e70: 2439 0005 da0a movel 5da0a <_Watchdog_Sync_level>,%d2 48e76: b484 cmpl %d4,%d2 48e78: 6230 bhis 48eaa <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48e7a: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48e7c: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e7e: 4a80 tstl %d0 48e80: 6736 beqs 48eb8 <_Watchdog_Insert+0xac> 48e82: 4a90 tstl %a0@ 48e84: 6732 beqs 48eb8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e86: 2228 0010 movel %a0@(16),%d1 48e8a: b081 cmpl %d1,%d0 48e8c: 6524 bcss 48eb2 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48e8e: 2405 movel %d5,%d2 48e90: 46c3 movew %d3,%sr 48e92: 8483 orl %d3,%d2 48e94: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48e96: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48e98: 7201 moveq #1,%d1 48e9a: b2a9 0008 cmpl %a1@(8),%d1 48e9e: 663e bnes 48ede <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48ea0: 2239 0005 da0a movel 5da0a <_Watchdog_Sync_level>,%d1 48ea6: b284 cmpl %d4,%d1 48ea8: 63d2 blss 48e7c <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 48eaa: 23c4 0005 da0a movel %d4,5da0a <_Watchdog_Sync_level> goto restart; 48eb0: 609a bras 48e4c <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 48eb2: 9280 subl %d0,%d1 48eb4: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 48eb8: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 48ebc: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48ebe: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 48ec0: 2239 0005 da94 movel 5da94 <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 48ec6: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48ec8: 2348 0004 movel %a0,%a1@(4) 48ecc: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 48ed0: 2340 0010 movel %d0,%a1@(16) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 48ed4: 2549 0004 movel %a1,%a2@(4) 48ed8: 2342 0008 movel %d2,%a1@(8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 48edc: 228a movel %a2,%a1@ _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 48ede: 23c4 0005 da0a movel %d4,5da0a <_Watchdog_Sync_level> _Watchdog_Sync_count--; 48ee4: 2039 0005 da90 movel 5da90 <_Watchdog_Sync_count>,%d0 48eea: 5380 subql #1,%d0 48eec: 23c0 0005 da90 movel %d0,5da90 <_Watchdog_Sync_count> _ISR_Enable( level ); 48ef2: 46c3 movew %d3,%sr } 48ef4: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48ef8: 4e5e unlk %fp 48efa: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 48efc: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 48efe: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f02: 4e5e unlk %fp 48f04: 4e75 rts ... 00048f54 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f54: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 48f5a: 4e56 0000 linkw %fp,#0 48f5e: 206e 0008 moveal %fp@(8),%a0 48f62: 2f0a movel %a2,%sp@- 48f64: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f66: 40c1 movew %sr,%d1 48f68: 8081 orl %d1,%d0 48f6a: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 48f6c: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 48f70: 7401 moveq #1,%d2 48f72: b480 cmpl %d0,%d2 48f74: 6764 beqs 48fda <_Watchdog_Remove+0x86> 48f76: 6314 blss 48f8c <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48f78: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 48f7e: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48f82: 46c1 movew %d1,%sr return( previous_state ); } 48f84: 241f movel %sp@+,%d2 48f86: 245f moveal %sp@+,%a2 48f88: 4e5e unlk %fp 48f8a: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 48f8c: 143c 0003 moveb #3,%d2 48f90: b480 cmpl %d0,%d2 48f92: 65e4 bcss 48f78 <_Watchdog_Remove+0x24> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48f94: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 48f96: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 48f9a: 4a91 tstl %a1@ 48f9c: 6708 beqs 48fa6 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 48f9e: 2428 0010 movel %a0@(16),%d2 48fa2: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 48fa6: 2479 0005 da90 moveal 5da90 <_Watchdog_Sync_count>,%a2 48fac: 4a8a tstl %a2 48fae: 670c beqs 48fbc <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 48fb0: 2479 0005 d9ee moveal 5d9ee <_ISR_Nest_level>,%a2 48fb6: 23ca 0005 da0a movel %a2,5da0a <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48fbc: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48fc0: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48fc2: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fc6: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 48fcc: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48fd0: 46c1 movew %d1,%sr return( previous_state ); } 48fd2: 241f movel %sp@+,%d2 48fd4: 245f moveal %sp@+,%a2 48fd6: 4e5e unlk %fp 48fd8: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fda: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 48fe0: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fe4: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48fe8: 46c1 movew %d1,%sr return( previous_state ); } 48fea: 241f movel %sp@+,%d2 48fec: 245f moveal %sp@+,%a2 48fee: 4e5e unlk %fp 48ff0: 4e75 rts ... 0004a578 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 4a578: 4e56 fff0 linkw %fp,#-16 printk( 4a57c: 223c 0005 d277 movel #381559,%d1 void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 4a582: 206e 000c moveal %fp@(12),%a0 4a586: 48d7 003c moveml %d2-%d5,%sp@ 4a58a: 202e 0008 movel %fp@(8),%d0 printk( 4a58e: 2a28 0024 movel %a0@(36),%d5 4a592: 2828 0020 movel %a0@(32),%d4 4a596: 2628 001c movel %a0@(28),%d3 4a59a: 2428 000c movel %a0@(12),%d2 4a59e: 2268 0010 moveal %a0@(16),%a1 4a5a2: 4a80 tstl %d0 4a5a4: 672a beqs 4a5d0 <_Watchdog_Report+0x58> 4a5a6: 2f05 movel %d5,%sp@- 4a5a8: 2f04 movel %d4,%sp@- 4a5aa: 2f03 movel %d3,%sp@- 4a5ac: 2f08 movel %a0,%sp@- 4a5ae: 2f02 movel %d2,%sp@- 4a5b0: 2f09 movel %a1,%sp@- 4a5b2: 2f01 movel %d1,%sp@- 4a5b4: 2f00 movel %d0,%sp@- 4a5b6: 4879 0005 d3f8 pea 5d3f8 <_Status_Object_name_errors_to_status+0x4a> 4a5bc: 4eb9 0004 4084 jsr 44084 4a5c2: 4fef 0024 lea %sp@(36),%sp watch, watch->routine, watch->id, watch->user_data ); } 4a5c6: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a5cc: 4e5e unlk %fp 4a5ce: 4e75 rts void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 4a5d0: 2f05 movel %d5,%sp@- 4a5d2: 223c 0005 d27c movel #381564,%d1 4a5d8: 2f04 movel %d4,%sp@- 4a5da: 2001 movel %d1,%d0 4a5dc: 2f03 movel %d3,%sp@- 4a5de: 2f08 movel %a0,%sp@- 4a5e0: 2f02 movel %d2,%sp@- 4a5e2: 2f09 movel %a1,%sp@- 4a5e4: 2f01 movel %d1,%sp@- 4a5e6: 2f00 movel %d0,%sp@- 4a5e8: 4879 0005 d3f8 pea 5d3f8 <_Status_Object_name_errors_to_status+0x4a> 4a5ee: 4eb9 0004 4084 jsr 44084 4a5f4: 4fef 0024 lea %sp@(36),%sp watch, watch->routine, watch->id, watch->user_data ); } 4a5f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a5fe: 4e5e unlk %fp 4a600: 4e75 rts ... 0004a4fc <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a4fc: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4a502: 4e56 ffe8 linkw %fp,#-24 4a506: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a50a: 242e 0008 movel %fp@(8),%d2 4a50e: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a512: 40c3 movew %sr,%d3 4a514: 8083 orl %d3,%d0 4a516: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4a518: 2f0b movel %a3,%sp@- 4a51a: 4bf9 0004 4084 lea 44084 ,%a5 4a520: 2f02 movel %d2,%sp@- 4a522: 4879 0005 d3c2 pea 5d3c2 <_Status_Object_name_errors_to_status+0x14> 4a528: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a52a: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4a52c: 4fef 000c lea %sp@(12),%sp 4a530: b7ca cmpal %a2,%a3 4a532: 672c beqs 4a560 <_Watchdog_Report_chain+0x64> 4a534: 49f9 0004 a578 lea 4a578 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4a53a: 2f0a movel %a2,%sp@- 4a53c: 42a7 clrl %sp@- 4a53e: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 4a540: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 4a542: 508f addql #8,%sp 4a544: b7ca cmpal %a2,%a3 4a546: 66f2 bnes 4a53a <_Watchdog_Report_chain+0x3e> { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4a548: 2f02 movel %d2,%sp@- 4a54a: 4879 0005 d3d9 pea 5d3d9 <_Status_Object_name_errors_to_status+0x2b> 4a550: 4e95 jsr %a5@ 4a552: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4a554: 46c3 movew %d3,%sr } 4a556: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a55c: 4e5e unlk %fp 4a55e: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4a560: 4879 0005 d3e8 pea 5d3e8 <_Status_Object_name_errors_to_status+0x3a> 4a566: 4e95 jsr %a5@ 4a568: 588f addql #4,%sp } _ISR_Enable( level ); 4a56a: 46c3 movew %d3,%sr } 4a56c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a572: 4e5e unlk %fp 4a574: 4e75 rts ... 000490d8 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490d8: 4e56 0000 linkw %fp,#0 490dc: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 490de: 2639 0005 c228 movel 5c228 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490e4: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 490e6: 2439 0005 c224 movel 5c224 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 490ec: 4a39 0005 c24c tstb 5c24c 490f2: 6628 bnes 4911c <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 490f4: 4878 0004 pea 4 490f8: 2f03 movel %d3,%sp@- 490fa: 2f02 movel %d2,%sp@- 490fc: 4879 0005 d976 pea 5d976 <_Workspace_Area> 49102: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49108: 4fef 0010 lea %sp@(16),%sp 4910c: 4a80 tstl %d0 4910e: 671e beqs 4912e <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 49110: 242e fff8 movel %fp@(-8),%d2 49114: 262e fffc movel %fp@(-4),%d3 49118: 4e5e unlk %fp 4911a: 4e75 rts uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 4911c: 2f03 movel %d3,%sp@- 4911e: 42a7 clrl %sp@- 49120: 2f02 movel %d2,%sp@- 49122: 4eb9 0004 e094 jsr 4e094 49128: 4fef 000c lea %sp@(12),%sp 4912c: 60c6 bras 490f4 <_Workspace_Handler_initialization+0x1c> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4912e: 4878 0003 pea 3 49132: 4878 0001 pea 1 49136: 42a7 clrl %sp@- 49138: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 0004cad4 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4cad4: 4e56 ffe8 linkw %fp,#-24 4cad8: 202e 0010 movel %fp@(16),%d0 4cadc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4cae0: 242e 0008 movel %fp@(8),%d2 4cae4: 262e 000c movel %fp@(12),%d3 4cae8: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4caec: 4a82 tstl %d2 4caee: 677a beqs 4cb6a return RTEMS_INVALID_NAME; if ( !id ) 4caf0: 4a8a tstl %a2 4caf2: 6700 00ce beqw 4cbc2 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4caf6: 0803 0004 btst #4,%d3 4cafa: 677a beqs 4cb76 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4cafc: 4a80 tstl %d0 4cafe: 6700 00b4 beqw 4cbb4 4cb02: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 4cb08: 5281 addql #1,%d1 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4cb0a: 42ae fff8 clrl %fp@(-8) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4cb0e: 2d40 fffc movel %d0,%fp@(-4) 4cb12: 23c1 0005 d954 movel %d1,5d954 <_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 ); 4cb18: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cb1e: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cb24: 588f addql #4,%sp 4cb26: 2640 moveal %d0,%a3 4cb28: 4a80 tstl %d0 4cb2a: 6776 beqs 4cba2 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4cb2c: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4cb30: 486e fff8 pea %fp@(-8) 4cb34: 486b 0014 pea %a3@(20) 4cb38: 4eb9 0004 d068 jsr 4d068 <_CORE_barrier_Initialize> 4cb3e: 202b 0008 movel %a3@(8),%d0 4cb42: 4281 clrl %d1 4cb44: 2079 0005 db8e moveal 5db8e <_Barrier_Information+0x18>,%a0 4cb4a: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cb4c: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cb50: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4cb54: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4cb56: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4cb5c: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4cb5e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cb60: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cb66: 4e5e unlk %fp 4cb68: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4cb6a: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cb6c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cb72: 4e5e unlk %fp 4cb74: 4e75 rts if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4cb76: 7201 moveq #1,%d1 4cb78: 2d41 fff8 movel %d1,%fp@(-8) 4cb7c: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 4cb82: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4cb84: 2d40 fffc movel %d0,%fp@(-4) 4cb88: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> 4cb8e: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cb94: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cb9a: 588f addql #4,%sp 4cb9c: 2640 moveal %d0,%a3 4cb9e: 4a80 tstl %d0 4cba0: 668a bnes 4cb2c _Thread_Enable_dispatch(); 4cba2: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4cba8: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbaa: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbb0: 4e5e unlk %fp 4cbb2: 4e75 rts return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4cbb4: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbb8: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbbe: 4e5e unlk %fp 4cbc0: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4cbc2: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbc4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbca: 4e5e unlk %fp 4cbcc: 4e75 rts ... 0004cc40 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 4cc40: 4e56 fffc linkw %fp,#-4 4cc44: 2f0a movel %a2,%sp@- 4cc46: 246e 000c moveal %fp@(12),%a2 4cc4a: 2f02 movel %d2,%sp@- 4cc4c: 242e 0008 movel %fp@(8),%d2 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4cc50: 4a8a tstl %a2 4cc52: 6754 beqs 4cca8 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4cc54: 486e fffc pea %fp@(-4) 4cc58: 2f02 movel %d2,%sp@- 4cc5a: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cc60: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cc66: 4fef 000c lea %sp@(12),%sp 4cc6a: 4aae fffc tstl %fp@(-4) 4cc6e: 662a bnes 4cc9a case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 4cc70: 42a7 clrl %sp@- 4cc72: 2040 moveal %d0,%a0 4cc74: 2f02 movel %d2,%sp@- 4cc76: 4868 0014 pea %a0@(20) 4cc7a: 4eb9 0004 d0a4 jsr 4d0a4 <_CORE_barrier_Release> 4cc80: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4cc82: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cc88: 242e fff4 movel %fp@(-12),%d2 switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4cc8c: 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(); 4cc90: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cc92: 246e fff8 moveal %fp@(-8),%a2 4cc96: 4e5e unlk %fp 4cc98: 4e75 rts 4cc9a: 242e fff4 movel %fp@(-12),%d2 if ( !released ) return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cc9e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cca0: 246e fff8 moveal %fp@(-8),%a2 4cca4: 4e5e unlk %fp 4cca6: 4e75 rts 4cca8: 242e fff4 movel %fp@(-12),%d2 ) { Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4ccac: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ccae: 246e fff8 moveal %fp@(-8),%a2 4ccb2: 4e5e unlk %fp 4ccb4: 4e75 rts ... 0004ccb8 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4ccb8: 4e56 fffc linkw %fp,#-4 4ccbc: 2f02 movel %d2,%sp@- 4ccbe: 486e fffc pea %fp@(-4) 4ccc2: 242e 0008 movel %fp@(8),%d2 4ccc6: 2f02 movel %d2,%sp@- 4ccc8: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4ccce: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4ccd4: 4fef 000c lea %sp@(12),%sp 4ccd8: 4aae fffc tstl %fp@(-4) 4ccdc: 663a bnes 4cd18 case OBJECTS_LOCAL: _CORE_barrier_Wait( 4ccde: 42a7 clrl %sp@- 4cce0: 2f2e 000c movel %fp@(12),%sp@- 4cce4: 2040 moveal %d0,%a0 4cce6: 4878 0001 pea 1 4ccea: 2f02 movel %d2,%sp@- 4ccec: 4868 0014 pea %a0@(20) 4ccf0: 4eb9 0004 d0e0 jsr 4d0e0 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 4ccf6: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 4ccfc: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 4cd02: 2f28 0034 movel %a0@(52),%sp@- 4cd06: 4eb9 0004 d7bc jsr 4d7bc <_Barrier_Translate_core_barrier_return_code> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd0c: 242e fff8 movel %fp@(-8),%d2 true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 4cd10: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd14: 4e5e unlk %fp 4cd16: 4e75 rts 4cd18: 242e fff8 movel %fp@(-8),%d2 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cd1c: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd1e: 4e5e unlk %fp 4cd20: 4e75 rts ... 00047614 : uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 47614: 7218 moveq #24,%d1 47616: 4e56 0000 linkw %fp,#0 4761a: 202e 000c movel %fp@(12),%d0 4761e: 2f02 movel %d2,%sp@- 47620: 242e 0008 movel %fp@(8),%d2 47624: e3aa lsll %d1,%d2 47626: 123c 001b moveb #27,%d1 4762a: e3a8 lsll %d1,%d0 4762c: 222e 0010 movel %fp@(16),%d1 47630: 8082 orl %d2,%d0 47632: 4841 swap %d1 47634: 4241 clrw %d1 return _Objects_Build_id( api, class, node, index ); } 47636: 241f movel %sp@+,%d2 uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 47638: 80ae 0014 orl %fp@(20),%d0 return _Objects_Build_id( api, class, node, index ); } 4763c: 4e5e unlk %fp 4763e: 8081 orl %d1,%d0 47640: 4e75 rts ... 000455fc : #include #include #include rtems_interval rtems_clock_get_ticks_since_boot(void) { 455fc: 4e56 0000 linkw %fp,#0 return _Watchdog_Ticks_since_boot; 45600: 2039 0005 da94 movel 5da94 <_Watchdog_Ticks_since_boot>,%d0 } 45606: 4e5e unlk %fp 45608: 4e75 rts ... 000690fc : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 690fc: 4e56 0000 linkw %fp,#0 69100: 202e 0008 movel %fp@(8),%d0 if ( !uptime ) 69104: 6710 beqs 69116 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 69106: 2f00 movel %d0,%sp@- 69108: 4eb9 0006 a1a0 jsr 6a1a0 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 6910e: 588f addql #4,%sp ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 69110: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 69112: 4e5e unlk %fp 69114: 4e75 rts */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 69116: 103c 0009 moveb #9,%d0 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 6911a: 4e5e unlk %fp 6911c: 4e75 rts ... 0004560c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 4560c: 4e56 0000 linkw %fp,#0 45610: 202e 0008 movel %fp@(8),%d0 if ( !routine ) 45614: 670c beqs 45622 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 45616: 23c0 0005 dada movel %d0,5dada <_Watchdog_Nanoseconds_since_tick_handler> 4561c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4561e: 4e5e unlk %fp 45620: 4e75 rts */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 45622: 103c 0009 moveb #9,%d0 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 45626: 4e5e unlk %fp 45628: 4e75 rts ... 0004af74 : * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 4af74: 4e56 0000 linkw %fp,#0 4af78: 202e 0008 movel %fp@(8),%d0 return (_Debug_Level & level) ? true : false; } 4af7c: 4e5e unlk %fp * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 4af7e: c0b9 0005 da12 andl 5da12 <_Debug_Level>,%d0 4af84: 56c0 sne %d0 return (_Debug_Level & level) ? true : false; } 4af86: 4480 negl %d0 4af88: 4e75 rts ... 0004566c : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4566c: 4e56 0000 linkw %fp,#0 45670: 202e 0008 movel %fp@(8),%d0 45674: 206e 0014 moveal %fp@(20),%a0 RTEMS_API_Control *api; if ( !event_out ) 45678: 4a88 tstl %a0 4567a: 674c beqs 456c8 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 4567c: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 45682: 2269 0108 moveal %a1@(264),%a1 if ( _Event_sets_Is_empty( event_in ) ) { 45686: 4a80 tstl %d0 45688: 6606 bnes 45690 *event_out = api->pending_events; 4568a: 2091 movel %a1@,%a0@ _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 4568c: 4e5e unlk %fp 4568e: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45690: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 45696: 5281 addql #1,%d1 45698: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> *event_out = api->pending_events; return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 4569e: 2f08 movel %a0,%sp@- 456a0: 2f2e 0010 movel %fp@(16),%sp@- 456a4: 2f2e 000c movel %fp@(12),%sp@- 456a8: 2f00 movel %d0,%sp@- 456aa: 4eb9 0004 56d0 jsr 456d0 <_Event_Seize> _Thread_Enable_dispatch(); 456b0: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 456b6: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 456bc: 4fef 0010 lea %sp@(16),%sp } 456c0: 4e5e unlk %fp } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); 456c2: 2028 0034 movel %a0@(52),%d0 } 456c6: 4e75 rts rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out ) 456c8: 7009 moveq #9,%d0 _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 456ca: 4e5e unlk %fp 456cc: 4e75 rts ... 00045814 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 45814: 4e56 fffc linkw %fp,#-4 45818: 2f02 movel %d2,%sp@- register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 4581a: 486e fffc pea %fp@(-4) 4581e: 2f2e 0008 movel %fp@(8),%sp@- 45822: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 45828: 508f addql #8,%sp 4582a: 4aae fffc tstl %fp@(-4) 4582e: 6634 bnes 45864 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 45830: 2240 moveal %d0,%a1 rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 45832: 223c 0000 0700 movel #1792,%d1 45838: 2069 0108 moveal %a1@(264),%a0 4583c: 40c2 movew %sr,%d2 4583e: 8282 orl %d2,%d1 45840: 46c1 movew %d1,%sr *the_event_set |= the_new_events; 45842: 222e 000c movel %fp@(12),%d1 45846: 8390 orl %d1,%a0@ _ISR_Enable( level ); 45848: 46c2 movew %d2,%sr _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 4584a: 2f00 movel %d0,%sp@- 4584c: 4eb9 0004 5870 jsr 45870 <_Event_Surrender> _Thread_Enable_dispatch(); 45852: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45858: 242e fff8 movel %fp@(-8),%d2 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4585c: 588f addql #4,%sp case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); _Thread_Enable_dispatch(); 4585e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45860: 4e5e unlk %fp 45862: 4e75 rts 45864: 242e fff8 movel %fp@(-8),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 45868: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4586a: 4e5e unlk %fp 4586c: 4e75 rts ... 0004b838 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 4b838: 4e56 fffc linkw %fp,#-4 4b83c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 4b83e: 486e fffc pea %fp@(-4) 4b842: 2f2e 0008 movel %fp@(8),%sp@- 4b846: 4879 0006 b602 pea 6b602 <_Extension_Information> 4b84c: 4eb9 0004 c990 jsr 4c990 <_Objects_Get> Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4b852: 4fef 000c lea %sp@(12),%sp 4b856: 2440 moveal %d0,%a2 4b858: 4aae fffc tstl %fp@(-4) 4b85c: 663a bnes 4b898 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 4b85e: 486a 0010 pea %a2@(16) 4b862: 4eb9 0004 e254 jsr 4e254 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 4b868: 2f0a movel %a2,%sp@- 4b86a: 4879 0006 b602 pea 6b602 <_Extension_Information> 4b870: 4eb9 0004 c584 jsr 4c584 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 4b876: 2f0a movel %a2,%sp@- 4b878: 4879 0006 b602 pea 6b602 <_Extension_Information> 4b87e: 4eb9 0004 c82c jsr 4c82c <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 4b884: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b88a: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4b88e: 4fef 0014 lea %sp@(20),%sp switch ( location ) { case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 4b892: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b894: 4e5e unlk %fp 4b896: 4e75 rts 4b898: 246e fff8 moveal %fp@(-8),%a2 { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4b89c: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b89e: 4e5e unlk %fp 4b8a0: 4e75 rts ... 00048328 : #endif #include const char *rtems_get_version_string(void) { 48328: 4e56 0000 linkw %fp,#0 return _RTEMS_version; } 4832c: 203c 0005 f08a movel #389258,%d0 48332: 4e5e unlk %fp 48334: 4e75 rts ... 00045a48 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 45a48: 4e56 0000 linkw %fp,#0 45a4c: 222e 0008 movel %fp@(8),%d1 45a50: 202e 000c movel %fp@(12),%d0 45a54: 206e 0010 moveal %fp@(16),%a0 if ( !_ISR_Is_vector_number_valid( vector ) ) 45a58: 0c80 0000 00ff cmpil #255,%d0 45a5e: 621e bhis 45a7e return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 45a60: 4a81 tstl %d1 45a62: 6720 beqs 45a84 return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 45a64: 4a88 tstl %a0 45a66: 671c beqs 45a84 return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 45a68: 2f08 movel %a0,%sp@- 45a6a: 2f01 movel %d1,%sp@- 45a6c: 2f00 movel %d0,%sp@- 45a6e: 4eb9 0004 923e jsr 4923e <_CPU_ISR_install_vector> vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 45a74: 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( 45a78: 4280 clrl %d0 vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; } 45a7a: 4e5e unlk %fp 45a7c: 4e75 rts rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { if ( !_ISR_Is_vector_number_valid( vector ) ) 45a7e: 700a moveq #10,%d0 _ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; } 45a80: 4e5e unlk %fp 45a82: 4e75 rts return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 45a84: 7009 moveq #9,%d0 } 45a86: 4e5e unlk %fp 45a88: 4e75 rts ... 000463f0 : rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); } 463f0: 7007 moveq #7,%d0 uint32_t rtems_interrupt_mask = RTEMS_INTERRUPT_MASK; rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { 463f2: 4e56 0000 linkw %fp,#0 return RTEMS_INTERRUPT_LEVEL(level); } 463f6: c0ae 0008 andl %fp@(8),%d0 463fa: 4e5e unlk %fp 463fc: 4e75 rts ... 000482cc : 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 ) { 482cc: 4e56 fff4 linkw %fp,#-12 482d0: 226e 000c moveal %fp@(12),%a1 482d4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482d8: 242e 0008 movel %fp@(8),%d2 482dc: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 482e0: 2039 0006 3ca2 movel 63ca2 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 482e6: 2239 0006 3af6 movel 63af6 <_ISR_Nest_level>,%d1 482ec: 6600 009c bnew 4838a return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 482f0: 4a8a tstl %a2 482f2: 6700 00ea beqw 483de return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 482f6: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 482f8: 4a89 tstl %a1 482fa: 6700 00e2 beqw 483de static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 482fe: 4a91 tstl %a1@ 48300: 6700 00d4 beqw 483d6 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48304: b480 cmpl %d0,%d2 48306: 6476 bccs 4837e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48308: 2039 0006 3a5c movel 63a5c <_Thread_Dispatch_disable_level>,%d0 4830e: 5280 addql #1,%d0 48310: 23c0 0006 3a5c movel %d0,63a5c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 48316: 4a82 tstl %d2 48318: 667c bnes 48396 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 4831a: 2039 0006 3ca2 movel 63ca2 <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48320: 6700 00fc beqw 4841e 48324: 2239 0006 3ca6 movel 63ca6 <_IO_Driver_address_table>,%d1 4832a: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4832c: 4a90 tstl %a0@ 4832e: 6700 008e beqw 483be 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 ) { 48332: 5282 addql #1,%d2 48334: 41e8 0018 lea %a0@(24),%a0 48338: b480 cmpl %d0,%d2 4833a: 65f0 bcss 4832c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4833c: 2482 movel %d2,%a2@ if ( m != n ) 4833e: b480 cmpl %d0,%d2 48340: 6700 00de beqw 48420 48344: 2602 movel %d2,%d3 48346: 2002 movel %d2,%d0 48348: 2041 moveal %d1,%a0 4834a: e78b lsll #3,%d3 4834c: eb88 lsll #5,%d0 4834e: 9083 subl %d3,%d0 48350: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48352: 20d9 movel %a1@+,%a0@+ 48354: 20d9 movel %a1@+,%a0@+ 48356: 20d9 movel %a1@+,%a0@+ 48358: 20d9 movel %a1@+,%a0@+ 4835a: 20d9 movel %a1@+,%a0@+ 4835c: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 4835e: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48364: 2d42 0008 movel %d2,%fp@(8) } 48368: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4836e: 42ae 0010 clrl %fp@(16) 48372: 42ae 000c clrl %fp@(12) } 48376: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48378: 4ef9 0005 0860 jmp 50860 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4837e: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48380: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48386: 4e5e unlk %fp 48388: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 4838a: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4838c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48392: 4e5e unlk %fp 48394: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 48396: 2202 movel %d2,%d1 48398: 2002 movel %d2,%d0 4839a: e789 lsll #3,%d1 4839c: eb88 lsll #5,%d0 4839e: 2079 0006 3ca6 moveal 63ca6 <_IO_Driver_address_table>,%a0 483a4: 9081 subl %d1,%d0 483a6: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483a8: 4a90 tstl %a0@ 483aa: 673e beqs 483ea major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 483ac: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 483b2: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ba: 4e5e unlk %fp 483bc: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483be: 4aa8 0004 tstl %a0@(4) 483c2: 6700 ff78 beqw 4833c 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 ) { 483c6: 5282 addql #1,%d2 483c8: 41e8 0018 lea %a0@(24),%a0 483cc: b480 cmpl %d0,%d2 483ce: 6500 ff5c bcsw 4832c 483d2: 6000 ff68 braw 4833c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483d6: 4aa9 0004 tstl %a1@(4) 483da: 6600 ff28 bnew 48304 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483de: 7009 moveq #9,%d0 } 483e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483e6: 4e5e unlk %fp 483e8: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483ea: 4aa8 0004 tstl %a0@(4) 483ee: 66bc bnes 483ac } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 483f0: 20d9 movel %a1@+,%a0@+ 483f2: 20d9 movel %a1@+,%a0@+ 483f4: 20d9 movel %a1@+,%a0@+ 483f6: 20d9 movel %a1@+,%a0@+ 483f8: 20d9 movel %a1@+,%a0@+ 483fa: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 483fc: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 483fe: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48404: 2d42 0008 movel %d2,%fp@(8) } 48408: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4840e: 42ae 0010 clrl %fp@(16) 48412: 42ae 000c clrl %fp@(12) } 48416: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48418: 4ef9 0005 0860 jmp 50860 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4841e: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 48420: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 48426: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48428: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4842e: 4e5e unlk %fp 48430: 4e75 rts ... 00048434 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 48434: 4e56 0000 linkw %fp,#0 48438: 202e 0008 movel %fp@(8),%d0 if ( rtems_interrupt_is_in_progress() ) 4843c: 2239 0006 3af6 movel 63af6 <_ISR_Nest_level>,%d1 48442: 6644 bnes 48488 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 48444: b0b9 0006 3ca2 cmpl 63ca2 <_IO_Number_of_drivers>,%d0 4844a: 6506 bcss 48452 4844c: 700d moveq #13,%d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 4844e: 4e5e unlk %fp 48450: 4e75 rts 48452: 2239 0006 3a5c movel 63a5c <_Thread_Dispatch_disable_level>,%d1 48458: 5281 addql #1,%d1 4845a: 23c1 0006 3a5c movel %d1,63a5c <_Thread_Dispatch_disable_level> if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 48460: 2200 movel %d0,%d1 48462: e788 lsll #3,%d0 48464: eb89 lsll #5,%d1 48466: 2079 0006 3ca6 moveal 63ca6 <_IO_Driver_address_table>,%a0 4846c: 9280 subl %d0,%d1 4846e: d1c1 addal %d1,%a0 48470: 4298 clrl %a0@+ 48472: 4298 clrl %a0@+ 48474: 4298 clrl %a0@+ 48476: 4298 clrl %a0@+ 48478: 4298 clrl %a0@+ 4847a: 4290 clrl %a0@ &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 4847c: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 48482: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 48484: 4e5e unlk %fp 48486: 4e75 rts rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 48488: 7012 moveq #18,%d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 4848a: 4e5e unlk %fp 4848c: 4e75 rts ... 00048aa8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 48aa8: 4e56 fff0 linkw %fp,#-16 48aac: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48ab0: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 48ab4: 4a8b tstl %a3 48ab6: 6744 beqs 48afc 48ab8: 49f9 0006 7f00 lea 67f00 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 48abe: 2054 moveal %a4@,%a0 48ac0: 4a88 tstl %a0 48ac2: 672e beqs 48af2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 48ac4: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 48ac8: 4a8a tstl %a2 48aca: 6726 beqs 48af2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48acc: 4a6a 000e tstw %a2@(14) 48ad0: 6720 beqs 48af2 48ad2: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 48ad4: 206a 0018 moveal %a2@(24),%a0 48ad8: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48adc: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 48ade: 4a80 tstl %d0 48ae0: 6706 beqs 48ae8 continue; (*routine)(the_thread); 48ae2: 2f00 movel %d0,%sp@- 48ae4: 4e93 jsr %a3@ 48ae6: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48ae8: 4280 clrl %d0 48aea: 302a 000e movew %a2@(14),%d0 48aee: b480 cmpl %d0,%d2 48af0: 63e2 blss 48ad4 48af2: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 48af4: b9fc 0006 7f10 cmpal #425744,%a4 48afa: 66c2 bnes 48abe (*routine)(the_thread); } } } 48afc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48b02: 4e5e unlk %fp 48b04: 4e75 rts ... 00056484 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 56484: 4e56 fff0 linkw %fp,#-16 56488: 48d7 001c moveml %d2-%d4,%sp@ 5648c: 282e 0008 movel %fp@(8),%d4 56490: 242e 000c movel %fp@(12),%d2 56494: 262e 0014 movel %fp@(20),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 56498: 4a82 tstl %d2 5649a: 6762 beqs 564fe return RTEMS_INVALID_ADDRESS; if ( !count ) 5649c: 4a83 tstl %d3 5649e: 675e beqs 564fe RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 564a0: 486e fffc pea %fp@(-4) 564a4: 2f04 movel %d4,%sp@- 564a6: 4879 0007 d22a pea 7d22a <_Message_queue_Information> 564ac: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 564b2: 4fef 000c lea %sp@(12),%sp 564b6: 4aae fffc tstl %fp@(-4) 564ba: 6636 bnes 564f2 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 564bc: 2f03 movel %d3,%sp@- 564be: 2040 moveal %d0,%a0 564c0: 42a7 clrl %sp@- 564c2: 2f04 movel %d4,%sp@- 564c4: 2f2e 0010 movel %fp@(16),%sp@- 564c8: 2f02 movel %d2,%sp@- 564ca: 4868 0014 pea %a0@(20) 564ce: 4eb9 0005 9f30 jsr 59f30 <_CORE_message_queue_Broadcast> 564d4: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 564d6: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 564dc: 2f02 movel %d2,%sp@- 564de: 4eb9 0005 6888 jsr 56888 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 564e4: 4fef 001c lea %sp@(28),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 564e8: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 564ee: 4e5e unlk %fp 564f0: 4e75 rts if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 564f2: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 564f4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 564fa: 4e5e unlk %fp 564fc: 4e75 rts #endif count ); _Thread_Enable_dispatch(); return 564fe: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56500: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 56506: 4e5e unlk %fp 56508: 4e75 rts ... 000566e0 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 566e0: 4e56 fffc linkw %fp,#-4 566e4: 2f0a movel %a2,%sp@- 566e6: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 566ea: 4a8a tstl %a2 566ec: 673e beqs 5672c 566ee: 486e fffc pea %fp@(-4) 566f2: 2f2e 0008 movel %fp@(8),%sp@- 566f6: 4879 0007 d22a pea 7d22a <_Message_queue_Information> 566fc: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 56702: 4fef 000c lea %sp@(12),%sp 56706: 4aae fffc tstl %fp@(-4) 5670a: 6616 bnes 56722 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 5670c: 2040 moveal %d0,%a0 5670e: 24a8 005c movel %a0@(92),%a2@ _Thread_Enable_dispatch(); 56712: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56718: 246e fff8 moveal %fp@(-8),%a2 the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; _Thread_Enable_dispatch(); 5671c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5671e: 4e5e unlk %fp 56720: 4e75 rts 56722: 246e fff8 moveal %fp@(-8),%a2 if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 56726: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56728: 4e5e unlk %fp 5672a: 4e75 rts 5672c: 246e fff8 moveal %fp@(-8),%a2 ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 56730: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56732: 4e5e unlk %fp 56734: 4e75 rts ... 0004eb5c : rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { 4eb5c: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( 4eb60: 2f2e 0010 movel %fp@(16),%sp@- 4eb64: 2f2e 000c movel %fp@(12),%sp@- 4eb68: 2f2e 0008 movel %fp@(8),%sp@- 4eb6c: 4879 0006 81ce pea 681ce <_Message_queue_Information> 4eb72: 4eb9 0005 0f44 jsr 50f44 <_Objects_Name_to_id_u32> 4eb78: 41f9 0006 5888 lea 65888 <_Status_Object_name_errors_to_status>,%a0 node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4eb7e: 4e5e unlk %fp 4eb80: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4eb84: 4e75 rts ... 0004eb88 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 4eb88: 4e56 fff0 linkw %fp,#-16 4eb8c: 48d7 001c moveml %d2-%d4,%sp@ 4eb90: 242e 000c movel %fp@(12),%d2 4eb94: 262e 0010 movel %fp@(16),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 4eb98: 4a82 tstl %d2 4eb9a: 6776 beqs 4ec12 return RTEMS_INVALID_ADDRESS; if ( !size ) 4eb9c: 4a83 tstl %d3 4eb9e: 6772 beqs 4ec12 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4eba0: 486e fffc pea %fp@(-4) 4eba4: 2f2e 0008 movel %fp@(8),%sp@- 4eba8: 4879 0006 81ce pea 681ce <_Message_queue_Information> 4ebae: 4eb9 0005 0dbc jsr 50dbc <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4ebb4: 4fef 000c lea %sp@(12),%sp 4ebb8: 4aae fffc tstl %fp@(-4) 4ebbc: 6648 bnes 4ec06 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 4ebbe: 2f2e 0018 movel %fp@(24),%sp@- 4ebc2: 7201 moveq #1,%d1 4ebc4: 7801 moveq #1,%d4 4ebc6: 2040 moveal %d0,%a0 4ebc8: c2ae 0014 andl %fp@(20),%d1 4ebcc: b384 eorl %d1,%d4 4ebce: 2f04 movel %d4,%sp@- 4ebd0: 2f03 movel %d3,%sp@- 4ebd2: 2f02 movel %d2,%sp@- 4ebd4: 2f28 0008 movel %a0@(8),%sp@- 4ebd8: 4868 0014 pea %a0@(20) 4ebdc: 4eb9 0004 feb4 jsr 4feb4 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 4ebe2: 4eb9 0005 1728 jsr 51728 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 4ebe8: 2079 0006 80b2 moveal 680b2 <_Thread_Executing>,%a0 4ebee: 2f28 0034 movel %a0@(52),%sp@- 4ebf2: 4eb9 0004 ecac jsr 4ecac <_Message_queue_Translate_core_message_queue_return_code> 4ebf8: 4fef 001c lea %sp@(28),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ebfc: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec02: 4e5e unlk %fp 4ec04: 4e75 rts if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4ec06: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ec08: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec0e: 4e5e unlk %fp 4ec10: 4e75 rts size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 4ec12: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ec14: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec1a: 4e5e unlk %fp 4ec1c: 4e75 rts ... 000476a4 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 476a4: 4e56 0000 linkw %fp,#0 const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 476a8: 203c 0005 f1e8 movel #389608,%d0 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 476ae: 2f02 movel %d2,%sp@- 476b0: 222e 0008 movel %fp@(8),%d1 const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 476b4: 7401 moveq #1,%d2 476b6: b481 cmpl %d1,%d2 476b8: 671c beqs 476d6 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 476ba: 143c 0002 moveb #2,%d2 476be: 203c 0005 e158 movel #385368,%d0 476c4: b481 cmpl %d1,%d2 476c6: 6708 beqs 476d0 return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 476c8: 242e fffc movel %fp@(-4),%d2 476cc: 4e5e unlk %fp 476ce: 4e75 rts const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 476d0: 203c 0005 f200 movel #389632,%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 ); 476d6: 2f2e 000c movel %fp@(12),%sp@- 476da: 2f00 movel %d0,%sp@- 476dc: 4eb9 0004 c460 jsr 4c460 if ( class_assoc ) 476e2: 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 ); 476e4: 2040 moveal %d0,%a0 if ( class_assoc ) 476e6: 203c 0005 e160 movel #385376,%d0 476ec: 4a88 tstl %a0 476ee: 67d8 beqs 476c8 return class_assoc->name; return "BAD CLASS"; } 476f0: 242e fffc movel %fp@(-4),%d2 476f4: 4e5e unlk %fp #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; 476f6: 2010 movel %a0@,%d0 return "BAD CLASS"; } 476f8: 4e75 rts ... 00047764 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 47764: 4e56 0000 linkw %fp,#0 47768: 2f0a movel %a2,%sp@- 4776a: 246e 0010 moveal %fp@(16),%a2 4776e: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 47770: 4a8a tstl %a2 47772: 6766 beqs 477da return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47774: 2f2e 000c movel %fp@(12),%sp@- 47778: 2f2e 0008 movel %fp@(8),%sp@- 4777c: 4eb9 0004 9314 jsr 49314 <_Objects_Get_information> if ( !obj_info ) 47782: 508f addql #8,%sp * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47784: 2040 moveal %d0,%a0 if ( !obj_info ) 47786: 4a80 tstl %d0 47788: 675e beqs 477e8 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 4778a: 24a8 0006 movel %a0@(6),%a2@ info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 4778e: 4282 clrl %d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 47790: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 47796: 3428 000e movew %a0@(14),%d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 4779a: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 477a0: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477a4: 6750 beqs 477f6 477a6: 2068 0018 moveal %a0@(24),%a0 477aa: 7201 moveq #1,%d1 477ac: 7001 moveq #1,%d0 477ae: 93c9 subal %a1,%a1 477b0: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 477b2: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 477b6: 6718 beqs 477d0 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477b8: 2200 movel %d0,%d1 477ba: b082 cmpl %d2,%d0 477bc: 63f2 blss 477b0 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477be: 2549 000e movel %a1,%a2@(14) 477c2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 477c4: 242e fff8 movel %fp@(-8),%d2 477c8: 246e fffc moveal %fp@(-4),%a2 477cc: 4e5e unlk %fp 477ce: 4e75 rts info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; 477d0: 5289 addql #1,%a1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477d2: 2200 movel %d0,%d1 477d4: b082 cmpl %d2,%d0 477d6: 63d8 blss 477b0 477d8: 60e4 bras 477be unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477da: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 477de: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477e0: 246e fffc moveal %fp@(-4),%a2 477e4: 4e5e unlk %fp 477e6: 4e75 rts 477e8: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 477ec: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477ee: 246e fffc moveal %fp@(-4),%a2 477f2: 4e5e unlk %fp 477f4: 4e75 rts info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477f6: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477f8: 4280 clrl %d0 <== NOT EXECUTED 477fa: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 477fe: 60c4 bras 477c4 <== NOT EXECUTED 0004ab8c : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 4ab8c: 4e56 fffc linkw %fp,#-4 4ab90: 2f0a movel %a2,%sp@- 4ab92: 246e 000c moveal %fp@(12),%a2 Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 4ab96: 4a8a tstl %a2 4ab98: 6726 beqs 4abc0 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 4ab9a: 486e fffc pea %fp@(-4) 4ab9e: 2f2e 0008 movel %fp@(8),%sp@- 4aba2: 4eb9 0004 c9fc jsr 4c9fc <_Objects_Id_to_name> *name = name_u.name_u32; 4aba8: 24ae fffc movel %fp@(-4),%a2@ return _Status_Object_name_errors_to_status[ status ]; 4abac: 41f9 0006 6f80 lea 66f80 <_Status_Object_name_errors_to_status>,%a0 4abb2: 508f addql #8,%sp } 4abb4: 246e fff8 moveal %fp@(-8),%a2 4abb8: 4e5e unlk %fp return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; 4abba: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 4abbe: 4e75 rts 4abc0: 246e fff8 moveal %fp@(-8),%a2 ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 4abc4: 7009 moveq #9,%d0 status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 4abc6: 4e5e unlk %fp 4abc8: 4e75 rts ... 0004780c : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; } 4780c: 7004 moveq #4,%d0 #include #include #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { 4780e: 4e56 0000 linkw %fp,#0 return OBJECTS_ITRON_API; } 47812: 4e5e unlk %fp 47814: 4e75 rts ... 00047818 : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } 47818: 7001 moveq #1,%d0 #include #include #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { 4781a: 4e56 0000 linkw %fp,#0 return OBJECTS_INTERNAL_API; } 4781e: 4e5e unlk %fp 47820: 4e75 rts ... 00047824 : #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 47824: 4280 clrl %d0 return _Objects_Get_API( id ); } 47826: 7207 moveq #7,%d1 #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 47828: 4e56 0000 linkw %fp,#0 4782c: 102e 0008 moveb %fp@(8),%d0 return _Objects_Get_API( id ); } 47830: 4e5e unlk %fp 47832: c081 andl %d1,%d0 47834: 4e75 rts ... 00047848 : int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); } 47848: 4280 clrl %d0 #undef rtems_object_id_get_index int rtems_object_id_get_index( rtems_id id ) { 4784a: 4e56 0000 linkw %fp,#0 return _Objects_Get_index( id ); } 4784e: 302e 000a movew %fp@(10),%d0 47852: 4e5e unlk %fp 47854: 4e75 rts ... 00047858 : int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } 47858: 4280 clrl %d0 #undef rtems_object_id_get_node int rtems_object_id_get_node( rtems_id id ) { 4785a: 4e56 0000 linkw %fp,#0 return _Objects_Get_node( id ); } 4785e: 102e 0009 moveb %fp@(9),%d0 47862: 4e5e unlk %fp 47864: 4e75 rts ... 00047868 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 47868: 4e56 fff0 linkw %fp,#-16 4786c: 48d7 001c moveml %d2-%d4,%sp@ 47870: 262e 0008 movel %fp@(8),%d3 47874: 282e 000c movel %fp@(12),%d4 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 47878: 6764 beqs 478de return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4787a: 4a83 tstl %d3 4787c: 6754 beqs 478d2 information = _Objects_Get_information_id( tmpId ); 4787e: 2f03 movel %d3,%sp@- 47880: 4eb9 0004 92e8 jsr 492e8 <_Objects_Get_information_id> if ( !information ) 47886: 588f addql #4,%sp if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 47888: 2400 movel %d0,%d2 if ( !information ) 4788a: 673a beqs 478c6 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 4788c: 486e fffc pea %fp@(-4) 47890: 2f03 movel %d3,%sp@- 47892: 2f00 movel %d0,%sp@- 47894: 4eb9 0004 94b8 jsr 494b8 <_Objects_Get> switch ( location ) { 4789a: 4fef 000c lea %sp@(12),%sp 4789e: 4aae fffc tstl %fp@(-4) 478a2: 6622 bnes 478c6 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 478a4: 2f04 movel %d4,%sp@- 478a6: 2f00 movel %d0,%sp@- 478a8: 2f02 movel %d2,%sp@- 478aa: 4eb9 0004 96c4 jsr 496c4 <_Objects_Set_name> _Thread_Enable_dispatch(); 478b0: 4eb9 0004 9dd8 jsr 49dd8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 478b6: 4fef 000c lea %sp@(12),%sp the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); 478ba: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478bc: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 478c2: 4e5e unlk %fp 478c4: 4e75 rts switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 478c6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478c8: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 478ce: 4e5e unlk %fp 478d0: 4e75 rts Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 478d2: 2079 0006 0a46 moveal 60a46 <_Thread_Executing>,%a0 478d8: 2628 0008 movel %a0@(8),%d3 478dc: 60a0 bras 4787e Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 478de: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478e0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 478e6: 4e5e unlk %fp 478e8: 4e75 rts ... 00056a90 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 56a90: 4e56 fff0 linkw %fp,#-16 56a94: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 56a98: 246e 000c moveal %fp@(12),%a2 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 56a9c: 4a8a tstl %a2 56a9e: 6754 beqs 56af4 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 56aa0: 486e fffc pea %fp@(-4) 56aa4: 2f2e 0008 movel %fp@(8),%sp@- 56aa8: 4879 0007 ced4 pea 7ced4 <_Partition_Information> 56aae: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56ab4: 4fef 000c lea %sp@(12),%sp 56ab8: 2640 moveal %d0,%a3 56aba: 4aae fffc tstl %fp@(-4) 56abe: 6628 bnes 56ae8 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 56ac0: 486b 0024 pea %a3@(36) 56ac4: 4eb9 0005 9eac jsr 59eac <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 56aca: 588f addql #4,%sp 56acc: 2400 movel %d0,%d2 56ace: 6730 beqs 56b00 the_partition->number_of_used_blocks += 1; 56ad0: 52ab 0020 addql #1,%a3@(32) _Thread_Enable_dispatch(); 56ad4: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> *buffer = the_buffer; 56ada: 4280 clrl %d0 56adc: 2482 movel %d2,%a2@ case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56ade: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56ae4: 4e5e unlk %fp 56ae6: 4e75 rts if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56ae8: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56aea: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56af0: 4e5e unlk %fp 56af2: 4e75 rts { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 56af4: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56af6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56afc: 4e5e unlk %fp 56afe: 4e75 rts the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56b00: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 56b06: 700d moveq #13,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b08: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56b0e: 4e5e unlk %fp 56b10: 4e75 rts ... 00056b14 : rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { 56b14: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); 56b18: 2f2e 0010 movel %fp@(16),%sp@- 56b1c: 2f2e 000c movel %fp@(12),%sp@- 56b20: 2f2e 0008 movel %fp@(8),%sp@- 56b24: 4879 0007 ced4 pea 7ced4 <_Partition_Information> 56b2a: 4eb9 0005 ba7c jsr 5ba7c <_Objects_Name_to_id_u32> 56b30: 41f9 0007 65b0 lea 765b0 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 56b36: 4e5e unlk %fp 56b38: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 56b3c: 4e75 rts ... 00056b40 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 56b40: 4e56 fffc linkw %fp,#-4 56b44: 2f0a movel %a2,%sp@- 56b46: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 56b48: 486e fffc pea %fp@(-4) 56b4c: 2f2e 0008 movel %fp@(8),%sp@- 56b50: 4879 0007 ced4 pea 7ced4 <_Partition_Information> 56b56: 242e 000c movel %fp@(12),%d2 56b5a: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b60: 4fef 000c lea %sp@(12),%sp 56b64: 2440 moveal %d0,%a2 56b66: 4aae fffc tstl %fp@(-4) 56b6a: 670e beqs 56b7a case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b6c: 242e fff4 movel %fp@(-12),%d2 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b70: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b72: 246e fff8 moveal %fp@(-8),%a2 56b76: 4e5e unlk %fp 56b78: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56b7a: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 56b7e: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56b82: b082 cmpl %d2,%d0 56b84: 623c bhis 56bc2 56b86: d280 addl %d0,%d1 56b88: b282 cmpl %d2,%d1 56b8a: 6536 bcss 56bc2 return ( 56b8c: 2202 movel %d2,%d1 56b8e: 9280 subl %d0,%d1 56b90: 2001 movel %d1,%d0 56b92: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 56b98: 4a81 tstl %d1 56b9a: 6626 bnes 56bc2 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56b9c: 2f02 movel %d2,%sp@- 56b9e: 486a 0024 pea %a2@(36) 56ba2: 4eb9 0005 9e74 jsr 59e74 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 56ba8: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56bac: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bb2: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56bb6: 508f addql #8,%sp case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); 56bb8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bba: 246e fff8 moveal %fp@(-8),%a2 56bbe: 4e5e unlk %fp 56bc0: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56bc2: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bc8: 242e fff4 movel %fp@(-12),%d2 _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56bcc: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bce: 246e fff8 moveal %fp@(-8),%a2 56bd2: 4e5e unlk %fp 56bd4: 4e75 rts ... 00055e24 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 55e24: 4e56 fff0 linkw %fp,#-16 55e28: 48d7 041c moveml %d2-%d4/%a2,%sp@ 55e2c: 242e 0008 movel %fp@(8),%d2 55e30: 282e 000c movel %fp@(12),%d4 55e34: 262e 0010 movel %fp@(16),%d3 55e38: 246e 0018 moveal %fp@(24),%a2 register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 55e3c: 4a82 tstl %d2 55e3e: 671a beqs 55e5a return RTEMS_INVALID_NAME; if ( !id ) 55e40: 4a8a tstl %a2 55e42: 670a beqs 55e4e return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 55e44: 2003 movel %d3,%d0 55e46: 7203 moveq #3,%d1 55e48: 8084 orl %d4,%d0 55e4a: c081 andl %d1,%d0 55e4c: 6718 beqs 55e66 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 55e4e: 7009 moveq #9,%d0 } 55e50: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55e56: 4e5e unlk %fp 55e58: 4e75 rts rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 55e5a: 7003 moveq #3,%d0 ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 55e5c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55e62: 4e5e unlk %fp 55e64: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 55e66: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 55e6c: 5280 addql #1,%d0 55e6e: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 55e74: 4879 0007 ce9c pea 7ce9c <_Dual_ported_memory_Information> 55e7a: 4eb9 0005 b398 jsr 5b398 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 55e80: 588f addql #4,%sp 55e82: 2040 moveal %d0,%a0 55e84: 4a80 tstl %d0 55e86: 673c beqs 55ec4 return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 55e88: 222e 0014 movel %fp@(20),%d1 55e8c: 5381 subql #1,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 55e8e: 2028 0008 movel %a0@(8),%d0 55e92: 2141 0018 movel %d1,%a0@(24) 55e96: 4281 clrl %d1 55e98: 2279 0007 ceb4 moveal 7ceb4 <_Dual_ported_memory_Information+0x18>,%a1 55e9e: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 55ea0: 2142 000c movel %d2,%a0@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 55ea4: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 55ea8: 2480 movel %d0,%a2@ if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 55eaa: 2144 0010 movel %d4,%a0@(16) the_port->external_base = external_start; 55eae: 2143 0014 movel %d3,%a0@(20) &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 55eb2: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 55eb8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 55ebe: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 55ec0: 4e5e unlk %fp 55ec2: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 55ec4: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 55eca: 7005 moveq #5,%d0 ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 55ecc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55ed2: 4e5e unlk %fp 55ed4: 4e75 rts ... 00046a60 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 46a60: 4e56 fff4 linkw %fp,#-12 46a64: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46a68: 242e 0008 movel %fp@(8),%d2 46a6c: 246e 000c moveal %fp@(12),%a2 Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 46a70: 6700 00ae beqw 46b20 return RTEMS_INVALID_NAME; if ( !id ) 46a74: 4a8a tstl %a2 46a76: 6700 00c6 beqw 46b3e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46a7a: 2039 0005 fa9c movel 5fa9c <_Thread_Dispatch_disable_level>,%d0 46a80: 5280 addql #1,%d0 46a82: 23c0 0005 fa9c movel %d0,5fa9c <_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 *) 46a88: 4879 0005 f9a0 pea 5f9a0 <_Rate_monotonic_Information> 46a8e: 4eb9 0004 8a7c jsr 48a7c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 46a94: 588f addql #4,%sp 46a96: 2040 moveal %d0,%a0 46a98: 4a80 tstl %d0 46a9a: 6700 0090 beqw 46b2c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 46a9e: 47f9 0005 fb56 lea 5fb56 <_Thread_Executing>,%a3 the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 46aa4: 43e8 007c lea %a0@(124),%a1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46aa8: 4281 clrl %d1 if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 46aaa: 2153 0040 movel %a3@,%a0@(64) 46aae: 2028 0008 movel %a0@(8),%d0 the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 46ab2: 42a8 0054 clrl %a0@(84) 46ab6: 3200 movew %d0,%d1 46ab8: 42a8 0058 clrl %a0@(88) 46abc: 42a8 0064 clrl %a0@(100) 46ac0: 42a8 0068 clrl %a0@(104) 46ac4: 42a8 006c clrl %a0@(108) 46ac8: 42a8 0070 clrl %a0@(112) 46acc: 4299 clrl %a1@+ 46ace: 4299 clrl %a1@+ 46ad0: 4299 clrl %a1@+ 46ad2: 4291 clrl %a1@ 46ad4: 2279 0005 f9b8 moveal 5f9b8 <_Rate_monotonic_Information+0x18>,%a1 46ada: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) 46ade: 223c 7fff ffff movel #2147483647,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46ae4: 2142 000c movel %d2,%a0@(12) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 46ae8: 42a8 0030 clrl %a0@(48) 46aec: 2141 005c movel %d1,%a0@(92) 46af0: 2141 0060 movel %d1,%a0@(96) 46af4: 2141 0074 movel %d1,%a0@(116) 46af8: 2141 0078 movel %d1,%a0@(120) _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; the_period->state = RATE_MONOTONIC_INACTIVE; 46afc: 42a8 0038 clrl %a0@(56) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 46b00: 2480 movel %d0,%a2@ Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46b02: 42a8 0018 clrl %a0@(24) the_watchdog->routine = routine; 46b06: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 46b0a: 42a8 0034 clrl %a0@(52) _Thread_Enable_dispatch(); 46b0e: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 46b14: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; _Thread_Enable_dispatch(); 46b1a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 46b1c: 4e5e unlk %fp 46b1e: 4e75 rts rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 46b20: 7003 moveq #3,%d0 ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46b22: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b28: 4e5e unlk %fp 46b2a: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 46b2c: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46b32: 7005 moveq #5,%d0 ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46b34: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b3a: 4e5e unlk %fp 46b3c: 4e75 rts Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 46b3e: 7009 moveq #9,%d0 ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46b40: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b46: 4e5e unlk %fp 46b48: 4e75 rts ... 00056d30 : */ rtems_status_code rtems_rate_monotonic_delete( rtems_id id ) { 56d30: 4e56 fffc linkw %fp,#-4 56d34: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 56d36: 486e fffc pea %fp@(-4) 56d3a: 2f2e 0008 movel %fp@(8),%sp@- 56d3e: 4879 0007 cf0c pea 7cf0c <_Rate_monotonic_Information> 56d44: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 56d4a: 4fef 000c lea %sp@(12),%sp 56d4e: 2440 moveal %d0,%a2 56d50: 4aae fffc tstl %fp@(-4) 56d54: 663e bnes 56d94 case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); 56d56: 2f00 movel %d0,%sp@- 56d58: 4879 0007 cf0c pea 7cf0c <_Rate_monotonic_Information> 56d5e: 4eb9 0005 b428 jsr 5b428 <_Objects_Close> (void) _Watchdog_Remove( &the_period->Timer ); 56d64: 486a 0010 pea %a2@(16) 56d68: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 56d6e: 42aa 0038 clrl %a2@(56) */ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); 56d72: 2f0a movel %a2,%sp@- 56d74: 4879 0007 cf0c pea 7cf0c <_Rate_monotonic_Information> 56d7a: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 56d80: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56d86: 246e fff8 moveal %fp@(-8),%a2 _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56d8a: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 56d8e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56d90: 4e5e unlk %fp 56d92: 4e75 rts 56d94: 246e fff8 moveal %fp@(-8),%a2 { Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 56d98: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56d9a: 4e5e unlk %fp 56d9c: 4e75 rts ... 0007a110 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 7a110: 4e56 fffc linkw %fp,#-4 7a114: 2f0a movel %a2,%sp@- 7a116: 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 ) 7a11a: 4a8a tstl %a2 7a11c: 6700 00a6 beqw 7a1c4 7a120: 486e fffc pea %fp@(-4) 7a124: 2f2e 0008 movel %fp@(8),%sp@- 7a128: 4879 000a 5742 pea a5742 <_Rate_monotonic_Information> 7a12e: 4eb9 0004 c574 jsr 4c574 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a134: 4fef 000c lea %sp@(12),%sp 7a138: 2040 moveal %d0,%a0 7a13a: 4aae fffc tstl %fp@(-4) 7a13e: 667a bnes 7a1ba case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 7a140: 24a8 0054 movel %a0@(84),%a2@ dst->missed_count = src->missed_count; 7a144: 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 ); 7a14a: 2028 005c movel %a0@(92),%d0 7a14e: 2228 0060 movel %a0@(96),%d1 7a152: 2540 0008 movel %d0,%a2@(8) 7a156: 2541 000c movel %d1,%a2@(12) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 7a15a: 2028 0064 movel %a0@(100),%d0 7a15e: 2228 0068 movel %a0@(104),%d1 7a162: 2540 0010 movel %d0,%a2@(16) 7a166: 2541 0014 movel %d1,%a2@(20) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 7a16a: 2028 006c movel %a0@(108),%d0 7a16e: 2228 0070 movel %a0@(112),%d1 7a172: 2540 0018 movel %d0,%a2@(24) 7a176: 2541 001c movel %d1,%a2@(28) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 7a17a: 2028 0074 movel %a0@(116),%d0 7a17e: 2228 0078 movel %a0@(120),%d1 7a182: 2540 0020 movel %d0,%a2@(32) 7a186: 2541 0024 movel %d1,%a2@(36) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 7a18a: 2028 007c movel %a0@(124),%d0 7a18e: 2228 0080 movel %a0@(128),%d1 7a192: 2540 0028 movel %d0,%a2@(40) 7a196: 2541 002c movel %d1,%a2@(44) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 7a19a: 2028 0084 movel %a0@(132),%d0 7a19e: 2228 0088 movel %a0@(136),%d1 7a1a2: 2540 0030 movel %d0,%a2@(48) 7a1a6: 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(); 7a1aa: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1b0: 246e fff8 moveal %fp@(-8),%a2 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(); 7a1b4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1b6: 4e5e unlk %fp 7a1b8: 4e75 rts 7a1ba: 246e fff8 moveal %fp@(-8),%a2 if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a1be: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1c0: 4e5e unlk %fp 7a1c2: 4e75 rts 7a1c4: 246e fff8 moveal %fp@(-8),%a2 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 7a1c8: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1ca: 4e5e unlk %fp 7a1cc: 4e75 rts ... 0007a4e0 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7a4e0: 4e56 ffec linkw %fp,#-20 7a4e4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7a4e8: 486e fffc pea %fp@(-4) 7a4ec: 242e 0008 movel %fp@(8),%d2 7a4f0: 2f02 movel %d2,%sp@- 7a4f2: 4879 000a 5742 pea a5742 <_Rate_monotonic_Information> 7a4f8: 4eb9 0004 c574 jsr 4c574 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a4fe: 4fef 000c lea %sp@(12),%sp 7a502: 2440 moveal %d0,%a2 7a504: 4aae fffc tstl %fp@(-4) 7a508: 661e bnes 7a528 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7a50a: 2039 000a 53d2 movel a53d2 <_Thread_Executing>,%d0 7a510: b0aa 0040 cmpl %a2@(64),%d0 7a514: 671e beqs 7a534 _Thread_Enable_dispatch(); 7a516: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> 7a51c: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a51e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a524: 4e5e unlk %fp 7a526: 4e75 rts the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 7a528: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a52a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a530: 4e5e unlk %fp 7a532: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 7a534: 4aae 000c tstl %fp@(12) 7a538: 6700 00ce beqw 7a608 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 7a53c: 203c 0000 0700 movel #1792,%d0 7a542: 40c3 movew %sr,%d3 7a544: 8083 orl %d3,%d0 7a546: 46c0 movew %d0,%sr switch ( the_period->state ) { 7a548: 202a 0038 movel %a2@(56),%d0 7a54c: 7202 moveq #2,%d1 7a54e: b280 cmpl %d0,%d1 7a550: 6700 00dc beqw 7a62e 7a554: 123c 0004 moveb #4,%d1 7a558: b280 cmpl %d0,%d1 7a55a: 6762 beqs 7a5be 7a55c: 4a80 tstl %d0 7a55e: 66c8 bnes 7a528 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7a560: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7a562: 2f0a movel %a2,%sp@- 7a564: 2d40 fff8 movel %d0,%fp@(-8) 7a568: 4eb9 0007 a298 jsr 7a298 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a56e: 223c 0007 a6cc movel #501452,%d1 the_watchdog->id = id; 7a574: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a578: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a57c: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 7a580: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a582: 2542 001c movel %d2,%a2@(28) 7a586: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 7a58a: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 7a58e: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 7a592: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a596: 486a 0010 pea %a2@(16) 7a59a: 4879 000a 53f0 pea a53f0 <_Watchdog_Ticks_chain> 7a5a0: 4eb9 0004 df60 jsr 4df60 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a5a6: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 7a5ac: 202e fff8 movel %fp@(-8),%d0 7a5b0: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a5b4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a5ba: 4e5e unlk %fp 7a5bc: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7a5be: 2f0a movel %a2,%sp@- 7a5c0: 4eb9 0007 a3c6 jsr 7a3c6 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 7a5c6: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 7a5c8: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a5ca: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a5cc: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7a5d0: 2541 0038 movel %d1,%a2@(56) 7a5d4: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 7a5d8: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a5dc: 486a 0010 pea %a2@(16) 7a5e0: 4879 000a 53f0 pea a53f0 <_Watchdog_Ticks_chain> 7a5e6: 2d40 fff8 movel %d0,%fp@(-8) 7a5ea: 4eb9 0004 df60 jsr 4df60 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a5f0: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 7a5f6: 202e fff8 movel %fp@(-8),%d0 7a5fa: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a5fe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a604: 4e5e unlk %fp 7a606: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a608: 202a 0038 movel %a2@(56),%d0 7a60c: 7204 moveq #4,%d1 7a60e: b280 cmpl %d0,%d1 7a610: 6400 009c bccw 7a6ae 7a614: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7a616: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7a61a: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 7a620: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a624: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a62a: 4e5e unlk %fp 7a62c: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7a62e: 2f0a movel %a2,%sp@- 7a630: 4eb9 0007 a3c6 jsr 7a3c6 <_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; 7a636: 242e 000c movel %fp@(12),%d2 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7a63a: 7001 moveq #1,%d0 the_period->next_length = length; 7a63c: 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; 7a640: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7a644: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 7a646: 2079 000a 53d2 moveal a53d2 <_Thread_Executing>,%a0 7a64c: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7a652: 4878 4000 pea 4000 7a656: 2f08 movel %a0,%sp@- 7a658: 4eb9 0004 d75c jsr 4d75c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7a65e: 203c 0000 0700 movel #1792,%d0 7a664: 40c1 movew %sr,%d1 7a666: 8081 orl %d1,%d0 7a668: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 7a66a: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7a66c: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7a670: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 7a674: 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 ) 7a676: 7203 moveq #3,%d1 7a678: 4fef 000c lea %sp@(12),%sp 7a67c: b280 cmpl %d0,%d1 7a67e: 6712 beqs 7a692 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 7a680: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> 7a686: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a688: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a68e: 4e5e unlk %fp 7a690: 4e75 rts /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7a692: 4878 4000 pea 4000 7a696: 2f39 000a 53d2 movel a53d2 <_Thread_Executing>,%sp@- 7a69c: 4eb9 0004 cabc jsr 4cabc <_Thread_Clear_state> 7a6a2: 508f addql #8,%sp _Thread_Enable_dispatch(); 7a6a4: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> 7a6aa: 4280 clrl %d0 7a6ac: 60da bras 7a688 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a6ae: 41f9 0009 f3c8 lea 9f3c8 ,%a0 7a6b4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7a6b8: 2d40 fff8 movel %d0,%fp@(-8) 7a6bc: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> return( return_value ); 7a6c2: 202e fff8 movel %fp@(-8),%d0 7a6c6: 6000 ff5c braw 7a624 ... 000695c2 : } } } void rtems_rate_monotonic_report_statistics( void ) { 695c2: 4e56 0000 linkw %fp,#0 rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 695c6: 4879 0004 79f4 pea 479f4 695cc: 42a7 clrl %sp@- 695ce: 4eb9 0006 9420 jsr 69420 695d4: 508f addql #8,%sp } 695d6: 4e5e unlk %fp 695d8: 4e75 rts ... 00069420 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 69420: 4e56 ff78 linkw %fp,#-136 69424: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 69428: 262e 0008 movel %fp@(8),%d3 6942c: 246e 000c moveal %fp@(12),%a2 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 69430: 4a8a tstl %a2 69432: 6700 0082 beqw 694b6 return; (*print)( context, "Period information by period\n" ); 69436: 4879 0009 c02a pea 9c02a <_TOD_Days_per_month+0x68> 6943c: 2f03 movel %d3,%sp@- 6943e: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 69440: 4879 0009 c048 pea 9c048 <_TOD_Days_per_month+0x86> 69446: 2f03 movel %d3,%sp@- 69448: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 6944a: 4879 0009 c06a pea 9c06a <_TOD_Days_per_month+0xa8> 69450: 2f03 movel %d3,%sp@- 69452: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 69454: 4879 0009 c08d pea 9c08d <_TOD_Days_per_month+0xcb> 6945a: 2f03 movel %d3,%sp@- 6945c: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 6945e: 4fef 001c lea %sp@(28),%sp 69462: 2ebc 0009 c0d8 movel #639192,%sp@ 69468: 2f03 movel %d3,%sp@- 6946a: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6946c: 2439 000a 5748 movel a5748 <_Rate_monotonic_Information+0x6>,%d2 69472: 508f addql #8,%sp 69474: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 6947a: 623a bhis 694b6 6947c: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6947e: 2a0e movel %fp,%d5 69480: 0684 ffff ffa2 addil #-94,%d4 69486: 47f9 0007 a110 lea 7a110 ,%a3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 6948c: 4bf9 0007 a1d0 lea 7a1d0 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69492: 5b85 subql #5,%d5 69494: 49f9 0004 a924 lea 4a924 ,%a4 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6949a: 2e3c 0006 ac70 movel #437360,%d7 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 694a0: 2f04 movel %d4,%sp@- 694a2: 2f02 movel %d2,%sp@- 694a4: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 694a6: 508f addql #8,%sp 694a8: 4a80 tstl %d0 694aa: 6714 beqs 694c0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 694ac: 5282 addql #1,%d2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 694ae: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 694b4: 63ea blss 694a0 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 694b6: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 694bc: 4e5e unlk %fp 694be: 4e75 rts status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 694c0: 486e ffda pea %fp@(-38) 694c4: 2f02 movel %d2,%sp@- 694c6: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 694c8: 2f05 movel %d5,%sp@- 694ca: 4878 0005 pea 5 694ce: 2f2e ffda movel %fp@(-38),%sp@- 694d2: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 694d4: 2f2e ffa6 movel %fp@(-90),%sp@- 694d8: 2f2e ffa2 movel %fp@(-94),%sp@- 694dc: 2f05 movel %d5,%sp@- 694de: 2f02 movel %d2,%sp@- 694e0: 4879 0009 c124 pea 9c124 <_TOD_Days_per_month+0x162> 694e6: 2f03 movel %d3,%sp@- 694e8: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 694ea: 202e ffa2 movel %fp@(-94),%d0 694ee: 4fef 002c lea %sp@(44),%sp 694f2: 6618 bnes 6950c (*print)( context, "\n" ); 694f4: 4879 0009 d91b pea 9d91b <__FUNCTION__.5931+0x5d> * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 694fa: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 694fc: 2f03 movel %d3,%sp@- 694fe: 4e92 jsr %a2@ continue; 69500: 508f addql #8,%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 69502: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 69508: 6396 blss 694a0 6950a: 60aa bras 694b6 <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6950c: 486e fff2 pea %fp@(-14) 69510: 2047 moveal %d7,%a0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 69512: 5282 addql #1,%d2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 69514: 2f00 movel %d0,%sp@- 69516: 486e ffba pea %fp@(-70) 6951a: 4e90 jsr %a0@ (*print)( context, 6951c: 202e fff6 movel %fp@(-10),%d0 69520: 223c 0000 03e8 movel #1000,%d1 69526: 4c41 0800 remsl %d1,%d0,%d0 6952a: 2c2e ffb6 movel %fp@(-74),%d6 6952e: 2f00 movel %d0,%sp@- 69530: 2001 movel %d1,%d0 69532: 2f2e fff2 movel %fp@(-14),%sp@- 69536: 4c40 6806 remsl %d0,%d6,%d6 6953a: 202e ffae movel %fp@(-82),%d0 6953e: 2246 moveal %d6,%a1 69540: 223c 0000 03e8 movel #1000,%d1 69546: 2f09 movel %a1,%sp@- 69548: 2f2e ffb2 movel %fp@(-78),%sp@- 6954c: 4c41 0800 remsl %d1,%d0,%d0 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 69550: 2c3c 0000 03e8 movel #1000,%d6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 69556: 2f00 movel %d0,%sp@- 69558: 2f2e ffaa movel %fp@(-86),%sp@- 6955c: 4879 0009 c13b pea 9c13b <_TOD_Days_per_month+0x179> 69562: 2f03 movel %d3,%sp@- 69564: 4e92 jsr %a2@ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 69566: 4fef 002c lea %sp@(44),%sp 6956a: 2047 moveal %d7,%a0 6956c: 486e fff2 pea %fp@(-14) 69570: 2f2e ffa2 movel %fp@(-94),%sp@- 69574: 486e ffd2 pea %fp@(-46) 69578: 4e90 jsr %a0@ (*print)( context, 6957a: 202e fff6 movel %fp@(-10),%d0 6957e: 4c46 0800 remsl %d6,%d0,%d0 69582: 222e ffce movel %fp@(-50),%d1 69586: 2f00 movel %d0,%sp@- 69588: 2f2e fff2 movel %fp@(-14),%sp@- 6958c: 4c46 1801 remsl %d6,%d1,%d1 69590: 202e ffc6 movel %fp@(-58),%d0 69594: 2241 moveal %d1,%a1 69596: 2f09 movel %a1,%sp@- 69598: 2f2e ffca movel %fp@(-54),%sp@- 6959c: 4c46 0800 remsl %d6,%d0,%d0 695a0: 2f00 movel %d0,%sp@- 695a2: 2f2e ffc2 movel %fp@(-62),%sp@- 695a6: 4879 0009 c15a pea 9c15a <_TOD_Days_per_month+0x198> 695ac: 2f03 movel %d3,%sp@- 695ae: 4e92 jsr %a2@ 695b0: 4fef 002c lea %sp@(44),%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 695b4: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 695ba: 6300 fee4 blsw 694a0 695be: 6000 fef6 braw 694b6 <== NOT EXECUTED 000695dc : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 695dc: 4e56 0000 linkw %fp,#0 695e0: 2039 000a 5318 movel a5318 <_Thread_Dispatch_disable_level>,%d0 695e6: 5280 addql #1,%d0 695e8: 2f0a movel %a2,%sp@- 695ea: 23c0 000a 5318 movel %d0,a5318 <_Thread_Dispatch_disable_level> 695f0: 2f02 movel %d2,%sp@- /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 695f2: 2439 000a 5748 movel a5748 <_Rate_monotonic_Information+0x6>,%d2 695f8: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 695fe: 6216 bhis 69616 69600: 45f9 0006 9628 lea 69628 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 69606: 2f02 movel %d2,%sp@- * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 69608: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 6960a: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6960c: 588f addql #4,%sp 6960e: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 69614: 63f0 blss 69606 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 69616: 242e fff8 movel %fp@(-8),%d2 6961a: 246e fffc moveal %fp@(-4),%a2 6961e: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 69620: 4ef9 0004 ce90 jmp 4ce90 <_Thread_Enable_dispatch> ... 00057468 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 57468: 4e56 ffec linkw %fp,#-20 5746c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57470: 262e 0008 movel %fp@(8),%d3 57474: 242e 000c movel %fp@(12),%d2 57478: 246e 001c moveal %fp@(28),%a2 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 5747c: 4a83 tstl %d3 5747e: 6700 0096 beqw 57516 return RTEMS_INVALID_NAME; if ( !starting_address ) 57482: 4a82 tstl %d2 57484: 670a beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !id ) 57486: 4a8a tstl %a2 57488: 6706 beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 5748a: 7003 moveq #3,%d0 5748c: c082 andl %d2,%d0 5748e: 670c beqs 5749c return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 57490: 7009 moveq #9,%d0 } 57492: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57498: 4e5e unlk %fp 5749a: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5749c: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 574a8: 4879 0007 cf44 pea 7cf44 <_Region_Information> 574ae: 4eb9 0005 b398 jsr 5b398 <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 574b4: 508f addql #8,%sp 574b6: 2640 moveal %d0,%a3 574b8: 4a80 tstl %d0 574ba: 6766 beqs 57522 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574bc: 2f2e 0014 movel %fp@(20),%sp@- 574c0: 2f2e 0010 movel %fp@(16),%sp@- 574c4: 2f02 movel %d2,%sp@- 574c6: 486b 0068 pea %a3@(104) 574ca: 4eb9 0005 ae1c jsr 5ae1c <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d0: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574d4: 2740 005c movel %d0,%a3@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d8: 6662 bnes 5753c */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 574da: 2f0b movel %a3,%sp@- 574dc: 4879 0007 cf44 pea 7cf44 <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> 574f0: 202e fffc movel %fp@(-4),%d0 574f4: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 574f6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57506: 202e fffc movel %fp@(-4),%d0 5750a: 588f addql #4,%sp } 5750c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57512: 4e5e unlk %fp 57514: 4e75 rts ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 57516: 7003 moveq #3,%d0 } } _RTEMS_Unlock_allocator(); return return_status; } 57518: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5751e: 4e5e unlk %fp 57520: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57522: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 57528: 7005 moveq #5,%d0 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 5752a: 2d40 fffc movel %d0,%fp@(-4) 5752e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57534: 202e fffc movel %fp@(-4),%d0 57538: 588f addql #4,%sp 5753a: 60d0 bras 5750c return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 5753c: 2742 0050 movel %d2,%a3@(80) the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57540: 222e 0018 movel %fp@(24),%d1 } else { the_region->starting_address = starting_address; the_region->length = length; 57544: 202e 0010 movel %fp@(16),%d0 the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57548: e489 lsrl #2,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 5754a: 242e 0014 movel %fp@(20),%d2 the_region->attribute_set = attribute_set; 5754e: 206e 0018 moveal %fp@(24),%a0 } else { the_region->starting_address = starting_address; the_region->length = length; 57552: 2740 0054 movel %d0,%a3@(84) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57556: 4280 clrl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 57558: 2742 0058 movel %d2,%a3@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 5755c: 7401 moveq #1,%d2 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; 5755e: 2748 0060 movel %a0,%a3@(96) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57562: c481 andl %d1,%d2 the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; 57564: 42ab 0064 clrl %a3@(100) _Thread_queue_Initialize( 57568: 4878 0006 pea 6 5756c: 4878 0040 pea 40 57570: 2f02 movel %d2,%sp@- 57572: 486b 0010 pea %a3@(16) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 57576: 4282 clrl %d2 57578: 2d40 fffc movel %d0,%fp@(-4) 5757c: 4eb9 0005 c8d0 jsr 5c8d0 <_Thread_queue_Initialize> 57582: 222b 0008 movel %a3@(8),%d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57586: 4fef 0010 lea %sp@(16),%sp 5758a: 2079 0007 cf5c moveal 7cf5c <_Region_Information+0x18>,%a0 57590: 3401 movew %d1,%d2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 57592: 2743 000c movel %d3,%a3@(12) 57596: 202e fffc movel %fp@(-4),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5759a: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 5759e: 2481 movel %d1,%a2@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 575a0: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 575b0: 202e fffc movel %fp@(-4),%d0 575b4: 588f addql #4,%sp 575b6: 6000 ff54 braw 5750c ... 000575bc : */ rtems_status_code rtems_region_delete( rtems_id id ) { 575bc: 4e56 fffc linkw %fp,#-4 575c0: 2f0a movel %a2,%sp@- 575c2: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 575c4: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 575ca: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 575d0: 486e fffc pea %fp@(-4) 575d4: 2f2e 0008 movel %fp@(8),%sp@- 575d8: 4879 0007 cf44 pea 7cf44 <_Region_Information> 575de: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 575e4: 4fef 0010 lea %sp@(16),%sp 575e8: 2440 moveal %d0,%a2 575ea: 4aae fffc tstl %fp@(-4) 575ee: 671c beqs 5760c default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 575f0: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 575f6: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 575f8: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; } 575fe: 246e fff8 moveal %fp@(-8),%a2 57602: 2002 movel %d2,%d0 57604: 242e fff4 movel %fp@(-12),%d2 57608: 4e5e unlk %fp 5760a: 4e75 rts the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 5760c: 4aaa 0064 tstl %a2@(100) 57610: 671c beqs 5762e default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57612: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 57618: 740c moveq #12,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5761a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; } 57620: 246e fff8 moveal %fp@(-8),%a2 57624: 2002 movel %d2,%d0 57626: 242e fff4 movel %fp@(-12),%d2 5762a: 4e5e unlk %fp 5762c: 4e75 rts case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 5762e: 2f00 movel %d0,%sp@- 57630: 4879 0007 cf44 pea 7cf44 <_Region_Information> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 57636: 4282 clrl %d2 57638: 4eb9 0005 b428 jsr 5b428 <_Objects_Close> 5763e: 2f0a movel %a2,%sp@- 57640: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57646: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> 5764c: 4fef 0010 lea %sp@(16),%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57650: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57656: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; } 5765c: 246e fff8 moveal %fp@(-8),%a2 57660: 2002 movel %d2,%d0 57662: 242e fff4 movel %fp@(-12),%d2 57666: 4e5e unlk %fp 57668: 4e75 rts ... 0005766c : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 5766c: 4e56 fff8 linkw %fp,#-8 57670: 2f0a movel %a2,%sp@- 57672: 2f02 movel %d2,%sp@- 57674: 242e 000c movel %fp@(12),%d2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 57678: 677e beqs 576f8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5767a: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 57686: 486e fff8 pea %fp@(-8) 5768a: 2f2e 0008 movel %fp@(8),%sp@- 5768e: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57694: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5769a: 4fef 0010 lea %sp@(16),%sp 5769e: 2440 moveal %d0,%a2 576a0: 4aae fff8 tstl %fp@(-8) 576a4: 6640 bnes 576e6 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 576a6: 486e fffc pea %fp@(-4) 576aa: 2f2e 0010 movel %fp@(16),%sp@- 576ae: 2f02 movel %d2,%sp@- 576b0: 486a 0068 pea %a2@(104) 576b4: 4eb9 0005 ab10 jsr 5ab10 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 576ba: 4fef 0010 lea %sp@(16),%sp 576be: 4a80 tstl %d0 576c0: 6748 beqs 5770a the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 576c2: 7201 moveq #1,%d1 576c4: b280 cmpl %d0,%d1 576c6: 6760 beqs 57728 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576c8: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 576ce: 7418 moveq #24,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576d0: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 576d6: 588f addql #4,%sp } 576d8: 2002 movel %d2,%d0 576da: 242e fff0 movel %fp@(-16),%d2 576de: 246e fff4 moveal %fp@(-12),%a2 576e2: 4e5e unlk %fp 576e4: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576e6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 576ec: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576ee: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 576f4: 588f addql #4,%sp 576f6: 60e0 bras 576d8 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 576f8: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 576fc: 2002 movel %d2,%d0 576fe: 242e fff0 movel %fp@(-16),%d2 57702: 246e fff4 moveal %fp@(-12),%a2 57706: 4e5e unlk %fp 57708: 4e75 rts length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 5770a: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 5770e: d1aa 005c addl %d0,%a2@(92) 57712: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 57714: d1aa 0054 addl %d0,%a2@(84) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57718: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57724: 588f addql #4,%sp 57726: 60b0 bras 576d8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57728: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 5772e: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57730: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57736: 588f addql #4,%sp 57738: 609e bras 576d8 ... 0005773c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 5773c: 4e56 fffc linkw %fp,#-4 57740: 2f0a movel %a2,%sp@- 57742: 246e 000c moveal %fp@(12),%a2 57746: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 57748: 4a8a tstl %a2 5774a: 6776 beqs 577c2 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 5774c: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57752: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 57758: 486e fffc pea %fp@(-4) 5775c: 2f2e 0008 movel %fp@(8),%sp@- 57760: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57766: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5776c: 4fef 0010 lea %sp@(16),%sp 57770: 4aae fffc tstl %fp@(-4) 57774: 663a bnes 577b0 the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 57776: 2f0a movel %a2,%sp@- 57778: 2040 moveal %d0,%a0 5777a: 4868 0068 pea %a0@(104) 5777e: 4282 clrl %d2 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 57780: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 57784: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 57788: 42aa 0010 clrl %a2@(16) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 5778c: 4eb9 0005 ad40 jsr 5ad40 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 57792: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57794: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 5779a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 577a0: 588f addql #4,%sp } 577a2: 2002 movel %d2,%d0 577a4: 242e fff4 movel %fp@(-12),%d2 577a8: 246e fff8 moveal %fp@(-8),%a2 577ac: 4e5e unlk %fp 577ae: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 577b0: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 577b6: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 577b8: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 577be: 588f addql #4,%sp 577c0: 60e0 bras 577a2 { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 577c2: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 577c4: 2002 movel %d2,%d0 577c6: 242e fff4 movel %fp@(-12),%d2 577ca: 246e fff8 moveal %fp@(-8),%a2 577ce: 4e5e unlk %fp 577d0: 4e75 rts ... 00057854 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 57854: 4e56 ffe4 linkw %fp,#-28 57858: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5785c: 262e 0008 movel %fp@(8),%d3 57860: 242e 000c movel %fp@(12),%d2 57864: 246e 0018 moveal %fp@(24),%a2 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 57868: 4a8a tstl %a2 5786a: 6700 00be beqw 5792a return RTEMS_INVALID_ADDRESS; *segment = NULL; 5786e: 4292 clrl %a2@ if ( size == 0 ) 57870: 4a82 tstl %d2 57872: 660c bnes 57880 57874: 7008 moveq #8,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 57876: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 5787c: 4e5e unlk %fp 5787e: 4e75 rts *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 57880: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57886: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 5788c: 486e fffc pea %fp@(-4) 57890: 2f03 movel %d3,%sp@- 57892: 4879 0007 cf44 pea 7cf44 <_Region_Information> executing = _Thread_Executing; 57898: 2879 0007 d0fa moveal 7d0fa <_Thread_Executing>,%a4 5789e: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 578a4: 4fef 0010 lea %sp@(16),%sp 578a8: 2640 moveal %d0,%a3 578aa: 4aae fffc tstl %fp@(-4) 578ae: 6628 bnes 578d8 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 578b0: b4ab 005c cmpl %a3@(92),%d2 578b4: 633c blss 578f2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578b6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 578bc: 7008 moveq #8,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578be: 2d40 fff8 movel %d0,%fp@(-8) 578c2: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 578c8: 202e fff8 movel %fp@(-8),%d0 578cc: 588f addql #4,%sp } 578ce: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 578d4: 4e5e unlk %fp 578d6: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578d8: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 578de: 7004 moveq #4,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578e0: 2d40 fff8 movel %d0,%fp@(-8) 578e4: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 578ea: 202e fff8 movel %fp@(-8),%d0 578ee: 588f addql #4,%sp 578f0: 60dc bras 578ce * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 578f2: 42a7 clrl %sp@- 578f4: 42a7 clrl %sp@- 578f6: 2f02 movel %d2,%sp@- 578f8: 486b 0068 pea %a3@(104) 578fc: 4eb9 0005 a97c jsr 5a97c <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 57902: 4fef 0010 lea %sp@(16),%sp 57906: 2200 movel %d0,%d1 57908: 672c beqs 57936 the_region->number_of_used_blocks += 1; 5790a: 52ab 0064 addql #1,%a3@(100) *segment = the_segment; 5790e: 4280 clrl %d0 57910: 2481 movel %d1,%a2@ default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57912: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57918: 2d40 fff8 movel %d0,%fp@(-8) 5791c: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57922: 202e fff8 movel %fp@(-8),%d0 57926: 588f addql #4,%sp 57928: 60a4 bras 578ce Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 5792a: 7009 moveq #9,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 5792c: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57932: 4e5e unlk %fp 57934: 4e75 rts if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 57936: 202e 0010 movel %fp@(16),%d0 5793a: 0800 0000 btst #0,%d0 5793e: 671c beqs 5795c default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57940: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 57946: 700d moveq #13,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57948: 2d40 fff8 movel %d0,%fp@(-8) 5794c: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57952: 202e fff8 movel %fp@(-8),%d0 57956: 588f addql #4,%sp 57958: 6000 ff74 braw 578ce rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5795c: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 57962: 5280 addql #1,%d0 57964: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 5796a: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57970: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 57976: 200b movel %a3,%d0 57978: 0680 0000 0010 addil #16,%d0 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 5797e: 7201 moveq #1,%d1 57980: 2940 0044 movel %d0,%a4@(68) 57984: 2741 0040 movel %d1,%a3@(64) executing->Wait.id = id; 57988: 2943 0020 movel %d3,%a4@(32) executing->Wait.count = size; 5798c: 2942 0024 movel %d2,%a4@(36) executing->Wait.return_argument = segment; 57990: 294a 0028 movel %a2,%a4@(40) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 57994: 4879 0005 c9b4 pea 5c9b4 <_Thread_queue_Timeout> 5799a: 2f2e 0014 movel %fp@(20),%sp@- 5799e: 2f00 movel %d0,%sp@- 579a0: 4eb9 0005 c654 jsr 5c654 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 579a6: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 579ac: 202c 0034 movel %a4@(52),%d0 579b0: 4fef 0010 lea %sp@(16),%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 579b4: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 579ba: 4e5e unlk %fp 579bc: 4e75 rts ... 000579c0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 579c0: 4e56 fffc linkw %fp,#-4 579c4: 2f03 movel %d3,%sp@- 579c6: 262e 0010 movel %fp@(16),%d3 579ca: 2f02 movel %d2,%sp@- 579cc: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 579d0: 6700 0092 beqw 57a64 return RTEMS_INVALID_ADDRESS; if ( !size ) 579d4: 4a83 tstl %d3 579d6: 6700 008c beqw 57a64 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 579da: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 cf44 pea 7cf44 <_Region_Information> 579f4: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 579fa: 222e fffc movel %fp@(-4),%d1 579fe: 4fef 0010 lea %sp@(16),%sp 57a02: 6636 bnes 57a3a case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a04: 2f03 movel %d3,%sp@- 57a06: 2040 moveal %d0,%a0 57a08: 2f02 movel %d2,%sp@- 57a0a: 4868 0068 pea %a0@(104) 57a0e: 4eb9 0005 b270 jsr 5b270 <_Heap_Size_of_alloc_area> 57a14: 4fef 000c lea %sp@(12),%sp 57a18: 4a00 tstb %d0 57a1a: 6624 bnes 57a40 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a1c: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a22: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a24: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 57a2a: 588f addql #4,%sp <== NOT EXECUTED } 57a2c: 2002 movel %d2,%d0 57a2e: 242e fff4 movel %fp@(-12),%d2 57a32: 262e fff8 movel %fp@(-8),%d3 57a36: 4e5e unlk %fp 57a38: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a3a: 7001 moveq #1,%d0 57a3c: b081 cmpl %d1,%d0 57a3e: 6712 beqs 57a52 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a40: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a46: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a48: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57a4e: 588f addql #4,%sp 57a50: 60da bras 57a2c case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a52: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a58: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a5a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57a60: 588f addql #4,%sp 57a62: 60c8 bras 57a2c 57a64: 7409 moveq #9,%d2 } 57a66: 2002 movel %d2,%d0 57a68: 242e fff4 movel %fp@(-12),%d2 57a6c: 262e fff8 movel %fp@(-8),%d3 57a70: 4e5e unlk %fp 57a72: 4e75 rts 00057b70 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 57b70: 4e56 fffc linkw %fp,#-4 57b74: 2f0a movel %a2,%sp@- 57b76: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 57b78: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57b7e: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 57b84: 486e fffc pea %fp@(-4) 57b88: 2f2e 0008 movel %fp@(8),%sp@- 57b8c: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57b92: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57b98: 4fef 0010 lea %sp@(16),%sp 57b9c: 2440 moveal %d0,%a2 57b9e: 4aae fffc tstl %fp@(-4) 57ba2: 671e beqs 57bc2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57ba4: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57baa: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57bac: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57bb2: 588f addql #4,%sp } 57bb4: 2002 movel %d2,%d0 57bb6: 242e fff4 movel %fp@(-12),%d2 57bba: 246e fff8 moveal %fp@(-8),%a2 57bbe: 4e5e unlk %fp 57bc0: 4e75 rts RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 57bc2: 2f2e 000c movel %fp@(12),%sp@- 57bc6: 486a 0068 pea %a2@(104) 57bca: 4eb9 0005 abc0 jsr 5abc0 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 57bd0: 508f addql #8,%sp 57bd2: 4a00 tstb %d0 57bd4: 6612 bnes 57be8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57bd6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57bdc: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57bde: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57be4: 588f addql #4,%sp 57be6: 60cc bras 57bb4 _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 57be8: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 57bec: 4282 clrl %d2 57bee: 2f0a movel %a2,%sp@- 57bf0: 4eb9 0005 f3fc jsr 5f3fc <_Region_Process_queue> break; } _RTEMS_Unlock_allocator(); return return_status; } 57bf6: 246e fff8 moveal %fp@(-8),%a2 57bfa: 2002 movel %d2,%d0 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57bfc: 588f addql #4,%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 57bfe: 242e fff4 movel %fp@(-12),%d2 57c02: 4e5e unlk %fp 57c04: 4e75 rts ... 00045a8c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 45a8c: 4e56 ffd4 linkw %fp,#-44 45a90: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 45a94: 262e 0008 movel %fp@(8),%d3 45a98: 242e 0010 movel %fp@(16),%d2 45a9c: 246e 0018 moveal %fp@(24),%a2 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aa0: 4a83 tstl %d3 45aa2: 6748 beqs 45aec return RTEMS_INVALID_NAME; if ( !id ) 45aa4: 4a8a tstl %a2 45aa6: 6700 00ea beqw 45b92 * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 45aaa: 2002 movel %d2,%d0 45aac: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 45ab2: 6744 beqs 45af8 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45ab4: 7230 moveq #48,%d1 45ab6: 7810 moveq #16,%d4 45ab8: c282 andl %d2,%d1 45aba: b881 cmpl %d1,%d4 45abc: 670c beqs 45aca name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 45abe: 700b moveq #11,%d0 } 45ac0: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ac6: 4e5e unlk %fp 45ac8: 4e75 rts #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45aca: 44c2 movew %d2,%ccr 45acc: 66f0 bnes 45abe _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 45ace: 0c80 0000 00c0 cmpil #192,%d0 45ad4: 67e8 beqs 45abe _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45ad6: 7001 moveq #1,%d0 45ad8: b0ae 000c cmpl %fp@(12),%d0 45adc: 6420 bccs 45afe 45ade: 103c 000a moveb #10,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45ae2: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ae8: 4e5e unlk %fp 45aea: 4e75 rts register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aec: 7003 moveq #3,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45aee: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45af4: 4e5e unlk %fp 45af6: 4e75 rts */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 45af8: 7830 moveq #48,%d4 45afa: c882 andl %d2,%d4 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45afc: 66d8 bnes 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45afe: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 45b0c: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45b12: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b18: 588f addql #4,%sp 45b1a: 2640 moveal %d0,%a3 45b1c: 4a80 tstl %d0 45b1e: 6700 00d8 beqw 45bf8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45b22: 2742 0010 movel %d2,%a3@(16) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 45b26: 4a84 tstl %d4 45b28: 6774 beqs 45b9e /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 45b2a: 44c2 movew %d2,%ccr 45b2c: 56c0 sne %d0 45b2e: 49c0 extbl %d0 45b30: 5280 addql #1,%d0 45b32: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45b36: 7010 moveq #16,%d0 45b38: b084 cmpl %d4,%d0 45b3a: 6700 00ce beqw 45c0a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b3e: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 45b40: 4204 clrb %d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b42: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 45b46: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 45b4a: 7001 moveq #1,%d0 45b4c: b0ae 000c cmpl %fp@(12),%d0 45b50: 57c0 seq %d0 45b52: 49c0 extbl %d0 45b54: 4480 negl %d0 45b56: 2f00 movel %d0,%sp@- 45b58: 486e ffea pea %fp@(-22) 45b5c: 486b 0014 pea %a3@(20) 45b60: 4eb9 0004 6780 jsr 46780 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 7206 moveq #6,%d1 45b6c: b280 cmpl %d0,%d1 45b6e: 665e bnes 45bce */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45b70: 2f0b movel %a3,%sp@- 45b72: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45b78: 4eb9 0004 736c jsr 4736c <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b7e: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 45b84: 508f addql #8,%sp (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b86: 7013 moveq #19,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b88: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b8e: 4e5e unlk %fp 45b90: 4e75 rts CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 45b92: 7009 moveq #9,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b94: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b9a: 4e5e unlk %fp 45b9c: 4e75 rts * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45b9e: 2f2e 000c movel %fp@(12),%sp@- */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45ba2: 72ff moveq #-1,%d1 * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45ba4: 486e fff8 pea %fp@(-8) 45ba8: 486b 0014 pea %a3@(20) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bac: 44c2 movew %d2,%ccr 45bae: 56c0 sne %d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45bb0: 2d41 fff8 movel %d1,%fp@(-8) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bb4: 49c0 extbl %d0 45bb6: 5280 addql #1,%d0 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45bb8: 42ae ffea clrl %fp@(-22) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bbc: 2d40 fffc movel %d0,%fp@(-4) /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 45bc0: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 45bc4: 4eb9 0004 6ac8 jsr 46ac8 <_CORE_semaphore_Initialize> 45bca: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45bce: 202b 0008 movel %a3@(8),%d0 45bd2: 4281 clrl %d1 45bd4: 2079 0005 d8a8 moveal 5d8a8 <_Semaphore_Information+0x18>,%a0 45bda: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45bdc: 2743 000c movel %d3,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 45be4: 2480 movel %d0,%a2@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45be6: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45bec: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45bf2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45bf4: 4e5e unlk %fp 45bf6: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 45bf8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 45bfe: 7005 moveq #5,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45c00: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45c06: 4e5e unlk %fp 45c08: 4e75 rts else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45c0a: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c0e: 7801 moveq #1,%d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c10: 4201 clrb %d1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 45c12: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c18: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c1c: b8ae fff0 cmpl %fp@(-16),%d4 45c20: 6600 ff28 bnew 45b4a if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 45c24: 0802 0006 btst #6,%d2 45c28: 6712 beqs 45c3c the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c2a: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 45c2e: 7201 moveq #1,%d1 the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c30: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c34: 1d41 ffee moveb %d1,%fp@(-18) 45c38: 6000 ff10 braw 45b4a } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 45c3c: 4a02 tstb %d2 45c3e: 6c00 ff0a bgew 45b4a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c42: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 45c44: 7001 moveq #1,%d0 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c46: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c4a: 1d40 ffee moveb %d0,%fp@(-18) 45c4e: 6000 fefa braw 45b4a ... 00045c54 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 45c54: 4e56 fffc linkw %fp,#-4 45c58: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 45c5a: 486e fffc pea %fp@(-4) 45c5e: 2f2e 0008 movel %fp@(8),%sp@- 45c62: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45c68: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c6e: 4fef 000c lea %sp@(12),%sp 45c72: 2440 moveal %d0,%a2 45c74: 4aae fffc tstl %fp@(-4) 45c78: 670a beqs 45c84 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c7a: 246e fff8 moveal %fp@(-8),%a2 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c80: 4e5e unlk %fp 45c82: 4e75 rts 45c84: 7030 moveq #48,%d0 45c86: c0aa 0010 andl %a2@(16),%d0 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45c8a: 6760 beqs 45cec if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 45c8c: 4aaa 0062 tstl %a2@(98) 45c90: 6616 bnes 45ca8 45c92: 7220 moveq #32,%d1 45c94: b280 cmpl %d0,%d1 45c96: 6710 beqs 45ca8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45c98: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c9e: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45ca2: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ca4: 4e5e unlk %fp 45ca6: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 45ca8: 4878 0004 pea 4 45cac: 42a7 clrl %sp@- 45cae: 486a 0014 pea %a2@(20) 45cb2: 4eb9 0004 6774 jsr 46774 <_CORE_mutex_Flush> 45cb8: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45cbc: 2f0a movel %a2,%sp@- 45cbe: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45cc4: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45cca: 2f0a movel %a2,%sp@- 45ccc: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45cd2: 4eb9 0004 736c jsr 4736c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45cd8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45cde: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45ce2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ce4: 246e fff8 moveal %fp@(-8),%a2 45ce8: 4e5e unlk %fp 45cea: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 45cec: 4878 0002 pea 2 45cf0: 42a7 clrl %sp@- 45cf2: 486a 0014 pea %a2@(20) 45cf6: 4eb9 0004 6abc jsr 46abc <_CORE_semaphore_Flush> 45cfc: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45d00: 2f0a movel %a2,%sp@- 45d02: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45d08: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45d16: 4eb9 0004 736c jsr 4736c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d1c: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45d22: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d26: 4280 clrl %d0 45d28: 60ba bras 45ce4 ... 00050394 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 50394: 4e56 fffc linkw %fp,#-4 50398: 486e fffc pea %fp@(-4) 5039c: 2f2e 0008 movel %fp@(8),%sp@- 503a0: 4879 0006 3998 pea 63998 <_Semaphore_Information> 503a6: 4eb9 0004 950c jsr 4950c <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 503ac: 4fef 000c lea %sp@(12),%sp 503b0: 4aae fffc tstl %fp@(-4) 503b4: 6706 beqs 503bc 503b6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 503b8: 4e5e unlk %fp 503ba: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 503bc: 7230 moveq #48,%d1 503be: 2040 moveal %d0,%a0 503c0: c2a8 0010 andl %a0@(16),%d1 503c4: 6720 beqs 503e6 _CORE_mutex_Flush( 503c6: 4878 0001 pea 1 503ca: 42a7 clrl %sp@- 503cc: 4868 0014 pea %a0@(20) 503d0: 4eb9 0004 8714 jsr 48714 <_CORE_mutex_Flush> 503d6: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 503da: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 503e0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 503e2: 4e5e unlk %fp 503e4: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 503e6: 4878 0001 pea 1 503ea: 2040 moveal %d0,%a0 503ec: 42a7 clrl %sp@- 503ee: 4868 0014 pea %a0@(20) 503f2: 4eb9 0004 8a5c jsr 48a5c <_CORE_semaphore_Flush> 503f8: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 503fc: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 50402: 4280 clrl %d0 50404: 60dc bras 503e2 ... 00057f5c : rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { 57f5c: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); 57f60: 2f2e 0010 movel %fp@(16),%sp@- 57f64: 2f2e 000c movel %fp@(12),%sp@- 57f68: 2f2e 0008 movel %fp@(8),%sp@- 57f6c: 4879 0007 cf7c pea 7cf7c <_Semaphore_Information> 57f72: 4eb9 0005 ba7c jsr 5ba7c <_Objects_Name_to_id_u32> 57f78: 41f9 0007 65b0 lea 765b0 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 57f7e: 4e5e unlk %fp 57f80: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 57f84: 4e75 rts ... 000463f4 : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463f4: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 463f6: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463fa: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 46400: 6718 beqs 4641a 46402: 23c0 0005 dad6 movel %d0,5dad6 <_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 ); 46408: 203c 0005 d920 movel #383264,%d0 4640e: 2d40 0008 movel %d0,%fp@(8) _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 46412: 4e5e unlk %fp 46414: 4ef9 0004 9156 jmp 49156 <_CPU_Context_Restart_self> 4641a: 4e5e unlk %fp 4641c: 4e75 rts ... 00048588 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 48588: 4e56 fffc linkw %fp,#-4 4858c: 202e 0008 movel %fp@(8),%d0 48590: 2f0a movel %a2,%sp@- 48592: 246e 0010 moveal %fp@(16),%a2 48596: 2f02 movel %d2,%sp@- 48598: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 4859c: 4a39 0005 f6c4 tstb 5f6c4 485a2: 6778 beqs 4861c return RTEMS_NOT_CONFIGURED; if ( !note ) 485a4: 4a8a tstl %a2 485a6: 6700 0090 beqw 48638 /* * 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 ) 485aa: 720f moveq #15,%d1 485ac: b282 cmpl %d2,%d1 485ae: 6542 bcss 485f2 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 485b0: 4a80 tstl %d0 485b2: 674c beqs 48600 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 485b4: 2079 0006 114e moveal 6114e <_Thread_Executing>,%a0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 485ba: b0a8 0008 cmpl %a0@(8),%d0 485be: 6746 beqs 48606 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 485c0: 486e fffc pea %fp@(-4) 485c4: 2f00 movel %d0,%sp@- 485c6: 4eb9 0004 a550 jsr 4a550 <_Thread_Get> switch ( location ) { 485cc: 508f addql #8,%sp 485ce: 4aae fffc tstl %fp@(-4) 485d2: 6656 bnes 4862a case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 485d4: 2240 moveal %d0,%a1 485d6: 2069 0108 moveal %a1@(264),%a0 485da: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 485de: 4eb9 0004 a528 jsr 4a528 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 485e4: 242e fff4 movel %fp@(-12),%d2 switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; _Thread_Enable_dispatch(); 485e8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 485ea: 246e fff8 moveal %fp@(-8),%a2 485ee: 4e5e unlk %fp 485f0: 4e75 rts 485f2: 242e fff4 movel %fp@(-12),%d2 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 485f6: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 485f8: 246e fff8 moveal %fp@(-8),%a2 485fc: 4e5e unlk %fp 485fe: 4e75 rts /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 48600: 2079 0006 114e moveal 6114e <_Thread_Executing>,%a0 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 48606: 2068 0108 moveal %a0@(264),%a0 4860a: 4280 clrl %d0 4860c: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48610: 242e fff4 movel %fp@(-12),%d2 48614: 246e fff8 moveal %fp@(-8),%a2 48618: 4e5e unlk %fp 4861a: 4e75 rts 4861c: 242e fff4 movel %fp@(-12),%d2 { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 48620: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48622: 246e fff8 moveal %fp@(-8),%a2 48626: 4e5e unlk %fp 48628: 4e75 rts 4862a: 242e fff4 movel %fp@(-12),%d2 *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 4862e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48630: 246e fff8 moveal %fp@(-8),%a2 48634: 4e5e unlk %fp 48636: 4e75 rts 48638: 242e fff4 movel %fp@(-12),%d2 RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 4863c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4863e: 246e fff8 moveal %fp@(-8),%a2 48642: 4e5e unlk %fp 48644: 4e75 rts ... 00046100 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 46100: 4e56 0000 linkw %fp,#0 46104: 202e 0008 movel %fp@(8),%d0 46108: 206e 0010 moveal %fp@(16),%a0 Objects_Name_or_id_lookup_errors status; if ( !id ) 4610c: 4a88 tstl %a0 4610e: 6738 beqs 46148 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 46110: 4a80 tstl %d0 46112: 660e bnes 46122 *id = _Thread_Executing->Object.id; 46114: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4611a: 4e5e unlk %fp if ( !id ) return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; 4611c: 20a9 0008 movel %a1@(8),%a0@ } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 46120: 4e75 rts if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 46122: 2f08 movel %a0,%sp@- 46124: 2f2e 000c movel %fp@(12),%sp@- 46128: 2f00 movel %d0,%sp@- 4612a: 4879 0005 d8c8 pea 5d8c8 <_RTEMS_tasks_Information> 46130: 4eb9 0004 7658 jsr 47658 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 46136: 4fef 0010 lea %sp@(16),%sp 4613a: 41f9 0005 b32c lea 5b32c <_Status_Object_name_errors_to_status>,%a0 } 46140: 4e5e unlk %fp return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; 46142: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 46146: 4e75 rts rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 46148: 7009 moveq #9,%d0 } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4614a: 4e5e unlk %fp 4614c: 4e75 rts ... 000585c4 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 585c4: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 585c8: 486e fffc pea %fp@(-4) 585cc: 2f2e 0008 movel %fp@(8),%sp@- 585d0: 4eb9 0005 c1b8 jsr 5c1b8 <_Thread_Get> switch ( location ) { 585d6: 508f addql #8,%sp 585d8: 4aae fffc tstl %fp@(-4) 585dc: 6706 beqs 585e4 585de: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 585e0: 4e5e unlk %fp 585e2: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 585e4: 7202 moveq #2,%d1 585e6: 2040 moveal %d0,%a0 585e8: c2a8 0010 andl %a0@(16),%d1 585ec: 670c beqs 585fa _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 585ee: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 585f4: 700f moveq #15,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 585f6: 4e5e unlk %fp 585f8: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 585fa: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58600: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58602: 4e5e unlk %fp 58604: 4e75 rts ... 00046d7c : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 46d7c: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 46d80: 486e fffc pea %fp@(-4) 46d84: 2f2e 0008 movel %fp@(8),%sp@- 46d88: 4eb9 0004 8978 jsr 48978 <_Thread_Get> switch ( location ) { 46d8e: 508f addql #8,%sp 46d90: 4aae fffc tstl %fp@(-4) 46d94: 6622 bnes 46db8 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 46d96: 2f2e 000c movel %fp@(12),%sp@- 46d9a: 42a7 clrl %sp@- 46d9c: 2f00 movel %d0,%sp@- 46d9e: 4eb9 0004 91ac jsr 491ac <_Thread_Restart> 46da4: 4fef 000c lea %sp@(12),%sp 46da8: 4a00 tstb %d0 46daa: 6612 bnes 46dbe _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 46dac: 4eb9 0004 8950 jsr 48950 <_Thread_Enable_dispatch> 46db2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46db4: 4e5e unlk %fp 46db6: 4e75 rts { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 46db8: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46dba: 4e5e unlk %fp 46dbc: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 46dbe: 4eb9 0004 8950 jsr 48950 <_Thread_Enable_dispatch> 46dc4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46dc6: 4e5e unlk %fp 46dc8: 4e75 rts ... 000505b8 : #include #include rtems_id rtems_task_self(void) { 505b8: 4e56 0000 linkw %fp,#0 505bc: 2079 0006 3b16 moveal 63b16 <_Thread_Executing>,%a0 return _Thread_Executing->Object.id; } 505c2: 4e5e unlk %fp 505c4: 2028 0008 movel %a0@(8),%d0 505c8: 4e75 rts ... 00069cc4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 69cc4: 4e56 fffc linkw %fp,#-4 69cc8: 2f0a movel %a2,%sp@- 69cca: 246e 0010 moveal %fp@(16),%a2 69cce: 2f02 movel %d2,%sp@- 69cd0: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 69cd4: 6752 beqs 69d28 return RTEMS_INVALID_ADDRESS; if ( !result ) 69cd6: 4a8a tstl %a2 69cd8: 674e beqs 69d28 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 69cda: 486e fffc pea %fp@(-4) 69cde: 2f2e 0008 movel %fp@(8),%sp@- 69ce2: 4eb9 0004 ceb8 jsr 4ceb8 <_Thread_Get> switch (location) { 69ce8: 508f addql #8,%sp 69cea: 4aae fffc tstl %fp@(-4) 69cee: 662a bnes 69d1a case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 69cf0: 2240 moveal %d0,%a1 69cf2: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 69cf6: 4a88 tstl %a0 69cf8: 670c beqs 69d06 if (tvp->ptr == ptr) { 69cfa: b4a8 0004 cmpl %a0@(4),%d2 69cfe: 6736 beqs 69d36 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 69d00: 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) { 69d02: 4a88 tstl %a0 69d04: 66f4 bnes 69cfa _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69d06: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d0c: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69d10: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d12: 246e fff8 moveal %fp@(-8),%a2 69d16: 4e5e unlk %fp 69d18: 4e75 rts 69d1a: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 69d1e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d20: 246e fff8 moveal %fp@(-8),%a2 69d24: 4e5e unlk %fp 69d26: 4e75 rts 69d28: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 69d2c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d2e: 246e fff8 moveal %fp@(-8),%a2 69d32: 4e5e unlk %fp 69d34: 4e75 rts if (tvp->ptr == ptr) { /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 69d36: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 69d3a: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d40: 242e fff4 movel %fp@(-12),%d2 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; _Thread_Enable_dispatch(); 69d44: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d46: 246e fff8 moveal %fp@(-8),%a2 69d4a: 4e5e unlk %fp 69d4c: 4e75 rts ... 00046294 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 46294: 4e56 0000 linkw %fp,#0 46298: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4629e: 5280 addql #1,%d0 462a0: 2f02 movel %d2,%sp@- 462a2: 242e 0008 movel %fp@(8),%d2 462a6: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( ticks == 0 ) { 462ac: 4a82 tstl %d2 462ae: 6758 beqs 46308 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 462b0: 4878 0008 pea 8 462b4: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 462ba: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 462c0: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 462c6: 203c 0004 7ba8 movel #293800,%d0 462cc: 2140 0064 movel %d0,%a0@(100) _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 462d0: 2028 0008 movel %a0@(8),%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 462d4: 2142 0054 movel %d2,%a0@(84) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 462d8: 2140 0068 movel %d0,%a0@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 462dc: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 462e0: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 462e4: 4868 0048 pea %a0@(72) 462e8: 4879 0005 da2c pea 5da2c <_Watchdog_Ticks_chain> 462ee: 4eb9 0004 8e0c jsr 48e0c <_Watchdog_Insert> 462f4: 4fef 0010 lea %sp@(16),%sp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 462f8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 462fe: 242e fffc movel %fp@(-4),%d2 46302: 4280 clrl %d0 46304: 4e5e unlk %fp 46306: 4e75 rts rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 46308: 4eb9 0004 8a38 jsr 48a38 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 4630e: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 46314: 242e fffc movel %fp@(-4),%d2 46318: 4280 clrl %d0 4631a: 4e5e unlk %fp 4631c: 4e75 rts ... 00058b70 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 58b70: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4879 0007 d262 pea 7d262 <_Timer_Information> 58b82: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58b88: 4fef 000c lea %sp@(12),%sp 58b8c: 4aae fffc tstl %fp@(-4) 58b90: 6706 beqs 58b98 58b92: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b94: 4e5e unlk %fp 58b96: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58b98: 7204 moveq #4,%d1 58b9a: 2040 moveal %d0,%a0 58b9c: b2a8 0038 cmpl %a0@(56),%d1 58ba0: 670c beqs 58bae (void) _Watchdog_Remove( &the_timer->Ticker ); 58ba2: 4868 0010 pea %a0@(16) 58ba6: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> 58bac: 588f addql #4,%sp _Thread_Enable_dispatch(); 58bae: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58bb4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58bb6: 4e5e unlk %fp 58bb8: 4e75 rts ... 00058c68 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 58c68: 4e56 fffc linkw %fp,#-4 58c6c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58c6e: 486e fffc pea %fp@(-4) 58c72: 2f2e 0008 movel %fp@(8),%sp@- 58c76: 4879 0007 d262 pea 7d262 <_Timer_Information> 58c7c: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58c82: 4fef 000c lea %sp@(12),%sp 58c86: 2440 moveal %d0,%a2 58c88: 4aae fffc tstl %fp@(-4) 58c8c: 663a bnes 58cc8 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 58c8e: 2f00 movel %d0,%sp@- 58c90: 4879 0007 d262 pea 7d262 <_Timer_Information> 58c96: 4eb9 0005 b428 jsr 5b428 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 58c9c: 486a 0010 pea %a2@(16) 58ca0: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 58ca6: 2f0a movel %a2,%sp@- 58ca8: 4879 0007 d262 pea 7d262 <_Timer_Information> 58cae: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 58cb4: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58cba: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); _Timer_Free( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58cbe: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 58cc2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58cc4: 4e5e unlk %fp 58cc6: 4e75 rts 58cc8: 246e fff8 moveal %fp@(-8),%a2 { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58ccc: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58cce: 4e5e unlk %fp 58cd0: 4e75 rts ... 00058dac : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 58dac: 4e56 ffec linkw %fp,#-20 58db0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58db4: 242e 000c movel %fp@(12),%d2 58db8: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 58dbc: 4a39 0007 d054 tstb 7d054 <_TOD_Is_set> 58dc2: 660c bnes 58dd0 58dc4: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58dc6: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58dcc: 4e5e unlk %fp 58dce: 4e75 rts rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 58dd0: 2f02 movel %d2,%sp@- 58dd2: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 58dd8: 588f addql #4,%sp 58dda: 4a00 tstb %d0 58ddc: 671a beqs 58df8 return RTEMS_INVALID_CLOCK; if ( !routine ) 58dde: 4a83 tstl %d3 58de0: 6700 00a8 beqw 58e8a return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 58de4: 2f02 movel %d2,%sp@- 58de6: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 58dec: 588f addql #4,%sp return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 58dee: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 58df0: b0b9 0007 d0d2 cmpl 7d0d2 <_TOD_Now>,%d0 58df6: 620c bhis 58e04 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58df8: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58dfa: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e00: 4e5e unlk %fp 58e02: 4e75 rts 58e04: 486e fffc pea %fp@(-4) 58e08: 2f2e 0008 movel %fp@(8),%sp@- 58e0c: 4879 0007 d262 pea 7d262 <_Timer_Information> 58e12: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58e18: 4fef 000c lea %sp@(12),%sp 58e1c: 2440 moveal %d0,%a2 58e1e: 4aae fffc tstl %fp@(-4) 58e22: 665a bnes 58e7e case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 58e24: 2800 movel %d0,%d4 58e26: 0684 0000 0010 addil #16,%d4 58e2c: 2f04 movel %d4,%sp@- 58e2e: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 58e34: 202e 0008 movel %fp@(8),%d0 58e38: 2540 0030 movel %d0,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 58e3c: 94b9 0007 d0d2 subl 7d0d2 <_TOD_Now>,%d2 the_timer->the_class = TIMER_TIME_OF_DAY; 58e42: 7002 moveq #2,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 58e44: 256e 0014 0034 movel %fp@(20),%a2@(52) 58e4a: 2540 0038 movel %d0,%a2@(56) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 58e4e: 2542 001c movel %d2,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 58e52: 2543 002c movel %d3,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58e56: 42aa 0018 clrl %a2@(24) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 58e5a: 2f04 movel %d4,%sp@- 58e5c: 4879 0007 d10c pea 7d10c <_Watchdog_Seconds_chain> 58e62: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 58e68: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58e6e: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 58e72: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58e74: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e7a: 4e5e unlk %fp 58e7c: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58e7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58e80: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e86: 4e5e unlk %fp 58e88: 4e75 rts return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 58e8a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58e8c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e92: 4e5e unlk %fp 58e94: 4e75 rts ... 00058e98 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 58e98: 4e56 fffc linkw %fp,#-4 58e9c: 2f0a movel %a2,%sp@- 58e9e: 246e 000c moveal %fp@(12),%a2 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 58ea2: 4a8a tstl %a2 58ea4: 6752 beqs 58ef8 58ea6: 486e fffc pea %fp@(-4) 58eaa: 2f2e 0008 movel %fp@(8),%sp@- 58eae: 4879 0007 d262 pea 7d262 <_Timer_Information> 58eb4: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58eba: 4fef 000c lea %sp@(12),%sp 58ebe: 4aae fffc tstl %fp@(-4) 58ec2: 662a bnes 58eee case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 58ec4: 2040 moveal %d0,%a0 58ec6: 24a8 0038 movel %a0@(56),%a2@ the_info->initial = the_timer->Ticker.initial; 58eca: 41e8 001c lea %a0@(28),%a0 58ece: 2550 0004 movel %a0@,%a2@(4) the_info->start_time = the_timer->Ticker.start_time; 58ed2: 5088 addql #8,%a0 58ed4: 2550 0008 movel %a0@,%a2@(8) the_info->stop_time = the_timer->Ticker.stop_time; 58ed8: 5888 addql #4,%a0 58eda: 2550 000c movel %a0@,%a2@(12) _Thread_Enable_dispatch(); 58ede: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58ee4: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; the_info->stop_time = the_timer->Ticker.stop_time; _Thread_Enable_dispatch(); 58ee8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58eea: 4e5e unlk %fp 58eec: 4e75 rts 58eee: 246e fff8 moveal %fp@(-8),%a2 if ( !the_info ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58ef2: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58ef4: 4e5e unlk %fp 58ef6: 4e75 rts 58ef8: 246e fff8 moveal %fp@(-8),%a2 ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 58efc: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58efe: 4e5e unlk %fp 58f00: 4e75 rts ... 00058f30 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 58f30: 4e56 fff0 linkw %fp,#-16 58f34: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 58f38: 486e fffc pea %fp@(-4) 58f3c: 2f2e 0008 movel %fp@(8),%sp@- 58f40: 4879 0007 d262 pea 7d262 <_Timer_Information> 58f46: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58f4c: 4fef 000c lea %sp@(12),%sp 58f50: 2440 moveal %d0,%a2 58f52: 4aae fffc tstl %fp@(-4) 58f56: 670e beqs 58f66 58f58: 7404 moveq #4,%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f5a: 2002 movel %d2,%d0 58f5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f62: 4e5e unlk %fp 58f64: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 58f66: 202a 0038 movel %a2@(56),%d0 58f6a: 671a beqs 58f86 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f6c: 7201 moveq #1,%d1 58f6e: b280 cmpl %d0,%d1 58f70: 673c beqs 58fae 58f72: 740b moveq #11,%d2 * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58f74: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f7a: 2002 movel %d2,%d0 58f7c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f82: 4e5e unlk %fp 58f84: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 58f86: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f8a: 4282 clrl %d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 58f8c: 2f0a movel %a2,%sp@- 58f8e: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 d118 pea 7d118 <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> 58fa2: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58fa6: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58fac: 60cc bras 58f7a if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fae: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 58fb2: 4282 clrl %d2 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 58fb4: 2679 0007 d29a moveal 7d29a <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fba: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 58fc0: 2f0a movel %a2,%sp@- 58fc2: 2f0b movel %a3,%sp@- 58fc4: 206b 0004 moveal %a3@(4),%a0 58fc8: 4e90 jsr %a0@ 58fca: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58fce: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58fd4: 60a4 bras 58f7a ... 00058fd8 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 58fd8: 4e56 ffe8 linkw %fp,#-24 58fdc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 58fe0: 282e 0008 movel %fp@(8),%d4 58fe4: 262e 000c movel %fp@(12),%d3 58fe8: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 58fec: 2479 0007 d29a moveal 7d29a <_Timer_server>,%a2 if ( !timer_server ) 58ff2: 4a8a tstl %a2 58ff4: 6700 009c beqw 59092 return RTEMS_INCORRECT_STATE; if ( !routine ) 58ff8: 4a82 tstl %d2 58ffa: 6700 00a2 beqw 5909e return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 58ffe: 4a83 tstl %d3 59000: 660c bnes 5900e 59002: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59004: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5900a: 4e5e unlk %fp 5900c: 4e75 rts 5900e: 486e fffc pea %fp@(-4) 59012: 2f04 movel %d4,%sp@- 59014: 4879 0007 d262 pea 7d262 <_Timer_Information> 5901a: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59020: 4fef 000c lea %sp@(12),%sp 59024: 2640 moveal %d0,%a3 59026: 4aae fffc tstl %fp@(-4) 5902a: 665a bnes 59086 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5902c: 486b 0010 pea %a3@(16) 59030: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> _ISR_Disable( level ); 59036: 203c 0000 0700 movel #1792,%d0 5903c: 40c1 movew %sr,%d1 5903e: 8081 orl %d1,%d0 59040: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 59042: 588f addql #4,%sp 59044: 4aab 0018 tstl %a3@(24) 59048: 6660 bnes 590aa /* * 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; 5904a: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 5904c: 276e 0014 0034 movel %fp@(20),%a3@(52) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59052: 2742 002c movel %d2,%a3@(44) the_watchdog->id = id; 59056: 2744 0030 movel %d4,%a3@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 5905a: 2743 001c movel %d3,%a3@(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; 5905e: 2740 0038 movel %d0,%a3@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59062: 42ab 0018 clrl %a3@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 59066: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 59068: 2f0b movel %a3,%sp@- 5906a: 2f0a movel %a2,%sp@- 5906c: 206a 0004 moveal %a2@(4),%a0 59070: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59072: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 59078: 508f addql #8,%sp the_timer->Ticker.initial = ticks; _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 5907a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5907c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 59082: 4e5e unlk %fp 59084: 4e75 rts if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59086: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59088: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5908e: 4e5e unlk %fp 59090: 4e75 rts Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 59092: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59094: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5909a: 4e5e unlk %fp 5909c: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !routine ) 5909e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590a0: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 590a6: 4e5e unlk %fp 590a8: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 590aa: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 590ac: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 590b2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590b4: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 590ba: 4e5e unlk %fp 590bc: 4e75 rts ... 000590c0 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 590c0: 4e56 ffec linkw %fp,#-20 590c4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590c8: 242e 000c movel %fp@(12),%d2 590cc: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 590d0: 2479 0007 d29a moveal 7d29a <_Timer_server>,%a2 if ( !timer_server ) 590d6: 4a8a tstl %a2 590d8: 6700 00c8 beqw 591a2 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 590dc: 4a39 0007 d054 tstb 7d054 <_TOD_Is_set> 590e2: 6700 00a6 beqw 5918a return RTEMS_NOT_DEFINED; if ( !routine ) 590e6: 4a83 tstl %d3 590e8: 6700 00ac beqw 59196 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 590ec: 2f02 movel %d2,%sp@- 590ee: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 590f4: 588f addql #4,%sp 590f6: 4a00 tstb %d0 590f8: 660c bnes 59106 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 590fa: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59102: 4e5e unlk %fp 59104: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59106: 2f02 movel %d2,%sp@- 59108: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5910e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59110: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 59112: b0b9 0007 d0d2 cmpl 7d0d2 <_TOD_Now>,%d0 59118: 63e0 blss 590fa 5911a: 486e fffc pea %fp@(-4) 5911e: 2f2e 0008 movel %fp@(8),%sp@- 59122: 4879 0007 d262 pea 7d262 <_Timer_Information> 59128: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5912e: 4fef 000c lea %sp@(12),%sp 59132: 2640 moveal %d0,%a3 59134: 4aae fffc tstl %fp@(-4) 59138: 6674 bnes 591ae case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5913a: 486b 0010 pea %a3@(16) 5913e: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 59144: 202e 0008 movel %fp@(8),%d0 59148: 2740 0030 movel %d0,%a3@(48) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5914c: 94b9 0007 d0d2 subl 7d0d2 <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 59152: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 59154: 276e 0014 0034 movel %fp@(20),%a3@(52) 5915a: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5915e: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59162: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59166: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 5916a: 2f0b movel %a3,%sp@- 5916c: 2f0a movel %a2,%sp@- 5916e: 206a 0004 moveal %a2@(4),%a0 59172: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59174: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5917a: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 5917e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59180: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59186: 4e5e unlk %fp 59188: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 5918a: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5918c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59192: 4e5e unlk %fp <== NOT EXECUTED 59194: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 59196: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59198: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5919e: 4e5e unlk %fp 591a0: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 591a2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591aa: 4e5e unlk %fp 591ac: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 591ae: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591b6: 4e5e unlk %fp 591b8: 4e75 rts ...