0004cacc : uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4cacc: 41f9 0006 4fd0 lea 64fd0 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4cad2: 4e56 0000 linkw %fp,#0 return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4cad6: 202e 0008 movel %fp@(8),%d0 4cada: 4e5e unlk %fp 4cadc: 4c50 0000 remul %a0@,%d0,%d0 4cae0: 4e75 rts ... 00047864 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 47864: 4e56 0000 linkw %fp,#0 47868: 2039 0005 ed30 movel 5ed30 ,%d0 4786e: 2f02 movel %d2,%sp@- 47870: 243c 0000 03e8 movel #1000,%d2 47876: 4c42 0000 remul %d2,%d0,%d0 return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); } 4787a: 242e 0008 movel %fp@(8),%d2 4787e: 4c40 2002 remul %d0,%d2,%d2 47882: 2002 movel %d2,%d0 47884: 241f movel %sp@+,%d2 47886: 4e5e unlk %fp 47888: 4e75 rts ... 00046704 <_API_Mutex_Lock>: API_Mutex_Control *the_mutex ) { ISR_Level level; _ISR_Disable( level ); 46704: 203c 0000 0700 movel #1792,%d0 #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 4670a: 4e56 0000 linkw %fp,#0 4670e: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 46712: 40c1 movew %sr,%d1 46714: 8081 orl %d1,%d0 46716: 46c0 movew %d0,%sr _CORE_mutex_Seize( 46718: 2f01 movel %d1,%sp@- 4671a: 42a7 clrl %sp@- 4671c: 4878 0001 pea 1 46720: 2f28 0008 movel %a0@(8),%sp@- 46724: 4868 0010 pea %a0@(16) 46728: 4eb9 0004 6958 jsr 46958 <_CORE_mutex_Seize> 4672e: 4fef 0014 lea %sp@(20),%sp the_mutex->Object.id, true, 0, level ); } 46732: 4e5e unlk %fp 46734: 4e75 rts ... 00046764 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 46764: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46768: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4676e: 5280 addql #1,%d0 46770: 206e 0008 moveal %fp@(8),%a0 46774: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 4677a: 42a7 clrl %sp@- 4677c: 2f28 0008 movel %a0@(8),%sp@- 46780: 4868 0010 pea %a0@(16) 46784: 4eb9 0004 6a08 jsr 46a08 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4678a: 4fef 000c lea %sp@(12),%sp } 4678e: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46790: 4ef9 0004 7dbc jmp 47dbc <_Thread_Enable_dispatch> ... 00046684 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 46684: 4e56 0000 linkw %fp,#0 _Chain_Append( &_API_extensions_List, &the_extension->Node ); 46688: 2f2e 0008 movel %fp@(8),%sp@- 4668c: 4879 0005 f0a4 pea 5f0a4 <_API_extensions_List> 46692: 4eb9 0004 6798 jsr 46798 <_Chain_Append> 46698: 508f addql #8,%sp } 4669a: 4e5e unlk %fp 4669c: 4e75 rts ... 0004eb44 <_Barrier_Translate_core_barrier_return_code>: }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) { 4eb44: 41f9 0005 d86c lea 5d86c <_Barrier_Translate_core_barrier_return_code_>,%a0 4eb4a: 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]; } 4eb4e: 202e 0008 movel %fp@(8),%d0 4eb52: 4e5e unlk %fp 4eb54: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4eb58: 4e75 rts ... 00048bdc <_CORE_RWLock_Obtain_for_writing>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48bdc: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 48be2: 4e56 fff4 linkw %fp,#-12 48be6: 206e 0008 moveal %fp@(8),%a0 48bea: 48d7 001c moveml %d2-%d4,%sp@ 48bee: 282e 000c movel %fp@(12),%d4 48bf2: 242e 0010 movel %fp@(16),%d2 48bf6: 262e 0014 movel %fp@(20),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 48bfa: 2279 0006 1d12 moveal 61d12 <_Thread_Executing>,%a1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48c00: 40c1 movew %sr,%d1 48c02: 8081 orl %d1,%d0 48c04: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 48c06: 4aa8 0044 tstl %a0@(68) 48c0a: 6614 bnes 48c20 <_CORE_RWLock_Obtain_for_writing+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 48c0c: 7002 moveq #2,%d0 48c0e: 2140 0044 movel %d0,%a0@(68) _ISR_Enable( level ); 48c12: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48c14: 42a9 0034 clrl %a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c18: 4cd7 001c moveml %sp@,%d2-%d4 48c1c: 4e5e unlk %fp 48c1e: 4e75 rts /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 48c20: 4a02 tstb %d2 48c22: 6610 bnes 48c34 <_CORE_RWLock_Obtain_for_writing+0x58> _ISR_Enable( level ); 48c24: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48c26: 7002 moveq #2,%d0 _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c28: 4cd7 001c moveml %sp@,%d2-%d4 * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48c2c: 2340 0034 movel %d0,%a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c30: 4e5e unlk %fp 48c32: 4e75 rts */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 48c34: 7001 moveq #1,%d0 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 48c36: 2344 0020 movel %d4,%a1@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48c3a: 42a9 0034 clrl %a1@(52) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 48c3e: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 48c42: 2340 0030 movel %d0,%a1@(48) 48c46: 2140 0030 movel %d0,%a0@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 48c4a: 46c1 movew %d1,%sr _Thread_queue_Enqueue_with_handler( 48c4c: 2d43 000c movel %d3,%fp@(12) 48c50: 203c 0004 8d48 movel #298312,%d0 48c56: 2d48 0008 movel %a0,%fp@(8) 48c5a: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c5e: 4cd7 001c moveml %sp@,%d2-%d4 48c62: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 48c64: 4ef9 0004 a5b4 jmp 4a5b4 <_Thread_queue_Enqueue_with_handler> ... 00048d48 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 48d48: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48d4c: 486e fffc pea %fp@(-4) 48d50: 2f2e 0008 movel %fp@(8),%sp@- 48d54: 4eb9 0004 a090 jsr 4a090 <_Thread_Get> switch ( location ) { 48d5a: 508f addql #8,%sp 48d5c: 4aae fffc tstl %fp@(-4) 48d60: 6618 bnes 48d7a <_CORE_RWLock_Timeout+0x32> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 48d62: 2f00 movel %d0,%sp@- 48d64: 4eb9 0004 aa24 jsr 4aa24 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48d6a: 588f addql #4,%sp 48d6c: 2039 0006 1c58 movel 61c58 <_Thread_Dispatch_disable_level>,%d0 48d72: 5380 subql #1,%d0 48d74: 23c0 0006 1c58 movel %d0,61c58 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 48d7a: 4e5e unlk %fp 48d7c: 4e75 rts ... 0004de44 <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4de44: 4e56 0000 linkw %fp,#0 the_barrier->Attributes = *the_barrier_attributes; 4de48: 226e 000c moveal %fp@(12),%a1 the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4de4c: 4878 0003 pea 3 void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4de50: 206e 0008 moveal %fp@(8),%a0 the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4de54: 2f3c 0001 0000 movel #65536,%sp@- 4de5a: 42a7 clrl %sp@- CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; 4de5c: 2011 movel %a1@,%d0 4de5e: 2229 0004 movel %a1@(4),%d1 4de62: 2140 0040 movel %d0,%a0@(64) 4de66: 2141 0044 movel %d1,%a0@(68) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4de6a: 2f08 movel %a0,%sp@- CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; 4de6c: 42a8 0048 clrl %a0@(72) _Thread_queue_Initialize( 4de70: 4eb9 0004 8584 jsr 48584 <_Thread_queue_Initialize> 4de76: 4fef 0010 lea %sp@(16),%sp &the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); } 4de7a: 4e5e unlk %fp 4de7c: 4e75 rts ... 0004de80 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 4de80: 4e56 fff4 linkw %fp,#-12 4de84: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4de88: 246e 0008 moveal %fp@(8),%a2 4de8c: 47f9 0004 81a8 lea 481a8 <_Thread_queue_Dequeue>,%a3 Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4de92: 4282 clrl %d2 4de94: 2f0a movel %a2,%sp@- 4de96: 4e93 jsr %a3@ 4de98: 588f addql #4,%sp 4de9a: 4a80 tstl %d0 4de9c: 670c beqs 4deaa <_CORE_barrier_Release+0x2a> 4de9e: 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++; 4dea0: 5282 addql #1,%d2 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4dea2: 4e93 jsr %a3@ 4dea4: 588f addql #4,%sp 4dea6: 4a80 tstl %d0 4dea8: 66f4 bnes 4de9e <_CORE_barrier_Release+0x1e> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } 4deaa: 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; 4deac: 42aa 0048 clrl %a2@(72) return count; } 4deb0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4deb6: 4e5e unlk %fp 4deb8: 4e75 rts ... 0004debc <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4debc: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4dec2: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4dec6: 2279 0005 efbe moveal 5efbe <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4decc: 48d7 001c moveml %d2-%d4,%sp@ 4ded0: 242e 000c movel %fp@(12),%d2 4ded4: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4ded8: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4dedc: 206e 0008 moveal %fp@(8),%a0 4dee0: 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 ); 4dee4: 40c1 movew %sr,%d1 4dee6: 8081 orl %d1,%d0 4dee8: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4deea: 2028 0048 movel %a0@(72),%d0 4deee: 5280 addql #1,%d0 4def0: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4def4: 4aa8 0040 tstl %a0@(64) 4def8: 6606 bnes 4df00 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4defa: b0a8 0044 cmpl %a0@(68),%d0 4defe: 672e beqs 4df2e <_CORE_barrier_Wait+0x72> 4df00: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4df02: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4df06: 2348 0044 movel %a0,%a1@(68) 4df0a: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4df0e: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4df10: 2d43 000c movel %d3,%fp@(12) 4df14: 203c 0004 8668 movel #296552,%d0 4df1a: 2d48 0008 movel %a0,%fp@(8) 4df1e: 2d40 0010 movel %d0,%fp@(16) } 4df22: 4cd7 001c moveml %sp@,%d2-%d4 4df26: 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 ); 4df28: 4ef9 0004 8308 jmp 48308 <_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; 4df2e: 7001 moveq #1,%d0 4df30: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4df34: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4df36: 2d44 0010 movel %d4,%fp@(16) 4df3a: 2d42 000c movel %d2,%fp@(12) 4df3e: 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 ); } 4df42: 4cd7 001c moveml %sp@,%d2-%d4 4df46: 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 ); 4df48: 4ef9 0004 de80 jmp 4de80 <_CORE_barrier_Release> ... 00059f8c <_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 ) { 59f8c: 4e56 ffe0 linkw %fp,#-32 59f90: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f94: 266e 0008 moveal %fp@(8),%a3 59f98: 282e 000c movel %fp@(12),%d4 59f9c: 242e 0010 movel %fp@(16),%d2 59fa0: 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 ) { 59fa4: b4ab 004c cmpl %a3@(76),%d2 59fa8: 6262 bhis 5a00c <_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 ) { 59faa: 4aab 0048 tstl %a3@(72) 59fae: 664c bnes 59ffc <_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))) { 59fb0: 2f0b movel %a3,%sp@- 59fb2: 49f9 0005 c6d8 lea 5c6d8 <_Thread_queue_Dequeue>,%a4 59fb8: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59fba: 4bf9 0006 35e8 lea 635e8 ,%a5 59fc0: 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 = 59fc2: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59fc4: 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 = 59fc6: 4a80 tstl %d0 59fc8: 6722 beqs 59fec <_CORE_message_queue_Broadcast+0x60> 59fca: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59fcc: 5283 addql #1,%d3 59fce: 2f04 movel %d4,%sp@- 59fd0: 2f2a 002c movel %a2@(44),%sp@- 59fd4: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59fd6: 206a 0028 moveal %a2@(40),%a0 59fda: 4fef 000c lea %sp@(12),%sp 59fde: 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))) { 59fe0: 2f0b movel %a3,%sp@- 59fe2: 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 = 59fe4: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59fe6: 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 = 59fe8: 4a80 tstl %d0 59fea: 66de bnes 59fca <_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; 59fec: 2045 moveal %d5,%a0 59fee: 4280 clrl %d0 59ff0: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59ff2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59ff8: 4e5e unlk %fp 59ffa: 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; 59ffc: 2045 moveal %d5,%a0 59ffe: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a000: 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; 5a006: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a008: 4e5e unlk %fp 5a00a: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 5a00c: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a00e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5a014: 4e5e unlk %fp <== NOT EXECUTED 5a016: 4e75 rts 00053ca4 <_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 ) { 53ca4: 4e56 0000 linkw %fp,#0 53ca8: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 53caa: 2f2e 0010 movel %fp@(16),%sp@- 53cae: 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 ) { 53cb2: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 53cb6: 2f0a movel %a2,%sp@- 53cb8: 4eb9 0004 db3c jsr 4db3c <_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 ) 53cbe: 4fef 000c lea %sp@(12),%sp 53cc2: 4aaa 0048 tstl %a2@(72) 53cc6: 6612 bnes 53cda <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 53cc8: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 53cce: 246e fffc moveal %fp@(-4),%a2 53cd2: 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 ); 53cd4: 4ef9 0004 e86c jmp 4e86c <_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 ); 53cda: 2f0a movel %a2,%sp@- 53cdc: 4eb9 0005 3cf8 jsr 53cf8 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 53ce2: 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 ); 53ce8: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 53cea: 246e fffc moveal %fp@(-4),%a2 53cee: 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 ); 53cf0: 4ef9 0004 e86c jmp 4e86c <_Workspace_Free> ... 0004fe54 <_CORE_message_queue_Initialize>: /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe54: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4fe56: 4e56 fff4 linkw %fp,#-12 4fe5a: 202e 0014 movel %fp@(20),%d0 4fe5e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe62: 246e 0008 moveal %fp@(8),%a2 4fe66: 242e 0010 movel %fp@(16),%d2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe6a: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4fe6c: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4fe70: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4fe74: 2540 004c movel %d0,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4fe78: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 4fe7c: 42aa 0064 clrl %a2@(100) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe80: 4a81 tstl %d1 4fe82: 6620 bnes 4fea4 <_CORE_message_queue_Initialize+0x50> 4fe84: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4fe86: 2601 movel %d1,%d3 4fe88: 0683 0000 0014 addil #20,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4fe8e: 2003 movel %d3,%d0 4fe90: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4fe94: b280 cmpl %d0,%d1 4fe96: 631c blss 4feb4 <_CORE_message_queue_Initialize+0x60> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe98: 4200 clrb %d0 } 4fe9a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fea0: 4e5e unlk %fp 4fea2: 4e75 rts * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 4fea4: 2200 movel %d0,%d1 4fea6: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4fea8: 76fc moveq #-4,%d3 4feaa: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4feac: b280 cmpl %d0,%d1 4feae: 64d6 bccs 4fe86 <_CORE_message_queue_Initialize+0x32> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4feb0: 4200 clrb %d0 <== NOT EXECUTED 4feb2: 60e6 bras 4fe9a <_CORE_message_queue_Initialize+0x46><== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4feb4: 2f00 movel %d0,%sp@- 4feb6: 4eb9 0005 2cd4 jsr 52cd4 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4febc: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4febe: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fec2: 67d4 beqs 4fe98 <_CORE_message_queue_Initialize+0x44> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4fec4: 2f03 movel %d3,%sp@- 4fec6: 2f02 movel %d2,%sp@- 4fec8: 2f00 movel %d0,%sp@- 4feca: 486a 0068 pea %a2@(104) 4fece: 4eb9 0005 51e8 jsr 551e8 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4fed4: 4878 0006 pea 6 4fed8: 7001 moveq #1,%d0 4feda: 206e 000c moveal %fp@(12),%a0 4fede: b090 cmpl %a0@,%d0 4fee0: 57c0 seq %d0 4fee2: 4878 0080 pea 80 4fee6: 49c0 extbl %d0 4fee8: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4feea: 41ea 0054 lea %a2@(84),%a0 4feee: 2f00 movel %d0,%sp@- 4fef0: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4fef4: 41ea 0050 lea %a2@(80),%a0 4fef8: 2548 0058 movel %a0,%a2@(88) 4fefc: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4fefe: 42aa 0054 clrl %a2@(84) 4ff02: 4eb9 0005 2074 jsr 52074 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff08: 4fef 0020 lea %sp@(32),%sp } 4ff0c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4ff12: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4ff14: 4e5e unlk %fp 4ff16: 4e75 rts 0004ff18 <_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 ); 4ff18: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff1e: 4e56 ffe8 linkw %fp,#-24 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4ff22: 2279 0006 97b2 moveal 697b2 <_Thread_Executing>,%a1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff28: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4ff2c: 282e 000c movel %fp@(12),%d4 4ff30: 286e 001c moveal %fp@(28),%a4 4ff34: 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; 4ff38: 42a9 0034 clrl %a1@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff3c: 262e 0010 movel %fp@(16),%d3 4ff40: 206e 0014 moveal %fp@(20),%a0 4ff44: 242e 0018 movel %fp@(24),%d2 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 ); 4ff48: 40c1 movew %sr,%d1 4ff4a: 8081 orl %d1,%d0 4ff4c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ff4e: 200a movel %a2,%d0 4ff50: 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)); 4ff56: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ff5a: b08b cmpl %a3,%d0 4ff5c: 6700 0088 beqw 4ffe6 <_CORE_message_queue_Seize+0xce> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4ff60: 2253 moveal %a3@,%a1 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 4ff62: 53aa 0048 subql #1,%a2@(72) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4ff66: 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; 4ff6a: 2549 0050 movel %a1,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4ff6e: 234c 0004 movel %a4,%a1@(4) _ISR_Enable( level ); 4ff72: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4ff74: 2279 0006 97b2 moveal 697b2 <_Thread_Executing>,%a1 _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 4ff7a: 240b movel %a3,%d2 4ff7c: 0682 0000 0010 addil #16,%d2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ff82: 49f9 0005 8950 lea 58950 ,%a4 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 4ff88: 20ab 000c movel %a3@(12),%a0@ _Thread_Executing->Wait.count = 4ff8c: 236b 0008 0024 movel %a3@(8),%a1@(36) 4ff92: 2f10 movel %a0@,%sp@- 4ff94: 2f02 movel %d2,%sp@- 4ff96: 2f03 movel %d3,%sp@- 4ff98: 4e94 jsr %a4@ * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4ff9a: 2f0a movel %a2,%sp@- 4ff9c: 4eb9 0005 1c98 jsr 51c98 <_Thread_queue_Dequeue> if ( !the_thread ) { 4ffa2: 4fef 0010 lea %sp@(16),%sp * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4ffa6: 2040 moveal %d0,%a0 if ( !the_thread ) { 4ffa8: 4a80 tstl %d0 4ffaa: 6700 0088 beqw 50034 <_CORE_message_queue_Seize+0x11c> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 4ffae: 2028 0030 movel %a0@(48),%d0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 4ffb2: 2768 0024 0008 movel %a0@(36),%a3@(8) 4ffb8: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ffbc: 2f00 movel %d0,%sp@- 4ffbe: 2f28 002c movel %a0@(44),%sp@- 4ffc2: 2f02 movel %d2,%sp@- 4ffc4: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4ffc6: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 4ffcc: 4fef 000c lea %sp@(12),%sp 4ffd0: 2d4b 000c movel %a3,%fp@(12) 4ffd4: 2d4a 0008 movel %a2,%fp@(8) 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 ); } 4ffd8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4ffde: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4ffe0: 4ef9 0005 5230 jmp 55230 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 4ffe6: 4a02 tstb %d2 4ffe8: 6612 bnes 4fffc <_CORE_message_queue_Seize+0xe4> _ISR_Enable( level ); 4ffea: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ffec: 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 ); } 4ffee: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4fff4: 2340 0034 movel %d0,%a1@(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 ); } 4fff8: 4e5e unlk %fp 4fffa: 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; 4fffc: 7001 moveq #1,%d0 4fffe: 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; 50002: 2348 0028 movel %a0,%a1@(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; 50006: 2343 002c movel %d3,%a1@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 5000a: 2344 0020 movel %d4,%a1@(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; 5000e: 234a 0044 movel %a2,%a1@(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 ); 50012: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50014: 2d4c 000c movel %a4,%fp@(12) 50018: 49f9 0005 2158 lea 52158 <_Thread_queue_Timeout>,%a4 5001e: 2d4a 0008 movel %a2,%fp@(8) 50022: 2d4c 0010 movel %a4,%fp@(16) } 50026: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5002c: 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 ); 5002e: 4ef9 0005 1df8 jmp 51df8 <_Thread_queue_Enqueue_with_handler> 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 ); 50034: 45ea 0068 lea %a2@(104),%a2 50038: 2d4b 000c movel %a3,%fp@(12) 5003c: 2d4a 0008 movel %a2,%fp@(8) } 50040: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50046: 4e5e unlk %fp 50048: 4ef9 0004 fd88 jmp 4fd88 <_Chain_Append> ... 00050050 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 50050: 4e56 ffec linkw %fp,#-20 50054: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50058: 246e 0008 moveal %fp@(8),%a2 5005c: 242e 0010 movel %fp@(16),%d2 50060: 282e 001c movel %fp@(28),%d4 50064: 162e 0023 moveb %fp@(35),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50068: b4aa 004c cmpl %a2@(76),%d2 5006c: 6228 bhis 50096 <_CORE_message_queue_Submit+0x46> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 5006e: 202a 0048 movel %a2@(72),%d0 50072: 672e beqs 500a2 <_CORE_message_queue_Submit+0x52> /* * 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 ) { 50074: b0aa 0044 cmpl %a2@(68),%d0 50078: 6500 00ba bcsw 50134 <_CORE_message_queue_Submit+0xe4> /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 5007c: 4a03 tstb %d3 5007e: 6700 00f4 beqw 50174 <_CORE_message_queue_Submit+0x124> /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 50082: 2039 0006 9792 movel 69792 <_ISR_Nest_level>,%d0 50088: 6754 beqs 500de <_CORE_message_queue_Submit+0x8e> 5008a: 7003 moveq #3,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5008c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50092: 4e5e unlk %fp 50094: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50096: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50098: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5009e: 4e5e unlk %fp 500a0: 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 ); 500a2: 2f0a movel %a2,%sp@- 500a4: 4eb9 0005 1c98 jsr 51c98 <_Thread_queue_Dequeue> if ( the_thread ) { 500aa: 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 ); 500ac: 2640 moveal %d0,%a3 if ( the_thread ) { 500ae: 4a80 tstl %d0 500b0: 6700 00ce beqw 50180 <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 500b4: 2f02 movel %d2,%sp@- 500b6: 2f2e 000c movel %fp@(12),%sp@- 500ba: 2f2b 002c movel %a3@(44),%sp@- 500be: 4eb9 0005 8950 jsr 58950 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 500c4: 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; 500c8: 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; 500cc: 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; 500ce: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 500d0: 2744 0024 movel %d4,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 500d4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 500da: 4e5e unlk %fp 500dc: 4e75 rts * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 500de: 2079 0006 97b2 moveal 697b2 <_Thread_Executing>,%a0 ISR_Level level; _ISR_Disable( level ); 500e4: 203c 0000 0700 movel #1792,%d0 500ea: 40c1 movew %sr,%d1 500ec: 8081 orl %d1,%d0 500ee: 46c0 movew %d0,%sr 500f0: 7001 moveq #1,%d0 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 500f2: 216e 0014 0020 movel %fp@(20),%a0@(32) 500f8: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_argument_second.immutable_object = buffer; 500fc: 202e 000c movel %fp@(12),%d0 executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 50100: 2144 0024 movel %d4,%a0@(36) _ISR_Disable( level ); _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.immutable_object = buffer; 50104: 2140 002c movel %d0,%a0@(44) executing->Wait.option = (uint32_t) size; 50108: 2142 0030 movel %d2,%a0@(48) Thread_Control *executing = _Thread_Executing; ISR_Level level; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 5010c: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 50110: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50112: 4879 0005 2158 pea 52158 <_Thread_queue_Timeout> 50118: 2f2e 0024 movel %fp@(36),%sp@- 5011c: 2f0a movel %a2,%sp@- 5011e: 4eb9 0005 1df8 jsr 51df8 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 50124: 4fef 000c lea %sp@(12),%sp executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50128: 7007 moveq #7,%d0 } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5012a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50130: 4e5e unlk %fp 50132: 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 *) 50134: 486a 0068 pea %a2@(104) 50138: 4eb9 0004 fde8 jsr 4fde8 <_Chain_Get> 5013e: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50140: 2f02 movel %d2,%sp@- 50142: 2f2e 000c movel %fp@(12),%sp@- 50146: 486b 0010 pea %a3@(16) 5014a: 4eb9 0005 8950 jsr 58950 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 50150: 2742 000c movel %d2,%a3@(12) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 50154: 2744 0008 movel %d4,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 50158: 2f04 movel %d4,%sp@- 5015a: 2f0b movel %a3,%sp@- 5015c: 2f0a movel %a2,%sp@- 5015e: 4eb9 0005 5230 jsr 55230 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 50164: 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( 50168: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5016a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50170: 4e5e unlk %fp 50172: 4e75 rts /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 50174: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50176: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5017c: 4e5e unlk %fp 5017e: 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 ) { 50180: 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 ) { 50184: b0aa 0044 cmpl %a2@(68),%d0 50188: 6400 fef2 bccw 5007c <_CORE_message_queue_Submit+0x2c> 5018c: 60a6 bras 50134 <_CORE_message_queue_Submit+0xe4> ... 0004b9d8 <_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 ) { 4b9d8: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4b9dc: 2279 0005 efbe moveal 5efbe <_Thread_Executing>,%a1 4b9e2: 2f0a movel %a2,%sp@- 4b9e4: 206e 0008 moveal %fp@(8),%a0 4b9e8: 246e 000c moveal %fp@(12),%a2 4b9ec: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4b9ee: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4b9f2: 4aa8 004e tstl %a0@(78) 4b9f6: 673a beqs 4ba32 <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4b9f8: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b9fc: 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; 4b9fe: 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; 4ba04: 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; 4ba08: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4ba0c: 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; 4ba10: 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 ) || 4ba14: b280 cmpl %d0,%d1 4ba16: 672e beqs 4ba46 <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4ba18: 123c 0003 moveb #3,%d1 4ba1c: b280 cmpl %d0,%d1 4ba1e: 674e beqs 4ba6e <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4ba20: 2012 movel %a2@,%d0 4ba22: 46c0 movew %d0,%sr 4ba24: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4ba26: 242e fff8 movel %fp@(-8),%d2 4ba2a: 246e fffc moveal %fp@(-4),%a2 4ba2e: 4e5e unlk %fp 4ba30: 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 ) ) { 4ba32: b3e8 005a cmpal %a0@(90),%a1 4ba36: 671a beqs 4ba52 <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4ba38: 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 ); 4ba3c: 7001 moveq #1,%d0 4ba3e: 246e fffc moveal %fp@(-4),%a2 4ba42: 4e5e unlk %fp 4ba44: 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++; 4ba46: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4ba4a: 2012 movel %a2@,%d0 4ba4c: 46c0 movew %d0,%sr 4ba4e: 4280 clrl %d0 4ba50: 60d4 bras 4ba26 <_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 ) { 4ba52: 2028 0040 movel %a0@(64),%d0 4ba56: 6658 bnes 4bab0 <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4ba58: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4ba5c: 2012 movel %a2@,%d0 4ba5e: 46c0 movew %d0,%sr 4ba60: 242e fff8 movel %fp@(-8),%d2 4ba64: 4280 clrl %d0 4ba66: 246e fffc moveal %fp@(-4),%a2 4ba6a: 4e5e unlk %fp 4ba6c: 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++; 4ba6e: 2429 001c movel %a1@(28),%d2 4ba72: 2002 movel %d2,%d0 4ba74: 5280 addql #1,%d0 4ba76: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4ba7a: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4ba7e: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4ba82: b081 cmpl %d1,%d0 4ba84: 6700 0082 beqw 4bb08 <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4ba88: 6244 bhis 4bace <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4ba8a: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4ba8c: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4ba8e: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4ba92: 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; 4ba96: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4ba9a: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4ba9e: 2012 movel %a2@,%d0 4baa0: 46c0 movew %d0,%sr 4baa2: 242e fff8 movel %fp@(-8),%d2 4baa6: 4280 clrl %d0 4baa8: 246e fffc moveal %fp@(-4),%a2 4baac: 4e5e unlk %fp 4baae: 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 ) { 4bab0: 7201 moveq #1,%d1 4bab2: b280 cmpl %d0,%d1 4bab4: 6682 bnes 4ba38 <_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; 4bab6: 7002 moveq #2,%d0 4bab8: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( *level_p ); 4babc: 2012 movel %a2@,%d0 4babe: 46c0 movew %d0,%sr 4bac0: 242e fff8 movel %fp@(-8),%d2 4bac4: 4280 clrl %d0 4bac6: 246e fffc moveal %fp@(-4),%a2 4baca: 4e5e unlk %fp 4bacc: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4bace: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4bad4: 5280 addql #1,%d0 4bad6: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4badc: 2012 movel %a2@,%d0 4bade: 46c0 movew %d0,%sr _Thread_Change_priority( 4bae0: 42a7 clrl %sp@- 4bae2: 2f28 004a movel %a0@(74),%sp@- 4bae6: 2f28 005a movel %a0@(90),%sp@- 4baea: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4baf0: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4baf6: 242e fff8 movel %fp@(-8),%d2 4bafa: 4fef 000c lea %sp@(12),%sp 4bafe: 4280 clrl %d0 4bb00: 246e fffc moveal %fp@(-4),%a2 4bb04: 4e5e unlk %fp 4bb06: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4bb08: 2012 movel %a2@,%d0 4bb0a: 46c0 movew %d0,%sr 4bb0c: 242e fff8 movel %fp@(-8),%d2 4bb10: 4280 clrl %d0 4bb12: 246e fffc moveal %fp@(-4),%a2 4bb16: 4e5e unlk %fp 4bb18: 4e75 rts ... 00046a08 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 46a08: 4e56 0000 linkw %fp,#0 46a0c: 2f0a movel %a2,%sp@- 46a0e: 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; 46a12: 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 ) { 46a16: 4a2a 0044 tstb %a2@(68) 46a1a: 6712 beqs 46a2e <_CORE_mutex_Surrender+0x26> if ( !_Thread_Is_executing( holder ) ) 46a1c: b1f9 0005 efbe cmpal 5efbe <_Thread_Executing>,%a0 46a22: 670a beqs 46a2e <_CORE_mutex_Surrender+0x26> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a24: 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 ) ) 46a28: 7003 moveq #3,%d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a2a: 4e5e unlk %fp 46a2c: 4e75 rts return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 46a2e: 202a 0052 movel %a2@(82),%d0 46a32: 6768 beqs 46a9c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 46a34: 5380 subql #1,%d0 46a36: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 46a3a: 6660 bnes 46a9c <_CORE_mutex_Surrender+0x94> 46a3c: 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 ) || 46a40: 7202 moveq #2,%d1 46a42: b280 cmpl %d0,%d1 46a44: 6700 0084 beqw 46aca <_CORE_mutex_Surrender+0xc2> 46a48: 123c 0003 moveb #3,%d1 46a4c: b280 cmpl %d0,%d1 46a4e: 677a beqs 46aca <_CORE_mutex_Surrender+0xc2> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 46a50: 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 ) || 46a54: 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; 46a56: 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 ) || 46a5a: b280 cmpl %d0,%d1 46a5c: 6748 beqs 46aa6 <_CORE_mutex_Surrender+0x9e> 46a5e: 123c 0003 moveb #3,%d1 46a62: b280 cmpl %d0,%d1 46a64: 6740 beqs 46aa6 <_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 ) ) ) { 46a66: 2f0a movel %a2,%sp@- 46a68: 4eb9 0004 81a8 jsr 481a8 <_Thread_queue_Dequeue> 46a6e: 588f addql #4,%sp 46a70: 2040 moveal %d0,%a0 46a72: 4a80 tstl %d0 46a74: 6700 0090 beqw 46b06 <_CORE_mutex_Surrender+0xfe> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a78: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 46a7a: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a80: 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; 46a84: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 46a88: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 46a8c: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a90: b280 cmpl %d0,%d1 46a92: 6764 beqs 46af8 <_CORE_mutex_Surrender+0xf0> 46a94: 123c 0003 moveb #3,%d1 46a98: b280 cmpl %d0,%d1 46a9a: 6734 beqs 46ad0 <_CORE_mutex_Surrender+0xc8> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a9c: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46aa0: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aa2: 4e5e unlk %fp 46aa4: 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 && 46aa6: 4aa8 001c tstl %a0@(28) 46aaa: 66ba bnes 46a66 <_CORE_mutex_Surrender+0x5e> holder->real_priority != holder->current_priority ) { 46aac: 2028 0018 movel %a0@(24),%d0 46ab0: b0a8 0014 cmpl %a0@(20),%d0 46ab4: 67b0 beqs 46a66 <_CORE_mutex_Surrender+0x5e> _Thread_Change_priority( holder, holder->real_priority, true ); 46ab6: 4878 0001 pea 1 46aba: 2f00 movel %d0,%sp@- 46abc: 2f08 movel %a0,%sp@- 46abe: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 46ac4: 4fef 000c lea %sp@(12),%sp 46ac8: 609c bras 46a66 <_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--; 46aca: 53a8 001c subql #1,%a0@(28) 46ace: 6080 bras 46a50 <_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++; 46ad0: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 46ad4: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 46ad8: b0a8 0014 cmpl %a0@(20),%d0 46adc: 64be bccs 46a9c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 46ade: 42a7 clrl %sp@- 46ae0: 2f00 movel %d0,%sp@- 46ae2: 2f08 movel %a0,%sp@- 46ae4: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aea: 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( 46aee: 4fef 000c lea %sp@(12),%sp 46af2: 4280 clrl %d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46af4: 4e5e unlk %fp 46af6: 4e75 rts 46af8: 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++; 46afc: 4280 clrl %d0 46afe: 52a8 001c addql #1,%a0@(28) } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b02: 4e5e unlk %fp 46b04: 4e75 rts } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46b06: 7001 moveq #1,%d0 46b08: 2540 004e movel %d0,%a2@(78) return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b0c: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46b10: 4200 clrb %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b12: 4e5e unlk %fp 46b14: 4e75 rts ... 00046b24 <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 46b24: 4e56 0000 linkw %fp,#0 46b28: 226e 000c moveal %fp@(12),%a1 the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize( 46b2c: 4878 0003 pea 3 46b30: 4878 0200 pea 200 void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 46b34: 206e 0008 moveal %fp@(8),%a0 the_semaphore->Attributes = *the_semaphore_attributes; 46b38: 2011 movel %a1@,%d0 46b3a: 2229 0004 movel %a1@(4),%d1 the_semaphore->count = initial_value; 46b3e: 216e 0010 0048 movel %fp@(16),%a0@(72) CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes; 46b44: 2140 0040 movel %d0,%a0@(64) 46b48: 2141 0044 movel %d1,%a0@(68) the_semaphore->count = initial_value; _Thread_queue_Initialize( 46b4c: 7201 moveq #1,%d1 46b4e: b2a9 0004 cmpl %a1@(4),%d1 46b52: 57c0 seq %d0 46b54: 49c0 extbl %d0 46b56: 4480 negl %d0 46b58: 2f00 movel %d0,%sp@- 46b5a: 2f08 movel %a0,%sp@- 46b5c: 4eb9 0004 8584 jsr 48584 <_Thread_queue_Initialize> 46b62: 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 ); } 46b66: 4e5e unlk %fp 46b68: 4e75 rts ... 0004f8b8 <_CORE_semaphore_Seize>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4f8b8: 203c 0000 0700 movel #1792,%d0 CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4f8be: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4f8c2: 2279 0006 405a moveal 6405a <_Thread_Executing>,%a1 CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4f8c8: 48d7 001c moveml %d2-%d4,%sp@ 4f8cc: 282e 000c movel %fp@(12),%d4 4f8d0: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 4f8d4: 42a9 0034 clrl %a1@(52) CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4f8d8: 206e 0008 moveal %fp@(8),%a0 4f8dc: 242e 0010 movel %fp@(16),%d2 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4f8e0: 40c1 movew %sr,%d1 4f8e2: 8081 orl %d1,%d0 4f8e4: 46c0 movew %d0,%sr if ( the_semaphore->count != 0 ) { 4f8e6: 2028 0048 movel %a0@(72),%d0 4f8ea: 6642 bnes 4f92e <_CORE_semaphore_Seize+0x76> /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 4f8ec: 4a02 tstb %d2 4f8ee: 6610 bnes 4f900 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 4f8f0: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 4f8f2: 7001 moveq #1,%d0 _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 4f8f4: 4cd7 001c moveml %sp@,%d2-%d4 * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 4f8f8: 2340 0034 movel %d0,%a1@(52) _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 4f8fc: 4e5e unlk %fp 4f8fe: 4e75 rts 4f900: 7001 moveq #1,%d0 * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; 4f902: 2344 0020 movel %d4,%a1@(32) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 4f906: 2348 0044 movel %a0,%a1@(68) 4f90a: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4f90e: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 4f910: 2d43 000c movel %d3,%fp@(12) 4f914: 203c 0004 bd10 movel #310544,%d0 4f91a: 2d48 0008 movel %a0,%fp@(8) 4f91e: 2d40 0010 movel %d0,%fp@(16) } 4f922: 4cd7 001c moveml %sp@,%d2-%d4 4f926: 4e5e unlk %fp */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 4f928: 4ef9 0004 b9b0 jmp 4b9b0 <_Thread_queue_Enqueue_with_handler> executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 4f92e: 5380 subql #1,%d0 4f930: 2140 0048 movel %d0,%a0@(72) _ISR_Enable( level ); 4f934: 46c1 movew %d1,%sr _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 4f936: 4cd7 001c moveml %sp@,%d2-%d4 4f93a: 4e5e unlk %fp 4f93c: 4e75 rts ... 00046b6c <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 46b6c: 4e56 0000 linkw %fp,#0 46b70: 2f0a movel %a2,%sp@- 46b72: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b76: 2f0a movel %a2,%sp@- 46b78: 4eb9 0004 81a8 jsr 481a8 <_Thread_queue_Dequeue> 46b7e: 588f addql #4,%sp 46b80: 4a80 tstl %d0 46b82: 670a beqs 46b8e <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b84: 246e fffc moveal %fp@(-4),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b88: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b8a: 4e5e unlk %fp 46b8c: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b8e: 203c 0000 0700 movel #1792,%d0 46b94: 40c1 movew %sr,%d1 46b96: 8081 orl %d1,%d0 46b98: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b9a: 202a 0048 movel %a2@(72),%d0 46b9e: b0aa 0040 cmpl %a2@(64),%d0 46ba2: 6412 bccs 46bb6 <_CORE_semaphore_Surrender+0x4a> the_semaphore->count += 1; 46ba4: 5280 addql #1,%d0 46ba6: 2540 0048 movel %d0,%a2@(72) 46baa: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bac: 46c1 movew %d1,%sr } return status; } 46bae: 246e fffc moveal %fp@(-4),%a2 46bb2: 4e5e unlk %fp 46bb4: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46bb6: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bb8: 46c1 movew %d1,%sr <== NOT EXECUTED 46bba: 60f2 bras 46bae <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED 0004762c <_CORE_spinlock_Initialize>: void _CORE_spinlock_Initialize( CORE_spinlock_Control *the_spinlock, CORE_spinlock_Attributes *the_spinlock_attributes ) { 4762c: 4e56 0000 linkw %fp,#0 47630: 206e 0008 moveal %fp@(8),%a0 47634: 226e 000c moveal %fp@(12),%a1 the_spinlock->Attributes = *the_spinlock_attributes; the_spinlock->lock = 0; the_spinlock->users = 0; the_spinlock->holder = 0; } 47638: 4e5e unlk %fp CORE_spinlock_Control *the_spinlock, CORE_spinlock_Attributes *the_spinlock_attributes ) { the_spinlock->Attributes = *the_spinlock_attributes; 4763a: 2091 movel %a1@,%a0@ the_spinlock->lock = 0; 4763c: 42a8 0004 clrl %a0@(4) the_spinlock->users = 0; 47640: 42a8 0008 clrl %a0@(8) the_spinlock->holder = 0; 47644: 42a8 000c clrl %a0@(12) } 47648: 4e75 rts ... 0004764c <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 4764c: 203c 0000 0700 movel #1792,%d0 */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 47652: 4e56 0000 linkw %fp,#0 47656: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 4765a: 40c1 movew %sr,%d1 4765c: 8081 orl %d1,%d0 4765e: 46c0 movew %d0,%sr /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 47660: 2028 0004 movel %a0@(4),%d0 47664: 660a bnes 47670 <_CORE_spinlock_Release+0x24> _ISR_Enable( level ); 47666: 46c1 movew %d1,%sr 47668: 103c 0006 moveb #6,%d0 the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 4766c: 4e5e unlk %fp 4766e: 4e75 rts } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 47670: 2028 000c movel %a0@(12),%d0 47674: 2279 0006 014e moveal 6014e <_Thread_Executing>,%a1 4767a: b0a9 0008 cmpl %a1@(8),%d0 4767e: 6708 beqs 47688 <_CORE_spinlock_Release+0x3c> _ISR_Enable( level ); 47680: 46c1 movew %d1,%sr 47682: 7002 moveq #2,%d0 the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 47684: 4e5e unlk %fp 47686: 4e75 rts } /* * Let it be unlocked. */ the_spinlock->users -= 1; 47688: 2028 0008 movel %a0@(8),%d0 4768c: 5380 subql #1,%d0 4768e: 2140 0008 movel %d0,%a0@(8) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 47692: 42a8 0004 clrl %a0@(4) the_spinlock->holder = 0; 47696: 42a8 000c clrl %a0@(12) _ISR_Enable( level ); 4769a: 46c1 movew %d1,%sr 4769c: 4280 clrl %d0 return CORE_SPINLOCK_SUCCESSFUL; } 4769e: 4e5e unlk %fp 476a0: 4e75 rts ... 000476a4 <_CORE_spinlock_Wait>: ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 476a4: 203c 0000 0700 movel #1792,%d0 CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 476aa: 4e56 fff0 linkw %fp,#-16 476ae: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 476b2: 246e 0008 moveal %fp@(8),%a2 476b6: 142e 000f moveb %fp@(15),%d2 ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 476ba: 40c1 movew %sr,%d1 476bc: 8081 orl %d1,%d0 476be: 46c0 movew %d0,%sr if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 476c0: 202a 0004 movel %a2@(4),%d0 476c4: 7601 moveq #1,%d3 476c6: b680 cmpl %d0,%d3 476c8: 6762 beqs 4772c <_CORE_spinlock_Wait+0x88> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 476ca: 202a 0008 movel %a2@(8),%d0 476ce: 5280 addql #1,%d0 476d0: 2540 0008 movel %d0,%a2@(8) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 476d4: 202a 0004 movel %a2@(4),%d0 476d8: 6730 beqs 4770a <_CORE_spinlock_Wait+0x66> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 476da: 4a02 tstb %d2 476dc: 676c beqs 4774a <_CORE_spinlock_Wait+0xa6> 476de: 47f9 0004 88e4 lea 488e4 <_Thread_Enable_dispatch>,%a3 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 476e4: 243c 0000 0700 movel #1792,%d2 * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 476ea: 46c1 movew %d1,%sr /* An ISR could occur here */ _Thread_Enable_dispatch(); 476ec: 4e93 jsr %a3@ 476ee: 2039 0006 0094 movel 60094 <_Thread_Dispatch_disable_level>,%d0 476f4: 5280 addql #1,%d0 476f6: 23c0 0006 0094 movel %d0,60094 <_Thread_Dispatch_disable_level> /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 476fc: 2002 movel %d2,%d0 476fe: 40c1 movew %sr,%d1 47700: 8081 orl %d1,%d0 47702: 46c0 movew %d0,%sr _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 47704: 202a 0004 movel %a2@(4),%d0 47708: 66e0 bnes 476ea <_CORE_spinlock_Wait+0x46> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 4770a: 7001 moveq #1,%d0 the_spinlock->holder = _Thread_Executing->Object.id; 4770c: 2079 0006 014e moveal 6014e <_Thread_Executing>,%a0 return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 47712: 2540 0004 movel %d0,%a2@(4) the_spinlock->holder = _Thread_Executing->Object.id; 47716: 2028 0008 movel %a0@(8),%d0 4771a: 2540 000c movel %d0,%a2@(12) _ISR_Enable( level ); 4771e: 46c1 movew %d1,%sr 47720: 4280 clrl %d0 _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 47722: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47728: 4e5e unlk %fp 4772a: 4e75 rts Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { 4772c: 202a 000c movel %a2@(12),%d0 47730: 2079 0006 014e moveal 6014e <_Thread_Executing>,%a0 47736: b0a8 0008 cmpl %a0@(8),%d0 4773a: 668e bnes 476ca <_CORE_spinlock_Wait+0x26> _ISR_Enable( level ); 4773c: 46c1 movew %d1,%sr 4773e: 7001 moveq #1,%d0 _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 47740: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47746: 4e5e unlk %fp 47748: 4e75 rts /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 4774a: 202a 0008 movel %a2@(8),%d0 4774e: 5380 subql #1,%d0 47750: 2540 0008 movel %d0,%a2@(8) _ISR_Enable( level ); 47754: 46c1 movew %d1,%sr 47756: 7005 moveq #5,%d0 _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 47758: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4775e: 4e5e unlk %fp 47760: 4e75 rts ... 00046798 <_Chain_Append>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 46798: 203c 0000 0700 movel #1792,%d0 void _Chain_Append( Chain_Control *the_chain, Chain_Node *node ) { 4679e: 4e56 0000 linkw %fp,#0 467a2: 206e 000c moveal %fp@(12),%a0 467a6: 2f0a movel %a2,%sp@- 467a8: 226e 0008 moveal %fp@(8),%a1 ISR_Level level; _ISR_Disable( level ); 467ac: 40c1 movew %sr,%d1 467ae: 8081 orl %d1,%d0 467b0: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 467b2: 2009 movel %a1,%d0 467b4: 5880 addql #4,%d0 467b6: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 467b8: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 467bc: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 467c0: 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; 467c4: 2488 movel %a0,%a2@ _Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level ); 467c6: 46c1 movew %d1,%sr } 467c8: 245f moveal %sp@+,%a2 467ca: 4e5e unlk %fp 467cc: 4e75 rts ... 0004b92c <_Chain_Extract>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4b92c: 203c 0000 0700 movel #1792,%d0 */ void _Chain_Extract( Chain_Node *node ) { 4b932: 4e56 0000 linkw %fp,#0 4b936: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 4b93a: 40c1 movew %sr,%d1 4b93c: 8081 orl %d1,%d0 4b93e: 46c0 movew %d0,%sr { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4b940: 2268 0004 moveal %a0@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b944: 2050 moveal %a0@,%a0 previous = the_node->previous; next->previous = previous; previous->next = next; 4b946: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b948: 2149 0004 movel %a1,%a0@(4) _Chain_Extract_unprotected( node ); _ISR_Enable( level ); 4b94c: 46c1 movew %d1,%sr } 4b94e: 4e5e unlk %fp 4b950: 4e75 rts ... 0004b954 <_Chain_Get>: { ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4b954: 203c 0000 0700 movel #1792,%d0 */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 4b95a: 4e56 0000 linkw %fp,#0 4b95e: 226e 0008 moveal %fp@(8),%a1 4b962: 2f0a movel %a2,%sp@- ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4b964: 40c1 movew %sr,%d1 4b966: 8081 orl %d1,%d0 4b968: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b96a: 2049 moveal %a1,%a0 4b96c: 2018 movel %a0@+,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b96e: b1c0 cmpal %d0,%a0 4b970: 6712 beqs 4b984 <_Chain_Get+0x30> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4b972: 2440 moveal %d0,%a2 4b974: 2052 moveal %a2@,%a0 the_chain->first = new_first; 4b976: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4b978: 2149 0004 movel %a1,%a0@(4) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 4b97c: 46c1 movew %d1,%sr return return_node; } 4b97e: 245f moveal %sp@+,%a2 4b980: 4e5e unlk %fp 4b982: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b984: 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 ); 4b986: 46c1 movew %d1,%sr return return_node; } 4b988: 245f moveal %sp@+,%a2 4b98a: 4e5e unlk %fp 4b98c: 4e75 rts ... 0004b4fc <_Event_Manager_initialization>: * * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { 4b4fc: 4e56 0000 linkw %fp,#0 */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 4b500: 4e5e unlk %fp * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4b502: 42b9 0005 f752 clrl 5f752 <_Event_Sync_state> */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 4b508: 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 efbe moveal 5efbe <_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 010a moveal %a2@(266),%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 f752 movel %d2,5f752 <_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 8710 jsr 48710 <_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 f752 movel 5f752 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45758: 42b9 0005 f752 clrl 5f752 <_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 7834 jmp 47834 <_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 efdc pea 5efdc <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8f4c jsr 48f4c <_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 8710 jsr 48710 <_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 f752 movel 5f752 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 457fa: 42b9 0005 f752 clrl 5f752 <_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 010a moveal %a2@(266),%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 ef9e moveal 5ef9e <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 efbe cmpal 5efbe <_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 79e8 jsr 479e8 <_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 9094 jsr 49094 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 79e8 jsr 479e8 <_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 f752 moveal 5f752 <_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 f752 moveal 5f752 <_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 f752 movel %d0,5f752 <_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 7de4 jsr 47de4 <_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 efbe cmpl 5efbe <_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 79e8 jsr 479e8 <_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 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 ef04 movel %d0,5ef04 <_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 f752 movel 5f752 <_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 <== NOT EXECUTED 45a16: 2040 moveal %d0,%a0 <== NOT EXECUTED #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 <== NOT EXECUTED } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a1a: 2143 0034 movel %d3,%a0@(52) <== NOT EXECUTED #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 f752 movel %d1,5f752 <_Event_Sync_state> <== NOT EXECUTED } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 45a24: 46c2 movew %d2,%sr <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45a26: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 45a2c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45a2e: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45a34: 508f addql #8,%sp <== NOT EXECUTED 45a36: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 45a3c: 5380 subql #1,%d0 <== NOT EXECUTED 45a3e: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level><== NOT EXECUTED 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> <== NOT EXECUTED ... 0004bc54 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4bc54: 4e56 ffcc linkw %fp,#-52 4bc58: 226e 000c moveal %fp@(12),%a1 4bc5c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4bc60: 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; 4bc64: 2c09 movel %a1,%d6 4bc66: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4bc68: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4bc6c: 222e 0010 movel %fp@(16),%d1 4bc70: 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; 4bc74: 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; 4bc78: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4bc7c: bc89 cmpl %a1,%d6 4bc7e: 6500 0146 bcsw 4bdc6 <_Heap_Allocate_aligned_with_boundary+0x172> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4bc82: 4a84 tstl %d4 4bc84: 6600 013c bnew 4bdc2 <_Heap_Allocate_aligned_with_boundary+0x16e> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bc88: b1ca cmpal %a2,%a0 4bc8a: 6700 0152 beqw 4bdde <_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; 4bc8e: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bc92: 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; 4bc94: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bc96: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bc98: 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; 4bc9a: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bc9e: 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 ) { 4bca2: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4bca6: 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 ) { 4bca8: b086 cmpl %d6,%d0 4bcaa: 630e blss 4bcba <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4bcac: 4a81 tstl %d1 4bcae: 6628 bnes 4bcd8 <_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; 4bcb0: 2408 movel %a0,%d2 4bcb2: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4bcb4: 4a82 tstl %d2 4bcb6: 6600 00ee bnew 4bda6 <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4bcba: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bcbe: b1ca cmpal %a2,%a0 4bcc0: 66e0 bnes 4bca2 <_Heap_Allocate_aligned_with_boundary+0x4e> 4bcc2: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4bcc4: b6aa 0044 cmpl %a2@(68),%d3 4bcc8: 6304 blss 4bcce <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4bcca: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4bcce: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4bcd4: 4e5e unlk %fp 4bcd6: 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; 4bcd8: 7efe moveq #-2,%d7 4bcda: 4be8 0008 lea %a0@(8),%a5 4bcde: 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; 4bce0: 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; 4bce4: 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; 4bce6: 2a2e fff8 movel %fp@(-8),%d5 4bcea: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bcec: 242e fff4 movel %fp@(-12),%d2 4bcf0: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4bcf2: 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; 4bcf4: d085 addl %d5,%d0 4bcf6: 4c41 7005 remul %d1,%d5,%d7 4bcfa: 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 ) { 4bcfc: b480 cmpl %d0,%d2 4bcfe: 630a blss 4bd0a <_Heap_Allocate_aligned_with_boundary+0xb6> 4bd00: 2a00 movel %d0,%d5 4bd02: 4c41 5002 remul %d1,%d2,%d5 4bd06: 9082 subl %d2,%d0 4bd08: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4bd0a: 4a84 tstl %d4 4bd0c: 676c beqs 4bd7a <_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; 4bd0e: 2002 movel %d2,%d0 4bd10: d089 addl %a1,%d0 4bd12: 2e00 movel %d0,%d7 4bd14: 4c44 7005 remul %d4,%d5,%d7 4bd18: 2e00 movel %d0,%d7 4bd1a: 9e85 subl %d5,%d7 4bd1c: 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 ) { 4bd1e: be82 cmpl %d2,%d7 4bd20: 6358 blss 4bd7a <_Heap_Allocate_aligned_with_boundary+0x126> 4bd22: be80 cmpl %d0,%d7 4bd24: 6454 bccs 4bd7a <_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; 4bd26: 2e0d movel %a5,%d7 4bd28: 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 ) { 4bd2a: ba87 cmpl %d7,%d5 4bd2c: 658c bcss 4bcba <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4bd2e: 9a89 subl %a1,%d5 4bd30: 2005 movel %d5,%d0 4bd32: 2647 moveal %d7,%a3 4bd34: 4c41 0002 remul %d1,%d2,%d0 4bd38: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4bd3a: 2005 movel %d5,%d0 4bd3c: d089 addl %a1,%d0 4bd3e: 2405 movel %d5,%d2 4bd40: 2e00 movel %d0,%d7 4bd42: 4c44 7005 remul %d4,%d5,%d7 4bd46: 2e00 movel %d0,%d7 4bd48: 9e85 subl %d5,%d7 4bd4a: 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 ) { 4bd4c: be82 cmpl %d2,%d7 4bd4e: 632a blss 4bd7a <_Heap_Allocate_aligned_with_boundary+0x126> 4bd50: be80 cmpl %d0,%d7 4bd52: 6426 bccs 4bd7a <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4bd54: ba8b cmpl %a3,%d5 4bd56: 6500 ff62 bcsw 4bcba <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4bd5a: 9a89 subl %a1,%d5 4bd5c: 2005 movel %d5,%d0 4bd5e: 4c41 0002 remul %d1,%d2,%d0 4bd62: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4bd64: 2005 movel %d5,%d0 4bd66: d089 addl %a1,%d0 4bd68: 2405 movel %d5,%d2 4bd6a: 2e00 movel %d0,%d7 4bd6c: 4c44 7005 remul %d4,%d5,%d7 4bd70: 2e00 movel %d0,%d7 4bd72: 9e85 subl %d5,%d7 4bd74: 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 ) { 4bd76: be82 cmpl %d2,%d7 4bd78: 62d6 bhis 4bd50 <_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 ) { 4bd7a: b48d cmpl %a5,%d2 4bd7c: 6500 ff3c bcsw 4bcba <_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; 4bd80: 70f8 moveq #-8,%d0 4bd82: 9088 subl %a0,%d0 4bd84: 2a40 moveal %d0,%a5 4bd86: 2e02 movel %d2,%d7 4bd88: dbc2 addal %d2,%a5 4bd8a: 202e fffc movel %fp@(-4),%d0 4bd8e: 4c40 7005 remul %d0,%d5,%d7 4bd92: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4bd94: bbcc cmpal %a4,%a5 4bd96: 6400 ff1c bccw 4bcb4 <_Heap_Allocate_aligned_with_boundary+0x60> 4bd9a: 4a8d tstl %a5 4bd9c: 6600 ff1c bnew 4bcba <_Heap_Allocate_aligned_with_boundary+0x66> boundary ); } } if ( alloc_begin != 0 ) { 4bda0: 4a82 tstl %d2 4bda2: 6700 ff16 beqw 4bcba <_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 ); 4bda6: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4bda8: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4bdac: 2f02 movel %d2,%sp@- 4bdae: 2f08 movel %a0,%sp@- 4bdb0: 2f0a movel %a2,%sp@- 4bdb2: 4eb9 0004 6e94 jsr 46e94 <_Heap_Block_allocate> 4bdb8: 4fef 0010 lea %sp@(16),%sp 4bdbc: 2002 movel %d2,%d0 4bdbe: 6000 ff04 braw 4bcc4 <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4bdc2: b889 cmpl %a1,%d4 4bdc4: 640c bccs 4bdd2 <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4bdc6: 4280 clrl %d0 } return (void *) alloc_begin; } 4bdc8: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4bdce: 4e5e unlk %fp 4bdd0: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4bdd2: 4a81 tstl %d1 4bdd4: 6600 feb2 bnew 4bc88 <_Heap_Allocate_aligned_with_boundary+0x34> 4bdd8: 2200 movel %d0,%d1 4bdda: 6000 feac braw 4bc88 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; } } while ( block != free_list_tail ) { 4bdde: 4283 clrl %d3 4bde0: 4280 clrl %d0 4bde2: 6000 fee0 braw 4bcc4 <_Heap_Allocate_aligned_with_boundary+0x70> ... 00046e94 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e94: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e96: 4e56 ffe0 linkw %fp,#-32 46e9a: 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; 46e9e: 2041 moveal %d1,%a0 46ea0: 5188 subql #8,%a0 46ea2: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46ea6: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46eaa: 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; 46eac: 2848 moveal %a0,%a4 46eae: 240a movel %a2,%d2 46eb0: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46eb2: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46eb6: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46eba: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46ebe: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46ec2: 4a03 tstb %d3 46ec4: 6600 00aa bnew 46f70 <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 46ec8: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46ecc: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 46ece: 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; 46ed2: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 46ed6: 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; 46ed8: 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 ); 46edc: 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; 46ee0: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46ee4: 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 ); 46ee8: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 46eec: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46ef0: b08c cmpl %a4,%d0 46ef2: 6200 0088 bhiw 46f7c <_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; 46ef6: 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 ) 46efa: 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 ) ) { 46efe: 7201 moveq #1,%d1 46f00: 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; 46f02: 2008 movel %a0,%d0 46f04: 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; 46f06: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 46f0a: c2aa 0004 andl %a2@(4),%d1 46f0e: 6700 0082 beqw 46f92 <_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; 46f12: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 46f14: 52ab 0038 addql #1,%a3@(56) 46f18: 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; 46f1a: 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; 46f1e: 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; 46f20: 7801 moveq #1,%d4 46f22: 8880 orl %d0,%d4 new_block->next = next; 46f24: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f28: d483 addl %d3,%d2 46f2a: 9488 subl %a0,%d2 new_block->prev = block_before; 46f2c: 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; 46f30: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 46f34: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 46f38: 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 ); 46f3c: 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; 46f3e: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46f40: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f44: 2f05 movel %d5,%sp@- 46f46: 2f01 movel %d1,%sp@- 46f48: 2f08 movel %a0,%sp@- 46f4a: 2f0b movel %a3,%sp@- 46f4c: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46f52: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 46f56: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 46f5a: b0ab 0034 cmpl %a3@(52),%d0 46f5e: 6404 bccs 46f64 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 46f60: 2740 0034 movel %d0,%a3@(52) } return block; } 46f64: 200a movel %a2,%d0 46f66: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f6c: 4e5e unlk %fp 46f6e: 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 ) { 46f70: 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 ); 46f74: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 46f76: b08c cmpl %a4,%d0 46f78: 6300 ff7c blsw 46ef6 <_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 ); 46f7c: 4874 5800 pea %a4@(00000000,%d5:l) 46f80: 2f09 movel %a1,%sp@- 46f82: 2f0a movel %a2,%sp@- 46f84: 2f0b movel %a3,%sp@- 46f86: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46f8c: 4fef 0010 lea %sp@(16),%sp 46f90: 60c4 bras 46f56 <_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); 46f92: 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; 46f94: 78fe moveq #-2,%d4 46f96: 2209 movel %a1,%d1 46f98: c8aa 0004 andl %a2@(4),%d4 46f9c: 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; 46f9e: 78fe moveq #-2,%d4 46fa0: 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; 46fa2: 7801 moveq #1,%d4 46fa4: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46fa6: d483 addl %d3,%d2 46fa8: 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; 46faa: 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 ); 46fae: 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; 46fb0: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46fb2: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46fb6: 2f05 movel %d5,%sp@- 46fb8: 2f01 movel %d1,%sp@- 46fba: 2f08 movel %a0,%sp@- 46fbc: 2f0b movel %a3,%sp@- 46fbe: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46fc4: 4fef 0010 lea %sp@(16),%sp 46fc8: 608c bras 46f56 <_Heap_Block_allocate+0xc2> ... 00050d5c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50d5c: 4e56 fff4 linkw %fp,#-12 50d60: 206e 0008 moveal %fp@(8),%a0 50d64: 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; 50d68: 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; 50d6c: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50d70: 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; 50d74: b0a8 0018 cmpl %a0@(24),%d0 50d78: 6410 bccs 50d8a <_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 ) { 50d7a: b280 cmpl %d0,%d1 50d7c: 671c beqs 50d9a <_Heap_Extend+0x3e> 50d7e: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50d80: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50d86: 4e5e unlk %fp 50d88: 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 ) { 50d8a: b280 cmpl %d0,%d1 50d8c: 63ec blss 50d7a <_Heap_Extend+0x1e> 50d8e: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50d90: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50d96: 4e5e unlk %fp 50d98: 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; 50d9a: 2200 movel %d0,%d1 50d9c: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 50da0: 70f8 moveq #-8,%d0 50da2: 9089 subl %a1,%d0 50da4: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 50da6: 2600 movel %d0,%d3 50da8: 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; 50dae: 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; 50db2: 246e 0014 moveal %fp@(20),%a2 50db6: 9082 subl %d2,%d0 50db8: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50dba: b0a8 0014 cmpl %a0@(20),%d0 50dbe: 640c bccs 50dcc <_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 )); 50dc0: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 50dc2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50dc8: 4e5e unlk %fp 50dca: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50dcc: 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); 50dce: 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; 50dd2: 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 = 50dd6: 2228 0020 movel %a0@(32),%d1 50dda: 928a subl %a2,%d1 50ddc: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 50dde: 214a 0024 movel %a2,%a0@(36) 50de2: 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 = 50de6: 7401 moveq #1,%d2 50de8: 8481 orl %d1,%d2 50dea: 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 )); 50dee: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 50df2: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 50df6: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 50dfa: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50dfe: 2f08 movel %a0,%sp@- 50e00: 4eb9 0004 b5ec jsr 4b5ec <_Heap_Free> 50e06: 508f addql #8,%sp 50e08: 4280 clrl %d0 50e0a: 60b6 bras 50dc2 <_Heap_Extend+0x66> 0004bde8 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4bde8: 4e56 ffe4 linkw %fp,#-28 4bdec: 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 ) 4bdf0: 2040 moveal %d0,%a0 4bdf2: 5188 subql #8,%a0 4bdf4: 226e 0008 moveal %fp@(8),%a1 4bdf8: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4bdfe: 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; 4be02: 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 ) 4be06: 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 4be08: b088 cmpl %a0,%d0 4be0a: 6200 00a0 bhiw 4beac <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4be0e: 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 4be12: b288 cmpl %a0,%d1 4be14: 6500 0096 bcsw 4beac <_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; 4be18: 2628 0004 movel %a0@(4),%d3 4be1c: 74fe moveq #-2,%d2 4be1e: 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); 4be20: 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 4be24: b5c0 cmpal %d0,%a2 4be26: 6500 0084 bcsw 4beac <_Heap_Free+0xc4> 4be2a: b5c1 cmpal %d1,%a2 4be2c: 627e bhis 4beac <_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; 4be2e: 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 ) ) { 4be32: 7a01 moveq #1,%d5 4be34: ca84 andl %d4,%d5 4be36: 4a05 tstb %d5 4be38: 6772 beqs 4beac <_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; 4be3a: 7afe moveq #-2,%d5 4be3c: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4be3e: b5c1 cmpal %d1,%a2 4be40: 6700 00fa beqw 4bf3c <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4be44: 7a01 moveq #1,%d5 4be46: 7c01 moveq #1,%d6 4be48: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4be4c: 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 ) ) { 4be4e: 7c01 moveq #1,%d6 4be50: c686 andl %d6,%d3 4be52: 4a03 tstb %d3 4be54: 6660 bnes 4beb6 <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4be56: 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); 4be58: 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 4be5a: b1c0 cmpal %d0,%a0 4be5c: 654e bcss 4beac <_Heap_Free+0xc4> 4be5e: b1c1 cmpal %d1,%a0 4be60: 624a bhis 4beac <_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) ) { 4be62: 7001 moveq #1,%d0 4be64: c0a8 0004 andl %a0@(4),%d0 4be68: 4a00 tstb %d0 4be6a: 6740 beqs 4beac <_Heap_Free+0xc4> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4be6c: 4a05 tstb %d5 4be6e: 6700 00d2 beqw 4bf42 <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4be72: 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; 4be76: 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; 4be7a: d882 addl %d2,%d4 4be7c: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4be7e: 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; 4be80: 246a 0008 moveal %a2@(8),%a2 4be84: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4be86: 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; 4be8a: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4be8e: 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; 4be92: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4be96: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4be9a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4be9e: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4bea2: 7001 moveq #1,%d0 return( true ); } 4bea4: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4bea8: 4e5e unlk %fp 4beaa: 4e75 rts 4beac: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4beb0: 4200 clrb %d0 } 4beb2: 4e5e unlk %fp 4beb4: 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 */ 4beb6: 4a05 tstb %d5 4beb8: 6736 beqs 4bef0 <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4beba: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4bebe: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4bec0: 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; 4bec2: 246a 0008 moveal %a2@(8),%a2 4bec6: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4bec8: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4becc: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4bed0: 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; 4bed4: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bed8: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bedc: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bee0: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4bee4: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4bee6: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4beea: 2748 0008 movel %a0,%a3@(8) 4beee: 60b4 bras 4bea4 <_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; 4bef0: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4bef2: 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; 4bef4: 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; 4bef6: 2669 0008 moveal %a1@(8),%a3 4befa: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4befe: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4bf02: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4bf04: 2029 0038 movel %a1@(56),%d0 4bf08: 5280 addql #1,%d0 new_block->next = next; 4bf0a: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4bf0e: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4bf12: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4bf16: 2748 000c movel %a0,%a3@(12) 4bf1a: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4bf1e: b0a9 003c cmpl %a1@(60),%d0 4bf22: 6300 ff72 blsw 4be96 <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bf26: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bf2a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bf2e: 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; 4bf32: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bf36: 7001 moveq #1,%d0 4bf38: 6000 ff6a braw 4bea4 <_Heap_Free+0xbc> _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4bf3c: 4205 clrb %d5 4bf3e: 6000 ff0e braw 4be4e <_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; 4bf42: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4bf44: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4bf46: 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; 4bf48: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4bf4a: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bf4c: 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; 4bf4e: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4bf52: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bf56: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bf5a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bf5e: 52a9 0050 addql #1,%a1@(80) 4bf62: 6000 ff40 braw 4bea4 <_Heap_Free+0xbc> ... 0007bf40 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 7bf40: 4e56 fff4 linkw %fp,#-12 7bf44: 206e 0008 moveal %fp@(8),%a0 7bf48: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7bf4c: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 7bf50: 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; 7bf54: 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; 7bf58: 4292 clrl %a2@ the_info->Free.total = 0; 7bf5a: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 7bf5e: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 7bf62: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 7bf66: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 7bf6a: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 7bf6e: b489 cmpl %a1,%d2 7bf70: 6746 beqs 7bfb8 <_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; 7bf72: 260a movel %a2,%d3 7bf74: 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 ) { 7bf7a: 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; 7bf7e: 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) ) 7bf80: 204a moveal %a2,%a0 7bf82: 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); 7bf84: 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; 7bf86: 2229 0004 movel %a1@(4),%d1 7bf8a: 0801 0000 btst #0,%d1 7bf8e: 6702 beqs 7bf92 <_Heap_Get_information+0x52> 7bf90: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 7bf92: 5290 addql #1,%a0@ info->total += the_size; 7bf94: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 7bf98: b0a8 0004 cmpl %a0@(4),%d0 7bf9c: 6304 blss 7bfa2 <_Heap_Get_information+0x62> info->largest = the_size; 7bf9e: 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 ) { 7bfa2: b3c2 cmpal %d2,%a1 7bfa4: 66d8 bnes 7bf7e <_Heap_Get_information+0x3e> 7bfa6: 202a 0014 movel %a2@(20),%d0 7bfaa: 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; 7bfac: 2540 0014 movel %d0,%a2@(20) } 7bfb0: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7bfb4: 4e5e unlk %fp 7bfb6: 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 ) { 7bfb8: 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; 7bfba: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 7bfbe: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7bfc2: 4e5e unlk %fp <== NOT EXECUTED 7bfc4: 4e75 rts <== NOT EXECUTED ... 0005b9e0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 5b9e0: 4e56 ffe0 linkw %fp,#-32 5b9e4: 226e 0014 moveal %fp@(20),%a1 5b9e8: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5b9ec: 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 ) 5b9f0: 2202 movel %d2,%d1 5b9f2: 2042 moveal %d2,%a0 5b9f4: 5188 subql #8,%a0 5b9f6: 246e 0008 moveal %fp@(8),%a2 5b9fa: 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; 5ba00: 4291 clrl %a1@ void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 5ba02: 266e 0018 moveal %fp@(24),%a3 5ba06: 91c0 subal %d0,%a0 5ba08: 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; 5ba0c: 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 5ba0e: b1ea 0020 cmpal %a2@(32),%a0 5ba12: 653c bcss 5ba50 <_Heap_Resize_block+0x70> 5ba14: b1ea 0024 cmpal %a2@(36),%a0 5ba18: 6236 bhis 5ba50 <_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; 5ba1a: 76fe moveq #-2,%d3 5ba1c: 78fe moveq #-2,%d4 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 5ba1e: 7a01 moveq #1,%d5 5ba20: 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; 5ba22: 7204 moveq #4,%d1 5ba24: 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; 5ba26: 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; 5ba2a: 49f0 3800 lea %a0@(00000000,%d3:l),%a4 uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5ba2e: d28c addl %a4,%d1 5ba30: c8ac 0004 andl %a4@(4),%d4 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 5ba34: 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; 5ba38: 2281 movel %d1,%a1@ 5ba3a: bd85 eorl %d6,%d5 5ba3c: 1c05 moveb %d5,%d6 if ( next_block_is_free ) { 5ba3e: 661c bnes 5ba5c <_Heap_Resize_block+0x7c> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 5ba40: b280 cmpl %d0,%d1 5ba42: 6420 bccs 5ba64 <_Heap_Resize_block+0x84> 5ba44: 7001 moveq #1,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5ba46: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5ba4c: 4e5e unlk %fp 5ba4e: 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; 5ba50: 7002 moveq #2,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5ba52: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5ba58: 4e5e unlk %fp 5ba5a: 4e75 rts _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 5ba5c: d684 addl %d4,%d3 alloc_size += next_block_size; 5ba5e: d284 addl %d4,%d1 } if ( new_alloc_size > alloc_size ) { 5ba60: b280 cmpl %d0,%d1 5ba62: 65e0 bcss 5ba44 <_Heap_Resize_block+0x64> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 5ba64: 4a06 tstb %d6 5ba66: 672a beqs 5ba92 <_Heap_Resize_block+0xb2> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5ba68: 7201 moveq #1,%d1 5ba6a: 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; 5ba6e: 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; 5ba72: 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; 5ba74: 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; 5ba78: 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; 5ba7c: 7201 moveq #1,%d1 5ba7e: 83b0 3804 orl %d1,%a0@(00000004,%d3:l) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 5ba82: 2949 000c movel %a1,%a4@(12) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; 5ba86: 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; 5ba8a: 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; 5ba8e: 234c 0008 movel %a4,%a1@(8) stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 5ba92: 2f00 movel %d0,%sp@- 5ba94: 2f02 movel %d2,%sp@- 5ba96: 2f08 movel %a0,%sp@- 5ba98: 2f0a movel %a2,%sp@- 5ba9a: 4eb9 0004 6e94 jsr 46e94 <_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; 5baa0: 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; 5baa4: 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 ); 5baa6: 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; 5baa8: 2240 moveal %d0,%a1 5baaa: 93c2 subal %d2,%a1 /* Statistics */ ++stats->resizes; 5baac: 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; 5baae: c2a8 0004 andl %a0@(4),%d1 5bab2: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 5bab6: 2689 movel %a1,%a3@ /* Statistics */ ++stats->resizes; 5bab8: 52aa 0054 addql #1,%a2@(84) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5babc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5bac2: 4e5e unlk %fp 5bac4: 4e75 rts ... 00047e60 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 47e60: 4e56 0000 linkw %fp,#0 47e64: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 47e68: 4a2e 000f tstb %fp@(15) 47e6c: 6624 bnes 47e92 <_Heap_Walk_print+0x32> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); 47e6e: 2f00 movel %d0,%sp@- 47e70: 4879 0005 db10 pea 5db10 <_Status_Object_name_errors_to_status+0x420> 47e76: 4eb9 0004 3ad0 jsr 43ad0 47e7c: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 47e7e: 486e 0014 pea %fp@(20) 47e82: 2f2e 0010 movel %fp@(16),%sp@- 47e86: 4eb9 0004 595c jsr 4595c 47e8c: 508f addql #8,%sp va_end( ap ); } 47e8e: 4e5e unlk %fp 47e90: 4e75 rts static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); 47e92: 2f00 movel %d0,%sp@- 47e94: 4879 0005 db05 pea 5db05 <_Status_Object_name_errors_to_status+0x415> 47e9a: 4eb9 0004 3ad0 jsr 43ad0 47ea0: 508f addql #8,%sp } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 47ea2: 486e 0014 pea %fp@(20) 47ea6: 2f2e 0010 movel %fp@(16),%sp@- 47eaa: 4eb9 0004 595c jsr 4595c 47eb0: 508f addql #8,%sp va_end( ap ); } 47eb2: 4e5e unlk %fp 47eb4: 4e75 rts ... 000464a6 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 464a6: 4e56 fff0 linkw %fp,#-16 464aa: 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; 464ae: 2639 0005 d786 movel 5d786 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 464b4: 2439 0005 d782 movel 5d782 ,%d2 number_of_drivers = Configuration.maximum_drivers; 464ba: 2839 0005 d77e movel 5d77e ,%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 ) 464c0: b882 cmpl %d2,%d4 464c2: 6216 bhis 464da <_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; 464c4: 23c3 0005 f794 movel %d3,5f794 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 464ca: 23c2 0005 f790 movel %d2,5f790 <_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; } 464d0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464d6: 4e5e unlk %fp 464d8: 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 *) 464da: 2004 movel %d4,%d0 464dc: 2a04 movel %d4,%d5 464de: e788 lsll #3,%d0 464e0: eb8d lsll #5,%d5 464e2: 9a80 subl %d0,%d5 464e4: 2f05 movel %d5,%sp@- 464e6: 4eb9 0004 91b0 jsr 491b0 <_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( 464ec: 2f05 movel %d5,%sp@- 464ee: 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; 464f0: 23c4 0005 f790 movel %d4,5f790 <_IO_Number_of_drivers> memset( 464f6: 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 *) 464f8: 23c0 0005 f794 movel %d0,5f794 <_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( 464fe: 4eb9 0004 f41c jsr 4f41c _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46504: 4fef 0010 lea %sp@(16),%sp 46508: 4a82 tstl %d2 4650a: 67c4 beqs 464d0 <_IO_Manager_initialization+0x2a> 4650c: 2839 0005 f794 movel 5f794 <_IO_Driver_address_table>,%d4 46512: 4280 clrl %d0 46514: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 46516: 2243 moveal %d3,%a1 46518: 2044 moveal %d4,%a0 4651a: d3c0 addal %d0,%a1 4651c: 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++ ) 4651e: 5281 addql #1,%d1 46520: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46526: 20d9 movel %a1@+,%a0@+ 46528: 20d9 movel %a1@+,%a0@+ 4652a: 20d9 movel %a1@+,%a0@+ 4652c: 20d9 movel %a1@+,%a0@+ 4652e: 20d9 movel %a1@+,%a0@+ 46530: 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++ ) 46532: b282 cmpl %d2,%d1 46534: 649a bccs 464d0 <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 46536: 2243 moveal %d3,%a1 46538: 2044 moveal %d4,%a0 4653a: d3c0 addal %d0,%a1 4653c: 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++ ) 4653e: 5281 addql #1,%d1 46540: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46546: 20d9 movel %a1@+,%a0@+ 46548: 20d9 movel %a1@+,%a0@+ 4654a: 20d9 movel %a1@+,%a0@+ 4654c: 20d9 movel %a1@+,%a0@+ 4654e: 20d9 movel %a1@+,%a0@+ 46550: 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++ ) 46552: b282 cmpl %d2,%d1 46554: 65c0 bcss 46516 <_IO_Manager_initialization+0x70> 46556: 6000 ff78 braw 464d0 <_IO_Manager_initialization+0x2a> ... 00046fcc <_Internal_error_Occurred>: _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fcc: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fce: 4e56 0000 linkw %fp,#0 46fd2: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fd6: 1001 moveb %d1,%d0 46fd8: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fda: 2f03 movel %d3,%sp@- 46fdc: 202e 0008 movel %fp@(8),%d0 46fe0: 2f02 movel %d2,%sp@- 46fe2: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fe6: 2f02 movel %d2,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46fe8: 13c1 0005 efae moveb %d1,5efae <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fee: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46ff0: 23c0 0005 efaa movel %d0,5efaa <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46ff6: 2f00 movel %d0,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46ff8: 23c2 0005 efb0 movel %d2,5efb0 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46ffe: 4eb9 0004 8de2 jsr 48de2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47004: 307c 0700 moveaw #1792,%a0 47008: 2608 movel %a0,%d3 4700a: 40c0 movew %sr,%d0 4700c: 8083 orl %d3,%d0 4700e: 46c0 movew %d0,%sr 47010: 2002 movel %d2,%d0 <== NOT EXECUTED 47012: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47018: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 4701a: 7005 moveq #5,%d0 4701c: 4fef 000c lea %sp@(12),%sp 47020: 23c0 0005 f08c movel %d0,5f08c <_System_state_Current> 47026: 60fe bras 47026 <_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 7e94 lea 67e94 <_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 ... 00047090 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47090: 4e56 fff0 linkw %fp,#-16 47094: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47098: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 4709c: 4aaa 0014 tstl %a2@(20) 470a0: 660c bnes 470ae <_Objects_Allocate+0x1e> 470a2: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 470a4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470aa: 4e5e unlk %fp 470ac: 4e75 rts /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470ae: 240a movel %a2,%d2 470b0: 0682 0000 001c addil #28,%d2 470b6: 47f9 0004 b954 lea 4b954 <_Chain_Get>,%a3 470bc: 2f02 movel %d2,%sp@- 470be: 4e93 jsr %a3@ if ( information->auto_extend ) { 470c0: 588f addql #4,%sp 470c2: 4a2a 0010 tstb %a2@(16) 470c6: 67dc beqs 470a4 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 470c8: 4a80 tstl %d0 470ca: 6738 beqs 47104 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470cc: 2040 moveal %d0,%a0 470ce: 4281 clrl %d1 470d0: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470d2: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470d4: 362a 0008 movew %a2@(8),%d3 470d8: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470dc: 306a 0028 moveaw %a2@(40),%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470e0: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470e4: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470e6: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470e8: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 470ec: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470f0: 206a 002a moveal %a2@(42),%a0 470f4: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 470f6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470fc: 4e5e unlk %fp block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470fe: d1c1 addal %d1,%a0 47100: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 47102: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 47104: 2f0a movel %a2,%sp@- 47106: 4eb9 0004 714c jsr 4714c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 4710c: 2f02 movel %d2,%sp@- 4710e: 4e93 jsr %a3@ } if ( the_object ) { 47110: 508f addql #8,%sp 47112: 4a80 tstl %d0 47114: 66b6 bnes 470cc <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 47116: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4711c: 4e5e unlk %fp 4711e: 4e75 rts 00047120 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47120: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47122: 4e56 0000 linkw %fp,#0 47126: 226e 000c moveal %fp@(12),%a1 4712a: 206e 0008 moveal %fp@(8),%a0 4712e: 2f0a movel %a2,%sp@- 47130: 2468 0018 moveal %a0@(24),%a2 47134: 3029 000a movew %a1@(10),%d0 47138: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 4713c: 2d49 000c movel %a1,%fp@(12) } 47140: 245f moveal %sp@+,%a2 47142: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47144: 4ef9 0004 76a8 jmp 476a8 <_Objects_Namespace_remove> ... 0004714c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 4714c: 4e56 ffcc linkw %fp,#-52 47150: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47154: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 47158: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4715a: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 4715e: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47162: 4a88 tstl %a0 47164: 6700 022c beqw 47392 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47168: 322a 000e movew %a2@(14),%d1 4716c: 302a 0012 movew %a2@(18),%d0 47170: 3801 movew %d1,%d4 47172: 0284 0000 ffff andil #65535,%d4 47178: 88c0 divuw %d0,%d4 4717a: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47180: 6700 0224 beqw 473a6 <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47184: 4a90 tstl %a0@ 47186: 6700 021e beqw 473a6 <_Objects_Extend_information+0x25a> 4718a: 5888 addql #4,%a0 4718c: 2605 movel %d5,%d3 4718e: 4282 clrl %d2 47190: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 47196: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 47198: 5282 addql #1,%d2 4719a: b484 cmpl %d4,%d2 4719c: 6404 bccs 471a2 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 4719e: 4a98 tstl %a0@+ 471a0: 66f4 bnes 47196 <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 471a2: 0281 0000 ffff andil #65535,%d1 471a8: 2641 moveal %d1,%a3 471aa: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 471ac: b7fc 0000 ffff cmpal #65535,%a3 471b2: 6200 0186 bhiw 4733a <_Objects_Extend_information+0x1ee> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 471b6: 41ea 0014 lea %a2@(20),%a0 471ba: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 471be: 4a2a 0010 tstb %a2@(16) 471c2: 6700 0180 beqw 47344 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 471c6: 2f00 movel %d0,%sp@- 471c8: 4eb9 0004 91e4 jsr 491e4 <_Workspace_Allocate> if ( !new_object_block ) 471ce: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 471d0: 2c00 movel %d0,%d6 if ( !new_object_block ) 471d2: 6700 0166 beqw 4733a <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 471d6: 4280 clrl %d0 471d8: 302a 000e movew %a2@(14),%d0 471dc: b083 cmpl %d3,%d0 471de: 6200 00c4 bhiw 472a4 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 471e2: 2a44 moveal %d4,%a5 471e4: 528d addql #1,%a5 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 471e6: 200b movel %a3,%d0 471e8: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 471ec: d088 addl %a0,%d0 471ee: d085 addl %d5,%d0 471f0: e588 lsll #2,%d0 471f2: 2f00 movel %d0,%sp@- 471f4: 4eb9 0004 91e4 jsr 491e4 <_Workspace_Allocate> if ( !object_blocks ) { 471fa: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 471fc: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471fe: 4a80 tstl %d0 47200: 6700 01b2 beqw 473b4 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47204: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47206: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47208: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 4720a: 302a 000e movew %a2@(14),%d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 4720e: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47212: de8d addl %a5,%d7 47214: b085 cmpl %d5,%d0 47216: 6200 013c bhiw 47354 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4721a: 4a85 tstl %d5 4721c: 670c beqs 4722a <_Objects_Extend_information+0xde> information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 4721e: 2047 moveal %d7,%a0 47220: 4280 clrl %d0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 47222: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47224: 5280 addql #1,%d0 47226: b085 cmpl %d5,%d0 47228: 65f8 bcss 47222 <_Objects_Extend_information+0xd6> 4722a: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4722c: 4281 clrl %d1 4722e: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 47232: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 47236: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 47238: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 4723c: b283 cmpl %d3,%d1 4723e: 6310 blss 47250 <_Objects_Extend_information+0x104> 47240: 2247 moveal %d7,%a1 47242: 2003 movel %d3,%d0 47244: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 47248: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 4724a: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 4724c: b280 cmpl %d0,%d1 4724e: 62f8 bhis 47248 <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 47250: 203c 0000 0700 movel #1792,%d0 47256: 40c4 movew %sr,%d4 47258: 8084 orl %d4,%d0 4725a: 46c0 movew %d0,%sr information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4725c: 2012 movel %a2@,%d0 4725e: 7218 moveq #24,%d1 47260: 4285 clrl %d5 47262: e3a8 lsll %d1,%d0 47264: 3a0b movew %a3,%d5 47266: 4281 clrl %d1 47268: 2245 moveal %d5,%a1 4726a: 7a1b moveq #27,%d5 4726c: 322a 0004 movew %a2@(4),%d1 47270: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47274: 206a 002e moveal %a2@(46),%a0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47278: eba9 lsll %d5,%d1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 4727a: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 4727e: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47282: 8081 orl %d1,%d0 47284: 2209 movel %a1,%d1 47286: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 47288: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4728c: 2541 000a movel %d1,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 47290: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47294: 46c4 movew %d4,%sr if ( old_tables ) 47296: 4a88 tstl %a0 47298: 670a beqs 472a4 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4729a: 2f08 movel %a0,%sp@- 4729c: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 472a2: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472a4: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472a8: 4280 clrl %d0 472aa: 280e movel %fp,%d4 472ac: 0684 ffff fff4 addil #-12,%d4 472b2: 47f9 0004 b954 lea 4b954 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472b8: 2a0a movel %a2,%d5 472ba: 0685 0000 001c addil #28,%d5 472c0: 49f9 0004 6798 lea 46798 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472c6: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472c8: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472cc: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472d0: 2f2a 0014 movel %a2@(20),%sp@- 472d4: 2f00 movel %d0,%sp@- 472d6: 2f06 movel %d6,%sp@- 472d8: 2f04 movel %d4,%sp@- 472da: 4eb9 0004 b990 jsr 4b990 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 472e0: 4fef 0010 lea %sp@(16),%sp 472e4: 2f04 movel %d4,%sp@- 472e6: 4e93 jsr %a3@ 472e8: 588f addql #4,%sp 472ea: 4a80 tstl %d0 472ec: 6732 beqs 47320 <_Objects_Extend_information+0x1d4> the_object->id = _Objects_Build_id( 472ee: 2212 movel %a2@,%d1 472f0: 7c18 moveq #24,%d6 472f2: 7e1b moveq #27,%d7 472f4: 2040 moveal %d0,%a0 472f6: eda9 lsll %d6,%d1 472f8: 4286 clrl %d6 472fa: 3c2a 0004 movew %a2@(4),%d6 472fe: 08c1 0010 bset #16,%d1 47302: efae lsll %d7,%d6 47304: 8286 orl %d6,%d1 47306: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 47308: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 4730a: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4730e: 2f00 movel %d0,%sp@- 47310: 2f05 movel %d5,%sp@- 47312: 4e94 jsr %a4@ index++; 47314: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47316: 2f04 movel %d4,%sp@- 47318: 4e93 jsr %a3@ 4731a: 588f addql #4,%sp 4731c: 4a80 tstl %d0 4731e: 66ce bnes 472ee <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47320: 4280 clrl %d0 information->inactive = 47322: 322a 0028 movew %a2@(40),%d1 47326: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4732a: 206a 002a moveal %a2@(42),%a0 information->inactive = 4732e: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47330: 3009 movew %a1,%d0 information->inactive = 47332: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47336: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 4733a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47340: 4e5e unlk %fp 47342: 4e75 rts if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 47344: 2f00 movel %d0,%sp@- 47346: 4eb9 0004 91b0 jsr 491b0 <_Workspace_Allocate_or_fatal_error> 4734c: 588f addql #4,%sp 4734e: 2c00 movel %d0,%d6 47350: 6000 fe84 braw 471d6 <_Objects_Extend_information+0x8a> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 47354: e58c lsll #2,%d4 47356: 2f04 movel %d4,%sp@- 47358: 2f2a 002e movel %a2@(46),%sp@- 4735c: 2f0c movel %a4,%sp@- 4735e: 4eb9 0004 f3ac jsr 4f3ac information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47364: 2f04 movel %d4,%sp@- 47366: 2f2a 002a movel %a2@(42),%sp@- 4736a: 2f0d movel %a5,%sp@- 4736c: 4eb9 0004 f3ac jsr 4f3ac information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47372: 4280 clrl %d0 47374: 302a 000e movew %a2@(14),%d0 47378: da80 addl %d0,%d5 4737a: e58d lsll #2,%d5 4737c: 2f05 movel %d5,%sp@- 4737e: 2f2a 0018 movel %a2@(24),%sp@- 47382: 2f07 movel %d7,%sp@- 47384: 4eb9 0004 f3ac jsr 4f3ac 4738a: 4fef 0024 lea %sp@(36),%sp 4738e: 6000 fe9c braw 4722c <_Objects_Extend_information+0xe0> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47392: 4280 clrl %d0 47394: 2605 movel %d5,%d3 47396: 4282 clrl %d2 47398: 4284 clrl %d4 4739a: 322a 000e movew %a2@(14),%d1 4739e: 302a 0012 movew %a2@(18),%d0 473a2: 6000 fdfe braw 471a2 <_Objects_Extend_information+0x56> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 473a6: 2605 movel %d5,%d3 <== NOT EXECUTED 473a8: 4282 clrl %d2 <== NOT EXECUTED 473aa: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 473b0: 6000 fdf0 braw 471a2 <_Objects_Extend_information+0x56><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 473b4: 2f06 movel %d6,%sp@- 473b6: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> return; 473bc: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 473be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 473c4: 4e5e unlk %fp 473c6: 4e75 rts 00047478 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 47478: 4e56 0000 linkw %fp,#0 4747c: 2f02 movel %d2,%sp@- 4747e: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47482: 660a bnes 4748e <_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 ) 47484: 4280 clrl %d0 return NULL; #endif return info; } 47486: 242e fffc movel %fp@(-4),%d2 4748a: 4e5e unlk %fp 4748c: 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 ); 4748e: 2f2e 0008 movel %fp@(8),%sp@- 47492: 4eb9 0004 bf68 jsr 4bf68 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47498: 588f addql #4,%sp 4749a: 4a80 tstl %d0 4749c: 67e6 beqs 47484 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 4749e: b082 cmpl %d2,%d0 474a0: 65e2 bcss 47484 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 474a2: 202e 0008 movel %fp@(8),%d0 474a6: 41f9 0005 eebc lea 5eebc <_Objects_Information_table>,%a0 474ac: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 474b0: 4a88 tstl %a0 474b2: 67d0 beqs 47484 <_Objects_Get_information+0xc> return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 474b4: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 474b8: 67cc beqs 47486 <_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 ) 474ba: 2040 moveal %d0,%a0 474bc: 4a68 000e tstw %a0@(14) 474c0: 67c2 beqs 47484 <_Objects_Get_information+0xc> return NULL; #endif return info; } 474c2: 242e fffc movel %fp@(-4),%d2 474c6: 4e5e unlk %fp 474c8: 4e75 rts ... 000574b0 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 574b0: 4e56 fff0 linkw %fp,#-16 574b4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 574b8: 246e 0008 moveal %fp@(8),%a2 574bc: 266e 0010 moveal %fp@(16),%a3 Objects_Control *object; Objects_Id next_id; if ( !information ) 574c0: 4a8a tstl %a2 574c2: 660c bnes 574d0 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 574c4: 4280 clrl %d0 } 574c6: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 574cc: 4e5e unlk %fp 574ce: 4e75 rts Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 574d0: 4a8b tstl %a3 574d2: 67f0 beqs 574c4 <_Objects_Get_next+0x14> return NULL; if ( !next_id_p ) 574d4: 4aae 0014 tstl %fp@(20) 574d8: 67ea beqs 574c4 <_Objects_Get_next+0x14> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 574da: 302e 000e movew %fp@(14),%d0 574de: 673a beqs 5751a <_Objects_Get_next+0x6a> 574e0: 242e 000c movel %fp@(12),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 574e4: 49f9 0004 c9ec lea 4c9ec <_Objects_Get>,%a4 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 574ea: 4281 clrl %d1 574ec: 4280 clrl %d0 574ee: 322a 000e movew %a2@(14),%d1 574f2: 3002 movew %d2,%d0 574f4: b081 cmpl %d1,%d0 574f6: 622e bhis 57526 <_Objects_Get_next+0x76> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 574f8: 2f0b movel %a3,%sp@- 574fa: 2f02 movel %d2,%sp@- next_id++; 574fc: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 574fe: 2f0a movel %a2,%sp@- 57500: 4e94 jsr %a4@ next_id++; } while (*location_p != OBJECTS_LOCAL); 57502: 4fef 000c lea %sp@(12),%sp 57506: 4a93 tstl %a3@ 57508: 66e0 bnes 574ea <_Objects_Get_next+0x3a> *next_id_p = next_id; 5750a: 206e 0014 moveal %fp@(20),%a0 5750e: 2082 movel %d2,%a0@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 57510: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 57516: 4e5e unlk %fp 57518: 4e75 rts if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 5751a: 242a 0006 movel %a2@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 5751e: 49f9 0004 c9ec lea 4c9ec <_Objects_Get>,%a4 57524: 60c4 bras 574ea <_Objects_Get_next+0x3a> do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 57526: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 57528: 72ff moveq #-1,%d1 5752a: 4280 clrl %d0 5752c: 206e 0014 moveal %fp@(20),%a0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 57530: 2682 movel %d2,%a3@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 57532: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 57538: 2081 movel %d1,%a0@ return 0; } 5753a: 4e5e unlk %fp 5753c: 4e75 rts ... 0005b964 <_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; 5b964: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5b966: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b968: 4e56 0000 linkw %fp,#0 5b96c: 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; 5b970: 90a8 0006 subl %a0@(6),%d0 5b974: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5b978: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b97c: 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 ) { 5b980: b280 cmpl %d0,%d1 5b982: 6510 bcss 5b994 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5b984: 2068 0018 moveal %a0@(24),%a0 5b988: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b98c: 6706 beqs 5b994 <_Objects_Get_no_protection+0x30> *location = OBJECTS_LOCAL; 5b98e: 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; } 5b990: 4e5e unlk %fp 5b992: 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; 5b994: 7001 moveq #1,%d0 return NULL; } 5b996: 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; 5b998: 2280 movel %d0,%a1@ 5b99a: 4280 clrl %d0 return NULL; } 5b99c: 4e75 rts ... 00053dd4 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 53dd4: 4e56 ffe0 linkw %fp,#-32 53dd8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 53ddc: 286e 0008 moveal %fp@(8),%a4 53de0: 282e 000c movel %fp@(12),%d4 53de4: 2a2e 0010 movel %fp@(16),%d5 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 53de8: 6764 beqs 53e4e <_Objects_Name_to_id_string+0x7a> return OBJECTS_INVALID_ADDRESS; if ( !name ) 53dea: 4a84 tstl %d4 53dec: 6744 beqs 53e32 <_Objects_Name_to_id_string+0x5e> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 53dee: 362c 000e movew %a4@(14),%d3 53df2: 673e beqs 53e32 <_Objects_Name_to_id_string+0x5e> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 53df4: 246c 0018 moveal %a4@(24),%a2 53df8: 7401 moveq #1,%d2 53dfa: 588a addql #4,%a2 continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 53dfc: 4bf9 0005 80a0 lea 580a0 ,%a5 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 53e02: 0283 0000 ffff andil #65535,%d3 the_object = information->local_table[ index ]; 53e08: 2652 moveal %a2@,%a3 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 53e0a: 5282 addql #1,%d2 53e0c: 588a addql #4,%a2 the_object = information->local_table[ index ]; if ( !the_object ) 53e0e: 4a8b tstl %a3 53e10: 671c beqs 53e2e <_Objects_Name_to_id_string+0x5a> continue; if ( !the_object->name.name_p ) 53e12: 202b 000c movel %a3@(12),%d0 53e16: 6716 beqs 53e2e <_Objects_Name_to_id_string+0x5a> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 53e18: 4281 clrl %d1 53e1a: 322c 0034 movew %a4@(52),%d1 53e1e: 2f01 movel %d1,%sp@- 53e20: 2f00 movel %d0,%sp@- 53e22: 2f04 movel %d4,%sp@- 53e24: 4e95 jsr %a5@ 53e26: 4fef 000c lea %sp@(12),%sp 53e2a: 4a80 tstl %d0 53e2c: 6710 beqs 53e3e <_Objects_Name_to_id_string+0x6a> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 53e2e: b682 cmpl %d2,%d3 53e30: 64d6 bccs 53e08 <_Objects_Name_to_id_string+0x34> 53e32: 7001 moveq #1,%d0 } } } return OBJECTS_INVALID_NAME; } 53e34: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 53e3a: 4e5e unlk %fp 53e3c: 4e75 rts if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 53e3e: 2045 moveal %d5,%a0 53e40: 20ab 0008 movel %a3@(8),%a0@ } } } return OBJECTS_INVALID_NAME; } 53e44: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 53e4a: 4e5e unlk %fp 53e4c: 4e75 rts uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 53e4e: 7002 moveq #2,%d0 } } } return OBJECTS_INVALID_NAME; } 53e50: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 53e56: 4e5e unlk %fp 53e58: 4e75 rts ... 00047ad8 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47ad8: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47ada: 4e56 fff0 linkw %fp,#-16 47ade: 48d7 3c00 moveml %a2-%a5,%sp@ 47ae2: 286e 0008 moveal %fp@(8),%a4 47ae6: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47aea: 302c 0034 movew %a4@(52),%d0 47aee: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47af0: 2a6e 000c moveal %fp@(12),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0005 0838 jsr 50838 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47afc: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47afe: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47b00: 4a2c 0032 tstb %a4@(50) 47b04: 6662 bnes 47b68 <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47b06: 7018 moveq #24,%d0 47b08: 1212 moveb %a2@,%d1 47b0a: 49c1 extbl %d1 47b0c: e1a9 lsll %d0,%d1 47b0e: 103c 0001 moveb #1,%d0 47b12: b08b cmpl %a3,%d0 47b14: 643c bccs 47b52 <_Objects_Set_name+0x7a> 47b16: 102a 0001 moveb %a2@(1),%d0 47b1a: 49c0 extbl %d0 47b1c: 4840 swap %d0 47b1e: 4240 clrw %d0 47b20: 8081 orl %d1,%d0 47b22: 7202 moveq #2,%d1 47b24: b28b cmpl %a3,%d1 47b26: 6730 beqs 47b58 <_Objects_Set_name+0x80> 47b28: 122a 0002 moveb %a2@(2),%d1 47b2c: 49c1 extbl %d1 47b2e: e189 lsll #8,%d1 47b30: 8081 orl %d1,%d0 47b32: 7203 moveq #3,%d1 47b34: b28b cmpl %a3,%d1 47b36: 6700 0088 beqw 47bc0 <_Objects_Set_name+0xe8> 47b3a: 122a 0003 moveb %a2@(3),%d1 47b3e: 49c1 extbl %d1 47b40: 8081 orl %d1,%d0 47b42: 2b40 000c movel %d0,%a5@(12) 47b46: 7001 moveq #1,%d0 ); } return true; } 47b48: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47b4e: 4e5e unlk %fp 47b50: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47b52: 2001 movel %d1,%d0 47b54: 08c0 0015 bset #21,%d0 47b58: 7220 moveq #32,%d1 47b5a: 08c0 000d bset #13,%d0 47b5e: 8081 orl %d1,%d0 47b60: 2b40 000c movel %d0,%a5@(12) 47b64: 7001 moveq #1,%d0 47b66: 60e0 bras 47b48 <_Objects_Set_name+0x70> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b68: 486b 0001 pea %a3@(1) 47b6c: 4eb9 0004 965c jsr 4965c <_Workspace_Allocate> if ( !d ) 47b72: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b74: 2840 moveal %d0,%a4 if ( !d ) 47b76: 4a80 tstl %d0 47b78: 673a beqs 47bb4 <_Objects_Set_name+0xdc> return false; if ( the_object->name.name_p ) { 47b7a: 202d 000c movel %a5@(12),%d0 47b7e: 670e beqs 47b8e <_Objects_Set_name+0xb6> _Workspace_Free( (void *)the_object->name.name_p ); 47b80: 2f00 movel %d0,%sp@- 47b82: 4eb9 0004 9678 jsr 49678 <_Workspace_Free> the_object->name.name_p = NULL; 47b88: 588f addql #4,%sp 47b8a: 42ad 000c clrl %a5@(12) } strncpy( d, name, length ); 47b8e: 2f0b movel %a3,%sp@- 47b90: 2f0a movel %a2,%sp@- 47b92: 2f0c movel %a4,%sp@- 47b94: 4eb9 0005 07b0 jsr 507b0 d[length] = '\0'; the_object->name.name_p = d; 47b9a: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 47b9e: 4200 clrb %d0 47ba0: 1980 b800 moveb %d0,%a4@(00000000,%a3:l) the_object->name.name_p = d; 47ba4: 7001 moveq #1,%d0 47ba6: 2b4c 000c movel %a4,%a5@(12) ); } return true; } 47baa: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47bb0: 4e5e unlk %fp 47bb2: 4e75 rts 47bb4: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 47bba: 4200 clrb %d0 <== NOT EXECUTED ); } return true; } 47bbc: 4e5e unlk %fp <== NOT EXECUTED 47bbe: 4e75 rts <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47bc0: 123c 0020 moveb #32,%d1 47bc4: 8081 orl %d1,%d0 47bc6: 2b40 000c movel %d0,%a5@(12) 47bca: 7001 moveq #1,%d0 47bcc: 6000 ff7a braw 47b48 <_Objects_Set_name+0x70> 00047758 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 47758: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 4775a: 4e56 ffec linkw %fp,#-20 4775e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47762: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 47766: 4283 clrl %d3 block_count = (information->maximum - index_base) / 47768: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 4776a: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 4776e: 382a 000e movew %a2@(14),%d4 47772: 322a 0012 movew %a2@(18),%d1 47776: 9883 subl %d3,%d4 47778: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 4777c: 672c beqs 477aa <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 4777e: 226a 002a moveal %a2@(42),%a1 47782: b291 cmpl %a1@,%d1 47784: 672e beqs 477b4 <_Objects_Shrink_information+0x5c> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47786: 7404 moveq #4,%d2 47788: 4280 clrl %d0 } index_base += information->allocation_size; 4778a: 2042 moveal %d2,%a0 4778c: d681 addl %d1,%d3 4778e: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47790: 5280 addql #1,%d0 47792: b084 cmpl %d4,%d0 47794: 6414 bccs 477aa <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 47796: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4779a: 671a beqs 477b6 <_Objects_Shrink_information+0x5e> 4779c: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4779e: 2042 moveal %d2,%a0 477a0: d681 addl %d1,%d3 477a2: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 477a4: 5280 addql #1,%d0 477a6: b084 cmpl %d4,%d0 477a8: 65ec bcss 47796 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 477aa: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 477b0: 4e5e unlk %fp 477b2: 4e75 rts index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 477b4: 4282 clrl %d2 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 477b6: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 477ba: 47f9 0004 b92c lea 4b92c <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 477c0: 4280 clrl %d0 477c2: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 477c6: 2810 movel %a0@,%d4 if ((index >= index_base) && 477c8: b680 cmpl %d0,%d3 477ca: 620c bhis 477d8 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 477cc: 4281 clrl %d1 477ce: 322a 0012 movew %a2@(18),%d1 477d2: d283 addl %d3,%d1 477d4: b280 cmpl %d0,%d1 477d6: 623e bhis 47816 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 477d8: 2044 moveal %d4,%a0 477da: 4a84 tstl %d4 477dc: 66e2 bnes 477c0 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 477de: 206a 002e moveal %a2@(46),%a0 477e2: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 477e6: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> information->object_blocks[ block ] = NULL; 477ec: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 477f0: 588f addql #4,%sp _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 477f2: 302a 0028 movew %a2@(40),%d0 477f6: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 477fa: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 477fe: 9081 subl %d1,%d0 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 47800: 42b1 2800 clrl %a1@(00000000,%d2:l) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 47804: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47808: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4780c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47812: 4e5e unlk %fp 47814: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 47816: 2f08 movel %a0,%sp@- 47818: 4e93 jsr %a3@ 4781a: 588f addql #4,%sp } } while ( the_object ); 4781c: 2044 moveal %d4,%a0 4781e: 4a84 tstl %d4 47820: 669e bnes 477c0 <_Objects_Shrink_information+0x68> 47822: 60ba bras 477de <_Objects_Shrink_information+0x86> 0004ae18 <_POSIX_Barrier_Manager_initialization>: /** * @brief _POSIX_Barrier_Manager_initialization */ void _POSIX_Barrier_Manager_initialization(void) { 4ae18: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4ae1c: 4878 00ff pea ff 4ae20: 4878 0001 pea 1 4ae24: 4878 005c pea 5c 4ae28: 2f39 0005 dd66 movel 5dd66 ,%sp@- 4ae2e: 4878 000a pea a 4ae32: 4878 0003 pea 3 4ae36: 4879 0005 f246 pea 5f246 <_POSIX_Barrier_Information> 4ae3c: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ae42: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4ae46: 4e5e unlk %fp 4ae48: 4e75 rts ... 0004c2b4 <_POSIX_Barrier_Translate_core_barrier_return_code>: int _POSIX_Barrier_Translate_core_barrier_return_code( CORE_barrier_Status the_barrier_status ) { 4c2b4: 41f9 0005 e1e2 lea 5e1e2 <_POSIX_Barrier_Return_codes>,%a0 4c2ba: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return EINVAL; #endif return _POSIX_Barrier_Return_codes[the_barrier_status]; } 4c2be: 202e 0008 movel %fp@(8),%d0 4c2c2: 4e5e unlk %fp 4c2c4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4c2c8: 4e75 rts ... 000469b4 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 469b4: 4e56 0000 linkw %fp,#0 469b8: 2f0b movel %a3,%sp@- 469ba: 266e 000c moveal %fp@(12),%a3 469be: 2f0a movel %a2,%sp@- 469c0: 246e 0008 moveal %fp@(8),%a2 int status; if ( !cond ) { 469c4: 4a8a tstl %a2 469c6: 6750 beqs 46a18 <_POSIX_Condition_variables_Get+0x64> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 469c8: 2012 movel %a2@,%d0 469ca: 72ff moveq #-1,%d1 469cc: b280 cmpl %d0,%d1 469ce: 6720 beqs 469f0 <_POSIX_Condition_variables_Get+0x3c> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 469d0: 2f0b movel %a3,%sp@- 469d2: 2f00 movel %d0,%sp@- 469d4: 4879 0006 1d32 pea 61d32 <_POSIX_Condition_variables_Information> 469da: 4eb9 0004 97f8 jsr 497f8 <_Objects_Get> 469e0: 4fef 000c lea %sp@(12),%sp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 469e4: 246e fff8 moveal %fp@(-8),%a2 469e8: 266e fffc moveal %fp@(-4),%a3 469ec: 4e5e unlk %fp 469ee: 4e75 rts if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 469f0: 42a7 clrl %sp@- 469f2: 2f0a movel %a2,%sp@- 469f4: 4eb9 0004 6a2c jsr 46a2c if ( status ) { 469fa: 508f addql #8,%sp 469fc: 4a80 tstl %d0 469fe: 6618 bnes 46a18 <_POSIX_Condition_variables_Get+0x64> 46a00: 2012 movel %a2@,%d0 } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 46a02: 2f0b movel %a3,%sp@- 46a04: 2f00 movel %d0,%sp@- 46a06: 4879 0006 1d32 pea 61d32 <_POSIX_Condition_variables_Information> 46a0c: 4eb9 0004 97f8 jsr 497f8 <_Objects_Get> 46a12: 4fef 000c lea %sp@(12),%sp 46a16: 60cc bras 469e4 <_POSIX_Condition_variables_Get+0x30> * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR; 46a18: 7001 moveq #1,%d0 46a1a: 2680 movel %d0,%a3@ return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 46a1c: 246e fff8 moveal %fp@(-8),%a2 * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR; 46a20: 4280 clrl %d0 return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 46a22: 266e fffc moveal %fp@(-4),%a3 46a26: 4e5e unlk %fp 46a28: 4e75 rts ... 0004acf0 <_POSIX_Condition_variables_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Condition_variables_Manager_initialization(void) { 4acf0: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4acf4: 4878 00ff pea ff 4acf8: 4878 0001 pea 1 4acfc: 4878 0058 pea 58 4ad00: 2f39 0005 dd4a movel 5dd4a ,%sp@- 4ad06: 4878 0008 pea 8 4ad0a: 4878 0003 pea 3 4ad0e: 4879 0005 f2d2 pea 5f2d2 <_POSIX_Condition_variables_Information> 4ad14: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ad1a: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4ad1e: 4e5e unlk %fp 4ad20: 4e75 rts ... 00046bc8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bc8: 4e56 ffe8 linkw %fp,#-24 46bcc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46bd0: 240e movel %fp,%d2 46bd2: 5982 subql #4,%d2 46bd4: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bd6: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46bda: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bdc: 266e 0008 moveal %fp@(8),%a3 46be0: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46be4: 4eb9 0004 6dbe jsr 46dbe <_POSIX_Mutex_Get> 46bea: 508f addql #8,%sp 46bec: 4a80 tstl %d0 46bee: 6764 beqs 46c54 <_POSIX_Condition_variables_Wait_support+0x8c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46bf0: 2039 0006 1964 movel 61964 <_Thread_Dispatch_disable_level>,%d0 46bf6: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46bf8: 2f02 movel %d2,%sp@- 46bfa: 23c0 0006 1964 movel %d0,61964 <_Thread_Dispatch_disable_level> 46c00: 2f0b movel %a3,%sp@- 46c02: 4eb9 0004 69b4 jsr 469b4 <_POSIX_Condition_variables_Get> switch ( location ) { 46c08: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46c0a: 2840 moveal %d0,%a4 switch ( location ) { 46c0c: 4aae fffc tstl %fp@(-4) 46c10: 6642 bnes 46c54 <_POSIX_Condition_variables_Wait_support+0x8c> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 46c12: 202c 0014 movel %a4@(20),%d0 46c16: 6718 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> 46c18: b092 cmpl %a2@,%d0 46c1a: 6714 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> _Thread_Enable_dispatch(); 46c1c: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c22: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c24: 2002 movel %d2,%d0 46c26: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c2c: 4e5e unlk %fp 46c2e: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 46c30: 2f0a movel %a2,%sp@- 46c32: 4eb9 0004 700c jsr 4700c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 46c38: 588f addql #4,%sp 46c3a: 4a03 tstb %d3 46c3c: 6724 beqs 46c62 <_POSIX_Condition_variables_Wait_support+0x9a> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 46c3e: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c44: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 46c46: 2f0a movel %a2,%sp@- 46c48: 4eb9 0004 6f70 jsr 46f70 if ( mutex_status ) 46c4e: 588f addql #4,%sp 46c50: 4a80 tstl %d0 46c52: 67d0 beqs 46c24 <_POSIX_Condition_variables_Wait_support+0x5c> 46c54: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c56: 2002 movel %d2,%d0 46c58: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c5e: 4e5e unlk %fp 46c60: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 46c62: 2952 0014 movel %a2@,%a4@(20) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 46c66: 200c movel %a4,%d0 46c68: 0680 0000 0018 addil #24,%d0 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 46c6e: 7201 moveq #1,%d1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 46c70: 2079 0006 1a1e moveal 61a1e <_Thread_Executing>,%a0 46c76: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 46c7a: 2153 0020 movel %a3@,%a0@(32) if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 46c7e: 2140 0044 movel %d0,%a0@(68) 46c82: 2941 0048 movel %d1,%a4@(72) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 46c86: 4879 0004 a910 pea 4a910 <_Thread_queue_Timeout> 46c8c: 2f2e 0010 movel %fp@(16),%sp@- 46c90: 2f00 movel %d0,%sp@- 46c92: 4eb9 0004 a554 jsr 4a554 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 46c98: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 46c9e: 2079 0006 1a1e moveal 61a1e <_Thread_Executing>,%a0 if ( status && status != ETIMEDOUT ) 46ca4: 4fef 000c lea %sp@(12),%sp /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 46ca8: 2428 0034 movel %a0@(52),%d2 if ( status && status != ETIMEDOUT ) 46cac: 6798 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> 46cae: 7074 moveq #116,%d0 46cb0: b082 cmpl %d2,%d0 46cb2: 6792 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> case OBJECTS_ERROR: break; } return EINVAL; } 46cb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46cb6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 46cbc: 4e5e unlk %fp <== NOT EXECUTED 46cbe: 4e75 rts 0004ad24 <_POSIX_Key_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Key_Manager_initialization(void) { 4ad24: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4ad28: 4878 00ff pea ff 4ad2c: 4878 0001 pea 1 4ad30: 4878 0028 pea 28 4ad34: 2f39 0005 dd4e movel 5dd4e ,%sp@- 4ad3a: 4878 0002 pea 2 4ad3e: 4878 0003 pea 3 4ad42: 4879 0005 f298 pea 5f298 <_POSIX_Keys_Information> 4ad48: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ad4e: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4ad52: 4e5e unlk %fp 4ad54: 4e75 rts ... 0004b708 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 4b708: 4e56 0000 linkw %fp,#0 4b70c: 2f0a movel %a2,%sp@- 4b70e: 246e 0008 moveal %fp@(8),%a2 if ( !the_mq->linked && !the_mq->open_count ) { 4b712: 4a2a 0015 tstb %a2@(21) 4b716: 6606 bnes 4b71e <_POSIX_Message_queue_Delete+0x16> 4b718: 4aaa 0016 tstl %a2@(22) 4b71c: 6708 beqs 4b726 <_POSIX_Message_queue_Delete+0x1e> ); _POSIX_Message_queue_Free( the_mq ); } } 4b71e: 246e fffc moveal %fp@(-4),%a2 4b722: 4e5e unlk %fp 4b724: 4e75 rts ); _Workspace_Free( (void *)the_object->name.name_p ); } #endif _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 4b726: 2f0a movel %a2,%sp@- 4b728: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 4b72e: 4eb9 0004 eacc jsr 4eacc <_Objects_Close> _CORE_message_queue_Close( 4b734: 4878 0005 pea 5 4b738: 42a7 clrl %sp@- 4b73a: 486a 001a pea %a2@(26) 4b73e: 4eb9 0004 dd90 jsr 4dd90 <_CORE_message_queue_Close> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4b744: 2f0a movel %a2,%sp@- 4b746: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 4b74c: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free> ); _POSIX_Message_queue_Free( the_mq ); } } 4b752: 246e fffc moveal %fp@(-4),%a2 4b756: 4fef 001c lea %sp@(28),%sp 4b75a: 4e5e unlk %fp 4b75c: 4e75 rts ... 00052a6c <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 52a6c: 4e56 fffc linkw %fp,#-4 52a70: 2f0a movel %a2,%sp@- 52a72: 246e 0008 moveal %fp@(8),%a2 Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 52a76: 4a8a tstl %a2 52a78: 6704 beqs 52a7e <_POSIX_Message_queue_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 52a7a: 4a12 tstb %a2@ 52a7c: 660a bnes 52a88 <_POSIX_Message_queue_Name_to_id+0x1c> if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 52a7e: 246e fff8 moveal %fp@(-8),%a2 name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 52a82: 7016 moveq #22,%d0 return 0; return ENOENT; } 52a84: 4e5e unlk %fp 52a86: 4e75 rts return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 52a88: 4878 00ff pea ff 52a8c: 2f0a movel %a2,%sp@- 52a8e: 4eb9 0005 81f0 jsr 581f0 52a94: 508f addql #8,%sp 52a96: 0c80 0000 00fe cmpil #254,%d0 52a9c: 630a blss 52aa8 <_POSIX_Message_queue_Name_to_id+0x3c> if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 52a9e: 246e fff8 moveal %fp@(-8),%a2 return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 52aa2: 705b moveq #91,%d0 if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 52aa4: 4e5e unlk %fp 52aa6: 4e75 rts return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 52aa8: 486e fffc pea %fp@(-4) 52aac: 2f0a movel %a2,%sp@- 52aae: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 52ab4: 4eb9 0005 3dd4 jsr 53dd4 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 52aba: 206e 000c moveal %fp@(12),%a0 if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 52abe: 4fef 000c lea %sp@(12),%sp status = _Objects_Name_to_id_string( &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 52ac2: 20ae fffc movel %fp@(-4),%a0@ if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 52ac6: 4a80 tstl %d0 52ac8: 670a beqs 52ad4 <_POSIX_Message_queue_Name_to_id+0x68> return 0; return ENOENT; } 52aca: 246e fff8 moveal %fp@(-8),%a2 name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 52ace: 7002 moveq #2,%d0 return 0; return ENOENT; } 52ad0: 4e5e unlk %fp 52ad2: 4e75 rts 52ad4: 246e fff8 moveal %fp@(-8),%a2 name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 52ad8: 4280 clrl %d0 return 0; return ENOENT; } 52ada: 4e5e unlk %fp 52adc: 4e75 rts ... 0004b8a4 <_POSIX_Message_queue_Notify_handler>: */ void _POSIX_Message_queue_Notify_handler( void *user_data ) { 4b8a4: 4e56 0000 linkw %fp,#0 4b8a8: 2f0a movel %a2,%sp@- 4b8aa: 246e 0008 moveal %fp@(8),%a2 4b8ae: 2f02 movel %d2,%sp@- POSIX_Message_queue_Control *the_mq; the_mq = user_data; kill( getpid(), the_mq->notification.sigev_signo ); 4b8b0: 242a 0092 movel %a2@(146),%d2 4b8b4: 4eb9 0005 2328 jsr 52328 4b8ba: 2f02 movel %d2,%sp@- 4b8bc: 2f00 movel %d0,%sp@- 4b8be: 4eb9 0005 28d4 jsr 528d4 _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } 4b8c4: 242e fff8 movel %fp@(-8),%d2 the_message_queue->notify_argument = the_argument; 4b8c8: 508f addql #8,%sp 4b8ca: 42aa 007e clrl %a2@(126) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4b8ce: 42aa 007a clrl %a2@(122) 4b8d2: 246e fffc moveal %fp@(-4),%a2 4b8d6: 4e5e unlk %fp 4b8d8: 4e75 rts ... 0004bac4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4bac4: 4e56 ffe8 linkw %fp,#-24 4bac8: 48d7 041c moveml %d2-%d4/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4bacc: 486e fffc pea %fp@(-4) 4bad0: 242e 0008 movel %fp@(8),%d2 4bad4: 2f02 movel %d2,%sp@- 4bad6: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4badc: 246e 0014 moveal %fp@(20),%a2 4bae0: 262e 0018 movel %fp@(24),%d3 4bae4: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4baea: 4fef 000c lea %sp@(12),%sp 4baee: 2040 moveal %d0,%a0 4baf0: 4aae fffc tstl %fp@(-4) 4baf4: 671a beqs 4bb10 <_POSIX_Message_queue_Receive_support+0x4c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4baf6: 4eb9 0005 6684 jsr 56684 <__errno> 4bafc: 72ff moveq #-1,%d1 4bafe: 2040 moveal %d0,%a0 4bb00: 7009 moveq #9,%d0 } 4bb02: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bb08: 2080 movel %d0,%a0@ } 4bb0a: 2001 movel %d1,%d0 4bb0c: 4e5e unlk %fp 4bb0e: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4bb10: 2028 0014 movel %a0@(20),%d0 4bb14: 7203 moveq #3,%d1 4bb16: 7801 moveq #1,%d4 4bb18: c280 andl %d0,%d1 4bb1a: b881 cmpl %d1,%d4 4bb1c: 6700 00f2 beqw 4bc10 <_POSIX_Message_queue_Receive_support+0x14c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4bb20: 2068 0010 moveal %a0@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4bb24: 222e 0010 movel %fp@(16),%d1 4bb28: b2a8 0066 cmpl %a0@(102),%d1 4bb2c: 6500 0098 bcsw 4bbc6 <_POSIX_Message_queue_Receive_support+0x102> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bb30: 4a03 tstb %d3 4bb32: 6756 beqs 4bb8a <_POSIX_Message_queue_Receive_support+0xc6> 4bb34: 720e moveq #14,%d1 4bb36: e2a8 lsrl %d1,%d0 4bb38: 7801 moveq #1,%d4 4bb3a: b980 eorl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb3c: 2f2e 001c movel %fp@(28),%sp@- length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bb40: c084 andl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb42: 2f00 movel %d0,%sp@- 4bb44: 486e fff8 pea %fp@(-8) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bb48: 70ff moveq #-1,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb4a: 2f2e 000c movel %fp@(12),%sp@- 4bb4e: 2f02 movel %d2,%sp@- 4bb50: 4868 001a pea %a0@(26) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bb54: 2d40 fff8 movel %d0,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb58: 4eb9 0004 de40 jsr 4de40 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4bb5e: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4bb64: 2079 0006 8b9a moveal 68b9a <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4bb6a: 24a8 0024 movel %a0@(36),%a2@ 4bb6e: 6d4e blts 4bbbe <_POSIX_Message_queue_Receive_support+0xfa> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4bb70: 4fef 0018 lea %sp@(24),%sp 4bb74: 4aa8 0034 tstl %a0@(52) 4bb78: 666c bnes 4bbe6 <_POSIX_Message_queue_Receive_support+0x122> return length_out; 4bb7a: 222e fff8 movel %fp@(-8),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bb7e: 2001 movel %d1,%d0 4bb80: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bb86: 4e5e unlk %fp 4bb88: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb8a: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bb8e: 4280 clrl %d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb90: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bb92: 486e fff8 pea %fp@(-8) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bb96: 70ff moveq #-1,%d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb98: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4bb9c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4bb9e: 4868 001a pea %a0@(26) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bba2: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bba6: 4eb9 0004 de40 jsr 4de40 <_CORE_message_queue_Seize> <== NOT EXECUTED &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4bbac: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> <== NOT EXECUTED *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4bbb2: 2079 0006 8b9a moveal 68b9a <_Thread_Executing>,%a0 <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4bbb8: 24a8 0024 movel %a0@(36),%a2@ <== NOT EXECUTED 4bbbc: 6cb2 bges 4bb70 <_POSIX_Message_queue_Receive_support+0xac><== NOT EXECUTED 4bbbe: 2212 movel %a2@,%d1 4bbc0: 4481 negl %d1 4bbc2: 2481 movel %d1,%a2@ 4bbc4: 60aa bras 4bb70 <_POSIX_Message_queue_Receive_support+0xac> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 4bbc6: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4bbcc: 747a moveq #122,%d2 4bbce: 4eb9 0005 6684 jsr 56684 <__errno> 4bbd4: 72ff moveq #-1,%d1 4bbd6: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bbd8: 2001 movel %d1,%d0 the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4bbda: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bbdc: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bbe2: 4e5e unlk %fp 4bbe4: 4e75 rts _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4bbe6: 4eb9 0005 6684 jsr 56684 <__errno> 4bbec: 2079 0006 8b9a moveal 68b9a <_Thread_Executing>,%a0 4bbf2: 2440 moveal %d0,%a2 4bbf4: 2f28 0034 movel %a0@(52),%sp@- 4bbf8: 4eb9 0004 bec4 jsr 4bec4 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4bbfe: 588f addql #4,%sp 4bc00: 72ff moveq #-1,%d1 4bc02: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc04: 2001 movel %d1,%d0 4bc06: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bc0c: 4e5e unlk %fp 4bc0e: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 4bc10: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4bc16: 7609 moveq #9,%d3 4bc18: 4eb9 0005 6684 jsr 56684 <__errno> 4bc1e: 72ff moveq #-1,%d1 4bc20: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc22: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4bc24: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc26: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bc2c: 4e5e unlk %fp 4bc2e: 4e75 rts 0004bec4 <_POSIX_Message_queue_Translate_core_message_queue_return_code>: int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { 4bec4: 41f9 0006 5bdc lea 65bdc <_POSIX_Message_queue_Return_codes>,%a0 4beca: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_message_queue_status > CORE_MESSAGE_QUEUE_STATUS_LAST ) return EINVAL; #endif return _POSIX_Message_queue_Return_codes[the_message_queue_status]; } 4bece: 202e 0008 movel %fp@(8),%d0 4bed2: 4e5e unlk %fp 4bed4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4bed8: 4e75 rts ... 00048004 <_POSIX_Mutex_Translate_core_mutex_return_code>: int _POSIX_Mutex_Translate_core_mutex_return_code( CORE_mutex_Status the_mutex_status ) { 48004: 41f9 0006 17a8 lea 617a8 <_POSIX_Mutex_Return_codes>,%a0 4800a: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_mutex_status > CORE_MUTEX_STATUS_LAST ) return EINVAL; #endif return _POSIX_Mutex_Return_codes[the_mutex_status]; } 4800e: 202e 0008 movel %fp@(8),%d0 48012: 4e5e unlk %fp 48014: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 48018: 4e75 rts ... 0004c5d8 <_POSIX_Priority_Is_valid>: #include bool _POSIX_Priority_Is_valid( int priority ) { 4c5d8: 4e56 0000 linkw %fp,#0 4c5dc: 202e 0008 movel %fp@(8),%d0 return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && 4c5e0: 6f12 bles 4c5f4 <_POSIX_Priority_Is_valid+0x1c> #endif #include #include bool _POSIX_Priority_Is_valid( 4c5e2: 4281 clrl %d1 4c5e4: 1239 0005 eb86 moveb 5eb86 ,%d1 ) { return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); } 4c5ea: 4e5e unlk %fp #endif #include #include bool _POSIX_Priority_Is_valid( 4c5ec: b280 cmpl %d0,%d1 4c5ee: 5ec0 sgt %d0 4c5f0: 4480 negl %d0 ) { return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); } 4c5f2: 4e75 rts 4c5f4: 4e5e unlk %fp bool _POSIX_Priority_Is_valid( int priority ) { return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && 4c5f6: 4200 clrb %d0 (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); } 4c5f8: 4e75 rts ... 0004ae4c <_POSIX_RWLock_Manager_initialization>: /** * @brief _POSIX_RWLock_Manager_initialization */ void _POSIX_RWLock_Manager_initialization(void) { 4ae4c: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4ae50: 4878 00ff pea ff 4ae54: 4878 0001 pea 1 4ae58: 4878 005c pea 5c 4ae5c: 2f39 0005 dd6a movel 5dd6a ,%sp@- 4ae62: 4878 000b pea b 4ae66: 4878 0003 pea 3 4ae6a: 4879 0005 f0b0 pea 5f0b0 <_POSIX_RWLock_Information> 4ae70: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ae76: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4ae7a: 4e5e unlk %fp 4ae7c: 4e75 rts ... 00046d34 <_POSIX_RWLock_Translate_core_RWLock_return_code>: int _POSIX_RWLock_Translate_core_RWLock_return_code( CORE_RWLock_Status the_rwlock_status ) { 46d34: 41f9 0005 f35a lea 5f35a <_POSIX_RWLock_Return_codes>,%a0 46d3a: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_rwlock_status > CORE_RWLOCK_STATUS_LAST ) return EINVAL; #endif return _POSIX_RWLock_Return_codes[the_rwlock_status]; } 46d3e: 202e 0008 movel %fp@(8),%d0 46d42: 4e5e unlk %fp 46d44: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 46d48: 4e75 rts ... 0004ef28 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4ef28: 4e56 0000 linkw %fp,#0 4ef2c: 2f0a movel %a2,%sp@- 4ef2e: 2f02 movel %d2,%sp@- 4ef30: 242e 0008 movel %fp@(8),%d2 POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 4ef34: 4aae 000c tstl %fp@(12) 4ef38: 6600 0112 bnew 4f04c <_POSIX_Semaphore_Create_support+0x124> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 4ef3c: 4a82 tstl %d2 4ef3e: 6718 beqs 4ef58 <_POSIX_Semaphore_Create_support+0x30> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 4ef40: 4878 00ff pea ff 4ef44: 2f02 movel %d2,%sp@- 4ef46: 4eb9 0005 40cc jsr 540cc 4ef4c: 508f addql #8,%sp 4ef4e: 0c80 0000 00fe cmpil #254,%d0 4ef54: 6200 00dc bhiw 4f032 <_POSIX_Semaphore_Create_support+0x10a> 4ef58: 2039 0006 3fa0 movel 63fa0 <_Thread_Dispatch_disable_level>,%d0 4ef5e: 5280 addql #1,%d0 4ef60: 23c0 0006 3fa0 movel %d0,63fa0 <_Thread_Dispatch_disable_level> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4ef66: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4ef6c: 4eb9 0004 a6e8 jsr 4a6e8 <_Objects_Allocate> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4ef72: 588f addql #4,%sp 4ef74: 2440 moveal %d0,%a2 4ef76: 4a80 tstl %d0 4ef78: 6700 00ec beqw 4f066 <_POSIX_Semaphore_Create_support+0x13e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 4ef7c: 42aa 0010 clrl %a2@(16) if ( name ) { 4ef80: 4a82 tstl %d2 4ef82: 675c beqs 4efe0 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; the_semaphore->open_count = 1; 4ef84: 7001 moveq #1,%d0 4ef86: 2540 0016 movel %d0,%a2@(22) } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true; 4ef8a: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 1; the_semaphore->linked = true; 4ef8e: 1540 0015 moveb %d0,%a2@(21) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4ef92: 70ff moveq #-1,%d0 * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 4ef94: 42aa 005e clrl %a2@(94) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4ef98: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4ef9c: 2f2e 0010 movel %fp@(16),%sp@- 4efa0: 486a 005a pea %a2@(90) 4efa4: 486a 001a pea %a2@(26) 4efa8: 4eb9 0004 a17c jsr 4a17c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4efae: 2079 0006 4212 moveal 64212 <_POSIX_Semaphore_Information+0x18>,%a0 4efb4: 4280 clrl %d0 4efb6: 302a 000a movew %a2@(10),%d0 4efba: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4efbe: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4efc2: 206e 0014 moveal %fp@(20),%a0 4efc6: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4efc8: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> return 0; 4efce: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4efd2: 4280 clrl %d0 return 0; } 4efd4: 242e fff8 movel %fp@(-8),%d2 4efd8: 246e fffc moveal %fp@(-4),%a2 4efdc: 4e5e unlk %fp 4efde: 4e75 rts the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; the_semaphore->open_count = 0; 4efe0: 42aa 0016 clrl %a2@(22) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4efe4: 4200 clrb %d0 * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 4efe6: 42aa 005e clrl %a2@(94) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4efea: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 0; the_semaphore->linked = false; 4efee: 1540 0015 moveb %d0,%a2@(21) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4eff2: 70ff moveq #-1,%d0 4eff4: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4eff8: 2f2e 0010 movel %fp@(16),%sp@- 4effc: 486a 005a pea %a2@(90) 4f000: 486a 001a pea %a2@(26) 4f004: 4eb9 0004 a17c jsr 4a17c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f00a: 2079 0006 4212 moveal 64212 <_POSIX_Semaphore_Information+0x18>,%a0 4f010: 4280 clrl %d0 4f012: 302a 000a movew %a2@(10),%d0 4f016: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4f01a: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4f01e: 206e 0014 moveal %fp@(20),%a0 4f022: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4f024: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> return 0; 4f02a: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4f02e: 4280 clrl %d0 4f030: 60a2 bras 4efd4 <_POSIX_Semaphore_Create_support+0xac> if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4f032: 4eb9 0005 2bbc jsr 52bbc <__errno> 4f038: 745b moveq #91,%d2 4f03a: 2040 moveal %d0,%a0 4f03c: 70ff moveq #-1,%d0 4f03e: 2082 movel %d2,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f040: 242e fff8 movel %fp@(-8),%d2 4f044: 246e fffc moveal %fp@(-4),%a2 4f048: 4e5e unlk %fp 4f04a: 4e75 rts CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4f04c: 4eb9 0005 2bbc jsr 52bbc <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f052: 242e fff8 movel %fp@(-8),%d2 CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4f056: 2040 moveal %d0,%a0 4f058: 7258 moveq #88,%d1 4f05a: 70ff moveq #-1,%d0 *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f05c: 246e fffc moveal %fp@(-4),%a2 4f060: 4e5e unlk %fp CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4f062: 2081 movel %d1,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f064: 4e75 rts _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 4f066: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 4f06c: 4eb9 0005 2bbc jsr 52bbc <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f072: 242e fff8 movel %fp@(-8),%d2 the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4f076: 2040 moveal %d0,%a0 4f078: 721c moveq #28,%d1 4f07a: 70ff moveq #-1,%d0 *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f07c: 246e fffc moveal %fp@(-4),%a2 4f080: 4e5e unlk %fp the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4f082: 2081 movel %d1,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f084: 4e75 rts ... 0004f088 <_POSIX_Semaphore_Delete>: */ void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore ) { 4f088: 4e56 0000 linkw %fp,#0 4f08c: 2f0a movel %a2,%sp@- 4f08e: 246e 0008 moveal %fp@(8),%a2 if ( !the_semaphore->linked && !the_semaphore->open_count ) { 4f092: 4a2a 0015 tstb %a2@(21) 4f096: 6606 bnes 4f09e <_POSIX_Semaphore_Delete+0x16> 4f098: 4aaa 0016 tstl %a2@(22) 4f09c: 6708 beqs 4f0a6 <_POSIX_Semaphore_Delete+0x1e> -1 ); _POSIX_Semaphore_Free( the_semaphore ); } } 4f09e: 246e fffc moveal %fp@(-4),%a2 4f0a2: 4e5e unlk %fp 4f0a4: 4e75 rts void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore ) { if ( !the_semaphore->linked && !the_semaphore->open_count ) { _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 4f0a6: 2f0a movel %a2,%sp@- 4f0a8: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4f0ae: 4eb9 0004 a778 jsr 4a778 <_Objects_Close> _CORE_semaphore_Flush( 4f0b4: 4878 ffff pea ffffffff 4f0b8: 42a7 clrl %sp@- 4f0ba: 486a 001a pea %a2@(26) 4f0be: 4eb9 0004 a170 jsr 4a170 <_CORE_semaphore_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 4f0c4: 2f0a movel %a2,%sp@- 4f0c6: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4f0cc: 4eb9 0004 aa20 jsr 4aa20 <_Objects_Free> -1 ); _POSIX_Semaphore_Free( the_semaphore ); } } 4f0d2: 246e fffc moveal %fp@(-4),%a2 4f0d6: 4fef 001c lea %sp@(28),%sp 4f0da: 4e5e unlk %fp 4f0dc: 4e75 rts ... 0004b440 <_POSIX_Semaphore_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Semaphore_Manager_initialization(void) { 4b440: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4b444: 4878 00ff pea ff 4b448: 4878 0001 pea 1 4b44c: 4878 0066 pea 66 4b450: 2f39 0005 dd62 movel 5dd62 ,%sp@- 4b456: 4878 0007 pea 7 4b45a: 4878 0003 pea 3 4b45e: 4879 0005 f15e pea 5f15e <_POSIX_Semaphore_Information> 4b464: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4b46a: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4b46e: 4e5e unlk %fp 4b470: 4e75 rts ... 000518c8 <_POSIX_Semaphore_Translate_core_semaphore_return_code>: int _POSIX_Semaphore_Translate_core_semaphore_return_code( CORE_semaphore_Status the_semaphore_status ) { 518c8: 41f9 0006 1b32 lea 61b32 <_POSIX_Semaphore_Return_codes>,%a0 518ce: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_semaphore_status > CORE_SEMAPHORE_STATUS_LAST ) return EINVAL; #endif return _POSIX_Semaphore_Return_codes[the_semaphore_status]; } 518d2: 202e 0008 movel %fp@(8),%d0 518d6: 4e5e unlk %fp 518d8: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 518dc: 4e75 rts ... 0004f158 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 4f158: 4e56 fffc linkw %fp,#-4 4f15c: 2f0a movel %a2,%sp@- 4f15e: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 4f160: 486e fffc pea %fp@(-4) 4f164: 206e 0008 moveal %fp@(8),%a0 4f168: 2f10 movel %a0@,%sp@- 4f16a: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4f170: 142e 000f moveb %fp@(15),%d2 4f174: 4eb9 0004 ab84 jsr 4ab84 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4f17a: 4fef 000c lea %sp@(12),%sp 4f17e: 4aae fffc tstl %fp@(-4) 4f182: 671c beqs 4f1a0 <_POSIX_Semaphore_Wait_support+0x48> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 4f184: 4eb9 0005 2bbc jsr 52bbc <__errno> } 4f18a: 242e fff4 movel %fp@(-12),%d2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 4f18e: 2040 moveal %d0,%a0 4f190: 7016 moveq #22,%d0 4f192: 72ff moveq #-1,%d1 } 4f194: 246e fff8 moveal %fp@(-8),%a2 4f198: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 4f19a: 2080 movel %d0,%a0@ } 4f19c: 2001 movel %d1,%d0 4f19e: 4e75 rts the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 4f1a0: 2f2e 0010 movel %fp@(16),%sp@- 4f1a4: 2040 moveal %d0,%a0 4f1a6: 0282 0000 00ff andil #255,%d2 4f1ac: 2f02 movel %d2,%sp@- 4f1ae: 2f28 0008 movel %a0@(8),%sp@- 4f1b2: 4868 001a pea %a0@(26) 4f1b6: 4eb9 0004 f8b8 jsr 4f8b8 <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 4f1bc: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 4f1c2: 2079 0006 405a moveal 6405a <_Thread_Executing>,%a0 4f1c8: 4fef 0010 lea %sp@(16),%sp 4f1cc: 4aa8 0034 tstl %a0@(52) 4f1d0: 6610 bnes 4f1e2 <_POSIX_Semaphore_Wait_support+0x8a> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 4f1d2: 242e fff4 movel %fp@(-12),%d2 blocking, timeout ); _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) 4f1d6: 4281 clrl %d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 4f1d8: 2001 movel %d1,%d0 4f1da: 246e fff8 moveal %fp@(-8),%a2 4f1de: 4e5e unlk %fp 4f1e0: 4e75 rts _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 4f1e2: 4eb9 0005 2bbc jsr 52bbc <__errno> 4f1e8: 2079 0006 405a moveal 6405a <_Thread_Executing>,%a0 4f1ee: 2440 moveal %d0,%a2 4f1f0: 2f28 0034 movel %a0@(52),%sp@- 4f1f4: 4eb9 0005 18c8 jsr 518c8 <_POSIX_Semaphore_Translate_core_semaphore_return_code> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 4f1fa: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 4f1fe: 588f addql #4,%sp 4f200: 72ff moveq #-1,%d1 4f202: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 4f204: 246e fff8 moveal %fp@(-8),%a2 4f208: 2001 movel %d1,%d0 4f20a: 4e5e unlk %fp 4f20c: 4e75 rts ... 0004b058 <_POSIX_Spinlock_Manager_initialization>: /** * @brief _POSIX_Spinlock_Manager_initialization */ void _POSIX_Spinlock_Manager_initialization(void) { 4b058: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4b05c: 4878 00ff pea ff 4b060: 4878 0001 pea 1 4b064: 4878 0020 pea 20 4b068: 2f39 0005 dd6e movel 5dd6e ,%sp@- 4b06e: 4878 000b pea b 4b072: 4878 0003 pea 3 4b076: 4879 0005 f124 pea 5f124 <_POSIX_Spinlock_Information> 4b07c: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4b082: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4b086: 4e5e unlk %fp 4b088: 4e75 rts ... 00045fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code>: int _POSIX_Spinlock_Translate_core_spinlock_return_code( CORE_spinlock_Status the_spinlock_status ) { 45fd0: 41f9 0005 d796 lea 5d796 <_POSIX_Spinlock_Return_codes>,%a0 45fd6: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_spinlock_status > CORE_SPINLOCK_STATUS_LAST ) return EINVAL; #endif return _POSIX_Spinlock_Return_codes[the_spinlock_status]; } 45fda: 202e 0008 movel %fp@(8),%d0 45fde: 4e5e unlk %fp 45fe0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 45fe4: 4e75 rts ... 0004c5fc <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4c5fc: 4e56 ffe8 linkw %fp,#-24 4c600: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4c604: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4c608: 47f9 0004 c5d8 lea 4c5d8 <_POSIX_Priority_Is_valid>,%a3 4c60e: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4c610: 242e 0008 movel %fp@(8),%d2 4c614: 286e 0010 moveal %fp@(16),%a4 4c618: 2a6e 0014 moveal %fp@(20),%a5 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4c61c: 4e93 jsr %a3@ 4c61e: 588f addql #4,%sp 4c620: 4a00 tstb %d0 4c622: 671e beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4c624: 4294 clrl %a4@ *budget_callout = NULL; 4c626: 4295 clrl %a5@ if ( policy == SCHED_OTHER ) { 4c628: 4a82 tstl %d2 4c62a: 6722 beqs 4c64e <_POSIX_Thread_Translate_sched_param+0x52> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 4c62c: 7001 moveq #1,%d0 4c62e: b082 cmpl %d2,%d0 4c630: 6700 0084 beqw 4c6b6 <_POSIX_Thread_Translate_sched_param+0xba> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4c634: 7002 moveq #2,%d0 4c636: b082 cmpl %d2,%d0 4c638: 6700 008a beqw 4c6c4 <_POSIX_Thread_Translate_sched_param+0xc8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 4c63c: 7004 moveq #4,%d0 4c63e: b082 cmpl %d2,%d0 4c640: 671c beqs 4c65e <_POSIX_Thread_Translate_sched_param+0x62> if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 4c642: 7016 moveq #22,%d0 } return EINVAL; } 4c644: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c64a: 4e5e unlk %fp 4c64c: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4c64e: 7201 moveq #1,%d1 4c650: 4280 clrl %d0 4c652: 2881 movel %d1,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c654: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c65a: 4e5e unlk %fp 4c65c: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 4c65e: 4aaa 0008 tstl %a2@(8) 4c662: 6606 bnes 4c66a <_POSIX_Thread_Translate_sched_param+0x6e> (param->sched_ss_repl_period.tv_nsec == 0) ) 4c664: 4aaa 000c tstl %a2@(12) 4c668: 67d8 beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4c66a: 4aaa 0010 tstl %a2@(16) 4c66e: 6606 bnes 4c676 <_POSIX_Thread_Translate_sched_param+0x7a> (param->sched_ss_init_budget.tv_nsec == 0) ) 4c670: 4aaa 0014 tstl %a2@(20) 4c674: 67cc beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4c676: 486a 0008 pea %a2@(8) 4c67a: 243c 0004 a054 movel #303188,%d2 4c680: 2042 moveal %d2,%a0 4c682: 4e90 jsr %a0@ 4c684: 486a 0010 pea %a2@(16) 4c688: 2600 movel %d0,%d3 4c68a: 2042 moveal %d2,%a0 4c68c: 4e90 jsr %a0@ 4c68e: 508f addql #8,%sp 4c690: b083 cmpl %d3,%d0 4c692: 62ae bhis 4c642 <_POSIX_Thread_Translate_sched_param+0x46> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4c694: 2f2a 0004 movel %a2@(4),%sp@- 4c698: 4e93 jsr %a3@ 4c69a: 588f addql #4,%sp 4c69c: 4a00 tstb %d0 4c69e: 67a2 beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4c6a0: 7003 moveq #3,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4c6a2: 2abc 0004 6678 movel #288376,%a5@ return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4c6a8: 2880 movel %d0,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4c6aa: 4280 clrl %d0 return 0; } return EINVAL; } 4c6ac: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6b2: 4e5e unlk %fp 4c6b4: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4c6b6: 4294 clrl %a4@ 4c6b8: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c6ba: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6c0: 4e5e unlk %fp 4c6c2: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4c6c4: 2880 movel %d0,%a4@ 4c6c6: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c6c8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6ce: 4e5e unlk %fp 4c6d0: 4e75 rts ... 0004b31c <_POSIX_Threads_Sporadic_budget_callout>: RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4b31c: 4280 clrl %d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4b31e: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4b320: 4e56 0000 linkw %fp,#0 4b324: 206e 0008 moveal %fp@(8),%a0 4b328: 1039 0005 d752 moveb 5d752 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b32e: 2268 010e moveal %a0@(270),%a1 4b332: 90a9 0088 subl %a1@(136),%d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4b336: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4b33a: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4b33e: 4aa8 001c tstl %a0@(28) 4b342: 6606 bnes 4b34a <_POSIX_Threads_Sporadic_budget_callout+0x2e> /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4b344: b0a8 0014 cmpl %a0@(20),%d0 4b348: 6204 bhis 4b34e <_POSIX_Threads_Sporadic_budget_callout+0x32> #if 0 printk( "lower priority\n" ); #endif } } } 4b34a: 4e5e unlk %fp <== NOT EXECUTED 4b34c: 4e75 rts <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4b34e: 4878 0001 pea 1 4b352: 2f00 movel %d0,%sp@- 4b354: 2f08 movel %a0,%sp@- 4b356: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 4b35c: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4b360: 4e5e unlk %fp 4b362: 4e75 rts 0004d550 <_POSIX_Threads_cancel_run>: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4d550: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4d552: 4e56 ffec linkw %fp,#-20 4d556: 206e 0008 moveal %fp@(8),%a0 4d55a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4d55e: 2668 010e moveal %a0@(270),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d562: 45eb 00e4 lea %a3@(228),%a2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4d566: 2740 00d4 movel %d0,%a3@(212) POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4d56a: b5eb 00e0 cmpal %a3@(224),%a2 4d56e: 673c beqs 4d5ac <_POSIX_Threads_cancel_run+0x5c> 4d570: 49f9 0004 9200 lea 49200 <_Workspace_Free>,%a4 thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4d576: 243c 0000 0700 movel #1792,%d2 4d57c: 2002 movel %d2,%d0 4d57e: 40c1 movew %sr,%d1 4d580: 8081 orl %d1,%d0 4d582: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4d584: 2a6a 0004 moveal %a2@(4),%a5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4d588: 2055 moveal %a5@,%a0 previous = the_node->previous; 4d58a: 226d 0004 moveal %a5@(4),%a1 next->previous = previous; previous->next = next; 4d58e: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4d590: 2149 0004 movel %a1,%a0@(4) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4d594: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4d596: 2f2d 000c movel %a5@(12),%sp@- 4d59a: 206d 0008 moveal %a5@(8),%a0 4d59e: 4e90 jsr %a0@ _Workspace_Free( handler ); 4d5a0: 2f0d movel %a5,%sp@- 4d5a2: 4e94 jsr %a4@ POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4d5a4: 508f addql #8,%sp 4d5a6: b5eb 00e0 cmpal %a3@(224),%a2 4d5aa: 66d0 bnes 4d57c <_POSIX_Threads_cancel_run+0x2c> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4d5ac: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d5b2: 4e5e unlk %fp 4d5b4: 4e75 rts ... 0004b40c <_POSIX_Timer_Manager_initialization>: * Initialize the internal structure in which the data of all * the timers are stored */ void _POSIX_Timer_Manager_initialization(void) { 4b40c: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4b410: 4878 00ff pea ff 4b414: 4878 0001 pea 1 4b418: 4878 0072 pea 72 4b41c: 2f39 0005 dd52 movel 5dd52 ,%sp@- 4b422: 4878 0009 pea 9 4b426: 4878 0003 pea 3 4b42a: 4879 0005 f198 pea 5f198 <_POSIX_Timer_Information> 4b430: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4b436: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4b43a: 4e5e unlk %fp 4b43c: 4e75 rts ... 00045cc0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 45cc0: 4e56 0000 linkw %fp,#0 45cc4: 2f0a movel %a2,%sp@- 45cc6: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 45cca: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45cce: 4aaa 0052 tstl %a2@(82) 45cd2: 6606 bnes 45cda <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 45cd4: 4aaa 0056 tstl %a2@(86) 45cd8: 672a beqs 45d04 <_POSIX_Timer_TSR+0x44> activated = _POSIX_Timer_Insert_helper( 45cda: 2f0a movel %a2,%sp@- 45cdc: 4879 0004 5cc0 pea 45cc0 <_POSIX_Timer_TSR> 45ce2: 2f2a 0008 movel %a2@(8),%sp@- 45ce6: 2f2a 0062 movel %a2@(98),%sp@- 45cea: 486a 0010 pea %a2@(16) 45cee: 4eb9 0004 bedc jsr 4bedc <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 45cf4: 4fef 0014 lea %sp@(20),%sp 45cf8: 4a00 tstb %d0 45cfa: 662a bnes 45d26 <_POSIX_Timer_TSR+0x66> /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 45cfc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 45d00: 4e5e unlk %fp <== NOT EXECUTED 45d02: 4e75 rts <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45d04: 7004 moveq #4,%d0 <== NOT EXECUTED 45d06: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 45d0a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 45d0e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 45d12: 4eb9 0004 b9f0 jsr 4b9f0 <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d18: 508f addql #8,%sp <== NOT EXECUTED 45d1a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 45d1e: 246e fffc moveal %fp@(-4),%a2 45d22: 4e5e unlk %fp 45d24: 4e75 rts ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 45d26: 486a 006a pea %a2@(106) 45d2a: 4eb9 0004 7470 jsr 47470 <_TOD_Get> /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45d30: 588f addql #4,%sp /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45d32: 7003 moveq #3,%d0 45d34: 1540 003c moveb %d0,%a2@(60) /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 45d38: 2f2a 0042 movel %a2@(66),%sp@- 45d3c: 2f2a 0038 movel %a2@(56),%sp@- 45d40: 4eb9 0004 b9f0 jsr 4b9f0 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d46: 508f addql #8,%sp 45d48: 42aa 0066 clrl %a2@(102) 45d4c: 60d0 bras 45d1e <_POSIX_Timer_TSR+0x5e> ... 0004d65c <_POSIX_signals_Check_signal>: ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d65c: 4280 clrl %d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d65e: 4e56 ffdc linkw %fp,#-36 4d662: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d666: 4878 0001 pea 1 4d66a: 102e 0013 moveb %fp@(19),%d0 4d66e: 260e movel %fp,%d3 4d670: 0683 ffff fff4 addil #-12,%d3 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d676: 242e 000c movel %fp@(12),%d2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d67a: 2f00 movel %d0,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d67c: 246e 0008 moveal %fp@(8),%a2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d680: 2f03 movel %d3,%sp@- 4d682: 2f02 movel %d2,%sp@- 4d684: 2f0a movel %a2,%sp@- 4d686: 4eb9 0004 d708 jsr 4d708 <_POSIX_signals_Clear_signals> 4d68c: 4fef 0014 lea %sp@(20),%sp 4d690: 4a00 tstb %d0 4d692: 6766 beqs 4d6fa <_POSIX_signals_Check_signal+0x9e> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4d694: 2202 movel %d2,%d1 4d696: 2002 movel %d2,%d0 4d698: 43f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a1 4d69e: e589 lsll #2,%d1 4d6a0: e988 lsll #4,%d0 4d6a2: 9081 subl %d1,%d0 4d6a4: 2040 moveal %d0,%a0 4d6a6: d1fc 0005 f3ba addal #390074,%a0 4d6ac: 7201 moveq #1,%d1 4d6ae: 2050 moveal %a0@,%a0 4d6b0: b288 cmpl %a0,%d1 4d6b2: 6746 beqs 4d6fa <_POSIX_signals_Check_signal+0x9e> /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4d6b4: 2842 moveal %d2,%a4 4d6b6: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4d6ba: 282a 00cc movel %a2@(204),%d4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4d6be: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4d6c2: 8284 orl %d4,%d1 4d6c4: 2541 00cc movel %d1,%a2@(204) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4d6c8: 7202 moveq #2,%d1 4d6ca: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1 4d6ce: 6716 beqs 4d6e6 <_POSIX_signals_Check_signal+0x8a> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4d6d0: 2f02 movel %d2,%sp@- 4d6d2: 4e90 jsr %a0@ 4d6d4: 588f addql #4,%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4d6d6: 7001 moveq #1,%d0 4d6d8: 2544 00cc movel %d4,%a2@(204) return true; } 4d6dc: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4d6e2: 4e5e unlk %fp 4d6e4: 4e75 rts /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4d6e6: 42a7 clrl %sp@- 4d6e8: 2f03 movel %d3,%sp@- 4d6ea: 2f02 movel %d2,%sp@- 4d6ec: 4e90 jsr %a0@ signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 4d6ee: 4fef 000c lea %sp@(12),%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4d6f2: 2544 00cc movel %d4,%a2@(204) 4d6f6: 7001 moveq #1,%d0 4d6f8: 60e2 bras 4d6dc <_POSIX_signals_Check_signal+0x80> return true; } 4d6fa: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 4d700: 4200 clrb %d0 } 4d702: 4e5e unlk %fp 4d704: 4e75 rts ... 0004e874 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4e874: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4e87a: 4e56 0000 linkw %fp,#0 4e87e: 222e 0008 movel %fp@(8),%d1 4e882: 2f03 movel %d3,%sp@- 4e884: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4e886: 40c2 movew %sr,%d2 4e888: 8082 orl %d2,%d0 4e88a: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4e88c: 2601 movel %d1,%d3 4e88e: 2001 movel %d1,%d0 4e890: 41f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a0 4e896: e58b lsll #2,%d3 4e898: e988 lsll #4,%d0 4e89a: 9083 subl %d3,%d0 4e89c: 7602 moveq #2,%d3 4e89e: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4e8a2: 6726 beqs 4e8ca <_POSIX_signals_Clear_process_signals+0x56> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4e8a4: 5381 subql #1,%d1 4e8a6: 7001 moveq #1,%d0 4e8a8: e3a8 lsll %d1,%d0 4e8aa: 4680 notl %d0 4e8ac: c0b9 0005 f5a6 andl 5f5a6 <_POSIX_signals_Pending>,%d0 4e8b2: 23c0 0005 f5a6 movel %d0,5f5a6 <_POSIX_signals_Pending> if ( !_POSIX_signals_Pending ) 4e8b8: 6606 bnes 4e8c0 <_POSIX_signals_Clear_process_signals+0x4c> _Thread_Do_post_task_switch_extension--; 4e8ba: 53b9 0005 efa6 subql #1,5efa6 <_Thread_Do_post_task_switch_extension> } _ISR_Enable( level ); 4e8c0: 46c2 movew %d2,%sr } 4e8c2: 241f movel %sp@+,%d2 4e8c4: 261f movel %sp@+,%d3 4e8c6: 4e5e unlk %fp 4e8c8: 4e75 rts ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4e8ca: 0680 0005 f5aa addil #390570,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e8d0: 2040 moveal %d0,%a0 4e8d2: 5888 addql #4,%a0 4e8d4: 2240 moveal %d0,%a1 4e8d6: b1d1 cmpal %a1@,%a0 4e8d8: 67ca beqs 4e8a4 <_POSIX_signals_Clear_process_signals+0x30> if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 4e8da: 46c2 movew %d2,%sr <== NOT EXECUTED } 4e8dc: 241f movel %sp@+,%d2 <== NOT EXECUTED 4e8de: 261f movel %sp@+,%d3 <== NOT EXECUTED 4e8e0: 4e5e unlk %fp <== NOT EXECUTED 4e8e2: 4e75 rts 0004d708 <_POSIX_signals_Clear_signals>: static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4d708: 7001 moveq #1,%d0 int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4d70a: 4e56 ffe8 linkw %fp,#-24 4d70e: 206e 0008 moveal %fp@(8),%a0 4d712: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4d716: 242e 000c movel %fp@(12),%d2 4d71a: 2202 movel %d2,%d1 4d71c: 5381 subql #1,%d1 4d71e: 1a2e 0017 moveb %fp@(23),%d5 4d722: e3a8 lsll %d1,%d0 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4d724: 4a2e 001b tstb %fp@(27) 4d728: 664e bnes 4d778 <_POSIX_signals_Clear_signals+0x70> 4d72a: 78ff moveq #-1,%d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4d72c: 223c 0000 0700 movel #1792,%d1 4d732: 40c3 movew %sr,%d3 4d734: 8283 orl %d3,%d1 4d736: 46c1 movew %d1,%sr if ( is_global ) { 4d738: 4a05 tstb %d5 4d73a: 6752 beqs 4d78e <_POSIX_signals_Clear_signals+0x86> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4d73c: c0b9 0005 f5a6 andl 5f5a6 <_POSIX_signals_Pending>,%d0 4d742: c084 andl %d4,%d0 4d744: 676a beqs 4d7b0 <_POSIX_signals_Clear_signals+0xa8> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4d746: 2202 movel %d2,%d1 4d748: 2002 movel %d2,%d0 4d74a: 47f9 0004 e874 lea 4e874 <_POSIX_signals_Clear_process_signals>,%a3 4d750: 41f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a0 4d756: e589 lsll #2,%d1 4d758: e988 lsll #4,%d0 4d75a: 9081 subl %d1,%d0 4d75c: 7202 moveq #2,%d1 4d75e: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1 4d762: 675a beqs 4d7be <_POSIX_signals_Clear_signals+0xb6> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4d764: 2f02 movel %d2,%sp@- 4d766: 4e93 jsr %a3@ 4d768: 588f addql #4,%sp 4d76a: 7001 moveq #1,%d0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4d76c: 46c3 movew %d3,%sr return do_callout; } 4d76e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d774: 4e5e unlk %fp 4d776: 4e75 rts /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 4d778: 2828 00cc movel %a0@(204),%d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4d77c: 223c 0000 0700 movel #1792,%d1 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 4d782: 4684 notl %d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4d784: 40c3 movew %sr,%d3 4d786: 8283 orl %d3,%d1 4d788: 46c1 movew %d1,%sr if ( is_global ) { 4d78a: 4a05 tstb %d5 4d78c: 66ae bnes 4d73c <_POSIX_signals_Clear_signals+0x34> } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4d78e: 2428 00d0 movel %a0@(208),%d2 4d792: 2200 movel %d0,%d1 4d794: c282 andl %d2,%d1 4d796: c284 andl %d4,%d1 4d798: 6716 beqs 4d7b0 <_POSIX_signals_Clear_signals+0xa8> api->signals_pending &= ~mask; 4d79a: 4680 notl %d0 4d79c: c082 andl %d2,%d0 4d79e: 2140 00d0 movel %d0,%a0@(208) 4d7a2: 7001 moveq #1,%d0 do_callout = true; } } _ISR_Enable( level ); 4d7a4: 46c3 movew %d3,%sr return do_callout; } 4d7a6: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d7ac: 4e5e unlk %fp 4d7ae: 4e75 rts _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4d7b0: 4200 clrb %d0 do_callout = true; } } _ISR_Enable( level ); 4d7b2: 46c3 movew %d3,%sr return do_callout; } 4d7b4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d7ba: 4e5e unlk %fp 4d7bc: 4e75 rts _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4d7be: 0680 0005 f5aa addil #390570,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4d7c4: 2040 moveal %d0,%a0 4d7c6: 2458 moveal %a0@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d7c8: b1ca cmpal %a2,%a0 4d7ca: 6744 beqs 4d810 <_POSIX_signals_Clear_signals+0x108> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4d7cc: 2052 moveal %a2@,%a0 the_chain->first = new_first; 4d7ce: 2240 moveal %d0,%a1 4d7d0: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4d7d2: 2140 0004 movel %d0,%a0@(4) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4d7d6: 2f02 movel %d2,%sp@- 4d7d8: 4e93 jsr %a3@ * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info; 4d7da: 206e 0010 moveal %fp@(16),%a0 the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node; 4d7de: 588f addql #4,%sp 4d7e0: 20ea 0008 movel %a2@(8),%a0@+ 4d7e4: 20ea 000c movel %a2@(12),%a0@+ 4d7e8: 20aa 0010 movel %a2@(16),%a0@ Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4d7ec: 24bc 0005 f536 movel #390454,%a2@ old_last_node = the_chain->last; 4d7f2: 2279 0005 f53a moveal 5f53a <_POSIX_signals_Inactive_siginfo+0x8>,%a1 the_chain->last = the_node; 4d7f8: 23ca 0005 f53a movel %a2,5f53a <_POSIX_signals_Inactive_siginfo+0x8> old_last_node->next = the_node; the_node->previous = old_last_node; 4d7fe: 2549 0004 movel %a1,%a2@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4d802: 228a movel %a2,%a1@ &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4d804: 2f02 movel %d2,%sp@- 4d806: 4e93 jsr %a3@ 4d808: 588f addql #4,%sp 4d80a: 7001 moveq #1,%d0 4d80c: 6000 ff5e braw 4d76c <_POSIX_signals_Clear_signals+0x64> if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4d810: 2f02 movel %d2,%sp@- 4d812: 4e93 jsr %a3@ 4d814: 588f addql #4,%sp &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4d816: 2f02 movel %d2,%sp@- 4d818: 4e93 jsr %a3@ 4d81a: 588f addql #4,%sp 4d81c: 7001 moveq #1,%d0 4d81e: 6000 ff4c braw 4d76c <_POSIX_signals_Clear_signals+0x64> ... 0004e8e4 <_POSIX_signals_Set_process_signals>: sigset_t mask ) { ISR_Level level; _ISR_Disable( level ); 4e8e4: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Set_process_signals( sigset_t mask ) { 4e8ea: 4e56 0000 linkw %fp,#0 ISR_Level level; _ISR_Disable( level ); 4e8ee: 40c1 movew %sr,%d1 4e8f0: 8081 orl %d1,%d0 4e8f2: 46c0 movew %d0,%sr if ( !_POSIX_signals_Pending ) 4e8f4: 2039 0005 f5a6 movel 5f5a6 <_POSIX_signals_Pending>,%d0 4e8fa: 6606 bnes 4e902 <_POSIX_signals_Set_process_signals+0x1e> _Thread_Do_post_task_switch_extension++; 4e8fc: 52b9 0005 efa6 addql #1,5efa6 <_Thread_Do_post_task_switch_extension> _POSIX_signals_Pending |= mask; 4e902: 80ae 0008 orl %fp@(8),%d0 4e906: 23c0 0005 f5a6 movel %d0,5f5a6 <_POSIX_signals_Pending> _ISR_Enable( level ); 4e90c: 46c1 movew %d1,%sr } 4e90e: 4e5e unlk %fp 4e910: 4e75 rts ... 00045b88 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 45b88: 4e56 0000 linkw %fp,#0 /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 45b8c: 4eb9 0004 2a2c jsr 42a2c 45b92: 4878 000e pea e 45b96: 2f00 movel %d0,%sp@- 45b98: 4eb9 0004 5884 jsr 45884 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 45b9e: 4879 0006 10da pea 610da <_POSIX_signals_Ualarm_timer> 45ba4: 4eb9 0004 96ec jsr 496ec <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45baa: 4fef 000c lea %sp@(12),%sp 45bae: 203c 0006 10da movel #397530,%d0 45bb4: 2d40 000c movel %d0,%fp@(12) 45bb8: 203c 0006 098c movel #395660,%d0 45bbe: 2d40 0008 movel %d0,%fp@(8) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 45bc2: 4e5e unlk %fp 45bc4: 4ef9 0004 95a4 jmp 495a4 <_Watchdog_Insert> ... 0004e914 <_POSIX_signals_Unblock_thread>: 4e914: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4e916: 4e56 fff4 linkw %fp,#-12 4e91a: 222e 000c movel %fp@(12),%d1 4e91e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4e922: 246e 0008 moveal %fp@(8),%a2 4e926: 2601 movel %d1,%d3 4e928: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4e92a: 242a 0010 movel %a2@(16),%d2 4e92e: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4e934: 226e 0010 moveal %fp@(16),%a1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e938: 206a 010e moveal %a2@(270),%a0 4e93c: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4e93e: 0c82 1000 8000 cmpil #268468224,%d2 4e944: 6772 beqs 4e9b8 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 4e946: 2228 00cc movel %a0@(204),%d1 4e94a: 4681 notl %d1 4e94c: c081 andl %d1,%d0 4e94e: 675c beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4e950: 202a 0010 movel %a2@(16),%d0 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 4e954: 7201 moveq #1,%d1 4e956: 1541 0074 moveb %d1,%a2@(116) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4e95a: 0800 001c btst #28,%d0 4e95e: 6736 beqs 4e996 <_POSIX_signals_Unblock_thread+0x82> the_thread->Wait.return_code = EINTR; 4e960: 7004 moveq #4,%d0 4e962: 2540 0034 movel %d0,%a2@(52) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 4e966: 103c 0008 moveb #8,%d0 4e96a: c0aa 0010 andl %a2@(16),%d0 4e96e: 673c beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4e970: 7202 moveq #2,%d1 4e972: b2aa 0050 cmpl %a2@(80),%d1 4e976: 6700 00a4 beqw 4ea1c <_POSIX_signals_Unblock_thread+0x108> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4e97a: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 4e980: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e982: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> <== NOT EXECUTED 4e988: 508f addql #8,%sp <== NOT EXECUTED 4e98a: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4e98c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e992: 4e5e unlk %fp 4e994: 4e75 rts if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 4e996: 4a80 tstl %d0 4e998: 6612 bnes 4e9ac <_POSIX_signals_Unblock_thread+0x98> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4e99a: 2039 0005 ef9e movel 5ef9e <_ISR_Nest_level>,%d0 4e9a0: 670a beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98> 4e9a2: b5f9 0005 efbe cmpal 5efbe <_Thread_Executing>,%a2 4e9a8: 6700 0094 beqw 4ea3e <_POSIX_signals_Unblock_thread+0x12a> _ISR_Signals_to_thread_executing = true; } } return false; } 4e9ac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4e9b2: 4200 clrb %d0 } } return false; } 4e9b4: 4e5e unlk %fp 4e9b6: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4e9b8: 2400 movel %d0,%d2 4e9ba: c4aa 0030 andl %a2@(48),%d2 4e9be: 672a beqs 4e9ea <_POSIX_signals_Unblock_thread+0xd6> the_thread->Wait.return_code = EINTR; 4e9c0: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4e9c2: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4e9c6: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4e9ca: 4a89 tstl %a1 4e9cc: 6734 beqs 4ea02 <_POSIX_signals_Unblock_thread+0xee> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 4e9ce: 20d9 movel %a1@+,%a0@+ 4e9d0: 20d9 movel %a1@+,%a0@+ 4e9d2: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 4e9d4: 2f0a movel %a2,%sp@- 4e9d6: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy> return true; 4e9dc: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4e9de: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4e9e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e9e6: 4e5e unlk %fp 4e9e8: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4e9ea: 2428 00cc movel %a0@(204),%d2 4e9ee: 4682 notl %d2 4e9f0: c082 andl %d2,%d0 4e9f2: 67b8 beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98> the_thread->Wait.return_code = EINTR; 4e9f4: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4e9f6: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4e9fa: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4e9fe: 4a89 tstl %a1 4ea00: 66cc bnes 4e9ce <_POSIX_signals_Unblock_thread+0xba> the_info->si_signo = signo; 4ea02: 2081 movel %d1,%a0@ the_info->si_code = SI_USER; 4ea04: 7201 moveq #1,%d1 the_info->si_value.sival_int = 0; 4ea06: 42a8 0008 clrl %a0@(8) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 4ea0a: 2141 0004 movel %d1,%a0@(4) the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ea0e: 2f0a movel %a2,%sp@- 4ea10: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy> return true; 4ea16: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ea18: 7001 moveq #1,%d0 4ea1a: 60c4 bras 4e9e0 <_POSIX_signals_Unblock_thread+0xcc> _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4ea1c: 486a 0048 pea %a2@(72) 4ea20: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4ea26: 588f addql #4,%sp 4ea28: 2f3c 1003 fff8 movel #268697592,%sp@- 4ea2e: 2f0a movel %a2,%sp@- 4ea30: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> 4ea36: 508f addql #8,%sp 4ea38: 4200 clrb %d0 4ea3a: 6000 ff50 braw 4e98c <_POSIX_signals_Unblock_thread+0x78> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4ea3e: 7001 moveq #1,%d0 } } return false; } 4ea40: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ea46: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4ea48: 13c0 0005 f04c moveb %d0,5f04c <_ISR_Signals_to_thread_executing> 4ea4e: 4200 clrb %d0 } } return false; } 4ea50: 4e75 rts ... 0004bf8c <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 4bf8c: 4e56 fffc linkw %fp,#-4 void *p; _RTEMS_Lock_allocator(); 4bf90: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bf96: 4eb9 0004 6704 jsr 46704 <_API_Mutex_Lock> p = _Heap_Allocate_aligned_with_boundary( 4bf9c: 2f2e 0014 movel %fp@(20),%sp@- 4bfa0: 2f2e 0010 movel %fp@(16),%sp@- 4bfa4: 2f2e 000c movel %fp@(12),%sp@- 4bfa8: 2f2e 0008 movel %fp@(8),%sp@- 4bfac: 4eb9 0004 bc54 jsr 4bc54 <_Heap_Allocate_aligned_with_boundary> heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 4bfb2: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bfb8: 2d40 fffc movel %d0,%fp@(-4) 4bfbc: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock> return p; } 4bfc2: 202e fffc movel %fp@(-4),%d0 4bfc6: 4e5e unlk %fp 4bfc8: 4e75 rts ... 0004bfcc <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 4bfcc: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 4bfd0: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bfd6: 4eb9 0004 6704 jsr 46704 <_API_Mutex_Lock> status = _Heap_Free( the_heap, start_address ); 4bfdc: 2f2e 000c movel %fp@(12),%sp@- 4bfe0: 2f2e 0008 movel %fp@(8),%sp@- 4bfe4: 4eb9 0004 bde8 jsr 4bde8 <_Heap_Free> _RTEMS_Unlock_allocator(); 4bfea: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bff0: 2d40 fffc movel %d0,%fp@(-4) 4bff4: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock> return status; } 4bffa: 202e fffc movel %fp@(-4),%d0 4bffe: 4e5e unlk %fp 4c000: 4e75 rts ... 0005b958 <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { 5b958: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 5b95c: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 5b962: 4eb9 0004 6704 jsr 46704 <_API_Mutex_Lock> status = _Heap_Size_of_alloc_area( the_heap, starting_address, size ); 5b968: 2f2e 0010 movel %fp@(16),%sp@- 5b96c: 2f2e 000c movel %fp@(12),%sp@- 5b970: 2f2e 0008 movel %fp@(8),%sp@- 5b974: 4eb9 0005 bac8 jsr 5bac8 <_Heap_Size_of_alloc_area> _RTEMS_Unlock_allocator(); 5b97a: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 5b980: 2d40 fffc movel %d0,%fp@(-4) 5b984: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock> return status; } 5b98a: 202e fffc movel %fp@(-4),%d0 5b98e: 4e5e unlk %fp 5b990: 4e75 rts ... 0004cafc <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4cafc: 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 ) { 4cb00: 2039 0006 50b0 movel 650b0 <_Thread_Dispatch_disable_level>,%d0 bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4cb06: 48d7 001c moveml %d2-%d4,%sp@ 4cb0a: 242e 0008 movel %fp@(8),%d2 4cb0e: 282e 000c movel %fp@(12),%d4 4cb12: 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 ) { 4cb16: 4a80 tstl %d0 4cb18: 6720 beqs 4cb3a <_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 ); 4cb1a: 2d44 000c movel %d4,%fp@(12) 4cb1e: 0283 0000 00ff andil #255,%d3 4cb24: 2d42 0008 movel %d2,%fp@(8) 4cb28: 2d43 0010 movel %d3,%fp@(16) } return status; } 4cb2c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cb32: 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 ); 4cb34: 4ef9 0004 bbc8 jmp 4bbc8 <_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(); 4cb3a: 2f39 0006 5162 movel 65162 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4cb40: 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(); 4cb46: 4eb9 0004 ad8c jsr 4ad8c <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4cb4c: 2f03 movel %d3,%sp@- 4cb4e: 2f04 movel %d4,%sp@- 4cb50: 2f02 movel %d2,%sp@- 4cb52: 4eb9 0004 bbc8 jsr 4bbc8 <_Heap_Walk> _RTEMS_Unlock_allocator(); 4cb58: 2f39 0006 5162 movel 65162 <_RTEMS_Allocator_Mutex>,%sp@- 4cb5e: 2d40 fffc movel %d0,%fp@(-4) 4cb62: 4eb9 0004 adec jsr 4adec <_API_Mutex_Unlock> } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4cb68: 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(); 4cb6c: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4cb70: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cb76: 4e5e unlk %fp 4cb78: 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 d74a moveal 5d74a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 4615e: 2639 0005 d746 movel 5d746 ,%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 6fcc jsr 46fcc <_Internal_error_Occurred> ... 0006abd0 <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { 6abd0: 4e56 fff8 linkw %fp,#-8 Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); 6abd4: 486e fff8 pea %fp@(-8) 6abd8: 4eb9 0006 ab34 jsr 6ab34 <_TOD_Get_uptime> _Timestamp_To_timespec( &uptime_ts, uptime ); 6abde: 206e 0008 moveal %fp@(8),%a0 6abe2: 588f addql #4,%sp 6abe4: 202e fff8 movel %fp@(-8),%d0 6abe8: 222e fffc movel %fp@(-4),%d1 } 6abec: 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 ); 6abee: 2080 movel %d0,%a0@ 6abf0: 2141 0004 movel %d1,%a0@(4) } 6abf4: 4e75 rts ... 00046bbc <_TOD_Handler_initialization>: * * Output parameters: NONE */ void _TOD_Handler_initialization(void) { 46bbc: 4e56 0000 linkw %fp,#0 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 46bc0: 4200 clrb %d0 _TOD_Activate(); } 46bc2: 4e5e unlk %fp /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 46bc4: 13c0 0005 ef18 moveb %d0,5ef18 <_TOD_Is_set> */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); 46bca: 203c 21da e500 movel #567993600,%d0 46bd0: 42b9 0005 ef9a clrl 5ef9a <_TOD_Now+0x4> 46bd6: 23c0 0005 ef96 movel %d0,5ef96 <_TOD_Now> /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); 46bdc: 42b9 0005 ef82 clrl 5ef82 <_TOD_Uptime> 46be2: 42b9 0005 ef86 clrl 5ef86 <_TOD_Uptime+0x4> /* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); } 46be8: 4e75 rts ... 000485c8 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 485c8: 4e56 0000 linkw %fp,#0 485cc: 2039 0006 9514 movel 69514 <_Thread_Dispatch_disable_level>,%d0 485d2: 5280 addql #1,%d0 485d4: 2f0a movel %a2,%sp@- 485d6: 246e 0008 moveal %fp@(8),%a2 485da: 23c0 0006 9514 movel %d0,69514 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 485e0: 2039 0006 95a6 movel 695a6 <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 485e6: 2212 movel %a2@,%d1 485e8: b280 cmpl %d0,%d1 485ea: 6d38 blts 48624 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 485ec: 9280 subl %d0,%d1 485ee: 2f01 movel %d1,%sp@- 485f0: 42a7 clrl %sp@- 485f2: 4879 0006 95e0 pea 695e0 <_Watchdog_Seconds_chain> 485f8: 4eb9 0004 acac jsr 4acac <_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 ); 485fe: 23d2 0006 95a6 movel %a2@,695a6 <_TOD_Now> 48604: 588a addql #4,%a2 48606: 4fef 000c lea %sp@(12),%sp 4860a: 23d2 0006 95aa movel %a2@,695aa <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 48610: 246e fffc moveal %fp@(-4),%a2 48614: 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; 48616: 7001 moveq #1,%d0 48618: 13c0 0006 9528 moveb %d0,69528 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 4861e: 4ef9 0004 9910 jmp 49910 <_Thread_Enable_dispatch> 48624: 9081 subl %d1,%d0 48626: 2f00 movel %d0,%sp@- 48628: 4878 0001 pea 1 4862c: 4879 0006 95e0 pea 695e0 <_Watchdog_Seconds_chain> 48632: 4eb9 0004 acac jsr 4acac <_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 ); 48638: 23d2 0006 95a6 movel %a2@,695a6 <_TOD_Now> 4863e: 588a addql #4,%a2 48640: 4fef 000c lea %sp@(12),%sp 48644: 23d2 0006 95aa movel %a2@,695aa <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 4864a: 246e fffc moveal %fp@(-4),%a2 4864e: 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; 48650: 7001 moveq #1,%d0 48652: 13c0 0006 9528 moveb %d0,69528 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 48658: 4ef9 0004 9910 jmp 49910 <_Thread_Enable_dispatch> ... 000479e8 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 479e8: 327c 0700 moveaw #1792,%a1 479ec: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 479ee: 4e56 ffec linkw %fp,#-20 479f2: 206e 0008 moveal %fp@(8),%a0 479f6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 479fa: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 479fe: 40c3 movew %sr,%d3 47a00: 8083 orl %d3,%d0 47a02: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47a04: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47a08: 2002 movel %d2,%d0 47a0a: c081 andl %d1,%d0 47a0c: 6776 beqs 47a84 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 47a0e: 2002 movel %d2,%d0 47a10: 4680 notl %d0 47a12: c081 andl %d1,%d0 current_state = 47a14: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47a18: 666a bnes 47a84 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 47a1a: 2868 008e moveal %a0@(142),%a4 47a1e: 3028 0094 movew %a0@(148),%d0 47a22: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 47a24: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47a28: 240a movel %a2,%d2 47a2a: 5882 addql #4,%d2 47a2c: 8081 orl %d1,%d0 47a2e: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 47a30: 266a 0008 moveal %a2@(8),%a3 47a34: 3880 movew %d0,%a4@ the_chain->last = the_node; 47a36: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 47a3a: 3239 0005 efb4 movew 5efb4 <_Priority_Major_bit_map>,%d1 47a40: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 47a44: 214b 0004 movel %a3,%a0@(4) 47a48: 8081 orl %d1,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 47a4a: 2688 movel %a0,%a3@ 47a4c: 33c0 0005 efb4 movew %d0,5efb4 <_Priority_Major_bit_map> _ISR_Flash( level ); 47a52: 2009 movel %a1,%d0 47a54: 46c3 movew %d3,%sr 47a56: 8083 orl %d3,%d0 47a58: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 47a5a: 2028 0014 movel %a0@(20),%d0 47a5e: 2279 0005 ef92 moveal 5ef92 <_Thread_Heir>,%a1 47a64: b0a9 0014 cmpl %a1@(20),%d0 47a68: 641a bccs 47a84 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 47a6a: 23c8 0005 ef92 movel %a0,5ef92 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 47a70: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 47a76: 4a28 0075 tstb %a0@(117) 47a7a: 6712 beqs 47a8e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a7c: 7001 moveq #1,%d0 47a7e: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a84: 46c3 movew %d3,%sr } 47a86: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a8a: 4e5e unlk %fp 47a8c: 4e75 rts * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47a8e: 4a80 tstl %d0 47a90: 66f2 bnes 47a84 <_Thread_Clear_state+0x9c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a92: 7001 moveq #1,%d0 <== NOT EXECUTED 47a94: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> <== NOT EXECUTED 47a9a: 60e8 bras 47a84 <_Thread_Clear_state+0x9c> <== NOT EXECUTED 00047a9c <_Thread_Close>: 47a9c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a9e: 4e56 0000 linkw %fp,#0 47aa2: 2f0b movel %a3,%sp@- 47aa4: 266e 0008 moveal %fp@(8),%a3 47aa8: 2f0a movel %a2,%sp@- 47aaa: 246e 000c moveal %fp@(12),%a2 47aae: 206b 0018 moveal %a3@(24),%a0 47ab2: 302a 000a movew %a2@(10),%d0 47ab6: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47aba: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47ac0: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 47ac2: 2f0a movel %a2,%sp@- 47ac4: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> 47aca: 4eb9 0004 8e80 jsr 48e80 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47ad0: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47ad6: 5280 addql #1,%d0 47ad8: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 47ade: 2f0a movel %a2,%sp@- 47ae0: 2f0b movel %a3,%sp@- 47ae2: 4eb9 0004 7120 jsr 47120 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 47ae8: 4878 0001 pea 1 47aec: 2f0a movel %a2,%sp@- 47aee: 4eb9 0004 8710 jsr 48710 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy> 47afc: 4fef 0018 lea %sp@(24),%sp 47b00: 4a00 tstb %d0 47b02: 6608 bnes 47b0c <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47b04: 7002 moveq #2,%d0 47b06: b0aa 0050 cmpl %a2@(80),%d0 47b0a: 6756 beqs 47b62 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47b0c: b5f9 0005 ef8a cmpal 5ef8a <_Thread_Allocated_fp>,%a2 47b12: 6746 beqs 47b5a <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47b14: 202a 00c6 movel %a2@(198),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 47b18: 42aa 0102 clrl %a2@(258) if ( the_thread->Start.fp_context ) 47b1c: 4a80 tstl %d0 47b1e: 670a beqs 47b2a <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47b20: 2f00 movel %d0,%sp@- 47b22: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 47b28: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 47b2a: 2f0a movel %a2,%sp@- 47b2c: 4eb9 0004 890c jsr 4890c <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47b32: 202a 0116 movel %a2@(278),%d0 47b36: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 47b38: 42aa 00ca clrl %a2@(202) if ( the_thread->extensions ) 47b3c: 4a80 tstl %d0 47b3e: 670a beqs 47b4a <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47b40: 2f00 movel %d0,%sp@- 47b42: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 47b48: 588f addql #4,%sp the_thread->extensions = NULL; 47b4a: 42aa 0116 clrl %a2@(278) } 47b4e: 246e fff8 moveal %fp@(-8),%a2 47b52: 266e fffc moveal %fp@(-4),%a3 47b56: 4e5e unlk %fp 47b58: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47b5a: 42b9 0005 ef8a clrl 5ef8a <_Thread_Allocated_fp> 47b60: 60b2 bras 47b14 <_Thread_Close+0x78> */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 47b62: 486a 0048 pea %a2@(72) 47b66: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 47b6c: 588f addql #4,%sp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47b6e: b5f9 0005 ef8a cmpal 5ef8a <_Thread_Allocated_fp>,%a2 47b74: 669e bnes 47b14 <_Thread_Close+0x78> 47b76: 60e2 bras 47b5a <_Thread_Close+0xbe> <== NOT EXECUTED 00047b78 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 47b78: 4e56 0000 linkw %fp,#0 47b7c: 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 ); 47b7e: 4879 0005 f052 pea 5f052 <_Thread_Internal_information> 47b84: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47b8a: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 47b90: 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(); 47b92: 23c0 0005 f094 movel %d0,5f094 <_Thread_Idle> 47b98: 23c1 0005 ef04 movel %d1,5ef04 <_Thread_Dispatch_disable_level> * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 47b9e: 4282 clrl %d2 47ba0: 1439 0005 d752 moveb 5d752 ,%d2 47ba6: 2f3c 4944 4c45 movel #1229212741,%sp@- 47bac: 2239 0005 d76c movel 5d76c ,%d1 47bb2: 42a7 clrl %sp@- 47bb4: 2039 0005 d74e movel 5d74e ,%d0 47bba: 42a7 clrl %sp@- 47bbc: 42a7 clrl %sp@- 47bbe: 4878 0001 pea 1 47bc2: 2f02 movel %d2,%sp@- 47bc4: 42a7 clrl %sp@- 47bc6: b280 cmpl %d0,%d1 47bc8: 6302 blss 47bcc <_Thread_Create_idle+0x54> 47bca: 2001 movel %d1,%d0 47bcc: 2f00 movel %d0,%sp@- 47bce: 42a7 clrl %sp@- 47bd0: 2f39 0005 f094 movel 5f094 <_Thread_Idle>,%sp@- 47bd6: 4879 0005 f052 pea 5f052 <_Thread_Internal_information> 47bdc: 4eb9 0004 7e80 jsr 47e80 <_Thread_Initialize> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 47be2: 4fef 002c lea %sp@(44),%sp 47be6: 4297 clrl %sp@ */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47be8: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 47bee: 5381 subql #1,%d1 47bf0: 42a7 clrl %sp@- 47bf2: 2f39 0005 d768 movel 5d768 ,%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; 47bf8: 2039 0005 f094 movel 5f094 <_Thread_Idle>,%d0 _Thread_Start( 47bfe: 42a7 clrl %sp@- 47c00: 23c1 0005 ef04 movel %d1,5ef04 <_Thread_Dispatch_disable_level> 47c06: 2f00 movel %d0,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 47c08: 23c0 0005 efbe movel %d0,5efbe <_Thread_Executing> 47c0e: 23c0 0005 ef92 movel %d0,5ef92 <_Thread_Heir> _Thread_Executing = _Thread_Idle; _Thread_Start( 47c14: 4eb9 0004 8990 jsr 48990 <_Thread_Start> Configuration.idle_task, NULL, 0 ); } 47c1a: 242e fffc movel %fp@(-4),%d2 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 47c1e: 4fef 0014 lea %sp@(20),%sp Configuration.idle_task, NULL, 0 ); } 47c22: 4e5e unlk %fp 47c24: 4e75 rts ... 00047dbc <_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 ) { 47dbc: 4e56 0000 linkw %fp,#0 if ( --_Thread_Dispatch_disable_level ) 47dc0: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47dc6: 5380 subql #1,%d0 47dc8: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> 47dce: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47dd4: 6704 beqs 47dda <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 47dd6: 4e5e unlk %fp 47dd8: 4e75 rts 47dda: 4e5e unlk %fp (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 47ddc: 4ef9 0004 7c64 jmp 47c64 <_Thread_Dispatch> ... 0004df98 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4df98: 4e56 0000 linkw %fp,#0 4df9c: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4df9e: 2479 0005 efbe moveal 5efbe <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4dfa4: 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; 4dfa6: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4dfaa: 40c0 movew %sr,%d0 4dfac: e189 lsll #8,%d1 4dfae: 0280 0000 f8ff andil #63743,%d0 4dfb4: 8081 orl %d1,%d0 4dfb6: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4dfb8: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4dfba: 1439 0005 e6b4 moveb 5e6b4 ,%d2 doneConstructors = 1; 4dfc0: 13c0 0005 e6b4 moveb %d0,5e6b4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4dfc6: 4aaa 0102 tstl %a2@(258) 4dfca: 6720 beqs 4dfec <_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 ); 4dfcc: 2079 0005 ef8a moveal 5ef8a <_Thread_Allocated_fp>,%a0 4dfd2: b1ca cmpal %a2,%a0 4dfd4: 6716 beqs 4dfec <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4dfd6: 4a88 tstl %a0 4dfd8: 670c beqs 4dfe6 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4dfda: 4868 0102 pea %a0@(258) 4dfde: 4eb9 0004 93b6 jsr 493b6 <_CPU_Context_save_fp> 4dfe4: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4dfe6: 23ca 0005 ef8a movel %a2,5ef8a <_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 ); 4dfec: 2f0a movel %a2,%sp@- 4dfee: 4eb9 0004 8d64 jsr 48d64 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4dff4: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 4dffa: 588f addql #4,%sp 4dffc: 4a02 tstb %d2 4dffe: 6724 beqs 4e024 <_Thread_Handler+0x8c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e000: 202a 009e movel %a2@(158),%d0 4e004: 672a beqs 4e030 <_Thread_Handler+0x98> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4e006: 7201 moveq #1,%d1 4e008: b280 cmpl %d0,%d1 4e00a: 674c beqs 4e058 <_Thread_Handler+0xc0> * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4e00c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e00e: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4e014: 4878 0006 pea 6 <== NOT EXECUTED 4e018: 4878 0001 pea 1 <== NOT EXECUTED 4e01c: 42a7 clrl %sp@- <== NOT EXECUTED 4e01e: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4e024: 4eb9 0005 bbc4 jsr 5bbc4 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e02a: 202a 009e movel %a2@(158),%d0 4e02e: 66d6 bnes 4e006 <_Thread_Handler+0x6e> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4e030: 2f2a 00a6 movel %a2@(166),%sp@- 4e034: 206a 009a moveal %a2@(154),%a0 4e038: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4e03a: 588f addql #4,%sp 4e03c: 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 ); 4e040: 2f0a movel %a2,%sp@- 4e042: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e048: 4878 0006 pea 6 4e04c: 4878 0001 pea 1 4e050: 42a7 clrl %sp@- 4e052: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4e058: 2f2a 00a2 movel %a2@(162),%sp@- 4e05c: 206a 009a moveal %a2@(154),%a0 4e060: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4e062: 588f addql #4,%sp 4e064: 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 ); 4e068: 2f0a movel %a2,%sp@- 4e06a: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e070: 4878 0006 pea 6 <== NOT EXECUTED 4e074: 4878 0001 pea 1 <== NOT EXECUTED 4e078: 42a7 clrl %sp@- <== NOT EXECUTED 4e07a: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED 000480c8 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 480c8: 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) 480cc: 4ab9 0005 d778 tstl 5d778 480d2: 57c0 seq %d0 480d4: 4ab9 0005 d774 tstl 5d774 480da: 57c1 seq %d1 480dc: 4480 negl %d0 480de: 4481 negl %d1 480e0: b380 eorl %d1,%d0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 480e2: 2239 0005 d764 movel 5d764 ,%d1 maximum_extensions = Configuration.maximum_extensions; 480e8: 2079 0005 d75c moveal 5d75c ,%a0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 480ee: 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) 480f0: 4a00 tstb %d0 480f2: 6600 00a2 bnew 48196 <_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( 480f6: 4280 clrl %d0 480f8: 1039 0005 d752 moveb 5d752 ,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 480fe: 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( 48100: 5280 addql #1,%d0 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 48102: 23c1 0005 eeb4 movel %d1,5eeb4 <_Thread_Ticks_per_timeslice> _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48108: 2200 movel %d0,%d1 4810a: e588 lsll #2,%d0 4810c: e989 lsll #4,%d1 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 4810e: 23c8 0005 efa2 movel %a0,5efa2 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48114: 9280 subl %d0,%d1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 48116: 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( 48118: 2f01 movel %d1,%sp@- INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 4811a: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> _Thread_Executing = NULL; 48120: 42b9 0005 efbe clrl 5efbe <_Thread_Executing> _Thread_Heir = NULL; 48126: 42b9 0005 ef92 clrl 5ef92 <_Thread_Heir> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 4812c: 42b9 0005 ef8a clrl 5ef8a <_Thread_Allocated_fp> #endif _Thread_Do_post_task_switch_extension = 0; 48132: 42b9 0005 efa6 clrl 5efa6 <_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( 48138: 4eb9 0004 91b0 jsr 491b0 <_Workspace_Allocate_or_fatal_error> (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4813e: 588f addql #4,%sp 48140: 1439 0005 d752 moveb 5d752 ,%d2 48146: 2040 moveal %d0,%a0 48148: 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( 4814a: 23c0 0005 eeb0 movel %d0,5eeb0 <_Thread_Ready_chain> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48150: 2008 movel %a0,%d0 48152: 5880 addql #4,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48154: 5281 addql #1,%d1 48156: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 48158: 42a8 0004 clrl %a0@(4) the_chain->last = _Chain_Head(the_chain); 4815c: 2148 0008 movel %a0,%a0@(8) 48160: 41e8 000c lea %a0@(12),%a0 48164: b481 cmpl %d1,%d2 48166: 64e8 bccs 48150 <_Thread_Handler_initialization+0x88> /* * Initialize this class of objects. */ _Objects_Initialize_information( 48168: 4878 0008 pea 8 4816c: 42a7 clrl %sp@- 4816e: 4878 011e pea 11e 48172: 4878 0001 pea 1 48176: 4878 0001 pea 1 4817a: 4878 0001 pea 1 4817e: 4879 0005 f052 pea 5f052 <_Thread_Internal_information> 48184: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4818a: 242e fffc movel %fp@(-4),%d2 /* * Initialize this class of objects. */ _Objects_Initialize_information( 4818e: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 48192: 4e5e unlk %fp 48194: 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( 48196: 4878 000f pea f 4819a: 4878 0001 pea 1 4819e: 42a7 clrl %sp@- 481a0: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ... 0004c2f0 <_Thread_Ready>: */ void _Thread_Ready( Thread_Control *the_thread ) { 4c2f0: 4e56 ffec linkw %fp,#-20 4c2f4: 206e 0008 moveal %fp@(8),%a0 4c2f8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); 4c2fc: 243c 0000 0700 movel #1792,%d2 4c302: 2002 movel %d2,%d0 4c304: 40c1 movew %sr,%d1 4c306: 8081 orl %d1,%d0 4c308: 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; 4c30a: 2668 008e moveal %a0@(142),%a3 4c30e: 3028 0094 movew %a0@(148),%d0 4c312: 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 ); 4c314: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c318: 2809 movel %a1,%d4 4c31a: 5884 addql #4,%d4 4c31c: 8083 orl %d3,%d0 4c31e: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4c320: 2469 0008 moveal %a1@(8),%a2 4c324: 3680 movew %d0,%a3@ the_chain->last = the_node; 4c326: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c32a: 3639 0005 efb4 movew 5efb4 <_Priority_Major_bit_map>,%d3 4c330: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c334: 214a 0004 movel %a2,%a0@(4) 4c338: 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; 4c33a: 2488 movel %a0,%a2@ 4c33c: 33c0 0005 efb4 movew %d0,5efb4 <_Priority_Major_bit_map> ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY; 4c342: 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 ); 4c346: 2002 movel %d2,%d0 4c348: 46c1 movew %d1,%sr 4c34a: 8081 orl %d1,%d0 4c34c: 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 ); 4c34e: 3039 0005 efb4 movew 5efb4 <_Priority_Major_bit_map>,%d0 4c354: 4840 swap %d0 4c356: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4c358: 4282 clrl %d2 4c35a: 41f9 0005 f024 lea 5f024 <_Priority_Bit_map>,%a0 4c360: 3400 movew %d0,%d2 4c362: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4c366: 4840 swap %d0 4c368: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4c36a: 4283 clrl %d3 4c36c: e98a lsll #4,%d2 4c36e: 3600 movew %d0,%d3 4c370: 2279 0005 eeb0 moveal 5eeb0 <_Thread_Ready_chain>,%a1 4c376: 2002 movel %d2,%d0 4c378: d083 addl %d3,%d0 4c37a: 2400 movel %d0,%d2 4c37c: e58a lsll #2,%d2 4c37e: e988 lsll #4,%d0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 4c380: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4c386: 93c2 subal %d2,%a1 4c388: 2031 0800 movel %a1@(00000000,%d0:l),%d0 4c38c: 23c0 0005 ef92 movel %d0,5ef92 <_Thread_Heir> _Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) 4c392: b1c0 cmpal %d0,%a0 4c394: 670e beqs 4c3a4 <_Thread_Ready+0xb4> 4c396: 4a28 0075 tstb %a0@(117) 4c39a: 6708 beqs 4c3a4 <_Thread_Ready+0xb4> _Context_Switch_necessary = true; 4c39c: 7001 moveq #1,%d0 4c39e: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> _ISR_Enable( level ); 4c3a4: 46c1 movew %d1,%sr } 4c3a6: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4c3aa: 4e5e unlk %fp 4c3ac: 4e75 rts ... 0004d094 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4d094: 4e56 0000 linkw %fp,#0 4d098: 2f0a movel %a2,%sp@- 4d09a: 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; 4d09e: 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; 4d0a4: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4d0aa: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4d0b0: 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; 4d0b6: 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; 4d0bc: 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 ) ) { 4d0c0: 2f0a movel %a2,%sp@- 4d0c2: 4eb9 0004 9130 jsr 49130 <_Thread_queue_Extract_with_proxy> 4d0c8: 588f addql #4,%sp 4d0ca: 4a00 tstb %d0 4d0cc: 6608 bnes 4d0d6 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4d0ce: 7002 moveq #2,%d0 4d0d0: b0aa 0050 cmpl %a2@(80),%d0 4d0d4: 672a beqs 4d100 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4d0d6: 202a 00b8 movel %a2@(184),%d0 4d0da: b0aa 0014 cmpl %a2@(20),%d0 4d0de: 6718 beqs 4d0f8 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d0e0: 2d4a 0008 movel %a2,%fp@(8) 4d0e4: 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; 4d0e8: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4d0ec: 246e fffc moveal %fp@(-4),%a2 4d0f0: 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 ); 4d0f2: 4ef9 0004 9340 jmp 49340 <_Thread_Set_priority> } } 4d0f8: 246e fffc moveal %fp@(-4),%a2 4d0fc: 4e5e unlk %fp 4d0fe: 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 ); 4d100: 486a 0048 pea %a2@(72) 4d104: 4eb9 0004 9d78 jsr 49d78 <_Watchdog_Remove> 4d10a: 588f addql #4,%sp 4d10c: 60c8 bras 4d0d6 <_Thread_Reset+0x42> ... 000492b4 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 492b4: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 492b6: 4e56 0000 linkw %fp,#0 492ba: 2f0a movel %a2,%sp@- 492bc: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 492c0: c0aa 0010 andl %a2@(16),%d0 492c4: 4a00 tstb %d0 492c6: 670a beqs 492d2 <_Thread_Restart+0x1e> return true; } return false; } 492c8: 246e fffc moveal %fp@(-4),%a2 492cc: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 492ce: 4200 clrb %d0 return true; } return false; } 492d0: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 492d2: 2f0a movel %a2,%sp@- 492d4: 4eb9 0004 94c4 jsr 494c4 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 492da: 2f2e 0010 movel %fp@(16),%sp@- 492de: 2f2e 000c movel %fp@(12),%sp@- 492e2: 2f0a movel %a2,%sp@- 492e4: 4eb9 0004 d094 jsr 4d094 <_Thread_Reset> _Thread_Load_environment( the_thread ); 492ea: 2f0a movel %a2,%sp@- 492ec: 4eb9 0004 cce8 jsr 4cce8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 492f2: 2f0a movel %a2,%sp@- 492f4: 4eb9 0004 cfd4 jsr 4cfd4 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 492fa: 2f0a movel %a2,%sp@- 492fc: 4eb9 0004 9b68 jsr 49b68 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 49302: 4fef 001c lea %sp@(28),%sp 49306: b5f9 0005 ff56 cmpal 5ff56 <_Thread_Executing>,%a2 4930c: 670a beqs 49318 <_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 ); 4930e: 7001 moveq #1,%d0 return true; } return false; } 49310: 246e fffc moveal %fp@(-4),%a2 49314: 4e5e unlk %fp 49316: 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 ) 49318: 4aaa 0102 tstl %a2@(258) 4931c: 6712 beqs 49330 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4931e: 486a 0102 pea %a2@(258) 49322: 4eb9 0004 a0d2 jsr 4a0d2 <_CPU_Context_restore_fp> 49328: 2479 0005 ff56 moveal 5ff56 <_Thread_Executing>,%a2 4932e: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49330: 486a 00ce pea %a2@(206) 49334: 4eb9 0004 9f7a jsr 49f7a <_CPU_Context_Restart_self> 4933a: 588f addql #4,%sp <== NOT EXECUTED 4933c: 7001 moveq #1,%d0 <== NOT EXECUTED 4933e: 60d0 bras 49310 <_Thread_Restart+0x5c> <== NOT EXECUTED 0004c7c0 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c7c0: 327c 0700 moveaw #1792,%a1 4c7c4: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c7c6: 4e56 ffec linkw %fp,#-20 4c7ca: 206e 0008 moveal %fp@(8),%a0 4c7ce: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c7d2: 40c1 movew %sr,%d1 4c7d4: 8081 orl %d1,%d0 4c7d6: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c7d8: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c7dc: 0800 0001 btst #1,%d0 4c7e0: 6774 beqs 4c856 <_Thread_Resume+0x96> 4c7e2: 74fd moveq #-3,%d2 4c7e4: c082 andl %d2,%d0 current_state = 4c7e6: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c7ea: 666a bnes 4c856 <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c7ec: 2868 008e moveal %a0@(142),%a4 4c7f0: 3028 0094 movew %a0@(148),%d0 4c7f4: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c7f6: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c7fa: 260a movel %a2,%d3 4c7fc: 5883 addql #4,%d3 4c7fe: 8082 orl %d2,%d0 4c800: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c802: 266a 0008 moveal %a2@(8),%a3 4c806: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c808: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c80c: 3439 0006 4c2c movew 64c2c <_Priority_Major_bit_map>,%d2 4c812: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c816: 214b 0004 movel %a3,%a0@(4) 4c81a: 8082 orl %d2,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4c81c: 2688 movel %a0,%a3@ 4c81e: 33c0 0006 4c2c movew %d0,64c2c <_Priority_Major_bit_map> _ISR_Flash( level ); 4c824: 2009 movel %a1,%d0 4c826: 46c1 movew %d1,%sr 4c828: 8081 orl %d1,%d0 4c82a: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c82c: 2028 0014 movel %a0@(20),%d0 4c830: 2279 0006 4c0a moveal 64c0a <_Thread_Heir>,%a1 4c836: b0a9 0014 cmpl %a1@(20),%d0 4c83a: 641a bccs 4c856 <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c83c: 23c8 0006 4c0a movel %a0,64c0a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c842: 2079 0006 4c36 moveal 64c36 <_Thread_Executing>,%a0 4c848: 4a28 0075 tstb %a0@(117) 4c84c: 6712 beqs 4c860 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c84e: 7001 moveq #1,%d0 4c850: 13c0 0006 4c46 moveb %d0,64c46 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c856: 46c1 movew %d1,%sr } 4c858: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c85c: 4e5e unlk %fp 4c85e: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c860: 4a80 tstl %d0 4c862: 66f2 bnes 4c856 <_Thread_Resume+0x96> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c864: 7001 moveq #1,%d0 <== NOT EXECUTED 4c866: 13c0 0006 4c46 moveb %d0,64c46 <_Context_Switch_necessary> <== NOT EXECUTED 4c86c: 60e8 bras 4c856 <_Thread_Resume+0x96> <== NOT EXECUTED ... 00048940 <_Thread_Start_multitasking>: 48940: 7003 moveq #3,%d0 * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 48942: 4e56 0000 linkw %fp,#0 _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; _Thread_Executing = _Thread_Heir; 48946: 2079 0005 ef92 moveal 5ef92 <_Thread_Heir>,%a0 4894c: 23c0 0005 f08c movel %d0,5f08c <_System_state_Current> * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 48952: 4200 clrb %d0 _Thread_Executing = _Thread_Heir; 48954: 23c8 0005 efbe movel %a0,5efbe <_Thread_Executing> * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 4895a: 13c0 0005 efce moveb %d0,5efce <_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 ) 48960: 4aa8 0102 tstl %a0@(258) 48964: 6712 beqs 48978 <_Thread_Start_multitasking+0x38> _Context_Restore_fp( &_Thread_Heir->fp_context ); 48966: 4868 0102 pea %a0@(258) 4896a: 4eb9 0004 93ee jsr 493ee <_CPU_Context_restore_fp> 48970: 2079 0005 ef92 moveal 5ef92 <_Thread_Heir>,%a0 48976: 588f addql #4,%sp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 48978: 4868 00ce pea %a0@(206) 4897c: 4879 0005 eed0 pea 5eed0 <_Thread_BSP_context> 48982: 4eb9 0004 9280 jsr 49280 <_CPU_Context_switch> 48988: 508f addql #8,%sp } 4898a: 4e5e unlk %fp 4898c: 4e75 rts ... 00048b78 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b78: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48b7c: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b82: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48b86: 243c 0000 0700 movel #1792,%d2 48b8c: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48b8e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48b92: 40c1 movew %sr,%d1 48b94: 8081 orl %d1,%d0 48b96: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48b98: 2029 0008 movel %a1@(8),%d0 48b9c: b091 cmpl %a1@,%d0 48b9e: 6750 beqs 48bf0 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48ba0: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48ba2: 2009 movel %a1,%d0 48ba4: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48ba6: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48baa: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48bac: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48bb0: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48bb2: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48bb6: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48bba: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 48bbe: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48bc0: 46c1 movew %d1,%sr 48bc2: 8481 orl %d1,%d2 48bc4: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48bc6: b1f9 0005 ef92 cmpal 5ef92 <_Thread_Heir>,%a0 48bcc: 6712 beqs 48be0 <_Thread_Yield_processor+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48bce: 7001 moveq #1,%d0 <== NOT EXECUTED 48bd0: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48bd6: 46c1 movew %d1,%sr } 48bd8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48bdc: 4e5e unlk %fp 48bde: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48be0: 23d1 0005 ef92 movel %a1@,5ef92 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48be6: 7001 moveq #1,%d0 48be8: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> 48bee: 60e6 bras 48bd6 <_Thread_Yield_processor+0x5e> if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48bf0: b1f9 0005 ef92 cmpal 5ef92 <_Thread_Heir>,%a0 48bf6: 67de beqs 48bd6 <_Thread_Yield_processor+0x5e> _Context_Switch_necessary = true; 48bf8: 7001 moveq #1,%d0 <== NOT EXECUTED 48bfa: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> <== NOT EXECUTED 48c00: 60d4 bras 48bd6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... 00047834 <_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 ) ) { 47834: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 47836: 4e56 0000 linkw %fp,#0 4783a: 202e 0010 movel %fp@(16),%d0 4783e: 2f0a movel %a2,%sp@- 47840: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 47844: 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 ) ) { 47848: b2aa 0050 cmpl %a2@(80),%d1 4784c: 671c beqs 4786a <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4784e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47850: 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 } 47854: 246e fffc moveal %fp@(-4),%a2 47858: 203c 1003 fff8 movel #268697592,%d0 4785e: 2d40 000c movel %d0,%fp@(12) 47862: 4e5e unlk %fp 47864: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4786a: 123c 0003 moveb #3,%d1 4786e: 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 ); 47872: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47874: 486a 0048 pea %a2@(72) 47878: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4787e: 588f addql #4,%sp 47880: 203c 1003 fff8 movel #268697592,%d0 47886: 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 } 4788a: 246e fffc moveal %fp@(-4),%a2 4788e: 2d40 000c movel %d0,%fp@(12) 47892: 4e5e unlk %fp 47894: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ... 000481a8 <_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 ) 481a8: 41f9 0004 8210 lea 48210 <_Thread_queue_Dequeue_priority>,%a0 481ae: 7001 moveq #1,%d0 */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 481b0: 4e56 fff4 linkw %fp,#-12 481b4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 481b8: 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 ) 481bc: b0aa 0034 cmpl %a2@(52),%d0 481c0: 6706 beqs 481c8 <_Thread_queue_Dequeue+0x20> 481c2: 41f9 0004 c088 lea 4c088 <_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 ); 481c8: 2f0a movel %a2,%sp@- 481ca: 4e90 jsr %a0@ _ISR_Disable( level ); 481cc: 223c 0000 0700 movel #1792,%d1 481d2: 40c2 movew %sr,%d2 481d4: 8282 orl %d2,%d1 481d6: 46c1 movew %d1,%sr if ( !the_thread ) { 481d8: 588f addql #4,%sp 481da: 4a80 tstl %d0 481dc: 670c beqs 481ea <_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 ); 481de: 46c2 movew %d2,%sr return the_thread; } 481e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 481e6: 4e5e unlk %fp 481e8: 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; 481ea: 222a 0030 movel %a2@(48),%d1 481ee: 7601 moveq #1,%d3 481f0: 5381 subql #1,%d1 481f2: b681 cmpl %d1,%d3 481f4: 65e8 bcss 481de <_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; 481f6: 7203 moveq #3,%d1 the_thread = _Thread_Executing; 481f8: 2039 0005 efbe movel 5efbe <_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; 481fe: 2541 0030 movel %d1,%a2@(48) the_thread = _Thread_Executing; } } _ISR_Enable( level ); 48202: 46c2 movew %d2,%sr return the_thread; } 48204: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4820a: 4e5e unlk %fp 4820c: 4e75 rts ... 0004c088 <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4c088: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4c08e: 4e56 0000 linkw %fp,#0 4c092: 226e 0008 moveal %fp@(8),%a1 4c096: 2f0b movel %a3,%sp@- 4c098: 2f0a movel %a2,%sp@- ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4c09a: 40c1 movew %sr,%d1 4c09c: 8081 orl %d1,%d0 4c09e: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4c0a0: 2049 moveal %a1,%a0 4c0a2: 2458 moveal %a0@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c0a4: b1ca cmpal %a2,%a0 4c0a6: 6768 beqs 4c110 <_Thread_queue_Dequeue_fifo+0x88> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4c0a8: 2052 moveal %a2@,%a0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) 4c0aa: 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 ) ) { 4c0ac: 7002 moveq #2,%d0 the_chain->first = new_first; 4c0ae: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4c0b0: 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; 4c0b4: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c0b8: b0aa 0050 cmpl %a2@(80),%d0 4c0bc: 6720 beqs 4c0de <_Thread_queue_Dequeue_fifo+0x56> _ISR_Enable( level ); 4c0be: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4c0c0: 2f3c 1003 fff8 movel #268697592,%sp@- 4c0c6: 2f0a movel %a2,%sp@- 4c0c8: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> return the_thread; } _ISR_Enable( level ); return NULL; } 4c0ce: 246e fff8 moveal %fp@(-8),%a2 4c0d2: 200b movel %a3,%d0 4c0d4: 508f addql #8,%sp 4c0d6: 266e fffc moveal %fp@(-4),%a3 4c0da: 4e5e unlk %fp 4c0dc: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4c0de: 7003 moveq #3,%d0 4c0e0: 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 ); 4c0e4: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c0e6: 486a 0048 pea %a2@(72) 4c0ea: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4c0f0: 2f3c 1003 fff8 movel #268697592,%sp@- 4c0f6: 2f0a movel %a2,%sp@- 4c0f8: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> return the_thread; } _ISR_Enable( level ); return NULL; } 4c0fe: 246e fff8 moveal %fp@(-8),%a2 4c102: 200b movel %a3,%d0 4c104: 4fef 000c lea %sp@(12),%sp 4c108: 266e fffc moveal %fp@(-4),%a3 4c10c: 4e5e unlk %fp 4c10e: 4e75 rts #endif return the_thread; } _ISR_Enable( level ); 4c110: 46c1 movew %d1,%sr 4c112: 97cb subal %a3,%a3 return NULL; } 4c114: 200b movel %a3,%d0 4c116: 246e fff8 moveal %fp@(-8),%a2 4c11a: 266e fffc moveal %fp@(-4),%a3 4c11e: 4e5e unlk %fp 4c120: 4e75 rts ... 0004c124 <_Thread_queue_Enqueue_fifo>: ) { Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4c124: 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 ) { 4c12a: 4e56 0000 linkw %fp,#0 4c12e: 206e 0008 moveal %fp@(8),%a0 4c132: 2f0a movel %a2,%sp@- 4c134: 226e 000c moveal %fp@(12),%a1 4c138: 2f02 movel %d2,%sp@- Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4c13a: 40c1 movew %sr,%d1 4c13c: 8081 orl %d1,%d0 4c13e: 46c0 movew %d0,%sr sync_state = the_thread_queue->sync_state; 4c140: 2028 0030 movel %a0@(48),%d0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4c144: 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; 4c146: 42a8 0030 clrl %a0@(48) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4c14a: b480 cmpl %d0,%d2 4c14c: 670e beqs 4c15c <_Thread_queue_Enqueue_fifo+0x38> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 4c14e: 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; 4c150: 206e 0010 moveal %fp@(16),%a0 return sync_state; } 4c154: 245f moveal %sp@+,%a2 4c156: 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; 4c158: 2081 movel %d1,%a0@ return sync_state; } 4c15a: 4e75 rts Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c15c: 2408 movel %a0,%d2 4c15e: 5882 addql #4,%d2 4c160: 2282 movel %d2,%a1@ old_last_node = the_chain->last; 4c162: 2468 0008 moveal %a0@(8),%a2 the_chain->last = the_node; 4c166: 2149 0008 movel %a1,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4c16a: 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; 4c16e: 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; 4c172: 2489 movel %a1,%a2@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 4c174: 46c1 movew %d1,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 4c176: 241f movel %sp@+,%d2 4c178: 245f moveal %sp@+,%a2 4c17a: 4e5e unlk %fp 4c17c: 4e75 rts ... 000483a4 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 483a4: 4e56 ffe4 linkw %fp,#-28 483a8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 483ac: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 483b0: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 483b4: 263c 0000 0700 movel #1792,%d3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 483ba: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 483be: 2401 movel %d1,%d2 483c0: ec8a lsrl #6,%d2 483c2: 2002 movel %d2,%d0 483c4: e58a lsll #2,%d2 483c6: e988 lsll #4,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 483c8: 286e 0008 moveal %fp@(8),%a4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 483cc: 9082 subl %d2,%d0 483ce: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 483d2: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 483d6: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 483da: 242c 0038 movel %a4@(56),%d2 483de: 2748 0040 movel %a0,%a3@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 483e2: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 483e6: 0801 0005 btst #5,%d1 483ea: 6656 bnes 48442 <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 483ec: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 483ee: 2803 movel %d3,%d4 483f0: 5885 addql #4,%d5 483f2: 2004 movel %d4,%d0 483f4: 40c3 movew %sr,%d3 483f6: 8083 orl %d3,%d0 483f8: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 483fa: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 483fc: ba88 cmpl %a0,%d5 483fe: 6700 010a beqw 4850a <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 48402: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 48406: b3c1 cmpal %d1,%a1 48408: 6418 bccs 48422 <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4840a: 2004 movel %d4,%d0 4840c: 46c3 movew %d3,%sr 4840e: 8083 orl %d3,%d0 48410: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48412: 2002 movel %d2,%d0 48414: c0a8 0010 andl %a0@(16),%d0 48418: 6700 0092 beqw 484ac <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 4841c: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4841e: ba88 cmpl %a0,%d5 48420: 66e0 bnes 48402 <_Thread_queue_Enqueue_priority+0x5e> 48422: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48424: 7001 moveq #1,%d0 48426: b0ac 0030 cmpl %a4@(48),%d0 4842a: 6700 0094 beqw 484c0 <_Thread_queue_Enqueue_priority+0x11c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4842e: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 48432: 202c 0030 movel %a4@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 48436: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48438: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4843c: 4e5e unlk %fp 4843e: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48440: 46c4 movew %d4,%sr the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48442: 4284 clrl %d4 48444: 1839 0005 d752 moveb 5d752 ,%d4 _ISR_Disable( level ); 4844a: 2003 movel %d3,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4844c: 2244 moveal %d4,%a1 4844e: 5289 addql #1,%a1 _ISR_Disable( level ); 48450: 40c4 movew %sr,%d4 48452: 8084 orl %d4,%d0 48454: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 48456: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4845a: b5c8 cmpal %a0,%a2 4845c: 6720 beqs 4847e <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 4845e: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 48462: b3c1 cmpal %d1,%a1 48464: 6318 blss 4847e <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 48466: 2003 movel %d3,%d0 48468: 46c4 movew %d4,%sr 4846a: 8084 orl %d4,%d0 4846c: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4846e: 2002 movel %d2,%d0 48470: c0a8 0010 andl %a0@(16),%d0 48474: 67ca beqs 48440 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 48476: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4847a: b5c8 cmpal %a0,%a2 4847c: 66e0 bnes 4845e <_Thread_queue_Enqueue_priority+0xba> 4847e: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48480: 7001 moveq #1,%d0 48482: b0ac 0030 cmpl %a4@(48),%d0 48486: 66a6 bnes 4842e <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48488: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 4848c: b3c1 cmpal %d1,%a1 4848e: 6756 beqs 484e6 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48490: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 48492: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 48496: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48498: 274c 0044 movel %a4,%a3@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 4849c: 208b movel %a3,%a0@ next_node->previous = the_node; 4849e: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484a2: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484a4: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484a8: 4e5e unlk %fp 484aa: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 484ac: 46c3 movew %d3,%sr <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 484ae: 2004 movel %d4,%d0 <== NOT EXECUTED 484b0: 40c3 movew %sr,%d3 <== NOT EXECUTED 484b2: 8083 orl %d3,%d0 <== NOT EXECUTED 484b4: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 484b6: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 484b8: ba88 cmpl %a0,%d5 <== NOT EXECUTED 484ba: 6600 ff46 bnew 48402 <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 484be: 604a bras 4850a <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 484c0: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 484c4: b3c1 cmpal %d1,%a1 484c6: 671e beqs 484e6 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 484c8: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484cc: 2688 movel %a0,%a3@ the_node->previous = previous_node; 484ce: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 484d2: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 484d6: 228b movel %a3,%a1@ search_node->previous = the_node; 484d8: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484dc: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484de: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484e2: 4e5e unlk %fp 484e4: 4e75 rts 484e6: 41e8 003c lea %a0@(60),%a0 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 484ea: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484ee: 2688 movel %a0,%a3@ the_node->previous = previous_node; 484f0: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 484f4: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 484f8: 228b movel %a3,%a1@ search_node->previous = the_node; 484fa: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484fe: 46c2 movew %d2,%sr 48500: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48502: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48506: 4e5e unlk %fp 48508: 4e75 rts restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4850a: 2403 movel %d3,%d2 4850c: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48510: 7001 moveq #1,%d0 48512: b0ac 0030 cmpl %a4@(48),%d0 48516: 6600 ff16 bnew 4842e <_Thread_queue_Enqueue_priority+0x8a> 4851a: 60a4 bras 484c0 <_Thread_queue_Enqueue_priority+0x11c> 00048308 <_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 ) { 48308: 4e56 fff0 linkw %fp,#-16 4830c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48310: 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 ); 48314: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 48318: 2479 0005 efbe moveal 5efbe <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 4831e: 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 ); 48322: 2f0a movel %a2,%sp@- 48324: 4eb9 0004 8710 jsr 48710 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 4832a: 508f addql #8,%sp 4832c: 4a82 tstl %d2 4832e: 6644 bnes 48374 <_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 ) 48330: 41f9 0004 83a4 lea 483a4 <_Thread_queue_Enqueue_priority>,%a0 48336: 7001 moveq #1,%d0 48338: b0ab 0034 cmpl %a3@(52),%d0 4833c: 6706 beqs 48344 <_Thread_queue_Enqueue_with_handler+0x3c> 4833e: 41f9 0004 c124 lea 4c124 <_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 ); 48344: 486e fffc pea %fp@(-4) 48348: 2f0a movel %a2,%sp@- 4834a: 2f0b movel %a3,%sp@- 4834c: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 4834e: 4fef 000c lea %sp@(12),%sp 48352: 7201 moveq #1,%d1 48354: b280 cmpl %d0,%d1 48356: 6712 beqs 4836a <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 48358: 2f2e fffc movel %fp@(-4),%sp@- 4835c: 2f0a movel %a2,%sp@- 4835e: 2f00 movel %d0,%sp@- 48360: 4eb9 0004 7834 jsr 47834 <_Thread_blocking_operation_Cancel> 48366: 4fef 000c lea %sp@(12),%sp } 4836a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48370: 4e5e unlk %fp 48372: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 48374: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 48378: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 4837e: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 48382: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 48386: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4838a: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4838e: 486a 0048 pea %a2@(72) 48392: 4879 0005 efdc pea 5efdc <_Watchdog_Ticks_chain> 48398: 4eb9 0004 8f4c jsr 48f4c <_Watchdog_Insert> 4839e: 508f addql #8,%sp 483a0: 608e bras 48330 <_Thread_queue_Enqueue_with_handler+0x28> ... 0004e080 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4e080: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4e086: 4e56 0000 linkw %fp,#0 4e08a: 2f0a movel %a2,%sp@- 4e08c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4e090: 40c1 movew %sr,%d1 4e092: 8081 orl %d1,%d0 4e094: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4e096: 202a 0010 movel %a2@(16),%d0 4e09a: 0280 0003 bee0 andil #245472,%d0 4e0a0: 6734 beqs 4e0d6 <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e0a2: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e0a4: 7002 moveq #2,%d0 previous = the_node->previous; 4e0a6: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4e0aa: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4e0ae: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4e0b0: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e0b4: b0aa 0050 cmpl %a2@(80),%d0 4e0b8: 6726 beqs 4e0e0 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4e0ba: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4e0bc: 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 } 4e0c0: 246e fffc moveal %fp@(-4),%a2 4e0c4: 203c 1003 fff8 movel #268697592,%d0 4e0ca: 2d40 000c movel %d0,%fp@(12) 4e0ce: 4e5e unlk %fp 4e0d0: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4e0d6: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4e0d8: 246e fffc moveal %fp@(-4),%a2 4e0dc: 4e5e unlk %fp 4e0de: 4e75 rts 4e0e0: 7003 moveq #3,%d0 4e0e2: 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 ); 4e0e6: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4e0e8: 486a 0048 pea %a2@(72) 4e0ec: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4e0f2: 588f addql #4,%sp 4e0f4: 203c 1003 fff8 movel #268697592,%d0 4e0fa: 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 } 4e0fe: 246e fffc moveal %fp@(-4),%a2 4e102: 2d40 000c movel %d0,%fp@(12) 4e106: 4e5e unlk %fp 4e108: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ... 0004c1b8 <_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 ); 4c1b8: 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 ) { 4c1be: 4e56 ffec linkw %fp,#-20 4c1c2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4c1c6: 246e 000c moveal %fp@(12),%a2 4c1ca: 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 ); 4c1ce: 40c1 movew %sr,%d1 4c1d0: 8081 orl %d1,%d0 4c1d2: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c1d4: 202a 0010 movel %a2@(16),%d0 4c1d8: 0280 0003 bee0 andil #245472,%d0 4c1de: 677e beqs 4c25e <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c1e0: 200a movel %a2,%d0 4c1e2: 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; 4c1e8: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4c1ea: 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)); 4c1ee: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c1f2: b088 cmpl %a0,%d0 4c1f4: 6774 beqs 4c26a <_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; 4c1f6: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4c1fa: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4c1fc: 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; 4c200: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4c202: 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; 4c206: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4c208: 202a 0040 movel %a2@(64),%d0 4c20c: b0aa 0038 cmpl %a2@(56),%d0 4c210: 6716 beqs 4c228 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4c212: 43e8 0038 lea %a0@(56),%a1 4c216: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4c21a: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4c21e: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4c222: 41e8 003c lea %a0@(60),%a0 4c226: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c228: 4a02 tstb %d2 4c22a: 6626 bnes 4c252 <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c22c: 7002 moveq #2,%d0 4c22e: b0aa 0050 cmpl %a2@(80),%d0 4c232: 6742 beqs 4c276 <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4c234: 46c1 movew %d1,%sr 4c236: 2d4a 0008 movel %a2,%fp@(8) 4c23a: 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 } 4c240: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c246: 2d49 000c movel %a1,%fp@(12) 4c24a: 4e5e unlk %fp 4c24c: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4c252: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c254: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c25a: 4e5e unlk %fp 4c25c: 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 ); 4c25e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c260: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c266: 4e5e unlk %fp 4c268: 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; 4c26a: 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; 4c26e: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c270: 4a02 tstb %d2 4c272: 67b8 beqs 4c22c <_Thread_queue_Extract_priority_helper+0x74> 4c274: 60dc bras 4c252 <_Thread_queue_Extract_priority_helper+0x9a> 4c276: 7003 moveq #3,%d0 4c278: 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 ); 4c27c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c27e: 486a 0048 pea %a2@(72) 4c282: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4c288: 588f addql #4,%sp 4c28a: 227c 1003 fff8 moveal #268697592,%a1 4c290: 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 } 4c294: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c29a: 2d49 000c movel %a1,%fp@(12) 4c29e: 4e5e unlk %fp 4c2a0: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ... 0004a7b8 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 4a7b8: 4280 clrl %d0 4a7ba: 4e56 0000 linkw %fp,#0 4a7be: 226e 0008 moveal %fp@(8),%a1 4a7c2: 2049 moveal %a1,%a0 4a7c4: 2208 movel %a0,%d1 4a7c6: 5881 addql #4,%d1 4a7c8: b290 cmpl %a0@,%d1 4a7ca: 6612 bnes 4a7de <_Thread_queue_First_priority+0x26> uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 4a7cc: 5280 addql #1,%d0 4a7ce: 41e8 000c lea %a0@(12),%a0 Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 4a7d2: 7204 moveq #4,%d1 4a7d4: b280 cmpl %d0,%d1 4a7d6: 66ec bnes 4a7c4 <_Thread_queue_First_priority+0xc> 4a7d8: 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; } 4a7da: 4e5e unlk %fp 4a7dc: 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 *) 4a7de: 2200 movel %d0,%d1 the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 4a7e0: 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 *) 4a7e2: e588 lsll #2,%d0 4a7e4: e989 lsll #4,%d1 4a7e6: 9280 subl %d0,%d1 4a7e8: 2031 1800 movel %a1@(00000000,%d1:l),%d0 the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 4a7ec: 4e75 rts ... 00048548 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 48548: 4e56 fff4 linkw %fp,#-12 4854c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48550: 242e 0008 movel %fp@(8),%d2 48554: 45f9 0004 81a8 lea 481a8 <_Thread_queue_Dequeue>,%a2 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 4855a: 2f02 movel %d2,%sp@- #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 4855c: 262e 0010 movel %fp@(16),%d3 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 48560: 4e92 jsr %a2@ 48562: 588f addql #4,%sp 48564: 4a80 tstl %d0 48566: 6710 beqs 48578 <_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; 48568: 2040 moveal %d0,%a0 4856a: 2143 0034 movel %d3,%a0@(52) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 4856e: 2f02 movel %d2,%sp@- 48570: 4e92 jsr %a2@ 48572: 588f addql #4,%sp 48574: 4a80 tstl %d0 48576: 66f0 bnes 48568 <_Thread_queue_Flush+0x20> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 48578: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4857e: 4e5e unlk %fp 48580: 4e75 rts ... 00048584 <_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 ) { 48584: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 48586: 4e56 0000 linkw %fp,#0 4858a: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 4858e: 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 ) { 48594: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 48598: 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; 4859e: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 485a2: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 485a6: b280 cmpl %d0,%d1 485a8: 6712 beqs 485bc <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485aa: 2008 movel %a0,%d0 485ac: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485ae: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485b2: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 485b4: 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 ); } } 485b8: 4e5e unlk %fp 485ba: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 485bc: 2008 movel %a0,%d0 485be: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485c4: 2208 movel %a0,%d1 485c6: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 485c8: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485cc: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485ce: 2148 0008 movel %a0,%a0@(8) 485d2: 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 ; 485d6: b088 cmpl %a0,%d0 485d8: 67de beqs 485b8 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485da: 2208 movel %a0,%d1 485dc: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 485de: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485e2: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485e4: 2148 0008 movel %a0,%a0@(8) 485e8: 41e8 000c lea %a0@(12),%a0 485ec: b088 cmpl %a0,%d0 485ee: 66d4 bnes 485c4 <_Thread_queue_Initialize+0x40> 485f0: 60c6 bras 485b8 <_Thread_queue_Initialize+0x34> ... 000485f4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 485f4: 4e56 fff0 linkw %fp,#-16 485f8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 485fc: 246e 0008 moveal %fp@(8),%a2 48600: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 48604: 4a8a tstl %a2 48606: 6708 beqs 48610 <_Thread_queue_Requeue+0x1c> /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 48608: 7001 moveq #1,%d0 4860a: b0aa 0034 cmpl %a2@(52),%d0 4860e: 670a beqs 4861a <_Thread_queue_Requeue+0x26> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 48610: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 48616: 4e5e unlk %fp <== NOT EXECUTED 48618: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 4861a: 303c 0700 movew #1792,%d0 4861e: 40c2 movew %sr,%d2 48620: 8082 orl %d2,%d0 48622: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48624: 202b 0010 movel %a3@(16),%d0 48628: 0280 0003 bee0 andil #245472,%d0 4862e: 660c bnes 4863c <_Thread_queue_Requeue+0x48> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 48630: 46c2 movew %d2,%sr <== NOT EXECUTED } } 48632: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48638: 4e5e unlk %fp 4863a: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 4863c: 4878 0001 pea 1 48640: 7001 moveq #1,%d0 48642: 2f0b movel %a3,%sp@- 48644: 2540 0030 movel %d0,%a2@(48) 48648: 2f0a movel %a2,%sp@- 4864a: 4eb9 0004 c1b8 jsr 4c1b8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48650: 486e fffc pea %fp@(-4) 48654: 2f0b movel %a3,%sp@- 48656: 2f0a movel %a2,%sp@- 48658: 4eb9 0004 83a4 jsr 483a4 <_Thread_queue_Enqueue_priority> 4865e: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 48662: 46c2 movew %d2,%sr 48664: 60cc bras 48632 <_Thread_queue_Requeue+0x3e> ... 00048668 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 48668: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4866c: 486e fffc pea %fp@(-4) 48670: 2f2e 0008 movel %fp@(8),%sp@- 48674: 4eb9 0004 7de4 jsr 47de4 <_Thread_Get> switch ( location ) { 4867a: 508f addql #8,%sp 4867c: 4aae fffc tstl %fp@(-4) 48680: 6618 bnes 4869a <_Thread_queue_Timeout+0x32> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 48682: 2f00 movel %d0,%sp@- 48684: 4eb9 0004 c2a8 jsr 4c2a8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4868a: 588f addql #4,%sp 4868c: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 48692: 5380 subql #1,%d0 48694: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4869a: 4e5e unlk %fp 4869c: 4e75 rts ... 0004b5cc <_Timer_Manager_initialization>: * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { 4b5cc: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4b5d0: 4878 0004 pea 4 4b5d4: 42a7 clrl %sp@- 4b5d6: 4878 003c pea 3c 4b5da: 2f39 0005 d726 movel 5d726 ,%sp@- 4b5e0: 4878 0002 pea 2 4b5e4: 4878 0002 pea 2 4b5e8: 4879 0005 f8f4 pea 5f8f4 <_Timer_Information> 4b5ee: 4eb9 0004 7598 jsr 47598 <_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; 4b5f4: 4fef 001c lea %sp@(28),%sp } 4b5f8: 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; 4b5fa: 42b9 0005 f92e clrl 5f92e <_Timer_server> } 4b600: 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 d6f8 lea 5d6f8 <_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 9f08 lea 59f08 <_Chain_Get>,%a3 59484: 49f9 0005 d788 lea 5d788 <_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 e89c movel 7e89c <_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 e7ea movel 7e7ea <_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 e89c movel 7e89c <_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 e7ea movel 7e7ea <_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 d6f8 jsr 5d6f8 <_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 d664 jsr 5d664 <_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 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 e758 movel %d0,7e758 <_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 cd7c jsr 5cd7c <_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 c2bc jsr 5c2bc <_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 d8d0 jsr 5d8d0 <_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 d8d0 jsr 5d8d0 <_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 9ed0 jmp 59ed0 <_Chain_Append> <== NOT EXECUTED 596b8: 2039 0007 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 e758 movel %d0,7e758 <_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 c2bc jmp 5c2bc <_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 e7ea movel 7e7ea <_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 d788 jsr 5d788 <_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 c2bc jmp 5c2bc <_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 e89c movel 7e89c <_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 d788 jsr 5d788 <_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 c2bc jmp 5c2bc <_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> 0004a880 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a880: 4e56 ffdc linkw %fp,#-36 4a884: 206e 0008 moveal %fp@(8),%a0 4a888: 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; 4a88c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 4a892: 45f9 0005 c7e0 lea 5c7e0 <__muldi3>,%a2 4a898: 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; 4a89a: 2828 0004 movel %a0@(4),%d4 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a89e: 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; 4a8a2: 2f13 movel %a3@,%sp@- 4a8a4: 5bc0 smi %d0 4a8a6: 49c0 extbl %d0 4a8a8: 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; 4a8aa: 2a10 movel %a0@,%d5 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a8ac: 4e92 jsr %a2@ const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a8ae: 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; 4a8b2: 2040 moveal %d0,%a0 4a8b4: 2241 moveal %d1,%a1 4a8b6: 4fef 0010 lea %sp@(16),%sp right += rhs->tv_nsec; 4a8ba: 262b 0004 movel %a3@(4),%d3 4a8be: 5bc2 smi %d2 4a8c0: 49c2 extbl %d2 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a8c2: 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; 4a8c6: 2208 movel %a0,%d1 4a8c8: d689 addl %a1,%d3 4a8ca: d581 addxl %d1,%d2 if ( right == 0 ) { 4a8cc: 6700 008a beqw 4a958 <_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; 4a8d0: 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; 4a8d6: 2c3c 0005 c848 movel #378952,%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; 4a8dc: 42a7 clrl %sp@- 4a8de: 2f05 movel %d5,%sp@- 4a8e0: 5bc1 smi %d1 4a8e2: 49c1 extbl %d1 4a8e4: 2f01 movel %d1,%sp@- * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a8e6: 2a04 movel %d4,%d5 4a8e8: 5bc4 smi %d4 4a8ea: 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; 4a8ec: 4e92 jsr %a2@ 4a8ee: 4fef 0010 lea %sp@(16),%sp 4a8f2: 2241 moveal %d1,%a1 4a8f4: 2040 moveal %d0,%a0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a8f6: 2f3c 0001 86a0 movel #100000,%sp@- 4a8fc: 2008 movel %a0,%d0 4a8fe: 2209 movel %a1,%d1 4a900: 42a7 clrl %sp@- 4a902: d285 addl %d5,%d1 4a904: d184 addxl %d4,%d0 4a906: 2f01 movel %d1,%sp@- 4a908: 2f00 movel %d0,%sp@- 4a90a: 4e92 jsr %a2@ 4a90c: 4fef 000c lea %sp@(12),%sp 4a910: 2046 moveal %d6,%a0 4a912: 2e83 movel %d3,%sp@ 4a914: 2f02 movel %d2,%sp@- 4a916: 2f01 movel %d1,%sp@- 4a918: 2f00 movel %d0,%sp@- 4a91a: 4e90 jsr %a0@ 4a91c: 4fef 0010 lea %sp@(16),%sp *ival_percentage = answer / 1000; 4a920: 2046 moveal %d6,%a0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a922: 2440 moveal %d0,%a2 *ival_percentage = answer / 1000; 4a924: 4878 03e8 pea 3e8 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a928: 2641 moveal %d1,%a3 *ival_percentage = answer / 1000; 4a92a: 42a7 clrl %sp@- 4a92c: 2f01 movel %d1,%sp@- 4a92e: 2f0a movel %a2,%sp@- 4a930: 4e90 jsr %a0@ 4a932: 4fef 0010 lea %sp@(16),%sp *fval_percentage = answer % 1000; 4a936: 4878 03e8 pea 3e8 4a93a: 42a7 clrl %sp@- * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4a93c: 2a81 movel %d1,%a5@ *fval_percentage = answer % 1000; 4a93e: 2f0b movel %a3,%sp@- 4a940: 2f0a movel %a2,%sp@- 4a942: 4eb9 0005 cbe4 jsr 5cbe4 <__umoddi3> 4a948: 4fef 0010 lea %sp@(16),%sp 4a94c: 2881 movel %d1,%a4@ } 4a94e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a954: 4e5e unlk %fp 4a956: 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; 4a958: 4295 clrl %a5@ *fval_percentage = 0; 4a95a: 4294 clrl %a4@ answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 4a95c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a962: 4e5e unlk %fp 4a964: 4e75 rts ... 0007c140 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 7c140: 4e56 0000 linkw %fp,#0 7c144: 226e 0008 moveal %fp@(8),%a1 7c148: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 7c14c: 2211 movel %a1@,%d1 7c14e: 2010 movel %a0@,%d0 7c150: b081 cmpl %d1,%d0 7c152: 6d18 blts 7c16c <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 7c154: 6e10 bgts 7c166 <_Timespec_Greater_than+0x26> #include #include #include bool _Timespec_Greater_than( 7c156: 2068 0004 moveal %a0@(4),%a0 7c15a: b1e9 0004 cmpal %a1@(4),%a0 7c15e: 5dc0 slt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7c160: 4e5e unlk %fp #include #include #include bool _Timespec_Greater_than( 7c162: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7c164: 4e75 rts 7c166: 4e5e unlk %fp ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 7c168: 4200 clrb %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7c16a: 4e75 rts 7c16c: 4e5e unlk %fp bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 7c16e: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7c170: 4e75 rts ... 00066ba0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 66ba0: 4e56 0000 linkw %fp,#0 66ba4: 206e 0008 moveal %fp@(8),%a0 if ( !time ) 66ba8: 4a88 tstl %a0 66baa: 6718 beqs 66bc4 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 66bac: 4a90 tstl %a0@ 66bae: 6d14 blts 66bc4 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 66bb0: 2028 0004 movel %a0@(4),%d0 66bb4: 6d0e blts 66bc4 <_Timespec_Is_valid+0x24> if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 66bb6: 4e5e unlk %fp #include #include #include bool _Timespec_Is_valid( 66bb8: 0c80 3b9a c9ff cmpil #999999999,%d0 66bbe: 53c0 sls %d0 66bc0: 4480 negl %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 66bc2: 4e75 rts 66bc4: 4e5e unlk %fp #include #include #include bool _Timespec_Is_valid( 66bc6: 4200 clrb %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 66bc8: 4e75 rts ... 0007c174 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 7c174: 4e56 0000 linkw %fp,#0 7c178: 226e 0008 moveal %fp@(8),%a1 7c17c: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec < rhs->tv_sec ) 7c180: 2211 movel %a1@,%d1 7c182: 2010 movel %a0@,%d0 7c184: b081 cmpl %d1,%d0 7c186: 6e18 bgts 7c1a0 <_Timespec_Less_than+0x2c> return true; if ( lhs->tv_sec > rhs->tv_sec ) 7c188: 6d10 blts 7c19a <_Timespec_Less_than+0x26> #include #include #include bool _Timespec_Less_than( 7c18a: 2068 0004 moveal %a0@(4),%a0 7c18e: b1e9 0004 cmpal %a1@(4),%a0 7c192: 5ec0 sgt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7c194: 4e5e unlk %fp #include #include #include bool _Timespec_Less_than( 7c196: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7c198: 4e75 rts 7c19a: 4e5e unlk %fp ) { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) 7c19c: 4200 clrb %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7c19e: 4e75 rts 7c1a0: 4e5e unlk %fp bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 7c1a2: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7c1a4: 4e75 rts ... 0004c494 <_User_extensions_Add_set>: #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4c494: 4e56 0000 linkw %fp,#0 4c498: 2f0b movel %a3,%sp@- _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4c49a: 47f9 0004 6798 lea 46798 <_Chain_Append>,%a3 #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4c4a0: 2f0a movel %a2,%sp@- 4c4a2: 246e 0008 moveal %fp@(8),%a2 _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4c4a6: 2f0a movel %a2,%sp@- 4c4a8: 4879 0005 f098 pea 5f098 <_User_extensions_List> 4c4ae: 4e93 jsr %a3@ /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4c4b0: 202a 0024 movel %a2@(36),%d0 4c4b4: 508f addql #8,%sp 4c4b6: 6712 beqs 4c4ca <_User_extensions_Add_set+0x36> the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append( 4c4b8: 486a 0008 pea %a2@(8) 4c4bc: 4879 0005 ef08 pea 5ef08 <_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 = 4c4c2: 2540 0010 movel %d0,%a2@(16) the_extension->Callouts.thread_switch; _Chain_Append( 4c4c6: 4e93 jsr %a3@ 4c4c8: 508f addql #8,%sp &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 4c4ca: 246e fff8 moveal %fp@(-8),%a2 4c4ce: 266e fffc moveal %fp@(-4),%a3 4c4d2: 4e5e unlk %fp 4c4d4: 4e75 rts ... 00048ca0 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48ca0: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48ca4: 203c 0005 f09c movel #389276,%d0 48caa: 23c0 0005 f098 movel %d0,5f098 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48cb0: 203c 0005 f098 movel #389272,%d0 48cb6: 23c0 0005 f0a0 movel %d0,5f0a0 <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48cbc: 203c 0005 ef0c movel #388876,%d0 48cc2: 23c0 0005 ef08 movel %d0,5ef08 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48cc8: 203c 0005 ef08 movel #388872,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48cce: 42b9 0005 f09c clrl 5f09c <_User_extensions_List+0x4> 48cd4: 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; 48cd8: 2439 0005 d78a movel 5d78a ,%d2 initial_extensions = Configuration.User_extension_table; 48cde: 2639 0005 d78e movel 5d78e ,%d3 48ce4: 42b9 0005 ef0c clrl 5ef0c <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 48cea: 23c0 0005 ef10 movel %d0,5ef10 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48cf0: 4a83 tstl %d3 48cf2: 6764 beqs 48d58 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 48cf4: 7834 moveq #52,%d4 48cf6: 4c02 4800 mulsl %d2,%d4 48cfa: 2f04 movel %d4,%sp@- 48cfc: 4eb9 0004 91b0 jsr 491b0 <_Workspace_Allocate_or_fatal_error> 48d02: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48d04: 2f04 movel %d4,%sp@- 48d06: 42a7 clrl %sp@- 48d08: 2f00 movel %d0,%sp@- 48d0a: 4eb9 0004 f41c jsr 4f41c extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48d10: 4fef 0010 lea %sp@(16),%sp 48d14: 4a82 tstl %d2 48d16: 6740 beqs 48d58 <_User_extensions_Handler_initialization+0xb8> 48d18: 4284 clrl %d4 48d1a: 47f9 0004 c494 lea 4c494 <_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; 48d20: 2043 moveal %d3,%a0 48d22: 5284 addql #1,%d4 48d24: 0683 0000 0020 addil #32,%d3 48d2a: 2558 0014 movel %a0@+,%a2@(20) 48d2e: 2558 0018 movel %a0@+,%a2@(24) 48d32: 2558 001c movel %a0@+,%a2@(28) 48d36: 2558 0020 movel %a0@+,%a2@(32) 48d3a: 2558 0024 movel %a0@+,%a2@(36) 48d3e: 2558 0028 movel %a0@+,%a2@(40) 48d42: 2558 002c movel %a0@+,%a2@(44) 48d46: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 48d4a: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48d4c: 45ea 0034 lea %a2@(52),%a2 48d50: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48d52: 588f addql #4,%sp 48d54: b882 cmpl %d2,%d4 48d56: 65c8 bcss 48d20 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48d58: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48d5e: 4e5e unlk %fp 48d60: 4e75 rts ... 00048e34 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48e34: 4e56 0000 linkw %fp,#0 48e38: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e3a: 2479 0005 f098 moveal 5f098 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48e40: 2f02 movel %d2,%sp@- 48e42: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e46: b5fc 0005 f09c cmpal #389276,%a2 48e4c: 6722 beqs 48e70 <_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 ) { 48e4e: 206a 0014 moveal %a2@(20),%a0 48e52: 4a88 tstl %a0 48e54: 6710 beqs 48e66 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 48e56: 2f02 movel %d2,%sp@- 48e58: 2f39 0005 efbe movel 5efbe <_Thread_Executing>,%sp@- 48e5e: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 48e60: 508f addql #8,%sp 48e62: 4a00 tstb %d0 48e64: 670c beqs 48e72 <_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 ) { 48e66: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e68: b5fc 0005 f09c cmpal #389276,%a2 48e6e: 66de bnes 48e4e <_User_extensions_Thread_create+0x1a> 48e70: 7001 moveq #1,%d0 return false; } } return true; } 48e72: 242e fff8 movel %fp@(-8),%d2 48e76: 246e fffc moveal %fp@(-4),%a2 48e7a: 4e5e unlk %fp 48e7c: 4e75 rts ... 00048e80 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48e80: 4e56 0000 linkw %fp,#0 48e84: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e86: 2479 0005 f0a0 moveal 5f0a0 <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48e8c: 2f02 movel %d2,%sp@- 48e8e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e92: b5fc 0005 f098 cmpal #389272,%a2 48e98: 6720 beqs 48eba <_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 ) 48e9a: 206a 0020 moveal %a2@(32),%a0 48e9e: 4a88 tstl %a0 48ea0: 670c beqs 48eae <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 48ea2: 2f02 movel %d2,%sp@- 48ea4: 2f39 0005 efbe movel 5efbe <_Thread_Executing>,%sp@- 48eaa: 4e90 jsr %a0@ 48eac: 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 ) { 48eae: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48eb2: b5fc 0005 f098 cmpal #389272,%a2 48eb8: 66e0 bnes 48e9a <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 48eba: 242e fff8 movel %fp@(-8),%d2 48ebe: 246e fffc moveal %fp@(-4),%a2 48ec2: 4e5e unlk %fp 48ec4: 4e75 rts ... 00048f0c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 48f0c: 4e56 fff4 linkw %fp,#-12 48f10: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48f14: 262e 0008 movel %fp@(8),%d3 48f18: 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 ; 48f1c: 2479 0005 ef08 moveal 5ef08 <_User_extensions_Switches_list>,%a2 48f22: b5fc 0005 ef0c cmpal #388876,%a2 48f28: 6716 beqs 48f40 <_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 ); 48f2a: 2f02 movel %d2,%sp@- 48f2c: 2f03 movel %d3,%sp@- 48f2e: 206a 0008 moveal %a2@(8),%a0 48f32: 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 ) { 48f34: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48f36: 508f addql #8,%sp 48f38: b5fc 0005 ef0c cmpal #388876,%a2 48f3e: 66ea bnes 48f2a <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 48f40: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48f46: 4e5e unlk %fp 48f48: 4e75 rts ... 0005d6f8 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5d6f8: 4e56 ffe4 linkw %fp,#-28 5d6fc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d700: 2a6e 0008 moveal %fp@(8),%a5 5d704: 282e 000c movel %fp@(12),%d4 5d708: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5d70c: 675e beqs 5d76c <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5d70e: 263c 0000 0700 movel #1792,%d3 5d714: 2003 movel %d3,%d0 5d716: 40c1 movew %sr,%d1 5d718: 8081 orl %d1,%d0 5d71a: 46c0 movew %d0,%sr 5d71c: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d71e: 240b movel %a3,%d2 5d720: 5882 addql #4,%d2 5d722: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5d724: b1cc cmpal %a4,%a0 5d726: 6742 beqs 5d76a <_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 ) { 5d728: 2028 0010 movel %a0@(16),%d0 5d72c: b880 cmpl %d0,%d4 5d72e: 654c bcss 5d77c <_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; 5d730: 9880 subl %d0,%d4 first->delta_interval = 0; 5d732: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5d736: 2250 moveal %a0@,%a1 previous = the_node->previous; 5d738: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5d73c: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5d73e: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5d742: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5d744: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5d748: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5d74c: 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; 5d750: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5d752: 2003 movel %d3,%d0 5d754: 46c1 movew %d1,%sr 5d756: 8081 orl %d1,%d0 5d758: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5d75a: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5d75c: b1cc cmpal %a4,%a0 5d75e: 6714 beqs 5d774 <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5d760: 4aa8 0010 tstl %a0@(16) 5d764: 67d0 beqs 5d736 <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d766: 4a84 tstl %d4 5d768: 66ba bnes 5d724 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d76a: 46c1 movew %d1,%sr } 5d76c: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d770: 4e5e unlk %fp 5d772: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d774: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d776: 4a84 tstl %d4 5d778: 66aa bnes 5d724 <_Watchdog_Adjust_to_chain+0x2c> 5d77a: 60ee bras 5d76a <_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; 5d77c: 9084 subl %d4,%d0 5d77e: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d782: 46c1 movew %d1,%sr 5d784: 60e6 bras 5d76c <_Watchdog_Adjust_to_chain+0x74> ... 00049048 <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49048: 43f9 0005 efdc lea 5efdc <_Watchdog_Ticks_chain>,%a1 4904e: 41f9 0005 efd0 lea 5efd0 <_Watchdog_Seconds_chain>,%a0 * * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { 49054: 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 ); } 49058: 4e5e unlk %fp * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; 4905a: 42b9 0005 f044 clrl 5f044 <_Watchdog_Sync_count> _Watchdog_Sync_level = 0; 49060: 42b9 0005 efba clrl 5efba <_Watchdog_Sync_level> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49066: 23c9 0005 efe4 movel %a1,5efe4 <_Watchdog_Ticks_chain+0x8> 4906c: 23c8 0005 efd8 movel %a0,5efd8 <_Watchdog_Seconds_chain+0x8> _Watchdog_Ticks_since_boot = 0; 49072: 42b9 0005 f048 clrl 5f048 <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49078: 22bc 0005 efe0 movel #389088,%a1@ the_chain->permanent_null = NULL; 4907e: 42b9 0005 efe0 clrl 5efe0 <_Watchdog_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49084: 20bc 0005 efd4 movel #389076,%a0@ the_chain->permanent_null = NULL; 4908a: 42b9 0005 efd4 clrl 5efd4 <_Watchdog_Seconds_chain+0x4> _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 49090: 4e75 rts ... 00048f4c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 48f4c: 4e56 ffec linkw %fp,#-20 48f50: 226e 000c moveal %fp@(12),%a1 48f54: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48f58: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 48f5c: 2a3c 0000 0700 movel #1792,%d5 48f62: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 48f64: 2839 0005 ef9e movel 5ef9e <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 48f6a: 40c3 movew %sr,%d3 48f6c: 8083 orl %d3,%d0 48f6e: 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 ) { 48f70: 4aa9 0008 tstl %a1@(8) 48f74: 6600 00c6 bnew 4903c <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 48f78: 2039 0005 f044 movel 5f044 <_Watchdog_Sync_count>,%d0 48f7e: 5280 addql #1,%d0 48f80: 23c0 0005 f044 movel %d0,5f044 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 48f86: 7001 moveq #1,%d0 48f88: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 48f8c: 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 ; 48f90: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48f92: 6764 beqs 48ff8 <_Watchdog_Insert+0xac> 48f94: 4a90 tstl %a0@ 48f96: 6760 beqs 48ff8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48f98: 2228 0010 movel %a0@(16),%d1 48f9c: b280 cmpl %d0,%d1 48f9e: 6252 bhis 48ff2 <_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 ); 48fa0: 2405 movel %d5,%d2 48fa2: 46c3 movew %d3,%sr 48fa4: 8483 orl %d3,%d2 48fa6: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48fa8: 7401 moveq #1,%d2 48faa: b4a9 0008 cmpl %a1@(8),%d2 48fae: 666e bnes 4901e <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48fb0: 2439 0005 efba movel 5efba <_Watchdog_Sync_level>,%d2 48fb6: b484 cmpl %d4,%d2 48fb8: 6230 bhis 48fea <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48fba: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48fbc: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48fbe: 4a80 tstl %d0 48fc0: 6736 beqs 48ff8 <_Watchdog_Insert+0xac> 48fc2: 4a90 tstl %a0@ 48fc4: 6732 beqs 48ff8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48fc6: 2228 0010 movel %a0@(16),%d1 48fca: b081 cmpl %d1,%d0 48fcc: 6524 bcss 48ff2 <_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 ); 48fce: 2405 movel %d5,%d2 48fd0: 46c3 movew %d3,%sr 48fd2: 8483 orl %d3,%d2 48fd4: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48fd6: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48fd8: 7201 moveq #1,%d1 48fda: b2a9 0008 cmpl %a1@(8),%d1 48fde: 663e bnes 4901e <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48fe0: 2239 0005 efba movel 5efba <_Watchdog_Sync_level>,%d1 48fe6: b284 cmpl %d4,%d1 48fe8: 63d2 blss 48fbc <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 48fea: 23c4 0005 efba movel %d4,5efba <_Watchdog_Sync_level> goto restart; 48ff0: 609a bras 48f8c <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 48ff2: 9280 subl %d0,%d1 48ff4: 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 ); 48ff8: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 48ffc: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48ffe: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 49000: 2239 0005 f048 movel 5f048 <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 49006: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49008: 2348 0004 movel %a0,%a1@(4) 4900c: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 49010: 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; 49014: 2549 0004 movel %a1,%a2@(4) 49018: 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; 4901c: 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; 4901e: 23c4 0005 efba movel %d4,5efba <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49024: 2039 0005 f044 movel 5f044 <_Watchdog_Sync_count>,%d0 4902a: 5380 subql #1,%d0 4902c: 23c0 0005 f044 movel %d0,5f044 <_Watchdog_Sync_count> _ISR_Enable( level ); 49032: 46c3 movew %d3,%sr } 49034: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49038: 4e5e unlk %fp 4903a: 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 ); 4903c: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 4903e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49042: 4e5e unlk %fp 49044: 4e75 rts ... 00049094 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 49094: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4909a: 4e56 0000 linkw %fp,#0 4909e: 206e 0008 moveal %fp@(8),%a0 490a2: 2f0a movel %a2,%sp@- 490a4: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 490a6: 40c1 movew %sr,%d1 490a8: 8081 orl %d1,%d0 490aa: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 490ac: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 490b0: 7401 moveq #1,%d2 490b2: b480 cmpl %d0,%d2 490b4: 6764 beqs 4911a <_Watchdog_Remove+0x86> 490b6: 6314 blss 490cc <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 490b8: 2279 0005 f048 moveal 5f048 <_Watchdog_Ticks_since_boot>,%a1 490be: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 490c2: 46c1 movew %d1,%sr return( previous_state ); } 490c4: 241f movel %sp@+,%d2 490c6: 245f moveal %sp@+,%a2 490c8: 4e5e unlk %fp 490ca: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 490cc: 143c 0003 moveb #3,%d2 490d0: b480 cmpl %d0,%d2 490d2: 65e4 bcss 490b8 <_Watchdog_Remove+0x24> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 490d4: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 490d6: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 490da: 4a91 tstl %a1@ 490dc: 6708 beqs 490e6 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 490de: 2428 0010 movel %a0@(16),%d2 490e2: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 490e6: 2479 0005 f044 moveal 5f044 <_Watchdog_Sync_count>,%a2 490ec: 4a8a tstl %a2 490ee: 670c beqs 490fc <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 490f0: 2479 0005 ef9e moveal 5ef9e <_ISR_Nest_level>,%a2 490f6: 23ca 0005 efba movel %a2,5efba <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 490fc: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 49100: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 49102: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49106: 2279 0005 f048 moveal 5f048 <_Watchdog_Ticks_since_boot>,%a1 4910c: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49110: 46c1 movew %d1,%sr return( previous_state ); } 49112: 241f movel %sp@+,%d2 49114: 245f moveal %sp@+,%a2 49116: 4e5e unlk %fp 49118: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4911a: 2279 0005 f048 moveal 5f048 <_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; 49120: 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; 49124: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49128: 46c1 movew %d1,%sr return( previous_state ); } 4912a: 241f movel %sp@+,%d2 4912c: 245f moveal %sp@+,%a2 4912e: 4e5e unlk %fp 49130: 4e75 rts ... 0004a6b8 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 4a6b8: 4e56 fff0 linkw %fp,#-16 printk( 4a6bc: 223c 0005 e5e7 movel #386535,%d1 void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 4a6c2: 206e 000c moveal %fp@(12),%a0 4a6c6: 48d7 003c moveml %d2-%d5,%sp@ 4a6ca: 202e 0008 movel %fp@(8),%d0 printk( 4a6ce: 2a28 0024 movel %a0@(36),%d5 4a6d2: 2828 0020 movel %a0@(32),%d4 4a6d6: 2628 001c movel %a0@(28),%d3 4a6da: 2428 000c movel %a0@(12),%d2 4a6de: 2268 0010 moveal %a0@(16),%a1 4a6e2: 4a80 tstl %d0 4a6e4: 672a beqs 4a710 <_Watchdog_Report+0x58> 4a6e6: 2f05 movel %d5,%sp@- 4a6e8: 2f04 movel %d4,%sp@- 4a6ea: 2f03 movel %d3,%sp@- 4a6ec: 2f08 movel %a0,%sp@- 4a6ee: 2f02 movel %d2,%sp@- 4a6f0: 2f09 movel %a1,%sp@- 4a6f2: 2f01 movel %d1,%sp@- 4a6f4: 2f00 movel %d0,%sp@- 4a6f6: 4879 0005 e768 pea 5e768 <_Status_Object_name_errors_to_status+0x4a> 4a6fc: 4eb9 0004 4084 jsr 44084 4a702: 4fef 0024 lea %sp@(36),%sp watch, watch->routine, watch->id, watch->user_data ); } 4a706: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a70c: 4e5e unlk %fp 4a70e: 4e75 rts void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 4a710: 2f05 movel %d5,%sp@- 4a712: 223c 0005 e5ec movel #386540,%d1 4a718: 2f04 movel %d4,%sp@- 4a71a: 2001 movel %d1,%d0 4a71c: 2f03 movel %d3,%sp@- 4a71e: 2f08 movel %a0,%sp@- 4a720: 2f02 movel %d2,%sp@- 4a722: 2f09 movel %a1,%sp@- 4a724: 2f01 movel %d1,%sp@- 4a726: 2f00 movel %d0,%sp@- 4a728: 4879 0005 e768 pea 5e768 <_Status_Object_name_errors_to_status+0x4a> 4a72e: 4eb9 0004 4084 jsr 44084 4a734: 4fef 0024 lea %sp@(36),%sp watch, watch->routine, watch->id, watch->user_data ); } 4a738: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a73e: 4e5e unlk %fp 4a740: 4e75 rts ... 0004a63c <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a63c: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4a642: 4e56 ffe8 linkw %fp,#-24 4a646: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a64a: 242e 0008 movel %fp@(8),%d2 4a64e: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a652: 40c3 movew %sr,%d3 4a654: 8083 orl %d3,%d0 4a656: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4a658: 2f0b movel %a3,%sp@- 4a65a: 4bf9 0004 4084 lea 44084 ,%a5 4a660: 2f02 movel %d2,%sp@- 4a662: 4879 0005 e732 pea 5e732 <_Status_Object_name_errors_to_status+0x14> 4a668: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a66a: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4a66c: 4fef 000c lea %sp@(12),%sp 4a670: b7ca cmpal %a2,%a3 4a672: 672c beqs 4a6a0 <_Watchdog_Report_chain+0x64> 4a674: 49f9 0004 a6b8 lea 4a6b8 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4a67a: 2f0a movel %a2,%sp@- 4a67c: 42a7 clrl %sp@- 4a67e: 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 ) 4a680: 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 ; 4a682: 508f addql #8,%sp 4a684: b7ca cmpal %a2,%a3 4a686: 66f2 bnes 4a67a <_Watchdog_Report_chain+0x3e> { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4a688: 2f02 movel %d2,%sp@- 4a68a: 4879 0005 e749 pea 5e749 <_Status_Object_name_errors_to_status+0x2b> 4a690: 4e95 jsr %a5@ 4a692: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4a694: 46c3 movew %d3,%sr } 4a696: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a69c: 4e5e unlk %fp 4a69e: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4a6a0: 4879 0005 e758 pea 5e758 <_Status_Object_name_errors_to_status+0x3a> 4a6a6: 4e95 jsr %a5@ 4a6a8: 588f addql #4,%sp } _ISR_Enable( level ); 4a6aa: 46c3 movew %d3,%sr } 4a6ac: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a6b2: 4e5e unlk %fp 4a6b4: 4e75 rts ... 00049218 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49218: 4e56 0000 linkw %fp,#0 4921c: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 4921e: 2639 0005 d758 movel 5d758 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49224: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 49226: 2439 0005 d754 movel 5d754 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 4922c: 4a39 0005 d77c tstb 5d77c 49232: 6628 bnes 4925c <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 49234: 4878 0004 pea 4 49238: 2f03 movel %d3,%sp@- 4923a: 2f02 movel %d2,%sp@- 4923c: 4879 0005 ef26 pea 5ef26 <_Workspace_Area> 49242: 4eb9 0004 6c60 jsr 46c60 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49248: 4fef 0010 lea %sp@(16),%sp 4924c: 4a80 tstl %d0 4924e: 671e beqs 4926e <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 49250: 242e fff8 movel %fp@(-8),%d2 49254: 262e fffc movel %fp@(-4),%d3 49258: 4e5e unlk %fp 4925a: 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 ); 4925c: 2f03 movel %d3,%sp@- 4925e: 42a7 clrl %sp@- 49260: 2f02 movel %d2,%sp@- 49262: 4eb9 0004 f41c jsr 4f41c 49268: 4fef 000c lea %sp@(12),%sp 4926c: 60c6 bras 49234 <_Workspace_Handler_initialization+0x1c> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4926e: 4878 0003 pea 3 49272: 4878 0001 pea 1 49276: 42a7 clrl %sp@- 49278: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ... 0005c79c <_execve>: int _execve( const char *path __attribute__((unused)), char *const argv[] __attribute__((unused)), char *const envp[] __attribute__((unused)) ) { 5c79c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 5c7a0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 5c7a6: 7258 moveq #88,%d1 5c7a8: 2040 moveal %d0,%a0 } 5c7aa: 70ff moveq #-1,%d0 5c7ac: 4e5e unlk %fp const char *path __attribute__((unused)), char *const argv[] __attribute__((unused)), char *const envp[] __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 5c7ae: 2081 movel %d1,%a0@ } 5c7b0: 4e75 rts ... 00045b54 : int aio_cancel( int filedes __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { 45b54: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45b58: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45b5e: 7258 moveq #88,%d1 45b60: 2040 moveal %d0,%a0 } 45b62: 70ff moveq #-1,%d0 45b64: 4e5e unlk %fp int aio_cancel( int filedes __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45b66: 2081 movel %d1,%a0@ } 45b68: 4e75 rts ... 00045b6c : #include int aio_error( const struct aiocb *aiocbp __attribute__((unused)) ) { 45b6c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45b70: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45b76: 7258 moveq #88,%d1 45b78: 2040 moveal %d0,%a0 } 45b7a: 70ff moveq #-1,%d0 45b7c: 4e5e unlk %fp int aio_error( const struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45b7e: 2081 movel %d1,%a0@ } 45b80: 4e75 rts ... 00045b84 : int aio_fsync( int op __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { 45b84: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45b88: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45b8e: 7258 moveq #88,%d1 45b90: 2040 moveal %d0,%a0 } 45b92: 70ff moveq #-1,%d0 45b94: 4e5e unlk %fp int aio_fsync( int op __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45b96: 2081 movel %d1,%a0@ } 45b98: 4e75 rts ... 00045b9c : #include int aio_read( struct aiocb *aiocbp __attribute__((unused)) ) { 45b9c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45ba0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45ba6: 7258 moveq #88,%d1 45ba8: 2040 moveal %d0,%a0 } 45baa: 70ff moveq #-1,%d0 45bac: 4e5e unlk %fp int aio_read( struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45bae: 2081 movel %d1,%a0@ } 45bb0: 4e75 rts ... 00045bb4 : #include int aio_return( const struct aiocb *aiocbp __attribute__((unused)) ) { 45bb4: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45bb8: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45bbe: 7258 moveq #88,%d1 45bc0: 2040 moveal %d0,%a0 } 45bc2: 70ff moveq #-1,%d0 45bc4: 4e5e unlk %fp int aio_return( const struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45bc6: 2081 movel %d1,%a0@ } 45bc8: 4e75 rts ... 00045bcc : int aio_suspend( const struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), const struct timespec *timeout __attribute__((unused)) ) { 45bcc: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45bd0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45bd6: 7258 moveq #88,%d1 45bd8: 2040 moveal %d0,%a0 } 45bda: 70ff moveq #-1,%d0 45bdc: 4e5e unlk %fp const struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), const struct timespec *timeout __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45bde: 2081 movel %d1,%a0@ } 45be0: 4e75 rts ... 00045be4 : #include int aio_write( struct aiocb *aiocbp __attribute__((unused)) ) { 45be4: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45be8: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45bee: 7258 moveq #88,%d1 45bf0: 2040 moveal %d0,%a0 } 45bf2: 70ff moveq #-1,%d0 45bf4: 4e5e unlk %fp int aio_write( struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45bf6: 2081 movel %d1,%a0@ } 45bf8: 4e75 rts ... 00045bfc : int clock_getcpuclockid( pid_t pid, clockid_t *clock_id ) { 45bfc: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45c00: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c06: 7258 moveq #88,%d1 45c08: 2040 moveal %d0,%a0 } 45c0a: 70ff moveq #-1,%d0 45c0c: 4e5e unlk %fp int clock_getcpuclockid( pid_t pid, clockid_t *clock_id ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45c0e: 2081 movel %d1,%a0@ } 45c10: 4e75 rts ... 00045c14 : int clock_getenable_attr( clockid_t clock_id, int *attr ) { 45c14: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45c18: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c1e: 7258 moveq #88,%d1 45c20: 2040 moveal %d0,%a0 } 45c22: 70ff moveq #-1,%d0 45c24: 4e5e unlk %fp int clock_getenable_attr( clockid_t clock_id, int *attr ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45c26: 2081 movel %d1,%a0@ } 45c28: 4e75 rts ... 00045c38 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 45c38: 4e56 0000 linkw %fp,#0 45c3c: 202e 0008 movel %fp@(8),%d0 45c40: 222e 000c movel %fp@(12),%d1 45c44: 2f02 movel %d2,%sp@- if ( !tp ) 45c46: 4a81 tstl %d1 45c48: 6718 beqs 45c62 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 45c4a: 7401 moveq #1,%d2 45c4c: b480 cmpl %d0,%d2 45c4e: 6752 beqs 45ca2 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 45c50: 7404 moveq #4,%d2 45c52: b480 cmpl %d0,%d2 45c54: 6738 beqs 45c8e return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 45c56: 7402 moveq #2,%d2 45c58: b480 cmpl %d0,%d2 45c5a: 6732 beqs 45c8e return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 45c5c: 7203 moveq #3,%d1 45c5e: b280 cmpl %d0,%d1 45c60: 6716 beqs 45c78 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c62: 4eb9 0004 fbec jsr 4fbec <__errno> return 0; } 45c68: 242e fffc movel %fp@(-4),%d2 #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c6c: 2040 moveal %d0,%a0 45c6e: 7216 moveq #22,%d1 45c70: 70ff moveq #-1,%d0 return 0; } 45c72: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c74: 2081 movel %d1,%a0@ return 0; } 45c76: 4e75 rts } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 45c78: 4eb9 0004 fbec jsr 4fbec <__errno> 45c7e: 7458 moveq #88,%d2 45c80: 2040 moveal %d0,%a0 45c82: 70ff moveq #-1,%d0 45c84: 2082 movel %d2,%a0@ #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c86: 242e fffc movel %fp@(-4),%d2 45c8a: 4e5e unlk %fp 45c8c: 4e75 rts } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 45c8e: 2f01 movel %d1,%sp@- 45c90: 4eb9 0004 7d80 jsr 47d80 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c96: 242e fffc movel %fp@(-4),%d2 #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); return 0; 45c9a: 588f addql #4,%sp } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 45c9c: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c9e: 4e5e unlk %fp 45ca0: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 45ca2: 2f01 movel %d1,%sp@- 45ca4: 4eb9 0004 7ce4 jsr 47ce4 <_TOD_Get> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45caa: 242e fffc movel %fp@(-4),%d2 if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; 45cae: 588f addql #4,%sp { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 45cb0: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45cb2: 4e5e unlk %fp 45cb4: 4e75 rts ... 00045c2c : int clock_setenable_attr( clockid_t clock_id, int attr ) { 45c2c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45c30: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c36: 7258 moveq #88,%d1 45c38: 2040 moveal %d0,%a0 } 45c3a: 70ff moveq #-1,%d0 45c3c: 4e5e unlk %fp int clock_setenable_attr( clockid_t clock_id, int attr ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45c3e: 2081 movel %d1,%a0@ } 45c40: 4e75 rts ... 00045c44 : int filedes __attribute__((unused)), void *dev_data_ptr __attribute__((unused)), size_t nbyte __attribute__((unused)), int *dev_info_ptr __attribute__((unused)) ) { 45c44: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45c48: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c4e: 7258 moveq #88,%d1 45c50: 2040 moveal %d0,%a0 } 45c52: 70ff moveq #-1,%d0 45c54: 4e5e unlk %fp void *dev_data_ptr __attribute__((unused)), size_t nbyte __attribute__((unused)), int *dev_info_ptr __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45c56: 2081 movel %d1,%a0@ } 45c58: 4e75 rts ... 00045c5c : #include #include int fork( void ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45c5c: 4e56 0000 linkw %fp,#0 45c60: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c66: 7258 moveq #88,%d1 45c68: 2040 moveal %d0,%a0 } 45c6a: 70ff moveq #-1,%d0 45c6c: 4e5e unlk %fp #include #include int fork( void ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45c6e: 2081 movel %d1,%a0@ } 45c70: 4e75 rts ... 0004e5dc : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4e5dc: 4e56 ffd0 linkw %fp,#-48 4e5e0: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4e5e4: 262e 000c movel %fp@(12),%d3 4e5e8: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4e5ec: 4eb9 0004 d53c jsr 4d53c 4e5f2: b0ae 0008 cmpl %fp@(8),%d0 4e5f6: 6600 022c bnew 4e824 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 4e5fa: 4a83 tstl %d3 4e5fc: 6700 023e beqw 4e83c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4e600: 2003 movel %d3,%d0 4e602: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4e604: 721f moveq #31,%d1 4e606: b280 cmpl %d0,%d1 4e608: 6500 0232 bcsw 4e83c rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 4e60c: 2203 movel %d3,%d1 4e60e: 2803 movel %d3,%d4 4e610: 7e01 moveq #1,%d7 4e612: e589 lsll #2,%d1 4e614: e98c lsll #4,%d4 4e616: 9881 subl %d1,%d4 4e618: 2044 moveal %d4,%a0 4e61a: d1fc 0005 f3ba addal #390074,%a0 4e620: be90 cmpl %a0@,%d7 4e622: 6700 00d4 beqw 4e6f8 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 4e626: 7208 moveq #8,%d1 4e628: b283 cmpl %d3,%d1 4e62a: 6700 00d8 beqw 4e704 4e62e: 7e04 moveq #4,%d7 4e630: be83 cmpl %d3,%d7 4e632: 6700 00d0 beqw 4e704 4e636: 123c 000b moveb #11,%d1 4e63a: b283 cmpl %d3,%d1 4e63c: 6700 00c6 beqw 4e704 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4e640: 7401 moveq #1,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 4e642: 7e01 moveq #1,%d7 4e644: e1aa lsll %d0,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4e646: 2d43 fff4 movel %d3,%fp@(-12) siginfo->si_code = SI_USER; 4e64a: 2d47 fff8 movel %d7,%fp@(-8) if ( !value ) { 4e64e: 4a8a tstl %a2 4e650: 6700 01ca beqw 4e81c siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 4e654: 2d52 fffc movel %a2@,%fp@(-4) 4e658: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4e65e: 5280 addql #1,%d0 4e660: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 4e666: 2479 0005 efbe moveal 5efbe <_Thread_Executing>,%a2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e66c: 206a 010e moveal %a2@(270),%a0 4e670: 2028 00cc movel %a0@(204),%d0 4e674: 4680 notl %d0 4e676: c082 andl %d2,%d0 4e678: 6642 bnes 4e6bc /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e67a: 2079 0005 f53e moveal 5f53e <_POSIX_signals_Wait_queue>,%a0 4e680: b1fc 0005 f542 cmpal #390466,%a0 4e686: 6700 00ec beqw 4e774 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e68a: 2002 movel %d2,%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 4e68c: 2448 moveal %a0,%a2 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e68e: c0a8 0030 andl %a0@(48),%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e692: 2268 010e moveal %a0@(270),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e696: 6624 bnes 4e6bc /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 4e698: 2029 00cc movel %a1@(204),%d0 4e69c: 4680 notl %d0 4e69e: c082 andl %d2,%d0 4e6a0: 661a bnes 4e6bc the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4e6a2: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 4e6a4: 2448 moveal %a0,%a2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e6a6: b1fc 0005 f542 cmpal #390466,%a0 4e6ac: 6700 00c6 beqw 4e774 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e6b0: 2002 movel %d2,%d0 <== NOT EXECUTED 4e6b2: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e6b6: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e6ba: 67dc beqs 4e698 <== NOT EXECUTED * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4e6bc: 7001 moveq #1,%d0 4e6be: 1540 0074 moveb %d0,%a2@(116) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4e6c2: 486e fff4 pea %fp@(-12) 4e6c6: 2f03 movel %d3,%sp@- 4e6c8: 2f0a movel %a2,%sp@- 4e6ca: 4eb9 0004 e914 jsr 4e914 <_POSIX_signals_Unblock_thread> 4e6d0: 4fef 000c lea %sp@(12),%sp 4e6d4: 4a00 tstb %d0 4e6d6: 6600 008a bnew 4e762 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 4e6da: 2f02 movel %d2,%sp@- 4e6dc: 4eb9 0004 e8e4 jsr 4e8e4 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4e6e2: 588f addql #4,%sp 4e6e4: 41f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a0 4e6ea: 7202 moveq #2,%d1 4e6ec: b2b0 4800 cmpl %a0@(00000000,%d4:l),%d1 4e6f0: 672e beqs 4e720 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e6f2: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e6f8: 4280 clrl %d0 return 0; } 4e6fa: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e700: 4e5e unlk %fp 4e702: 4e75 rts * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 4e704: 4eb9 0004 eb30 jsr 4eb30 4e70a: 2f03 movel %d3,%sp@- 4e70c: 2f00 movel %d0,%sp@- 4e70e: 4eb9 0004 ea54 jsr 4ea54 4e714: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e716: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e71c: 4e5e unlk %fp 4e71e: 4e75 rts */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e720: 4879 0005 f532 pea 5f532 <_POSIX_signals_Inactive_siginfo> 4e726: 4eb9 0004 b954 jsr 4b954 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e72c: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e72e: 2040 moveal %d0,%a0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e730: 4a80 tstl %d0 4e732: 6700 0120 beqw 4e854 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e736: 216e fff4 0008 movel %fp@(-12),%a0@(8) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e73c: 0684 0005 f5aa addil #390570,%d4 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e742: 216e fff8 000c movel %fp@(-8),%a0@(12) 4e748: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e74e: 2f00 movel %d0,%sp@- 4e750: 2f04 movel %d4,%sp@- 4e752: 4eb9 0004 6798 jsr 46798 <_Chain_Append> 4e758: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e75a: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e760: 6096 bras 4e6f8 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 4e762: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e768: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e76a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e770: 4e5e unlk %fp 4e772: 4e75 rts * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e774: 4285 clrl %d5 4e776: 1a39 0005 d752 moveb 5d752 ,%d5 4e77c: 49f9 0005 eec4 lea 5eec4 <_Objects_Information_table+0x8>,%a4 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4e782: 95ca subal %a2,%a2 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e784: 5285 addql #1,%d5 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 4e786: 2054 moveal %a4@,%a0 4e788: 4a88 tstl %a0 4e78a: 675e beqs 4e7ea continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4e78c: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 4e790: 4286 clrl %d6 4e792: 3c28 000e movew %a0@(14),%d6 object_table = the_info->local_table; 4e796: 2268 0018 moveal %a0@(24),%a1 for ( index = 1 ; index <= maximum ; index++ ) { 4e79a: 4a86 tstl %d6 4e79c: 674c beqs 4e7ea 4e79e: 5889 addql #4,%a1 4e7a0: 7001 moveq #1,%d0 the_thread = (Thread_Control *) object_table[ index ]; 4e7a2: 2051 moveal %a1@,%a0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4e7a4: 5280 addql #1,%d0 4e7a6: 5889 addql #4,%a1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 4e7a8: 4a88 tstl %a0 4e7aa: 673a beqs 4e7e6 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4e7ac: 2228 0014 movel %a0@(20),%d1 4e7b0: ba81 cmpl %d1,%d5 4e7b2: 6532 bcss 4e7e6 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e7b4: 2668 010e moveal %a0@(270),%a3 4e7b8: 2e2b 00cc movel %a3@(204),%d7 4e7bc: 4687 notl %d7 4e7be: ce82 andl %d2,%d7 4e7c0: 6724 beqs 4e7e6 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 4e7c2: ba81 cmpl %d1,%d5 4e7c4: 621c bhis 4e7e2 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 4e7c6: 2e2a 0010 movel %a2@(16),%d7 4e7ca: 671a beqs 4e7e6 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4e7cc: 2668 0010 moveal %a0@(16),%a3 4e7d0: 4a8b tstl %a3 4e7d2: 670e beqs 4e7e2 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4e7d4: 0807 001c btst #28,%d7 4e7d8: 660c bnes 4e7e6 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4e7da: 2e0b movel %a3,%d7 4e7dc: 0807 001c btst #28,%d7 4e7e0: 6704 beqs 4e7e6 4e7e2: 2a01 movel %d1,%d5 4e7e4: 2448 moveal %a0,%a2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4e7e6: b086 cmpl %d6,%d0 4e7e8: 63b8 blss 4e7a2 4e7ea: 588c addql #4,%a4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 4e7ec: b9fc 0005 eed0 cmpal #388816,%a4 4e7f2: 6692 bnes 4e786 } } } } if ( interested ) { 4e7f4: 4a8a tstl %a2 4e7f6: 6700 fee2 beqw 4e6da * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4e7fa: 7001 moveq #1,%d0 4e7fc: 1540 0074 moveb %d0,%a2@(116) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4e800: 486e fff4 pea %fp@(-12) 4e804: 2f03 movel %d3,%sp@- 4e806: 2f0a movel %a2,%sp@- 4e808: 4eb9 0004 e914 jsr 4e914 <_POSIX_signals_Unblock_thread> 4e80e: 4fef 000c lea %sp@(12),%sp 4e812: 4a00 tstb %d0 4e814: 6700 fec4 beqw 4e6da 4e818: 6000 ff48 braw 4e762 <== NOT EXECUTED */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 4e81c: 42ae fffc clrl %fp@(-4) 4e820: 6000 fe36 braw 4e658 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 4e824: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4e82a: 7603 moveq #3,%d3 4e82c: 2040 moveal %d0,%a0 4e82e: 70ff moveq #-1,%d0 4e830: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e832: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e838: 4e5e unlk %fp 4e83a: 4e75 rts */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4e83c: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4e842: 7416 moveq #22,%d2 4e844: 2040 moveal %d0,%a0 4e846: 70ff moveq #-1,%d0 4e848: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e84a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e850: 4e5e unlk %fp 4e852: 4e75 rts if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 4e854: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 4e85a: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4e860: 720b moveq #11,%d1 4e862: 2040 moveal %d0,%a0 4e864: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e866: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 4e86c: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e86e: 4e5e unlk %fp 4e870: 4e75 rts ... 00045c74 : int mode __attribute__((unused)), struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), struct sigevent *sig __attribute__((unused)) ) { 45c74: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45c78: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c7e: 7258 moveq #88,%d1 45c80: 2040 moveal %d0,%a0 } 45c82: 70ff moveq #-1,%d0 45c84: 4e5e unlk %fp struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), struct sigevent *sig __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45c86: 2081 movel %d1,%a0@ } 45c88: 4e75 rts ... 00045c8c : const void *addr __attribute__((unused)), size_t len __attribute__((unused)), int prot __attribute__((unused)) ) { return 0; } 45c8c: 4280 clrl %d0 int mprotect( const void *addr __attribute__((unused)), size_t len __attribute__((unused)), int prot __attribute__((unused)) ) { 45c8e: 4e56 0000 linkw %fp,#0 return 0; } 45c92: 4e5e unlk %fp 45c94: 4e75 rts ... 0004b760 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 4b760: 4e56 fffc linkw %fp,#-4 4b764: 2f0a movel %a2,%sp@- 4b766: 246e 000c moveal %fp@(12),%a2 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 4b76a: 4a8a tstl %a2 4b76c: 6762 beqs 4b7d0 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4b76e: 486e fffc pea %fp@(-4) 4b772: 2f2e 0008 movel %fp@(8),%sp@- 4b776: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b77c: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4b782: 4fef 000c lea %sp@(12),%sp 4b786: 4aae fffc tstl %fp@(-4) 4b78a: 662e bnes 4b7ba * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 4b78c: 2040 moveal %d0,%a0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 4b78e: 2240 moveal %d0,%a1 * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 4b790: 24a8 0014 movel %a0@(20),%a2@ the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 4b794: 2069 0010 moveal %a1@(16),%a0 */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 4b798: 2568 0066 0008 movel %a0@(102),%a2@(8) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4b79e: 2568 005e 0004 movel %a0@(94),%a2@(4) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 4b7a4: 2568 0062 000c movel %a0@(98),%a2@(12) _Thread_Enable_dispatch(); 4b7aa: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b7b0: 246e fff8 moveal %fp@(-8),%a2 mqstat->mq_flags = the_mq_fd->oflag; mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; _Thread_Enable_dispatch(); 4b7b4: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b7b6: 4e5e unlk %fp 4b7b8: 4e75 rts #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b7ba: 4eb9 0005 6684 jsr 56684 <__errno> } 4b7c0: 246e fff8 moveal %fp@(-8),%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b7c4: 2040 moveal %d0,%a0 4b7c6: 7209 moveq #9,%d1 4b7c8: 70ff moveq #-1,%d0 } 4b7ca: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b7cc: 2081 movel %d1,%a0@ } 4b7ce: 4e75 rts POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4b7d0: 4eb9 0005 6684 jsr 56684 <__errno> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b7d6: 246e fff8 moveal %fp@(-8),%a2 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4b7da: 2040 moveal %d0,%a0 4b7dc: 7216 moveq #22,%d1 4b7de: 70ff moveq #-1,%d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b7e0: 4e5e unlk %fp POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4b7e2: 2081 movel %d1,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b7e4: 4e75 rts ... 0004b8dc : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 4b8dc: 4e56 ffd8 linkw %fp,#-40 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4b8e0: 2039 0006 8ae0 movel 68ae0 <_Thread_Dispatch_disable_level>,%d0 4b8e6: 5280 addql #1,%d0 4b8e8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4b8ec: 23c0 0006 8ae0 movel %d0,68ae0 <_Thread_Dispatch_disable_level> 4b8f2: 2a2e 0008 movel %fp@(8),%d5 4b8f6: 242e 000c movel %fp@(12),%d2 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 4b8fa: 2802 movel %d2,%d4 4b8fc: 0284 0000 0200 andil #512,%d4 4b902: 6600 00c4 bnew 4b9c8 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 4b906: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b90c: 4286 clrl %d6 4b90e: 4eb9 0004 ea3c jsr 4ea3c <_Objects_Allocate> attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4b914: 588f addql #4,%sp 4b916: 2440 moveal %d0,%a2 4b918: 4a80 tstl %d0 4b91a: 6700 00c6 beqw 4b9e2 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 4b91e: 2542 0014 movel %d2,%a2@(20) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4b922: 486e fffc pea %fp@(-4) 4b926: 2f05 movel %d5,%sp@- 4b928: 4eb9 0005 2a6c jsr 52a6c <_POSIX_Message_queue_Name_to_id> * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 4b92e: 508f addql #8,%sp _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4b930: 2600 movel %d0,%d3 * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 4b932: 6662 bnes 4b996 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4b934: 0282 0000 0a00 andil #2560,%d2 4b93a: 0c82 0000 0a00 cmpil #2560,%d2 4b940: 6700 010c beqw 4ba4e RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 4b944: 486e fff4 pea %fp@(-12) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 4b948: 47f9 0004 f7b8 lea 4f7b8 <_Thread_Enable_dispatch>,%a3 4b94e: 2f2e fffc movel %fp@(-4),%sp@- 4b952: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 4b958: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4b95e: 4281 clrl %d1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 4b960: 2040 moveal %d0,%a0 4b962: 52a8 0016 addql #1,%a0@(22) 4b966: 2079 0006 8f34 moveal 68f34 <_POSIX_Message_queue_Information_fds+0x18>,%a0 4b96c: 322a 000a movew %a2@(10),%d1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 4b970: 2d40 fff8 movel %d0,%fp@(-8) 4b974: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 4b978: 2540 0010 movel %d0,%a2@(16) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4b97c: 42aa 000c clrl %a2@(12) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 4b980: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4b982: 4e93 jsr %a3@ return (mqd_t)the_mq_fd->Object.id; 4b984: 202a 0008 movel %a2@(8),%d0 4b988: 4fef 000c lea %sp@(12),%sp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b98c: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b992: 4e5e unlk %fp 4b994: 4e75 rts if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 4b996: 7002 moveq #2,%d0 4b998: b083 cmpl %d3,%d0 4b99a: 6764 beqs 4ba00 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4b99c: 2f0a movel %a2,%sp@- 4b99e: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b9a4: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4b9aa: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 4b9b0: 4eb9 0005 6684 jsr 56684 <__errno> 4b9b6: 508f addql #8,%sp 4b9b8: 2040 moveal %d0,%a0 4b9ba: 70ff moveq #-1,%d0 4b9bc: 2083 movel %d3,%a0@ ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b9be: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b9c4: 4e5e unlk %fp 4b9c6: 4e75 rts _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 4b9c8: 2c2e 0014 movel %fp@(20),%d6 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 4b9cc: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b9d2: 4eb9 0004 ea3c jsr 4ea3c <_Objects_Allocate> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4b9d8: 588f addql #4,%sp 4b9da: 2440 moveal %d0,%a2 4b9dc: 4a80 tstl %d0 4b9de: 6600 ff3e bnew 4b91e _Thread_Enable_dispatch(); 4b9e2: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 4b9e8: 7417 moveq #23,%d2 4b9ea: 4eb9 0005 6684 jsr 56684 <__errno> 4b9f0: 2040 moveal %d0,%a0 4b9f2: 70ff moveq #-1,%d0 4b9f4: 2082 movel %d2,%a0@ ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b9f6: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b9fc: 4e5e unlk %fp 4b9fe: 4e75 rts if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 4ba00: 4a84 tstl %d4 4ba02: 6798 beqs 4b99c /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 4ba04: 486e fff8 pea %fp@(-8) 4ba08: 2f06 movel %d6,%sp@- 4ba0a: 4878 0001 pea 1 4ba0e: 2f05 movel %d5,%sp@- 4ba10: 4eb9 0005 28ec jsr 528ec <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 4ba16: 4fef 0010 lea %sp@(16),%sp 4ba1a: 72ff moveq #-1,%d1 4ba1c: b280 cmpl %d0,%d1 4ba1e: 675c beqs 4ba7c #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4ba20: 4280 clrl %d0 4ba22: 2079 0006 8f34 moveal 68f34 <_POSIX_Message_queue_Information_fds+0x18>,%a0 4ba28: 302a 000a movew %a2@(10),%d0 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 4ba2c: 256e fff8 0010 movel %fp@(-8),%a2@(16) 4ba32: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4ba36: 42aa 000c clrl %a2@(12) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 4ba3a: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 4ba40: 202a 0008 movel %a2@(8),%d0 } 4ba44: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4ba4a: 4e5e unlk %fp 4ba4c: 4e75 rts RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4ba4e: 2f0a movel %a2,%sp@- 4ba50: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4ba56: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4ba5c: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 4ba62: 4eb9 0005 6684 jsr 56684 <__errno> 4ba68: 508f addql #8,%sp 4ba6a: 7211 moveq #17,%d1 4ba6c: 2040 moveal %d0,%a0 4ba6e: 70ff moveq #-1,%d0 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4ba70: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 4ba76: 2081 movel %d1,%a0@ ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4ba78: 4e5e unlk %fp 4ba7a: 4e75 rts 4ba7c: 2f0a movel %a2,%sp@- 4ba7e: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4ba84: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4ba8a: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> return (mqd_t) -1; 4ba90: 508f addql #8,%sp /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4ba92: 70ff moveq #-1,%d0 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4ba94: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4ba9a: 4e5e unlk %fp 4ba9c: 4e75 rts ... 0004bdac : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 4bdac: 4e56 fffc linkw %fp,#-4 4bdb0: 2f0b movel %a3,%sp@- 4bdb2: 266e 000c moveal %fp@(12),%a3 4bdb6: 2f0a movel %a2,%sp@- 4bdb8: 246e 0010 moveal %fp@(16),%a2 POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 4bdbc: 4a8b tstl %a3 4bdbe: 6770 beqs 4be30 4bdc0: 486e fffc pea %fp@(-4) 4bdc4: 2f2e 0008 movel %fp@(8),%sp@- 4bdc8: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4bdce: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4bdd4: 4fef 000c lea %sp@(12),%sp 4bdd8: 2040 moveal %d0,%a0 4bdda: 4aae fffc tstl %fp@(-4) 4bdde: 6636 bnes 4be16 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 4bde0: 2268 0010 moveal %a0@(16),%a1 /* * Return the old values. */ if ( omqstat ) { 4bde4: 4a8a tstl %a2 4bde6: 6716 beqs 4bdfe omqstat->mq_flags = the_mq_fd->oflag; 4bde8: 24a8 0014 movel %a0@(20),%a2@ omqstat->mq_msgsize = the_core_mq->maximum_message_size; 4bdec: 2569 0066 0008 movel %a1@(102),%a2@(8) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 4bdf2: 2569 005e 0004 movel %a1@(94),%a2@(4) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 4bdf8: 2569 0062 000c movel %a1@(98),%a2@(12) } the_mq_fd->oflag = mqstat->mq_flags; 4bdfe: 2153 0014 movel %a3@,%a0@(20) _Thread_Enable_dispatch(); 4be02: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4be08: 246e fff4 moveal %fp@(-12),%a2 omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; } the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); 4be0c: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4be0e: 266e fff8 moveal %fp@(-8),%a3 4be12: 4e5e unlk %fp 4be14: 4e75 rts #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4be16: 4eb9 0005 6684 jsr 56684 <__errno> } 4be1c: 246e fff4 moveal %fp@(-12),%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4be20: 2040 moveal %d0,%a0 4be22: 7209 moveq #9,%d1 4be24: 70ff moveq #-1,%d0 } 4be26: 266e fff8 moveal %fp@(-8),%a3 4be2a: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4be2c: 2081 movel %d1,%a0@ } 4be2e: 4e75 rts POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4be30: 4eb9 0005 6684 jsr 56684 <__errno> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4be36: 246e fff4 moveal %fp@(-12),%a2 POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4be3a: 2040 moveal %d0,%a0 4be3c: 7216 moveq #22,%d1 4be3e: 70ff moveq #-1,%d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4be40: 266e fff8 moveal %fp@(-8),%a3 4be44: 4e5e unlk %fp POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4be46: 2081 movel %d1,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4be48: 4e75 rts ... 00047dd4 : /* * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81 */ int pause( void ) { 47dd4: 4e56 fffc linkw %fp,#-4 47dd8: 2f02 movel %d2,%sp@- sigset_t all_signals; int status; (void) sigfillset( &all_signals ); 47dda: 240e movel %fp,%d2 47ddc: 5982 subql #4,%d2 47dde: 2f02 movel %d2,%sp@- 47de0: 4eb9 0004 8aa8 jsr 48aa8 status = sigtimedwait( &all_signals, NULL, NULL ); 47de6: 42a7 clrl %sp@- 47de8: 42a7 clrl %sp@- 47dea: 2f02 movel %d2,%sp@- 47dec: 4eb9 0004 8c30 jsr 48c30 return status; } 47df2: 242e fff8 movel %fp@(-8),%d2 47df6: 4e5e unlk %fp 47df8: 4e75 rts ... 00045c98 : int pthread_atfork( void (*prepare)(void) __attribute__((unused)), void (*parent)(void) __attribute__((unused)), void (*child)(void) __attribute__((unused)) ) { 45c98: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45c9c: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45ca2: 7258 moveq #88,%d1 45ca4: 2040 moveal %d0,%a0 } 45ca6: 70ff moveq #-1,%d0 45ca8: 4e5e unlk %fp void (*prepare)(void) __attribute__((unused)), void (*parent)(void) __attribute__((unused)), void (*child)(void) __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45caa: 2081 movel %d1,%a0@ } 45cac: 4e75 rts ... 00049f34 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 49f34: 4e56 0000 linkw %fp,#0 49f38: 206e 0008 moveal %fp@(8),%a0 if ( !attr || !attr->is_initialized ) 49f3c: 4a88 tstl %a0 49f3e: 670c beqs 49f4c 49f40: 4a90 tstl %a0@ 49f42: 6708 beqs 49f4c return EINVAL; attr->is_initialized = false; 49f44: 4280 clrl %d0 return 0; } 49f46: 4e5e unlk %fp ) { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; 49f48: 4290 clrl %a0@ return 0; } 49f4a: 4e75 rts { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 49f4c: 7016 moveq #22,%d0 } 49f4e: 4e5e unlk %fp 49f50: 4e75 rts ... 0004c6d4 : #include int pthread_attr_init( pthread_attr_t *attr ) { 4c6d4: 4e56 0000 linkw %fp,#0 4c6d8: 202e 0008 movel %fp@(8),%d0 if ( !attr ) 4c6dc: 671c beqs 4c6fa return EINVAL; *attr = _POSIX_Threads_Default_attributes; 4c6de: 4878 003c pea 3c 4c6e2: 4879 0005 da2c pea 5da2c <_POSIX_Threads_Default_attributes> 4c6e8: 2f00 movel %d0,%sp@- 4c6ea: 4eb9 0005 032c jsr 5032c return 0; 4c6f0: 4fef 000c lea %sp@(12),%sp ) { if ( !attr ) return EINVAL; *attr = _POSIX_Threads_Default_attributes; 4c6f4: 4280 clrl %d0 return 0; } 4c6f6: 4e5e unlk %fp 4c6f8: 4e75 rts int pthread_attr_init( pthread_attr_t *attr ) { if ( !attr ) 4c6fa: 103c 0016 moveb #22,%d0 return EINVAL; *attr = _POSIX_Threads_Default_attributes; return 0; } 4c6fe: 4e5e unlk %fp 4c700: 4e75 rts ... 0004ab54 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 4ab54: 4e56 0000 linkw %fp,#0 4ab58: 206e 0008 moveal %fp@(8),%a0 4ab5c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 4ab60: 4a88 tstl %a0 4ab62: 670a beqs 4ab6e 4ab64: 4a90 tstl %a0@ 4ab66: 6706 beqs 4ab6e return EINVAL; switch ( clock_allowed ) { 4ab68: 7201 moveq #1,%d1 4ab6a: b280 cmpl %d0,%d1 4ab6c: 6406 bccs 4ab74 case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; 4ab6e: 7016 moveq #22,%d0 default: return EINVAL; } } 4ab70: 4e5e unlk %fp 4ab72: 4e75 rts return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 4ab74: 2140 0034 movel %d0,%a0@(52) 4ab78: 4280 clrl %d0 return 0; default: return EINVAL; } } 4ab7a: 4e5e unlk %fp 4ab7c: 4e75 rts ... 0004a0b4 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 4a0b4: 4e56 0000 linkw %fp,#0 4a0b8: 206e 0008 moveal %fp@(8),%a0 4a0bc: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 4a0c0: 4a88 tstl %a0 4a0c2: 670a beqs 4a0ce 4a0c4: 4a90 tstl %a0@ 4a0c6: 6706 beqs 4a0ce return EINVAL; switch ( detachstate ) { 4a0c8: 7201 moveq #1,%d1 4a0ca: b280 cmpl %d0,%d1 4a0cc: 6406 bccs 4a0d4 case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; 4a0ce: 7016 moveq #22,%d0 default: return EINVAL; } } 4a0d0: 4e5e unlk %fp 4a0d2: 4e75 rts return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 4a0d4: 2140 0038 movel %d0,%a0@(56) 4a0d8: 4280 clrl %d0 return 0; default: return EINVAL; } } 4a0da: 4e5e unlk %fp 4a0dc: 4e75 rts ... 0004a1a8 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 4a1a8: 4e56 0000 linkw %fp,#0 4a1ac: 206e 0008 moveal %fp@(8),%a0 4a1b0: 222e 000c movel %fp@(12),%d1 4a1b4: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4a1b6: 4a88 tstl %a0 4a1b8: 6720 beqs 4a1da 4a1ba: 4a90 tstl %a0@ 4a1bc: 671c beqs 4a1da return EINVAL; switch ( contentionscope ) { 4a1be: 4a81 tstl %d1 4a1c0: 660c bnes 4a1ce case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 4a1c2: 42a8 000c clrl %a0@(12) 4a1c6: 4280 clrl %d0 return ENOTSUP; default: return EINVAL; } } 4a1c8: 241f movel %sp@+,%d2 4a1ca: 4e5e unlk %fp 4a1cc: 4e75 rts ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 4a1ce: 203c 0000 0086 movel #134,%d0 4a1d4: 7401 moveq #1,%d2 4a1d6: b481 cmpl %d1,%d2 4a1d8: 67ee beqs 4a1c8 return ENOTSUP; default: return EINVAL; } } 4a1da: 241f movel %sp@+,%d2 return EINVAL; switch ( contentionscope ) { case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; 4a1dc: 7016 moveq #22,%d0 return ENOTSUP; default: return EINVAL; } } 4a1de: 4e5e unlk %fp 4a1e0: 4e75 rts ... 0004a1e4 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 4a1e4: 4e56 0000 linkw %fp,#0 4a1e8: 206e 0008 moveal %fp@(8),%a0 if ( !attr || !attr->is_initialized ) 4a1ec: 4a88 tstl %a0 4a1ee: 6710 beqs 4a200 4a1f0: 4a90 tstl %a0@ 4a1f2: 670c beqs 4a200 return EINVAL; attr->stackaddr = stackaddr; 4a1f4: 4280 clrl %d0 4a1f6: 216e 000c 0004 movel %fp@(12),%a0@(4) return 0; } 4a1fc: 4e5e unlk %fp 4a1fe: 4e75 rts { if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0; 4a200: 7016 moveq #22,%d0 } 4a202: 4e5e unlk %fp 4a204: 4e75 rts ... 0004c744 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 4c744: 4e56 0000 linkw %fp,#0 4c748: 206e 0008 moveal %fp@(8),%a0 4c74c: 222e 000c movel %fp@(12),%d1 if ( !attr || !attr->is_initialized ) 4c750: 4a88 tstl %a0 4c752: 6724 beqs 4c778 4c754: 4a90 tstl %a0@ 4c756: 6720 beqs 4c778 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 4c758: 2039 0005 eb82 movel 5eb82 ,%d0 4c75e: d080 addl %d0,%d0 4c760: b280 cmpl %d0,%d1 4c762: 650a bcss 4c76e attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 4c764: 4280 clrl %d0 return 0; } 4c766: 4e5e unlk %fp return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 4c768: 2141 0008 movel %d1,%a0@(8) return 0; } 4c76c: 4e75 rts { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 4c76e: 2140 0008 movel %d0,%a0@(8) 4c772: 4280 clrl %d0 else attr->stacksize = stacksize; return 0; } 4c774: 4e5e unlk %fp 4c776: 4e75 rts return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 4c778: 7016 moveq #22,%d0 return 0; } 4c77a: 4e5e unlk %fp 4c77c: 4e75 rts ... 00046084 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 46084: 4e56 fff8 linkw %fp,#-8 46088: 206e 0008 moveal %fp@(8),%a0 POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 4608c: 4a88 tstl %a0 4608e: 6730 beqs 460c0 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 46090: 486e fffc pea %fp@(-4) 46094: 2f10 movel %a0@,%sp@- 46096: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 4609c: 4eb9 0004 887c jsr 4887c <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 460a2: 4fef 000c lea %sp@(12),%sp 460a6: 4aae fffc tstl %fp@(-4) 460aa: 6614 bnes 460c0 case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 460ac: 2040 moveal %d0,%a0 460ae: 4aa8 0058 tstl %a0@(88) 460b2: 6712 beqs 460c6 _Thread_Enable_dispatch(); 460b4: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> 460ba: 7010 moveq #16,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 460bc: 4e5e unlk %fp 460be: 4e75 rts _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return 0; 460c0: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 460c2: 4e5e unlk %fp 460c4: 4e75 rts if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 460c6: 2f00 movel %d0,%sp@- 460c8: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 460ce: 2d40 fff8 movel %d0,%fp@(-8) 460d2: 4eb9 0004 8470 jsr 48470 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 460d8: 202e fff8 movel %fp@(-8),%d0 460dc: 2f00 movel %d0,%sp@- 460de: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 460e4: 4eb9 0004 8718 jsr 48718 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 460ea: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> return 0; 460f0: 4fef 0010 lea %sp@(16),%sp _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 460f4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 460f6: 4e5e unlk %fp 460f8: 4e75 rts ... 000460fc : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 460fc: 4e56 ffe0 linkw %fp,#-32 46100: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46104: 246e 0008 moveal %fp@(8),%a2 46108: 262e 000c movel %fp@(12),%d3 4610c: 242e 0010 movel %fp@(16),%d2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 46110: 4a8a tstl %a2 46112: 677a beqs 4618e return EINVAL; if ( count == 0 ) 46114: 4a82 tstl %d2 46116: 6776 beqs 4618e return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46118: 4a83 tstl %d3 4611a: 6700 0090 beqw 461ac 4611e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46120: 4a90 tstl %a0@ 46122: 676a beqs 4618e return EINVAL; switch ( the_attr->process_shared ) { 46124: 4aa8 0004 tstl %a0@(4) 46128: 6664 bnes 4618e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4612a: 2039 0006 0678 movel 60678 <_Thread_Dispatch_disable_level>,%d0 46130: 5280 addql #1,%d0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 46132: 2d42 fffc movel %d2,%fp@(-4) 46136: 23c0 0006 0678 movel %d0,60678 <_Thread_Dispatch_disable_level> } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4613c: 42ae fff8 clrl %fp@(-8) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 46140: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 46146: 4eb9 0004 83e0 jsr 483e0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 4614c: 588f addql #4,%sp 4614e: 2640 moveal %d0,%a3 46150: 4a80 tstl %d0 46152: 6746 beqs 4619a _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 46154: 486e fff8 pea %fp@(-8) 46158: 486b 0010 pea %a3@(16) 4615c: 4eb9 0004 7a50 jsr 47a50 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46162: 202b 0008 movel %a3@(8),%d0 46166: 4281 clrl %d1 46168: 2079 0006 09d2 moveal 609d2 <_POSIX_Barrier_Information+0x18>,%a0 4616e: 3200 movew %d0,%d1 46170: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46174: 42ab 000c clrl %a3@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 46178: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4617a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> return 0; 46180: 508f addql #8,%sp /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); 46182: 4280 clrl %d0 return 0; } 46184: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 4618a: 4e5e unlk %fp 4618c: 4e75 rts /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 4618e: 7016 moveq #22,%d0 } 46190: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46196: 4e5e unlk %fp 46198: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 4619a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> 461a0: 700b moveq #11,%d0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 461a2: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 461a8: 4e5e unlk %fp 461aa: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 461ac: 260e movel %fp,%d3 461ae: 0683 ffff fff0 addil #-16,%d3 461b4: 2f03 movel %d3,%sp@- 461b6: 4eb9 0004 6038 jsr 46038 461bc: 588f addql #4,%sp 461be: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 461c0: 4a90 tstl %a0@ 461c2: 6600 ff60 bnew 46124 461c6: 60c6 bras 4618e <== NOT EXECUTED 00045ff4 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 45ff4: 4e56 0000 linkw %fp,#0 45ff8: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 45ffc: 4a88 tstl %a0 45ffe: 670c beqs 4600c 46000: 4a90 tstl %a0@ 46002: 6708 beqs 4600c return EINVAL; attr->is_initialized = false; 46004: 4280 clrl %d0 return 0; } 46006: 4e5e unlk %fp ) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; 46008: 4290 clrl %a0@ return 0; } 4600a: 4e75 rts { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 4600c: 7016 moveq #22,%d0 } 4600e: 4e5e unlk %fp 46010: 4e75 rts ... 00046058 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 46058: 4e56 0000 linkw %fp,#0 4605c: 206e 0008 moveal %fp@(8),%a0 46060: 202e 000c movel %fp@(12),%d0 if ( !attr ) 46064: 4a88 tstl %a0 46066: 670a beqs 46072 return EINVAL; if ( !attr->is_initialized ) 46068: 4a90 tstl %a0@ 4606a: 6706 beqs 46072 return EINVAL; switch ( pshared ) { 4606c: 7201 moveq #1,%d1 4606e: b280 cmpl %d0,%d1 46070: 6406 bccs 46078 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 46072: 7016 moveq #22,%d0 default: return EINVAL; } } 46074: 4e5e unlk %fp 46076: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 46078: 2140 0004 movel %d0,%a0@(4) 4607c: 4280 clrl %d0 return 0; default: return EINVAL; } } 4607e: 4e5e unlk %fp 46080: 4e75 rts ... 00045770 : */ int pthread_cancel( pthread_t thread ) { 45770: 4e56 fffc linkw %fp,#-4 /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 45774: 2039 0005 f7b2 movel 5f7b2 <_ISR_Nest_level>,%d0 4577a: 6706 beqs 45782 4577c: 7047 moveq #71,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 4577e: 4e5e unlk %fp 45780: 4e75 rts RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 45782: 486e fffc pea %fp@(-4) 45786: 2f2e 0008 movel %fp@(8),%sp@- 4578a: 4879 0005 f8fe pea 5f8fe <_POSIX_Threads_Information> 45790: 4eb9 0004 7918 jsr 47918 <_Objects_Get> if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 45796: 4fef 000c lea %sp@(12),%sp 4579a: 4aae fffc tstl %fp@(-4) 4579e: 661c bnes 457bc case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 457a0: 2240 moveal %d0,%a1 457a2: 7201 moveq #1,%d1 457a4: 2069 010e moveal %a1@(270),%a0 457a8: 2141 00dc movel %d1,%a0@(220) /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 457ac: 2f00 movel %d0,%sp@- 457ae: 4eb9 0004 b05c jsr 4b05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> return 0; 457b4: 588f addql #4,%sp thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 457b6: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 457b8: 4e5e unlk %fp 457ba: 4e75 rts if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 457bc: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 457be: 4e5e unlk %fp 457c0: 4e75 rts ... 00045b68 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 45b68: 4e56 0000 linkw %fp,#0 45b6c: 2f03 movel %d3,%sp@- 45b6e: 262e 000c movel %fp@(12),%d3 45b72: 2f02 movel %d2,%sp@- 45b74: 242e 0008 movel %fp@(8),%d2 /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 45b78: 6754 beqs 45bce rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45b7a: 2039 0006 0120 movel 60120 <_Thread_Dispatch_disable_level>,%d0 45b80: 5280 addql #1,%d0 45b82: 23c0 0006 0120 movel %d0,60120 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 45b88: 4878 0010 pea 10 45b8c: 4eb9 0004 9ff4 jsr 49ff4 <_Workspace_Allocate> if ( handler ) { 45b92: 588f addql #4,%sp 45b94: 4a80 tstl %d0 45b96: 6726 beqs 45bbe thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 45b98: 2079 0006 01da moveal 601da <_Thread_Executing>,%a0 45b9e: 2228 010e movel %a0@(270),%d1 handler->routine = routine; 45ba2: 2040 moveal %d0,%a0 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 45ba4: 0681 0000 00e0 addil #224,%d1 handler->routine = routine; 45baa: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 45bae: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 45bb2: 2f00 movel %d0,%sp@- 45bb4: 2f01 movel %d1,%sp@- 45bb6: 4eb9 0004 7584 jsr 47584 <_Chain_Append> 45bbc: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 45bbe: 242e fff8 movel %fp@(-8),%d2 45bc2: 262e fffc movel %fp@(-4),%d3 45bc6: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 45bc8: 4ef9 0004 8b28 jmp 48b28 <_Thread_Enable_dispatch> } 45bce: 242e fff8 movel %fp@(-8),%d2 45bd2: 262e fffc movel %fp@(-4),%d3 45bd6: 4e5e unlk %fp 45bd8: 4e75 rts ... 00046924 : */ int pthread_cond_broadcast( pthread_cond_t *cond ) { 46924: 4e56 0000 linkw %fp,#0 return _POSIX_Condition_variables_Signal_support( cond, true ); 46928: 4878 0001 pea 1 4692c: 2f2e 0008 movel %fp@(8),%sp@- 46930: 4eb9 0004 6afc jsr 46afc <_POSIX_Condition_variables_Signal_support> } 46936: 4e5e unlk %fp 46938: 4e75 rts ... 00046a2c : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 46a2c: 4e56 0000 linkw %fp,#0 46a30: 202e 000c movel %fp@(12),%d0 46a34: 2f0b movel %a3,%sp@- 46a36: 2f0a movel %a2,%sp@- POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 46a38: 45f9 0005 f04c lea 5f04c <_POSIX_Condition_variables_Default_attributes>,%a2 46a3e: 4a80 tstl %d0 46a40: 6702 beqs 46a44 46a42: 2440 moveal %d0,%a2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 46a44: 7001 moveq #1,%d0 46a46: b0aa 0004 cmpl %a2@(4),%d0 46a4a: 6704 beqs 46a50 return EINVAL; if ( !the_attr->is_initialized ) 46a4c: 4a92 tstl %a2@ 46a4e: 660e bnes 46a5e *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46a50: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 46a54: 7016 moveq #22,%d0 } 46a56: 266e fffc moveal %fp@(-4),%a3 46a5a: 4e5e unlk %fp 46a5c: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46a5e: 2039 0006 1964 movel 61964 <_Thread_Dispatch_disable_level>,%d0 46a64: 5280 addql #1,%d0 46a66: 23c0 0006 1964 movel %d0,61964 <_Thread_Dispatch_disable_level> */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 46a6c: 4879 0006 1d32 pea 61d32 <_POSIX_Condition_variables_Information> 46a72: 4eb9 0004 935c jsr 4935c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 46a78: 588f addql #4,%sp 46a7a: 2640 moveal %d0,%a3 46a7c: 4a80 tstl %d0 46a7e: 6752 beqs 46ad2 return ENOMEM; } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 46a80: 42ab 0014 clrl %a3@(20) if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 46a84: 276a 0004 0010 movel %a2@(4),%a3@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 46a8a: 4878 0074 pea 74 46a8e: 4878 0800 pea 800 46a92: 42a7 clrl %sp@- 46a94: 486b 0018 pea %a3@(24) 46a98: 4eb9 0004 a82c jsr 4a82c <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46a9e: 202b 0008 movel %a3@(8),%d0 46aa2: 4281 clrl %d1 46aa4: 2079 0006 1d4a moveal 61d4a <_POSIX_Condition_variables_Information+0x18>,%a0 46aaa: 3200 movew %d0,%d1 46aac: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46ab0: 42ab 000c clrl %a3@(12) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 46ab4: 206e 0008 moveal %fp@(8),%a0 46ab8: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 46aba: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> return 0; } 46ac0: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 46ac4: 4fef 0010 lea %sp@(16),%sp 0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch(); 46ac8: 4280 clrl %d0 return 0; } 46aca: 266e fffc moveal %fp@(-4),%a3 46ace: 4e5e unlk %fp 46ad0: 4e75 rts _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 46ad2: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46ad8: 246e fff8 moveal %fp@(-8),%a2 _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 46adc: 700c moveq #12,%d0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46ade: 266e fffc moveal %fp@(-4),%a3 46ae2: 4e5e unlk %fp 46ae4: 4e75 rts ... 00046b64 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 46b64: 4e56 fffc linkw %fp,#-4 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 46b68: 486e fffc pea %fp@(-4) 46b6c: 2f2e 0010 movel %fp@(16),%sp@- 46b70: 4eb9 0004 7060 jsr 47060 <_POSIX_Absolute_timeout_to_ticks> 46b76: 508f addql #8,%sp 46b78: 4a80 tstl %d0 46b7a: 6606 bnes 46b82 46b7c: 7016 moveq #22,%d0 cond, mutex, ticks, already_timedout ); } 46b7e: 4e5e unlk %fp 46b80: 4e75 rts * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 46b82: 7202 moveq #2,%d1 46b84: b280 cmpl %d0,%d1 46b86: 55c0 scs %d0 46b88: 49c0 extbl %d0 default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support( 46b8a: 2040 moveal %d0,%a0 46b8c: 4868 0001 pea %a0@(1) 46b90: 2f2e fffc movel %fp@(-4),%sp@- 46b94: 2f2e 000c movel %fp@(12),%sp@- 46b98: 2f2e 0008 movel %fp@(8),%sp@- 46b9c: 4eb9 0004 6bc8 jsr 46bc8 <_POSIX_Condition_variables_Wait_support> 46ba2: 4fef 0010 lea %sp@(16),%sp cond, mutex, ticks, already_timedout ); } 46ba6: 4e5e unlk %fp 46ba8: 4e75 rts ... 00046bac : int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) { 46bac: 4e56 0000 linkw %fp,#0 return _POSIX_Condition_variables_Wait_support( 46bb0: 42a7 clrl %sp@- 46bb2: 42a7 clrl %sp@- 46bb4: 2f2e 000c movel %fp@(12),%sp@- 46bb8: 2f2e 0008 movel %fp@(8),%sp@- 46bbc: 4eb9 0004 6bc8 jsr 46bc8 <_POSIX_Condition_variables_Wait_support> cond, mutex, THREAD_QUEUE_WAIT_FOREVER, false ); } 46bc2: 4e5e unlk %fp 46bc4: 4e75 rts ... 0004688c : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 4688c: 4e56 0000 linkw %fp,#0 46890: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 46894: 4a88 tstl %a0 46896: 670c beqs 468a4 46898: 4a90 tstl %a0@ 4689a: 6708 beqs 468a4 return EINVAL; attr->is_initialized = false; 4689c: 4280 clrl %d0 return 0; } 4689e: 4e5e unlk %fp ) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; 468a0: 4290 clrl %a0@ return 0; } 468a2: 4e75 rts { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 468a4: 7016 moveq #22,%d0 } 468a6: 4e5e unlk %fp 468a8: 4e75 rts ... 000468fc : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 468fc: 4e56 0000 linkw %fp,#0 46900: 206e 0008 moveal %fp@(8),%a0 46904: 202e 000c movel %fp@(12),%d0 if ( !attr ) 46908: 4a88 tstl %a0 4690a: 6706 beqs 46912 return EINVAL; switch ( pshared ) { 4690c: 7201 moveq #1,%d1 4690e: b280 cmpl %d0,%d1 46910: 6406 bccs 46918 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 46912: 7016 moveq #22,%d0 default: return EINVAL; } } 46914: 4e5e unlk %fp 46916: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 46918: 2140 0004 movel %d0,%a0@(4) 4691c: 4280 clrl %d0 return 0; default: return EINVAL; } } 4691e: 4e5e unlk %fp 46920: 4e75 rts ... 00046014 : #include int pthread_detach( pthread_t thread ) { 46014: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 46018: 486e fffc pea %fp@(-4) 4601c: 2f2e 0008 movel %fp@(8),%sp@- 46020: 4879 0006 0ffa pea 60ffa <_POSIX_Threads_Information> 46026: 4eb9 0004 84ac jsr 484ac <_Objects_Get> register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4602c: 4fef 000c lea %sp@(12),%sp 46030: 4aae fffc tstl %fp@(-4) 46034: 6616 bnes 4604c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 46036: 2240 moveal %d0,%a1 46038: 2069 010e moveal %a1@(270),%a0 4603c: 42a8 003c clrl %a0@(60) _Thread_Enable_dispatch(); 46040: 4eb9 0004 8cbc jsr 48cbc <_Thread_Enable_dispatch> 46046: 4280 clrl %d0 case OBJECTS_ERROR: break; } return ESRCH; } 46048: 4e5e unlk %fp 4604a: 4e75 rts register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4604c: 7003 moveq #3,%d0 case OBJECTS_ERROR: break; } return ESRCH; } 4604e: 4e5e unlk %fp 46050: 4e75 rts ... 000462b8 : int pthread_equal( pthread_t t1, pthread_t t2 ) { 462b8: 4e56 0000 linkw %fp,#0 462bc: 202e 000c movel %fp@(12),%d0 462c0: b0ae 0008 cmpl %fp@(8),%d0 462c4: 57c0 seq %d0 break; } return status; #endif } 462c6: 4e5e unlk %fp int pthread_equal( pthread_t t1, pthread_t t2 ) { 462c8: 49c0 extbl %d0 break; } return status; #endif } 462ca: 4480 negl %d0 462cc: 4e75 rts ... 0004d894 : } void pthread_exit( void *value_ptr ) { 4d894: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4d898: 2f2e 0008 movel %fp@(8),%sp@- 4d89c: 2f39 0005 efbe movel 5efbe <_Thread_Executing>,%sp@- 4d8a2: 4eb9 0004 d824 jsr 4d824 <_POSIX_Thread_Exit> 4d8a8: 508f addql #8,%sp <== NOT EXECUTED } 4d8aa: 4e5e unlk %fp <== NOT EXECUTED 4d8ac: 4e75 rts <== NOT EXECUTED ... 00045cb0 : int pthread_getcpuclockid( pthread_t pid, clockid_t *clock_id ) { 45cb0: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45cb4: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45cba: 7258 moveq #88,%d1 45cbc: 2040 moveal %d0,%a0 } 45cbe: 70ff moveq #-1,%d0 45cc0: 4e5e unlk %fp int pthread_getcpuclockid( pthread_t pid, clockid_t *clock_id ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45cc2: 2081 movel %d1,%a0@ } 45cc4: 4e75 rts ... 000484cc : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 484cc: 4e56 fff0 linkw %fp,#-16 484d0: 48d7 1c00 moveml %a2-%a4,%sp@ 484d4: 266e 000c moveal %fp@(12),%a3 484d8: 246e 0010 moveal %fp@(16),%a2 Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 484dc: 4a8b tstl %a3 484de: 676e beqs 4854e 484e0: 4a8a tstl %a2 484e2: 676a beqs 4854e RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 484e4: 486e fffc pea %fp@(-4) 484e8: 2f2e 0008 movel %fp@(8),%sp@- 484ec: 4879 0006 43ba pea 643ba <_POSIX_Threads_Information> 484f2: 4eb9 0004 aab8 jsr 4aab8 <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 484f8: 4fef 000c lea %sp@(12),%sp 484fc: 4aae fffc tstl %fp@(-4) 48500: 6640 bnes 48542 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 48502: 2040 moveal %d0,%a0 if ( policy ) *policy = api->schedpolicy; if ( param ) { *param = api->schedparam; param->sched_priority = 48504: 4281 clrl %d1 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 48506: 2868 010e moveal %a0@(270),%a4 if ( policy ) *policy = api->schedpolicy; if ( param ) { *param = api->schedparam; 4850a: 204a moveal %a2,%a0 4850c: 43ec 0084 lea %a4@(132),%a1 switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; 48510: 26ac 0080 movel %a4@(128),%a3@ if ( param ) { *param = api->schedparam; param->sched_priority = 48514: 1239 0006 29e6 moveb 629e6 ,%d1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; if ( param ) { *param = api->schedparam; 4851a: 20d9 movel %a1@+,%a0@+ 4851c: 20d9 movel %a1@+,%a0@+ 4851e: 20d9 movel %a1@+,%a0@+ 48520: 20d9 movel %a1@+,%a0@+ 48522: 20d9 movel %a1@+,%a0@+ 48524: 20d9 movel %a1@+,%a0@+ 48526: 2091 movel %a1@,%a0@ param->sched_priority = 48528: 2040 moveal %d0,%a0 4852a: 92a8 0014 subl %a0@(20),%d1 4852e: 2481 movel %d1,%a2@ _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 48530: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> break; } return ESRCH; } 48536: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 if ( param ) { *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 4853c: 4280 clrl %d0 break; } return ESRCH; } 4853e: 4e5e unlk %fp 48540: 4e75 rts if ( !policy || !param ) return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 48542: 7003 moveq #3,%d0 break; } return ESRCH; } 48544: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 4854a: 4e5e unlk %fp 4854c: 4e75 rts *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); return 0; 4854e: 7016 moveq #22,%d0 break; } return ESRCH; } 48550: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 48556: 4e5e unlk %fp 48558: 4e75 rts ... 00045d88 : */ int pthread_key_delete( pthread_key_t key ) { 45d88: 4e56 ffec linkw %fp,#-20 45d8c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 45d90: 486e fffc pea %fp@(-4) 45d94: 2f2e 0008 movel %fp@(8),%sp@- 45d98: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45d9e: 4eb9 0004 85b8 jsr 485b8 <_Objects_Get> register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 45da4: 4fef 000c lea %sp@(12),%sp 45da8: 2600 movel %d0,%d3 45daa: 4aae fffc tstl %fp@(-4) 45dae: 6656 bnes 45e06 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 45db0: 2f00 movel %d0,%sp@- 45db2: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45db8: 2440 moveal %d0,%a2 45dba: 45ea 0018 lea %a2@(24),%a2 45dbe: 7401 moveq #1,%d2 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) _Workspace_Free( the_key->Values[ the_api ] ); 45dc0: 47f9 0004 a344 lea 4a344 <_Workspace_Free>,%a3 the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 45dc6: 4eb9 0004 81ac jsr 481ac <_Objects_Close> 45dcc: 508f addql #8,%sp for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 45dce: 2012 movel %a2@,%d0 switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) 45dd0: 5282 addql #1,%d2 45dd2: 588a addql #4,%a2 if ( the_key->Values[ the_api ] ) 45dd4: 4a80 tstl %d0 45dd6: 6706 beqs 45dde _Workspace_Free( the_key->Values[ the_api ] ); 45dd8: 2f00 movel %d0,%sp@- 45dda: 4e93 jsr %a3@ 45ddc: 588f addql #4,%sp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) 45dde: 7005 moveq #5,%d0 45de0: b082 cmpl %d2,%d0 45de2: 66ea bnes 45dce */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 45de4: 2f03 movel %d3,%sp@- 45de6: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45dec: 4eb9 0004 8454 jsr 48454 <_Objects_Free> * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 45df2: 4eb9 0004 8dc8 jsr 48dc8 <_Thread_Enable_dispatch> return 0; 45df8: 508f addql #8,%sp * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 45dfa: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 45dfc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 45e02: 4e5e unlk %fp 45e04: 4e75 rts register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 45e06: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45e08: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 45e0e: 4e5e unlk %fp 45e10: 4e75 rts ... 00047b90 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 47b90: 4e56 fffc linkw %fp,#-4 47b94: 2f0a movel %a2,%sp@- register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 47b96: 486e fffc pea %fp@(-4) 47b9a: 2f2e 0008 movel %fp@(8),%sp@- 47b9e: 4eb9 0004 7c8e jsr 47c8e <_POSIX_Mutex_Get> switch ( location ) { 47ba4: 508f addql #8,%sp ) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 47ba6: 2440 moveal %d0,%a2 switch ( location ) { 47ba8: 4aae fffc tstl %fp@(-4) 47bac: 670a beqs 47bb8 case OBJECTS_ERROR: break; } return EINVAL; } 47bae: 246e fff8 moveal %fp@(-8),%a2 { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 47bb2: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 47bb4: 4e5e unlk %fp 47bb6: 4e75 rts /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 47bb8: 4aaa 0062 tstl %a2@(98) 47bbc: 6610 bnes 47bce _Thread_Enable_dispatch(); 47bbe: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 47bc4: 246e fff8 moveal %fp@(-8),%a2 * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); 47bc8: 7010 moveq #16,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 47bca: 4e5e unlk %fp 47bcc: 4e75 rts if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 47bce: 2f00 movel %d0,%sp@- 47bd0: 4879 0006 44dc pea 644dc <_POSIX_Mutex_Information> 47bd6: 4eb9 0004 a6ac jsr 4a6ac <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 47bdc: 4878 0016 pea 16 47be0: 42a7 clrl %sp@- 47be2: 486a 0014 pea %a2@(20) 47be6: 4eb9 0004 9c28 jsr 49c28 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 47bec: 2f0a movel %a2,%sp@- 47bee: 4879 0006 44dc pea 644dc <_POSIX_Mutex_Information> 47bf4: 4eb9 0004 a954 jsr 4a954 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 47bfa: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 47c00: 246e fff8 moveal %fp@(-8),%a2 _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); return 0; 47c04: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 47c08: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 47c0a: 4e5e unlk %fp 47c0c: 4e75 rts ... 00047d04 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 47d04: 4e56 fffc linkw %fp,#-4 47d08: 2f0a movel %a2,%sp@- 47d0a: 246e 000c moveal %fp@(12),%a2 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 47d0e: 4a8a tstl %a2 47d10: 6736 beqs 47d48 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 47d12: 486e fffc pea %fp@(-4) 47d16: 2f2e 0008 movel %fp@(8),%sp@- 47d1a: 4eb9 0004 7c8e jsr 47c8e <_POSIX_Mutex_Get> switch ( location ) { 47d20: 508f addql #8,%sp 47d22: 4aae fffc tstl %fp@(-4) 47d26: 6620 bnes 47d48 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 47d28: 4281 clrl %d1 47d2a: 1239 0006 29e6 moveb 629e6 ,%d1 47d30: 2040 moveal %d0,%a0 47d32: 92a8 005e subl %a0@(94),%d1 47d36: 2481 movel %d1,%a2@ the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 47d38: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 47d3e: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 47d42: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 47d44: 4e5e unlk %fp 47d46: 4e75 rts 47d48: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 47d4c: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 47d4e: 4e5e unlk %fp 47d50: 4e75 rts ... 00047fac : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 47fac: 4e56 fffc linkw %fp,#-4 47fb0: 2f02 movel %d2,%sp@- * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 47fb2: 486e fffc pea %fp@(-4) 47fb6: 2f2e 000c movel %fp@(12),%sp@- int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 47fba: 242e 0008 movel %fp@(8),%d2 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 47fbe: 4eb9 0004 8088 jsr 48088 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 47fc4: 508f addql #8,%sp 47fc6: 7203 moveq #3,%d1 47fc8: b280 cmpl %d0,%d1 47fca: 671a beqs 47fe6 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 47fcc: 2f2e fffc movel %fp@(-4),%sp@- 47fd0: 42a7 clrl %sp@- 47fd2: 2f02 movel %d2,%sp@- 47fd4: 4eb9 0004 7ea8 jsr 47ea8 <_POSIX_Mutex_Lock_support> break; } } return lock_status; } 47fda: 242e fff8 movel %fp@(-8),%d2 */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 47fde: 4fef 000c lea %sp@(12),%sp break; } } return lock_status; } 47fe2: 4e5e unlk %fp 47fe4: 4e75 rts */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 47fe6: 2f2e fffc movel %fp@(-4),%sp@- 47fea: 4878 0001 pea 1 47fee: 2f02 movel %d2,%sp@- 47ff0: 4eb9 0004 7ea8 jsr 47ea8 <_POSIX_Mutex_Lock_support> break; } } return lock_status; } 47ff6: 242e fff8 movel %fp@(-8),%d2 */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 47ffa: 4fef 000c lea %sp@(12),%sp break; } } return lock_status; } 47ffe: 4e5e unlk %fp 48000: 4e75 rts ... 0004801c : */ int pthread_mutex_trylock( pthread_mutex_t *mutex ) { 4801c: 4e56 0000 linkw %fp,#0 return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER ); 48020: 42a7 clrl %sp@- 48022: 42a7 clrl %sp@- 48024: 2f2e 0008 movel %fp@(8),%sp@- 48028: 4eb9 0004 7ea8 jsr 47ea8 <_POSIX_Mutex_Lock_support> } 4802e: 4e5e unlk %fp 48030: 4e75 rts ... 00047a1c : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 47a1c: 4e56 0000 linkw %fp,#0 47a20: 206e 0008 moveal %fp@(8),%a0 if ( !attr || !attr->is_initialized ) 47a24: 4a88 tstl %a0 47a26: 670c beqs 47a34 47a28: 4a90 tstl %a0@ 47a2a: 6708 beqs 47a34 return EINVAL; attr->is_initialized = false; 47a2c: 4280 clrl %d0 return 0; } 47a2e: 4e5e unlk %fp ) { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; 47a30: 4290 clrl %a0@ return 0; } 47a32: 4e75 rts { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 47a34: 7016 moveq #22,%d0 } 47a36: 4e5e unlk %fp 47a38: 4e75 rts ... 00047af0 : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 47af0: 4e56 0000 linkw %fp,#0 47af4: 2f0a movel %a2,%sp@- 47af6: 246e 0008 moveal %fp@(8),%a2 47afa: 2f02 movel %d2,%sp@- 47afc: 242e 000c movel %fp@(12),%d2 if ( !attr || !attr->is_initialized ) 47b00: 4a8a tstl %a2 47b02: 6704 beqs 47b08 47b04: 4a92 tstl %a2@ 47b06: 660e bnes 47b16 if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; } 47b08: 242e fff8 movel %fp@(-8),%d2 if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; 47b0c: 7016 moveq #22,%d0 } 47b0e: 246e fffc moveal %fp@(-4),%a2 47b12: 4e5e unlk %fp 47b14: 4e75 rts ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 47b16: 2f02 movel %d2,%sp@- 47b18: 4eb9 0004 8114 jsr 48114 <_POSIX_Priority_Is_valid> 47b1e: 588f addql #4,%sp 47b20: 4a00 tstb %d0 47b22: 67e4 beqs 47b08 return EINVAL; attr->prio_ceiling = prioceiling; 47b24: 2542 0008 movel %d2,%a2@(8) return 0; } 47b28: 242e fff8 movel %fp@(-8),%d2 47b2c: 246e fffc moveal %fp@(-4),%a2 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; 47b30: 4280 clrl %d0 return 0; } 47b32: 4e5e unlk %fp 47b34: 4e75 rts ... 00047b38 : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 47b38: 4e56 0000 linkw %fp,#0 47b3c: 206e 0008 moveal %fp@(8),%a0 47b40: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 47b44: 4a88 tstl %a0 47b46: 670a beqs 47b52 47b48: 4a90 tstl %a0@ 47b4a: 6706 beqs 47b52 return EINVAL; switch ( protocol ) { 47b4c: 7202 moveq #2,%d1 47b4e: b280 cmpl %d0,%d1 47b50: 6406 bccs 47b58 case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; 47b52: 7016 moveq #22,%d0 default: return EINVAL; } } 47b54: 4e5e unlk %fp 47b56: 4e75 rts switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 47b58: 2140 000c movel %d0,%a0@(12) 47b5c: 4280 clrl %d0 return 0; default: return EINVAL; } } 47b5e: 4e5e unlk %fp 47b60: 4e75 rts ... 00047b64 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 47b64: 4e56 0000 linkw %fp,#0 47b68: 206e 0008 moveal %fp@(8),%a0 47b6c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 47b70: 4a88 tstl %a0 47b72: 670a beqs 47b7e 47b74: 4a90 tstl %a0@ 47b76: 6706 beqs 47b7e return EINVAL; switch ( pshared ) { 47b78: 7201 moveq #1,%d1 47b7a: b280 cmpl %d0,%d1 47b7c: 6406 bccs 47b84 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 47b7e: 7016 moveq #22,%d0 default: return EINVAL; } } 47b80: 4e5e unlk %fp 47b82: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 47b84: 2140 0004 movel %d0,%a0@(4) 47b88: 4280 clrl %d0 return 0; default: return EINVAL; } } 47b8a: 4e5e unlk %fp 47b8c: 4e75 rts ... 000459c4 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 459c4: 4e56 0000 linkw %fp,#0 459c8: 206e 0008 moveal %fp@(8),%a0 459cc: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 459d0: 4a88 tstl %a0 459d2: 670a beqs 459de 459d4: 4a90 tstl %a0@ 459d6: 6706 beqs 459de return EINVAL; switch ( type ) { 459d8: 7203 moveq #3,%d1 459da: b280 cmpl %d0,%d1 459dc: 6406 bccs 459e4 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 459de: 7016 moveq #22,%d0 default: return EINVAL; } } 459e0: 4e5e unlk %fp 459e2: 4e75 rts switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 459e4: 2140 0010 movel %d0,%a0@(16) 459e8: 4280 clrl %d0 return 0; default: return EINVAL; } } 459ea: 4e5e unlk %fp 459ec: 4e75 rts ... 00046768 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 46768: 4e56 ffec linkw %fp,#-20 4676c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 46770: 246e 0008 moveal %fp@(8),%a2 46774: 266e 000c moveal %fp@(12),%a3 if ( !once_control || !init_routine ) 46778: 4a8a tstl %a2 4677a: 6766 beqs 467e2 4677c: 4a8b tstl %a3 4677e: 6762 beqs 467e2 return EINVAL; if ( !once_control->init_executed ) { 46780: 4aaa 0004 tstl %a2@(4) 46784: 670c beqs 46792 if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 46786: 4280 clrl %d0 } return 0; } 46788: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 4678e: 4e5e unlk %fp 46790: 4e75 rts if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 46792: 240e movel %fp,%d2 46794: 5982 subql #4,%d2 46796: 49f9 0004 7428 lea 47428 ,%a4 4679c: 2f02 movel %d2,%sp@- 4679e: 4878 0100 pea 100 467a2: 4878 0100 pea 100 467a6: 4e94 jsr %a4@ if ( !once_control->init_executed ) { 467a8: 4fef 000c lea %sp@(12),%sp 467ac: 4aaa 0004 tstl %a2@(4) 467b0: 6714 beqs 467c6 once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 467b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 467b4: 4878 0100 pea 100 <== NOT EXECUTED 467b8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 467bc: 4e94 jsr %a4@ <== NOT EXECUTED 467be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 467c2: 4280 clrl %d0 467c4: 60c2 bras 46788 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; 467c6: 7001 moveq #1,%d0 467c8: 2540 0004 movel %d0,%a2@(4) if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; 467cc: 2480 movel %d0,%a2@ once_control->init_executed = true; (*init_routine)(); 467ce: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 467d0: 2f02 movel %d2,%sp@- 467d2: 4878 0100 pea 100 467d6: 2f2e fffc movel %fp@(-4),%sp@- 467da: 4e94 jsr %a4@ 467dc: 4fef 000c lea %sp@(12),%sp 467e0: 60e0 bras 467c2 467e2: 7016 moveq #22,%d0 } return 0; } 467e4: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 467ea: 4e5e unlk %fp 467ec: 4e75 rts ... 000469f8 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 469f8: 4e56 fffc linkw %fp,#-4 469fc: 206e 0008 moveal %fp@(8),%a0 46a00: 2f0a movel %a2,%sp@- POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 46a02: 4a88 tstl %a0 46a04: 673e beqs 46a44 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 46a06: 486e fffc pea %fp@(-4) 46a0a: 2f10 movel %a0@,%sp@- 46a0c: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46a12: 4eb9 0004 9858 jsr 49858 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46a18: 4fef 000c lea %sp@(12),%sp 46a1c: 2440 moveal %d0,%a2 46a1e: 4aae fffc tstl %fp@(-4) 46a22: 6620 bnes 46a44 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 46a24: 486a 0010 pea %a2@(16) 46a28: 4eb9 0004 a91c jsr 4a91c <_Thread_queue_First> 46a2e: 588f addql #4,%sp 46a30: 4a80 tstl %d0 46a32: 671a beqs 46a4e _Thread_Enable_dispatch(); 46a34: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 46a3a: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { _Thread_Enable_dispatch(); 46a3e: 7010 moveq #16,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46a40: 4e5e unlk %fp 46a42: 4e75 rts 46a44: 246e fff8 moveal %fp@(-8),%a2 _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0; 46a48: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46a4a: 4e5e unlk %fp 46a4c: 4e75 rts /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 46a4e: 2f0a movel %a2,%sp@- 46a50: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46a56: 4eb9 0004 944c jsr 4944c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 46a5c: 2f0a movel %a2,%sp@- 46a5e: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46a64: 4eb9 0004 96f4 jsr 496f4 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 46a6a: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 46a70: 246e fff8 moveal %fp@(-8),%a2 _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0; 46a74: 4fef 0010 lea %sp@(16),%sp _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 46a78: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 46a7a: 4e5e unlk %fp 46a7c: 4e75 rts ... 00046d4c : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 46d4c: 4e56 fffc linkw %fp,#-4 46d50: 2f0a movel %a2,%sp@- 46d52: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 46d56: 4a8a tstl %a2 46d58: 6752 beqs 46dac 46d5a: 486e fffc pea %fp@(-4) 46d5e: 2f12 movel %a2@,%sp@- 46d60: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46d66: 4eb9 0004 9858 jsr 49858 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46d6c: 4fef 000c lea %sp@(12),%sp 46d70: 4aae fffc tstl %fp@(-4) 46d74: 6636 bnes 46dac case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 46d76: 42a7 clrl %sp@- 46d78: 2040 moveal %d0,%a0 46d7a: 42a7 clrl %sp@- 46d7c: 42a7 clrl %sp@- 46d7e: 2f12 movel %a2@,%sp@- 46d80: 4868 0010 pea %a0@(16) 46d84: 4eb9 0004 8b1c jsr 48b1c <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 46d8a: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 46d90: 2079 0006 1d12 moveal 61d12 <_Thread_Executing>,%a0 46d96: 2f28 0034 movel %a0@(52),%sp@- 46d9a: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 46da0: 246e fff8 moveal %fp@(-8),%a2 NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 46da4: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return EINVAL; } 46da8: 4e5e unlk %fp 46daa: 4e75 rts 46dac: 246e fff8 moveal %fp@(-8),%a2 NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 46db0: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46db2: 4e5e unlk %fp 46db4: 4e75 rts ... 00046db8 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 46db8: 4e56 fffc linkw %fp,#-4 46dbc: 2f0a movel %a2,%sp@- 46dbe: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 46dc2: 4a8a tstl %a2 46dc4: 6752 beqs 46e18 46dc6: 486e fffc pea %fp@(-4) 46dca: 2f12 movel %a2@,%sp@- 46dcc: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46dd2: 4eb9 0004 9858 jsr 49858 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46dd8: 4fef 000c lea %sp@(12),%sp 46ddc: 4aae fffc tstl %fp@(-4) 46de0: 6636 bnes 46e18 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 46de2: 42a7 clrl %sp@- 46de4: 2040 moveal %d0,%a0 46de6: 42a7 clrl %sp@- 46de8: 42a7 clrl %sp@- 46dea: 2f12 movel %a2@,%sp@- 46dec: 4868 0010 pea %a0@(16) 46df0: 4eb9 0004 8bdc jsr 48bdc <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 46df6: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 46dfc: 2079 0006 1d12 moveal 61d12 <_Thread_Executing>,%a0 46e02: 2f28 0034 movel %a0@(52),%sp@- 46e06: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 46e0c: 246e fff8 moveal %fp@(-8),%a2 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 46e10: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return EINVAL; } 46e14: 4e5e unlk %fp 46e16: 4e75 rts 46e18: 246e fff8 moveal %fp@(-8),%a2 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 46e1c: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46e1e: 4e5e unlk %fp 46e20: 4e75 rts ... 00046e24 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 46e24: 4e56 fffc linkw %fp,#-4 46e28: 206e 0008 moveal %fp@(8),%a0 46e2c: 2f02 movel %d2,%sp@- POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 46e2e: 4a88 tstl %a0 46e30: 6742 beqs 46e74 46e32: 486e fffc pea %fp@(-4) 46e36: 2f10 movel %a0@,%sp@- 46e38: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46e3e: 4eb9 0004 9858 jsr 49858 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46e44: 4fef 000c lea %sp@(12),%sp 46e48: 4aae fffc tstl %fp@(-4) 46e4c: 6626 bnes 46e74 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 46e4e: 2040 moveal %d0,%a0 46e50: 4868 0010 pea %a0@(16) 46e54: 4eb9 0004 8c6c jsr 48c6c <_CORE_RWLock_Release> 46e5a: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 46e5c: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 46e62: 2f02 movel %d2,%sp@- 46e64: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 46e6a: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 46e6e: 508f addql #8,%sp case OBJECTS_ERROR: break; } return EINVAL; } 46e70: 4e5e unlk %fp 46e72: 4e75 rts 46e74: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 46e78: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46e7a: 4e5e unlk %fp 46e7c: 4e75 rts ... 00047574 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 47574: 4e56 0000 linkw %fp,#0 47578: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 4757c: 4a88 tstl %a0 4757e: 670c beqs 4758c 47580: 4a90 tstl %a0@ 47582: 6708 beqs 4758c return EINVAL; attr->is_initialized = false; 47584: 4280 clrl %d0 return 0; } 47586: 4e5e unlk %fp ) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; 47588: 4290 clrl %a0@ return 0; } 4758a: 4e75 rts { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 4758c: 7016 moveq #22,%d0 } 4758e: 4e5e unlk %fp 47590: 4e75 rts ... 000475d8 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 475d8: 4e56 0000 linkw %fp,#0 475dc: 206e 0008 moveal %fp@(8),%a0 475e0: 202e 000c movel %fp@(12),%d0 if ( !attr ) 475e4: 4a88 tstl %a0 475e6: 670a beqs 475f2 return EINVAL; if ( !attr->is_initialized ) 475e8: 4a90 tstl %a0@ 475ea: 6706 beqs 475f2 return EINVAL; switch ( pshared ) { 475ec: 7201 moveq #1,%d1 475ee: b280 cmpl %d0,%d1 475f0: 6406 bccs 475f8 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 475f2: 7016 moveq #22,%d0 default: return EINVAL; } } 475f4: 4e5e unlk %fp 475f6: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 475f8: 2140 0004 movel %d0,%a0@(4) 475fc: 4280 clrl %d0 return 0; default: return EINVAL; } } 475fe: 4e5e unlk %fp 47600: 4e75 rts ... 0004eb30 : #include #include pthread_t pthread_self( void ) { 4eb30: 4e56 0000 linkw %fp,#0 4eb34: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 return _Thread_Executing->Object.id; } 4eb3a: 4e5e unlk %fp 4eb3c: 2028 0008 movel %a0@(8),%d0 4eb40: 4e75 rts ... 00045864 : int pthread_setcancelstate( int state, int *oldstate ) { 45864: 4e56 0000 linkw %fp,#0 45868: 222e 0008 movel %fp@(8),%d1 4586c: 206e 000c moveal %fp@(12),%a0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 45870: 2039 0005 f7b2 movel 5f7b2 <_ISR_Nest_level>,%d0 45876: 6610 bnes 45888 return EPROTO; if ( !oldstate ) 45878: 4a88 tstl %a0 4587a: 6706 beqs 45882 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 4587c: 7001 moveq #1,%d0 4587e: b081 cmpl %d1,%d0 45880: 640c bccs 4588e /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 45882: 7016 moveq #22,%d0 } 45884: 4e5e unlk %fp 45886: 4e75 rts * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 45888: 7047 moveq #71,%d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 4588a: 4e5e unlk %fp 4588c: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4588e: 2039 0005 f718 movel 5f718 <_Thread_Dispatch_disable_level>,%d0 45894: 5280 addql #1,%d0 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 45896: 2279 0005 f7d2 moveal 5f7d2 <_Thread_Executing>,%a1 4589c: 23c0 0005 f718 movel %d0,5f718 <_Thread_Dispatch_disable_level> 458a2: 2269 010e moveal %a1@(270),%a1 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 458a6: 20a9 00d4 movel %a1@(212),%a0@ thread_support->cancelability_state = state; 458aa: 2341 00d4 movel %d1,%a1@(212) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 458ae: 2f39 0005 f7d2 movel 5f7d2 <_Thread_Executing>,%sp@- 458b4: 4eb9 0004 b05c jsr 4b05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 458ba: 588f addql #4,%sp _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 458bc: 4280 clrl %d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 458be: 4e5e unlk %fp 458c0: 4e75 rts ... 000458c4 : int pthread_setcanceltype( int type, int *oldtype ) { 458c4: 4e56 0000 linkw %fp,#0 458c8: 222e 0008 movel %fp@(8),%d1 458cc: 206e 000c moveal %fp@(12),%a0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 458d0: 2039 0005 f7b2 movel 5f7b2 <_ISR_Nest_level>,%d0 458d6: 6610 bnes 458e8 return EPROTO; if ( !oldtype ) 458d8: 4a88 tstl %a0 458da: 6706 beqs 458e2 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 458dc: 7001 moveq #1,%d0 458de: b081 cmpl %d1,%d0 458e0: 640c bccs 458ee _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 458e2: 7016 moveq #22,%d0 } 458e4: 4e5e unlk %fp 458e6: 4e75 rts * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 458e8: 7047 moveq #71,%d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 458ea: 4e5e unlk %fp 458ec: 4e75 rts 458ee: 2039 0005 f718 movel 5f718 <_Thread_Dispatch_disable_level>,%d0 458f4: 5280 addql #1,%d0 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 458f6: 2279 0005 f7d2 moveal 5f7d2 <_Thread_Executing>,%a1 458fc: 23c0 0005 f718 movel %d0,5f718 <_Thread_Dispatch_disable_level> 45902: 2269 010e moveal %a1@(270),%a1 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 45906: 20a9 00d8 movel %a1@(216),%a0@ thread_support->cancelability_type = type; 4590a: 2341 00d8 movel %d1,%a1@(216) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 4590e: 2f39 0005 f7d2 movel 5f7d2 <_Thread_Executing>,%sp@- 45914: 4eb9 0004 b05c jsr 4b05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 4591a: 588f addql #4,%sp _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 4591c: 4280 clrl %d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 4591e: 4e5e unlk %fp 45920: 4e75 rts ... 0004897c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 4897c: 4e56 ffe0 linkw %fp,#-32 48980: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 48984: 282e 000c movel %fp@(12),%d4 48988: 242e 0010 movel %fp@(16),%d2 int rc; /* * Check all the parameters */ if ( !param ) 4898c: 6700 00c4 beqw 48a52 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 48990: 486e fff8 pea %fp@(-8) 48994: 486e fffc pea %fp@(-4) 48998: 2f02 movel %d2,%sp@- 4899a: 2f04 movel %d4,%sp@- 4899c: 4eb9 0004 e798 jsr 4e798 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 489a2: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 489a6: 2600 movel %d0,%d3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 489a8: 670c beqs 489b6 case OBJECTS_ERROR: break; } return ESRCH; } 489aa: 2003 movel %d3,%d0 489ac: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 489b2: 4e5e unlk %fp 489b4: 4e75 rts 489b6: 486e fff4 pea %fp@(-12) 489ba: 2f2e 0008 movel %fp@(8),%sp@- 489be: 4879 0006 43ba pea 643ba <_POSIX_Threads_Information> 489c4: 4eb9 0004 aab8 jsr 4aab8 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 489ca: 4fef 000c lea %sp@(12),%sp 489ce: 2440 moveal %d0,%a2 489d0: 4aae fff4 tstl %fp@(-12) 489d4: 6600 008a bnew 48a60 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 489d8: 266a 010e moveal %a2@(270),%a3 if ( api->schedpolicy == SCHED_SPORADIC ) 489dc: 7004 moveq #4,%d0 489de: b0ab 0080 cmpl %a3@(128),%d0 489e2: 6700 00ba beqw 48a9e (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 489e6: 2242 moveal %d2,%a1 489e8: 41eb 0084 lea %a3@(132),%a0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 489ec: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 489f0: 20d9 movel %a1@+,%a0@+ 489f2: 20d9 movel %a1@+,%a0@+ 489f4: 20d9 movel %a1@+,%a0@+ 489f6: 20d9 movel %a1@+,%a0@+ 489f8: 20d9 movel %a1@+,%a0@+ 489fa: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; 489fc: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48a02: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 48a04: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 48a0a: 4a84 tstl %d4 48a0c: 6d32 blts 48a40 48a0e: 7002 moveq #2,%d0 48a10: b084 cmpl %d4,%d0 48a12: 6d5c blts 48a70 48a14: 4280 clrl %d0 48a16: 1039 0006 29e6 moveb 629e6 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 48a1c: 41f9 0006 4184 lea 64184 <_Thread_Ticks_per_timeslice>,%a0 48a22: 90ab 0084 subl %a3@(132),%d0 48a26: 2550 0076 movel %a0@,%a2@(118) the_thread->real_priority = 48a2a: 2540 0018 movel %d0,%a2@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 48a2e: 4878 0001 pea 1 48a32: 2f00 movel %d0,%sp@- 48a34: 2f0a movel %a2,%sp@- 48a36: 4eb9 0004 ada8 jsr 4ada8 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 48a3c: 4fef 000c lea %sp@(12),%sp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 48a40: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 48a46: 2003 movel %d3,%d0 48a48: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a4e: 4e5e unlk %fp 48a50: 4e75 rts int rc; /* * Check all the parameters */ if ( !param ) 48a52: 7616 moveq #22,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a54: 2003 movel %d3,%d0 48a56: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a5c: 4e5e unlk %fp 48a5e: 4e75 rts /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 48a60: 163c 0003 moveb #3,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a64: 2003 movel %d3,%d0 48a66: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a6c: 4e5e unlk %fp 48a6e: 4e75 rts api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48a70: 103c 0004 moveb #4,%d0 48a74: b084 cmpl %d4,%d0 48a76: 66c8 bnes 48a40 true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 48a78: 276b 0084 00a0 movel %a3@(132),%a3@(160) _Watchdog_Remove( &api->Sporadic_timer ); 48a7e: 486b 00a4 pea %a3@(164) 48a82: 4eb9 0004 c738 jsr 4c738 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 48a88: 2f0a movel %a2,%sp@- 48a8a: 42a7 clrl %sp@- 48a8c: 4eb9 0004 88c0 jsr 488c0 <_POSIX_Threads_Sporadic_budget_TSR> 48a92: 4fef 000c lea %sp@(12),%sp break; } _Thread_Enable_dispatch(); 48a96: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> 48a9c: 60a8 bras 48a46 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48a9e: 486b 00a4 pea %a3@(164) 48aa2: 4eb9 0004 c738 jsr 4c738 <_Watchdog_Remove> api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 48aa8: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48aae: 2242 moveal %d2,%a1 48ab0: 41eb 0084 lea %a3@(132),%a0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48ab4: 588f addql #4,%sp api->schedpolicy = policy; 48ab6: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 48aba: 20d9 movel %a1@+,%a0@+ 48abc: 20d9 movel %a1@+,%a0@+ 48abe: 20d9 movel %a1@+,%a0@+ 48ac0: 20d9 movel %a1@+,%a0@+ 48ac2: 20d9 movel %a1@+,%a0@+ 48ac4: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 48ac6: 256e fff8 007e movel %fp@(-8),%a2@(126) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48acc: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48ace: 4a84 tstl %d4 48ad0: 6c00 ff3c bgew 48a0e 48ad4: 6000 ff6a braw 48a40 <== NOT EXECUTED 00045e88 : int pthread_setspecific( pthread_key_t key, const void *value ) { 45e88: 4e56 fffc linkw %fp,#-4 45e8c: 2f03 movel %d3,%sp@- 45e8e: 2f02 movel %d2,%sp@- 45e90: 486e fffc pea %fp@(-4) 45e94: 2f2e 0008 movel %fp@(8),%sp@- 45e98: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45e9e: 4eb9 0004 85b8 jsr 485b8 <_Objects_Get> uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 45ea4: 4fef 000c lea %sp@(12),%sp 45ea8: 4aae fffc tstl %fp@(-4) 45eac: 663e bnes 45eec case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 45eae: 2079 0006 0f4e moveal 60f4e <_Thread_Executing>,%a0 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 45eb4: 7618 moveq #24,%d3 45eb6: 2240 moveal %d0,%a1 the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 45eb8: 2428 0008 movel %a0@(8),%d2 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 45ebc: 2202 movel %d2,%d1 45ebe: e6a9 lsrl %d3,%d1 45ec0: 163c 0007 moveb #7,%d3 45ec4: c283 andl %d3,%d1 45ec6: 0282 0000 ffff andil #65535,%d2 45ecc: 2071 1c14 moveal %a1@(00000014,%d1:l:4),%a0 45ed0: 43ee 000c lea %fp@(12),%a1 45ed4: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4) _Thread_Enable_dispatch(); 45ed8: 4eb9 0004 8dc8 jsr 48dc8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 45ede: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; _Thread_Enable_dispatch(); 45ee2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 45ee4: 262e fff8 movel %fp@(-8),%d3 45ee8: 4e5e unlk %fp 45eea: 4e75 rts 45eec: 242e fff4 movel %fp@(-12),%d2 uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 45ef0: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45ef2: 262e fff8 movel %fp@(-8),%d3 45ef6: 4e5e unlk %fp 45ef8: 4e75 rts ... 00045e5c : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 45e5c: 4e56 fff8 linkw %fp,#-8 45e60: 206e 0008 moveal %fp@(8),%a0 POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 45e64: 4a88 tstl %a0 45e66: 6730 beqs 45e98 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 45e68: 486e fffc pea %fp@(-4) 45e6c: 2f10 movel %a0@,%sp@- 45e6e: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45e74: 4eb9 0004 80d4 jsr 480d4 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 45e7a: 4fef 000c lea %sp@(12),%sp 45e7e: 4aae fffc tstl %fp@(-4) 45e82: 6614 bnes 45e98 */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 45e84: 2040 moveal %d0,%a0 45e86: 2228 0018 movel %a0@(24),%d1 case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 45e8a: 6712 beqs 45e9e _Thread_Enable_dispatch(); 45e8c: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> 45e92: 7010 moveq #16,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45e94: 4e5e unlk %fp 45e96: 4e75 rts _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); return 0; 45e98: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45e9a: 4e5e unlk %fp 45e9c: 4e75 rts if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 45e9e: 2f00 movel %d0,%sp@- 45ea0: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45ea6: 2d40 fff8 movel %d0,%fp@(-8) 45eaa: 4eb9 0004 7cc8 jsr 47cc8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 45eb0: 202e fff8 movel %fp@(-8),%d0 45eb4: 2f00 movel %d0,%sp@- 45eb6: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45ebc: 4eb9 0004 7f70 jsr 47f70 <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 45ec2: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> return 0; 45ec8: 4fef 0010 lea %sp@(16),%sp _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 45ecc: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 45ece: 4e5e unlk %fp 45ed0: 4e75 rts ... 00045ed4 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 45ed4: 4e56 fffc linkw %fp,#-4 45ed8: 2f0b movel %a3,%sp@- 45eda: 2f0a movel %a2,%sp@- 45edc: 246e 0008 moveal %fp@(8),%a2 POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 45ee0: 4a8a tstl %a2 45ee2: 6764 beqs 45f48 return EINVAL; switch ( pshared ) { 45ee4: 4aae 000c tstl %fp@(12) 45ee8: 665e bnes 45f48 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45eea: 2039 0006 0094 movel 60094 <_Thread_Dispatch_disable_level>,%d0 45ef0: 5280 addql #1,%d0 45ef2: 23c0 0006 0094 movel %d0,60094 <_Thread_Dispatch_disable_level> * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 45ef8: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45efe: 4eb9 0004 7c38 jsr 47c38 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 45f04: 588f addql #4,%sp 45f06: 2640 moveal %d0,%a3 45f08: 4a80 tstl %d0 45f0a: 674a beqs 45f56 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 45f0c: 486e fffc pea %fp@(-4) 45f10: 486b 0010 pea %a3@(16) 45f14: 4eb9 0004 762c jsr 4762c <_CORE_spinlock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45f1a: 202b 0008 movel %a3@(8),%d0 45f1e: 4281 clrl %d1 45f20: 2079 0006 02cc moveal 602cc <_POSIX_Spinlock_Information+0x18>,%a0 45f26: 3200 movew %d0,%d1 45f28: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45f2c: 42ab 000c clrl %a3@(12) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 45f30: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 45f32: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> return 0; } 45f38: 246e fff4 moveal %fp@(-12),%a2 _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; 45f3c: 508f addql #8,%sp _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); 45f3e: 4280 clrl %d0 return 0; } 45f40: 266e fff8 moveal %fp@(-8),%a3 45f44: 4e5e unlk %fp 45f46: 4e75 rts 45f48: 246e fff4 moveal %fp@(-12),%a2 _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; 45f4c: 7016 moveq #22,%d0 } 45f4e: 266e fff8 moveal %fp@(-8),%a3 45f52: 4e5e unlk %fp 45f54: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch(); 45f56: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; } 45f5c: 246e fff4 moveal %fp@(-12),%a2 _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch(); 45f60: 700b moveq #11,%d0 *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; } 45f62: 266e fff8 moveal %fp@(-8),%a3 45f66: 4e5e unlk %fp 45f68: 4e75 rts ... 00045f6c : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 45f6c: 4e56 fffc linkw %fp,#-4 45f70: 206e 0008 moveal %fp@(8),%a0 45f74: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 45f76: 4a88 tstl %a0 45f78: 674a beqs 45fc4 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 45f7a: 486e fffc pea %fp@(-4) 45f7e: 2f10 movel %a0@,%sp@- 45f80: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45f86: 4eb9 0004 80d4 jsr 480d4 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 45f8c: 4fef 000c lea %sp@(12),%sp 45f90: 4aae fffc tstl %fp@(-4) 45f94: 662e bnes 45fc4 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); 45f96: 42a7 clrl %sp@- 45f98: 4878 0001 pea 1 45f9c: 2040 moveal %d0,%a0 45f9e: 4868 0010 pea %a0@(16) 45fa2: 4eb9 0004 76a4 jsr 476a4 <_CORE_spinlock_Wait> 45fa8: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 45faa: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 45fb0: 2f02 movel %d2,%sp@- 45fb2: 4eb9 0004 5fd0 jsr 45fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 45fb8: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 45fbc: 4fef 0010 lea %sp@(16),%sp case OBJECTS_ERROR: break; } return EINVAL; } 45fc0: 4e5e unlk %fp 45fc2: 4e75 rts 45fc4: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 45fc8: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45fca: 4e5e unlk %fp 45fcc: 4e75 rts ... 00046048 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 46048: 4e56 fffc linkw %fp,#-4 4604c: 206e 0008 moveal %fp@(8),%a0 46050: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 46052: 4a88 tstl %a0 46054: 6742 beqs 46098 46056: 486e fffc pea %fp@(-4) 4605a: 2f10 movel %a0@,%sp@- 4605c: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 46062: 4eb9 0004 80d4 jsr 480d4 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 46068: 4fef 000c lea %sp@(12),%sp 4606c: 4aae fffc tstl %fp@(-4) 46070: 6626 bnes 46098 case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 46072: 2040 moveal %d0,%a0 46074: 4868 0010 pea %a0@(16) 46078: 4eb9 0004 764c jsr 4764c <_CORE_spinlock_Release> 4607e: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 46080: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 46086: 2f02 movel %d2,%sp@- 46088: 4eb9 0004 5fd0 jsr 45fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 4608e: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 46092: 508f addql #8,%sp case OBJECTS_ERROR: break; } return EINVAL; } 46094: 4e5e unlk %fp 46096: 4e75 rts 46098: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 4609c: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 4609e: 4e5e unlk %fp 460a0: 4e75 rts ... 00046454 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 46454: 4e56 0000 linkw %fp,#0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 46458: 2039 0006 01ba movel 601ba <_ISR_Nest_level>,%d0 4645e: 663c bnes 4649c return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46460: 2079 0006 01da moveal 601da <_Thread_Executing>,%a0 46466: 2039 0006 0120 movel 60120 <_Thread_Dispatch_disable_level>,%d0 4646c: 5280 addql #1,%d0 4646e: 2068 010e moveal %a0@(270),%a0 46472: 23c0 0006 0120 movel %d0,60120 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 46478: 4aa8 00d4 tstl %a0@(212) 4647c: 6622 bnes 464a0 thread_support->cancelation_requested ) 4647e: 4aa8 00dc tstl %a0@(220) 46482: 671c beqs 464a0 cancel = true; _Thread_Enable_dispatch(); 46484: 4eb9 0004 8b28 jsr 48b28 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 4648a: 4878 ffff pea ffffffff 4648e: 2f39 0006 01da movel 601da <_Thread_Executing>,%sp@- 46494: 4eb9 0004 c180 jsr 4c180 <_POSIX_Thread_Exit> 4649a: 508f addql #8,%sp <== NOT EXECUTED } 4649c: 4e5e unlk %fp <== NOT EXECUTED 4649e: 4e75 rts <== NOT EXECUTED 464a0: 4e5e unlk %fp _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 464a2: 4ef9 0004 8b28 jmp 48b28 <_Thread_Enable_dispatch> 0004d8b0 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4d8b0: 4e56 ffe8 linkw %fp,#-24 4d8b4: 202e 0010 movel %fp@(16),%d0 4d8b8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4d8bc: 242e 0008 movel %fp@(8),%d2 4d8c0: 262e 000c movel %fp@(12),%d3 4d8c4: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4d8c8: 4a82 tstl %d2 4d8ca: 677a beqs 4d946 return RTEMS_INVALID_NAME; if ( !id ) 4d8cc: 4a8a tstl %a2 4d8ce: 6700 00ce beqw 4d99e return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4d8d2: 0803 0004 btst #4,%d3 4d8d6: 677a beqs 4d952 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4d8d8: 4a80 tstl %d0 4d8da: 6700 00b4 beqw 4d990 4d8de: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 4d8e4: 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; 4d8e6: 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; 4d8ea: 2d40 fffc movel %d0,%fp@(-4) 4d8ee: 23c1 0005 ef04 movel %d1,5ef04 <_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 ); 4d8f4: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4d8fa: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4d900: 588f addql #4,%sp 4d902: 2640 moveal %d0,%a3 4d904: 4a80 tstl %d0 4d906: 6776 beqs 4d97e _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4d908: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4d90c: 486e fff8 pea %fp@(-8) 4d910: 486b 0014 pea %a3@(20) 4d914: 4eb9 0004 de44 jsr 4de44 <_CORE_barrier_Initialize> 4d91a: 202b 0008 movel %a3@(8),%d0 4d91e: 4281 clrl %d1 4d920: 2079 0005 f7b0 moveal 5f7b0 <_Barrier_Information+0x18>,%a0 4d926: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4d928: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4d92c: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4d930: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4d932: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4d938: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4d93a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d93c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d942: 4e5e unlk %fp 4d944: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4d946: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4d948: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d94e: 4e5e unlk %fp 4d950: 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; 4d952: 7201 moveq #1,%d1 4d954: 2d41 fff8 movel %d1,%fp@(-8) 4d958: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 4d95e: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4d960: 2d40 fffc movel %d0,%fp@(-4) 4d964: 23c1 0005 ef04 movel %d1,5ef04 <_Thread_Dispatch_disable_level> 4d96a: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4d970: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4d976: 588f addql #4,%sp 4d978: 2640 moveal %d0,%a3 4d97a: 4a80 tstl %d0 4d97c: 668a bnes 4d908 _Thread_Enable_dispatch(); 4d97e: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4d984: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4d986: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d98c: 4e5e unlk %fp 4d98e: 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 ) 4d990: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4d994: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d99a: 4e5e unlk %fp 4d99c: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4d99e: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4d9a0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d9a6: 4e5e unlk %fp 4d9a8: 4e75 rts ... 0004da1c : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 4da1c: 4e56 fffc linkw %fp,#-4 4da20: 2f0a movel %a2,%sp@- 4da22: 246e 000c moveal %fp@(12),%a2 4da26: 2f02 movel %d2,%sp@- 4da28: 242e 0008 movel %fp@(8),%d2 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4da2c: 4a8a tstl %a2 4da2e: 6754 beqs 4da84 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4da30: 486e fffc pea %fp@(-4) 4da34: 2f02 movel %d2,%sp@- 4da36: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4da3c: 4eb9 0004 752c jsr 4752c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4da42: 4fef 000c lea %sp@(12),%sp 4da46: 4aae fffc tstl %fp@(-4) 4da4a: 662a bnes 4da76 case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 4da4c: 42a7 clrl %sp@- 4da4e: 2040 moveal %d0,%a0 4da50: 2f02 movel %d2,%sp@- 4da52: 4868 0014 pea %a0@(20) 4da56: 4eb9 0004 de80 jsr 4de80 <_CORE_barrier_Release> 4da5c: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4da5e: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4da64: 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; 4da68: 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(); 4da6c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4da6e: 246e fff8 moveal %fp@(-8),%a2 4da72: 4e5e unlk %fp 4da74: 4e75 rts 4da76: 242e fff4 movel %fp@(-12),%d2 if ( !released ) return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4da7a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4da7c: 246e fff8 moveal %fp@(-8),%a2 4da80: 4e5e unlk %fp 4da82: 4e75 rts 4da84: 242e fff4 movel %fp@(-12),%d2 ) { Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4da88: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4da8a: 246e fff8 moveal %fp@(-8),%a2 4da8e: 4e5e unlk %fp 4da90: 4e75 rts ... 0004da94 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4da94: 4e56 fffc linkw %fp,#-4 4da98: 2f02 movel %d2,%sp@- 4da9a: 486e fffc pea %fp@(-4) 4da9e: 242e 0008 movel %fp@(8),%d2 4daa2: 2f02 movel %d2,%sp@- 4daa4: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4daaa: 4eb9 0004 752c jsr 4752c <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4dab0: 4fef 000c lea %sp@(12),%sp 4dab4: 4aae fffc tstl %fp@(-4) 4dab8: 663a bnes 4daf4 case OBJECTS_LOCAL: _CORE_barrier_Wait( 4daba: 42a7 clrl %sp@- 4dabc: 2f2e 000c movel %fp@(12),%sp@- 4dac0: 2040 moveal %d0,%a0 4dac2: 4878 0001 pea 1 4dac6: 2f02 movel %d2,%sp@- 4dac8: 4868 0014 pea %a0@(20) 4dacc: 4eb9 0004 debc jsr 4debc <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 4dad2: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 4dad8: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 4dade: 2f28 0034 movel %a0@(52),%sp@- 4dae2: 4eb9 0004 eb44 jsr 4eb44 <_Barrier_Translate_core_barrier_return_code> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4dae8: 242e fff8 movel %fp@(-8),%d2 true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 4daec: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4daf0: 4e5e unlk %fp 4daf2: 4e75 rts 4daf4: 242e fff8 movel %fp@(-8),%d2 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4daf8: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4dafa: 4e5e unlk %fp 4dafc: 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 f048 movel 5f048 <_Watchdog_Ticks_since_boot>,%d0 } 45606: 4e5e unlk %fp 45608: 4e75 rts ... 00069b2c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 69b2c: 4e56 0000 linkw %fp,#0 69b30: 202e 0008 movel %fp@(8),%d0 if ( !uptime ) 69b34: 6710 beqs 69b46 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 69b36: 2f00 movel %d0,%sp@- 69b38: 4eb9 0006 abd0 jsr 6abd0 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 69b3e: 588f addql #4,%sp ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 69b40: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 69b42: 4e5e unlk %fp 69b44: 4e75 rts */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 69b46: 103c 0009 moveb #9,%d0 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 69b4a: 4e5e unlk %fp 69b4c: 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 f090 movel %d0,5f090 <_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 ... 0004b8b8 : * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 4b8b8: 4e56 0000 linkw %fp,#0 4b8bc: 202e 0008 movel %fp@(8),%d0 return (_Debug_Level & level) ? true : false; } 4b8c0: 4e5e unlk %fp * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 4b8c2: c0b9 0005 efc2 andl 5efc2 <_Debug_Level>,%d0 4b8c8: 56c0 sne %d0 return (_Debug_Level & level) ? true : false; } 4b8ca: 4480 negl %d0 4b8cc: 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 efbe moveal 5efbe <_Thread_Executing>,%a1 45682: 2269 010a moveal %a1@(266),%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 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 45696: 5281 addql #1,%d1 45698: 23c1 0005 ef04 movel %d1,5ef04 <_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 7dbc jsr 47dbc <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 456b6: 2079 0005 efbe moveal 5efbe <_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 7de4 jsr 47de4 <_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 010a moveal %a1@(266),%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 7dbc jsr 47dbc <_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 ... 0004b840 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 4b840: 4e56 fffc linkw %fp,#-4 4b844: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 4b846: 486e fffc pea %fp@(-4) 4b84a: 2f2e 0008 movel %fp@(8),%sp@- 4b84e: 4879 0006 ceb8 pea 6ceb8 <_Extension_Information> 4b854: 4eb9 0004 c9ec jsr 4c9ec <_Objects_Get> Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4b85a: 4fef 000c lea %sp@(12),%sp 4b85e: 2440 moveal %d0,%a2 4b860: 4aae fffc tstl %fp@(-4) 4b864: 663a bnes 4b8a0 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 4b866: 486a 0010 pea %a2@(16) 4b86a: 4eb9 0004 e39c jsr 4e39c <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 4b870: 2f0a movel %a2,%sp@- 4b872: 4879 0006 ceb8 pea 6ceb8 <_Extension_Information> 4b878: 4eb9 0004 c5e0 jsr 4c5e0 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 4b87e: 2f0a movel %a2,%sp@- 4b880: 4879 0006 ceb8 pea 6ceb8 <_Extension_Information> 4b886: 4eb9 0004 c888 jsr 4c888 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 4b88c: 4eb9 0004 d380 jsr 4d380 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b892: 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; 4b896: 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(); 4b89a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b89c: 4e5e unlk %fp 4b89e: 4e75 rts 4b8a0: 246e fff8 moveal %fp@(-8),%a2 { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4b8a4: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b8a6: 4e5e unlk %fp 4b8a8: 4e75 rts ... 0004833c : #endif #include const char *rtems_get_version_string(void) { 4833c: 4e56 0000 linkw %fp,#0 return _RTEMS_version; } 48340: 203c 0006 0662 movel #394850,%d0 48346: 4e5e unlk %fp 48348: 4e75 rts ... 0004634e : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 4634e: 4e56 0000 linkw %fp,#0 46352: 42b9 0005 f08c clrl 5f08c <_System_state_Current> #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 46358: 4eb9 0004 9344 jsr 49344 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 4635e: 4eb9 0004 b884 jsr 4b884 <_Debug_Manager_initialization> _API_extensions_Initialization(); 46364: 4eb9 0004 6604 jsr 46604 <_API_extensions_Initialization> * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 4636a: 7001 moveq #1,%d0 4636c: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); 46372: 4eb9 0004 9218 jsr 49218 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 46378: 4eb9 0004 8ca0 jsr 48ca0 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 4637e: 4eb9 0004 7028 jsr 47028 <_ISR_Handler_initialization> /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; _API_Mutex_Initialization( 1 ); 46384: 4878 0001 pea 1 _ISR_Handler_initialization(); /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 46388: 203c 0005 ef1a movel #388890,%d0 4638e: 23c0 0005 eec0 movel %d0,5eec0 <_Objects_Information_table+0x4> _API_Mutex_Initialization( 1 ); 46394: 4eb9 0004 6738 jsr 46738 <_API_Mutex_Initialization> _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 4639a: 4879 0005 efb6 pea 5efb6 <_RTEMS_Allocator_Mutex> 463a0: 4eb9 0004 66a0 jsr 466a0 <_API_Mutex_Allocate> #include #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) 463a6: 508f addql #8,%sp RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 463a8: 41f9 0005 f024 lea 5f024 <_Priority_Bit_map>,%a0 463ae: 4240 clrw %d0 463b0: 33c0 0005 efb4 movew %d0,5efb4 <_Priority_Major_bit_map> for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 463b6: 4258 clrw %a0@+ RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 463b8: b1fc 0005 f044 cmpal #389188,%a0 463be: 66f6 bnes 463b6 _API_Mutex_Initialization( 1 ); _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 463c0: 4eb9 0004 9048 jsr 49048 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 463c6: 4eb9 0004 6bbc jsr 46bbc <_TOD_Handler_initialization> _Thread_Handler_initialization(); 463cc: 4eb9 0004 80c8 jsr 480c8 <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 463d2: 4eb9 0004 65b0 jsr 465b0 <_RTEMS_API_Initialize> _Extension_Manager_initialization(); 463d8: 4eb9 0004 6428 jsr 46428 <_Extension_Manager_initialization> _IO_Manager_initialization(); 463de: 4eb9 0004 64a6 jsr 464a6 <_IO_Manager_initialization> #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 463e4: 4eb9 0004 655c jsr 4655c <_POSIX_API_Initialize> _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 463ea: 4e5e unlk %fp 463ec: 7001 moveq #1,%d0 463ee: 23c0 0005 f08c movel %d0,5f08c <_System_state_Current> * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 463f4: 4ef9 0004 7b78 jmp 47b78 <_Thread_Create_idle> ... 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 937e jsr 4937e <_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 ... 000482d4 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 482d4: 4e56 fff4 linkw %fp,#-12 482d8: 226e 000c moveal %fp@(12),%a1 482dc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482e0: 242e 0008 movel %fp@(8),%d2 482e4: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 482e8: 2039 0006 5906 movel 65906 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 482ee: 2239 0006 50e6 movel 650e6 <_ISR_Nest_level>,%d1 482f4: 6600 009c bnew 48392 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 482f8: 4a8a tstl %a2 482fa: 6700 00ea beqw 483e6 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 482fe: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 48300: 4a89 tstl %a1 48302: 6700 00e2 beqw 483e6 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48306: 4a91 tstl %a1@ 48308: 6700 00d4 beqw 483de return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4830c: b480 cmpl %d0,%d2 4830e: 6476 bccs 48386 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48310: 2039 0006 504c movel 6504c <_Thread_Dispatch_disable_level>,%d0 48316: 5280 addql #1,%d0 48318: 23c0 0006 504c movel %d0,6504c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 4831e: 4a82 tstl %d2 48320: 667c bnes 4839e static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 48322: 2039 0006 5906 movel 65906 <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48328: 6700 00fc beqw 48426 4832c: 2239 0006 590a movel 6590a <_IO_Driver_address_table>,%d1 48332: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48334: 4a90 tstl %a0@ 48336: 6700 008e beqw 483c6 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 4833a: 5282 addql #1,%d2 4833c: 41e8 0018 lea %a0@(24),%a0 48340: b480 cmpl %d0,%d2 48342: 65f0 bcss 48334 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48344: 2482 movel %d2,%a2@ if ( m != n ) 48346: b480 cmpl %d0,%d2 48348: 6700 00de beqw 48428 4834c: 2602 movel %d2,%d3 4834e: 2002 movel %d2,%d0 48350: 2041 moveal %d1,%a0 48352: e78b lsll #3,%d3 48354: eb88 lsll #5,%d0 48356: 9083 subl %d3,%d0 48358: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 4835a: 20d9 movel %a1@+,%a0@+ 4835c: 20d9 movel %a1@+,%a0@+ 4835e: 20d9 movel %a1@+,%a0@+ 48360: 20d9 movel %a1@+,%a0@+ 48362: 20d9 movel %a1@+,%a0@+ 48364: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 48366: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4836c: 2d42 0008 movel %d2,%fp@(8) } 48370: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48376: 42ae 0010 clrl %fp@(16) 4837a: 42ae 000c clrl %fp@(12) } 4837e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48380: 4ef9 0005 1298 jmp 51298 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48386: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48388: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4838e: 4e5e unlk %fp 48390: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 48392: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48394: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4839a: 4e5e unlk %fp 4839c: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 4839e: 2202 movel %d2,%d1 483a0: 2002 movel %d2,%d0 483a2: e789 lsll #3,%d1 483a4: eb88 lsll #5,%d0 483a6: 2079 0006 590a moveal 6590a <_IO_Driver_address_table>,%a0 483ac: 9081 subl %d1,%d0 483ae: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483b0: 4a90 tstl %a0@ 483b2: 673e beqs 483f2 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 483b4: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 483ba: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483bc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483c2: 4e5e unlk %fp 483c4: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483c6: 4aa8 0004 tstl %a0@(4) 483ca: 6700 ff78 beqw 48344 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 483ce: 5282 addql #1,%d2 483d0: 41e8 0018 lea %a0@(24),%a0 483d4: b480 cmpl %d0,%d2 483d6: 6500 ff5c bcsw 48334 483da: 6000 ff68 braw 48344 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483de: 4aa9 0004 tstl %a1@(4) 483e2: 6600 ff28 bnew 4830c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483e6: 7009 moveq #9,%d0 } 483e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ee: 4e5e unlk %fp 483f0: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483f2: 4aa8 0004 tstl %a0@(4) 483f6: 66bc bnes 483b4 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 483f8: 20d9 movel %a1@+,%a0@+ 483fa: 20d9 movel %a1@+,%a0@+ 483fc: 20d9 movel %a1@+,%a0@+ 483fe: 20d9 movel %a1@+,%a0@+ 48400: 20d9 movel %a1@+,%a0@+ 48402: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 48404: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 48406: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4840c: 2d42 0008 movel %d2,%fp@(8) } 48410: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48416: 42ae 0010 clrl %fp@(16) 4841a: 42ae 000c clrl %fp@(12) } 4841e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48420: 4ef9 0005 1298 jmp 51298 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48426: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 48428: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 4842e: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48430: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48436: 4e5e unlk %fp 48438: 4e75 rts ... 0004843c : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 4843c: 4e56 0000 linkw %fp,#0 48440: 202e 0008 movel %fp@(8),%d0 if ( rtems_interrupt_is_in_progress() ) 48444: 2239 0006 50e6 movel 650e6 <_ISR_Nest_level>,%d1 4844a: 6644 bnes 48490 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 4844c: b0b9 0006 5906 cmpl 65906 <_IO_Number_of_drivers>,%d0 48452: 6506 bcss 4845a 48454: 700d moveq #13,%d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 48456: 4e5e unlk %fp 48458: 4e75 rts 4845a: 2239 0006 504c movel 6504c <_Thread_Dispatch_disable_level>,%d1 48460: 5281 addql #1,%d1 48462: 23c1 0006 504c movel %d1,6504c <_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( 48468: 2200 movel %d0,%d1 4846a: e788 lsll #3,%d0 4846c: eb89 lsll #5,%d1 4846e: 2079 0006 590a moveal 6590a <_IO_Driver_address_table>,%a0 48474: 9280 subl %d0,%d1 48476: d1c1 addal %d1,%a0 48478: 4298 clrl %a0@+ 4847a: 4298 clrl %a0@+ 4847c: 4298 clrl %a0@+ 4847e: 4298 clrl %a0@+ 48480: 4298 clrl %a0@+ 48482: 4290 clrl %a0@ &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 48484: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 4848a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 4848c: 4e5e unlk %fp 4848e: 4e75 rts rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 48490: 7012 moveq #18,%d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 48492: 4e5e unlk %fp 48494: 4e75 rts ... 00048b04 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 48b04: 4e56 fff0 linkw %fp,#-16 48b08: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48b0c: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 48b10: 4a8b tstl %a3 48b12: 6744 beqs 48b58 48b14: 49f9 0006 94d0 lea 694d0 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 48b1a: 2054 moveal %a4@,%a0 48b1c: 4a88 tstl %a0 48b1e: 672e beqs 48b4e continue; information = _Objects_Information_table[ api_index ][ 1 ]; 48b20: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 48b24: 4a8a tstl %a2 48b26: 6726 beqs 48b4e continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48b28: 4a6a 000e tstw %a2@(14) 48b2c: 6720 beqs 48b4e 48b2e: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 48b30: 206a 0018 moveal %a2@(24),%a0 48b34: 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++ ) { 48b38: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 48b3a: 4a80 tstl %d0 48b3c: 6706 beqs 48b44 continue; (*routine)(the_thread); 48b3e: 2f00 movel %d0,%sp@- 48b40: 4e93 jsr %a3@ 48b42: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48b44: 4280 clrl %d0 48b46: 302a 000e movew %a2@(14),%d0 48b4a: b480 cmpl %d0,%d2 48b4c: 63e2 blss 48b30 48b4e: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 48b50: b9fc 0006 94e0 cmpal #431328,%a4 48b56: 66c2 bnes 48b1a (*routine)(the_thread); } } } 48b58: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48b5e: 4e5e unlk %fp 48b60: 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 efb2 pea 7efb2 <_Message_queue_Information> 564ac: 4eb9 0005 b9a0 jsr 5b9a0 <_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 9f8c jsr 59f8c <_CORE_message_queue_Broadcast> 564d4: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 564d6: 4eb9 0005 c2bc jsr 5c2bc <_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 efb2 pea 7efb2 <_Message_queue_Information> 566fc: 4eb9 0005 b9a0 jsr 5b9a0 <_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 c2bc jsr 5c2bc <_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 9f3e pea 69f3e <_Message_queue_Information> 4eb72: 4eb9 0005 1098 jsr 51098 <_Objects_Name_to_id_u32> 4eb78: 41f9 0006 6d48 lea 66d48 <_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 9f3e pea 69f3e <_Message_queue_Information> 4ebae: 4eb9 0005 0eec jsr 50eec <_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 ff18 jsr 4ff18 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 4ebe2: 4eb9 0005 187c jsr 5187c <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 4ebe8: 2079 0006 97b2 moveal 697b2 <_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 ... 00047770 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 47770: 4e56 0000 linkw %fp,#0 47774: 2f0a movel %a2,%sp@- 47776: 246e 0010 moveal %fp@(16),%a2 4777a: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 4777c: 4a8a tstl %a2 4777e: 6766 beqs 477e6 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47780: 2f2e 000c movel %fp@(12),%sp@- 47784: 2f2e 0008 movel %fp@(8),%sp@- 47788: 4eb9 0004 937c jsr 4937c <_Objects_Get_information> if ( !obj_info ) 4778e: 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 ); 47790: 2040 moveal %d0,%a0 if ( !obj_info ) 47792: 4a80 tstl %d0 47794: 675e beqs 477f4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 47796: 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; 4779a: 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; 4779c: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 477a2: 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; 477a6: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 477ac: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477b0: 6750 beqs 47802 477b2: 2068 0018 moveal %a0@(24),%a0 477b6: 7201 moveq #1,%d1 477b8: 7001 moveq #1,%d0 477ba: 93c9 subal %a1,%a1 477bc: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 477be: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 477c2: 6718 beqs 477dc 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++ ) 477c4: 2200 movel %d0,%d1 477c6: b082 cmpl %d2,%d0 477c8: 63f2 blss 477bc if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477ca: 2549 000e movel %a1,%a2@(14) 477ce: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 477d0: 242e fff8 movel %fp@(-8),%d2 477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 4e5e unlk %fp 477da: 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++; 477dc: 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++ ) 477de: 2200 movel %d0,%d1 477e0: b082 cmpl %d2,%d0 477e2: 63d8 blss 477bc 477e4: 60e4 bras 477ca unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477e6: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 477ea: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477ec: 246e fffc moveal %fp@(-4),%a2 477f0: 4e5e unlk %fp 477f2: 4e75 rts 477f4: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 477f8: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477fa: 246e fffc moveal %fp@(-4),%a2 477fe: 4e5e unlk %fp 47800: 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++ ) 47802: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 47804: 4280 clrl %d0 <== NOT EXECUTED 47806: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 4780a: 60c4 bras 477d0 <== 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 ca58 jsr 4ca58 <_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 8530 lea 68530 <_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 ... 00047818 : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; } 47818: 7004 moveq #4,%d0 #include #include #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { 4781a: 4e56 0000 linkw %fp,#0 return OBJECTS_ITRON_API; } 4781e: 4e5e unlk %fp 47820: 4e75 rts ... 00047824 : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } 47824: 7001 moveq #1,%d0 #include #include #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { 47826: 4e56 0000 linkw %fp,#0 return OBJECTS_INTERNAL_API; } 4782a: 4e5e unlk %fp 4782c: 4e75 rts ... 00047830 : #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 47830: 4280 clrl %d0 return _Objects_Get_API( id ); } 47832: 7207 moveq #7,%d1 #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 47834: 4e56 0000 linkw %fp,#0 47838: 102e 0008 moveb %fp@(8),%d0 return _Objects_Get_API( id ); } 4783c: 4e5e unlk %fp 4783e: c081 andl %d1,%d0 47840: 4e75 rts ... 00047854 : int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); } 47854: 4280 clrl %d0 #undef rtems_object_id_get_index int rtems_object_id_get_index( rtems_id id ) { 47856: 4e56 0000 linkw %fp,#0 return _Objects_Get_index( id ); } 4785a: 302e 000a movew %fp@(10),%d0 4785e: 4e5e unlk %fp 47860: 4e75 rts ... 00047864 : int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } 47864: 4280 clrl %d0 #undef rtems_object_id_get_node int rtems_object_id_get_node( rtems_id id ) { 47866: 4e56 0000 linkw %fp,#0 return _Objects_Get_node( id ); } 4786a: 102e 0009 moveb %fp@(9),%d0 4786e: 4e5e unlk %fp 47870: 4e75 rts ... 00045dbc : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 45dbc: 4e56 fff0 linkw %fp,#-16 45dc0: 48d7 001c moveml %d2-%d4,%sp@ 45dc4: 262e 0008 movel %fp@(8),%d3 45dc8: 282e 000c movel %fp@(12),%d4 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 45dcc: 6764 beqs 45e32 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 45dce: 4a83 tstl %d3 45dd0: 6754 beqs 45e26 information = _Objects_Get_information_id( tmpId ); 45dd2: 2f03 movel %d3,%sp@- 45dd4: 4eb9 0004 774c jsr 4774c <_Objects_Get_information_id> if ( !information ) 45dda: 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 ); 45ddc: 2400 movel %d0,%d2 if ( !information ) 45dde: 673a beqs 45e1a return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 45de0: 486e fffc pea %fp@(-4) 45de4: 2f03 movel %d3,%sp@- 45de6: 2f00 movel %d0,%sp@- 45de8: 4eb9 0004 792c jsr 4792c <_Objects_Get> switch ( location ) { 45dee: 4fef 000c lea %sp@(12),%sp 45df2: 4aae fffc tstl %fp@(-4) 45df6: 6622 bnes 45e1a case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 45df8: 2f04 movel %d4,%sp@- 45dfa: 2f00 movel %d0,%sp@- 45dfc: 2f02 movel %d2,%sp@- 45dfe: 4eb9 0004 7ad8 jsr 47ad8 <_Objects_Set_name> _Thread_Enable_dispatch(); 45e04: 4eb9 0004 8234 jsr 48234 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45e0a: 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(); 45e0e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45e10: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e16: 4e5e unlk %fp 45e18: 4e75 rts switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 45e1a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45e1c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e22: 4e5e unlk %fp 45e24: 4e75 rts Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 45e26: 2079 0005 fbc6 moveal 5fbc6 <_Thread_Executing>,%a0 45e2c: 2628 0008 movel %a0@(8),%d3 45e30: 60a0 bras 45dd2 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 45e32: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45e34: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e3a: 4e5e unlk %fp 45e3c: 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 e5e2 pea 7e5e2 <_Partition_Information> 56aae: 4eb9 0005 b9a0 jsr 5b9a0 <_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 9f08 jsr 59f08 <_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 c2bc jsr 5c2bc <_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 c2bc jsr 5c2bc <_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 e5e2 pea 7e5e2 <_Partition_Information> 56b2a: 4eb9 0005 bbd8 jsr 5bbd8 <_Objects_Name_to_id_u32> 56b30: 41f9 0007 7a80 lea 77a80 <_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 e5e2 pea 7e5e2 <_Partition_Information> 56b56: 242e 000c movel %fp@(12),%d2 56b5a: 4eb9 0005 b9a0 jsr 5b9a0 <_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 9ed0 jsr 59ed0 <_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 c2bc jsr 5c2bc <_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 c2bc jsr 5c2bc <_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 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 55e6c: 5280 addql #1,%d0 55e6e: 23c0 0007 e758 movel %d0,7e758 <_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 e5a8 pea 7e5a8 <_Dual_ported_memory_Information> 55e7a: 4eb9 0005 b4c8 jsr 5b4c8 <_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 e5c0 moveal 7e5c0 <_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 c2bc jsr 5c2bc <_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 c2bc jsr 5c2bc <_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 0006 1050 movel 61050 <_Thread_Dispatch_disable_level>,%d0 46a80: 5280 addql #1,%d0 46a82: 23c0 0006 1050 movel %d0,61050 <_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 0006 0f4c pea 60f4c <_Rate_monotonic_Information> 46a8e: 4eb9 0004 8ad8 jsr 48ad8 <_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 0006 110a lea 6110a <_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 0006 0f64 moveal 60f64 <_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 9904 jsr 49904 <_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 9904 jsr 49904 <_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 e61c pea 7e61c <_Rate_monotonic_Information> 56d44: 4eb9 0005 b9a0 jsr 5b9a0 <_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 e61c pea 7e61c <_Rate_monotonic_Information> 56d5e: 4eb9 0005 b558 jsr 5b558 <_Objects_Close> (void) _Watchdog_Remove( &the_period->Timer ); 56d64: 486a 0010 pea %a2@(16) 56d68: 4eb9 0005 d8d0 jsr 5d8d0 <_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 e61c pea 7e61c <_Rate_monotonic_Information> 56d7a: 4eb9 0005 b800 jsr 5b800 <_Objects_Free> _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 56d80: 4eb9 0005 c2bc jsr 5c2bc <_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 ... 0007b398 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 7b398: 4e56 fffc linkw %fp,#-4 7b39c: 2f0a movel %a2,%sp@- 7b39e: 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 ) 7b3a2: 4a8a tstl %a2 7b3a4: 6700 00a6 beqw 7b44c 7b3a8: 486e fffc pea %fp@(-4) 7b3ac: 2f2e 0008 movel %fp@(8),%sp@- 7b3b0: 4879 000a 755c pea a755c <_Rate_monotonic_Information> 7b3b6: 4eb9 0004 c5e0 jsr 4c5e0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7b3bc: 4fef 000c lea %sp@(12),%sp 7b3c0: 2040 moveal %d0,%a0 7b3c2: 4aae fffc tstl %fp@(-4) 7b3c6: 667a bnes 7b442 case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 7b3c8: 24a8 0054 movel %a0@(84),%a2@ dst->missed_count = src->missed_count; 7b3cc: 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 ); 7b3d2: 2028 005c movel %a0@(92),%d0 7b3d6: 2228 0060 movel %a0@(96),%d1 7b3da: 2540 0008 movel %d0,%a2@(8) 7b3de: 2541 000c movel %d1,%a2@(12) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 7b3e2: 2028 0064 movel %a0@(100),%d0 7b3e6: 2228 0068 movel %a0@(104),%d1 7b3ea: 2540 0010 movel %d0,%a2@(16) 7b3ee: 2541 0014 movel %d1,%a2@(20) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 7b3f2: 2028 006c movel %a0@(108),%d0 7b3f6: 2228 0070 movel %a0@(112),%d1 7b3fa: 2540 0018 movel %d0,%a2@(24) 7b3fe: 2541 001c movel %d1,%a2@(28) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 7b402: 2028 0074 movel %a0@(116),%d0 7b406: 2228 0078 movel %a0@(120),%d1 7b40a: 2540 0020 movel %d0,%a2@(32) 7b40e: 2541 0024 movel %d1,%a2@(36) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 7b412: 2028 007c movel %a0@(124),%d0 7b416: 2228 0080 movel %a0@(128),%d1 7b41a: 2540 0028 movel %d0,%a2@(40) 7b41e: 2541 002c movel %d1,%a2@(44) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 7b422: 2028 0084 movel %a0@(132),%d0 7b426: 2228 0088 movel %a0@(136),%d1 7b42a: 2540 0030 movel %d0,%a2@(48) 7b42e: 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(); 7b432: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b438: 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(); 7b43c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b43e: 4e5e unlk %fp 7b440: 4e75 rts 7b442: 246e fff8 moveal %fp@(-8),%a2 if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7b446: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b448: 4e5e unlk %fp 7b44a: 4e75 rts 7b44c: 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 ) 7b450: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b452: 4e5e unlk %fp 7b454: 4e75 rts ... 0007b768 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7b768: 4e56 ffec linkw %fp,#-20 7b76c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7b770: 486e fffc pea %fp@(-4) 7b774: 242e 0008 movel %fp@(8),%d2 7b778: 2f02 movel %d2,%sp@- 7b77a: 4879 000a 755c pea a755c <_Rate_monotonic_Information> 7b780: 4eb9 0004 c5e0 jsr 4c5e0 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7b786: 4fef 000c lea %sp@(12),%sp 7b78a: 2440 moveal %d0,%a2 7b78c: 4aae fffc tstl %fp@(-4) 7b790: 661e bnes 7b7b0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7b792: 2039 000a 6b72 movel a6b72 <_Thread_Executing>,%d0 7b798: b0aa 0040 cmpl %a2@(64),%d0 7b79c: 671e beqs 7b7bc _Thread_Enable_dispatch(); 7b79e: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> 7b7a4: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b7a6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b7ac: 4e5e unlk %fp 7b7ae: 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; 7b7b0: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b7b2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b7b8: 4e5e unlk %fp 7b7ba: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 7b7bc: 4aae 000c tstl %fp@(12) 7b7c0: 6700 00ce beqw 7b890 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 7b7c4: 203c 0000 0700 movel #1792,%d0 7b7ca: 40c3 movew %sr,%d3 7b7cc: 8083 orl %d3,%d0 7b7ce: 46c0 movew %d0,%sr switch ( the_period->state ) { 7b7d0: 202a 0038 movel %a2@(56),%d0 7b7d4: 7202 moveq #2,%d1 7b7d6: b280 cmpl %d0,%d1 7b7d8: 6700 00dc beqw 7b8b6 7b7dc: 123c 0004 moveb #4,%d1 7b7e0: b280 cmpl %d0,%d1 7b7e2: 6762 beqs 7b846 7b7e4: 4a80 tstl %d0 7b7e6: 66c8 bnes 7b7b0 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7b7e8: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7b7ea: 2f0a movel %a2,%sp@- 7b7ec: 2d40 fff8 movel %d0,%fp@(-8) 7b7f0: 4eb9 0007 b520 jsr 7b520 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7b7f6: 223c 0007 b954 movel #506196,%d1 the_watchdog->id = id; 7b7fc: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7b800: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7b804: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 7b808: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7b80a: 2542 001c movel %d2,%a2@(28) 7b80e: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 7b812: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 7b816: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 7b81a: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7b81e: 486a 0010 pea %a2@(16) 7b822: 4879 000a 6b90 pea a6b90 <_Watchdog_Ticks_chain> 7b828: 4eb9 0004 e0b0 jsr 4e0b0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7b82e: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 7b834: 202e fff8 movel %fp@(-8),%d0 7b838: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b83c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b842: 4e5e unlk %fp 7b844: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7b846: 2f0a movel %a2,%sp@- 7b848: 4eb9 0007 b64e jsr 7b64e <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 7b84e: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 7b850: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7b852: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7b854: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7b858: 2541 0038 movel %d1,%a2@(56) 7b85c: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 7b860: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7b864: 486a 0010 pea %a2@(16) 7b868: 4879 000a 6b90 pea a6b90 <_Watchdog_Ticks_chain> 7b86e: 2d40 fff8 movel %d0,%fp@(-8) 7b872: 4eb9 0004 e0b0 jsr 4e0b0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7b878: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 7b87e: 202e fff8 movel %fp@(-8),%d0 7b882: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b886: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b88c: 4e5e unlk %fp 7b88e: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7b890: 202a 0038 movel %a2@(56),%d0 7b894: 7204 moveq #4,%d1 7b896: b280 cmpl %d0,%d1 7b898: 6400 009c bccw 7b936 7b89c: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7b89e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7b8a2: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 7b8a8: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b8ac: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b8b2: 4e5e unlk %fp 7b8b4: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7b8b6: 2f0a movel %a2,%sp@- 7b8b8: 4eb9 0007 b64e jsr 7b64e <_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; 7b8be: 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; 7b8c2: 7001 moveq #1,%d0 the_period->next_length = length; 7b8c4: 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; 7b8c8: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7b8cc: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 7b8ce: 2079 000a 6b72 moveal a6b72 <_Thread_Executing>,%a0 7b8d4: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7b8da: 4878 4000 pea 4000 7b8de: 2f08 movel %a0,%sp@- 7b8e0: 4eb9 0004 d874 jsr 4d874 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7b8e6: 203c 0000 0700 movel #1792,%d0 7b8ec: 40c1 movew %sr,%d1 7b8ee: 8081 orl %d1,%d0 7b8f0: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 7b8f2: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7b8f4: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7b8f8: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 7b8fc: 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 ) 7b8fe: 7203 moveq #3,%d1 7b900: 4fef 000c lea %sp@(12),%sp 7b904: b280 cmpl %d0,%d1 7b906: 6712 beqs 7b91a _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 7b908: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> 7b90e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b910: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b916: 4e5e unlk %fp 7b918: 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 ); 7b91a: 4878 4000 pea 4000 7b91e: 2f39 000a 6b72 movel a6b72 <_Thread_Executing>,%sp@- 7b924: 4eb9 0004 cb4c jsr 4cb4c <_Thread_Clear_state> 7b92a: 508f addql #8,%sp _Thread_Enable_dispatch(); 7b92c: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> 7b932: 4280 clrl %d0 7b934: 60da bras 7b910 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7b936: 41f9 000a 0aee lea a0aee ,%a0 7b93c: 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(); 7b940: 2d40 fff8 movel %d0,%fp@(-8) 7b944: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> return( return_value ); 7b94a: 202e fff8 movel %fp@(-8),%d0 7b94e: 6000 ff5c braw 7b8ac ... 00069ff2 : } } } void rtems_rate_monotonic_report_statistics( void ) { 69ff2: 4e56 0000 linkw %fp,#0 rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 69ff6: 4879 0004 79f4 pea 479f4 69ffc: 42a7 clrl %sp@- 69ffe: 4eb9 0006 9e50 jsr 69e50 6a004: 508f addql #8,%sp } 6a006: 4e5e unlk %fp 6a008: 4e75 rts ... 00069e50 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 69e50: 4e56 ff78 linkw %fp,#-136 69e54: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 69e58: 262e 0008 movel %fp@(8),%d3 69e5c: 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 ) 69e60: 4a8a tstl %a2 69e62: 6700 0082 beqw 69ee6 return; (*print)( context, "Period information by period\n" ); 69e66: 4879 0009 d686 pea 9d686 <_TOD_Days_per_month+0x68> 69e6c: 2f03 movel %d3,%sp@- 69e6e: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 69e70: 4879 0009 d6a4 pea 9d6a4 <_TOD_Days_per_month+0x86> 69e76: 2f03 movel %d3,%sp@- 69e78: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 69e7a: 4879 0009 d6c6 pea 9d6c6 <_TOD_Days_per_month+0xa8> 69e80: 2f03 movel %d3,%sp@- 69e82: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 69e84: 4879 0009 d6e9 pea 9d6e9 <_TOD_Days_per_month+0xcb> 69e8a: 2f03 movel %d3,%sp@- 69e8c: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 69e8e: 4fef 001c lea %sp@(28),%sp 69e92: 2ebc 0009 d734 movel #644916,%sp@ 69e98: 2f03 movel %d3,%sp@- 69e9a: 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 ; 69e9c: 2439 000a 7562 movel a7562 <_Rate_monotonic_Information+0x6>,%d2 69ea2: 508f addql #8,%sp 69ea4: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69eaa: 623a bhis 69ee6 69eac: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69eae: 2a0e movel %fp,%d5 69eb0: 0684 ffff ffa2 addil #-94,%d4 69eb6: 47f9 0007 b398 lea 7b398 ,%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 ); 69ebc: 4bf9 0007 b458 lea 7b458 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69ec2: 5b85 subql #5,%d5 69ec4: 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 ); 69eca: 2e3c 0006 b6a0 movel #439968,%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 ); 69ed0: 2f04 movel %d4,%sp@- 69ed2: 2f02 movel %d2,%sp@- 69ed4: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 69ed6: 508f addql #8,%sp 69ed8: 4a80 tstl %d0 69eda: 6714 beqs 69ef0 * 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++ ) { 69edc: 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 ; 69ede: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69ee4: 63ea blss 69ed0 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 69ee6: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 69eec: 4e5e unlk %fp 69eee: 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 ); 69ef0: 486e ffda pea %fp@(-38) 69ef4: 2f02 movel %d2,%sp@- 69ef6: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69ef8: 2f05 movel %d5,%sp@- 69efa: 4878 0005 pea 5 69efe: 2f2e ffda movel %fp@(-38),%sp@- 69f02: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 69f04: 2f2e ffa6 movel %fp@(-90),%sp@- 69f08: 2f2e ffa2 movel %fp@(-94),%sp@- 69f0c: 2f05 movel %d5,%sp@- 69f0e: 2f02 movel %d2,%sp@- 69f10: 4879 0009 d780 pea 9d780 <_TOD_Days_per_month+0x162> 69f16: 2f03 movel %d3,%sp@- 69f18: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 69f1a: 202e ffa2 movel %fp@(-94),%d0 69f1e: 4fef 002c lea %sp@(44),%sp 69f22: 6618 bnes 69f3c (*print)( context, "\n" ); 69f24: 4879 0009 ef77 pea 9ef77 <__FUNCTION__.5973+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++ ) { 69f2a: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 69f2c: 2f03 movel %d3,%sp@- 69f2e: 4e92 jsr %a2@ continue; 69f30: 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 ; 69f32: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69f38: 6396 blss 69ed0 69f3a: 60aa bras 69ee6 <== 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 ); 69f3c: 486e fff2 pea %fp@(-14) 69f40: 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++ ) { 69f42: 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 ); 69f44: 2f00 movel %d0,%sp@- 69f46: 486e ffba pea %fp@(-70) 69f4a: 4e90 jsr %a0@ (*print)( context, 69f4c: 202e fff6 movel %fp@(-10),%d0 69f50: 223c 0000 03e8 movel #1000,%d1 69f56: 4c41 0800 remsl %d1,%d0,%d0 69f5a: 2c2e ffb6 movel %fp@(-74),%d6 69f5e: 2f00 movel %d0,%sp@- 69f60: 2001 movel %d1,%d0 69f62: 2f2e fff2 movel %fp@(-14),%sp@- 69f66: 4c40 6806 remsl %d0,%d6,%d6 69f6a: 202e ffae movel %fp@(-82),%d0 69f6e: 2246 moveal %d6,%a1 69f70: 223c 0000 03e8 movel #1000,%d1 69f76: 2f09 movel %a1,%sp@- 69f78: 2f2e ffb2 movel %fp@(-78),%sp@- 69f7c: 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, 69f80: 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, 69f86: 2f00 movel %d0,%sp@- 69f88: 2f2e ffaa movel %fp@(-86),%sp@- 69f8c: 4879 0009 d797 pea 9d797 <_TOD_Days_per_month+0x179> 69f92: 2f03 movel %d3,%sp@- 69f94: 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); 69f96: 4fef 002c lea %sp@(44),%sp 69f9a: 2047 moveal %d7,%a0 69f9c: 486e fff2 pea %fp@(-14) 69fa0: 2f2e ffa2 movel %fp@(-94),%sp@- 69fa4: 486e ffd2 pea %fp@(-46) 69fa8: 4e90 jsr %a0@ (*print)( context, 69faa: 202e fff6 movel %fp@(-10),%d0 69fae: 4c46 0800 remsl %d6,%d0,%d0 69fb2: 222e ffce movel %fp@(-50),%d1 69fb6: 2f00 movel %d0,%sp@- 69fb8: 2f2e fff2 movel %fp@(-14),%sp@- 69fbc: 4c46 1801 remsl %d6,%d1,%d1 69fc0: 202e ffc6 movel %fp@(-58),%d0 69fc4: 2241 moveal %d1,%a1 69fc6: 2f09 movel %a1,%sp@- 69fc8: 2f2e ffca movel %fp@(-54),%sp@- 69fcc: 4c46 0800 remsl %d6,%d0,%d0 69fd0: 2f00 movel %d0,%sp@- 69fd2: 2f2e ffc2 movel %fp@(-62),%sp@- 69fd6: 4879 0009 d7b6 pea 9d7b6 <_TOD_Days_per_month+0x198> 69fdc: 2f03 movel %d3,%sp@- 69fde: 4e92 jsr %a2@ 69fe0: 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 ; 69fe4: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69fea: 6300 fee4 blsw 69ed0 69fee: 6000 fef6 braw 69ee6 <== NOT EXECUTED 0006a00c : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 6a00c: 4e56 0000 linkw %fp,#0 6a010: 2039 000a 6ab8 movel a6ab8 <_Thread_Dispatch_disable_level>,%d0 6a016: 5280 addql #1,%d0 6a018: 2f0a movel %a2,%sp@- 6a01a: 23c0 000a 6ab8 movel %d0,a6ab8 <_Thread_Dispatch_disable_level> 6a020: 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 ; 6a022: 2439 000a 7562 movel a7562 <_Rate_monotonic_Information+0x6>,%d2 6a028: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 6a02e: 6216 bhis 6a046 6a030: 45f9 0006 a058 lea 6a058 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 6a036: 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++ ) { 6a038: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 6a03a: 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 ; 6a03c: 588f addql #4,%sp 6a03e: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 6a044: 63f0 blss 6a036 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 6a046: 242e fff8 movel %fp@(-8),%d2 6a04a: 246e fffc moveal %fp@(-4),%a2 6a04e: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 6a050: 4ef9 0004 cf20 jmp 4cf20 <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9e3c jsr 59e3c <_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 e656 pea 7e656 <_Region_Information> 574ae: 4eb9 0005 b4c8 jsr 5b4c8 <_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 af4c jsr 5af4c <_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 e656 pea 7e656 <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b800 jsr 5b800 <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 cab4 jsr 5cab4 <_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 e66e moveal 7e66e <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 575ca: 4eb9 0005 9e3c jsr 59e3c <_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 e656 pea 7e656 <_Region_Information> 575de: 4eb9 0005 b964 jsr 5b964 <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e656 pea 7e656 <_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 b558 jsr 5b558 <_Objects_Close> 5763e: 2f0a movel %a2,%sp@- 57640: 4879 0007 e656 pea 7e656 <_Region_Information> 57646: 4eb9 0005 b800 jsr 5b800 <_Objects_Free> 5764c: 4fef 0010 lea %sp@(16),%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57650: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57656: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9e3c jsr 59e3c <_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 e656 pea 7e656 <_Region_Information> 57694: 4eb9 0005 b964 jsr 5b964 <_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 ac40 jsr 5ac40 <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57752: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 57758: 486e fffc pea %fp@(-4) 5775c: 2f2e 0008 movel %fp@(8),%sp@- 57760: 4879 0007 e656 pea 7e656 <_Region_Information> 57766: 4eb9 0005 b964 jsr 5b964 <_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 ae70 jsr 5ae70 <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 5779a: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57886: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 5788c: 486e fffc pea %fp@(-4) 57890: 2f03 movel %d3,%sp@- 57892: 4879 0007 e656 pea 7e656 <_Region_Information> executing = _Thread_Executing; 57898: 2879 0007 e812 moveal 7e812 <_Thread_Executing>,%a4 5789e: 4eb9 0005 b964 jsr 5b964 <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 aaac jsr 5aaac <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57918: 2d40 fff8 movel %d0,%fp@(-8) 5791c: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 57962: 5280 addql #1,%d0 57964: 23c0 0007 e758 movel %d0,7e758 <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57970: 4eb9 0005 9e9c jsr 59e9c <_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 cb98 pea 5cb98 <_Thread_queue_Timeout> 5799a: 2f2e 0014 movel %fp@(20),%sp@- 5799e: 2f00 movel %d0,%sp@- 579a0: 4eb9 0005 c838 jsr 5c838 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 579a6: 4eb9 0005 c2bc jsr 5c2bc <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 e656 pea 7e656 <_Region_Information> 579f4: 4eb9 0005 b964 jsr 5b964 <_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 b3a0 jsr 5b3a0 <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57b7e: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 57b84: 486e fffc pea %fp@(-4) 57b88: 2f2e 0008 movel %fp@(8),%sp@- 57b8c: 4879 0007 e656 pea 7e656 <_Region_Information> 57b92: 4eb9 0005 b964 jsr 5b964 <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 acf0 jsr 5acf0 <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 fe1c jsr 5fe1c <_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 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 ef04 movel %d0,5ef04 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45b12: 4eb9 0004 7090 jsr 47090 <_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 67dc jsr 467dc <_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 ee3c pea 5ee3c <_Semaphore_Information> 45b78: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b7e: 4eb9 0004 7dbc jsr 47dbc <_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 6b24 jsr 46b24 <_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 ee54 moveal 5ee54 <_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 7dbc jsr 47dbc <_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 7dbc jsr 47dbc <_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 ee3c pea 5ee3c <_Semaphore_Information> 45c68: 4eb9 0004 752c jsr 4752c <_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 7dbc jsr 47dbc <_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 67d0 jsr 467d0 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45cc4: 4eb9 0004 7120 jsr 47120 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45cd2: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45cd8: 4eb9 0004 7dbc jsr 47dbc <_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 6b18 jsr 46b18 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45d08: 4eb9 0004 7120 jsr 47120 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 ee3c pea 5ee3c <_Semaphore_Information> 45d16: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d1c: 4eb9 0004 7dbc jsr 47dbc <_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 ... 00050dcc : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 50dcc: 4e56 fffc linkw %fp,#-4 50dd0: 486e fffc pea %fp@(-4) 50dd4: 2f2e 0008 movel %fp@(8),%sp@- 50dd8: 4879 0006 4f84 pea 64f84 <_Semaphore_Information> 50dde: 4eb9 0004 9568 jsr 49568 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 50de4: 4fef 000c lea %sp@(12),%sp 50de8: 4aae fffc tstl %fp@(-4) 50dec: 6706 beqs 50df4 50dee: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50df0: 4e5e unlk %fp 50df2: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 50df4: 7230 moveq #48,%d1 50df6: 2040 moveal %d0,%a0 50df8: c2a8 0010 andl %a0@(16),%d1 50dfc: 6720 beqs 50e1e _CORE_mutex_Flush( 50dfe: 4878 0001 pea 1 50e02: 42a7 clrl %sp@- 50e04: 4868 0014 pea %a0@(20) 50e08: 4eb9 0004 8770 jsr 48770 <_CORE_mutex_Flush> 50e0e: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50e12: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 50e18: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50e1a: 4e5e unlk %fp 50e1c: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 50e1e: 4878 0001 pea 1 50e22: 2040 moveal %d0,%a0 50e24: 42a7 clrl %sp@- 50e26: 4868 0014 pea %a0@(20) 50e2a: 4eb9 0004 8ab8 jsr 48ab8 <_CORE_semaphore_Flush> 50e30: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50e34: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 50e3a: 4280 clrl %d0 50e3c: 60dc bras 50e1a ... 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 e690 pea 7e690 <_Semaphore_Information> 57f72: 4eb9 0005 bbd8 jsr 5bbd8 <_Objects_Name_to_id_u32> 57f78: 41f9 0007 7a80 lea 77a80 <_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 ... 000463fc : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463fc: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 463fe: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 46402: b0b9 0005 f08c cmpl 5f08c <_System_state_Current>,%d0 46408: 6718 beqs 46422 4640a: 23c0 0005 f08c movel %d0,5f08c <_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 ); 46410: 203c 0005 eed0 movel #388816,%d0 46416: 2d40 0008 movel %d0,%fp@(8) _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 4641a: 4e5e unlk %fp 4641c: 4ef9 0004 9296 jmp 49296 <_CPU_Context_Restart_self> 46422: 4e5e unlk %fp 46424: 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 0006 0bf4 tstb 60bf4 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 26fe moveal 626fe <_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 a5d0 jsr 4a5d0 <_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 010a moveal %a1@(266),%a0 485da: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 485de: 4eb9 0004 a5a8 jsr 4a5a8 <_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 26fe moveal 626fe <_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 010a moveal %a0@(266),%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 efbe moveal 5efbe <_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 ee76 pea 5ee76 <_RTEMS_tasks_Information> 46130: 4eb9 0004 76d8 jsr 476d8 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 46136: 4fef 0010 lea %sp@(16),%sp 4613a: 41f9 0005 c69c lea 5c69c <_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 c314 jsr 5c314 <_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 c2bc jsr 5c2bc <_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 c2bc jsr 5c2bc <_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 89f8 jsr 489f8 <_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 92b4 jsr 492b4 <_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 89d0 jsr 489d0 <_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 89d0 jsr 489d0 <_Thread_Enable_dispatch> 46dc4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46dc6: 4e5e unlk %fp 46dc8: 4e75 rts ... 00050ff0 : #include #include rtems_id rtems_task_self(void) { 50ff0: 4e56 0000 linkw %fp,#0 50ff4: 2079 0006 5106 moveal 65106 <_Thread_Executing>,%a0 return _Thread_Executing->Object.id; } 50ffa: 4e5e unlk %fp 50ffc: 2028 0008 movel %a0@(8),%d0 51000: 4e75 rts ... 0006a6f4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 6a6f4: 4e56 fffc linkw %fp,#-4 6a6f8: 2f0a movel %a2,%sp@- 6a6fa: 246e 0010 moveal %fp@(16),%a2 6a6fe: 2f02 movel %d2,%sp@- 6a700: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 6a704: 6752 beqs 6a758 return RTEMS_INVALID_ADDRESS; if ( !result ) 6a706: 4a8a tstl %a2 6a708: 674e beqs 6a758 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 6a70a: 486e fffc pea %fp@(-4) 6a70e: 2f2e 0008 movel %fp@(8),%sp@- 6a712: 4eb9 0004 cf48 jsr 4cf48 <_Thread_Get> switch (location) { 6a718: 508f addql #8,%sp 6a71a: 4aae fffc tstl %fp@(-4) 6a71e: 662a bnes 6a74a case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 6a720: 2240 moveal %d0,%a1 6a722: 2069 011a moveal %a1@(282),%a0 while (tvp) { 6a726: 4a88 tstl %a0 6a728: 670c beqs 6a736 if (tvp->ptr == ptr) { 6a72a: b4a8 0004 cmpl %a0@(4),%d2 6a72e: 6736 beqs 6a766 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 6a730: 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) { 6a732: 4a88 tstl %a0 6a734: 66f4 bnes 6a72a _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 6a736: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a73c: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 6a740: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a742: 246e fff8 moveal %fp@(-8),%a2 6a746: 4e5e unlk %fp 6a748: 4e75 rts 6a74a: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 6a74e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a750: 246e fff8 moveal %fp@(-8),%a2 6a754: 4e5e unlk %fp 6a756: 4e75 rts 6a758: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 6a75c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a75e: 246e fff8 moveal %fp@(-8),%a2 6a762: 4e5e unlk %fp 6a764: 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; 6a766: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 6a76a: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a770: 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(); 6a774: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a776: 246e fff8 moveal %fp@(-8),%a2 6a77a: 4e5e unlk %fp 6a77c: 4e75 rts ... 00046294 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 46294: 4e56 0000 linkw %fp,#0 46298: 2039 0005 ef04 movel 5ef04 <_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 ef04 movel %d0,5ef04 <_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 efbe movel 5efbe <_Thread_Executing>,%sp@- 462ba: 4eb9 0004 8710 jsr 48710 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 462c0: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 462c6: 203c 0004 7c28 movel #293928,%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 efdc pea 5efdc <_Watchdog_Ticks_chain> 462ee: 4eb9 0004 8f4c jsr 48f4c <_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 7dbc jsr 47dbc <_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 8b78 jsr 48b78 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 4630e: 4eb9 0004 7dbc jsr 47dbc <_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 efec pea 7efec <_Timer_Information> 58b82: 4eb9 0005 b9a0 jsr 5b9a0 <_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 d8d0 jsr 5d8d0 <_Watchdog_Remove> 58bac: 588f addql #4,%sp _Thread_Enable_dispatch(); 58bae: 4eb9 0005 c2bc jsr 5c2bc <_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 efec pea 7efec <_Timer_Information> 58c7c: 4eb9 0005 b9a0 jsr 5b9a0 <_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 efec pea 7efec <_Timer_Information> 58c96: 4eb9 0005 b558 jsr 5b558 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 58c9c: 486a 0010 pea %a2@(16) 58ca0: 4eb9 0005 d8d0 jsr 5d8d0 <_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 efec pea 7efec <_Timer_Information> 58cae: 4eb9 0005 b800 jsr 5b800 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 58cb4: 4eb9 0005 c2bc jsr 5c2bc <_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 e76c tstb 7e76c <_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 e7ea cmpl 7e7ea <_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 efec pea 7efec <_Timer_Information> 58e12: 4eb9 0005 b9a0 jsr 5b9a0 <_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 d8d0 jsr 5d8d0 <_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 e7ea subl 7e7ea <_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 e824 pea 7e824 <_Watchdog_Seconds_chain> 58e62: 4eb9 0005 d788 jsr 5d788 <_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 c2bc jsr 5c2bc <_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 efec pea 7efec <_Timer_Information> 58eb4: 4eb9 0005 b9a0 jsr 5b9a0 <_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 c2bc jsr 5c2bc <_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 efec pea 7efec <_Timer_Information> 58f46: 4eb9 0005 b9a0 jsr 5b9a0 <_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 c2bc jsr 5c2bc <_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 d8d0 jsr 5d8d0 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 e830 pea 7e830 <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d788 jsr 5d788 <_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 c2bc jsr 5c2bc <_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 f026 moveal 7f026 <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fba: 4eb9 0005 d8d0 jsr 5d8d0 <_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 c2bc jsr 5c2bc <_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 f026 moveal 7f026 <_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 efec pea 7efec <_Timer_Information> 5901a: 4eb9 0005 b9a0 jsr 5b9a0 <_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 d8d0 jsr 5d8d0 <_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 c2bc jsr 5c2bc <_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 c2bc jsr 5c2bc <_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 f026 moveal 7f026 <_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 e76c tstb 7e76c <_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 e7ea cmpl 7e7ea <_TOD_Now>,%d0 59118: 63e0 blss 590fa 5911a: 486e fffc pea %fp@(-4) 5911e: 2f2e 0008 movel %fp@(8),%sp@- 59122: 4879 0007 efec pea 7efec <_Timer_Information> 59128: 4eb9 0005 b9a0 jsr 5b9a0 <_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 d8d0 jsr 5d8d0 <_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 e7ea subl 7e7ea <_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 c2bc jsr 5c2bc <_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 ... 00046804 : int sched_get_priority_max( int policy ) { switch ( policy ) { 46804: 7004 moveq #4,%d0 #include int sched_get_priority_max( int policy ) { 46806: 4e56 0000 linkw %fp,#0 4680a: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 4680e: b081 cmpl %d1,%d0 46810: 6412 bccs 46824 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 46812: 4eb9 0004 fb0c jsr 4fb0c <__errno> 46818: 7216 moveq #22,%d1 4681a: 2040 moveal %d0,%a0 4681c: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 4681e: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 46820: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 46822: 4e75 rts int sched_get_priority_max( int policy ) { switch ( policy ) { 46824: 103c 0001 moveb #1,%d0 46828: e3a8 lsll %d1,%d0 4682a: 7217 moveq #23,%d1 4682c: c081 andl %d1,%d0 4682e: 67e2 beqs 46812 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 46830: 4280 clrl %d0 46832: 1039 0005 eb86 moveb 5eb86 ,%d0 } 46838: 4e5e unlk %fp default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 4683a: 5380 subql #1,%d0 } 4683c: 4e75 rts ... 00046840 : int sched_get_priority_min( int policy ) { switch ( policy ) { 46840: 7004 moveq #4,%d0 #include int sched_get_priority_min( int policy ) { 46842: 4e56 0000 linkw %fp,#0 46846: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 4684a: b081 cmpl %d1,%d0 4684c: 6412 bccs 46860 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4684e: 4eb9 0004 fb0c jsr 4fb0c <__errno> 46854: 7216 moveq #22,%d1 46856: 2040 moveal %d0,%a0 46858: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 4685a: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4685c: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 4685e: 4e75 rts int sched_get_priority_min( int policy ) { switch ( policy ) { 46860: 103c 0001 moveb #1,%d0 46864: e3a8 lsll %d1,%d0 46866: 7217 moveq #23,%d1 46868: c081 andl %d1,%d0 4686a: 67e2 beqs 4684e 4686c: 7001 moveq #1,%d0 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 4686e: 4e5e unlk %fp 46870: 4e75 rts ... 00045d54 : int sched_getparam( pid_t pid __attribute__((unused)), struct sched_param *param __attribute__((unused)) ) { 45d54: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45d58: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45d5e: 7258 moveq #88,%d1 45d60: 2040 moveal %d0,%a0 } 45d62: 70ff moveq #-1,%d0 45d64: 4e5e unlk %fp int sched_getparam( pid_t pid __attribute__((unused)), struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45d66: 2081 movel %d1,%a0@ } 45d68: 4e75 rts ... 00045d6c : #include int sched_getscheduler( pid_t pid __attribute__((unused)) ) { 45d6c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45d70: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45d76: 7258 moveq #88,%d1 45d78: 2040 moveal %d0,%a0 } 45d7a: 70ff moveq #-1,%d0 45d7c: 4e5e unlk %fp int sched_getscheduler( pid_t pid __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45d7e: 2081 movel %d1,%a0@ } 45d80: 4e75 rts ... 00045d84 : int sched_setparam( pid_t pid __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { 45d84: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45d88: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45d8e: 7258 moveq #88,%d1 45d90: 2040 moveal %d0,%a0 } 45d92: 70ff moveq #-1,%d0 45d94: 4e5e unlk %fp int sched_setparam( pid_t pid __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45d96: 2081 movel %d1,%a0@ } 45d98: 4e75 rts ... 00045d9c : int sched_setscheduler( pid_t pid __attribute__((unused)), int policy __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { 45d9c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45da0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45da6: 7258 moveq #88,%d1 45da8: 2040 moveal %d0,%a0 } 45daa: 70ff moveq #-1,%d0 45dac: 4e5e unlk %fp pid_t pid __attribute__((unused)), int policy __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45dae: 2081 movel %d1,%a0@ } 45db0: 4e75 rts ... 000488cc : */ int sem_close( sem_t *sem ) { 488cc: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 488d0: 486e fffc pea %fp@(-4) 488d4: 206e 0008 moveal %fp@(8),%a0 488d8: 2f10 movel %a0@,%sp@- 488da: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 488e0: 4eb9 0004 ab84 jsr 4ab84 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 488e6: 4fef 000c lea %sp@(12),%sp 488ea: 4aae fffc tstl %fp@(-4) 488ee: 6712 beqs 48902 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 488f0: 4eb9 0005 2bbc jsr 52bbc <__errno> 488f6: 7216 moveq #22,%d1 488f8: 2040 moveal %d0,%a0 488fa: 70ff moveq #-1,%d0 } 488fc: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 488fe: 2081 movel %d1,%a0@ } 48900: 4e75 rts the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 48902: 2040 moveal %d0,%a0 48904: 53a8 0016 subql #1,%a0@(22) _POSIX_Semaphore_Delete( the_semaphore ); 48908: 2f00 movel %d0,%sp@- 4890a: 4eb9 0004 f088 jsr 4f088 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 48910: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> return 0; 48916: 588f addql #4,%sp switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); 48918: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 4891a: 4e5e unlk %fp 4891c: 4e75 rts ... 000489d8 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 489d8: 4e56 fffc linkw %fp,#-4 489dc: 2f0a movel %a2,%sp@- 489de: 246e 0008 moveal %fp@(8),%a2 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 489e2: 4a8a tstl %a2 489e4: 672e beqs 48a14 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 489e6: 486e fffc pea %fp@(-4) 489ea: 2f2e 0010 movel %fp@(16),%sp@- 489ee: 2f2e 000c movel %fp@(12),%sp@- 489f2: 42a7 clrl %sp@- 489f4: 4eb9 0004 ef28 jsr 4ef28 <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 489fa: 4fef 0010 lea %sp@(16),%sp 489fe: 72ff moveq #-1,%d1 48a00: b280 cmpl %d0,%d1 48a02: 6708 beqs 48a0c *sem = the_semaphore->Object.id; 48a04: 206e fffc moveal %fp@(-4),%a0 48a08: 24a8 0008 movel %a0@(8),%a2@ return status; } 48a0c: 246e fff8 moveal %fp@(-8),%a2 48a10: 4e5e unlk %fp 48a12: 4e75 rts { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 48a14: 4eb9 0005 2bbc jsr 52bbc <__errno> if ( status != -1 ) *sem = the_semaphore->Object.id; return status; } 48a1a: 246e fff8 moveal %fp@(-8),%a2 { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 48a1e: 2040 moveal %d0,%a0 48a20: 7216 moveq #22,%d1 48a22: 70ff moveq #-1,%d0 if ( status != -1 ) *sem = the_semaphore->Object.id; return status; } 48a24: 4e5e unlk %fp { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 48a26: 2081 movel %d1,%a0@ if ( status != -1 ) *sem = the_semaphore->Object.id; return status; } 48a28: 4e75 rts ... 00048a2c : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 48a2c: 4e56 ffe0 linkw %fp,#-32 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48a30: 2039 0006 3fa0 movel 63fa0 <_Thread_Dispatch_disable_level>,%d0 48a36: 5280 addql #1,%d0 48a38: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48a3c: 23c0 0006 3fa0 movel %d0,63fa0 <_Thread_Dispatch_disable_level> 48a42: 2a2e 0008 movel %fp@(8),%d5 48a46: 262e 000c movel %fp@(12),%d3 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 48a4a: 2803 movel %d3,%d4 48a4c: 0284 0000 0200 andil #512,%d4 48a52: 6600 0086 bnew 48ada 48a56: 95ca subal %a2,%a2 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 48a58: 486e fffc pea %fp@(-4) 48a5c: 2f05 movel %d5,%sp@- 48a5e: 4eb9 0004 f0e0 jsr 4f0e0 <_POSIX_Semaphore_Name_to_id> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 48a64: 508f addql #8,%sp mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 48a66: 2400 movel %d0,%d2 * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 48a68: 6726 beqs 48a90 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 48a6a: 7002 moveq #2,%d0 48a6c: b082 cmpl %d2,%d0 48a6e: 6604 bnes 48a74 48a70: 4a84 tstl %d4 48a72: 666e bnes 48ae2 _Thread_Enable_dispatch(); 48a74: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 48a7a: 4eb9 0005 2bbc jsr 52bbc <__errno> 48a80: 2040 moveal %d0,%a0 48a82: 70ff moveq #-1,%d0 48a84: 2082 movel %d2,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 48a86: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48a8c: 4e5e unlk %fp 48a8e: 4e75 rts /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 48a90: 0283 0000 0a00 andil #2560,%d3 48a96: 0c83 0000 0a00 cmpil #2560,%d3 48a9c: 676e beqs 48b0c 48a9e: 486e fff4 pea %fp@(-12) rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 48aa2: 45f9 0004 b464 lea 4b464 <_Thread_Enable_dispatch>,%a2 48aa8: 2f2e fffc movel %fp@(-4),%sp@- 48aac: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 48ab2: 4eb9 0004 ab84 jsr 4ab84 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 48ab8: 2040 moveal %d0,%a0 48aba: 52a8 0016 addql #1,%a0@(22) if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 48abe: 2d40 fff8 movel %d0,%fp@(-8) the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 48ac2: 4e92 jsr %a2@ _Thread_Enable_dispatch(); 48ac4: 4e92 jsr %a2@ return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 48ac6: 202e fff8 movel %fp@(-8),%d0 the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); goto return_id; 48aca: 4fef 000c lea %sp@(12),%sp return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 48ace: 5080 addql #8,%d0 #endif return id; } 48ad0: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48ad6: 4e5e unlk %fp 48ad8: 4e75 rts _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 48ada: 246e 0014 moveal %fp@(20),%a2 48ade: 6000 ff78 braw 48a58 /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 48ae2: 486e fff8 pea %fp@(-8) 48ae6: 2f0a movel %a2,%sp@- 48ae8: 42a7 clrl %sp@- 48aea: 2f05 movel %d5,%sp@- 48aec: 4eb9 0004 ef28 jsr 4ef28 <_POSIX_Semaphore_Create_support> 48af2: 2400 movel %d0,%d2 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 48af4: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> if ( status == -1 ) 48afa: 4fef 0010 lea %sp@(16),%sp 48afe: 70ff moveq #-1,%d0 48b00: b082 cmpl %d2,%d0 48b02: 6782 beqs 48a86 return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 48b04: 202e fff8 movel %fp@(-8),%d0 48b08: 5080 addql #8,%d0 48b0a: 60c4 bras 48ad0 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 48b0c: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 48b12: 4eb9 0005 2bbc jsr 52bbc <__errno> 48b18: 7211 moveq #17,%d1 48b1a: 2040 moveal %d0,%a0 48b1c: 70ff moveq #-1,%d0 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 48b1e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 48b24: 2081 movel %d1,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 48b26: 4e5e unlk %fp 48b28: 4e75 rts ... 00048b84 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48b84: 4e56 fffc linkw %fp,#-4 48b88: 2f02 movel %d2,%sp@- * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 48b8a: 486e fffc pea %fp@(-4) 48b8e: 2f2e 000c movel %fp@(12),%sp@- int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48b92: 242e 0008 movel %fp@(8),%d2 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 48b96: 4eb9 0004 e4f4 jsr 4e4f4 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 48b9c: 508f addql #8,%sp 48b9e: 7203 moveq #3,%d1 48ba0: b280 cmpl %d0,%d1 48ba2: 671a beqs 48bbe do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48ba4: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 48ba8: 42a7 clrl %sp@- <== NOT EXECUTED 48baa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48bac: 4eb9 0004 f158 jsr 4f158 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 48bb2: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48bb6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED break; } } return lock_status; } 48bba: 4e5e unlk %fp <== NOT EXECUTED 48bbc: 4e75 rts <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48bbe: 2f2e fffc movel %fp@(-4),%sp@- 48bc2: 4878 0001 pea 1 48bc6: 2f02 movel %d2,%sp@- 48bc8: 4eb9 0004 f158 jsr 4f158 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 48bce: 242e fff8 movel %fp@(-8),%d2 */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48bd2: 4fef 000c lea %sp@(12),%sp break; } } return lock_status; } 48bd6: 4e5e unlk %fp 48bd8: 4e75 rts ... 00048bdc : */ int sem_trywait( sem_t *sem ) { 48bdc: 4e56 0000 linkw %fp,#0 return _POSIX_Semaphore_Wait_support(sem, false, THREAD_QUEUE_WAIT_FOREVER); 48be0: 42a7 clrl %sp@- 48be2: 42a7 clrl %sp@- 48be4: 2f2e 0008 movel %fp@(8),%sp@- 48be8: 4eb9 0004 f158 jsr 4f158 <_POSIX_Semaphore_Wait_support> } 48bee: 4e5e unlk %fp 48bf0: 4e75 rts ... 00045a8c : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 45a8c: 4e56 0000 linkw %fp,#0 if ( !value ) 45a90: 4aae 000c tstl %fp@(12) 45a94: 6732 beqs 45ac8 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 45a96: 4aae 0010 tstl %fp@(16) 45a9a: 672c beqs 45ac8 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 45a9c: 7002 moveq #2,%d0 45a9e: b0ae 0008 cmpl %fp@(8),%d0 45aa2: 6412 bccs 45ab6 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45aa4: 4eb9 0004 f3dc jsr 4f3dc <__errno> } 45aaa: 4e5e unlk %fp case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45aac: 2040 moveal %d0,%a0 45aae: 7016 moveq #22,%d0 45ab0: 2080 movel %d0,%a0@ } 45ab2: 70ff moveq #-1,%d0 45ab4: 4e75 rts switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 45ab6: 4eb9 0004 f3dc jsr 4f3dc <__errno> 45abc: 7258 moveq #88,%d1 45abe: 2040 moveal %d0,%a0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45ac0: 70ff moveq #-1,%d0 45ac2: 4e5e unlk %fp switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 45ac4: 2081 movel %d1,%a0@ default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45ac6: 4e75 rts { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT ); 45ac8: 4eb9 0004 f3dc jsr 4f3dc <__errno> rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45ace: 4e5e unlk %fp { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT ); 45ad0: 2040 moveal %d0,%a0 45ad2: 700e moveq #14,%d0 45ad4: 2080 movel %d0,%a0@ rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45ad6: 70ff moveq #-1,%d0 45ad8: 4e75 rts ... 0004672c : int sigaddset( sigset_t *set, int signo ) { 4672c: 4e56 0000 linkw %fp,#0 46730: 206e 0008 moveal %fp@(8),%a0 46734: 202e 000c movel %fp@(12),%d0 46738: 2f02 movel %d2,%sp@- if ( !set ) 4673a: 4a88 tstl %a0 4673c: 671e beqs 4675c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 4673e: 4a80 tstl %d0 46740: 671a beqs 4675c 46742: 2400 movel %d0,%d2 46744: 5382 subql #1,%d2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 46746: 701f moveq #31,%d0 46748: b082 cmpl %d2,%d0 4674a: 6510 bcss 4675c rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 4674c: 7201 moveq #1,%d1 4674e: 4280 clrl %d0 46750: e5a9 lsll %d2,%d1 return 0; } 46752: 242e fffc movel %fp@(-4),%d2 46756: 4e5e unlk %fp rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 46758: 8390 orl %d1,%a0@ return 0; } 4675a: 4e75 rts if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4675c: 4eb9 0004 fbec jsr 4fbec <__errno> *set |= signo_to_mask(signo); return 0; } 46762: 242e fffc movel %fp@(-4),%d2 if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 46766: 2040 moveal %d0,%a0 46768: 7216 moveq #22,%d1 4676a: 70ff moveq #-1,%d0 *set |= signo_to_mask(signo); return 0; } 4676c: 4e5e unlk %fp if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4676e: 2081 movel %d1,%a0@ *set |= signo_to_mask(signo); return 0; } 46770: 4e75 rts ... 0004b474 : #include int sigemptyset( sigset_t *set ) { 4b474: 4e56 0000 linkw %fp,#0 4b478: 206e 0008 moveal %fp@(8),%a0 if ( !set ) 4b47c: 4a88 tstl %a0 4b47e: 6708 beqs 4b488 rtems_set_errno_and_return_minus_one( EINVAL ); *set = 0; 4b480: 4280 clrl %d0 return 0; } 4b482: 4e5e unlk %fp ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); *set = 0; 4b484: 4290 clrl %a0@ return 0; } 4b486: 4e75 rts int sigemptyset( sigset_t *set ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); 4b488: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4b48e: 7216 moveq #22,%d1 4b490: 2040 moveal %d0,%a0 4b492: 70ff moveq #-1,%d0 *set = 0; return 0; } 4b494: 4e5e unlk %fp int sigemptyset( sigset_t *set ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); 4b496: 2081 movel %d1,%a0@ *set = 0; return 0; } 4b498: 4e75 rts ... 00046410 : sighandler_t signal( int signum, sighandler_t handler ) { 46410: 4e56 ffe8 linkw %fp,#-24 struct sigaction s; struct sigaction old; s.sa_handler = handler ; 46414: 2d6e 000c fffc movel %fp@(12),%fp@(-4) sigemptyset(&s.sa_mask); 4641a: 486e fff8 pea %fp@(-8) 4641e: 4eb9 0004 63e8 jsr 463e8 s.sa_flags = SA_RESTART; #else s.sa_flags = 0; #endif sigaction( signum, &s, &old ); 46424: 486e ffe8 pea %fp@(-24) 46428: 486e fff4 pea %fp@(-12) 4642c: 2f2e 0008 movel %fp@(8),%sp@- s.sa_flags = SA_RESTART | SA_INTERRUPT | SA_NOMASK; s.sa_restorer= NULL ; #elif defined(signal_like_SVR4) s.sa_flags = SA_RESTART; #else s.sa_flags = 0; 46430: 42ae fff4 clrl %fp@(-12) #endif sigaction( signum, &s, &old ); 46434: 4eb9 0004 62dc jsr 462dc return (sighandler_t) old.sa_handler; } 4643a: 202e fff0 movel %fp@(-16),%d0 4643e: 4e5e unlk %fp 46440: 4e75 rts ... 0004679c : #include int sigpending( sigset_t *set ) { 4679c: 4e56 0000 linkw %fp,#0 467a0: 206e 0008 moveal %fp@(8),%a0 POSIX_API_Control *api; if ( !set ) 467a4: 4a88 tstl %a0 467a6: 671c beqs 467c4 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; 467a8: 2279 0006 0f1e moveal 60f1e <_Thread_Executing>,%a1 467ae: 4280 clrl %d0 return 0; } 467b0: 4e5e unlk %fp if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; 467b2: 2239 0006 1506 movel 61506 <_POSIX_signals_Pending>,%d1 467b8: 2269 010e moveal %a1@(270),%a1 467bc: 82a9 00d0 orl %a1@(208),%d1 467c0: 2081 movel %d1,%a0@ return 0; } 467c2: 4e75 rts ) { POSIX_API_Control *api; if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); 467c4: 4eb9 0004 fbec jsr 4fbec <__errno> 467ca: 7216 moveq #22,%d1 467cc: 2040 moveal %d0,%a0 467ce: 70ff moveq #-1,%d0 api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; return 0; } 467d0: 4e5e unlk %fp ) { POSIX_API_Control *api; if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); 467d2: 2081 movel %d1,%a0@ api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; return 0; } 467d4: 4e75 rts ... 00048b58 : int sigqueue( pid_t pid, int signo, const union sigval value ) { 48b58: 4e56 0000 linkw %fp,#0 return killinfo( pid, signo, &value ); 48b5c: 486e 0010 pea %fp@(16) 48b60: 2f2e 000c movel %fp@(12),%sp@- 48b64: 2f2e 0008 movel %fp@(8),%sp@- 48b68: 4eb9 0004 e7c8 jsr 4e7c8 } 48b6e: 4e5e unlk %fp 48b70: 4e75 rts ... 00048b74 : #include int sigsuspend( const sigset_t *sigmask ) { 48b74: 4e56 ffec linkw %fp,#-20 48b78: 48d7 040c moveml %d2-%d3/%a2,%sp@ int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 48b7c: 240e movel %fp,%d2 48b7e: 5982 subql #4,%d2 48b80: 45f9 0004 8b4c lea 48b4c ,%a2 (void) sigfillset( &all_signals ); 48b86: 260e movel %fp,%d3 48b88: 5183 subql #8,%d3 int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 48b8a: 2f02 movel %d2,%sp@- 48b8c: 2f2e 0008 movel %fp@(8),%sp@- 48b90: 4878 0001 pea 1 48b94: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 48b96: 2f03 movel %d3,%sp@- 48b98: 4eb9 0004 8aa8 jsr 48aa8 status = sigtimedwait( &all_signals, NULL, NULL ); 48b9e: 42a7 clrl %sp@- 48ba0: 42a7 clrl %sp@- 48ba2: 2f03 movel %d3,%sp@- 48ba4: 4eb9 0004 8c30 jsr 48c30 48baa: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 48bac: 42a7 clrl %sp@- 48bae: 2f02 movel %d2,%sp@- 48bb0: 42a7 clrl %sp@- 48bb2: 4e92 jsr %a2@ /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 48bb4: 4fef 0028 lea %sp@(40),%sp 48bb8: 70ff moveq #-1,%d0 48bba: b083 cmpl %d3,%d0 48bbc: 660c bnes 48bca rtems_set_errno_and_return_minus_one( EINTR ); return status; } 48bbe: 70ff moveq #-1,%d0 <== NOT EXECUTED 48bc0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 48bc6: 4e5e unlk %fp <== NOT EXECUTED 48bc8: 4e75 rts <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 48bca: 4eb9 0005 1e84 jsr 51e84 <__errno> 48bd0: 2040 moveal %d0,%a0 48bd2: 7004 moveq #4,%d0 return status; } 48bd4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 48bda: 2080 movel %d0,%a0@ return status; } 48bdc: 70ff moveq #-1,%d0 48bde: 4e5e unlk %fp 48be0: 4e75 rts ... 00045814 : long sysconf( int name ) { if ( name == _SC_CLK_TCK ) 45814: 7002 moveq #2,%d0 */ long sysconf( int name ) { 45816: 4e56 0000 linkw %fp,#0 4581a: 222e 0008 movel %fp@(8),%d1 4581e: 2f02 movel %d2,%sp@- if ( name == _SC_CLK_TCK ) 45820: b081 cmpl %d1,%d0 45822: 6726 beqs 4584a return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 45824: 7004 moveq #4,%d0 45826: b081 cmpl %d1,%d0 45828: 6738 beqs 45862 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 4582a: 203c 0000 0400 movel #1024,%d0 45830: 7433 moveq #51,%d2 45832: b481 cmpl %d1,%d2 45834: 670c beqs 45842 return 1024; if ( name == _SC_PAGESIZE ) 45836: 143c 0008 moveb #8,%d2 4583a: 303c 1000 movew #4096,%d0 4583e: b481 cmpl %d1,%d2 45840: 662e bnes 45870 if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 45842: 242e fffc movel %fp@(-4),%d2 45846: 4e5e unlk %fp 45848: 4e75 rts long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 4584a: 41f9 0005 ddf4 lea 5ddf4 ,%a0 45850: 203c 000f 4240 movel #1000000,%d0 if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 45856: 242e fffc movel %fp@(-4),%d2 4585a: 4e5e unlk %fp long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 4585c: 4c50 0000 remul %a0@,%d0,%d0 if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 45860: 4e75 rts 45862: 242e fffc movel %fp@(-4),%d2 45866: 4e5e unlk %fp if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; 45868: 2039 0005 dd14 movel 5dd14 ,%d0 if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 4586e: 4e75 rts #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45870: 4eb9 0004 f188 jsr 4f188 <__errno> } 45876: 242e fffc movel %fp@(-4),%d2 #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 4587a: 2040 moveal %d0,%a0 4587c: 7216 moveq #22,%d1 4587e: 70ff moveq #-1,%d0 } 45880: 4e5e unlk %fp #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45882: 2081 movel %d1,%a0@ } 45884: 4e75 rts ... 000458dc : timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 458dc: 7001 moveq #1,%d0 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 458de: 4e56 0000 linkw %fp,#0 458e2: 2f0b movel %a3,%sp@- 458e4: 266e 0010 moveal %fp@(16),%a3 458e8: 2f0a movel %a2,%sp@- 458ea: 246e 000c moveal %fp@(12),%a2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 458ee: b0ae 0008 cmpl %fp@(8),%d0 458f2: 6600 00c4 bnew 459b8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 458f6: 4a8b tstl %a3 458f8: 6700 00be beqw 459b8 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 458fc: 4a8a tstl %a2 458fe: 671e beqs 4591e /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 45900: 2012 movel %a2@,%d0 45902: 7201 moveq #1,%d1 45904: 5380 subql #1,%d0 45906: b280 cmpl %d0,%d1 45908: 6500 00ae bcsw 459b8 ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 4590c: 202a 0004 movel %a2@(4),%d0 45910: 6700 00a6 beqw 459b8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 45914: 5380 subql #1,%d0 45916: 721f moveq #31,%d1 45918: b280 cmpl %d0,%d1 4591a: 6500 009c bcsw 459b8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4591e: 2039 0005 fc34 movel 5fc34 <_Thread_Dispatch_disable_level>,%d0 45924: 5280 addql #1,%d0 45926: 23c0 0005 fc34 movel %d0,5fc34 <_Thread_Dispatch_disable_level> * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 4592c: 4879 0005 fec8 pea 5fec8 <_POSIX_Timer_Information> 45932: 4eb9 0004 79e0 jsr 479e0 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 45938: 588f addql #4,%sp 4593a: 2040 moveal %d0,%a0 4593c: 4a80 tstl %d0 4593e: 6700 0092 beqw 459d2 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 45942: 7002 moveq #2,%d0 45944: 1140 003c moveb %d0,%a0@(60) ptimer->thread_id = _Thread_Executing->Object.id; 45948: 2279 0005 fcee moveal 5fcee <_Thread_Executing>,%a1 4594e: 2169 0008 0038 movel %a1@(8),%a0@(56) if ( evp != NULL ) { 45954: 4a8a tstl %a2 45956: 6710 beqs 45968 ptimer->inf.sigev_notify = evp->sigev_notify; 45958: 2152 003e movel %a2@,%a0@(62) ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 4595c: 216a 0008 0046 movel %a2@(8),%a0@(70) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; 45962: 216a 0004 0042 movel %a2@(4),%a0@(66) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45968: 2028 0008 movel %a0@(8),%d0 4596c: 4281 clrl %d1 4596e: 2279 0005 fee0 moveal 5fee0 <_POSIX_Timer_Information+0x18>,%a1 45974: 3200 movew %d0,%d1 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 45976: 42a8 0066 clrl %a0@(102) 4597a: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) ptimer->timer_data.it_value.tv_sec = 0; 4597e: 42a8 005a clrl %a0@(90) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45982: 42a8 000c clrl %a0@(12) ptimer->timer_data.it_value.tv_nsec = 0; 45986: 42a8 005e clrl %a0@(94) ptimer->timer_data.it_interval.tv_sec = 0; 4598a: 42a8 0052 clrl %a0@(82) ptimer->timer_data.it_interval.tv_nsec = 0; 4598e: 42a8 0056 clrl %a0@(86) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 45992: 42a8 0030 clrl %a0@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45996: 42a8 0018 clrl %a0@(24) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 4599a: 2680 movel %d0,%a3@ the_watchdog->routine = routine; 4599c: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 459a0: 42a8 0034 clrl %a0@(52) _Thread_Enable_dispatch(); 459a4: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; } 459aa: 246e fff8 moveal %fp@(-8),%a2 _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); 459ae: 4280 clrl %d0 return 0; } 459b0: 266e fffc moveal %fp@(-4),%a3 459b4: 4e5e unlk %fp 459b6: 4e75 rts if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 459b8: 4eb9 0004 f468 jsr 4f468 <__errno> _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459be: 246e fff8 moveal %fp@(-8),%a2 if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 459c2: 2040 moveal %d0,%a0 459c4: 7216 moveq #22,%d1 459c6: 70ff moveq #-1,%d0 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459c8: 266e fffc moveal %fp@(-4),%a3 459cc: 4e5e unlk %fp if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 459ce: 2081 movel %d1,%a0@ _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459d0: 4e75 rts /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 459d2: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 459d8: 4eb9 0004 f468 jsr 4f468 <__errno> _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459de: 246e fff8 moveal %fp@(-8),%a2 * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 459e2: 2040 moveal %d0,%a0 459e4: 720b moveq #11,%d1 459e6: 70ff moveq #-1,%d0 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459e8: 266e fffc moveal %fp@(-4),%a3 459ec: 4e5e unlk %fp * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 459ee: 2081 movel %d1,%a0@ _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459f0: 4e75 rts ... 000472a8 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 472a8: 4e56 fffc linkw %fp,#-4 472ac: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 472ae: 486e fffc pea %fp@(-4) 472b2: 2f2e 0008 movel %fp@(8),%sp@- 472b6: 4879 0006 2268 pea 62268 <_POSIX_Timer_Information> 472bc: 4eb9 0004 9624 jsr 49624 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 472c2: 4fef 000c lea %sp@(12),%sp 472c6: 2040 moveal %d0,%a0 472c8: 4aae fffc tstl %fp@(-4) 472cc: 6718 beqs 472e6 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 472ce: 4eb9 0005 0c94 jsr 50c94 <__errno> 472d4: 74ff moveq #-1,%d2 472d6: 2040 moveal %d0,%a0 472d8: 7016 moveq #22,%d0 472da: 2080 movel %d0,%a0@ } 472dc: 2002 movel %d2,%d0 472de: 242e fff8 movel %fp@(-8),%d2 472e2: 4e5e unlk %fp 472e4: 4e75 rts ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 472e6: 2428 0066 movel %a0@(102),%d2 ptimer->overrun = 0; 472ea: 42a8 0066 clrl %a0@(102) _Thread_Enable_dispatch(); 472ee: 4eb9 0004 9e34 jsr 49e34 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 472f4: 2002 movel %d2,%d0 472f6: 242e fff8 movel %fp@(-8),%d2 472fa: 4e5e unlk %fp 472fc: 4e75 rts ... 000459f4 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 459f4: 4e56 ffc8 linkw %fp,#-56 459f8: 202e 000c movel %fp@(12),%d0 459fc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 45a00: 266e 0010 moveal %fp@(16),%a3 45a04: 282e 0014 movel %fp@(20),%d4 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 45a08: 4a8b tstl %a3 45a0a: 6700 0194 beqw 45ba0 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 45a0e: 223c 3b9a c9ff movel #999999999,%d1 45a14: b2ab 000c cmpl %a3@(12),%d1 45a18: 6500 0186 bcsw 45ba0 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 45a1c: b2ab 0004 cmpl %a3@(4),%d1 45a20: 6500 017e bcsw 45ba0 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 45a24: 7204 moveq #4,%d1 45a26: b280 cmpl %d0,%d1 45a28: 6700 00fa beqw 45b24 45a2c: 4a80 tstl %d0 45a2e: 6600 0170 bnew 45ba0 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45a32: 260e movel %fp,%d3 45a34: 0683 ffff ffe4 addil #-28,%d3 45a3a: 204b moveal %a3,%a0 45a3c: 2243 moveal %d3,%a1 45a3e: 240e movel %fp,%d2 45a40: 0682 ffff ffe8 addil #-24,%d2 45a46: 49ee ffec lea %fp@(-20),%a4 45a4a: 4bee fff0 lea %fp@(-16),%a5 45a4e: 2298 movel %a0@+,%a1@ 45a50: 2242 moveal %d2,%a1 45a52: 2298 movel %a0@+,%a1@ 45a54: 2898 movel %a0@+,%a4@ 45a56: 2a90 movel %a0@,%a5@ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 45a58: 486e fffc pea %fp@(-4) 45a5c: 2f2e 0008 movel %fp@(8),%sp@- 45a60: 4879 0005 fec8 pea 5fec8 <_POSIX_Timer_Information> 45a66: 4eb9 0004 7e7c jsr 47e7c <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 45a6c: 4fef 000c lea %sp@(12),%sp 45a70: 2440 moveal %d0,%a2 45a72: 4aae fffc tstl %fp@(-4) 45a76: 6600 0128 bnew 45ba0 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 45a7a: 4aae ffec tstl %fp@(-20) 45a7e: 6608 bnes 45a88 45a80: 4aae fff0 tstl %fp@(-16) 45a84: 6700 0132 beqw 45bb8 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 45a88: 2f0b movel %a3,%sp@- 45a8a: 47f9 0004 95a4 lea 495a4 <_Timespec_To_ticks>,%a3 45a90: 4e93 jsr %a3@ 45a92: 2540 0062 movel %d0,%a2@(98) initial_period = _Timespec_To_ticks( &normalize.it_value ); 45a96: 2f0c movel %a4,%sp@- 45a98: 4e93 jsr %a3@ activated = _POSIX_Timer_Insert_helper( 45a9a: 2f0a movel %a2,%sp@- 45a9c: 4879 0004 5cc0 pea 45cc0 <_POSIX_Timer_TSR> 45aa2: 2f2a 0008 movel %a2@(8),%sp@- 45aa6: 2f00 movel %d0,%sp@- 45aa8: 486a 0010 pea %a2@(16) 45aac: 4eb9 0004 bedc jsr 4bedc <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 45ab2: 4fef 001c lea %sp@(28),%sp 45ab6: 4a00 tstb %d0 45ab8: 6700 0166 beqw 45c20 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 45abc: 4a84 tstl %d4 45abe: 6700 0172 beqw 45c32 *ovalue = ptimer->timer_data; 45ac2: 220a movel %a2,%d1 45ac4: 0681 0000 0052 addil #82,%d1 45aca: 2044 moveal %d4,%a0 45acc: 2241 moveal %d1,%a1 45ace: 200a movel %a2,%d0 45ad0: 0680 0000 0056 addil #86,%d0 45ad6: 47ea 005a lea %a2@(90),%a3 45ada: 280a movel %a2,%d4 45adc: 0684 0000 005e addil #94,%d4 45ae2: 20d1 movel %a1@,%a0@+ 45ae4: 2240 moveal %d0,%a1 45ae6: 20d1 movel %a1@,%a0@+ 45ae8: 2244 moveal %d4,%a1 45aea: 20d3 movel %a3@,%a0@+ 45aec: 2091 movel %a1@,%a0@ ptimer->timer_data = normalize; 45aee: 2041 moveal %d1,%a0 45af0: 2243 moveal %d3,%a1 45af2: 2091 movel %a1@,%a0@ 45af4: 2040 moveal %d0,%a0 45af6: 2242 moveal %d2,%a1 45af8: 2091 movel %a1@,%a0@ 45afa: 2044 moveal %d4,%a0 45afc: 2694 movel %a4@,%a3@ 45afe: 2095 movel %a5@,%a0@ /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45b00: 7003 moveq #3,%d0 45b02: 1540 003c moveb %d0,%a2@(60) _TOD_Get( &ptimer->time ); 45b06: 486a 006a pea %a2@(106) 45b0a: 4eb9 0004 7470 jsr 47470 <_TOD_Get> _Thread_Enable_dispatch(); 45b10: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; 45b16: 588f addql #4,%sp ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); 45b18: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45b1a: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45b20: 4e5e unlk %fp 45b22: 4e75 rts if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b24: 260e movel %fp,%d3 45b26: 0683 ffff ffe4 addil #-28,%d3 45b2c: 204b moveal %a3,%a0 45b2e: 2243 moveal %d3,%a1 45b30: 240e movel %fp,%d2 45b32: 0682 ffff ffe8 addil #-24,%d2 45b38: 200e movel %fp,%d0 45b3a: 0680 ffff ffec addil #-20,%d0 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 45b40: 2840 moveal %d0,%a4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b42: 4bee fff0 lea %fp@(-16),%a5 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 45b46: 45ee fff4 lea %fp@(-12),%a2 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b4a: 2298 movel %a0@+,%a1@ 45b4c: 2242 moveal %d2,%a1 45b4e: 2298 movel %a0@+,%a1@ 45b50: 2898 movel %a0@+,%a4@ 45b52: 2a90 movel %a0@,%a5@ /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 45b54: 2f0a movel %a2,%sp@- 45b56: 4eb9 0004 7470 jsr 47470 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 45b5c: 2f0c movel %a4,%sp@- 45b5e: 2f0a movel %a2,%sp@- 45b60: 4eb9 0004 951c jsr 4951c <_Timespec_Greater_than> 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 4a00 tstb %d0 45b6c: 6632 bnes 45ba0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 45b6e: 2f0c movel %a4,%sp@- 45b70: 2f0c movel %a4,%sp@- 45b72: 2f0a movel %a2,%sp@- 45b74: 4eb9 0004 9550 jsr 49550 <_Timespec_Subtract> 45b7a: 4fef 000c lea %sp@(12),%sp 45b7e: 486e fffc pea %fp@(-4) 45b82: 2f2e 0008 movel %fp@(8),%sp@- 45b86: 4879 0005 fec8 pea 5fec8 <_POSIX_Timer_Information> 45b8c: 4eb9 0004 7e7c jsr 47e7c <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 45b92: 4fef 000c lea %sp@(12),%sp 45b96: 2440 moveal %d0,%a2 45b98: 4aae fffc tstl %fp@(-4) 45b9c: 6700 fedc beqw 45a7a #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45ba0: 4eb9 0004 f468 jsr 4f468 <__errno> 45ba6: 7216 moveq #22,%d1 45ba8: 2040 moveal %d0,%a0 45baa: 70ff moveq #-1,%d0 } 45bac: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45bb2: 2081 movel %d1,%a0@ } 45bb4: 4e5e unlk %fp 45bb6: 4e75 rts case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 45bb8: 486a 0010 pea %a2@(16) 45bbc: 4eb9 0004 99f8 jsr 499f8 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 45bc2: 588f addql #4,%sp 45bc4: 4a84 tstl %d4 45bc6: 6700 00b6 beqw 45c7e *ovalue = ptimer->timer_data; 45bca: 220a movel %a2,%d1 45bcc: 0681 0000 0052 addil #82,%d1 45bd2: 2244 moveal %d4,%a1 45bd4: 2041 moveal %d1,%a0 45bd6: 200a movel %a2,%d0 45bd8: 0680 0000 0056 addil #86,%d0 45bde: 47ea 005a lea %a2@(90),%a3 45be2: 280a movel %a2,%d4 45be4: 0684 0000 005e addil #94,%d4 45bea: 22d0 movel %a0@,%a1@+ 45bec: 2040 moveal %d0,%a0 45bee: 22d0 movel %a0@,%a1@+ 45bf0: 2044 moveal %d4,%a0 45bf2: 22d3 movel %a3@,%a1@+ 45bf4: 2290 movel %a0@,%a1@ /* The new data are set */ ptimer->timer_data = normalize; 45bf6: 2241 moveal %d1,%a1 45bf8: 2043 moveal %d3,%a0 45bfa: 2290 movel %a0@,%a1@ 45bfc: 2240 moveal %d0,%a1 45bfe: 2042 moveal %d2,%a0 45c00: 2290 movel %a0@,%a1@ 45c02: 2244 moveal %d4,%a1 45c04: 2694 movel %a4@,%a3@ 45c06: 2295 movel %a5@,%a1@ /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45c08: 7004 moveq #4,%d0 45c0a: 1540 003c moveb %d0,%a2@(60) /* Returns with success */ _Thread_Enable_dispatch(); 45c0e: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c14: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45c16: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c1c: 4e5e unlk %fp 45c1e: 4e75 rts ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 45c20: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c26: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45c28: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c2e: 4e5e unlk %fp 45c30: 4e75 rts 45c32: 220a movel %a2,%d1 45c34: 0681 0000 0052 addil #82,%d1 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 45c3a: 2041 moveal %d1,%a0 45c3c: 2243 moveal %d3,%a1 45c3e: 200a movel %a2,%d0 45c40: 0680 0000 0056 addil #86,%d0 45c46: 47ea 005a lea %a2@(90),%a3 45c4a: 280a movel %a2,%d4 45c4c: 0684 0000 005e addil #94,%d4 45c52: 2091 movel %a1@,%a0@ 45c54: 2040 moveal %d0,%a0 45c56: 2242 moveal %d2,%a1 45c58: 2091 movel %a1@,%a0@ 45c5a: 2044 moveal %d4,%a0 45c5c: 2694 movel %a4@,%a3@ 45c5e: 2095 movel %a5@,%a0@ /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45c60: 7003 moveq #3,%d0 45c62: 1540 003c moveb %d0,%a2@(60) _TOD_Get( &ptimer->time ); 45c66: 486a 006a pea %a2@(106) 45c6a: 4eb9 0004 7470 jsr 47470 <_TOD_Get> _Thread_Enable_dispatch(); 45c70: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; 45c76: 588f addql #4,%sp ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); 45c78: 4280 clrl %d0 45c7a: 6000 fe9e braw 45b1a 45c7e: 220a movel %a2,%d1 45c80: 0681 0000 0052 addil #82,%d1 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 45c86: 2241 moveal %d1,%a1 45c88: 2043 moveal %d3,%a0 45c8a: 200a movel %a2,%d0 45c8c: 0680 0000 0056 addil #86,%d0 45c92: 47ea 005a lea %a2@(90),%a3 45c96: 280a movel %a2,%d4 45c98: 0684 0000 005e addil #94,%d4 45c9e: 2290 movel %a0@,%a1@ 45ca0: 2240 moveal %d0,%a1 45ca2: 2042 moveal %d2,%a0 45ca4: 2290 movel %a0@,%a1@ 45ca6: 2244 moveal %d4,%a1 45ca8: 2694 movel %a4@,%a3@ 45caa: 2295 movel %a5@,%a1@ /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45cac: 7004 moveq #4,%d0 45cae: 1540 003c moveb %d0,%a2@(60) /* Returns with success */ _Thread_Enable_dispatch(); 45cb2: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45cb8: 4280 clrl %d0 45cba: 6000 ff5a braw 45c16 ... 00045a7c : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 45a7c: 4e56 ffe8 linkw %fp,#-24 45a80: 48d7 041c moveml %d2-%d4/%a2,%sp@ 45a84: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 45a88: 4ab9 0006 10f6 tstl 610f6 <_POSIX_signals_Ualarm_timer+0x1c> 45a8e: 6700 0086 beqw 45b16 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 45a92: 4879 0006 10da pea 610da <_POSIX_signals_Ualarm_timer> 45a98: 4eb9 0004 96ec jsr 496ec <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 45a9e: 588f addql #4,%sp 45aa0: 7201 moveq #1,%d1 45aa2: 5580 subql #2,%d0 45aa4: b280 cmpl %d0,%d1 45aa6: 6400 0098 bccw 45b40 45aaa: 4283 clrl %d3 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 45aac: 4a82 tstl %d2 <== NOT EXECUTED 45aae: 660c bnes 45abc <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 45ab0: 2003 movel %d3,%d0 45ab2: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 45ab8: 4e5e unlk %fp 45aba: 4e75 rts if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 45abc: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 45abe: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 45ac4: 5184 subql #8,%d4 45ac6: 45f9 0004 9204 lea 49204 <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 45acc: 4c41 2000 remul %d1,%d0,%d2 45ad0: 4c41 2002 remul %d1,%d2,%d2 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 45ad4: 223c 0000 03e8 movel #1000,%d1 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 45ada: 2d42 fff8 movel %d2,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 45ade: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 45ae2: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 45ae4: 2d41 fffc movel %d1,%fp@(-4) ticks = _Timespec_To_ticks( &tp ); 45ae8: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 45aea: 2f04 movel %d4,%sp@- 45aec: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45aee: 4879 0006 10da pea 610da <_POSIX_signals_Ualarm_timer> 45af4: 4879 0006 098c pea 6098c <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 45afa: 23c0 0006 10e6 movel %d0,610e6 <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45b00: 4eb9 0004 95a4 jsr 495a4 <_Watchdog_Insert> 45b06: 4fef 0010 lea %sp@(16),%sp } return remaining; } 45b0a: 2003 movel %d3,%d0 45b0c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 45b12: 4e5e unlk %fp 45b14: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45b16: 42b9 0006 10e2 clrl 610e2 <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 45b1c: 4283 clrl %d3 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 45b1e: 203c 0004 5b88 movel #285576,%d0 the_watchdog->id = id; 45b24: 42b9 0006 10fa clrl 610fa <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 45b2a: 23c0 0006 10f6 movel %d0,610f6 <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 45b30: 42b9 0006 10fe clrl 610fe <_POSIX_signals_Ualarm_timer+0x24> /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 45b36: 4a82 tstl %d2 45b38: 6700 ff76 beqw 45ab0 45b3c: 6000 ff7e braw 45abc * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 45b40: 2039 0006 10ee movel 610ee <_POSIX_signals_Ualarm_timer+0x14>,%d0 45b46: d0b9 0006 10e6 addl 610e6 <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 45b4c: 486e fff8 pea %fp@(-8) 45b50: 90b9 0006 10f2 subl 610f2 <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 45b56: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 45b5c: 2f00 movel %d0,%sp@- 45b5e: 4eb9 0004 9174 jsr 49174 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 45b64: 202e fff8 movel %fp@(-8),%d0 45b68: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 45b6c: 283c 0000 03e8 movel #1000,%d4 45b72: 508f addql #8,%sp 45b74: 262e fffc movel %fp@(-4),%d3 45b78: 4c44 3803 remsl %d4,%d3,%d3 45b7c: d680 addl %d0,%d3 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 45b7e: 4a82 tstl %d2 45b80: 6700 ff2e beqw 45ab0 45b84: 6000 ff36 braw 45abc <== NOT EXECUTED 00045db4 : #include pid_t vfork(void) { return -1; } 45db4: 70ff moveq #-1,%d0 #include #include pid_t vfork(void) { 45db6: 4e56 0000 linkw %fp,#0 return -1; } 45dba: 4e5e unlk %fp 45dbc: 4e75 rts ... 00045dc0 : #include int wait( int *stat_loc ) { 45dc0: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45dc4: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45dca: 7258 moveq #88,%d1 45dcc: 2040 moveal %d0,%a0 } 45dce: 70ff moveq #-1,%d0 45dd0: 4e5e unlk %fp int wait( int *stat_loc ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45dd2: 2081 movel %d1,%a0@ } 45dd4: 4e75 rts ... 00045dd8 : int waitpid( pid_t pid, int *stat_loc, int options ) { 45dd8: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45ddc: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45de2: 7258 moveq #88,%d1 45de4: 2040 moveal %d0,%a0 } 45de6: 70ff moveq #-1,%d0 45de8: 4e5e unlk %fp pid_t pid, int *stat_loc, int options ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45dea: 2081 movel %d1,%a0@ } 45dec: 4e75 rts ...